/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/@hscmap/stellar-globe@0.6.19/dist/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
(()=>{var t={9565:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8975),i=function(){function t(t){this.rad=t}return Object.defineProperty(t.prototype,"deg",{get:function(){return c(this.rad)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"amin",{get:function(){return h(this.rad)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asec",{get:function(){return l(this.rad)},enumerable:!0,configurable:!0}),t.fromRad=function(e){return new t(e)},t.fromDeg=function(e){return new t(a(e))},t.fromAmin=function(e){return new t(s(e))},t.fromAsec=function(e){return new t(u(e))},t.prototype.sexadecimal=function(t,e){var n=3600*this.deg/t,i=e?n<0?"-":"+":"",o=Math.abs(n);return r.sprintf(i+"%02d:%02d:%07.4f",Math.floor(o/3600),Math.floor(o/60%60),o%60)},t.prototype.clone=function(){return new t(this.rad)},t}();e.Angle=i;var o=function(){function t(t,e){this.a=t,this.d=e}return t.parse=function(e){var n=d(e);return new t(n.a,n.d)},Object.defineProperty(t.prototype,"xyz",{get:function(){var t=this.a.rad,e=this.d.rad,n=Math.cos(e);return[n*Math.cos(t),n*Math.sin(t),Math.sin(e)]},enumerable:!0,configurable:!0}),t.fromXyz=function(e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r;if(0==o)return t.fromRad(0,i>0?Math.PI/2:-Math.PI/2);var a=2*Math.PI,s=(Math.atan2(r,n)+a)%a,u=Math.atan2(i,Math.sqrt(o));return t.fromRad(s,u)},t.fromRad=function(e,n){return new t(i.fromRad(e),i.fromRad(n))},t.fromDeg=function(e,n){return new t(i.fromDeg(e),i.fromDeg(n))},t.prototype.toString=function(){return{a:this.a.sexadecimal(15,!1),d:this.d.sexadecimal(1,!0)}},t.prototype.clone=function(){return new t(this.a.clone(),this.d.clone())},t}();function a(t){return.01745329252*t}function s(t){return.0002908882087*t}function u(t){return 4848136811e-15*t}function c(t){return 57.2957795131*t}function h(t){return 3437.7467707849*t}function l(t){return 206264.806247096*t}e.EquatorialCoord=o,e.deg2rad=a,e.amin2rad=s,e.asec2rad=u,e.rad2deg=c,e.rad2amin=h,e.rad2asec=l;var f=2*Math.PI;e.wrapTo2Pi=function(t){return t<0?f- -t%f:t%f};var p=/[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/g;function d(t){var e=(t=(t=t.replace(/−/g,"-")).replace(/([\+\-])\s+(\d)/,"$1$2").replace(/\[\d+\]/g,"")).match(p);if(null==e||e.length<2)throw new Error("invalid coord format: '"+t+"': numbers="+JSON.stringify(e));return 2==e.length?o.fromDeg(Number(e[0]),Number(e[1])):new o(v(e.slice(0,Math.floor(e.length/2)),15),v(e.slice(Math.floor(e.length/2)),1))}function v(t,e){if(0==t.length||t.length>3)throw new Error("invalid coord format: '"+t.join(", ")+"'");var n=t[0],r=null!=t[1]?Number(t[1]):0,o=null!=t[2]?Number(t[2]):0;return"-"==n.substr(0,1)?i.fromDeg(-e*(o/3600+r/60+Number(n.substr(1)))):i.fromDeg(e*(o/3600+r/60+Number(n)))}},1796:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){this.limit=t,this.onDrop=e,this.seq=0,this.count=0,this.persistCount=0,this.oldestNum=0,this.byKey=new Map,this.byNum=new Map}return t.prototype.set=function(t,e,n){void 0===n&&(n=!1);var r=this.byKey.get(t);r&&(this.onDrop&&r.v==e&&console.info("CacheMap["+t+"] is assigned twice to same value. This may cause unexpected onDrop callback."),this.deleteByPack(r));var i={k:t,v:e,num:this.seq++,persist:n};this.byKey.set(t,i),this.byNum.set(i.num,i),this.count++,n&&this.persistCount++,this.deleteOldItems()},t.prototype.peek=function(t){var e=this.byKey.get(t);return e?e.v:void 0},t.prototype.get=function(t){var e=this.byKey.get(t);if(e)return this.byNum.get(e.num),this.byNum.delete(e.num),this.byNum.set(e.num=this.seq++,e),e.v},t.prototype.keys=function(){var t=[];return this.byNum.forEach((function(e){return t.push(e.k)})),t},t.prototype.clear=function(){var t=[];this.byNum.forEach((function(e){return t.push(e)}));for(var e=0,n=t;e<n.length;e++){var r=n[e];this.deleteByPack(r)}},t.prototype.delete=function(t){var e=this.byKey.get(t);return!!e&&(this.deleteByPack(e),!0)},t.prototype.setLimit=function(t){this.limit=t,this.deleteOldItems()},t.prototype.deleteOldItems=function(){for(var t=this.limit+this.persistCount;this.count>t;){var e=this.byNum.get(this.oldestNum++);e&&!e.persist&&this.deleteByPack(e)}},t.prototype.deleteByPack=function(t){this.byKey.delete(t.k),this.byNum.delete(t.num),this.onDrop&&this.onDrop(t.v,t.k),this.count--,t.persist&&this.persistCount--},Object.defineProperty(t.prototype,"size",{get:function(){return this.byNum.size},enumerable:!0,configurable:!0}),t}();e.CacheMap=n},16:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.linear=function(t){return t},e.slowStart2=function(t){return t*t},e.fastStart2=function(t){return 1-(t=1-t)*t},e.slowStart4=function(t){var e=t*t;return e*e},e.fastStart4=function(t){var e=(t=1-t)*t;return 1-e*e},e.slowStartStop2=function(t){var e=1-t;return t<.5?2*t*t:-2*e*e+1},e.slowStartStop4=function(t){var e=t*t,n=1-t,r=n*n;return t<.5?8*e*e:-8*r*r+1}},3749:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8223),i=function(){function t(t,e){this.gl=t,this.usage=-1,this.bufferSize=-1,this.vertexCount=0,this.bufferName=r.nonNull(t.createBuffer()),e&&this.setData(e)}return t.prototype.release=function(){this.gl.deleteBuffer(this.bufferName)},t.prototype.setData=function(t){var e=t.members,n=t.array,r=t.usage,i=void 0===r?this.gl.STATIC_DRAW:r;if(e){this.members=e,this.stride=0,this.offset=[];for(var a=0,s=e;a<s.length;a++){var u=s[a];null==u.dataType&&(u.dataType=this.gl.FLOAT),null==u.normalize&&(u.normalize=!1),this.offset.push(this.stride),this.stride+=u.nComponents*o(this.gl,u.dataType)}}if(n&&(this.vertexCount=function(t){return t.length*t.BYTES_PER_ELEMENT}(n)/this.stride,this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.bufferName),i!=this.usage||this.bufferSize<this.vertexCount?(this.usage=i,this.bufferSize=this.vertexCount,this.gl.bufferData(this.gl.ARRAY_BUFFER,n,i)):this.gl.bufferSubData(this.gl.ARRAY_BUFFER,0,n),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,null),this.vertexCount%1!=0))throw"nComponents may be invalid"},t.prototype.enable=function(t,e){var n=this.gl;for(var r in n.bindBuffer(n.ARRAY_BUFFER,this.bufferName),this.members){var i=this.members[r];n.enableVertexAttribArray(t.attribLocation(i.name)),n.vertexAttribPointer(t.attribLocation(i.name),i.nComponents,i.dataType,i.normalize,this.stride,this.offset[r])}e();for(var o=0,a=this.members;o<a.length;o++){i=a[o];n.disableVertexAttribArray(t.attribLocation(i.name))}n.bindBuffer(n.ARRAY_BUFFER,null)},t}();function o(t,e){if(e===t.FLOAT)return 4;throw"unknown type: "+e}e.AttribList=i},3101:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this.pool=[]}return t.prototype.pull=function(){if(0==this.pool.length){var t=document.createElement("canvas");t.style.backgroundColor="#007",this.pool.push(t)}return this.pool.shift()},t.prototype.push=function(t){this.pool.unshift(t)},t}(),r=new Map,i=new Map;e.pull=function(t){var e=function(t){return JSON.stringify(Object.keys(t).sort().map((function(e){return[e,t[e]]})))}(t);r.has(e)||r.set(e,new n);var o=r.get(e),a=o.pull(),s=a.getContext("webgl",t)||a.getContext("experimental-webgl");if(null==s)throw new Error("gl == null");return i.set(a,o),{canvas:a,gl:s}},e.push=function(t){i.get(t).push(t)}},3898:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3101);e.canvasPool=r;var i=n(8223);e.utils=i;var o=n(8615);e.Program=o.Program;var a=n(3749);e.AttribList=a.AttribList;var s=n(7960);e.IndexBuffer=s.IndexBuffer;var u=n(4569);e.Texture=u.Texture},7960:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8223),i=function(){function t(t,e){this.gl=t,this.name=r.nonNull(this.gl.createBuffer()),e&&this.setData(e)}return t.prototype.release=function(){this.gl.deleteBuffer(this.name)},t.prototype.bind=function(t){this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.name),t(),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,null)},t.prototype.setData=function(t){var e=t.usage,n=t.array;this.usage=e||this.gl.STATIC_DRAW,this._length=n.length,this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.name),this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,n,this.usage),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,null)},Object.defineProperty(t.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0}),t}();e.IndexBuffer=i},8615:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8223),i=n(1519),o=function(){function t(t,e,n){if(this.gl=t,this.vertSource=e,this.fragSource=n,this.attribLocationMemo=new Map,this.uniformLocationMemo=new Map,this.refCount=1,this.vertShader=this.createShader(e,this.gl.VERTEX_SHADER),this.fragShader=this.createShader(n,this.gl.FRAGMENT_SHADER),this.name=r.nonNull(this.gl.createProgram()),this.gl.attachShader(this.name,this.vertShader),this.gl.attachShader(this.name,this.fragShader),this.gl.linkProgram(this.name),!this.gl.getProgramParameter(this.name,this.gl.LINK_STATUS))throw"WebGL link error: "+this.gl.getProgramInfoLog(this.name)}return t.prototype.retain=function(){return++this.refCount,this},t.new=function(e,n,r){var i=t.cache.get([e,n,r]);if(i)return i.retain();var o=new t(e,n,r);return this.cache.set([e,n,r],o),o},t.prototype.release=function(){0==--this.refCount&&(this.gl.deleteShader(this.fragShader),this.gl.deleteShader(this.vertShader),this.gl.deleteProgram(this.name),t.cache.delete([this.gl,this.vertSource,this.fragSource]))},t.prototype.use=function(){this.gl.useProgram(this.name)},t.prototype.attribLocation=function(t){var e=this.attribLocationMemo.get(t);if(null==e&&(e=this.gl.getAttribLocation(this.name,t)),-1==e)throw"unknown attribute: "+t;return this.attribLocationMemo.set(t,e),e},t.prototype.uniformLocation=function(t){var e=this.uniformLocationMemo.get(t);if(null==e&&(e=this.gl.getUniformLocation(this.name,t)),null==e)throw"unknown uniform: "+t;return this.uniformLocationMemo.set(t,e),e},t.prototype.enableAttribList=function(t,e){this.use(),t.enable(this,e)},t.prototype.uniformMatrix4fv=function(t,e){for(var n in void 0===e&&(e=!1),t){var r=t[n];this.gl.uniformMatrix4fv(this.uniformLocation(n),e,r)}},t.prototype.uniformMatrix3fv=function(t,e){for(var n in void 0===e&&(e=!1),t){var r=t[n];this.gl.uniformMatrix3fv(this.uniformLocation(n),e,r)}},t.prototype.uniformMatrix2fv=function(t,e){for(var n in void 0===e&&(e=!1),t){var r=t[n];this.gl.uniformMatrix2fv(this.uniformLocation(n),e,r)}},t.prototype.uniform1f=function(t){for(var e in t)this.gl.uniform1f(this.uniformLocation(e),t[e])},t.prototype.uniform1i=function(t){for(var e in t)this.gl.uniform1i(this.uniformLocation(e),t[e])},t.prototype.uniform2fv=function(t){for(var e in t)this.gl.uniform2fv(this.uniformLocation(e),t[e])},t.prototype.uniform3fv=function(t){for(var e in t)this.gl.uniform3fv(this.uniformLocation(e),t[e])},t.prototype.uniform4fv=function(t){for(var e in t)this.gl.uniform4fv(this.uniformLocation(e),t[e])},t.prototype.createShader=function(t,e){var n=this.gl.createShader(e);if(this.gl.shaderSource(n,t),this.gl.compileShader(n),!this.gl.getShaderParameter(n,this.gl.COMPILE_STATUS))throw"WebGL shader compile error: "+this.gl.getShaderInfoLog(n)+"\nsource:\n"+r.addLineNumber(t);return r.nonNull(n)},t.cache=new i.TupleMap,t}();e.Program=o},4569:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8223),i=function(){function t(t,e){var n=this;this.gl=t,this.name=r.nonNull(t.createTexture()),this.bind((function(){return(e||o)(n.gl)}))}return t.prototype.release=function(){this.gl.deleteTexture(this.name)},t.prototype.bind=function(t){this.gl.bindTexture(this.gl.TEXTURE_2D,this.name),t(),this.gl.bindTexture(this.gl.TEXTURE_2D,null)},t.prototype.setImage=function(t){var e=this;this.bind((function(){e.gl.texImage2D(e.gl.TEXTURE_2D,0,e.gl.RGBA,e.gl.RGBA,e.gl.UNSIGNED_BYTE,t)}))},t}();function o(t){t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)}e.Texture=i},8223:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8975);e.enable=function(t,e,n){for(var r=0,i=e;r<i.length;r++){var o=i[r];t.enable(o)}n();for(var a=0,s=e;a<s.length;a++){o=s[a];t.disable(o)}},e.addLineNumber=function(t){return t.split("\n").map((function(t,e){return r.sprintf("%4d | %s",e+1,t)})).join("\n")},e.nonNull=function(t){if(!t)throw new Error("non-null check error: "+t);return t}},5866:(t,e)=>{"use strict";function n(t,e){var n=j(t,e);return function(t,e,n,r){var i=Math.floor(e/4),o=n+r,a=(i+2)*t-o-1;if(a<t){return 2*a*(a-1)+a*(e%4)+t-r-1}if(a<3*t)return 2*t*(t-1)+4*(a-t)*t+(((e%4*2-i%2+1)*t+(n-r)+8*t)%(8*t)>>1);var s=4*t-a;return 12*t*t-2*s*(s-1)-(4*s-(4*s-s*(3-e%4)-r)+1)}(t,n.f,n.x,n.y)}function r(t,e){if(1==t)return e;var n=i(t,e);return C(t,n.f,n.x,n.y)}function i(t,e){var n=2*t*(t-1);if(e<n){var r=e-2*(l=Math.floor((Math.sqrt(1+2*e)+1)/2))*(l-1);return{f:Math.floor(r/l),x:t-l+(f=r%l),y:t-1-f}}if(e<n+8*t*t){var i=4*t,o=(r=(f=e-n)%i*2+((l=t-Math.floor(f/i))%2==0?1:0))-4*t,a=l+5*t-1,s=(a+o)/2,u=(a-o)/2,c=Math.floor(s/t),h=Math.floor(u/t);return{f:4*(5-(c+h))+(c-h+4>>1)%4,x:s%t,y:u%t}}var l,f,p=12*t*t-e-1;r=p-2*(l=Math.floor((Math.sqrt(1+2*p)+1)/2))*(l-1);return{f:11-Math.floor(r/l),x:l-(f=r%l)-1,y:f}}function o(t,e){var n=j(t,e),r=N(t,n.f,n.x,n.y),i=O(r.t,r.u);return L(i.z,i.a)}function a(t,e){var n=j(t,e),r=N(t,n.f,n.x,n.y),i=O(r.t,r.u),o=i.z,a=i.a;return{theta:Math.acos(o),phi:a}}function s(t,e,n,r){if(n>w)throw new Error("query_disc: radius must < PI/2");var i=u(t),a=T/t,s=R(e[0],e[1],e[2]),h=s.z,f=s.a,d=Math.sqrt(1-h*h),v=Math.cos(n),m=Math.sin(n),y=h*v-d*m,g=A(h*v+d*m,0).u,b=A(y,0).u,M=d*v-h*m<0,_=d*v+h*m<0,x=Math.floor((w-g)/a),E=Math.floor((w-b)/a+1);if(M){++x;for(var P=1;P<=x;++P)p(t,P,r);++x}if(0==x&&(p(t,1,r),x=2),_){for(P=--E;P<=4*t-1;++P)p(t,P,r);--E}E==4*t&&(p(t,4*t-1,r),E=4*t-2);var O=Math.acos(h);for(P=x;P<=E;++P)l(t,P,f,O,n+i,(function(a){c(o(t,a),e)<=n+i&&r(a)}))}function u(t){var e=T/t;return c(h(e,t*e),h(e,(t+1)*e))}function c(t,e){return 2*Math.asin(Math.sqrt(function(t,e){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}(t,e))/2)}function h(t,e){var n=O(t,e);return L(n.z,n.a)}function l(t,e,n,r,i,o){if(r<i||r+i>x)return p(t,e,o);var a=T*(2-e/t),s=O(T,a).z,u=Math.sin(r),c=Math.cos(r),h=Math.sin(i),l=Math.cos(i),m=Math.atan2(Math.sqrt(-D(s-c*l)/(D(u)*h*h)+1)*h,(-s*c+l)/u);if(m>=x)return p(t,e,o);for(var y=f(t,e,A(s,M(n-m,_)).t),g=f(t,e,A(s,M(n+m,_)).t),w=b(t,y,a),E=v(t,b(t,g,a)),P=w;!d(P,E);P=v(t,P))o(C(t,P.f,P.x,P.y))}function f(t,e,n){var r=T/t;return n=1+((n/=r)+e%2>>1<<1)-e%2,n*=r}function p(t,e,n){var r=b(t,T*(1+(1-e%2)/t),T*(2-e/t)),i=r;do{n(C(t,i.f,i.x,i.y)),i=v(t,i)}while(!d(i,r))}function d(t,e){return t.x==e.x&&t.y==e.y&&t.f==e.f}function v(t,e){var n=e.f,r=e.x,i=e.y;if(++r==t)switch(Math.floor(n/4)){case 0:n=(n+1)%4,r=i,i=t;break;case 1:n-=4,r=0;break;case 2:n=4+(n+1)%4,r=0}if(-1==--i)switch(Math.floor(n/4)){case 0:n=4+(n+1)%4,i=t-1;break;case 1:n+=4,i=t-1;break;case 2:n=8+(n+1)%4,i=r-1,r=0}return{f:n,x:r,y:i}}function m(t,e){for(var n=j(t,e),r=N(t,n.f,n.x,n.y),i=r.t,o=r.u,a=T/t,s=[],u=0,c=[[0,a],[-a,0],[0,-a],[a,0]];u<c.length;u++){var h=c[u],l=O(i+h[0],o+h[1]),f=l.z,p=l.a;s.push(L(f,p))}return s}function y(t,e,n,r){var i=j(t,e),o=N(t,i.f,i.x,i.y),a=o.t,s=o.u,u=T/t,c=O(a+u*(n-r),s+u*(n+r-1));return L(c.z,c.a)}function g(t,e,n){var r=A(e,n),i=b(t,r.t,r.u);return C(t,i.f,i.x,i.y)}function b(t,e,n){var r=function(t,e){t/=T,e/=T,t=M(t,8),t+=-4,e+=5;var n=k((e+t)/2,0,5),r=Math.floor(n),i=k((e-t)/2,3-r,6-r),o=Math.floor(i),a=5-(r+o);if(a<0)return{f:0,p:1,q:1};var s=4*a+(r-o+4>>1)%4,u=n%1,c=i%1;return{f:s,p:u,q:c}}(e,n),i=r.f,o=r.p,a=r.q;return{f:i,x:k(Math.floor(t*o),0,t-1),y:k(Math.floor(t*a),0,t-1)}}function M(t,e){return t<0?e- -t%e:t%e}Object.defineProperty(e,"__esModule",{value:!0}),e.uniq2orderpix=e.orderpix2uniq=e.fxy2tu=e.bit_decombine=e.bit_combine=e.fxy2nest=e.vec2ang=e.ang2vec=e.tu2za=e.za2tu=e.tu2fxy=e.pixcoord2vec_ring=e.pixcoord2vec_nest=e.nside2resol=e.nside2pixarea=e.corners_ring=e.corners_nest=e.max_pixrad=e.query_disc_inclusive_ring=e.query_disc_inclusive_nest=e.pix2ang_ring=e.pix2vec_ring=e.pix2ang_nest=e.pix2vec_nest=e.ring2fxy=e.ring2nest=e.nest2ring=e.ang2pix_ring=e.ang2pix_nest=e.vec2pix_ring=e.vec2pix_nest=e.nside2npix=e.nside2order=e.order2nside=void 0,e.order2nside=function(t){return 1<<t},e.nside2order=function(t){return function(t){var e=-1;for(;t>0;)t>>=1,++e;return e}(t)},e.nside2npix=function(t){return 12*t*t},e.vec2pix_nest=function(t,e){var n=R(e[0],e[1],e[2]);return g(t,n.z,n.a)},e.vec2pix_ring=function(t,e){var r=R(e[0],e[1],e[2]);return n(t,g(t,r.z,r.a))},e.ang2pix_nest=function(t,e,n){return g(t,Math.cos(e),n)},e.ang2pix_ring=function(t,e,r){return n(t,g(t,Math.cos(e),r))},e.nest2ring=n,e.ring2nest=r,e.ring2fxy=i,e.pix2vec_nest=o,e.pix2ang_nest=a,e.pix2vec_ring=function(t,e){return o(t,r(t,e))},e.pix2ang_ring=function(t,e){return a(t,r(t,e))},e.query_disc_inclusive_nest=s,e.query_disc_inclusive_ring=function(t,e,r,i){return s(t,e,r,(function(e){i(n(t,e))}))},e.max_pixrad=u,e.corners_nest=m,e.corners_ring=function(t,e){return m(t,r(t,e))},e.nside2pixarea=function(t){return x/(3*t*t)},e.nside2resol=function(t){return Math.sqrt(x/3)/t},e.pixcoord2vec_nest=y,e.pixcoord2vec_ring=function(t,e,n,i){return y(t,r(t,e),n,i)},e.tu2fxy=b;var _=2*Math.PI,x=Math.PI,w=Math.PI/2,T=Math.PI/4,E=Math.PI/8;function P(t){return t<0?-P(-t):2-Math.sqrt(3*(1-t))}function A(t,e){if(Math.abs(t)<=2/3)return{t:e,u:3*E*t};var n=e%w,r=P(t);return{t:e-(Math.abs(r)-1)*(n-T),u:T*r}}function O(t,e){var n=Math.abs(e);if(n>=w)return{z:z(e),a:0};if(n<=Math.PI/4)return{z:8/(3*x)*e,a:i=t};var r=t%(Math.PI/2),i=t-(n-T)/(n-w)*(r-T);return{z:z(e)*(1-1/3*D(2-4*n/x)),a:i}}function R(t,e,n){var r=t*t+e*e;if(0==r)return{z:n<0?-1:1,a:0};var i=(Math.atan2(e,t)+_)%_;return{z:n/=Math.sqrt(n*n+r),a:i}}function L(t,e){var n=Math.sqrt(1-t*t);return[n*Math.cos(e),n*Math.sin(e),t]}function C(t,e,n,r){return e*t*t+I(n,r)}function I(t,e){return q(t<65536),q(e<32768),1&t|(2&t|1&e)<<1|(4&t|2&e)<<2|(8&t|4&e)<<3|(16&t|8&e)<<4|(32&t|16&e)<<5|(64&t|32&e)<<6|(128&t|64&e)<<7|(256&t|128&e)<<8|(512&t|256&e)<<9|(1024&t|512&e)<<10|(2048&t|1024&e)<<11|(4096&t|2048&e)<<12|(8192&t|4096&e)<<13|(16384&t|8192&e)<<14|(32768&t|16384&e)<<15|e&32768<<16}function S(t){return q(t<=2147483647),{x:1&t|(4&t)>>1|(16&t)>>2|(64&t)>>3|(256&t)>>4|(1024&t)>>5|(4096&t)>>6|(16384&t)>>7|(65536&t)>>8|(262144&t)>>9|(1048576&t)>>10|(4194304&t)>>11|(16777216&t)>>12|(67108864&t)>>13|(268435456&t)>>14|(1073741824&t)>>15,y:(2&t)>>1|(8&t)>>2|(32&t)>>3|(128&t)>>4|(512&t)>>5|(2048&t)>>6|(8192&t)>>7|(32768&t)>>8|(131072&t)>>9|(524288&t)>>10|(2097152&t)>>11|(8388608&t)>>12|(33554432&t)>>13|(134217728&t)>>14|(536870912&t)>>15}}function j(t,e){var n=t*t,r=Math.floor(e/n),i=S(e%n);return{f:r,x:i.x,y:i.y}}function N(t,e,n,r){var i=Math.floor(e/4);return{t:((e%4*2-i%2+1)*t+(n-r)+8*t)/t*T,u:w-((i+2)*t-(n+r)-1)/t*T}}e.za2tu=A,e.tu2za=O,e.ang2vec=function(t,e){return L(Math.cos(t),e)},e.vec2ang=function(t){var e=R(t[0],t[1],t[2]),n=e.z,r=e.a;return{theta:Math.acos(n),phi:r}},e.fxy2nest=C,e.bit_combine=I,e.bit_decombine=S,e.fxy2tu=N,e.orderpix2uniq=function(t,e){return 4*((1<<2*t)-1)+e},e.uniq2orderpix=function(t){q(t<=2147483647);for(var e=0,n=1+(t>>2);n>=4;)n>>=2,++e;return{order:e,ipix:t-((1<<2*e)-1<<2)}};var z=Math.sign||function(t){return t>0?1:t<0?-1:0};function D(t){return t*t}function k(t,e,n){return t<e?e:t>n?n:t}function q(t){console.assert(t)}},5661:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this.minN1=10,this.minN2=15,this.history=new r(Math.max(this.minN1,this.minN2))}return t.prototype.inertial=function(t){var e=this.history,n=performance.now(),r=t.deltaY;if(e.push([n,r]),e.length<this.minN1)return!1;if(Math.abs(t.deltaY)>1){for(var i=this.minN1-1;i>1;--i){var o=e.at(-i);if((u=e.at(1-i))[1]*o[1]<0||u[1]/o[1]>1)return!1}if(e.at(-1)[1]==e.at(-(this.minN1-1))[1])return!1}else{if(e.length<this.minN2)return!1;var a=e.at(-this.minN2),s=(a[0],a[1]);if(Math.abs(s)<=1)return!1;for(i=this.minN2-1;i>1;--i){var u;o=e.at(-i);if((u=e.at(1-i))[1]*o[1]<0||u[1]/o[1]>1)return!1}}return!0},t}();e.MagicTrackpadDetector=n;var r=function(){function t(t){this.n=t,this.clear()}return t.prototype.at=function(t){var e=(this.o+t+this.length)%this.xs.length;return this.xs[e]},t.prototype.push=function(t){this.xs.length<this.n?this.xs.push(t):this.xs[this.o]=t,this.o=(this.o+1)%this.n},t.prototype.clear=function(){this.o=0,this.xs=[]},Object.defineProperty(t.prototype,"length",{get:function(){return this.xs.length},enumerable:!0,configurable:!0}),t}()},1519:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this.m=new Map,this.idMaker=new r}return t.prototype.get=function(t){var e=this.idMaker.get(t),n=this.m.get(e);return this.idMaker.forget(t),n},t.prototype.set=function(t,e){var n=this.idMaker.get(t);return this.m.has(n)&&this.idMaker.forget(t),this.m.set(n,e),this},t.prototype.has=function(t){var e=this.idMaker.get(t),n=this.m.has(e);return this.idMaker.forget(t),n},t.prototype.delete=function(t){var e=this.idMaker.get(t);return this.m.delete(e),this.idMaker.forget(t),this.idMaker.forget(t),!0},t.prototype.clear=function(){this.m.clear(),this.idMaker.clear()},t.prototype._internalMapSize=function(){return this.idMaker.idMaker.m.size},t}();e.TupleMap=n;var r=function(){function t(){this.idMaker=new i}return t.prototype.get=function(t){var e=this;return t.map((function(t){return e.idMaker.get(t)})).join("-")},t.prototype.forget=function(t){var e=this;t.forEach((function(t){return e.idMaker.forget(t)}))},t.prototype.clear=function(){this.idMaker.clear()},t}(),i=function(){function t(){this.serialNumber=0,this.m=new Map}return t.prototype.get=function(t){var e=this.m.get(t);if(null!=e)return++e.refCount,e.value;var n=++this.serialNumber;return this.m.set(t,{refCount:1,value:n}),n},t.prototype.forget=function(t){0==--this.m.get(t).refCount&&this.m.delete(t)},t.prototype.clear=function(){this.m.clear()},t}()},9669:(t,e,n)=>{t.exports=n(1609)},5448:(t,e,n)=>{"use strict";var r=n(4867),i=n(6026),o=n(4372),a=n(5327),s=n(4097),u=n(4109),c=n(7985),h=n(5061),l=n(5655),f=n(5263);t.exports=function(t){return new Promise((function(e,n){var p,d=t.data,v=t.headers,m=t.responseType;function y(){t.cancelToken&&t.cancelToken.unsubscribe(p),t.signal&&t.signal.removeEventListener("abort",p)}r.isFormData(d)&&delete v["Content-Type"];var g=new XMLHttpRequest;if(t.auth){var b=t.auth.username||"",M=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";v.Authorization="Basic "+btoa(b+":"+M)}var _=s(t.baseURL,t.url);function x(){if(g){var r="getAllResponseHeaders"in g?u(g.getAllResponseHeaders()):null,o={data:m&&"text"!==m&&"json"!==m?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:t,request:g};i((function(t){e(t),y()}),(function(t){n(t),y()}),o),g=null}}if(g.open(t.method.toUpperCase(),a(_,t.params,t.paramsSerializer),!0),g.timeout=t.timeout,"onloadend"in g?g.onloadend=x:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(x)},g.onabort=function(){g&&(n(h("Request aborted",t,"ECONNABORTED",g)),g=null)},g.onerror=function(){n(h("Network Error",t,null,g)),g=null},g.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded",r=t.transitional||l.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(h(e,t,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",g)),g=null},r.isStandardBrowserEnv()){var w=(t.withCredentials||c(_))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;w&&(v[t.xsrfHeaderName]=w)}"setRequestHeader"in g&&r.forEach(v,(function(t,e){void 0===d&&"content-type"===e.toLowerCase()?delete v[e]:g.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(g.withCredentials=!!t.withCredentials),m&&"json"!==m&&(g.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&g.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(p=function(t){g&&(n(!t||t&&t.type?new f("canceled"):t),g.abort(),g=null)},t.cancelToken&&t.cancelToken.subscribe(p),t.signal&&(t.signal.aborted?p():t.signal.addEventListener("abort",p))),d||(d=null),g.send(d)}))}},1609:(t,e,n)=>{"use strict";var r=n(4867),i=n(1849),o=n(321),a=n(7185);var s=function t(e){var n=new o(e),s=i(o.prototype.request,n);return r.extend(s,o.prototype,n),r.extend(s,n),s.create=function(n){return t(a(e,n))},s}(n(5655));s.Axios=o,s.Cancel=n(5263),s.CancelToken=n(4972),s.isCancel=n(6502),s.VERSION=n(3636).version,s.all=function(t){return Promise.all(t)},s.spread=n(8713),s.isAxiosError=n(6268),t.exports=s,t.exports.default=s},5263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},4972:(t,e,n)=>{"use strict";var r=n(5263);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;this.promise.then((function(t){if(n._listeners){var e,r=n._listeners.length;for(e=0;e<r;e++)n._listeners[e](t);n._listeners=null}})),this.promise.then=function(t){var e,r=new Promise((function(t){n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},i.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},6502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,n)=>{"use strict";var r=n(4867),i=n(5327),o=n(782),a=n(3572),s=n(7185),u=n(4875),c=u.validators;function h(t){this.defaults=t,this.interceptors={request:new o,response:new o}}h.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&u.assertOptions(e,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(t){o.push(t.fulfilled,t.rejected)})),!r){var h=[a,void 0];for(Array.prototype.unshift.apply(h,n),h=h.concat(o),i=Promise.resolve(t);h.length;)i=i.then(h.shift(),h.shift());return i}for(var l=t;n.length;){var f=n.shift(),p=n.shift();try{l=f(l)}catch(t){p(t);break}}try{i=a(l)}catch(t){return Promise.reject(t)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},h.prototype.getUri=function(t){return t=s(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){h.prototype[t]=function(e,n){return this.request(s(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){h.prototype[t]=function(e,n,r){return this.request(s(r||{},{method:t,url:e,data:n}))}})),t.exports=h},782:(t,e,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},4097:(t,e,n)=>{"use strict";var r=n(1793),i=n(7303);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},5061:(t,e,n)=>{"use strict";var r=n(481);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},3572:(t,e,n)=>{"use strict";var r=n(4867),i=n(8527),o=n(6502),a=n(5655),s=n(5263);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new s("canceled")}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=i.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return u(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(u(t),e&&e.response&&(e.response.data=i.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},481:t=>{"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.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,status:this.response&&this.response.status?this.response.status:null}},t}},7185:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){e=e||{};var n={};function i(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function o(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(t[n],e[n])}function a(t){if(!r.isUndefined(e[t]))return i(void 0,e[t])}function s(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(void 0,e[n])}function u(n){return n in e?i(t[n],e[n]):n in t?i(void 0,t[n]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return r.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||o,i=e(t);r.isUndefined(i)&&e!==u||(n[t]=i)})),n}},6026:(t,e,n)=>{"use strict";var r=n(5061);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},8527:(t,e,n)=>{"use strict";var r=n(4867),i=n(5655);t.exports=function(t,e,n){var o=this||i;return r.forEach(n,(function(n){t=n.call(o,t,e)})),t}},5655:(t,e,n)=>{"use strict";var r=n(4867),i=n(6016),o=n(481),a={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=n(5448)),u),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)||e&&"application/json"===e["Content-Type"]?(s(e,"application/json"),function(t,e,n){if(r.isString(t))try{return(e||JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||c.transitional,n=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(a){if("SyntaxError"===t.name)throw o(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){c.headers[t]=r.merge(a)})),t.exports=c},3636:t=>{t.exports={version:"0.22.0"}},1849:t=>{"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},5327:(t,e,n)=>{"use strict";var r=n(4867);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))})))})),o=a.join("&")}if(o){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},7303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),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(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},6268:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},7985:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(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 t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},6016:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},4109:(t,e,n)=>{"use strict";var r=n(4867),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"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},8713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},4875:(t,e,n)=>{"use strict";var r=n(3636).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var o={};i.transitional=function(t,e,n){function i(t,e){return"[Axios v"+r+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,a){if(!1===t)throw new Error(i(r," has been removed"+(e?" in "+e:"")));return e&&!o[r]&&(o[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,a)}},t.exports={assertOptions:function(t,e,n){if("object"!=typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),i=r.length;i-- >0;){var o=r[i],a=e[o];if(a){var s=t[o],u=void 0===s||a(s,o,t);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},4867:(t,e,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function a(t){return void 0===t}function s(t){return null!==t&&"object"==typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function h(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return s(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:h,merge:function t(){var e={};function n(n,r){u(e[r])&&u(n)?e[r]=t(e[r],n):u(n)?e[r]=t({},n):o(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)h(arguments[r],n);return e},extend:function(t,e,n){return h(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},6752:(t,e,n)=>{t.exports=n.p+"5524030224b6d804143652d9a6ed09a7._json"},887:(t,e,n)=>{"use strict";n.r(e),n.d(e,{glMatrix:()=>r,mat2:()=>i,mat2d:()=>o,mat3:()=>a,mat4:()=>s,quat:()=>h,quat2:()=>l,vec2:()=>f,vec3:()=>u,vec4:()=>c});var r={};n.r(r),n.d(r,{ARRAY_TYPE:()=>d,EPSILON:()=>p,RANDOM:()=>v,equals:()=>b,setMatrixArrayType:()=>m,toRadian:()=>g});var i={};n.r(i),n.d(i,{LDU:()=>D,add:()=>k,adjoint:()=>O,clone:()=>_,copy:()=>x,create:()=>M,determinant:()=>R,equals:()=>B,exactEquals:()=>F,frob:()=>z,fromRotation:()=>S,fromScaling:()=>j,fromValues:()=>T,identity:()=>w,invert:()=>A,mul:()=>V,multiply:()=>L,multiplyScalar:()=>U,multiplyScalarAndAdd:()=>X,rotate:()=>C,scale:()=>I,set:()=>E,str:()=>N,sub:()=>G,subtract:()=>q,transpose:()=>P});var o={};n.r(o),n.d(o,{add:()=>ct,clone:()=>Y,copy:()=>W,create:()=>H,determinant:()=>$,equals:()=>dt,exactEquals:()=>pt,frob:()=>ut,fromRotation:()=>it,fromScaling:()=>ot,fromTranslation:()=>at,fromValues:()=>Q,identity:()=>Z,invert:()=>K,mul:()=>vt,multiply:()=>tt,multiplyScalar:()=>lt,multiplyScalarAndAdd:()=>ft,rotate:()=>et,scale:()=>nt,set:()=>J,str:()=>st,sub:()=>mt,subtract:()=>ht,translate:()=>rt});var a={};n.r(a),n.d(a,{add:()=>Bt,adjoint:()=>Pt,clone:()=>bt,copy:()=>Mt,create:()=>yt,determinant:()=>At,equals:()=>Ht,exactEquals:()=>Gt,frob:()=>Ft,fromMat2d:()=>Nt,fromMat4:()=>gt,fromQuat:()=>zt,fromRotation:()=>St,fromScaling:()=>jt,fromTranslation:()=>It,fromValues:()=>_t,identity:()=>wt,invert:()=>Et,mul:()=>Yt,multiply:()=>Ot,multiplyScalar:()=>Xt,multiplyScalarAndAdd:()=>Vt,normalFromMat4:()=>Dt,projection:()=>kt,rotate:()=>Lt,scale:()=>Ct,set:()=>xt,str:()=>qt,sub:()=>Wt,subtract:()=>Ut,translate:()=>Rt,transpose:()=>Tt});var s={};n.r(s),n.d(s,{add:()=>ke,adjoint:()=>re,clone:()=>Qt,copy:()=>Jt,create:()=>Zt,determinant:()=>ie,equals:()=>Xe,exactEquals:()=>Ue,frob:()=>De,fromQuat:()=>Ee,fromQuat2:()=>be,fromRotation:()=>de,fromRotationTranslation:()=>ge,fromRotationTranslationScale:()=>we,fromRotationTranslationScaleOrigin:()=>Te,fromScaling:()=>pe,fromTranslation:()=>fe,fromValues:()=>Kt,fromXRotation:()=>ve,fromYRotation:()=>me,fromZRotation:()=>ye,frustum:()=>Pe,getRotation:()=>xe,getScaling:()=>_e,getTranslation:()=>Me,identity:()=>te,invert:()=>ne,lookAt:()=>je,mul:()=>Ve,multiply:()=>oe,multiplyScalar:()=>Fe,multiplyScalarAndAdd:()=>Be,ortho:()=>Ie,orthoNO:()=>Ce,orthoZO:()=>Se,perspective:()=>Oe,perspectiveFromFieldOfView:()=>Le,perspectiveNO:()=>Ae,perspectiveZO:()=>Re,rotate:()=>ue,rotateX:()=>ce,rotateY:()=>he,rotateZ:()=>le,scale:()=>se,set:()=>$t,str:()=>ze,sub:()=>Ge,subtract:()=>qe,targetTo:()=>Ne,translate:()=>ae,transpose:()=>ee});var u={};n.r(u),n.d(u,{add:()=>Ke,angle:()=>On,bezier:()=>Mn,ceil:()=>nn,clone:()=>Ye,copy:()=>Qe,create:()=>He,cross:()=>yn,dist:()=>Dn,distance:()=>hn,div:()=>zn,divide:()=>en,dot:()=>mn,equals:()=>In,exactEquals:()=>Cn,floor:()=>rn,forEach:()=>Bn,fromValues:()=>Ze,hermite:()=>bn,inverse:()=>dn,len:()=>qn,length:()=>We,lerp:()=>gn,max:()=>an,min:()=>on,mul:()=>Nn,multiply:()=>tn,negate:()=>pn,normalize:()=>vn,random:()=>_n,rotateX:()=>En,rotateY:()=>Pn,rotateZ:()=>An,round:()=>sn,scale:()=>un,scaleAndAdd:()=>cn,set:()=>Je,sqrDist:()=>kn,sqrLen:()=>Fn,squaredDistance:()=>ln,squaredLength:()=>fn,str:()=>Ln,sub:()=>jn,subtract:()=>$e,transformMat3:()=>wn,transformMat4:()=>xn,transformQuat:()=>Tn,zero:()=>Rn});var c={};n.r(c),n.d(c,{add:()=>Yn,ceil:()=>Jn,clone:()=>Xn,copy:()=>Gn,create:()=>Un,cross:()=>fr,dist:()=>Tr,distance:()=>ir,div:()=>wr,divide:()=>Qn,dot:()=>lr,equals:()=>Mr,exactEquals:()=>br,floor:()=>Kn,forEach:()=>Or,fromValues:()=>Vn,inverse:()=>cr,len:()=>Pr,length:()=>ar,lerp:()=>pr,max:()=>tr,min:()=>$n,mul:()=>xr,multiply:()=>Zn,negate:()=>ur,normalize:()=>hr,random:()=>dr,round:()=>er,scale:()=>nr,scaleAndAdd:()=>rr,set:()=>Hn,sqrDist:()=>Er,sqrLen:()=>Ar,squaredDistance:()=>or,squaredLength:()=>sr,str:()=>gr,sub:()=>_r,subtract:()=>Wn,transformMat4:()=>vr,transformQuat:()=>mr,zero:()=>yr});var h={};n.r(h),n.d(h,{add:()=>oi,calculateW:()=>kr,clone:()=>ei,conjugate:()=>Gr,copy:()=>ri,create:()=>Rr,dot:()=>ui,equals:()=>mi,exactEquals:()=>vi,exp:()=>qr,fromEuler:()=>Yr,fromMat3:()=>Hr,fromValues:()=>ni,getAngle:()=>Sr,getAxisAngle:()=>Ir,identity:()=>Lr,invert:()=>Vr,len:()=>li,length:()=>hi,lerp:()=>ci,ln:()=>Fr,mul:()=>ai,multiply:()=>jr,normalize:()=>di,pow:()=>Br,random:()=>Xr,rotateX:()=>Nr,rotateY:()=>zr,rotateZ:()=>Dr,rotationTo:()=>yi,scale:()=>si,set:()=>ii,setAxes:()=>bi,setAxisAngle:()=>Cr,slerp:()=>Ur,sqlerp:()=>gi,sqrLen:()=>pi,squaredLength:()=>fi,str:()=>Wr});var l={};n.r(l),n.d(l,{add:()=>Xi,clone:()=>_i,conjugate:()=>Qi,copy:()=>Oi,create:()=>Mi,dot:()=>Yi,equals:()=>io,exactEquals:()=>ro,fromMat4:()=>Ai,fromRotation:()=>Pi,fromRotationTranslation:()=>Ti,fromRotationTranslationValues:()=>wi,fromTranslation:()=>Ei,fromValues:()=>xi,getDual:()=>Ii,getReal:()=>Ci,getTranslation:()=>Ni,identity:()=>Ri,invert:()=>Zi,len:()=>Ki,length:()=>Ji,lerp:()=>Wi,mul:()=>Gi,multiply:()=>Vi,normalize:()=>eo,rotateAroundAxis:()=>Ui,rotateByQuatAppend:()=>Fi,rotateByQuatPrepend:()=>Bi,rotateX:()=>Di,rotateY:()=>ki,rotateZ:()=>qi,scale:()=>Hi,set:()=>Li,setDual:()=>ji,setReal:()=>Si,sqrLen:()=>to,squaredLength:()=>$i,str:()=>no,translate:()=>zi});var f={};n.r(f),n.d(f,{add:()=>ho,angle:()=>ko,ceil:()=>vo,clone:()=>ao,copy:()=>uo,create:()=>oo,cross:()=>Lo,dist:()=>Yo,distance:()=>xo,div:()=>Ho,divide:()=>po,dot:()=>Ro,equals:()=>Uo,exactEquals:()=>Bo,floor:()=>mo,forEach:()=>Qo,fromValues:()=>so,inverse:()=>Ao,len:()=>Xo,length:()=>To,lerp:()=>Co,max:()=>go,min:()=>yo,mul:()=>Go,multiply:()=>fo,negate:()=>Po,normalize:()=>Oo,random:()=>Io,rotate:()=>Do,round:()=>bo,scale:()=>Mo,scaleAndAdd:()=>_o,set:()=>co,sqrDist:()=>Wo,sqrLen:()=>Zo,squaredDistance:()=>wo,squaredLength:()=>Eo,str:()=>Fo,sub:()=>Vo,subtract:()=>lo,transformMat2:()=>So,transformMat2d:()=>jo,transformMat3:()=>No,transformMat4:()=>zo,zero:()=>qo});var p=1e-6,d="undefined"!=typeof Float32Array?Float32Array:Array,v=Math.random;function m(t){d=t}var y=Math.PI/180;function g(t){return t*y}function b(t,e){return Math.abs(t-e)<=p*Math.max(1,Math.abs(t),Math.abs(e))}function M(){var t=new d(4);return d!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t}function _(t){var e=new d(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function x(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function w(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t}function T(t,e,n,r){var i=new d(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function E(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function P(t,e){if(t===e){var n=e[1];t[1]=e[2],t[2]=n}else t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3];return t}function A(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*o-i*r;return a?(a=1/a,t[0]=o*a,t[1]=-r*a,t[2]=-i*a,t[3]=n*a,t):null}function O(t,e){var n=e[0];return t[0]=e[3],t[1]=-e[1],t[2]=-e[2],t[3]=n,t}function R(t){return t[0]*t[3]-t[2]*t[1]}function L(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],c=n[2],h=n[3];return t[0]=r*s+o*u,t[1]=i*s+a*u,t[2]=r*c+o*h,t[3]=i*c+a*h,t}function C(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+o*s,t[1]=i*u+a*s,t[2]=r*-s+o*u,t[3]=i*-s+a*u,t}function I(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1];return t[0]=r*s,t[1]=i*s,t[2]=o*u,t[3]=a*u,t}function S(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=-n,t[3]=r,t}function j(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=e[1],t}function N(t){return"mat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function z(t){return Math.hypot(t[0],t[1],t[2],t[3])}function D(t,e,n,r){return t[2]=r[2]/r[0],n[0]=r[0],n[1]=r[1],n[3]=r[3]-t[2]*n[1],[t,e,n]}function k(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function q(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function F(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function B(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=e[0],s=e[1],u=e[2],c=e[3];return Math.abs(n-a)<=p*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=p*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-u)<=p*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-c)<=p*Math.max(1,Math.abs(o),Math.abs(c))}function U(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function X(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var V=L,G=q;function H(){var t=new d(6);return d!=Float32Array&&(t[1]=0,t[2]=0,t[4]=0,t[5]=0),t[0]=1,t[3]=1,t}function Y(t){var e=new d(6);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function W(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Z(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Q(t,e,n,r,i,o){var a=new d(6);return a[0]=t,a[1]=e,a[2]=n,a[3]=r,a[4]=i,a[5]=o,a}function J(t,e,n,r,i,o,a){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t}function K(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=n*o-r*i;return u?(u=1/u,t[0]=o*u,t[1]=-r*u,t[2]=-i*u,t[3]=n*u,t[4]=(i*s-o*a)*u,t[5]=(r*a-n*s)*u,t):null}function $(t){return t[0]*t[3]-t[1]*t[2]}function tt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=n[0],h=n[1],l=n[2],f=n[3],p=n[4],d=n[5];return t[0]=r*c+o*h,t[1]=i*c+a*h,t[2]=r*l+o*f,t[3]=i*l+a*f,t[4]=r*p+o*d+s,t[5]=i*p+a*d+u,t}function et(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=Math.sin(n),h=Math.cos(n);return t[0]=r*h+o*c,t[1]=i*h+a*c,t[2]=r*-c+o*h,t[3]=i*-c+a*h,t[4]=s,t[5]=u,t}function nt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=n[0],h=n[1];return t[0]=r*c,t[1]=i*c,t[2]=o*h,t[3]=a*h,t[4]=s,t[5]=u,t}function rt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=n[0],h=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=r*c+o*h+s,t[5]=i*c+a*h+u,t}function it(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=-n,t[3]=r,t[4]=0,t[5]=0,t}function ot(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=e[1],t[4]=0,t[5]=0,t}function at(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=e[0],t[5]=e[1],t}function st(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"}function ut(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],1)}function ct(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t}function ht(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t}function lt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t}function ft(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t}function pt(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]}function dt(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=e[0],c=e[1],h=e[2],l=e[3],f=e[4],d=e[5];return Math.abs(n-u)<=p*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(r-c)<=p*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(i-h)<=p*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(o-l)<=p*Math.max(1,Math.abs(o),Math.abs(l))&&Math.abs(a-f)<=p*Math.max(1,Math.abs(a),Math.abs(f))&&Math.abs(s-d)<=p*Math.max(1,Math.abs(s),Math.abs(d))}var vt=tt,mt=ht;function yt(){var t=new d(9);return d!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function gt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function bt(t){var e=new d(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Mt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function _t(t,e,n,r,i,o,a,s,u){var c=new d(9);return c[0]=t,c[1]=e,c[2]=n,c[3]=r,c[4]=i,c[5]=o,c[6]=a,c[7]=s,c[8]=u,c}function xt(t,e,n,r,i,o,a,s,u,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t}function wt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Tt(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function Et(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],h=e[8],l=h*a-s*c,f=-h*o+s*u,p=c*o-a*u,d=n*l+r*f+i*p;return d?(d=1/d,t[0]=l*d,t[1]=(-h*r+i*c)*d,t[2]=(s*r-i*a)*d,t[3]=f*d,t[4]=(h*n-i*u)*d,t[5]=(-s*n+i*o)*d,t[6]=p*d,t[7]=(-c*n+r*u)*d,t[8]=(a*n-r*o)*d,t):null}function Pt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],h=e[8];return t[0]=a*h-s*c,t[1]=i*c-r*h,t[2]=r*s-i*a,t[3]=s*u-o*h,t[4]=n*h-i*u,t[5]=i*o-n*s,t[6]=o*c-a*u,t[7]=r*u-n*c,t[8]=n*a-r*o,t}function At(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*(c*o-a*u)+n*(-c*i+a*s)+r*(u*i-o*s)}function Ot(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],h=e[7],l=e[8],f=n[0],p=n[1],d=n[2],v=n[3],m=n[4],y=n[5],g=n[6],b=n[7],M=n[8];return t[0]=f*r+p*a+d*c,t[1]=f*i+p*s+d*h,t[2]=f*o+p*u+d*l,t[3]=v*r+m*a+y*c,t[4]=v*i+m*s+y*h,t[5]=v*o+m*u+y*l,t[6]=g*r+b*a+M*c,t[7]=g*i+b*s+M*h,t[8]=g*o+b*u+M*l,t}function Rt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],h=e[7],l=e[8],f=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=f*r+p*a+c,t[7]=f*i+p*s+h,t[8]=f*o+p*u+l,t}function Lt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],h=e[7],l=e[8],f=Math.sin(n),p=Math.cos(n);return t[0]=p*r+f*a,t[1]=p*i+f*s,t[2]=p*o+f*u,t[3]=p*a-f*r,t[4]=p*s-f*i,t[5]=p*u-f*o,t[6]=c,t[7]=h,t[8]=l,t}function Ct(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function It(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t}function St(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function jt(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Nt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t}function zt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,h=r*a,l=r*s,f=i*a,p=i*s,d=i*u,v=o*a,m=o*s,y=o*u;return t[0]=1-l-d,t[3]=h-y,t[6]=f+m,t[1]=h+y,t[4]=1-c-d,t[7]=p-v,t[2]=f-m,t[5]=p+v,t[8]=1-c-l,t}function Dt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],h=e[8],l=e[9],f=e[10],p=e[11],d=e[12],v=e[13],m=e[14],y=e[15],g=n*s-r*a,b=n*u-i*a,M=n*c-o*a,_=r*u-i*s,x=r*c-o*s,w=i*c-o*u,T=h*v-l*d,E=h*m-f*d,P=h*y-p*d,A=l*m-f*v,O=l*y-p*v,R=f*y-p*m,L=g*R-b*O+M*A+_*P-x*E+w*T;return L?(L=1/L,t[0]=(s*R-u*O+c*A)*L,t[1]=(u*P-a*R-c*E)*L,t[2]=(a*O-s*P+c*T)*L,t[3]=(i*O-r*R-o*A)*L,t[4]=(n*R-i*P+o*E)*L,t[5]=(r*P-n*O-o*T)*L,t[6]=(v*w-m*x+y*_)*L,t[7]=(m*M-d*w-y*b)*L,t[8]=(d*x-v*M+y*g)*L,t):null}function kt(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function qt(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function Ft(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function Bt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t}function Ut(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function Xt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t}function Vt(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t}function Gt(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]}function Ht(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],h=t[8],l=e[0],f=e[1],d=e[2],v=e[3],m=e[4],y=e[5],g=e[6],b=e[7],M=e[8];return Math.abs(n-l)<=p*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(r-f)<=p*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(i-d)<=p*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-v)<=p*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(a-m)<=p*Math.max(1,Math.abs(a),Math.abs(m))&&Math.abs(s-y)<=p*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(u-g)<=p*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(c-b)<=p*Math.max(1,Math.abs(c),Math.abs(b))&&Math.abs(h-M)<=p*Math.max(1,Math.abs(h),Math.abs(M))}var Yt=Ot,Wt=Ut;function Zt(){var t=new d(16);return d!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function Qt(t){var e=new d(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Jt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Kt(t,e,n,r,i,o,a,s,u,c,h,l,f,p,v,m){var y=new d(16);return y[0]=t,y[1]=e,y[2]=n,y[3]=r,y[4]=i,y[5]=o,y[6]=a,y[7]=s,y[8]=u,y[9]=c,y[10]=h,y[11]=l,y[12]=f,y[13]=p,y[14]=v,y[15]=m,y}function $t(t,e,n,r,i,o,a,s,u,c,h,l,f,p,d,v,m){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t[9]=h,t[10]=l,t[11]=f,t[12]=p,t[13]=d,t[14]=v,t[15]=m,t}function te(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ee(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function ne(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],h=e[8],l=e[9],f=e[10],p=e[11],d=e[12],v=e[13],m=e[14],y=e[15],g=n*s-r*a,b=n*u-i*a,M=n*c-o*a,_=r*u-i*s,x=r*c-o*s,w=i*c-o*u,T=h*v-l*d,E=h*m-f*d,P=h*y-p*d,A=l*m-f*v,O=l*y-p*v,R=f*y-p*m,L=g*R-b*O+M*A+_*P-x*E+w*T;return L?(L=1/L,t[0]=(s*R-u*O+c*A)*L,t[1]=(i*O-r*R-o*A)*L,t[2]=(v*w-m*x+y*_)*L,t[3]=(f*x-l*w-p*_)*L,t[4]=(u*P-a*R-c*E)*L,t[5]=(n*R-i*P+o*E)*L,t[6]=(m*M-d*w-y*b)*L,t[7]=(h*w-f*M+p*b)*L,t[8]=(a*O-s*P+c*T)*L,t[9]=(r*P-n*O-o*T)*L,t[10]=(d*x-v*M+y*g)*L,t[11]=(l*M-h*x-p*g)*L,t[12]=(s*E-a*A-u*T)*L,t[13]=(n*A-r*E+i*T)*L,t[14]=(v*b-d*_-m*g)*L,t[15]=(h*_-l*b+f*g)*L,t):null}function re(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],h=e[8],l=e[9],f=e[10],p=e[11],d=e[12],v=e[13],m=e[14],y=e[15];return t[0]=s*(f*y-p*m)-l*(u*y-c*m)+v*(u*p-c*f),t[1]=-(r*(f*y-p*m)-l*(i*y-o*m)+v*(i*p-o*f)),t[2]=r*(u*y-c*m)-s*(i*y-o*m)+v*(i*c-o*u),t[3]=-(r*(u*p-c*f)-s*(i*p-o*f)+l*(i*c-o*u)),t[4]=-(a*(f*y-p*m)-h*(u*y-c*m)+d*(u*p-c*f)),t[5]=n*(f*y-p*m)-h*(i*y-o*m)+d*(i*p-o*f),t[6]=-(n*(u*y-c*m)-a*(i*y-o*m)+d*(i*c-o*u)),t[7]=n*(u*p-c*f)-a*(i*p-o*f)+h*(i*c-o*u),t[8]=a*(l*y-p*v)-h*(s*y-c*v)+d*(s*p-c*l),t[9]=-(n*(l*y-p*v)-h*(r*y-o*v)+d*(r*p-o*l)),t[10]=n*(s*y-c*v)-a*(r*y-o*v)+d*(r*c-o*s),t[11]=-(n*(s*p-c*l)-a*(r*p-o*l)+h*(r*c-o*s)),t[12]=-(a*(l*m-f*v)-h*(s*m-u*v)+d*(s*f-u*l)),t[13]=n*(l*m-f*v)-h*(r*m-i*v)+d*(r*f-i*l),t[14]=-(n*(s*m-u*v)-a*(r*m-i*v)+d*(r*u-i*s)),t[15]=n*(s*f-u*l)-a*(r*f-i*l)+h*(r*u-i*s),t}function ie(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],h=t[9],l=t[10],f=t[11],p=t[12],d=t[13],v=t[14],m=t[15];return(e*a-n*o)*(l*m-f*v)-(e*s-r*o)*(h*m-f*d)+(e*u-i*o)*(h*v-l*d)+(n*s-r*a)*(c*m-f*p)-(n*u-i*a)*(c*v-l*p)+(r*u-i*s)*(c*d-h*p)}function oe(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],h=e[7],l=e[8],f=e[9],p=e[10],d=e[11],v=e[12],m=e[13],y=e[14],g=e[15],b=n[0],M=n[1],_=n[2],x=n[3];return t[0]=b*r+M*s+_*l+x*v,t[1]=b*i+M*u+_*f+x*m,t[2]=b*o+M*c+_*p+x*y,t[3]=b*a+M*h+_*d+x*g,b=n[4],M=n[5],_=n[6],x=n[7],t[4]=b*r+M*s+_*l+x*v,t[5]=b*i+M*u+_*f+x*m,t[6]=b*o+M*c+_*p+x*y,t[7]=b*a+M*h+_*d+x*g,b=n[8],M=n[9],_=n[10],x=n[11],t[8]=b*r+M*s+_*l+x*v,t[9]=b*i+M*u+_*f+x*m,t[10]=b*o+M*c+_*p+x*y,t[11]=b*a+M*h+_*d+x*g,b=n[12],M=n[13],_=n[14],x=n[15],t[12]=b*r+M*s+_*l+x*v,t[13]=b*i+M*u+_*f+x*m,t[14]=b*o+M*c+_*p+x*y,t[15]=b*a+M*h+_*d+x*g,t}function ae(t,e,n){var r,i,o,a,s,u,c,h,l,f,p,d,v=n[0],m=n[1],y=n[2];return e===t?(t[12]=e[0]*v+e[4]*m+e[8]*y+e[12],t[13]=e[1]*v+e[5]*m+e[9]*y+e[13],t[14]=e[2]*v+e[6]*m+e[10]*y+e[14],t[15]=e[3]*v+e[7]*m+e[11]*y+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],h=e[7],l=e[8],f=e[9],p=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=h,t[8]=l,t[9]=f,t[10]=p,t[11]=d,t[12]=r*v+s*m+l*y+e[12],t[13]=i*v+u*m+f*y+e[13],t[14]=o*v+c*m+p*y+e[14],t[15]=a*v+h*m+d*y+e[15]),t}function se(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ue(t,e,n,r){var i,o,a,s,u,c,h,l,f,d,v,m,y,g,b,M,_,x,w,T,E,P,A,O,R=r[0],L=r[1],C=r[2],I=Math.hypot(R,L,C);return I<p?null:(R*=I=1/I,L*=I,C*=I,i=Math.sin(n),a=1-(o=Math.cos(n)),s=e[0],u=e[1],c=e[2],h=e[3],l=e[4],f=e[5],d=e[6],v=e[7],m=e[8],y=e[9],g=e[10],b=e[11],M=R*R*a+o,_=L*R*a+C*i,x=C*R*a-L*i,w=R*L*a-C*i,T=L*L*a+o,E=C*L*a+R*i,P=R*C*a+L*i,A=L*C*a-R*i,O=C*C*a+o,t[0]=s*M+l*_+m*x,t[1]=u*M+f*_+y*x,t[2]=c*M+d*_+g*x,t[3]=h*M+v*_+b*x,t[4]=s*w+l*T+m*E,t[5]=u*w+f*T+y*E,t[6]=c*w+d*T+g*E,t[7]=h*w+v*T+b*E,t[8]=s*P+l*A+m*O,t[9]=u*P+f*A+y*O,t[10]=c*P+d*A+g*O,t[11]=h*P+v*A+b*O,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function ce(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],c=e[8],h=e[9],l=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*r,t[5]=a*i+h*r,t[6]=s*i+l*r,t[7]=u*i+f*r,t[8]=c*i-o*r,t[9]=h*i-a*r,t[10]=l*i-s*r,t[11]=f*i-u*r,t}function he(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[8],h=e[9],l=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*r,t[1]=a*i-h*r,t[2]=s*i-l*r,t[3]=u*i-f*r,t[8]=o*r+c*i,t[9]=a*r+h*i,t[10]=s*r+l*i,t[11]=u*r+f*i,t}function le(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[4],h=e[5],l=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*r,t[1]=a*i+h*r,t[2]=s*i+l*r,t[3]=u*i+f*r,t[4]=c*i-o*r,t[5]=h*i-a*r,t[6]=l*i-s*r,t[7]=f*i-u*r,t}function fe(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function pe(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function de(t,e,n){var r,i,o,a=n[0],s=n[1],u=n[2],c=Math.hypot(a,s,u);return c<p?null:(a*=c=1/c,s*=c,u*=c,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=s*a*o+u*r,t[2]=u*a*o-s*r,t[3]=0,t[4]=a*s*o-u*r,t[5]=s*s*o+i,t[6]=u*s*o+a*r,t[7]=0,t[8]=a*u*o+s*r,t[9]=s*u*o-a*r,t[10]=u*u*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function ve(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function me(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ye(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ge(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,c=o+o,h=r*s,l=r*u,f=r*c,p=i*u,d=i*c,v=o*c,m=a*s,y=a*u,g=a*c;return t[0]=1-(p+v),t[1]=l+g,t[2]=f-y,t[3]=0,t[4]=l-g,t[5]=1-(h+v),t[6]=d+m,t[7]=0,t[8]=f+y,t[9]=d-m,t[10]=1-(h+p),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function be(t,e){var n=new d(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],c=e[6],h=e[7],l=r*r+i*i+o*o+a*a;return l>0?(n[0]=2*(s*a+h*r+u*o-c*i)/l,n[1]=2*(u*a+h*i+c*r-s*o)/l,n[2]=2*(c*a+h*o+s*i-u*r)/l):(n[0]=2*(s*a+h*r+u*o-c*i),n[1]=2*(u*a+h*i+c*r-s*o),n[2]=2*(c*a+h*o+s*i-u*r)),ge(t,e,n),t}function Me(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function _e(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],c=e[9],h=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,s),t[2]=Math.hypot(u,c,h),t}function xe(t,e){var n=new d(3);_e(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,s=e[1]*i,u=e[2]*o,c=e[4]*r,h=e[5]*i,l=e[6]*o,f=e[8]*r,p=e[9]*i,v=e[10]*o,m=a+h+v,y=0;return m>0?(y=2*Math.sqrt(m+1),t[3]=.25*y,t[0]=(l-p)/y,t[1]=(f-u)/y,t[2]=(s-c)/y):a>h&&a>v?(y=2*Math.sqrt(1+a-h-v),t[3]=(l-p)/y,t[0]=.25*y,t[1]=(s+c)/y,t[2]=(f+u)/y):h>v?(y=2*Math.sqrt(1+h-a-v),t[3]=(f-u)/y,t[0]=(s+c)/y,t[1]=.25*y,t[2]=(l+p)/y):(y=2*Math.sqrt(1+v-a-h),t[3]=(s-c)/y,t[0]=(f+u)/y,t[1]=(l+p)/y,t[2]=.25*y),t}function we(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,c=o+o,h=a+a,l=i*u,f=i*c,p=i*h,d=o*c,v=o*h,m=a*h,y=s*u,g=s*c,b=s*h,M=r[0],_=r[1],x=r[2];return t[0]=(1-(d+m))*M,t[1]=(f+b)*M,t[2]=(p-g)*M,t[3]=0,t[4]=(f-b)*_,t[5]=(1-(l+m))*_,t[6]=(v+y)*_,t[7]=0,t[8]=(p+g)*x,t[9]=(v-y)*x,t[10]=(1-(l+d))*x,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Te(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],u=e[3],c=o+o,h=a+a,l=s+s,f=o*c,p=o*h,d=o*l,v=a*h,m=a*l,y=s*l,g=u*c,b=u*h,M=u*l,_=r[0],x=r[1],w=r[2],T=i[0],E=i[1],P=i[2],A=(1-(v+y))*_,O=(p+M)*_,R=(d-b)*_,L=(p-M)*x,C=(1-(f+y))*x,I=(m+g)*x,S=(d+b)*w,j=(m-g)*w,N=(1-(f+v))*w;return t[0]=A,t[1]=O,t[2]=R,t[3]=0,t[4]=L,t[5]=C,t[6]=I,t[7]=0,t[8]=S,t[9]=j,t[10]=N,t[11]=0,t[12]=n[0]+T-(A*T+L*E+S*P),t[13]=n[1]+E-(O*T+C*E+j*P),t[14]=n[2]+P-(R*T+I*E+N*P),t[15]=1,t}function Ee(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,h=r*a,l=r*s,f=i*a,p=i*s,d=i*u,v=o*a,m=o*s,y=o*u;return t[0]=1-l-d,t[1]=h+y,t[2]=f-m,t[3]=0,t[4]=h-y,t[5]=1-c-d,t[6]=p+v,t[7]=0,t[8]=f+m,t[9]=p-v,t[10]=1-c-l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Pe(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t}function Ae(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}var Oe=Ae;function Re(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function Le(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),c=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*c*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function Ce(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*c,t[15]=1,t}var Ie=Ce;function Se(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=o*c,t[15]=1,t}function je(t,e,n,r){var i,o,a,s,u,c,h,l,f,d,v=e[0],m=e[1],y=e[2],g=r[0],b=r[1],M=r[2],_=n[0],x=n[1],w=n[2];return Math.abs(v-_)<p&&Math.abs(m-x)<p&&Math.abs(y-w)<p?te(t):(h=v-_,l=m-x,f=y-w,i=b*(f*=d=1/Math.hypot(h,l,f))-M*(l*=d),o=M*(h*=d)-g*f,a=g*l-b*h,(d=Math.hypot(i,o,a))?(i*=d=1/d,o*=d,a*=d):(i=0,o=0,a=0),s=l*a-f*o,u=f*i-h*a,c=h*o-l*i,(d=Math.hypot(s,u,c))?(s*=d=1/d,u*=d,c*=d):(s=0,u=0,c=0),t[0]=i,t[1]=s,t[2]=h,t[3]=0,t[4]=o,t[5]=u,t[6]=l,t[7]=0,t[8]=a,t[9]=c,t[10]=f,t[11]=0,t[12]=-(i*v+o*m+a*y),t[13]=-(s*v+u*m+c*y),t[14]=-(h*v+l*m+f*y),t[15]=1,t)}function Ne(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=r[0],u=r[1],c=r[2],h=i-n[0],l=o-n[1],f=a-n[2],p=h*h+l*l+f*f;p>0&&(h*=p=1/Math.sqrt(p),l*=p,f*=p);var d=u*f-c*l,v=c*h-s*f,m=s*l-u*h;return(p=d*d+v*v+m*m)>0&&(d*=p=1/Math.sqrt(p),v*=p,m*=p),t[0]=d,t[1]=v,t[2]=m,t[3]=0,t[4]=l*m-f*v,t[5]=f*d-h*m,t[6]=h*v-l*d,t[7]=0,t[8]=h,t[9]=l,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function ze(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function De(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function ke(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function qe(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function Fe(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function Be(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function Ue(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function Xe(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],h=t[8],l=t[9],f=t[10],d=t[11],v=t[12],m=t[13],y=t[14],g=t[15],b=e[0],M=e[1],_=e[2],x=e[3],w=e[4],T=e[5],E=e[6],P=e[7],A=e[8],O=e[9],R=e[10],L=e[11],C=e[12],I=e[13],S=e[14],j=e[15];return Math.abs(n-b)<=p*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(r-M)<=p*Math.max(1,Math.abs(r),Math.abs(M))&&Math.abs(i-_)<=p*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(o-x)<=p*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(a-w)<=p*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(s-T)<=p*Math.max(1,Math.abs(s),Math.abs(T))&&Math.abs(u-E)<=p*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(c-P)<=p*Math.max(1,Math.abs(c),Math.abs(P))&&Math.abs(h-A)<=p*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(l-O)<=p*Math.max(1,Math.abs(l),Math.abs(O))&&Math.abs(f-R)<=p*Math.max(1,Math.abs(f),Math.abs(R))&&Math.abs(d-L)<=p*Math.max(1,Math.abs(d),Math.abs(L))&&Math.abs(v-C)<=p*Math.max(1,Math.abs(v),Math.abs(C))&&Math.abs(m-I)<=p*Math.max(1,Math.abs(m),Math.abs(I))&&Math.abs(y-S)<=p*Math.max(1,Math.abs(y),Math.abs(S))&&Math.abs(g-j)<=p*Math.max(1,Math.abs(g),Math.abs(j))}var Ve=oe,Ge=qe;function He(){var t=new d(3);return d!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Ye(t){var e=new d(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function We(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function Ze(t,e,n){var r=new d(3);return r[0]=t,r[1]=e,r[2]=n,r}function Qe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Je(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Ke(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function $e(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function tn(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function en(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function nn(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function rn(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function on(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function an(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function sn(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function un(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function cn(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function hn(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)}function ln(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function fn(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function pn(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function dn(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function vn(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function mn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function yn(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function gn(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function bn(t,e,n,r,i,o){var a=o*o,s=a*(2*o-3)+1,u=a*(o-2)+o,c=a*(o-1),h=a*(3-2*o);return t[0]=e[0]*s+n[0]*u+r[0]*c+i[0]*h,t[1]=e[1]*s+n[1]*u+r[1]*c+i[1]*h,t[2]=e[2]*s+n[2]*u+r[2]*c+i[2]*h,t}function Mn(t,e,n,r,i,o){var a=1-o,s=a*a,u=o*o,c=s*a,h=3*o*s,l=3*u*a,f=u*o;return t[0]=e[0]*c+n[0]*h+r[0]*l+i[0]*f,t[1]=e[1]*c+n[1]*h+r[1]*l+i[1]*f,t[2]=e[2]*c+n[2]*h+r[2]*l+i[2]*f,t}function _n(t,e){e=e||1;var n=2*v()*Math.PI,r=2*v()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t}function xn(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function wn(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function Tn(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=e[0],u=e[1],c=e[2],h=i*c-o*u,l=o*s-r*c,f=r*u-i*s,p=i*f-o*l,d=o*h-r*f,v=r*l-i*h,m=2*a;return h*=m,l*=m,f*=m,p*=2,d*=2,v*=2,t[0]=s+h+p,t[1]=u+l+d,t[2]=c+f+v,t}function En(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Pn(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function An(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function On(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2],u=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+s*s),c=u&&mn(t,e)/u;return Math.acos(Math.min(Math.max(c,-1),1))}function Rn(t){return t[0]=0,t[1]=0,t[2]=0,t}function Ln(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function Cn(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function In(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(n-o)<=p*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=p*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=p*Math.max(1,Math.abs(i),Math.abs(s))}var Sn,jn=$e,Nn=tn,zn=en,Dn=hn,kn=ln,qn=We,Fn=fn,Bn=(Sn=He(),function(t,e,n,r,i,o){var a,s;for(e||(e=3),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,a=n;a<s;a+=e)Sn[0]=t[a],Sn[1]=t[a+1],Sn[2]=t[a+2],i(Sn,Sn,o),t[a]=Sn[0],t[a+1]=Sn[1],t[a+2]=Sn[2];return t});function Un(){var t=new d(4);return d!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Xn(t){var e=new d(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function Vn(t,e,n,r){var i=new d(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function Gn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Hn(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function Yn(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function Wn(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function Zn(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function Qn(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function Jn(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t}function Kn(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t}function $n(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}function tr(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}function er(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t}function nr(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function rr(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t}function ir(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.hypot(n,r,i,o)}function or(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+r*r+i*i+o*o}function ar(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function sr(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function ur(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function cr(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}function hr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t}function lr(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function fr(t,e,n,r){var i=n[0]*r[1]-n[1]*r[0],o=n[0]*r[2]-n[2]*r[0],a=n[0]*r[3]-n[3]*r[0],s=n[1]*r[2]-n[2]*r[1],u=n[1]*r[3]-n[3]*r[1],c=n[2]*r[3]-n[3]*r[2],h=e[0],l=e[1],f=e[2],p=e[3];return t[0]=l*c-f*u+p*s,t[1]=-h*c+f*a-p*o,t[2]=h*u-l*a+p*i,t[3]=-h*s+l*o-f*i,t}function pr(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=s+r*(n[3]-s),t}function dr(t,e){var n,r,i,o,a,s;e=e||1;do{a=(n=2*v()-1)*n+(r=2*v()-1)*r}while(a>=1);do{s=(i=2*v()-1)*i+(o=2*v()-1)*o}while(s>=1);var u=Math.sqrt((1-a)/s);return t[0]=e*n,t[1]=e*r,t[2]=e*i*u,t[3]=e*o*u,t}function vr(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function mr(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],c=n[3],h=c*r+s*o-u*i,l=c*i+u*r-a*o,f=c*o+a*i-s*r,p=-a*r-s*i-u*o;return t[0]=h*c+p*-a+l*-u-f*-s,t[1]=l*c+p*-s+f*-a-h*-u,t[2]=f*c+p*-u+h*-s-l*-a,t[3]=e[3],t}function yr(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}function gr(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function br(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function Mr(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=e[0],s=e[1],u=e[2],c=e[3];return Math.abs(n-a)<=p*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=p*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-u)<=p*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-c)<=p*Math.max(1,Math.abs(o),Math.abs(c))}var _r=Wn,xr=Zn,wr=Qn,Tr=ir,Er=or,Pr=ar,Ar=sr,Or=function(){var t=Un();return function(e,n,r,i,o,a){var s,u;for(n||(n=4),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s<u;s+=n)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],t[3]=e[s+3],o(t,t,a),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2],e[s+3]=t[3];return e}}();function Rr(){var t=new d(4);return d!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Lr(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Cr(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Ir(t,e){var n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>p?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function Sr(t,e){var n=ui(t,e);return Math.acos(2*n*n-1)}function jr(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],c=n[2],h=n[3];return t[0]=r*h+a*s+i*c-o*u,t[1]=i*h+a*u+o*s-r*c,t[2]=o*h+a*c+r*u-i*s,t[3]=a*h-r*s-i*u-o*c,t}function Nr(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+a*s,t[1]=i*u+o*s,t[2]=o*u-i*s,t[3]=a*u-r*s,t}function zr(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u-o*s,t[1]=i*u+a*s,t[2]=o*u+r*s,t[3]=a*u-i*s,t}function Dr(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+i*s,t[1]=i*u-r*s,t[2]=o*u+a*s,t[3]=a*u-o*s,t}function kr(t,e){var n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t}function qr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),s=Math.exp(o),u=a>0?s*Math.sin(a)/a:0;return t[0]=n*u,t[1]=r*u,t[2]=i*u,t[3]=s*Math.cos(a),t}function Fr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),s=a>0?Math.atan2(a,o)/a:0;return t[0]=n*s,t[1]=r*s,t[2]=i*s,t[3]=.5*Math.log(n*n+r*r+i*i+o*o),t}function Br(t,e,n){return Fr(t,e),si(t,t,n),qr(t,t),t}function Ur(t,e,n,r){var i,o,a,s,u,c=e[0],h=e[1],l=e[2],f=e[3],d=n[0],v=n[1],m=n[2],y=n[3];return(o=c*d+h*v+l*m+f*y)<0&&(o=-o,d=-d,v=-v,m=-m,y=-y),1-o>p?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,u=Math.sin(r*i)/a):(s=1-r,u=r),t[0]=s*c+u*d,t[1]=s*h+u*v,t[2]=s*l+u*m,t[3]=s*f+u*y,t}function Xr(t){var e=v(),n=v(),r=v(),i=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=o*Math.sin(2*Math.PI*r),t[3]=o*Math.cos(2*Math.PI*r),t}function Vr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,t}function Gr(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function Hr(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*a+a]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+i]+e[3*i+o])*n,t[a]=(e[3*a+i]+e[3*i+a])*n}return t}function Yr(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),s=Math.sin(n),u=Math.cos(n),c=Math.sin(r),h=Math.cos(r);return t[0]=o*u*h-a*s*c,t[1]=a*s*h+o*u*c,t[2]=a*u*c-o*s*h,t[3]=a*u*h+o*s*c,t}function Wr(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var Zr,Qr,Jr,Kr,$r,ti,ei=Xn,ni=Vn,ri=Gn,ii=Hn,oi=Yn,ai=jr,si=nr,ui=lr,ci=pr,hi=ar,li=hi,fi=sr,pi=fi,di=hr,vi=br,mi=Mr,yi=(Zr=He(),Qr=Ze(1,0,0),Jr=Ze(0,1,0),function(t,e,n){var r=mn(e,n);return r<-.999999?(yn(Zr,Qr,e),qn(Zr)<1e-6&&yn(Zr,Jr,e),vn(Zr,Zr),Cr(t,Zr,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(yn(Zr,e,n),t[0]=Zr[0],t[1]=Zr[1],t[2]=Zr[2],t[3]=1+r,di(t,t))}),gi=(Kr=Rr(),$r=Rr(),function(t,e,n,r,i,o){return Ur(Kr,e,i,o),Ur($r,n,r,o),Ur(t,Kr,$r,2*o*(1-o)),t}),bi=(ti=yt(),function(t,e,n,r){return ti[0]=n[0],ti[3]=n[1],ti[6]=n[2],ti[1]=r[0],ti[4]=r[1],ti[7]=r[2],ti[2]=-e[0],ti[5]=-e[1],ti[8]=-e[2],di(t,Hr(t,ti))});function Mi(){var t=new d(8);return d!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0),t[3]=1,t}function _i(t){var e=new d(8);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e}function xi(t,e,n,r,i,o,a,s){var u=new d(8);return u[0]=t,u[1]=e,u[2]=n,u[3]=r,u[4]=i,u[5]=o,u[6]=a,u[7]=s,u}function wi(t,e,n,r,i,o,a){var s=new d(8);s[0]=t,s[1]=e,s[2]=n,s[3]=r;var u=.5*i,c=.5*o,h=.5*a;return s[4]=u*r+c*n-h*e,s[5]=c*r+h*t-u*n,s[6]=h*r+u*e-c*t,s[7]=-u*t-c*e-h*n,s}function Ti(t,e,n){var r=.5*n[0],i=.5*n[1],o=.5*n[2],a=e[0],s=e[1],u=e[2],c=e[3];return t[0]=a,t[1]=s,t[2]=u,t[3]=c,t[4]=r*c+i*u-o*s,t[5]=i*c+o*a-r*u,t[6]=o*c+r*s-i*a,t[7]=-r*a-i*s-o*u,t}function Ei(t,e){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=.5*e[0],t[5]=.5*e[1],t[6]=.5*e[2],t[7]=0,t}function Pi(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=0,t[5]=0,t[6]=0,t[7]=0,t}function Ai(t,e){var n=Rr();xe(n,e);var r=new d(3);return Me(r,e),Ti(t,n,r),t}function Oi(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t}function Ri(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t}function Li(t,e,n,r,i,o,a,s,u){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t}var Ci=ri;function Ii(t,e){return t[0]=e[4],t[1]=e[5],t[2]=e[6],t[3]=e[7],t}var Si=ri;function ji(t,e){return t[4]=e[0],t[5]=e[1],t[6]=e[2],t[7]=e[3],t}function Ni(t,e){var n=e[4],r=e[5],i=e[6],o=e[7],a=-e[0],s=-e[1],u=-e[2],c=e[3];return t[0]=2*(n*c+o*a+r*u-i*s),t[1]=2*(r*c+o*s+i*a-n*u),t[2]=2*(i*c+o*u+n*s-r*a),t}function zi(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=.5*n[0],u=.5*n[1],c=.5*n[2],h=e[4],l=e[5],f=e[6],p=e[7];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=a*s+i*c-o*u+h,t[5]=a*u+o*s-r*c+l,t[6]=a*c+r*u-i*s+f,t[7]=-r*s-i*u-o*c+p,t}function Di(t,e,n){var r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],c=e[6],h=e[7],l=s*a+h*r+u*o-c*i,f=u*a+h*i+c*r-s*o,p=c*a+h*o+s*i-u*r,d=h*a-s*r-u*i-c*o;return Nr(t,e,n),r=t[0],i=t[1],o=t[2],a=t[3],t[4]=l*a+d*r+f*o-p*i,t[5]=f*a+d*i+p*r-l*o,t[6]=p*a+d*o+l*i-f*r,t[7]=d*a-l*r-f*i-p*o,t}function ki(t,e,n){var r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],c=e[6],h=e[7],l=s*a+h*r+u*o-c*i,f=u*a+h*i+c*r-s*o,p=c*a+h*o+s*i-u*r,d=h*a-s*r-u*i-c*o;return zr(t,e,n),r=t[0],i=t[1],o=t[2],a=t[3],t[4]=l*a+d*r+f*o-p*i,t[5]=f*a+d*i+p*r-l*o,t[6]=p*a+d*o+l*i-f*r,t[7]=d*a-l*r-f*i-p*o,t}function qi(t,e,n){var r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],c=e[6],h=e[7],l=s*a+h*r+u*o-c*i,f=u*a+h*i+c*r-s*o,p=c*a+h*o+s*i-u*r,d=h*a-s*r-u*i-c*o;return Dr(t,e,n),r=t[0],i=t[1],o=t[2],a=t[3],t[4]=l*a+d*r+f*o-p*i,t[5]=f*a+d*i+p*r-l*o,t[6]=p*a+d*o+l*i-f*r,t[7]=d*a-l*r-f*i-p*o,t}function Fi(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=e[0],u=e[1],c=e[2],h=e[3];return t[0]=s*a+h*r+u*o-c*i,t[1]=u*a+h*i+c*r-s*o,t[2]=c*a+h*o+s*i-u*r,t[3]=h*a-s*r-u*i-c*o,s=e[4],u=e[5],c=e[6],h=e[7],t[4]=s*a+h*r+u*o-c*i,t[5]=u*a+h*i+c*r-s*o,t[6]=c*a+h*o+s*i-u*r,t[7]=h*a-s*r-u*i-c*o,t}function Bi(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],c=n[2],h=n[3];return t[0]=r*h+a*s+i*c-o*u,t[1]=i*h+a*u+o*s-r*c,t[2]=o*h+a*c+r*u-i*s,t[3]=a*h-r*s-i*u-o*c,s=n[4],u=n[5],c=n[6],h=n[7],t[4]=r*h+a*s+i*c-o*u,t[5]=i*h+a*u+o*s-r*c,t[6]=o*h+a*c+r*u-i*s,t[7]=a*h-r*s-i*u-o*c,t}function Ui(t,e,n,r){if(Math.abs(r)<p)return Oi(t,e);var i=Math.hypot(n[0],n[1],n[2]);r*=.5;var o=Math.sin(r),a=o*n[0]/i,s=o*n[1]/i,u=o*n[2]/i,c=Math.cos(r),h=e[0],l=e[1],f=e[2],d=e[3];t[0]=h*c+d*a+l*u-f*s,t[1]=l*c+d*s+f*a-h*u,t[2]=f*c+d*u+h*s-l*a,t[3]=d*c-h*a-l*s-f*u;var v=e[4],m=e[5],y=e[6],g=e[7];return t[4]=v*c+g*a+m*u-y*s,t[5]=m*c+g*s+y*a-v*u,t[6]=y*c+g*u+v*s-m*a,t[7]=g*c-v*a-m*s-y*u,t}function Xi(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t}function Vi(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[4],u=n[5],c=n[6],h=n[7],l=e[4],f=e[5],p=e[6],d=e[7],v=n[0],m=n[1],y=n[2],g=n[3];return t[0]=r*g+a*v+i*y-o*m,t[1]=i*g+a*m+o*v-r*y,t[2]=o*g+a*y+r*m-i*v,t[3]=a*g-r*v-i*m-o*y,t[4]=r*h+a*s+i*c-o*u+l*g+d*v+f*y-p*m,t[5]=i*h+a*u+o*s-r*c+f*g+d*m+p*v-l*y,t[6]=o*h+a*c+r*u-i*s+p*g+d*y+l*m-f*v,t[7]=a*h-r*s-i*u-o*c+d*g-l*v-f*m-p*y,t}var Gi=Vi;function Hi(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t}var Yi=ui;function Wi(t,e,n,r){var i=1-r;return Yi(e,n)<0&&(r=-r),t[0]=e[0]*i+n[0]*r,t[1]=e[1]*i+n[1]*r,t[2]=e[2]*i+n[2]*r,t[3]=e[3]*i+n[3]*r,t[4]=e[4]*i+n[4]*r,t[5]=e[5]*i+n[5]*r,t[6]=e[6]*i+n[6]*r,t[7]=e[7]*i+n[7]*r,t}function Zi(t,e){var n=$i(e);return t[0]=-e[0]/n,t[1]=-e[1]/n,t[2]=-e[2]/n,t[3]=e[3]/n,t[4]=-e[4]/n,t[5]=-e[5]/n,t[6]=-e[6]/n,t[7]=e[7]/n,t}function Qi(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=e[7],t}var Ji=hi,Ki=Ji,$i=fi,to=$i;function eo(t,e){var n=$i(e);if(n>0){n=Math.sqrt(n);var r=e[0]/n,i=e[1]/n,o=e[2]/n,a=e[3]/n,s=e[4],u=e[5],c=e[6],h=e[7],l=r*s+i*u+o*c+a*h;t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=(s-r*l)/n,t[5]=(u-i*l)/n,t[6]=(c-o*l)/n,t[7]=(h-a*l)/n}return t}function no(t){return"quat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+")"}function ro(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]}function io(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],h=e[0],l=e[1],f=e[2],d=e[3],v=e[4],m=e[5],y=e[6],g=e[7];return Math.abs(n-h)<=p*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(r-l)<=p*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(i-f)<=p*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(o-d)<=p*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-v)<=p*Math.max(1,Math.abs(a),Math.abs(v))&&Math.abs(s-m)<=p*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(u-y)<=p*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-g)<=p*Math.max(1,Math.abs(c),Math.abs(g))}function oo(){var t=new d(2);return d!=Float32Array&&(t[0]=0,t[1]=0),t}function ao(t){var e=new d(2);return e[0]=t[0],e[1]=t[1],e}function so(t,e){var n=new d(2);return n[0]=t,n[1]=e,n}function uo(t,e){return t[0]=e[0],t[1]=e[1],t}function co(t,e,n){return t[0]=e,t[1]=n,t}function ho(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function lo(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function fo(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function po(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function vo(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t}function mo(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t}function yo(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function go(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function bo(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function Mo(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function _o(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function xo(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.hypot(n,r)}function wo(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function To(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function Eo(t){var e=t[0],n=t[1];return e*e+n*n}function Po(t,e){return t[0]=-e[0],t[1]=-e[1],t}function Ao(t,e){return t[0]=1/e[0],t[1]=1/e[1],t}function Oo(t,e){var n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t}function Ro(t,e){return t[0]*e[0]+t[1]*e[1]}function Lo(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t}function Co(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function Io(t,e){e=e||1;var n=2*v()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t}function So(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t}function jo(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function No(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function zo(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}function Do(t,e,n,r){var i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),s=Math.cos(r);return t[0]=i*s-o*a+n[0],t[1]=i*a+o*s+n[1],t}function ko(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+o*o),s=a&&(n*i+r*o)/a;return Math.acos(Math.min(Math.max(s,-1),1))}function qo(t){return t[0]=0,t[1]=0,t}function Fo(t){return"vec2("+t[0]+", "+t[1]+")"}function Bo(t,e){return t[0]===e[0]&&t[1]===e[1]}function Uo(t,e){var n=t[0],r=t[1],i=e[0],o=e[1];return Math.abs(n-i)<=p*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=p*Math.max(1,Math.abs(r),Math.abs(o))}var Xo=To,Vo=lo,Go=fo,Ho=po,Yo=xo,Wo=wo,Zo=Eo,Qo=function(){var t=oo();return function(e,n,r,i,o,a){var s,u;for(n||(n=2),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s<u;s+=n)t[0]=e[s],t[1]=e[s+1],o(t,t,a),e[s]=t[0],e[s+1]=t[1];return e}}()},840:(t,e,n)=>{var r;
/*! Hammer.JS - v2.0.7 - 2016-04-22
 * http://hammerjs.github.io/
 *
 * Copyright (c) 2016 Jorik Tangelder;
 * Licensed under the MIT license */!function(i,o,a,s){"use strict";var u,c=["","webkit","Moz","MS","ms","o"],h=o.createElement("div"),l=Math.round,f=Math.abs,p=Date.now;function d(t,e,n){return setTimeout(_(t,n),e)}function v(t,e,n){return!!Array.isArray(t)&&(m(t,n[e],n),!0)}function m(t,e,n){var r;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==s)for(r=0;r<t.length;)e.call(n,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}function y(t,e,n){var r="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),t.apply(this,arguments)}}u="function"!=typeof Object.assign?function(t){if(t===s||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==s&&null!==r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}:Object.assign;var g=y((function(t,e,n){for(var r=Object.keys(e),i=0;i<r.length;)(!n||n&&t[r[i]]===s)&&(t[r[i]]=e[r[i]]),i++;return t}),"extend","Use `assign`."),b=y((function(t,e){return g(t,e,!0)}),"merge","Use `assign`.");function M(t,e,n){var r,i=e.prototype;(r=t.prototype=Object.create(i)).constructor=t,r._super=i,n&&u(r,n)}function _(t,e){return function(){return t.apply(e,arguments)}}function x(t,e){return"function"==typeof t?t.apply(e&&e[0]||s,e):t}function w(t,e){return t===s?e:t}function T(t,e,n){m(O(e),(function(e){t.addEventListener(e,n,!1)}))}function E(t,e,n){m(O(e),(function(e){t.removeEventListener(e,n,!1)}))}function P(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function A(t,e){return t.indexOf(e)>-1}function O(t){return t.trim().split(/\s+/g)}function R(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;r<t.length;){if(n&&t[r][n]==e||!n&&t[r]===e)return r;r++}return-1}function L(t){return Array.prototype.slice.call(t,0)}function C(t,e,n){for(var r=[],i=[],o=0;o<t.length;){var a=e?t[o][e]:t[o];R(i,a)<0&&r.push(t[o]),i[o]=a,o++}return n&&(r=e?r.sort((function(t,n){return t[e]>n[e]})):r.sort()),r}function I(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o<c.length;){if((r=(n=c[o])?n+i:e)in t)return r;o++}return s}var S=1;function j(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||i}var N="ontouchstart"in i,z=I(i,"PointerEvent")!==s,D=N&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),k="touch",q="mouse",F=24,B=["x","y"],U=["clientX","clientY"];function X(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){x(t.options.enable,[t])&&n.handler(e)},this.init()}function V(t,e,n){var r=n.pointers.length,i=n.changedPointers.length,o=1&e&&r-i==0,a=12&e&&r-i==0;n.isFirst=!!o,n.isFinal=!!a,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,r=e.pointers,i=r.length;n.firstInput||(n.firstInput=G(e));i>1&&!n.firstMultiple?n.firstMultiple=G(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,u=a?a.center:o.center,c=e.center=H(r);e.timeStamp=p(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=Q(u,c),e.distance=Z(u,c),function(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};1!==e.eventType&&4!==o.eventType||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y});e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}(n,e),e.offsetDirection=W(e.deltaX,e.deltaY);var h=Y(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=f(h.x)>f(h.y)?h.x:h.y,e.scale=a?(l=a.pointers,d=r,Z(d[0],d[1],U)/Z(l[0],l[1],U)):1,e.rotation=a?function(t,e){return Q(e[1],e[0],U)+Q(t[1],t[0],U)}(a.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,r,i,o,a=t.lastInterval||e,u=e.timeStamp-a.timeStamp;if(8!=e.eventType&&(u>25||a.velocity===s)){var c=e.deltaX-a.deltaX,h=e.deltaY-a.deltaY,l=Y(u,c,h);r=l.x,i=l.y,n=f(l.x)>f(l.y)?l.x:l.y,o=W(c,h),t.lastInterval=e}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}(n,e);var l,d;var v=t.element;P(e.srcEvent.target,v)&&(v=e.srcEvent.target);e.target=v}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function G(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:l(t.pointers[n].clientX),clientY:l(t.pointers[n].clientY)},n++;return{timeStamp:p(),pointers:e,center:H(e),deltaX:t.deltaX,deltaY:t.deltaY}}function H(t){var e=t.length;if(1===e)return{x:l(t[0].clientX),y:l(t[0].clientY)};for(var n=0,r=0,i=0;i<e;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:l(n/e),y:l(r/e)}}function Y(t,e,n){return{x:e/t||0,y:n/t||0}}function W(t,e){return t===e?1:f(t)>=f(e)?t<0?2:4:e<0?8:16}function Z(t,e,n){n||(n=B);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function Q(t,e,n){n||(n=B);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}X.prototype={handler:function(){},init:function(){this.evEl&&T(this.element,this.evEl,this.domHandler),this.evTarget&&T(this.target,this.evTarget,this.domHandler),this.evWin&&T(j(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&E(this.element,this.evEl,this.domHandler),this.evTarget&&E(this.target,this.evTarget,this.domHandler),this.evWin&&E(j(this.element),this.evWin,this.domHandler)}};var J={mousedown:1,mousemove:2,mouseup:4},K="mousedown",$="mousemove mouseup";function tt(){this.evEl=K,this.evWin=$,this.pressed=!1,X.apply(this,arguments)}M(tt,X,{handler:function(t){var e=J[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:q,srcEvent:t}))}});var et={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},nt={2:k,3:"pen",4:q,5:"kinect"},rt="pointerdown",it="pointermove pointerup pointercancel";function ot(){this.evEl=rt,this.evWin=it,X.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(rt="MSPointerDown",it="MSPointerMove MSPointerUp MSPointerCancel"),M(ot,X,{handler:function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),i=et[r],o=nt[t.pointerType]||t.pointerType,a=o==k,s=R(e,t.pointerId,"pointerId");1&i&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):12&i&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(s,1))}});var at={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function st(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,X.apply(this,arguments)}function ut(t,e){var n=L(t.touches),r=L(t.changedTouches);return 12&e&&(n=C(n.concat(r),"identifier",!0)),[n,r]}M(st,X,{handler:function(t){var e=at[t.type];if(1===e&&(this.started=!0),this.started){var n=ut.call(this,t,e);12&e&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:k,srcEvent:t})}}});var ct={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ht="touchstart touchmove touchend touchcancel";function lt(){this.evTarget=ht,this.targetIds={},X.apply(this,arguments)}function ft(t,e){var n=L(t.touches),r=this.targetIds;if(3&e&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=L(t.changedTouches),s=[],u=this.target;if(o=n.filter((function(t){return P(t.target,u)})),1===e)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),12&e&&delete r[a[i].identifier],i++;return s.length?[C(o.concat(s),"identifier",!0),s]:void 0}M(lt,X,{handler:function(t){var e=ct[t.type],n=ft.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:k,srcEvent:t})}});function pt(){X.apply(this,arguments);var t=_(this.handler,this);this.touch=new lt(this.manager,t),this.mouse=new tt(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function dt(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,vt.call(this,e)):12&t&&vt.call(this,e)}function vt(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout((function(){var t=r.indexOf(n);t>-1&&r.splice(t,1)}),2500)}}function mt(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(e-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}M(pt,X,{handler:function(t,e,n){var r=n.pointerType==k,i=n.pointerType==q;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)dt.call(this,e,n);else if(i&&mt.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var yt=I(h.style,"touchAction"),gt=yt!==s,bt="compute",Mt="auto",_t="manipulation",xt="none",wt="pan-x",Tt="pan-y",Et=function(){if(!gt)return!1;var t={},e=i.CSS&&i.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){t[n]=!e||i.CSS.supports("touch-action",n)})),t}();function Pt(t,e){this.manager=t,this.set(e)}Pt.prototype={set:function(t){t==bt&&(t=this.compute()),gt&&this.manager.element.style&&Et[t]&&(this.manager.element.style[yt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return m(this.manager.recognizers,(function(e){x(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(A(t,xt))return xt;var e=A(t,wt),n=A(t,Tt);if(e&&n)return xt;if(e||n)return e?wt:Tt;if(A(t,_t))return _t;return Mt}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var r=this.actions,i=A(r,xt)&&!Et[xt],o=A(r,Tt)&&!Et[Tt],a=A(r,wt)&&!Et[wt];if(i){var s=1===t.pointers.length,u=t.distance<2,c=t.deltaTime<250;if(s&&u&&c)return}if(!a||!o)return i||o&&6&n||a&&n&F?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var At=32;function Ot(t){this.options=u({},this.defaults,t||{}),this.id=S++,this.manager=null,this.options.enable=w(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Rt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function Lt(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function Ct(t,e){var n=e.manager;return n?n.get(t):t}function It(){Ot.apply(this,arguments)}function St(){It.apply(this,arguments),this.pX=null,this.pY=null}function jt(){It.apply(this,arguments)}function Nt(){Ot.apply(this,arguments),this._timer=null,this._input=null}function zt(){It.apply(this,arguments)}function Dt(){It.apply(this,arguments)}function kt(){Ot.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function qt(t,e){return(e=e||{}).recognizers=w(e.recognizers,qt.defaults.preset),new Ft(t,e)}Ot.prototype={defaults:{},set:function(t){return u(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(v(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Ct(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return v(t,"dropRecognizeWith",this)||(t=Ct(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(v(t,"requireFailure",this))return this;var e=this.requireFail;return-1===R(e,t=Ct(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(v(t,"dropRequireFailure",this))return this;t=Ct(t,this);var e=R(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function r(n){e.manager.emit(n,t)}n<8&&r(e.options.event+Rt(n)),r(e.options.event),t.additionalEvent&&r(t.additionalEvent),n>=8&&r(e.options.event+Rt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=At},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=u({},t);if(!x(this.options.enable,[this,e]))return this.reset(),void(this.state=At);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},M(It,Ot,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,r=6&e,i=this.attrTest(t);return r&&(8&n||!i)?16|e:r||i?4&n?8|e:2&e?4|e:2:At}}),M(St,It,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push(Tt),t&F&&e.push(wt),e},directionTest:function(t){var e=this.options,n=!0,r=t.distance,i=t.direction,o=t.deltaX,a=t.deltaY;return i&e.direction||(6&e.direction?(i=0===o?1:o<0?2:4,n=o!=this.pX,r=Math.abs(t.deltaX)):(i=0===a?1:a<0?8:16,n=a!=this.pY,r=Math.abs(t.deltaY))),t.direction=i,n&&r>e.threshold&&i&e.direction},attrTest:function(t){return It.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Lt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),M(jt,It,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[xt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),M(Nt,Ot,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Mt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime>e.time;if(this._input=t,!r||!n||12&t.eventType&&!i)this.reset();else if(1&t.eventType)this.reset(),this._timer=d((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return At},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),M(zt,It,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[xt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),M(Dt,It,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return St.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:n&F&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&f(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=Lt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),M(kt,Ot,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[_t]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(r&&i&&n){if(4!=t.eventType)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,a=!this.pCenter||Z(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&o?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=d((function(){this.state=8,this.tryEmit()}),e.interval,this),2):8}return At},failTimeout:function(){return this._timer=d((function(){this.state=At}),this.options.interval,this),At},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),qt.VERSION="2.0.7",qt.defaults={domEvents:!1,touchAction:bt,enable:!0,inputTarget:null,inputClass:null,preset:[[zt,{enable:!1}],[jt,{enable:!1},["rotate"]],[Dt,{direction:6}],[St,{direction:6},["swipe"]],[kt],[kt,{event:"doubletap",taps:2},["tap"]],[Nt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Ft(t,e){var n;this.options=u({},qt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(z?ot:D?lt:N?pt:tt))(n,V),this.touchAction=new Pt(this,this.options.touchAction),Bt(this,!0),m(this.options.recognizers,(function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}function Bt(t,e){var n,r=t.element;r.style&&(m(t.options.cssProps,(function(i,o){n=I(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}Ft.prototype={set:function(t){return u(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var r=this.recognizers,i=e.curRecognizer;(!i||i&&8&i.state)&&(i=e.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===e.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(t),!i&&14&n.state&&(i=e.curRecognizer=n),o++}},get:function(t){if(t instanceof Ot)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(v(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(v(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=R(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==s&&e!==s){var n=this.handlers;return m(O(t),(function(t){n[t]=n[t]||[],n[t].push(e)})),this}},off:function(t,e){if(t!==s){var n=this.handlers;return m(O(t),(function(t){e?n[t]&&n[t].splice(R(n[t],e),1):delete n[t]})),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](e),r++}},destroy:function(){this.element&&Bt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u(qt,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:At,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:F,DIRECTION_ALL:30,Manager:Ft,Input:X,TouchAction:Pt,TouchInput:lt,MouseInput:tt,PointerEventInput:ot,TouchMouseInput:pt,SingleTouchInput:st,Recognizer:Ot,AttrRecognizer:It,Tap:kt,Pan:St,Swipe:Dt,Pinch:jt,Rotate:zt,Press:Nt,on:T,off:E,each:m,merge:b,extend:g,assign:u,inherit:M,bindFn:_,prefixed:I}),(void 0!==i?i:"undefined"!=typeof self?self:{}).Hammer=qt,(r=function(){return qt}.call(e,n,e,t))===s||(t.exports=r)}(window,document)},3638:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="precision mediump float;\nuniform   sampler2D  u_texture;\nuniform   float      u_alpha;\nuniform   vec4       u_color;\nvarying   vec2       v_tCoord;\n\nvoid main() {\n    gl_FragColor = u_color * texture2D(u_texture, v_tCoord);\n    gl_FragColor.a *= u_alpha;\n}"},5297:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="uniform    mat4   u_pvMatrix, u_mMatrix;\nuniform    float  u_width, u_height;\nattribute  vec3   a_vCoord;\nattribute  vec2   a_size, a_tCoord;\nvarying    vec2   v_tCoord;\n\nvoid main(void) {\n    gl_Position = u_pvMatrix * vec4(a_vCoord, 1.);\n    gl_Position.x += a_size.x / u_width * gl_Position.w;\n    gl_Position.y += a_size.y / u_height * gl_Position.w;\n    v_tCoord = a_tCoord;\n}"},8032:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="precision mediump float;\n\nuniform    samplerCube   u_cubeTexture;\nuniform    mat4          u_mMatrix;\nuniform    float         u_radius;\nuniform    float         u_alpha;\nuniform    vec3          u_eyePosition;\nvarying    vec3          v_position;\n\nvoid main() {\n    vec3 d = v_position - u_eyePosition;\n    float a = dot(d, d),\n          b = 2. * dot(u_eyePosition, d),\n          c = dot(u_eyePosition, u_eyePosition) - u_radius*u_radius,\n          D = b*b - 4.*a*c,\n          t1, t2;\n    if (D < 0.)\n        discard;\n    t1 = (-b + sqrt(D)) / (2.*a);\n    t2 = (-b - sqrt(D)) / (2.*a);\n    vec3 dir1 = u_eyePosition + t1*d;\n    vec3 dir2 = u_eyePosition + t2*d;\n    float z = t2 * length(d);\n    gl_FragColor = textureCube(u_cubeTexture, (u_mMatrix * vec4(dir1, 1.)).yzx) +\n                   vec4(vec3(smoothstep(0., 1., z)), 0.) * textureCube(u_cubeTexture, (u_mMatrix * vec4(dir2, 1.)).yzx);\n\n    gl_FragColor.rgb = pow(gl_FragColor.rgb, vec3(1.));\n    // gl_FragColor = textureCube(u_cubeTexture, (u_mMatrix * vec4(dir1, 1.)).yzx);\n    gl_FragColor.a *= u_alpha;\n}"},1579:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="precision mediump float;\n\nuniform    mat4          u_pvMatrix;\nuniform    float         u_radius;\nattribute  vec3          a_position;\nvarying    vec3          v_position;\n\nvoid main(void) {\n    gl_Position = u_pvMatrix * vec4(u_radius * a_position, 1.);\n    v_position = u_radius * a_position;\n}"},7003:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="precision mediump float;\nuniform   sampler2D  u_texture1;\nuniform   sampler2D  u_shiftmap;\nuniform   mat3       u_tMatrix;\nuniform   float      u_alpha;\nvarying   vec2       v_coord;\nvarying   float      v_w;\n\n/*\n    // TypeScript\n    function encode(v: number) {\n        const VMAX = 0.015\n        return ((v / VMAX) + 1) / 2 * 256\n    }\n*/\n\nconst float VMAX = 0.015;\nvec2 decode_shiftmap(vec2 e) {\n    e *= 255. / 256.;\n    return (2. * e - 1.) * VMAX;\n}\n\nconst float DELTA_MAP_N = 64.;\nvec2 delta_coord(vec2 c) {\n    return (1./DELTA_MAP_N)*((DELTA_MAP_N-1.)*c + vec2(0.5));\n}\n\n\nvoid main() {\n    vec2 tCoord = (u_tMatrix * vec3(v_coord - decode_shiftmap(texture2D(u_shiftmap, delta_coord(v_coord)).xy), 1)).xy;\n    gl_FragColor = texture2D(u_texture1, tCoord);\n    gl_FragColor.a *= u_alpha * clamp(4. * (v_w - 0.2), 0., 1.);\n    // vec2 d = pow(2. * (v_coord - vec2(0.5)), vec2(10.));\n    // gl_FragColor.g += 0.75 * dot(d, d);\n}"},5259:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="precision mediump float;\nattribute  vec2   a_coord;\nuniform    mat4   u_pvMatrix;\nuniform    mat3   u_rotMatrix;\nuniform    mat3   u_tMatrix;\nuniform    float  u_belt_end;\nuniform    mat4   u_ax, u_ay, u_az;\nuniform    mat4   u_bx, u_by, u_bz;\nvarying    vec2   v_coord;\nvarying    float  v_w;\n\n\nvoid main(void) {\n    float p = a_coord.x;\n    float q = a_coord.y;\n    float p2 = p*p,  q2 = q*q;\n    float p3 = p2*p, q3 = q2*q;\n    float p4 = p3*p, q4 = q3*q;\n    vec4 P = vec4(p3, p2, p, 1.);\n    vec4 Q = vec4(q3, q2, q, 1.);\n    vec3 position;\n    vec3 a = vec3(\n        dot(P, u_ax * Q),\n        dot(P, u_ay * Q),\n        dot(P, u_az * Q)\n    );\n    vec3 b = vec3(\n        dot(P, u_bx * Q),\n        dot(P, u_by * Q),\n        dot(P, u_bz * Q)\n    );\n    position = mix(a, b, step(0., u_belt_end * (q - p) - 1./128.));\n    gl_Position = u_pvMatrix * vec4(u_rotMatrix * position, 1.);\n    v_coord = a_coord;\n    v_w = gl_Position.w;\n}"},6526:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="precision mediump float;\n\nuniform  float  u_fovy;\nvarying  vec4   v_color;\nvarying  float  v_y;\nvarying  float  v_w;\n\nvoid main() {\n    float alpha = 1. - smoothstep(0., 0.9, abs(v_y));\n    alpha *= clamp(4. * (v_w - 0.2), 0., 1.);\n    gl_FragColor = vec4(v_color.rgb, alpha * v_color.a);    \n}\n"},5933:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="precision mediump float;\n\nuniform    mat4   u_pvmMatrix;\nuniform    float  u_aspectRatio;\nuniform    float  u_alpha;\nuniform    float  u_fovy;\nuniform    float  u_minWidth;\nuniform    int    u_darkenNarrowLine;\nattribute  vec3   a_p;\nattribute  vec3   a_a;\nattribute  vec3   a_b;\nattribute  float  a_y;\nattribute  float  a_width;\nattribute  vec4   a_color;\nvarying    vec4   v_color;\nvarying    float  v_y;\nvarying    float  v_w;\n\n\nvoid main(void) {\n    vec4 p4 = u_pvmMatrix * vec4(a_p, 1.);\n\n    vec4 a4 = u_pvmMatrix * vec4(a_a, 1.),\n         b4 = u_pvmMatrix * vec4(a_b, 1.);\n\n    vec2 a2 = (p4.w * a4.xy - a4.w * p4.xy) / (p4.w * p4.w),\n         b2 = (p4.w * b4.xy - b4.w * p4.xy) / (p4.w * p4.w);\n\n    a2.x *= u_aspectRatio;\n    b2.x *= u_aspectRatio;\n    a2 = normalize(a2);\n    b2 = normalize(b2);\n\n    vec2 t2 = normalize(b2 - a2),\n         v2 = vec2(-t2.y, t2.x);\n\n\tv_color = a_color;\n    v_color.a *= u_alpha;\n    u_alpha;\n\n    float cosecPhi = clamp(1. / (a2.y*v2.x - a2.x*v2.y), -2., 2.),\n          width = a_width / u_fovy,\n          minWidth = u_minWidth * p4.w;\n\n    if (width < minWidth) {\n        if (u_darkenNarrowLine == 1) {\n            v_color.a *= width / minWidth;\n        }\n        width = minWidth;\n    }\n\n    vec2 d2 = width * a_y * v2 * cosecPhi;\n    d2.x /= u_aspectRatio;\n    p4.xy += d2;\n    gl_Position = p4;\n\n    v_y = a_y;\n    v_w = gl_Position.w;\n}"},5071:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="precision mediump float;\nvarying   vec4   v_color;\nvarying   float  v_w;\n\n\nvoid main() {\n    float r = 2. * length(gl_PointCoord - vec2(0.5));\n    float v = (1. - smoothstep(0.6, 1.0, r)) * clamp(4. * (v_w - 0.2), 0., 1.);\n    gl_FragColor = v_color;\n    gl_FragColor.a *= v;\n}"},2957:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="uniform    mat4   u_pvMatrix;\nuniform    float  u_minSize;\nuniform    float  u_alpha;\nuniform    float  u_fovy;\nuniform    float  u_bufferHeight;\nuniform    int    u_darkenSmallPoint;\nattribute  vec3   a_position;\nattribute  float  a_size;\nattribute  vec4   a_color;\nvarying    vec4   v_color;\nvarying    float  v_w;\n\n\n\nvoid main(void) {\n    gl_Position = u_pvMatrix * vec4(a_position, 1.);\n    float pointSize = u_bufferHeight * a_size / (gl_Position.w * u_fovy);\n    float screenSize = max(pointSize, u_minSize);\n    float r = pointSize / screenSize;\n    v_color = a_color;\n    v_color.a *= u_darkenSmallPoint != 0 ? u_alpha * r * r : u_alpha;\n    gl_PointSize = screenSize;\n    v_w = gl_Position.w;\n}"},3846:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="precision mediump float;\n\nuniform    sampler2D  u_texture0;\nuniform    float      u_layer_alpha;\nuniform    float      u_alpha;\nvarying    vec2       v_tCoord;\n\nvoid main() {\n    u_layer_alpha;\n    gl_FragColor = texture2D(u_texture0, v_tCoord);\n    gl_FragColor.rgb *= u_layer_alpha;\n    gl_FragColor.a *= u_alpha;\n}\n"},5835:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="uniform    mat4   u_pvMatrix;\nuniform    mat4   u_mMatrix;\nuniform    mat3   u_texMatrix;\nuniform    mat3   u_tileMatrix;\nattribute  vec2   a_coord;\nvarying    vec2   v_tCoord;\n\n\nvoid main(void) {\n    v_tCoord = (u_texMatrix * vec3(a_coord, 1.)).xy;\n    vec4 position = u_mMatrix * vec4((u_tileMatrix * vec3(v_tCoord, 1.)).xy, 0., 1.);\n    // position.xyz /= vec3(length(position.xyz)); // for fd2u\n    gl_Position = u_pvMatrix * position;\n}\n"},8975:(t,e,n)=>{var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return function(t,e){var n,r,a,s,u,c,h,l,f,p=1,d=t.length,v="";for(r=0;r<d;r++)if("string"==typeof t[r])v+=t[r];else if("object"==typeof t[r]){if((s=t[r]).keys)for(n=e[p],a=0;a<s.keys.length;a++){if(null==n)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[a],s.keys[a-1]));n=n[s.keys[a]]}else n=s.param_no?e[s.param_no]:e[p++];if(i.not_type.test(s.type)&&i.not_primitive.test(s.type)&&n instanceof Function&&(n=n()),i.numeric_arg.test(s.type)&&"number"!=typeof n&&isNaN(n))throw new TypeError(o("[sprintf] expecting number but found %T",n));switch(i.number.test(s.type)&&(l=n>=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=n:(!i.number.test(s.type)||l&&!s.sign?f="":(f=l?"+":"-",n=n.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",h=s.width-(f+n).length,u=s.width&&h>0?c.repeat(h):"",v+=s.align?f+n+u:"0"===c?f+u+n:u+f+n)}return v}(function(t){if(s[t])return s[t];var e,n=t,r=[],o=0;for(;n;){if(null!==(e=i.text.exec(n)))r.push(e[0]);else if(null!==(e=i.modulo.exec(n)))r.push("%");else{if(null===(e=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var a=[],u=e[2],c=[];if(null===(c=i.key.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(u=u.substring(c[0].length));)if(null!==(c=i.key_access.exec(u)))a.push(c[1]);else{if(null===(c=i.index_access.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}e[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}n=n.substring(e[0].length)}return s[t]=r}(t),arguments)}function a(t,e){return o.apply(null,[t].concat(e||[]))}var s=Object.create(null);e.sprintf=o,e.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(e,n,e,t))||(t.exports=r))}()},496:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Animation=e.AnimationManager=void 0;var n=function(){function t(t,e){this.ee=t,this.draw=e,this.animations=[]}return t.prototype.add=function(t,e){var n=this;void 0===e&&(e={});var i=new r(t,e);return i.cameraMotion&&0===this.animations.filter((function(t){return t.cameraMotion})).length&&this.ee.emit("camera-move-start"),this.animations.push(i),i.finally((function(){n.animations.splice(n.animations.indexOf(i),1),i.cameraMotion&&0===n.animations.filter((function(t){return t.cameraMotion})).length&&n.ee.emit("camera-move-end")})),this.tick(),i},t.prototype.tick=function(){var t=this;this.animations.length>0&&void 0===this.rafId&&(this.rafId=requestAnimationFrame((function(){t.rafId=void 0;for(var e=performance.now(),n=0,r=0,i=t.animations.slice();r<i.length;r++){var o=i[r];o.cameraMotion&&++n,o.update(e)}t.draw(),t.tick(),n>0&&t.ee.emit("camera-move")})))},t.prototype.stopCameraMotion=function(){for(var t=0,e=this.animations.slice();t<e.length;t++){var n=e[t];n.cameraMotion&&n.stop()}},t.prototype.clear=function(){for(;this.animations.length>0;)this.animations[0].stop()},t}();e.AnimationManager=n;var r=function(){function t(t,e){var n=this;void 0===e&&(e={}),this.cb=t,this.options=e,this.start=performance.now(),this.last=this.start,this.onStop=[],this.onFinally=[],this.alreadyDone=!1,this.cameraMotion=!!e.cameraMotion,this.options.immediate&&this.update(performance.now()),this.promise=new Promise((function(t,e){n.resolve=t,n.reject=e}))}return t.prototype.update=function(t){var e=t-this.start,n=t-this.last;if(this.last=t,void 0===this.options.duration)this.cb({t:e,dt:n,r:NaN});else{var r=e/this.options.duration;this.cb({t:e,dt:n,r:Math.min(1,r)}),e>this.options.duration&&this.stop()}},t.prototype.stop=function(){if(this.alreadyDone)console.warn("animation stopped 2 or more times");else{for(var t=0,e=this.onStop;t<e.length;t++){(0,e[t])()}for(var n=0,r=this.onFinally;n<r.length;n++){(0,r[n])()}this.resolve(),this.alreadyDone=!0}},t.prototype.abort=function(){if(this.alreadyDone)console.warn("animation aborted 2 or more times");else{for(var t=0,e=this.onFinally;t<e.length;t++){(0,e[t])()}this.reject(),this.alreadyDone=!0}},t.prototype.finally=function(t){return this.onFinally.push(t),this},t.prototype.then=function(t){return this.onStop.push(t),this},t}();e.Animation=r},5728:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Canvas=void 0;var r=n(3898),i=n(9565),o=function(){function t(t,e){void 0===e&&(e=!1),this.globe=t,this.preserveBuffer=e;try{var n=r.canvasPool.pull({alpha:!1,antialias:!1,stencil:!0,premultipliedAlpha:!1,preserveDrawingBuffer:e}),i=n.canvas,o=n.gl;this.domElement=i,this.gl=o,i.style.backgroundColor="#000",i.style.width=i.style.height="100%",i.style.display="block"}catch(t){var a="Fails on initializing WebGL. "+t;throw alert(a),new Error(a)}}return t.prototype.release=function(){r.canvasPool.push(this.domElement)},t.prototype.resize=function(t){var e=this.domElement,n=t?devicePixelRatio:1,r=n*e.clientWidth,i=n*e.clientHeight;e.width=r,e.height=i,this.gl.viewport(0,0,r,i)},t.prototype.setSize=function(t,e){var n=this.domElement;n.width=t,n.height=e,this.gl.viewport(0,0,t,e)},Object.defineProperty(t.prototype,"aspectRatio",{get:function(){var t=this.domElement,e=t.width/t.height;return isNaN(e)?1:e},enumerable:!1,configurable:!0}),t.prototype.coordFromClientCoord=function(t){return i.EquatorialCoord.fromXyz(this.xyzFromClientCoord(t))},t.prototype.xyzFromClientCoord=function(t){return this.xyzFromNdc(this.ndcFromClientCoord(t))},t.prototype.xyzFromOffset=function(t,e){return this.xyzFromNdc(this.ndcFromOffset(t,e))},t.prototype.coordFromOffset=function(t,e){return i.EquatorialCoord.fromXyz(this.xyzFromOffset(t,e))},t.prototype.xyzFromNdc=function(t){var e=t[0],n=t[1];return this.globe.viewFactory.view().camera.ndc2sphereXYZ(e,n,!0)},t.prototype.ndcFromClientCoord=function(t){var e=this.domElement.getBoundingClientRect(),n=[t.clientX-e.left,t.clientY-e.top],r=n[0],i=n[1];return this.ndcFromOffset(r,i)},t.prototype.ndcFromOffset=function(t,e){return[2*t/this.domElement.clientWidth-1,1-2*e/this.domElement.clientHeight]},Object.defineProperty(t.prototype,"pixelData",{get:function(){if(!this.preserveBuffer)throw new Error("this.offscreen must be true");var t=this.gl,e=t.drawingBufferWidth,n=t.drawingBufferHeight,r=new Uint8Array(e*n*4);return t.finish(),t.readPixels(0,0,t.drawingBufferWidth,t.drawingBufferHeight,t.RGBA,t.UNSIGNED_BYTE,r),{width:e,height:n,buffer:r.buffer}},enumerable:!1,configurable:!0}),t}();e.Canvas=o},2157:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Globe=void 0;var s=n(3179),u=n(8622),c=o(n(496)),h=n(5728),l=n(732),f=n(7598),p=a(n(4795)),d=n(8851),v=n(1534),m=function(){function t(t,e,n){var r=this;void 0===e&&(e=!0),void 0===n&&(n=!1),this.ee=new p.default,this.viewFactory=new l.ViewFactory(this),this.layers=[],this.rafId=void 0,this.animationManager=new c.AnimationManager(this.ee,(function(){return r.draw()}));var i=this.canvas=new h.Canvas(this,n);this.canvas=i,t&&this.mount(t),this.gl=i.gl,this.viewFactory.aspectRatio=this.canvas.aspectRatio,d.PointerEventLayer.initGlobe(this),e&&this.initDefaultLayers(),this.resize(),this.requestRefresh()}return t.prototype.mount=function(t){this.el=t,t.appendChild(this.canvas.domElement)},t.prototype.unmount=function(){console.assert(void 0!==this.el),this.el.removeChild(this.canvas.domElement),this.el=void 0},t.prototype.release=function(){for(this.animationManager.clear();this.layers.length>0;)this.removeLayer(this.layers[0]);this.el&&this.unmount(),this.canvas.release()},t.prototype.resize=function(){this.canvas.resize(this.viewFactory.retina),this.viewFactory.aspectRatio=this.canvas.aspectRatio,this.requestRefresh()},t.prototype.setSize=function(t,e){this.canvas.setSize(t,e),this.viewFactory.aspectRatio=this.canvas.aspectRatio,this.requestRefresh()},t.prototype.addLayer=function(t){t.changeGlobe(this),this.layers.push(t),this.sortLayers(),this.requestRefresh(),this.ee.emit("layer-change")},t.prototype.removeLayer=function(t){var e=this.layers.indexOf(t);e>=0&&(this.layers.splice(e,1),t.changeGlobe(void 0)),this.requestRefresh(),this.ee.emit("layer-change")},t.prototype.requestRefresh=function(){var t=this;void 0===this.rafId&&(this.rafId=requestAnimationFrame((function(){t.rafId=void 0,t.draw()})))},t.prototype.animation=function(t,e){return this.animationManager.add(t,e)},t.prototype.stopCameraMotion=function(){this.animationManager.stopCameraMotion()},t.prototype.setLayerSortFunc=function(t){this.layerSortFunc=t,this.sortLayers()},t.prototype.eachLayer=function(t){for(var e=0,n=this.layers;e<n.length;e++){t(n[e])}},t.prototype.draw=function(){this.ee.emit("draw");var t=this.viewFactory.view(),e=this.gl;e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT);for(var n=0,r=this.layers;n<r.length;n++){r[n].render(t)}},t.prototype.initDefaultLayers=function(){this.addLayer(new s.PanLayer),this.addLayer(new f.RollLayer),this.addLayer(new u.ZoomLayer),this.addLayer(new v.TouchLayer)},t.prototype.sortLayers=function(){this.layerSortFunc&&this.layers.sort(this.layerSortFunc)},t}();e.Globe=m},732:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.ViewFactory=e.MAX_FOVY=e.MIN_FOVY=void 0;var s=n(9565),u=a(n(16)),c=n(887),h=n(3774),l=n(5678),f=n(62),p=n(3310);e.MIN_FOVY=(0,s.asec2rad)(5),e.MAX_FOVY=2;var d=function(){function t(t,e){void 0===e&&(e=!0),this.globe=t,this.retina=e,this.aspectRatio=-1,this.mode=p.CameraMode.STEROGRAPHIC,this.theta=0,this.phi=0,this.fovy=(0,s.deg2rad)(45),this.roll=0,this.lodBias=0,this.za=0,this.zd=Math.PI/2,this.zp=0,this.setLodHooks()}return t.prototype.coord2thetaphi=function(t){var e=c.vec3.transformMat3(c.vec3.create(),t.xyz,(0,p.zenith3)(this.za,this.zd,this.zp));return(0,h.xyz2thetaphi)(e[0],e[1],e[2])},t.prototype.xyz2thetaphi=function(t){return this.coord2thetaphi(s.EquatorialCoord.fromXyz(t))},t.prototype.thetaphi2xyz=function(t,e){return c.vec3.transformMat3([0,0,0],(0,h.thetaphi2xyz)(t,e),(0,p.izenith3)(this.za,this.zd,this.zp))},t.prototype.thetaphi2coord=function(t,e){return s.EquatorialCoord.fromXyz(this.thetaphi2xyz(t,e))},t.prototype.center=function(){return this.thetaphi2coord(this.theta,this.phi)},t.prototype.jumpTo=function(t,e){var n,i=this;void 0===e&&(e={});var o=e.duration||400,a=e.easingFunction||u.fastStart4;this.globe.stopCameraMotion();var l={aspectRatio:this.aspectRatio,theta:this.theta,phi:this.phi,fovy:this.fovy,roll:this.roll,mode:this.mode,za:this.za,zd:this.zd,zp:this.zp},f=r(r({},l),t);if(e.coord){var d=c.vec3.transformMat3(c.vec3.create(),e.coord.xyz,(0,p.zenith3)(f.za,f.zd,f.zp));n=(0,h.xyz2thetaphi)(d[0],d[1],d[2]),f.theta=n[0],f.phi=n[1]}l.mode!==f.mode&&this.changeMode(f.mode,o),l.phi=(0,s.wrapTo2Pi)(l.phi),Math.abs(l.phi-f.phi)>Math.PI&&(l.phi>f.phi?f.phi+=2*Math.PI:l.phi+=2*Math.PI);var v=c.vec3.distance((0,h.thetaphi2xyz)(l.theta,l.phi),(0,h.thetaphi2xyz)(f.theta,f.phi));return this.jumpAnimation=this.globe.animation((function(t){var n=t.r,r=a(n);i.phi=r*f.phi+(1-r)*l.phi,i.theta=r*f.theta+(1-r)*l.theta;var o=1-Math.pow(2*(r-.5),2);i.fovy=e.keepFovy?(1-r)*l.fovy+r*f.fovy:o*Math.max(v-2*l.fovy,0)+(1-r)*l.fovy+r*f.fovy,i.roll=(1-r)*l.roll+r*f.roll,i.za=(1-r)*l.za+r*f.za,i.zd=(1-r)*l.zd+r*f.zd,i.zp=(1-r)*l.zp+r*f.zp}),{duration:o,cameraMotion:!0}).then((function(){return i.jumpAnimation=void 0}))},t.prototype.view=function(){return new l.View(new f.Camera(this.modeTransitionPv||this.pv()),this.lodBias,this.retina,this.globe.gl.drawingBufferHeight)},t.prototype.pv=function(t){return void 0===t&&(t=this.mode),(this.customPvMatrix||p.cameraMatrix)({aspectRatio:this.aspectRatio,theta:this.theta,phi:this.phi,fovy:this.fovy,roll:this.roll,mode:t,za:this.za,zd:this.zd,zp:this.zp})},t.prototype.changeMode=function(t,e){var n=this;void 0===e&&(e=200);var r=this.mode;this.modeAnimation&&this.modeAnimation.stop(),this.mode=t,this.modeAnimation=this.globe.animation((function(t){var e=t.r;e=u.fastStart4(e),n.modeTransitionPv=(0,p.composite)([1-e,e],[n.pv(r),n.pv()])}),{duration:e,immediate:!0,cameraMotion:!0}).then((function(){n.modeAnimation=void 0,n.modeTransitionPv=void 0}))},t.prototype.cage=function(){var t=this;void 0===this.cageAnimation&&(this.fovy<e.MIN_FOVY||e.MAX_FOVY<this.fovy)&&(this.cageAnimation=this.globe.animation((function(n){var r=n.dt;if(e.MIN_FOVY<=t.fovy&&t.fovy<=e.MAX_FOVY)t.cageAnimation.stop();else{var i=t.fovy>e.MAX_FOVY?e.MAX_FOVY:e.MIN_FOVY,o=Math.log(t.fovy/i);o+=.001*(o<0?-1:1),t.fovy*=Math.exp(-.005*r*o)}}),{cameraMotion:!0}).then((function(){return t.cageAnimation=void 0})))},t.prototype.setLodHooks=function(){var t=this;this.globe.ee.on("camera-move-start",(function(){t.lodAnimcation&&t.lodAnimcation.stop(),t.lodBias=1})),this.globe.ee.on("camera-move-end",(function(){t.lodAnimcation=t.globe.animation((function(e){var n=e.r;return t.lodBias=1-n}),{duration:200}).then((function(){t.lodAnimcation=void 0}))}))},t.prototype.setRetina=function(t){this.retina=t,this.globe.resize(),this.globe.requestRefresh()},t}();e.ViewFactory=d},3607:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.zeroTexture=e.utils=e.text2imageData=e.PointEvent=e.PointEventLayer=e.RollLayer=e.ZoomLayer=e.TouchLayer=e.PanLayer=e.EsoMilkyWayLayer=e.GridLayer=e.HipparcosCatalogLayer=e.ConstellationLayer=e.BillboardRenderer=e.path=e.tile=e.hips=e.Animation=e.Angle=e.EquatorialCoord=e.cameraMatrix=e.normalizeZenith=e.CameraMode=e.View=e.Layer=e.Globe=void 0;var a=n(2157);Object.defineProperty(e,"Globe",{enumerable:!0,get:function(){return a.Globe}});var s=n(7288);Object.defineProperty(e,"Layer",{enumerable:!0,get:function(){return s.Layer}});var u=n(5678);Object.defineProperty(e,"View",{enumerable:!0,get:function(){return u.View}});var c=n(3310);Object.defineProperty(e,"CameraMode",{enumerable:!0,get:function(){return c.CameraMode}}),Object.defineProperty(e,"normalizeZenith",{enumerable:!0,get:function(){return c.normalizeZenith}}),Object.defineProperty(e,"cameraMatrix",{enumerable:!0,get:function(){return c.cameraMatrix}});var h=n(9565);Object.defineProperty(e,"EquatorialCoord",{enumerable:!0,get:function(){return h.EquatorialCoord}}),Object.defineProperty(e,"Angle",{enumerable:!0,get:function(){return h.Angle}});var l=n(496);Object.defineProperty(e,"Animation",{enumerable:!0,get:function(){return l.Animation}});var f=o(n(1025));e.hips=f;var p=o(n(6562));e.tile=p;var d=o(n(2997));e.path=d;var v=n(4415);Object.defineProperty(e,"BillboardRenderer",{enumerable:!0,get:function(){return v.BillboardRenderer}});var m=n(9950);Object.defineProperty(e,"ConstellationLayer",{enumerable:!0,get:function(){return m.ConstellationLayer}});var y=n(9314);Object.defineProperty(e,"HipparcosCatalogLayer",{enumerable:!0,get:function(){return y.HipparcosCatalogLayer}});var g=n(9823);Object.defineProperty(e,"GridLayer",{enumerable:!0,get:function(){return g.GridLayer}});var b=n(1615);Object.defineProperty(e,"EsoMilkyWayLayer",{enumerable:!0,get:function(){return b.EsoMilkyWayLayer}});var M=n(3179);Object.defineProperty(e,"PanLayer",{enumerable:!0,get:function(){return M.PanLayer}});var _=n(1534);Object.defineProperty(e,"TouchLayer",{enumerable:!0,get:function(){return _.TouchLayer}});var x=n(8622);Object.defineProperty(e,"ZoomLayer",{enumerable:!0,get:function(){return x.ZoomLayer}});var w=n(7598);Object.defineProperty(e,"RollLayer",{enumerable:!0,get:function(){return w.RollLayer}});var T=n(8851);Object.defineProperty(e,"PointEventLayer",{enumerable:!0,get:function(){return T.PointerEventLayer}}),Object.defineProperty(e,"PointEvent",{enumerable:!0,get:function(){return T.GlobePointerEvent}});var E=o(n(5928));e.utils=E;var P=n(4363);Object.defineProperty(e,"text2imageData",{enumerable:!0,get:function(){return P.text2imageData}});var A=n(5507);Object.defineProperty(e,"zeroTexture",{enumerable:!0,get:function(){return A.zeroTexture}})},9950:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){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=a.trys,(i=i.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=e.call(t,a)}catch(t){o=[6,t],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])}}},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ConstellationLayer=void 0;var u,c=n(7288),h=n(2997),l=n(4415),f=n(9565),p=n(4363),d=n(6349),v=s(n(9669));!function(t){t[t.ENGLISH=0]="ENGLISH",t[t.HIRAGANA=1]="HIRAGANA",t[t.KANJI=2]="KANJI"}(u||(u={}));var m=function(t){function e(e,n,r){void 0===e&&(e=!0),void 0===n&&(n=!1),void 0===r&&(r=u.ENGLISH);var i=t.call(this)||this;return i.showLines=e,i.showNames=n,i.lang=r,i.paths=[],i.linesReady=!1,i.namesReady=!1,i}return i(e,t),e.prototype.onAdd=function(){this.pathRenderer=new h.Renderer(this.globe.gl),this.billboardRenderer=new l.BillboardRenderer(this.globe.gl),this.pathRenderer.setPaths(this.paths)},e.prototype.onRemove=function(){this.pathRenderer.release(),this.billboardRenderer.release()},e.prototype.render=function(t){var e=c.Layer.overlayAlpha(t);this.showLines&&(this.linesReady||this.buildLines(),this.pathRenderer.alpha=e,this.pathRenderer.render(t)),this.showNames&&(this.namesReady||this.buildNameBillboards(),this.billboardRenderer.alpha=e,this.billboardRenderer.render(t))},e.prototype.buildLines=function(){return o(this,void 0,void 0,(function(){var t,e,r,i,o,s;return a(this,(function(a){switch(a.label){case 0:return this.linesReady=!0,[4,v.default.get(n(6752))];case 1:for(t=a.sent().data,e=[],r=function(n){for(var r=t[n],i=function(){for(var t={},e=0,n=r.stars;e<n.length;e++){var i=n[e];t[i.name]=i}return t}(),o=r.ecliptical?[1,.75,0,.25]:[1,1,1,.25],a=0,s=r.lines;a<s.length;a++)for(var u=s[a].split("-").map((function(t){return i[t]})),c=0;c<u.length-1;++c){var l=new h.Path([new h.Point(y(u[c]),o,.015),new h.Point(y(u[c+1]),o,.015)],!1);e.push(l)}},i=0,o=Object.keys(t);i<o.length;i++)s=o[i],r(s);return this.pathRenderer.setPaths(this.paths=e),this.globe&&this.globe.requestRefresh(),[2]}}))}))},e.prototype.buildNameBillboards=function(){return o(this,void 0,void 0,(function(){var t,e,r,i,o,s,c,h,l;return a(this,(function(a){switch(a.label){case 0:return this.namesReady=!0,[4,v.default.get(n(6752))];case 1:for(t=a.sent().data,e=[],r=[],i=0,o=Object.keys(t);i<o.length;i++)s=o[i],c=t[s],r.push({imageID:e.length,position:g(c.stars)}),h=(l={},l[u.ENGLISH]=s,l[u.HIRAGANA]=d.hiragana[s],l[u.KANJI]=d.kanji[s],l)[this.lang],e.push({imageData:(0,p.text2imageData)(h,"12pt fantasy","rgba(239, 225, 196, 1)"),origin:[0,0]});return this.billboardRenderer.buildArray(e,r),this.globe&&this.globe.requestRefresh(),[2]}}))}))},e.LANG=u,e}(c.Layer);function y(t){return f.EquatorialCoord.fromDeg(t.ra,t.dec).xyz}function g(t){for(var e=[0,0,0],n=0,r=t;n<r.length;n++){y(r[n]).forEach((function(t,n){return e[n]+=t}))}e=e.map((function(e){return e/t.length}));var i=Math.sqrt(e.reduce((function(t,e){return t+e*e}),0));return e.map((function(t){return t/i}))}e.ConstellationLayer=m},6349:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hiragana=e.kanji=void 0,e.kanji={Andromeda:"アンドロメダ",Antlia:"ポンプ",Apus:"風鳥",Aquarius:"水瓶",Aquila:"鷲",Ara:"祭壇",Aries:"牡羊",Auriga:"御者","Boötes":"牛飼い",Caelum:"彫刻具",Camelopardalis:"キリン",Cancer:"蟹",CanesVenatici:"猟犬",CanisMajor:"大犬",CanisMinor:"小犬",Capricornus:"山羊",Carina:"竜骨",Cassiopeia:"カシオペヤ",Centaurus:"ケンタウルス",Cepheus:"ケフェウス",Cetus:"鯨",Chamaeleon:"カメレオン",Circinus:"コンパス",Columba:"鳩",ComaBerenices:"髪",CoronaAustralis:"南の冠",CoronaBorealis:"冠",Corvus:"烏",Crater:"コップ",Crux:"南十字",Cygnus:"白鳥",Delphinus:"海豚",Dorado:"旗魚",Draco:"竜",Equuleus:"小馬",Eridanus:"エリダヌス",Fornax:"炉",Gemini:"双子",Grus:"鶴",Hercules:"ヘルクレス",Horologium:"時計",Hydra:"海蛇",Hydrus:"水蛇",Indus:"インディアン",Lacerta:"蜥蜴",Leo:"獅子",LeoMinor:"小獅子",Lepus:"兎",Libra:"天秤",Lupus:"狼",Lynx:"山猫",Lyra:"琴",Mensa:"テーブル山",Microscopium:"顕微鏡",Monoceros:"一角獣",Musca:"蝿",Norma:"定規",Octans:"八分儀",Ophiuchus:"蛇遣",Orion:"オリオン",Pavo:"孔雀",Pegasus:"ペガスス",Perseus:"ペルセウス",Phoenix:"鳳凰",Pictor:"画架",Pisces:"魚",PiscisAustrinus:"南の魚",Puppis:"艫",Pyxis:"羅針盤",Reticulum:"レチクル",Sagitta:"矢",Sagittarius:"射手",Scorpius:"蠍",Sculptor:"彫刻室",Scutum:"楯",Serpens:"蛇",Sextans:"六分儀",Taurus:"牡牛",Telescopium:"望遠鏡",Triangulum:"三角",TriangulumAustrale:"南の三角",Tucana:"巨嘴鳥",UrsaMajor:"大熊",UrsaMinor:"小熊",Vela:"帆",Virgo:"乙女",Volans:"飛魚",Vulpecula:"小狐"},e.hiragana={Andromeda:"アンドロメダ",Antlia:"ポンプ",Apus:"ふうちょう",Aquarius:"みずがめ",Aquila:"わし",Ara:"さいだん",Aries:"おひつじ",Auriga:"ぎょしゃ","Boötes":"うしかい",Caelum:"ちょうこくぐ",Camelopardalis:"キリン",Cancer:"かに",CanesVenatici:"りょうけん",CanisMajor:"おおいぬ",CanisMinor:"こいぬ",Capricornus:"やぎ",Carina:"りゅうこつ",Cassiopeia:"カシオペヤ",Centaurus:"ケンタウルス",Cepheus:"ケフェウス",Cetus:"くじら",Chamaeleon:"カメレオン",Circinus:"コンパス",Columba:"はと",ComaBerenices:"かみのけ",CoronaAustralis:"みなみのかんむり",CoronaBorealis:"かんむり",Corvus:"からす",Crater:"コップ",Crux:"みなみじゅうじ",Cygnus:"はくちょう",Delphinus:"いるか",Dorado:"かじき",Draco:"りゅう",Equuleus:"こうま",Eridanus:"エリダヌス",Fornax:"ろ",Gemini:"ふたご",Grus:"つる",Hercules:"ヘルクレス",Horologium:"とけい",Hydra:"うみへび",Hydrus:"みずへび",Indus:"インディアン",Lacerta:"とかげ",Leo:"しし",LeoMinor:"こじし",Lepus:"うさぎ",Libra:"てんびん",Lupus:"おおかみ",Lynx:"やまねこ",Lyra:"こと",Mensa:"テーブルさん",Microscopium:"けんびきょう",Monoceros:"いっかくじゅう",Musca:"はえ",Norma:"じょうぎ",Octans:"はちぶんぎ",Ophiuchus:"へびつかい",Orion:"オリオン",Pavo:"くじゃく",Pegasus:"ペガスス",Perseus:"ペルセウス",Phoenix:"ほうおう",Pictor:"がか",Pisces:"うお",PiscisAustrinus:"みなみのうお",Puppis:"とも",Pyxis:"らしんばん",Reticulum:"レチクル",Sagitta:"や",Sagittarius:"いて",Scorpius:"さそり",Sculptor:"ちょうこくしつ",Scutum:"たて",Serpens:"へび",Sextans:"ろくぶんぎ",Taurus:"おうし",Telescopium:"ぼうえんきょう",Triangulum:"さんかく",TriangulumAustrale:"みなみのさんかく",Tucana:"きょしちょう",UrsaMajor:"おおぐま",UrsaMinor:"こぐま",Vela:"ほ",Virgo:"おとめ",Volans:"とびうお",Vulpecula:"こぎつね"}},1615:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){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=a.trys,(i=i.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=e.call(t,a)}catch(t){o=[6,t],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])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.EsoMilkyWayLayer=void 0;var s=n(1174),u=n(887),c=n(5507),h=n(3607),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.fadeAlpha=0,e}return i(e,t),e.prototype.onAdd=function(){var t=this;this.renderer=new f(this.globe.gl,(function(){t.globe&&t.globe.animation((function(e){var n=e.r;t.fadeAlpha=n}),{duration:200})}))},e.prototype.onRemove=function(){this.renderer.release()},e.prototype.render=function(t){var e=h.Layer.overlayAlpha(t)*this.fadeAlpha;this.renderer.alpha=e,this.renderer.render(t)},e}(h.Layer);e.EsoMilkyWayLayer=l;var f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.m=u.mat4.fromValues(.0017373464070261,-.4792437255382538,-.8776800036430359,0,.8911036849021912,.3990314602851868,-.2161209583282471,0,.4537965655326843,-.7817283272743225,.4277492463588715,0,0,0,0,1),r.loadImages().then(n),r}return i(e,t),e.prototype.loadImages=function(){return o(this,void 0,void 0,(function(){var t,e;return a(this,(function(n){switch(n.label){case 0:return window.navigator.userAgent.match(/firefox/i)?(t=d,console.info("using small version of ESO Milky Way images")):t=p,e=this.setCubeImage,[4,Promise.all(t.map((function(t){return(0,c.loadImage)(t)})))];case 1:return e.apply(this,[n.sent()]),[2]}}))}))},e.prototype.mMatrix=function(){return this.m},e.attributions=[{which:"The Milky Way Panorama",label:"ESO/S. Brunier",link:"https://www.eso.org/public/images/eso0932a/"}],e}(s.CubeMappRenderer),p=["px","py","pz","nx","ny","nz"].map((function(t){return"//hscmap.mtk.nao.ac.jp/data/eso_milky_way_layer/images-1024/"+t+".png"})),d=["px","py","pz","nx","ny","nz"].map((function(t){return"//hscmap.mtk.nao.ac.jp/data/eso_milky_way_layer/images-512/"+t+".png"}))},9823:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.GridLayer=void 0;var o=n(7288),a=n(2997),s=n(3774),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.onAdd=function(){this.pathRenderer=new a.Renderer(this.globe.gl),this.pathRenderer.setPaths(this.generatePaths())},e.prototype.onRemove=function(){this.pathRenderer.release()},e.prototype.render=function(t){this.pathRenderer.alpha=o.Layer.overlayAlpha(t),this.pathRenderer.render(t)},e.prototype.generatePaths=function(){var t,e,n=[],r=[.25,.5,1,.5];t=18,e=360;for(var i=function(i){var o=Math.PI*(i-9)/t,u=9===i?[1,0,0,.75]:r;n.push(new a.Path((0,s.range)(0,e).map((function(t){var n=2*Math.PI*t/e;return new a.Point([Math.cos(o)*Math.cos(n),Math.cos(o)*Math.sin(n),Math.sin(o)],u,.008)})),!0,a.JOINT.MITER))},o=1;o<t;++o)i(o);t=180,e=24;for(var u=function(i){var o=2*Math.PI*i/e,u={0:[1,0,0,.5],6:[.5,1,0,.5],12:[0,1,1,.5],18:[.5,0,1,.5]}[i]||r;n.push(new a.Path((0,s.range)(0,t+1).map((function(e){var n=Math.PI*(e-90)/t;return new a.Point([Math.cos(n)*Math.cos(o),Math.cos(n)*Math.sin(o),Math.sin(n)],u,.008)})),!1,a.JOINT.MITER))},c=0;c<e;++c)u(c);return n},e}(o.Layer);e.GridLayer=u},9314:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.HipparcosCatalogLayer=void 0;var o=n(7288),a=n(931),s=n(6637),u=function(t){function e(){var e=t.call(this)||this;return e.loader=new s,e.loader.addEventListener("message",(function(t){e.array=new Float32Array(t.data.buffer),e.refresh()})),e}return i(e,t),e.prototype.onAdd=function(){this.pointRenderer=new a.PointRenderer(this.globe.gl),this.refresh()},e.prototype.onRemove=function(){this.pointRenderer.release()},e.prototype.render=function(t){this.pointRenderer.alpha=o.Layer.overlayAlpha(t),this.pointRenderer.render(t)},e.prototype.refresh=function(){this.globe&&this.pointRenderer&&this.array&&(this.pointRenderer._setArray(this.array),this.globe.requestRefresh())},e}(o.Layer);e.HipparcosCatalogLayer=u},7288:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Layer=void 0;var r=n(3774),i=function(){function t(){}return t.prototype.changeGlobe=function(t){this.globe&&this.onRemove(),this.globe=t,t&&(this.onAdd(),t.requestRefresh())},t.prototype.onAdd=function(){},t.prototype.onRemove=function(){},t.prototype.render=function(t){},t.prototype.active=function(){return!!this.globe},t.baseAlpha=function(t){return 1-this.overlayAlpha(t)},t.overlayAlpha=function(t){var e=this.overlayAlphaStart,n=this.overlayAlphaGradient;return(0,r.clamp)((t.camera.arc-e)*n,0,1)},t.overlayAlphaStart=.2,t.overlayAlphaGradient=4,t}();e.Layer=i},3179:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.PanLayer=void 0;var o=n(5131),a=n(887),s=n(3774),u=n(7312),c=n(8851),h=1/3600/180*Math.PI,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.m=a.mat2.create(),e.dblclick=function(t){var n=e.globe.canvas.coordFromClientCoord(t),r=e.globe.viewFactory.coord2thetaphi(n),i=r[0],o=r[1];e.globe.viewFactory.jumpTo({theta:i,phi:o})},e}return i(e,t),e.prototype.onAdd=function(){t.prototype.onAdd.call(this),this.globe.canvas.domElement.addEventListener("dblclick",this.dblclick),this.setupDragEvent()},e.prototype.onRemove=function(){this.globe.canvas.domElement.removeEventListener("dblclick",this.dblclick),this.im.teardown()},e.prototype.hit=function(t){var e=!1;return t.originalEvent({mouse:function(t){e=u.mouse.button(t)===u.mouse.Button.LEFT},touch:function(){e=!0}}),e},e.prototype.dragStart=function(t){this.hit(t)&&this.im.start(t)},e.prototype.dragEnd=function(){this.im.unbind()},e.prototype.setupDragEvent=function(){var t,e=this;this.im=new o.InertialMouse({down:function(n){var r=e.globe.canvas,i=e.offset(n.r),o=i.x,s=i.y,u=e.globe.viewFactory,c=u.coord2thetaphi(r.coordFromOffset(o,s)),h=u.coord2thetaphi(r.coordFromOffset(o+1,s)),l=u.coord2thetaphi(r.coordFromOffset(o,s+1));Math.abs(c[1]-h[1])>Math.PI&&(h[1]+=2*(h[1]>c[1]?-1:1)*Math.PI),Math.abs(c[1]-l[1])>Math.PI&&(l[1]+=2*(l[1]>c[1]?-1:1)*Math.PI),a.mat2.set(e.m,h[1]-c[1],h[0]-c[0],l[1]-c[1],l[0]-c[0]),t=e.globe.viewFactory.fovy},move:function(n){var r=n.d,i=r.x,o=r.y,u=a.vec2.transformMat2(a.vec2.create(),[i,o],e.m),c=e.globe.viewFactory,l=Math.min(e.globe.viewFactory.fovy/t,1);c.phi-=l*u[0],c.theta-=l*u[1],c.theta=(0,s.clamp)(c.theta,-Math.PI/2+h,Math.PI/2-h)},setNextTick:function(t){void 0===e.animation&&(e.animation=e.globe.animation((function(){return t()}),{cameraMotion:!0}).then((function(){e.animation=void 0})))},moveend:function(){e.animation.stop()}}),this.im.physics.k=.04,this.im.physics.friction=.05},e}(c.PointerEventLayer);e.PanLayer=l},8851:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.GlobePointerEvent=e.PointerEventLayer=void 0;var a=n(887),s=n(5131),u=n(7288),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.lastHit=!1,e}return i(e,t),e.prototype.hover=function(t){},e.prototype.enter=function(t){},e.prototype.leave=function(t){},e.prototype.dragStart=function(t){},e.prototype.drag=function(t){},e.prototype.dragEnd=function(t){},e.prototype.offset=function(t){var e=t.x,n=t.y,r=this.globe.canvas.domElement.getBoundingClientRect();return{x:e-r.left,y:n-r.top}},e.initGlobe=function(t){t.addLayer(new l)},e.prototype._hover=function(t){var e=this.hit(t);if(this.hover(t),this.lastHit!==e){if(this.lastHit=e,e)return this.enter(t),!0;this.leave(t)}},e}(u.Layer);e.PointerEventLayer=c;var h=function(t){function e(e,n,r){var i=t.call(this,e.e)||this;return i.globe=n,i.view=r,i.coord=n.canvas.coordFromClientCoord(e),i}return i(e,t),e.prototype.coord2offset=function(t){var e=a.vec4.transformMat4(a.vec4.create(),o(o([],t.xyz,!0),[1],!1),this.view.camera.pv),n=e[0]/e[3],r=e[1]/e[3],i=this.globe.canvas.domElement.getBoundingClientRect();return[i.width*(n+1)/2,i.height*(1-(r+1)/2)]},e}(s.SinglePointerEvent);e.GlobePointerEvent=h;var l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pointerPressed=!1,e.pointerEventLayers=[],e.refreshPointEventLayers=function(){var t,n;e.pointerEventLayers=(t=e.globe,n=[],t.eachLayer((function(t){return n.push(t)})),n).filter((function(t){return t instanceof c})).reverse()},e}return i(e,t),e.prototype.render=function(t){this.view=t},e.prototype.onAdd=function(){var t,e=this;this.unbindDown=s.SinglePointerEvent.bindDown(this.canvas,(function(n){var r,i=new h(n,e.globe,e.view);e.pointerPressed=!0,e.globe.ee.emit("pointer-down",i);for(var o=0,a=e.pointerEventLayers;o<a.length;o++){var u=a[o];if(u.hit(i)){r=u;break}}if(r){r.dragStart(new h(n,e.globe,e.view));var c=s.SinglePointerEvent.bindMove(document,(function(t){r.drag(new h(t,e.globe,e.view))}));t=function(n){e.pointerPressed=!1,r.dragEnd(new h(n,e.globe,e.view)),l(),c(),t=void 0};var l=s.SinglePointerEvent.bindUp(document,(function(n){var r=new h(n,e.globe,e.view);e.globe.ee.emit("pointer-up",r),t(n)}))}}),(function(e){t&&t(e)})),this.unbindHover=s.SinglePointerEvent.bindMove(this.canvas,(function(t){if(!e.pointerPressed)for(var n=new h(t,e.globe,e.view),r=0,i=e.pointerEventLayers;r<i.length;r++){if(i[r]._hover(n))break}})),this.globe.ee.addListener("layer-change",this.refreshPointEventLayers)},e.prototype.onRemove=function(){this.globe.ee.removeListener("layer-change",this.refreshPointEventLayers),this.unbindHover(),this.unbindDown()},Object.defineProperty(e.prototype,"canvas",{get:function(){return this.globe.canvas.domElement},enumerable:!1,configurable:!0}),e}(u.Layer)},7598:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.RollLayer=void 0;var o=n(5131),a=n(7312),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.onAdd=function(){this.setupDragEvent()},e.prototype.onRemove=function(){this.im.teardown()},e.prototype.hit=function(t){var e=!1;return t.originalEvent({mouse:function(t){e=a.mouse.button(t)===a.mouse.Button.MIDDLE}}),e},e.prototype.dragStart=function(t){this.im.start(t)},e.prototype.setupDragEvent=function(){var t=this;this.im=new o.InertialMouse({move:function(e){var n=t.offset(e.r),r=n.x,i=n.y,o=e.d,a=o.x,s=o.y,u=t.globe.canvas;r-=u.domElement.clientWidth/2,i-=u.domElement.clientHeight/2,0!==r&&0!==i&&(t.globe.viewFactory.roll+=(i*a-r*s)/(r*r+i*i))},moveend:function(){t.animation.stop()},setNextTick:function(e){void 0===t.animation&&(t.animation=t.globe.animation((function(){return e()}),{cameraMotion:!0}).then((function(){t.animation=void 0})))}})},e}(n(8851).PointerEventLayer);e.RollLayer=s},1534:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.TouchLayer=void 0;var a=n(7288),s=o(n(840)),u=n(3774),c=n(9565),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.onAdd=function(){this.mc=new s.default(this.canvas),this.handlePinch(),this.handleDoubleTap(),this.handleTap2()},e.prototype.onRemove=function(){this.mc.destroy()},Object.defineProperty(e.prototype,"canvas",{get:function(){return this.globe.canvas.domElement},enumerable:!1,configurable:!0}),e.prototype.handleDoubleTap=function(){var t=this;this.mc.get("doubletap").set({posThreshold:30}),this.mc.on("doubletap",(function(e){if("touch"===e.pointerType){var n=e.center,r=n.x,i=n.y,o=l(t.globe,.5,{clientX:r,clientY:i}),a=o.theta,s=o.phi,u=o.fovy;t.globe.viewFactory.jumpTo({theta:a,phi:s,fovy:u}),t.globe.requestRefresh()}}))},e.prototype.handleTap2=function(){var t=this;this.mc.add(new s.default.Tap({event:"tap2",pointers:2})),this.mc.on("tap2",(function(e){var n=t.globe.viewFactory;n.jumpTo({fovy:2*n.fovy})}))},e.prototype.handlePinch=function(){var t,e=this;this.mc.get("pinch").set({enable:!0}),this.mc.on("pinchstart",(function(e){t=1})),this.mc.on("pinchmove",(function(n){var r=n.center,i=r.x,o=r.y,a=l(e.globe,t/n.scale,{clientX:i,clientY:o}),s=a.theta,u=a.phi,c=a.fovy,h=e.globe.viewFactory;t=n.scale,h.theta=s,h.phi=u,h.fovy=c,h.cage(),e.globe.requestRefresh()}))},e}(a.Layer);function l(t,e,n){var r=t.canvas,i=t.viewFactory,o=i.thetaphi2xyz(Math.PI/2,0),a=i.thetaphi2xyz(i.theta,i.phi),s=r.xyzFromClientCoord(n),h=a[0],l=a[1],f=a[2],p=(1-e)*(s[0]-h),d=(1-e)*(s[1]-l),v=(1-e)*(s[2]-f),m=(0,u.dot)(o,a),y=Math.sqrt(1-m*m);if(y<i.fovy){var g=(0,u.clamp)(y/i.fovy-.1,0,1);p=g*p+(1-g)*h,d=g*d+(1-g)*l,v=g*v+(1-g)*f}h+=p,l+=d,f+=v;var b=c.EquatorialCoord.fromXyz([h,l,f]),M=i.coord2thetaphi(b);return{theta:M[0],phi:M[1],fovy:i.fovy*e}}e.TouchLayer=h},8622:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.ZoomLayer=void 0;var o=n(6703),a=n(3607),s=n(3774),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.k=.075,e.pointerDown=function(){e.animation&&e.animation.stop()},e}return i(e,t),e.prototype.onAdd=function(){var t=this;this.globe.ee.on("pointer-down",this.pointerDown),this.iw=new o.InertialWheel(this.globe.canvas.domElement,{wheel:function(e){var n=t.globe.canvas,r=t.globe.viewFactory,i=Math.exp(t.k*e.v),o=r.thetaphi2xyz(Math.PI/2,0),u=r.thetaphi2xyz(r.theta,r.phi),c=n.xyzFromClientCoord(e.originalEvent),h=u[0],l=u[1],f=u[2],p=(1-i)*(c[0]-h),d=(1-i)*(c[1]-l),v=(1-i)*(c[2]-f),m=(0,s.dot)(o,u),y=Math.sqrt(1-m*m);if(y<r.fovy){var g=(0,s.clamp)(y/r.fovy-.1,0,1);p=g*p+(1-g)*h,d=g*d+(1-g)*l,v=g*v+(1-g)*f}h+=p,l+=d,f+=v;var b=a.EquatorialCoord.fromXyz([h,l,f]),M=r.coord2thetaphi(b),_=M[0],x=M[1];r.theta=_,r.phi=x,r.fovy*=i,r.cage()},wheelend:function(){t.animation.stop()},setNextTick:function(e){void 0===t.animation&&(t.animation=t.globe.animation((function(){return e()}),{cameraMotion:!0}).then((function(){t.iw.stop(),t.animation=void 0})))}}),this.iw.physics.t1=150,this.iw.physics.t2=150},e.prototype.onRemove=function(){this.iw.teardown(),this.globe.ee.off("pointer-down",this.pointerDown)},e}(n(7288).Layer);e.ZoomLayer=u},4423:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SinglePointerEvent=e.isTouchEvent=void 0;var r=n(4563);function i(t){return window.TouchEvent&&t instanceof TouchEvent}e.isTouchEvent=i;var o=function(){function t(t){this.e=t}return t.prototype.stopPropagation=function(){this.e.stopPropagation()},t.prototype.preventDefault=function(){this.e.preventDefault()},Object.defineProperty(t.prototype,"clientX",{get:function(){return i(this.e)?("touchend"===this.e.type?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientY",{get:function(){return i(this.e)?("touchend"===this.e.type?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientCoord",{get:function(){return new r.V2(this.clientX,this.clientY)},enumerable:!1,configurable:!0}),t.bindDown=function(e,n,r,i){void 0===i&&(i=!1);var o=function(e){n(new t(e))},a=function(e){1===e.touches.length&&n(new t(e)),e.touches.length>1&&r&&r(new t(e))};return e.addEventListener("mousedown",o,i),e.addEventListener("touchstart",a,i),function(){e.removeEventListener("mousedown",o,i),e.removeEventListener("touchstart",a,i)}},t.bindMove=function(e,n,r){void 0===r&&(r=!1);var i=function(e){n(new t(e))},o=function(e){1===e.touches.length&&n(new t(e))};return e.addEventListener("mousemove",i,r),e.addEventListener("touchmove",o,r),function(){e.removeEventListener("mousemove",i,r),e.removeEventListener("touchmove",o,r)}},t.bindUp=function(e,n,r){void 0===r&&(r=!1);var i=function(e){n(new t(e))},o=function(e){0===e.touches.length&&n(new t(e))};return e.addEventListener("mouseup",i,r),e.addEventListener("touchend",o,r),function(){e.removeEventListener("mouseup",i,r),e.removeEventListener("touchend",o,r)}},t.prototype.originalEvent=function(t){var e=t.mouse,n=t.touch;i(this.e)?n&&n(this.e):e&&e(this.e)},t}();e.SinglePointerEvent=o},5131:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InertialMouse=e.Physics=e.V2=e.SinglePointerEvent=void 0;var r=n(4423);Object.defineProperty(e,"SinglePointerEvent",{enumerable:!0,get:function(){return r.SinglePointerEvent}});var i=n(4563);Object.defineProperty(e,"V2",{enumerable:!0,get:function(){return i.V2}});var o=n(3132);Object.defineProperty(e,"Physics",{enumerable:!0,get:function(){return o.Physics}});var a=n(6336);Object.defineProperty(e,"InertialMouse",{enumerable:!0,get:function(){return a.InertialMouse}})},6336:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveEndEvent=e.MoveStartEvent=e.MoveEvent=e.UpEvent=e.DownEvent=e.InertialMouse=void 0;var r=n(4423),i=n(3132),o=function(){function t(t){var e,n=this;this.cb=t,this.physics=new i.Physics,this.dead=!1,this.events=[],this.pointmove=function(t){n.dead||(n.physics.hook(t.clientCoord),n.cb.setNextTick((function(){return n.tick()})))},this.pointend=function(t){n.dead||(n.physics.unhook(),n.unbind(),n.cb.up&&n.cb.up(new s(t.clientCoord,t)))},t.setNextTick=t.setNextTick||function(t){void 0===e&&(e=requestAnimationFrame((function(){e=void 0,t()})))}}return t.prototype.teardown=function(){this.dead=!0,this.unbind()},t.prototype.stop=function(){this.physics.stop()},t.prototype.unbind=function(){for(;this.events.length>0;)this.events.pop()()},t.prototype.start=function(t){var e=t.clientCoord;this.physics.put(e),this.events.push(r.SinglePointerEvent.bindMove(document,this.pointmove)),this.events.push(r.SinglePointerEvent.bindUp(document,this.pointend)),this.cb.down&&this.cb.down(new a(e,t))},t.prototype.tick=function(){var t=this;if(!this.dead){var e=this.physics.tick(performance.now()),n=e.r,r=e.dr,i=e.movestart,o=e.moveend;i&&this.cb.movestart&&this.cb.movestart(new c),this.cb.move&&this.cb.move(new u(n,r)),o&&this.cb.moveend&&this.cb.moveend(new h),o||this.cb.setNextTick((function(){return t.tick()}))}},t}();e.InertialMouse=o;var a=function(t,e){this.r=t,this.pointerEvent=e};e.DownEvent=a;var s=function(t,e){this.r=t,this.pointerEvent=e};e.UpEvent=s;var u=function(t,e){this.r=t,this.d=e};e.MoveEvent=u;var c=function(){};e.MoveStartEvent=c;var h=function(){};e.MoveEndEvent=h},3132:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Physics=void 0;var r=n(4563),i=function(){function t(){this.k=.02,this.friction=.2,this.slick=!0,this.minV=.5,this.bound=!1,this.moving=!1}return t.prototype.put=function(t){this.r=this.anchor=t,this.v=new r.V2(0,0)},t.prototype.hook=function(t){this.bound=!0,this.anchor=t},t.prototype.unhook=function(){this.bound=!1},t.prototype.stop=function(){this.anchor=this.r,this.v=new r.V2(0,0),this.moving=!1},t.prototype.tick=function(t){var e=this.k,n=this.moving,i=this.r.clone();n||(this.t=t);for(var o=e*(t-this.t);o>0;){var a=Math.min(.5,o),s=new r.V2(this.anchor.x-this.r.x,this.anchor.y-this.r.y),u=this.bound||!this.slick?new r.V2(s.x-2*this.v.x,s.y-2*this.v.y):new r.V2(-this.friction*this.v.x,-this.friction*this.v.y);this.v.x+=a*u.x,this.v.y+=a*u.y;var c=a*this.v.x,h=a*this.v.y;this.r.x+=c,this.r.y+=h,o-=.5}var l=new r.V2(this.r.x-i.x,this.r.y-i.y);return this.t=t,this.moving=this.willMove(),{r:this.r,dr:l,movestart:!n,moveend:!this.moving}},t.prototype.willMove=function(){var t=this.minV=1;if(this.bound||!this.slick)return Math.abs(this.anchor.x-this.r.x)>t||Math.abs(this.anchor.y-this.r.y)>t;var e=this.v,n=this.friction;return Math.abs(e.x/n)>=t||Math.abs(e.y/n)>=t},t}();e.Physics=i},4563:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.V2=void 0;var n=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t}();e.V2=n},6703:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Physics=e.InertialWheel=void 0;var r=n(5723);Object.defineProperty(e,"InertialWheel",{enumerable:!0,get:function(){return r.InertialWheel}});var i=n(5680);Object.defineProperty(e,"Physics",{enumerable:!0,get:function(){return i.Physics}})},5723:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InertialWheelEndEvent=e.InertialWheelStartEvent=e.InertialWheelEvent=e.InertialWheel=void 0;var r=n(5661),i=n(5680),o=function(){function t(t,e){var n,o=this;this.target=t,this.cb=e,this.physics=new i.Physics,this.magicTrackpadDetector=new r.MagicTrackpadDetector,this.wheel=function(t){if(t.preventDefault(),!o.magicTrackpadDetector.inertial(t)){o.lastNativeEvent=t;var e=t.deltaY>0?1:t.deltaY<0?-1:0;o.physics.kick(e,performance.now())}o.cb.setNextTick((function(){return o.tick()}))},this.normalize=.06,void 0===e.setNextTick&&(e.setNextTick=function(t){void 0===n&&(n=requestAnimationFrame((function(){n=void 0,t()})))}),t.addEventListener("wheel",this.wheel)}return t.prototype.teardown=function(){this.target.removeEventListener("wheel",this.wheel)},t.prototype.stop=function(){this.physics.stop()},t.prototype.tick=function(){var t=this,e=this.physics.tick(performance.now()),n=e.v,r=e.dt,i=e.wheelstart,o=e.wheelend;i&&this.cb.wheelstart&&this.cb.wheelstart(new s),this.cb.wheel&&this.cb.wheel(new a(this.normalize*r*n,this.lastNativeEvent)),o&&this.cb.wheelend&&this.cb.wheelend(new u),o||this.cb.setNextTick((function(){return t.tick()}))},t}();e.InertialWheel=o;var a=function(t,e){this.v=t,this.originalEvent=e};e.InertialWheelEvent=a;var s=function(){};e.InertialWheelStartEvent=s;var u=function(){};e.InertialWheelEndEvent=u},5680:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Physics=void 0;var n={accDuration:100,t1:100,t2:200},r=function(){function t(){this.v=0,this.moving=!1,this.accDuration=n.accDuration,this.t1=n.t1,this.t2=n.t2,this.maxDT=50}return t.prototype.stop=function(){this.a=0,this.v=0,this.moving=!1},t.prototype.kick=function(t,e){this.a=t,this.lastAcc=e},t.prototype.tick=function(t){var e=this.moving;e||(this.t=t),t-this.lastAcc>this.accDuration&&(this.a=0);for(var n,r,i,o=t-this.t,a=o;a>0;){var s=Math.min(a,this.maxDT);a-=this.maxDT,this.v+=s*(0===this.a?-1/this.t2*this.v:this.a/this.t1),this.v=(n=this.v,i=1,n<(r=-1)?r:n>i?i:n)}return this.t=t,this.moving=this.willMove(),{v:this.v,dt:Math.min(1e3,o),wheelstart:!e,wheelend:!this.moving}},t.prototype.willMove=function(){return this.t-this.lastAcc<=this.accDuration||Math.abs(this.v)>=.005},t.defaults=n,t}();e.Physics=r},2880:()=>{},4415:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BillboardRenderer=void 0;var r=n(3898),i=n(5574),o=n(5451),a=function(){function t(t,e,i){void 0===e&&(e=[]),void 0===i&&(i=[]),this.gl=t,this.scale=1,this.alpha=1,this.color=[1,1,1,1],this.program=r.Program.new(t,n(5297).Z,n(3638).Z),this.attribList=new r.AttribList(t,{members:[{name:"a_vCoord",nComponents:3},{name:"a_size",nComponents:2},{name:"a_tCoord",nComponents:2}]}),this.texture=new r.Texture(t),this.buildArray(e,i)}return t.prototype.release=function(){this.program.release(),this.attribList.release(),this.texture.release()},t.prototype.buildArray=function(t,e){var n=this,r=this.gl,a=r.getParameter(r.MAX_TEXTURE_SIZE);this.packedTexture=function(t,e){var n=t.map((function(t){return new i.Rect(t.imageData.width+2,t.imageData.height+2)}));try{(0,i.packRectsOptimally)(n,e)}catch(t){return console.warn(t),{imageData:new ImageData(1,1),bbox:[]}}var r=(0,i.powerOf2)(Math.max.apply(Math,n.map((function(t){return t.right})))),a=(0,i.powerOf2)(Math.max.apply(Math,n.map((function(t){return t.bottom}))));return(0,o.get2dContext)(r,a,(function(e){for(var i=[],o=0;o<t.length;++o){var s=t[o],u=n[o];e.putImageData(s.imageData,u.left+1,u.top+1),i.push({rect:u,origin:s.origin})}return{imageData:e.getImageData(0,0,r,a),bbox:i}}))}(t,a),this.texture.bind((function(){r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,n.packedTexture.imageData),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR_MIPMAP_LINEAR),r.generateMipmap(r.TEXTURE_2D)}));for(var s=[],u=this.packedTexture.imageData,c=u.width,h=u.height,l=0,f=e;l<f.length;l++){var p=f[l],d=p.position,v=d[0],m=d[1],y=d[2],g=this.packedTexture.bbox[p.imageID],b=g.rect,M=b.left,_=b.right,x=b.top,w=b.bottom,T=b.width,E=b.height,P=g.origin;s.push(v,m,y,(-1+P[0])*T,(-1+P[1])*E,M/c,w/h,v,m,y,(1+P[0])*T,(-1+P[1])*E,_/c,w/h,v,m,y,(1+P[0])*T,(1+P[1])*E,_/c,x/h,v,m,y,(-1+P[0])*T,(-1+P[1])*E,M/c,w/h,v,m,y,(1+P[0])*T,(1+P[1])*E,_/c,x/h,v,m,y,(-1+P[0])*T,(1+P[1])*E,M/c,x/h)}this.attribList.setData({array:new Float32Array(s)})},t.prototype.render=function(t){var e=this,n=this.alpha;if(!(0===this.attribList.vertexCount||n<=0)){var i=this.gl,o=this.program;o.use();var a=this.scale*(t.retina?devicePixelRatio:1);o.uniformMatrix4fv({u_pvMatrix:t.camera.pv}),o.uniform4fv({u_color:this.color}),o.uniform1i({u_texture:0}),o.uniform1f({u_alpha:n,u_width:1/a*i.drawingBufferWidth,u_height:1/a*i.drawingBufferHeight}),r.utils.enable(i,[i.BLEND],(function(){i.blendFunc(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA),e.texture.bind((function(){e.attribList.enable(o,(function(){i.drawArrays(i.TRIANGLES,0,e.attribList.vertexCount)}))}))}))}},t}();e.BillboardRenderer=a},5574:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.powerOf2=e.packRectsOptimally=e.Rect=void 0;var n=function(){function t(t,e,n){void 0===n&&(n=[0,0]),this.width=t,this.height=e,this.position=n}return Object.defineProperty(t.prototype,"left",{get:function(){return this.position[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.position[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.left+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.top+this.height},enumerable:!1,configurable:!0}),t.prototype.intersect=function(t){return!(this.right<=t.left||this.left>=t.right||this.top>=t.bottom||this.bottom<=t.top)},t}();function r(t,e){t=t.slice().sort((function(t,e){return t.height-e.height}));for(var n=[],r=[[0,0]],i=function(){var i=t.pop();r.sort((function(t,e){return t[0]-e[0]}));for(var o=0;o<r.length;++o){var a=r[o];if(i.position=a,i.bottom<=e&&n.every((function(t){return!t.intersect(i)}))){n.push(i),r.splice(o,1,[i.right,i.top],[i.left,i.bottom]);break}}};t.length>0;)i()}function i(t){for(var e=1;e<t;)e*=2;return e}e.Rect=n,e.packRectsOptimally=function(t,e){for(var n=i(Math.max.apply(Math,t.map((function(t){return t.width})))),o=i(Math.max.apply(Math,t.map((function(t){return t.height})))),a=1/0,s=-1;;o<<=1){r(t,o);var u=i(Math.max.apply(Math,t.map((function(t){return t.right}))));if(!(u>e)){var c=u*o;if(c<a&&(a=c,s=o),u===n)break}}if(s<0)throw new Error("Sprite Texture too large");r(t,s)},e.powerOf2=i},1174:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CubeMappRenderer=void 0;var r=n(3898),i=n(887),o=function(){function t(t){this.gl=t,this.alpha=1,this.program=r.Program.new(t,n(1579).Z,n(8032).Z),this.buildArray()}return t.prototype.release=function(){this.program.release(),this.attribList.release(),this.indexBuffer.release(),this.texture&&this.gl.deleteTexture(this.texture)},t.prototype.render=function(t){var e=this;if(void 0!==this.texture){var n=this.alpha;if(!(n<=0)){var i=this.program,o=this.gl;i.use(),i.enableAttribList(this.attribList,(function(){i.uniform1i({u_cubeTexture:0}),i.uniformMatrix4fv({u_pvMatrix:t.camera.pv,u_mMatrix:e.mMatrix()}),i.uniform3fv({u_eyePosition:t.camera.eyePosition}),i.uniform1f({u_alpha:n,u_radius:1}),r.utils.enable(o,[o.BLEND,o.CULL_FACE],(function(){o.blendFunc(o.SRC_ALPHA,o.ONE),e.indexBuffer.bind((function(){o.bindTexture(o.TEXTURE_CUBE_MAP,e.texture),o.drawElements(o.TRIANGLES,e.indexBuffer.length,o.UNSIGNED_SHORT,0),o.bindTexture(o.TEXTURE_CUBE_MAP,null)}))}))}))}}},t.prototype.mMatrix=function(){return a},t.prototype.buildArray=function(){this.attribList=new r.AttribList(this.gl,{members:[{name:"a_position",nComponents:3}],array:new Float32Array([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1])}),this.indexBuffer=new r.IndexBuffer(this.gl,{array:new Int16Array([1,0,2,1,2,3,1,7,5,1,3,7,5,7,6,4,5,6,3,6,7,2,6,3,0,6,2,0,4,6,0,1,5,0,5,4])})},t.prototype.setupTexture=function(){var t=this.gl;this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_CUBE_MAP,this.texture),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.bindTexture(t.TEXTURE_CUBE_MAP,null)},t.prototype.setCubeImage=function(t){this.texture||this.setupTexture();var e=this.gl,n=[e.TEXTURE_CUBE_MAP_POSITIVE_X,e.TEXTURE_CUBE_MAP_POSITIVE_Y,e.TEXTURE_CUBE_MAP_POSITIVE_Z,e.TEXTURE_CUBE_MAP_NEGATIVE_X,e.TEXTURE_CUBE_MAP_NEGATIVE_Y,e.TEXTURE_CUBE_MAP_NEGATIVE_Z];e.bindTexture(e.TEXTURE_CUBE_MAP,this.texture);for(var r=0;r<n.length;++r)e.texImage2D(n[r],0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t[r]);e.generateMipmap(e.TEXTURE_CUBE_MAP),e.bindTexture(e.TEXTURE_CUBE_MAP,null)},t.faces=["px","py","pz","nx","ny","nz"],t}();e.CubeMappRenderer=o;var a=i.mat4.create()},8438:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoordFrame=void 0;var r=n(887),i=r.mat3.fromValues(-.05487553939,-.873437104725,-.483834991775,.494109453633,-.444829594298,.746982248696,-.867666135681,-.198076389622,.455983794523),o=function(){function t(t){this.mat=t,this.invMat=r.mat3.transpose(r.mat3.create(),t)}return t.prototype.rotate=function(t){return r.vec3.transformMat3([0,0,0],t,this.mat)},t.prototype.invert=function(t){return r.vec3.transformMat3([0,0,0],t,this.invMat)},t.GALACTIC=new t(i),t.EQUATORIAL=new t(r.mat3.identity(r.mat3.create())),t}();e.CoordFrame=o},6319:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.size2order=e.encode_id=e.decode_id=e.shiftmapId=e.shiftmap=e.coeff=void 0;var n,r,i,o,a=Math.PI,s=2*Math.PI,u=Math.PI/2,c=Math.PI/4,h=Math.PI/8;function l(t,e,n,r){var i=e>>2;return{t:((e%4*2-i%2+1)*t+(n-r)+8*t)/t*c,u:u-((i+2)*t-(n+r)-1)/t*c}}function f(t,e,n){var r=Math.abs(e);if(n)return{z:e/(3*h),a:s=t};if(r>=u)return{z:b(e),a:0};var i,o=t%(Math.PI/2),s=t-(r-c)/(r-u)*(o-c);return{z:b(e)*(1-1/3*((i=2-4*r/a)*i)),a:s}}function p(t,e){var n=t*t,r=n>1?-Math.sqrt(n-1):Math.sqrt(1-n);return[r*Math.cos(e),r*Math.sin(e),t]}function d(t,e){for(var n=e.length,r=new Float32Array(n),i=0;i<n;++i){for(var o=0,a=0;a<n;++a)o+=t[i+a*n]*e[a];r[i]=o}return r}function v(t,e){for(var n=0,r=0;r<t.length;++r)n+=t[r]*e[r];return n}function m(t,e){var n=t*t,r=Math.floor(e/n),i=M(e%n);return{f:r,x:i.x,y:i.y}}function y(t){return t<0?-y(-t):2-Math.sqrt(3*(1-t))}function g(t,e){return t<0?e- -t%e:t%e}e.coeff=(n=function(){for(var t,e,n=[],r=0;r<16;++r)n.push((t=r,e=void 0,[(e=[0,1/3,2/3,1])[Math.floor(t/4)],e[t%4]]));return n}(),r=[new Float32Array(16),new Float32Array(16),new Float32Array(16)],i=[new Float32Array(16),new Float32Array(16),new Float32Array(16)],o=new Float32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),function(t,e){var a=1<<t,s=c/a,u=m(a,e),h=u.f,v=u.x,y=u.y,g=l(a,h,v,y),b=g.t,M=g.u,_=Math.abs(M)<=c;if((h<4||8<=h)&&v+y===a-1){for(var x=0;x<16;++x){var T=n[x],E=T[0],P=f(C=b+s*(1-(L=T[1])-E),I=M+s*(E-L),h>=8),A=f(C,I,h<4),O=p(P.z,P.a),R=p(A.z,A.a);r[0][x]=O[0],r[1][x]=O[1],r[2][x]=O[2],i[0][x]=R[0],i[1][x]=R[1],i[2][x]=R[2]}return{a:[d(w,r[0]),d(w,r[1]),d(w,r[2])],b:[d(w,i[0]),d(w,i[1]),d(w,i[2])]}}for(x=0;x<16;++x){var L,C,I,S=n[x],j=(E=S[0],f(C=b+s*(1-(L=S[1])-E),I=M+s*(E-L),_));O=p(j.z,j.a),r[0][x]=O[0],r[1][x]=O[1],r[2][x]=O[2]}return{a:[d(w,r[0]),d(w,r[1]),d(w,r[2])],b:[o,o,o]}}),e.shiftmap=function(t,n,r){function i(t){return(t/.015+1)/2*256}var o=1<<t,f=(0,e.coeff)(t,n),p=f.a,b=f.b,_=new Uint8Array(3*r*r),x=function(t,e){var n=t*t,r=Math.floor(e/n),i=M(e%n),o=i.x,a=i.y;return(r<4||8<=r)&&o+a===t-1}(o,n);function w(t,e){var r=function(t,e,n,r,i){var o=n*n,a=o*n,s=r*r,u=s*r;return i?n-r>=0?t.map((function(t){return v([a,o,n,1],d(t,[u,s,r,1]))})):e.map((function(t){return v([a,o,n,1],d(t,[u,s,r,1]))})):t.map((function(t){return v([a,o,n,1],d(t,[u,s,r,1]))}))}(p,b,t,e,x),i=function(t,e,n){var r=t*t,i=Math.floor(e/r),o=function(t,e,n){var r=t*t+e*e;if(0===r)return{z:n<0?-1:1,a:0};var i=(Math.atan2(e,t)+s)%s;return{z:n/=Math.sqrt(n*n+r),a:i}}(n[0],n[1],n[2]),f=o.z,p=o.a,d=g(p-(i%4+2.5)*u,s)-a+(i%4+.5)*u,v=function(t,e,n){if(Math.abs(t)<=2/3)return{t:e,u:3*h*t};var r=e-(n%=4)*u,i=y(t);return{t:e-(Math.abs(i)-1)*(r-c),u:c*i}}(f,d,i),b=v.t,M=v.u,_=m(t,e),x=l(t,_.f,_.x,_.y),w=c/t,T=i%4==1||i%4==2?g(b,s)-g(x.t,s):g(b+a,s)-g(x.t+a,s),E=M-x.u+w;return{x:(T+E)/w/2,y:(E-T)/w/2}}(o,n,r),f=i.x;return[t-i.y,e-(1-f)]}for(var T=0,E=0;E<r;++E)for(var P=E/(r-1),A=0;A<r;++A){var O=w(A/(r-1),P),R=O[0],L=O[1];_[3*T+0]=i(R),_[3*T+1]=i(L),_[3*T+2]=0,++T}return _},e.shiftmapId=function(t,e){var n=1<<t,r=n*n;return _(t,(Math.floor(e/r)>>2<<2)*r+e%r)};var b=Math.sign||function(t){return t>0?1:t<0?-1:0};function M(t){return x(t<=2147483647),{x:1&t|(4&t)>>1|(16&t)>>2|(64&t)>>3|(256&t)>>4|(1024&t)>>5|(4096&t)>>6|(16384&t)>>7|(65536&t)>>8|(262144&t)>>9|(1048576&t)>>10|(4194304&t)>>11|(16777216&t)>>12|(67108864&t)>>13|(268435456&t)>>14|(1073741824&t)>>15,y:(2&t)>>1|(8&t)>>2|(32&t)>>3|(128&t)>>4|(512&t)>>5|(2048&t)>>6|(8192&t)>>7|(32768&t)>>8|(131072&t)>>9|(524288&t)>>10|(2097152&t)>>11|(8388608&t)>>12|(33554432&t)>>13|(134217728&t)>>14|(536870912&t)>>15}}function _(t,e){return 4*((1<<2*t)-1)+e}function x(t){console.assert(t)}e.decode_id=function(t){x(t<=2147483647);for(var e=0,n=1+(t>>2);n>=4;)n>>=2,++e;return{order:e,index:t-((1<<2*e)-1<<2)}},e.encode_id=_,e.size2order=function(t){for(var e=0;t>0;)t>>=1,++e;return e};var w=new Float32Array([81/4,-40.5,99/4,-4.5,-40.5,81,-49.5,9,99/4,-49.5,30.25,-5.5,-4.5,9,-5.5,1,-60.75,121.5,-74.25,13.5,405/4,-202.5,495/4,-22.5,-40.5,81,-49.5,9,0,0,0,0,60.75,-121.5,74.25,-13.5,-81,162,-99,18,81/4,-40.5,99/4,-4.5,0,0,0,0,-81/4,40.5,-99/4,4.5,81/4,-40.5,99/4,-4.5,-4.5,9,-5.5,1,0,0,0,0,-60.75,405/4,-40.5,0,121.5,-202.5,81,0,-74.25,495/4,-49.5,0,13.5,-22.5,9,0,729/4,-303.75,121.5,0,-303.75,506.25,-202.5,0,121.5,-202.5,81,0,0,0,0,0,-729/4,303.75,-121.5,0,243,-405,162,0,-60.75,405/4,-40.5,0,0,0,0,0,60.75,-405/4,40.5,0,-60.75,405/4,-40.5,0,13.5,-22.5,9,0,0,0,0,0,60.75,-81,81/4,0,-121.5,162,-40.5,0,74.25,-99,99/4,0,-13.5,18,-4.5,0,-729/4,243,-60.75,0,303.75,-405,405/4,0,-121.5,162,-40.5,0,0,0,0,0,729/4,-243,60.75,0,-243,324,-81,0,60.75,-81,81/4,0,0,0,0,0,-60.75,81,-81/4,0,60.75,-81,81/4,0,-13.5,18,-4.5,0,0,0,0,0,-81/4,81/4,-4.5,0,40.5,-40.5,9,0,-99/4,99/4,-5.5,0,4.5,-4.5,1,0,60.75,-60.75,13.5,0,-405/4,405/4,-22.5,0,40.5,-40.5,9,0,0,0,0,0,-60.75,60.75,-13.5,0,81,-81,18,0,-81/4,81/4,-4.5,0,0,0,0,0,81/4,-81/4,4.5,0,-81/4,81/4,-4.5,0,4.5,-4.5,1,0,0,0,0,0])},1025:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TileTexture=e.TextureRef=e.SimpleImageTextureProvider=e.AsyncTextureProvider=e.TextureProvider=e.CoordFrame=e.Renderer=void 0;var r=n(9434);Object.defineProperty(e,"Renderer",{enumerable:!0,get:function(){return r.Renderer}});var i=n(8438);Object.defineProperty(e,"CoordFrame",{enumerable:!0,get:function(){return i.CoordFrame}});var o=n(4922);Object.defineProperty(e,"TextureProvider",{enumerable:!0,get:function(){return o.TextureProvider}}),Object.defineProperty(e,"AsyncTextureProvider",{enumerable:!0,get:function(){return o.AsyncTextureProvider}}),Object.defineProperty(e,"SimpleImageTextureProvider",{enumerable:!0,get:function(){return o.SimpleImageTextureProvider}}),Object.defineProperty(e,"TextureRef",{enumerable:!0,get:function(){return o.TextureRef}}),Object.defineProperty(e,"TileTexture",{enumerable:!0,get:function(){return o.TileTexture}})},8729:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){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=a.trys,(i=i.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=e.call(t,a)}catch(t){o=[6,t],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])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.fetchProperties=void 0;var a=o(n(9669));e.fetchProperties=function(t){return r(this,void 0,void 0,(function(){var e,n,r,o,s,u,c,h,l;return i(this,(function(i){switch(i.label){case 0:return e=t+"/properties",[4,a.default.get(e,{responseType:"text"})];case 1:for(n=i.sent().data,r={},o=0,s=n.split("\n");o<s.length;o++)(u=s[o]).match(/^\s*#/)||u.indexOf("=")>=0&&(c=u.split("=").map((function(t){return t.replace(/\s*(.*?)\s*$/,"$1")})),h=c[0],l=c[1],r[h]=l);if(!("hips_order"in r)||!("hips_tile_width"in r))throw new Error("invalid properties file");return[2,r]}}))}))}},9434:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Renderer=void 0;var a=n(1796),s=n(3898),u=o(n(5866)),c=n(887),h=n(3774),l=n(6319),f=o(n(9544)),p=function(){function t(t,e){this.globe=t,this.textureProvider=e,this.alpha=1,this.animationLod=0,this.lodBias=0,this.integerOrder=!1,this.tileCache=new a.CacheMap(5e3,(function(t){return t.release()}));var r=this.gl=this.globe.gl;this.program=s.Program.new(this.gl,n(5259).Z,n(7003).Z),this.attribList=new s.AttribList(this.gl,{members:[{name:"a_coord",nComponents:2}],array:this.buildArray()}),this.zeroTexture=new s.Texture(r),this.zeroTexture.bind((function(){r.texImage2D(r.TEXTURE_2D,0,r.LUMINANCE,1,1,0,r.LUMINANCE,r.UNSIGNED_BYTE,new Uint8Array([128]))}));for(var i=2;i<5;++i)f.preload(i)}return t.prototype.release=function(){this.program.release(),this.attribList.release(),this.zeroTexture.release(),this.tileCache.clear()},t.prototype.render=function(t){var e=this;this.alpha<=0||(this.activateProgram((function(){var n=e,r=n.gl,i=n.program;i.uniformMatrix4fv({u_pvMatrix:t.camera.pv}),i.uniformMatrix3fv({u_rotMatrix:e.textureProvider.coordFrame.mat}),i.uniform1i({u_shiftmap:0}),i.uniform1i({u_texture1:1});var o=e.visibleTiles(t,(function(t,n){var r=e.tileCache.get(n);r||(r=new d(e,n),e.tileCache.set(n,r)),r.render(t)}));r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,null),r.activeTexture(r.TEXTURE1),r.bindTexture(r.TEXTURE_2D,null),o>2&&f.preload(o-1),f.preload(o+1),r.activeTexture(r.TEXTURE0)})),this.textureProvider.flushQueue(this.textureProvider.coordFrame.invert(t.camera.direction)))},t.prototype.draw=function(){var t=this.gl;t.drawArrays(t.TRIANGLE_STRIP,0,this.attribList.vertexCount)},t.prototype.visibleTiles=function(t,e){var n=this.textureProvider,r=n.minTileOrder,i=n.maxTileOrder,o=n.tileOrder,a=(0,h.clamp)(this.realOrder(t)-o-(this.lodBias+this.animationLod*t.lodBias),r,i);this.integerOrder&&(a=Math.floor(a));var s=Math.ceil((0,h.clamp)(a,2,i)),c=1<<s;return function(t,e,n,r,i){if(n=t.invert(n),r>Math.PI/2)for(var o=12*e*e,a=0;a<o;++a)i(a);else u.query_disc_inclusive_nest(e,n,r,i)}(this.textureProvider.coordFrame,c,t.camera.direction,t.camera.radius,(function(t){e(a,u.orderpix2uniq(s,t))})),s},t.prototype.realOrder=function(t){var e=t.camera.arc;return Math.log(Math.sqrt(Math.PI/3)*this.globe.gl.drawingBufferHeight/e)/Math.LN2},t.prototype.activateProgram=function(t){var e=this.gl;this.program.use(),this.attribList.enable(this.program,(function(){s.utils.enable(e,[e.BLEND],(function(){e.blendFunc(e.SRC_ALPHA,e.ONE),t()}))}))},t.prototype.buildArray=function(){for(var t=[],e=32,n=0;n<e;++n)for(var r=n/e,i=(n+1)/e,o=0;o<=e;++o){for(var a=o/e,s=0===o?2:1;0!==s;--s)t.push(i,a);for(s=o===e?2:1;0!==s;--s)t.push(r,a)}return new Float32Array(t)},t}();e.Renderer=p;var d=function(){function t(e,n){var r=this;this.renderer=e,this.hid=n,this.alreadyReleased=!1;var i=u.uniq2orderpix(n),o=i.order,a=i.ipix;this.order=o,this.index=a,this.coeff=(0,l.coeff)(o,a),this.isBeltEnd=t.isBeltEnd(o,a),f.needShiftMap(o,a)&&f.fetch(o,a,(function(t){if(!r.alreadyReleased){var e=r.renderer.globe.gl;r.shiftmap=new s.Texture(e),r.shiftmap.bind((function(){var n=f.size;e.texImage2D(e.TEXTURE_2D,0,e.RGB,n,n,0,e.RGB,e.UNSIGNED_BYTE,t)}))}}))}return t.prototype.release=function(){this.alreadyReleased=!0,this.shiftmap&&this.shiftmap.release()},t.prototype.render=function(t){var e=this,n=this.renderer,r=n.gl,i=n.program;i.uniform1f({u_belt_end:this.isBeltEnd?1:0}),i.uniformMatrix4fv({u_ax:this.coeff.a[0],u_ay:this.coeff.a[1],u_az:this.coeff.a[2]}),this.isBeltEnd&&i.uniformMatrix4fv({u_bx:this.coeff.b[0],u_by:this.coeff.b[1],u_bz:this.coeff.b[2]}),this.textures(t,(function(t,n,o){var a=e.renderer.alpha*o;i.uniform1f({u_alpha:a}),i.uniformMatrix3fv({u_tMatrix:n}),r.activeTexture(r.TEXTURE1),r.bindTexture(r.TEXTURE_2D,t.tex.name),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,(e.shiftmap||e.renderer.zeroTexture).name),e.renderer.draw()}))},t.isBeltEnd=function(t,e){var n=1<<t,r=n*n,i=Math.floor(e/r),o=u.bit_decombine(e%r),a=o.x,s=o.y;return(i<4||8<=i)&&a+s===n-1},t.prototype.textures=function(t,e){for(var n=this.renderer.textureProvider,r=Math.ceil(t),i=this.order,o=this.index,a=c.mat3.create(),s=1;i>=n.minTileOrder;){if(i<=r){var h=u.orderpix2uniq(i,o),l=n.get(h);if(l){var f=(r===i?1+t-i:1)*l.fadeAlpha;if(e(l,c.mat3.invert(c.mat3.create(),a),f*s),s*=1-f,f>=1)break}else n.request(h)}c.mat3.scale(a,a,[2,2]),c.mat3.translate(a,a,[2&o?-.5:0,1&o?0:-.5]),--i,o>>=2}},t}()},9544:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preload=e.needShiftMap=e.fetch=e.size=void 0;var r=n(5693),i=n(6319),o=n(5137);Object.defineProperty(e,"size",{enumerable:!0,get:function(){return o.DELTA_MAP_N}}),e.fetch=function(t,e,n){var r=(0,i.shiftmapId)(t,e);s.cache.has(r)?n(s.cache.get(r)):s.enqueue(r).then(n)};var a=function(){function t(){this.cache=new Map,this.resolve=new Map,this.queue=[]}return t.prototype.enqueue=function(t){var e=this;return this.cache.has(t)?Promise.resolve(this.cache.get(t)):(this.processing!==t&&this.queue.indexOf(t)<0&&(this.queue.push(t),this.doNextJob()),new Promise((function(n){e.resolve.has(t)||e.resolve.set(t,[]),e.resolve.get(t).push(n)})))},t.prototype.receiveShiftmap=function(t){var e=t.id,n=t.arraybuffer,r=new Uint8Array(n),i=this.queue.indexOf(e);if(i>=0&&this.queue.splice(i,1),this.cache.set(e,r),this.resolve.has(e)){for(var o=0,a=this.resolve.get(e);o<a.length;o++){(0,a[o])(r)}this.resolve.delete(e)}},t.prototype.doNextJob=function(){if(void 0===this.processing){var t=this.queue.shift();if(void 0!==t){var e={id:t};this.startWorker(),this.processing=t,this.worker.postMessage(e)}else this.requestQuitWorker()}},t.prototype.startWorker=function(){var t=this;this.worker||(this.cancelQuit(),this.worker=new r,this.worker.addEventListener("message",(function(e){for(var n=0,r=e.data;n<r.length;n++){var i=r[n];t.receiveShiftmap(i)}t.processing=void 0,t.doNextJob()})))},t.prototype.cancelQuit=function(){void 0!==this.quitTimer&&(clearTimeout(this.quitTimer),this.quitTimer=void 0)},t.prototype.requestQuitWorker=function(){var t=this;this.cancelQuit(),this.quitTimer=setTimeout((function(){t.quitTimer=void 0,t.worker.terminate(),t.worker=void 0}),5e3)},t}();e.needShiftMap=function(t,e){var n=1<<t,r=n*n,i=Math.floor(e/r);return!(4<=i&&i<8)&&[0,1,2,3].indexOf(i>=8?e%r:r-e%r-1)>=0};var s=new a;e.preload=function(t){if(0===t)s.enqueue((0,i.encode_id)(0,0)),s.enqueue((0,i.encode_id)(0,8));else for(var e=1<<2*t,n=0;n<4;++n)s.enqueue((0,i.shiftmapId)(t,e-n-1)),s.enqueue((0,i.shiftmapId)(t,8*e+n))}},5137:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DELTA_MAP_N=void 0,e.DELTA_MAP_N=64},4922:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return a(e,t),e},u=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},c=this&&this.__generator||function(t,e){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=a.trys,(i=i.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=e.call(t,a)}catch(t){o=[6,t],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])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleImageTextureProvider=e.AsyncTextureProvider=e.TextureRef=e.TileTexture=e.TextureProvider=void 0;var h=n(1796),l=n(3898),f=s(n(5866)),p=n(887),d=n(5507),v=n(3310),m=n(1025),y=n(6319),g=n(8729),b=function(t,e,n,r,i){this.globe=t,this.tileOrder=e,this.maxTileOrder=n,this.minTileOrder=r,this.coordFrame=i};e.TextureProvider=b;var M=function(){function t(t){var e=this;this.fadeAlpha=0;var n=t.globe.gl;this.tex=new l.Texture(n),t.globe.animation((function(t){var n=t.r;e.fadeAlpha=n}),{duration:200})}return t.prototype.release=function(){this.tex.release()},t.prototype.bind=function(t){this.tex.bind(t)},t}();e.TileTexture=M;var _=function(t){this.hid=t;var e=f.uniq2orderpix(t),n=e.order,r=e.ipix;this.order=n,this.index=r,this.center=f.pix2vec_nest(1<<n,r)};e.TextureRef=_;var x=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cache=new h.CacheMap(1e3,(function(t){return t.release()})),e.alreadyReleased=!1,e.refsToLoad=new Map,e.refsInLoading=new Map,e.deadHid=new Set,e.nParallel=4,e}return i(e,t),e.prototype.release=function(){this.alreadyReleased=!0,this.cache.clear()},e.prototype.get=function(t){return this.cache.get(t)},e.prototype.request=function(t){if(!this.deadHid.has(t)&&!this.refsInLoading.has(t)&&!this.refsToLoad.has(t)){var e=new _(t);this.refsToLoad.set(t,e)}},e.prototype.flushQueue=function(t){var e=this;if(!(this.refsInLoading.size>=this.nParallel)){var n=[];this.refsToLoad.forEach((function(t){return n.push(t)})),n.sort((function(e,n){return e.order!==n.order?e.order-n.order:p.vec3.sqrDist(t,e.center)-p.vec3.sqrDist(t,n.center)}));for(var r=function(t){if(i.refsInLoading.size>=i.nParallel)return"break";i.refsInLoading.set(t.hid,t),i.makeTileTexture(t).then((function(n){e.alreadyReleased?n.release():(e.cache.set(t.hid,n,t.order===e.minTileOrder),e.globe.requestRefresh())})).catch((function(n){e.deadHid.add(t.hid)})).then((function(){e.refsInLoading.delete(t.hid)}))},i=this,o=0,a=n;o<a.length;o++){if("break"===r(a[o]))break}this.refsToLoad.clear()}},e}(b);e.AsyncTextureProvider=x;var w=function(t){function e(e,n,r){var i,o,a=this,s=Number(r.hips_order),u=r.hips_order_min?Number(r.hips_order_min):3,c=Number(r.hips_tile_width),h=function(t){switch(t){case"equatorial":return m.CoordFrame.EQUATORIAL;case"galactic":return m.CoordFrame.GALACTIC;case"hsc/zenith":case"zenith":var e=JSON.parse(r["hsc/zenith"]),n=e[0],i=e[1],o=e[2];return new m.CoordFrame((0,v.izenith3)(n,i,o))}return m.CoordFrame.EQUATORIAL}(r.hips_frame),l=(0,y.size2order)(c),f=(i=r.hips_tile_format,{jpeg:"jpg"}[o=i.split(/\s+/)[0]]||o);return(a=t.call(this,e,l,s,u,h)||this).baseUrl=n,a.properties=r,a.format=f,a}return i(e,t),e.prototype.makeTileTexture=function(t){return u(this,void 0,void 0,(function(){var e,n,r,i,o=this;return c(this,(function(a){switch(a.label){case 0:return e=this.tileId2Url(t.order,t.index),[4,(0,d.loadImage)(e)];case 1:return n=a.sent(),r=new M(this),i=this.globe.gl,r.bind((function(){i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,1),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,n),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,0),t.order===o.minTileOrder&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR_MIPMAP_LINEAR),i.generateMipmap(i.TEXTURE_2D))})),[2,r]}}))}))},e.prototype.tileId2Url=function(t,e){var n=1e4*Math.floor(e/1e4);return this.baseUrl+"/Norder"+t+"/Dir"+n+"/Npix"+e+"."+this.format},e.fromBaseUrl=function(t,n){return u(this,void 0,void 0,(function(){var r;return c(this,(function(i){switch(i.label){case 0:return[4,(0,g.fetchProperties)(n)];case 1:return r=i.sent(),[2,new e(t,n,r)]}}))}))},e}(x);e.SimpleImageTextureProvider=w},2997:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlendMode=e.Point=e.Path=e.JOINT=e.Renderer=void 0;var r=n(1143);Object.defineProperty(e,"Renderer",{enumerable:!0,get:function(){return r.Renderer}}),Object.defineProperty(e,"JOINT",{enumerable:!0,get:function(){return r.JOINT}}),Object.defineProperty(e,"Path",{enumerable:!0,get:function(){return r.Path}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return r.Point}}),Object.defineProperty(e,"BlendMode",{enumerable:!0,get:function(){return r.BlendMode}})},1143:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Renderer=e.BlendMode=e.Path=e.Point=e.JOINT=void 0;var o,a=n(3898),s=n(887);!function(t){t[t.MITER=0]="MITER",t[t.NONE=1]="NONE"}(o=e.JOINT||(e.JOINT={}));var u=function(t,e,n){this.position=t,this.color=e,this.size=n};e.Point=u;var c,h=function(t,e,n){void 0===n&&(n=o.NONE),this.points=t,this.close=e,this.joint=n};e.Path=h,function(t){t.NORMAL="NORMAL",t.ADD="ADD"}(c=e.BlendMode||(e.BlendMode={}));var l=function(){function t(t){this.gl=t,this.darkenNarrowLine=!0,this.depthTest=!1,this.stencilTest=!1,this.minWidth=4,this.alpha=1,this.blendMode=c.ADD,this._paths=[],this.alreadyReleased=!1,this.needsUpdatePaths=!1,this.program=a.Program.new(t,n(5933).Z,n(6526).Z),this.attribList=new a.AttribList(t,{members:[{name:"a_p",nComponents:3},{name:"a_a",nComponents:3},{name:"a_b",nComponents:3},{name:"a_y",nComponents:1},{name:"a_width",nComponents:1},{name:"a_color",nComponents:4}]})}return t.prototype.setPaths=function(t){this._paths=t.slice(),this.needsUpdatePaths=!0},t.prototype.release=function(){this.alreadyReleased=!0,this.attribList.release(),this.program.release()},t.prototype.mMatirx=function(){return d},t.prototype.render=function(t){var e=this;if(this.needsUpdatePaths&&(this.updateVBO(),this.needsUpdatePaths=!1),0!==this.attribList.vertexCount){var n=this.alpha;if(!(n<=0)){var r=t.camera,i=this.gl,o=this.program;o.enableAttribList(this.attribList,(function(){o.uniformMatrix4fv({u_pvmMatrix:s.mat4.mul(s.mat4.create(),r.pv,e.mMatirx())}),o.uniform1f({u_alpha:n,u_fovy:r.fovy,u_aspectRatio:r.aspectRatio,u_minWidth:e.minWidth/i.drawingBufferHeight}),o.uniform1i({u_darkenNarrowLine:e.darkenNarrowLine?1:0});var t=[i.BLEND],u=0;e.stencilTest&&(t.push(i.STENCIL_TEST),u|=i.STENCIL_BUFFER_BIT,i.clearStencil(0),i.stencilFunc(i.EQUAL,0,-1),i.stencilOp(i.KEEP,i.KEEP,i.INCR)),e.depthTest&&(t.push(i.DEPTH_TEST),u|=i.DEPTH_BUFFER_BIT),u&&i.clear(u),a.utils.enable(i,t,(function(){switch(e.blendMode){case c.ADD:i.blendFunc(i.SRC_ALPHA,i.ONE);break;case c.NORMAL:i.blendFunc(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA)}i.drawArrays(i.TRIANGLE_STRIP,0,e.attribList.vertexCount)}))}))}}},t.prototype.updateVBO=function(){for(var t=[],e=0,n=this._paths;e<n.length;e++){var r=n[e];switch(r.joint){case o.MITER:f(t,r);break;case o.NONE:p(t,r)}}this.attribList.setData({array:new Float32Array(t)})},t}();function f(t,e){if(e.points.length<2)throw new Error("Path must include more than 2 points");if(e.close)e.points.unshift(e.points[e.points.length-1]),e.points.push(e.points[1],e.points[2]);else{e.points.unshift(r(r({},e.points[0]),{position:e.points[0].position.map((function(t,n){return 2*t-e.points[1].position[n]}))}));var n=e.points.length-1;e.points.push(r(r({},e.points[n]),{position:e.points[n].position.map((function(t,r){return 2*t-e.points[n-1].position[r]}))}))}for(var o=1;o<e.points.length-1;++o){var a=e.points[o],s=e.points[o-1],u=e.points[o+1];t.push.apply(t,i(i(i(i(i([],a.position,!1),s.position,!1),u.position,!1),[-1,.5*a.size],!1),a.color,!1)),1===o&&t.push.apply(t,t.slice(t.length-15)),t.push.apply(t,i(i(i(i(i([],a.position,!1),s.position,!1),u.position,!1),[1,.5*a.size],!1),a.color,!1))}t.push.apply(t,t.slice(t.length-15))}function p(t,e){if(e.points.length<2)throw new Error("Path must include more than 2 points");e.close&&e.points.push(e.points[0]);for(var n=function(n){var r=e.points[n],o=e.points[n+1],a=[0,1,2].map((function(t){return 2*r.position[t]-o.position[t]})),s=[0,1,2].map((function(t){return 2*o.position[t]-r.position[t]}));t.push.apply(t,i(i(i(i(i([],r.position,!1),a,!1),o.position,!1),[1,.5*r.size],!1),r.color,!1)),t.push.apply(t,i(i(i(i(i([],r.position,!1),a,!1),o.position,!1),[1,.5*r.size],!1),r.color,!1)),t.push.apply(t,i(i(i(i(i([],r.position,!1),a,!1),o.position,!1),[-1,.5*r.size],!1),r.color,!1)),t.push.apply(t,i(i(i(i(i([],o.position,!1),r.position,!1),s,!1),[1,.5*o.size],!1),o.color,!1)),t.push.apply(t,i(i(i(i(i([],o.position,!1),r.position,!1),s,!1),[-1,.5*o.size],!1),o.color,!1)),t.push.apply(t,i(i(i(i(i([],o.position,!1),r.position,!1),s,!1),[-1,.5*o.size],!1),o.color,!1))},r=0;r<e.points.length-1;++r)n(r)}e.Renderer=l;var d=s.mat4.create()},931:function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.PointRenderer=e.Point=void 0;var i=n(3898),o=function(t,e,n){this.position=t,this.color=e,this.size=n};e.Point=o;var a=function(){function t(t){this.gl=t,this.darkenSmallPoint=!0,this.minSize=3,this.alpha=1,this._points=[],this.needsUpdatePoints=!1,this.program=i.Program.new(t,n(2957).Z,n(5071).Z),this.attribList=new i.AttribList(t,{members:[{name:"a_position",nComponents:3},{name:"a_size",nComponents:1},{name:"a_color",nComponents:4}]})}return Object.defineProperty(t.prototype,"points",{get:function(){return this.points},set:function(t){this._points=t,this.needsUpdatePoints=!0},enumerable:!1,configurable:!0}),t.prototype.release=function(){this.attribList.release(),this.program.release()},t.prototype.render=function(t){var e=this;if(this.needsUpdatePoints&&(this.updateVBO(),this.needsUpdatePoints=!1),0!==this.attribList.vertexCount){var n=this.alpha;if(!(n<=0)){var r=t.camera,o=this.gl,a=this.program;a.enableAttribList(this.attribList,(function(){a.uniformMatrix4fv({u_pvMatrix:r.pv}),a.uniform1f({u_alpha:n,u_fovy:r.fovy,u_bufferHeight:o.drawingBufferHeight,u_minSize:e.minSize}),a.uniform1i({u_darkenSmallPoint:e.darkenSmallPoint?1:0}),i.utils.enable(o,[o.BLEND],(function(){o.blendFunc(o.SRC_ALPHA,o.ONE),o.drawArrays(o.POINTS,0,e.attribList.vertexCount)}))}))}}},t.prototype.updateVBO=function(){for(var t=[],e=0,n=this._points;e<n.length;e++){var i=n[e];t.push.apply(t,r(r(r([],i.position,!1),[i.size],!1),i.color,!1))}this.attribList.setData({array:new Float32Array(t)})},t.prototype._setArray=function(t){this._points=[],this.attribList.setData({array:new Float32Array(t)})},t}();e.PointRenderer=a},6562:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleImageTextureProvider=e.AsyncTextureProvider=e.TileTexture=e.TileRef=e.TextureProvider=e.Tract=e.Renderer=void 0;var r=n(720);Object.defineProperty(e,"Renderer",{enumerable:!0,get:function(){return r.Renderer}});var i=n(4156);Object.defineProperty(e,"Tract",{enumerable:!0,get:function(){return i.Tract}});var o=n(2574);Object.defineProperty(e,"TextureProvider",{enumerable:!0,get:function(){return o.TextureProvider}}),Object.defineProperty(e,"TileRef",{enumerable:!0,get:function(){return o.TileRef}}),Object.defineProperty(e,"TileTexture",{enumerable:!0,get:function(){return o.TileTexture}}),Object.defineProperty(e,"AsyncTextureProvider",{enumerable:!0,get:function(){return o.AsyncTextureProvider}}),Object.defineProperty(e,"SimpleImageTextureProvider",{enumerable:!0,get:function(){return o.SimpleImageTextureProvider}})},720:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tile=e.TractRenderer=e.Renderer=void 0;var r=n(1796),i=n(3898),o=n(887),a=n(4156),s=function(){function t(t,e){this.globe=t,this.textureProvider=e,this.tileCache=new r.CacheMap(1e3,(function(t){return t.release()})),this.deadTileId=new Set,this.alpha=1,this.animationLod=1,this.lodBias=0,this.integerLevel=!1,this.alreadyReleased=!1,this.tractRenderers=new Map;var o=t.gl;this.gl=o,this.program=i.Program.new(this.gl,n(5835).Z,n(3846).Z),this.attribList=new i.AttribList(this.gl,{members:[{name:"a_coord",nComponents:2}],array:this.buildArray()})}return t.prototype.release=function(){this.attribList.release(),this.program.release(),this.alreadyReleased=!0,this.tileCache.clear()},t.prototype.render=function(t){var e=this,n=0;return this.alpha<=0?0:(this.activateProgram((function(){n=e.textureProvider.visibleTracts(t,(function(n){var r=e.program;e.tractRenderers.has(n)||e.tractRenderers.set(n,new u(e,n));var i=e.tractRenderers.get(n);r.uniform1f({u_layer_alpha:e.alpha}),r.uniformMatrix4fv({u_pvMatrix:t.camera.pv}),i.render(t)})),e.textureProvider.flushQueue(t.camera.direction)})),n)},t.prototype.draw=function(){var t=this.gl;t.drawArrays(t.TRIANGLE_STRIP,0,this.attribList.vertexCount)},t.prototype.activateProgram=function(t){var e=this.gl,n=this.program;n.use(),this.attribList.enable(this.program,(function(){i.utils.enable(e,[e.BLEND],(function(){e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA),e.activeTexture(e.TEXTURE0),n.uniform1i({u_texture0:0}),t(),e.bindTexture(e.TEXTURE_2D,null)}))}))},t.prototype.buildArray=function(){return new Float32Array([0,0,1,0,0,1,1,1])},t.prototype.clearTiles=function(){this.tileCache.clear(),this.deadTileId.clear()},t.prototype.clearInvisibleTiles=function(t,e){var n=this;void 0===e&&(e=1);var r=this.integerLevel;this.integerLevel=!0;var i=new Set;this.textureProvider.visibleTracts(t,(function(r){var o=n.tractRenderers.get(r);if(o)for(var a=0,s=o.visibleTiles(t,n.lodBias+e).tiles;a<s.length;a++){var u=s[a];i.add(u.id)}}));for(var o=0,a=this.tileCache.keys();o<a.length;o++){var s=a[o];i.has(s)||this.tileCache.delete(s)}this.integerLevel=r,this.deadTileId.clear()},t.prototype.setCacheSize=function(t){this.tileCache.setLimit(t)},t}();e.Renderer=s;var u=function(){function t(t,e){this.renderer=t,this.tract=e}return t.prototype.render=function(t){var e=this.tract,n=this.renderer,r=n.lodBias,i=n.animationLod,o=this.visibleTiles(t,r+i*t.lodBias),a=o.tiles,s=o.baseLevel,u=o.lodAlpha;a.sort((function(t,e){return e.level-t.level})),this.renderer.program.uniformMatrix4fv({u_mMatrix:e.mMatrix});for(var c=0,h=a;c<h.length;c++){var l=h[c],f=this.renderer.integerLevel||s!==l.level?1:u;l.render(f)}},t.prototype.visibleTiles=function(t,e){for(var n=this.tract,r=[],i=new Set,o=n.tileIndices(t,e),a=o.minP,s=o.maxP,u=o.minQ,c=o.maxQ,h=o.baseLevel,l=o.lodAlpha,f=a;f<=s;++f)for(var p=u;p<=c;++p)this.readyTilesFor(h,f,p,(function(t){i.has(t.id)||r.push(t),i.add(t.id)}));return{tiles:r,baseLevel:h,lodAlpha:l}},t.prototype.readyTilesFor=function(t,e,n,r){for(var i=this.renderer,o=this.tract,a=i.tileCache,s=t;s<=o.maxTileLevel;++s){var u=o.encodeTileId(s,e,n);if(i.deadTileId.has(u))return;var c=s===o.maxTileLevel,h=a.get(u);if(h){if(r(h),h.tt.needUpdate()&&this.requestTile(u,c,h),(i.integerLevel||s>t)&&h.tt.fadeAlpha>=1)break}else this.requestTile(u,c);e>>=1,n>>=1}},t.prototype.requestTile=function(t,e,n){var r=this,i=this.renderer,o=i.textureProvider,a=n?n.tt.revision:o.revision,s=o.fetch(t,a);s&&s.then((function(o){if(i.alreadyReleased)o.release();else{!n&&o.fadeIn();var a=new c(t,o,i);i.tileCache.set(t,a,e),r.renderer.globe.requestRefresh()}})).catch((function(){i.deadTileId.add(t),r.renderer.globe.requestRefresh()}))},t}();e.TractRenderer=u;var c=function(){function t(t,e,n){this.id=t,this.tt=e,this.renderer=n;var r=a.Tract.decodeTileId(t),i=r.tract,s=r.level,u=r.p,c=r.q;this.level=s;var h=i.tileSize<<s,l=(Math.min((i.naxis2>>s)-1<<s,h*(u+1))-h*u)/h,f=(Math.min((i.naxis1>>s)-1<<s,h*(c+1))-h*c)/h;this.texMatrix=o.mat3.fromValues(f,0,0,0,l,0,0,0,1),this.tileMatrix=o.mat3.fromValues(h,0,0,0,h,0,h*c,h*u,1)}return t.prototype.release=function(){this.tt.release()},t.prototype.render=function(t){var e=this.tt,n=this.renderer,r=n.gl,i=n.program;r.bindTexture(r.TEXTURE_2D,e.tex.name),i.uniform1f({u_alpha:t*this.tt.fadeAlpha}),i.uniformMatrix3fv({u_texMatrix:this.texMatrix,u_tileMatrix:this.tileMatrix}),n.draw()},t}();e.Tile=c},2574:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){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=a.trys,(i=i.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=e.call(t,a)}catch(t){o=[6,t],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])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.TileTexture=e.SimpleImageTextureProvider=e.AsyncTextureProvider=e.TileRef=e.TextureProvider=void 0;var s=n(3898),u=n(887),c=n(5507),h=n(3774),l=n(4418),f=n(4156),p=function(){function t(t){this.globe=t,this.alreadyReleased=!1,this._revision=0}return t.prototype.release=function(){this.alreadyReleased=!0},t.prototype.visibleTracts=function(t,e){var n=t.camera.direction,r=t.camera.arc,i=0;return this.walkTracts((function(t){u.vec3.sqrDist(n,t.refPoint)<=(0,h.square)(r+t.fov)&&(++i,e(t))})),i},Object.defineProperty(t.prototype,"revision",{get:function(){return this._revision},enumerable:!1,configurable:!0}),t.prototype.update=function(){this._revision++},t}();e.TextureProvider=p;var d=function(t,e){this.id=t,this.priority=e;var n=f.Tract.decodeTileId(t),r=n.tract,i=n.level,o=n.p,a=n.q;this.tract=r,this.level=i,this.p=o,this.q=a;var s=(r.tileSize<<i)*(o+.5),u=(r.tileSize<<i)*(a+.5);this.center=r.pixel2xyz(u,s)};e.TileRef=d;var v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.nParallel=2,e.loading=new Set,e.requests=new Map,e}return i(e,t),e.prototype.fetch=function(t,e){var n=this;if(!this.loading.has(t)&&!this.requests.has(t))return new Promise((function(r,i){var o=new d(t,e);n.requests.set(t,{ref:o,resolve:r,reject:i})}))},e.prototype.flushQueue=function(t){var e=this,n=[];this.requests.forEach((function(t){return n.push(t)})),n.sort((function(e,n){return e.ref.priority!==n.ref.priority?e.ref.priority-n.ref.priority:e.ref.level!==n.ref.level?n.ref.level-e.ref.level:u.vec3.sqrDist(e.ref.center,t)-u.vec3.sqrDist(n.ref.center,t)}));for(var r=function(){var t=n.shift(),r=t.ref,s=t.resolve,u=t.reject;i.loading.add(r.id),i.makeTileTexture(r).then((function(t){return o(e,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,(0,l.nextAnimationFrame)()];case 1:return e.sent(),s(t),[2]}}))}))})).catch((function(t){return u(t)})).then((function(){e.loading.delete(r.id),0==e.loading.size&&e.globe.ee.emit("imageloadend")}))},i=this;n.length>0&&this.loading.size<this.nParallel;)r();this.requests.clear()},e.prototype.numLoadingImages=function(){return this.loading.size},e}(p);e.AsyncTextureProvider=v;var m=function(t){function e(e){return t.call(this,e)||this}return i(e,t),e.prototype.makeTileTexture=function(t){return o(this,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(o){switch(o.label){case 0:return e=this.ref2url(t),[4,(0,c.loadImage)(e)];case 1:return n=o.sent(),r=new y(this),i=this.globe.gl,r.bind((function(){i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,n),t.level===t.tract.maxTileLevel&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR_MIPMAP_LINEAR),i.generateMipmap(i.TEXTURE_2D))})),[2,r]}}))}))},e}(v);e.SimpleImageTextureProvider=m;var y=function(){function t(t){this.tp=t,this.fadeAlpha=1;var e=t.globe.gl;this.tex=new s.Texture(e),this.revision=t.revision}return t.prototype.fadeIn=function(){var t=this;this.tp.globe.animation((function(e){var n=e.r;t.fadeAlpha=n}),{duration:200,immediate:!0})},t.prototype.release=function(){this.tex.release()},t.prototype.bind=function(t){this.tex.bind(t)},t.prototype.needUpdate=function(){return this.revision<this.tp.revision},t}();e.TileTexture=y},4156:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tract=void 0;var r=n(9565),i=n(887),o=n(3774),a=n(320),s=n(887),u=function(){function t(e,n,o,s,u,c,h,l){void 0===l&&(l={}),this.naxis1=e,this.naxis2=n,this.crval1=o,this.crval2=s,this.id=(0,a.serialNumber)(),this.fov=(0,r.deg2rad)(1.8),this.tileSize=l.tileSize||256,this.minTileLevel=l.minTileLevel||0,this.maxTileLevel=l.maxTileLevel||8;var f=i.mat4.create();i.mat4.rotateZ(f,f,o),i.mat4.rotateY(f,f,-s),i.mat4.mul(f,f,i.mat4.fromValues(0,1,0,0,0,0,1,0,1,0,0,0,1,0,0,1)),i.mat4.mul(f,f,[h[0],h[2],0,0,h[1],h[3],0,0,0,0,1,0,0,0,0,1]),i.mat4.translate(f,f,[-u,-c,0]),i.mat4.translate(f,f,[.5,.5,0]),this.flipV=l.flipV||!1,l.flipV&&(i.mat4.translate(f,f,[0,n,0]),i.mat4.scale(f,f,[1,-1,1])),this.mMatrix=f,this.invMMatrix=i.mat4.invert(i.mat4.create(),this.mMatrix),this.refPoint=r.EquatorialCoord.fromRad(o,s).xyz,this.pixelScale=Math.sqrt(Math.abs(h[0]*h[3]-h[1]*h[2])),t.id2tract.set(this.id,this)}return t.prototype.pixel2xyz=function(t,e){var n=i.vec4.transformMat4(i.vec4.create(),[t,e,0,1],this.mMatrix),r=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);return[n[0]/r,n[1]/r,n[2]/r]},t.prototype.xyz2pixel=function(t){var e=s.vec3.angle(t,this.refPoint),n=1/Math.cos(e),r=t[0],o=t[1],a=t[2],u=i.vec4.transformMat4(i.vec4.create(),[n*r,n*o,n*a,1],this.invMMatrix);return[u[0],u[1]]},t.prototype.pix2jacobian=function(t,e){var n=this.pixel2xyz(t,e),r=s.vec3.angle(n,this.refPoint);return 1/Math.pow(Math.cos(r),3)},t.prototype.ndc2pixel=function(t,e){var n=i.mat4.mul(i.mat4.create(),this.invMMatrix,t.camera.iPv);e((function(t,e){var r=-(n[2]*t+n[6]*e+n[14])/n[10],o=1/(n[3]*t+n[7]*e+n[11]*r+n[15]),a=i.vec4.fromValues(t,e,r,1);return i.vec4.transformMat4(a,a,n),[o*a[0],o*a[1],o]}))},t.prototype.tileIndices=function(e,n){var r=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;if(this.ndc2pixel(e,(function(e){for(var n=0,o=[[-1,-1],[-1,1],[1,-1],[1,1]];n<o.length;n++){var u=o[n],c=e(u[0],u[1]),h=c[0],l=c[1];if(c[2]<0)return t.noIndex;h<r&&(r=h),h>i&&(i=h),l<a&&(a=l),l>s&&(s=l)}})),i<0||this.naxis1<r)return t.noIndex;if(s<0||this.naxis2<a)return t.noIndex;r=Math.max(r,0),i=Math.min(i,this.naxis1),a=Math.max(a,0),s=Math.min(s,this.naxis2);var u=e.camera.arc/this.pixelScale/e.drawingBufferHeight,c=(0,o.clamp)(Math.log(u)/Math.LN2+n,this.minTileLevel,this.maxTileLevel),h=Math.floor(c),l=1-(c-h),f=this.tileSize<<h;return{minP:Math.floor(a/f),maxP:Math.floor(s/f),minQ:Math.floor(r/f),maxQ:Math.floor(i/f),baseLevel:h,lodAlpha:l}},t.fromFitsHeader=function(e,n){void 0===n&&(n={}),console.assert(void 0===e.CTYPE1||"RA---TAN"===e.CTYPE1),console.assert(void 0===e.CTYPE2||"DEC--TAN"===e.CTYPE2),console.assert(void 0===e.LONPOLE),console.assert(void 0===e.LATPOLE);var i=n.tileSize,o=n.minTileLevel,a=n.maxTileLevel,s=n.flipV;return new t(c(e,"NAXIS1","number"),c(e,"NAXIS2","number"),(0,r.deg2rad)(c(e,"CRVAL1","number")),(0,r.deg2rad)(c(e,"CRVAL2","number")),c(e,"CRPIX1","number"),c(e,"CRPIX2","number"),[(0,r.deg2rad)(c(e,"CD1_1","number")),(0,r.deg2rad)(c(e,"CD1_2","number",0)),(0,r.deg2rad)(c(e,"CD2_1","number",0)),(0,r.deg2rad)(c(e,"CD2_2","number"))],{tileSize:i,minTileLevel:o,maxTileLevel:a,flipV:s})},t.fromId=function(e){return t.id2tract.get(e)},t.encodeTileId=function(t,e,n,r){return t.id+":"+e+":"+n+":"+r},t.decodeTileId=function(e){var n=e.split(":").map(Number),r=n[0],i=n[1],o=n[2],a=n[3];return{tract:t.fromId(r),level:i,p:o,q:a}},t.prototype.encodeTileId=function(e,n,r){return t.encodeTileId(this,e,n,r)},t.noIndex={minP:0,maxP:-1,minQ:0,maxQ:-1,baseLevel:-1,lodAlpha:-1},t.id2tract=new Map,t}();function c(t,e,n,r){var i=e in t?t[e]:r;if(typeof i!==n)throw new Error("type mismatch: "+n+" for ["+e+"] = "+i);return i}e.Tract=u},5451:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.get2dContext=void 0,e.get2dContext=function(t,e,n){var r=i(),o=r.canvas,a=r.ctx;o.width=t,o.height=e,a.save(),a.clearRect(0,0,t,e);var s=n(a);return a.restore(),s};var n,r,i=(n=document.createElement("canvas"),r=n.getContext("2d"),function(){return{canvas:n,ctx:r}})},2593:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.elementSize=void 0;var n=document.createElement("div");n.style.position="fixed",n.style.visibility="hidden",e.elementSize=function(t){t(n),document.body.appendChild(n);var e=n.clientWidth,r=n.clientHeight;return document.body.removeChild(n),{width:e,height:r}}},6692:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.debounce=e.throttle=void 0,e.throttle=function(t,e){var n;return function(){void 0===n&&(n=setTimeout((function(){n=void 0,e()}),t))}},e.debounce=function(t,e){var n;return function(){void 0!==n&&clearTimeout(n),n=setTimeout((function(){n=void 0,e()}),t)}}},5507:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.zeroTexture=e.loadImage=void 0;var n=function(){function t(){this.nParallel=2,this.q=[],this.running=0}return t.prototype.push=function(t,e){var n=this;return new Promise((function(r,i){n.q.push({url:t,resolve:r,reject:i,failover:e}),n.consume()}))},t.prototype.consume=function(){var t=this;void 0===this.rafId&&(this.rafId=requestAnimationFrame((function(){if(t.rafId=void 0,t.q.length>0&&t.running<t.nParallel){var e=t.q.shift(),n=e.url,r=e.resolve,i=e.reject,o=e.failover,a=new Image;a.onload=function(){--t.running,r(a),t.consume()},a.onerror=function(e){--t.running,o?r(o):i(e),t.consume()},n.match(/^(https?:)?\/\//)&&(a.crossOrigin=""),a.src=n,++t.running}})))},t}(),r=new Map;e.loadImage=function(t,e){var i=function(t){var e=t.match(/https?:\/\/(.*?)\//);return e?e[1]:""}(t);return r.has(i)||r.set(i,new n),r.get(i).push(t,e)};var i=document.createElement("canvas").getContext("2d");e.zeroTexture=i.createImageData(1,1)},5928:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serialNumber=e.loadImage=e.throttle=e.debounce=void 0;var r=n(6692);Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return r.debounce}}),Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return r.throttle}});var i=n(5507);Object.defineProperty(e,"loadImage",{enumerable:!0,get:function(){return i.loadImage}});var o=n(320);Object.defineProperty(e,"serialNumber",{enumerable:!0,get:function(){return o.serialNumber}})},3774:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.diff=e.dot=e.xyz2thetaphi=e.thetaphi2xyz=e.square=e.range=e.clamp=void 0,e.clamp=function(t,e,n){return t<e?e:t>n?n:t},e.range=function(t,e){void 0===e&&(e=t,t=0);for(var n=[],r=t;r<e;++r)n.push(r);return n},e.square=function(t){return t*t},e.thetaphi2xyz=function(t,e){var n=Math.cos(t);return[n*Math.cos(e),n*Math.sin(e),Math.sin(t)]},e.xyz2thetaphi=function(t,e,n){var r=t*t+e*e;if(0===r)return[n>0?Math.PI/2:-Math.PI/2,0];var i=2*Math.PI,o=(Math.atan2(e,t)+i)%i;return[Math.atan2(n,Math.sqrt(r)),o]},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},e.diff=function(t,e){return[t[0]-e[0],t[1]-e[1],t[2]-e[2]]}},7312:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.mouse=e.Button=void 0,function(t){t[t.LEFT=0]="LEFT",t[t.RIGHT=1]="RIGHT",t[t.MIDDLE=2]="MIDDLE"}(n=e.Button||(e.Button={})),e.mouse={button:function(t){switch(t.button){case 2:return n.RIGHT;case 1:return n.MIDDLE;default:if(!t.altKey&&t.ctrlKey&&!t.shiftKey)return n.RIGHT;if(t.altKey&&!t.ctrlKey&&!t.shiftKey)return n.MIDDLE}return n.LEFT},Button:n}},320:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serialNumber=void 0;var n=0;e.serialNumber=function(){return++n}},4363:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.text2imageData=void 0;var r=n(5451),i=n(2593);e.text2imageData=function(t,e,n,o){void 0===e&&(e="48pt sans-serif"),void 0===n&&(n="rgba(255, 255, 255, 1)"),void 0===o&&(o=10);var a=(0,i.elementSize)((function(n){n.style.font=e,n.innerText=t})),s=a.width,u=a.height;return s+=2*o,u+=2*o,(0,r.get2dContext)(s,u,(function(r){r.font=e,r.textBaseline="top",r.lineCap="round",r.lineJoin="round";for(var i=0,a=[[.25,15],[.5,10],[.75,5]];i<a.length;i++){var c=a[i],h=c[0],l=c[1];r.strokeStyle="rgba(0, 0, 0, "+h+")",r.lineWidth=l,r.strokeText(t,o,o)}return r.fillStyle=n,r.fillText(t,o,o),r.getImageData(0,0,s,u)}))}},4418:(t,e)=>{"use strict";var n,r;Object.defineProperty(e,"__esModule",{value:!0}),e.nextAnimationFrame=e.sleep=e.time=void 0,e.time=function(t,e){var n=performance.now(),r=e();return console.log(t+": "+(performance.now()-n)),r},e.sleep=function(t){return void 0===t&&(t=0),new Promise((function(e){return setTimeout(e,t)}))},e.nextAnimationFrame=(r=[],function(){return new Promise((function(t){r.push(t),void 0===n&&(n=requestAnimationFrame((function(){n=void 0,r.forEach((function(t){return t()})),r=[]})))}))})},62:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Camera=void 0;var r=n(887),i=n(3774),o=function(){function t(t){this.pv=t;var e=this.iPv=r.mat4.invert(r.mat4.create(),t)||r.mat4.create(),n=[e[8]/e[11],e[9]/e[11],e[10]/e[11]],i=[e[12]-e[8]*e[15]/e[11],e[13]-e[9]*e[15]/e[11],e[14]-e[10]*e[15]/e[11]],o=[e[4]-e[7]*e[8]/e[11],e[5]-e[7]*e[9]/e[11],e[6]-e[7]*e[10]/e[11]],a=[e[0]-e[3]*e[8]/e[11],e[1]-e[3]*e[9]/e[11],e[2]-e[3]*e[10]/e[11]],s=r.vec3.len(o),u=r.vec3.len(a)/s,c=r.vec3.dot(n,i),h=2*s,l=-c+Math.sqrt(c*c-r.vec3.sqrLen(n)+1),f=h*l;this.eyePosition=n,this.direction=i,this.aspectRatio=u,this.fovy=h,this.arc=f,this.radius=this.arc*Math.sqrt(1+u*u)/2,this.fovCenter=[n[0]+l*i[0],n[1]+l*i[1],n[2]+l*i[2]],this.ed=c}return t.prototype.ndc2xyz=function(t,e,n){var i=this.iPv,o=1/(i[3]*t+i[7]*e+i[11]*n+i[15]),a=r.vec4.transformMat4([0,0,0,0],[o*t,o*e,o*n,o],i);return[a[0],a[1],a[2]]},t.prototype.ndc2sphereXYZ=function(t,e,n,r){void 0===n&&(n=!1),void 0===r&&(r=1);var o=this.ndc2xyz(t,e,-1),a=this.ndc2xyz(t,e,1),s=(0,i.diff)(o,a),u=(0,i.dot)(s,s),c=(0,i.dot)(s,a),h=c*c-u*((0,i.dot)(a,a)-r*r),l=(-c-Math.sqrt(n?Math.abs(h):h))/u;return[l*o[0]+(1-l)*a[0],l*o[1]+(1-l)*a[1],l*o[2]+(1-l)*a[2]]},t}();e.Camera=o},5678:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.View=void 0;var n=function(t,e,n,r){this.camera=t,this.lodBias=e,this.retina=n,this.drawingBufferHeight=r};e.View=n},3310:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cameraMatrix=e.normalizeZenith=e.izenith3=e.zenith3=e.CameraMode=e.composite=void 0;var r,i=n(887);function o(t,e,n){var r=Math.cos(t),o=Math.sin(t),a=Math.cos(n),s=Math.sin(n),u=Math.cos(e),c=Math.sin(e);return i.mat3.fromValues(r*a*c-o*s,-r*c*s-a*o,r*u,r*s+a*o*c,r*a-o*c*s,u*o,-u*a,u*s,c)}e.composite=function(t,e){for(var n=i.mat4.fromValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),r=0;r<t.length;++r)i.mat4.multiplyScalarAndAdd(n,n,e[r],t[r]);return n},function(t){t.GNOMONIC="GNOMONIC",t.STEROGRAPHIC="STEREOGRAPHIC",t.FLOATING_EYE="FLOATING_EYE"}(r=e.CameraMode||(e.CameraMode={})),e.zenith3=o,e.izenith3=function(t,e,n){var r=Math.cos(t),o=Math.sin(t),a=Math.cos(n),s=Math.sin(n),u=Math.cos(e),c=Math.sin(e);return i.mat3.fromValues(r*a*c-o*s,r*s+a*o*c,-u*a,-r*c*s-a*o,r*a-o*c*s,u*s,r*u,u*o,c)},e.normalizeZenith=function(t,e,n){return function(t){var e=Math.asin(t[8]);return[Math.atan2(t[5],t[2]),e,Math.atan2(t[7],-t[6])]}(o(t,e,n))},e.cameraMatrix=function(t){var e=i.mat4.create();return function(t,e){var n=e.fovy,o=e.aspectRatio,a=Math.cos(e.phi),s=Math.sin(e.phi),u=Math.cos(e.theta),c=Math.sin(e.theta),h=Math.sin(e.roll),l=Math.cos(e.roll);switch(e.mode){case r.GNOMONIC:return i.mat4.set(t,(a*c*h+l*s)/(o*n),(-a*l*c+s*h)/n,41*a*u/39,a*u,(-a*l+s*c*h)/(o*n),-(a*h+l*s*c)/n,41*u*s/39,u*s,-u*h/(o*n),u*l/n,41*c/39,c,0,0,-4/39,0);case r.STEROGRAPHIC:return i.mat4.set(t,2*(a*c*h+l*s)/(o*n),2*(-a*l*c+s*h)/n,13*a*u/11,a*u,2*(-a*l+s*c*h)/(o*n),-(2*a*h+2*l*s*c)/n,13*u*s/11,u*s,-2*u*h/(o*n),2*u*l/n,13*c/11,c,0,0,7/11,1);case r.FLOATING_EYE:i.mat4.set(t,(n+1)*(a*c*h+l*s)/(o*n),(n+1)*(-a*l*c+s*h)/n,41*a*u/39,a*u,(n+1)*(-a*l+s*c*h)/(o*n),-(n+1)*(a*h+l*s*c)/n,41*u*s/39,u*s,-u*h*(n+1)/(o*n),u*l*(n+1)/n,41*c/39,c,0,0,41*n/39-20/39,n)}}(e,t),function(t,e,n,r){var o=Math.cos(e),a=Math.sin(e),s=Math.cos(r),u=Math.sin(r),c=Math.cos(n),h=Math.sin(n);i.mat4.mul(t,t,i.mat4.fromValues(o*s*h-a*u,-o*h*u-s*a,o*c,0,o*u+s*a*h,o*s-a*h*u,c*a,0,-c*s,c*u,h,0,0,0,0,1))}(e,t.za,t.zd,t.zp),e}},4795:function(t,e,n){var r;
/*!
 * EventEmitter v5.2.9 - git.io/ee
 * Unlicense - http://unlicense.org/
 * Oliver Caldwell - https://oli.me.uk/
 * @preserve
 */!function(e){"use strict";function i(){}var o=i.prototype,a=e.EventEmitter;function s(t,e){for(var n=t.length;n--;)if(t[n].listener===e)return n;return-1}function u(t){return function(){return this[t].apply(this,arguments)}}function c(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!=typeof t)&&c(t.listener)}o.getListeners=function(t){var e,n,r=this._getEvents();if(t instanceof RegExp)for(n in e={},r)r.hasOwnProperty(n)&&t.test(n)&&(e[n]=r[n]);else e=r[t]||(r[t]=[]);return e},o.flattenListeners=function(t){var e,n=[];for(e=0;e<t.length;e+=1)n.push(t[e].listener);return n},o.getListenersAsObject=function(t){var e,n=this.getListeners(t);return n instanceof Array&&((e={})[t]=n),e||n},o.addListener=function(t,e){if(!c(e))throw new TypeError("listener must be a function");var n,r=this.getListenersAsObject(t),i="object"==typeof e;for(n in r)r.hasOwnProperty(n)&&-1===s(r[n],e)&&r[n].push(i?e:{listener:e,once:!1});return this},o.on=u("addListener"),o.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},o.once=u("addOnceListener"),o.defineEvent=function(t){return this.getListeners(t),this},o.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},o.removeListener=function(t,e){var n,r,i=this.getListenersAsObject(t);for(r in i)i.hasOwnProperty(r)&&-1!==(n=s(i[r],e))&&i[r].splice(n,1);return this},o.off=u("removeListener"),o.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},o.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},o.manipulateListeners=function(t,e,n){var r,i,o=t?this.removeListener:this.addListener,a=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(r=n.length;r--;)o.call(this,e,n[r]);else for(r in e)e.hasOwnProperty(r)&&(i=e[r])&&("function"==typeof i?o.call(this,r,i):a.call(this,r,i));return this},o.removeEvent=function(t){var e,n=typeof t,r=this._getEvents();if("string"===n)delete r[t];else if(t instanceof RegExp)for(e in r)r.hasOwnProperty(e)&&t.test(e)&&delete r[e];else delete this._events;return this},o.removeAllListeners=u("removeEvent"),o.emitEvent=function(t,e){var n,r,i,o,a=this.getListenersAsObject(t);for(o in a)if(a.hasOwnProperty(o))for(n=a[o].slice(0),i=0;i<n.length;i++)!0===(r=n[i]).once&&this.removeListener(t,r.listener),r.listener.apply(this,e||[])===this._getOnceReturnValue()&&this.removeListener(t,r.listener);return this},o.trigger=u("emitEvent"),o.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},o.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},o._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},o._getEvents=function(){return this._events||(this._events={})},i.noConflict=function(){return e.EventEmitter=a,i},void 0===(r=function(){return i}.call(e,n,e,t))||(t.exports=r)}("undefined"!=typeof window?window:this||{})},6637:(t,e,n)=>{t.exports=function(){return new Worker(n.p+"232996ee3089d4c69449.worker.js")}},5693:(t,e,n)=>{t.exports=function(){return new Worker(n.p+"9a8d23ead1b825ef7348.worker.js")}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");r.length&&(t=r[r.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t})(),n(2880);var r=n(3607),i=exports;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
//# sourceMappingURL=/sm/2d8283578165af56e86e313037b8081aa6ae9fd243929b472ad5f72fae534b4b.map