@cennavi-fe/minemap
Version:
基于webgl的三维渲染球体地图引擎,支持矢量mvt数据的渲染,支持三维渲染、交互、空间分析以及二三维的标绘
9 lines • 4.08 MB
JavaScript
/**
* minemap-3d-engine
* version: v4.6.12
* submission time: 2024-03-08 15:42:58 +0800
* build time: 2024-03-08 15:46:41
* branch: master
* SHA: 5d4e7bb72e17f5cb04ca76ae028aaf7dba3adba4
*/
const workerUrl = "!function(){\"use strict\";var e=function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")};function t(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var n=function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e},i=function(e){if(Array.isArray(e))return e},r=function(e){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)},a=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i},o=function(e,t){if(e){if(\"string\"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===n&&e.constructor&&(n=e.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(e):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}},s=function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")},l=function(e){return i(e)||r(e)||o(e)||s()},u=function(e,t){return i(e)||function(e,t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],i=!0,r=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(e){r=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}}(e,t)||o(e,t)||s()};function c(e){var t={exports:{}};return e(t,t.exports),t.exports}var h=c((function(e){function t(n){return e.exports=t=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},t(n)}e.exports=t})),f=d;function d(e,t,n,i){this.cx=3*e,this.bx=3*(n-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(i-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=i,this.p2x=n,this.p2y=i}d.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},d.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},d.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},d.prototype.solveCurveX=function(e,t){var n,i,r,a,o;for(void 0===t&&(t=1e-6),r=e,o=0;o<8;o++){if(a=this.sampleCurveX(r)-e,Math.abs(a)<t)return r;var s=this.sampleCurveDerivativeX(r);if(Math.abs(s)<1e-6)break;r-=a/s}if((r=e)<(n=0))return n;if(r>(i=1))return i;for(;n<i;){if(a=this.sampleCurveX(r),Math.abs(a-e)<t)return r;e>a?n=r:i=r,r=.5*(i-n)+n}return r},d.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var p=\"undefined\"!=typeof self?self:{},m=function(){function t(n,i,r){e(this,t),this.column=n,this.row=i,this.zoom=r}return n(t,[{key:\"clone\",value:function(){return new t(this.column,this.row,this.zoom)}},{key:\"zoomTo\",value:function(e){return this.clone()._zoomTo(e)}},{key:\"sub\",value:function(e){return this.clone()._sub(e)}},{key:\"_zoomTo\",value:function(e){var t=Math.pow(2,e-this.zoom);return this.column*=t,this.row*=t,this.zoom=e,this}},{key:\"_sub\",value:function(e){return e=e.zoomTo(this.zoom),this.column-=e.column,this.row-=e.row,this}}]),t}(),v=y;function y(e,t,n){this.x=e,this.y=t,this.z=n||0}function _(e,t,n){void 0===n&&(n={});var i={type:\"Feature\"};return(0===n.id||n.id)&&(i.id=n.id),n.bbox&&(i.bbox=n.bbox),i.properties=t||{},i.geometry=e,i}function g(e,t,n){if(void 0===n&&(n={}),!e)throw new Error(\"coordinates is required\");if(!Array.isArray(e))throw new Error(\"coordinates must be an Array\");if(e.length<2)throw new Error(\"coordinates must be at least 2 numbers long\");if(!b(e[0])||!b(e[1]))throw new Error(\"coordinates must contain numbers\");return _({type:\"Point\",coordinates:e},t,n)}function x(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error(\"coordinates must be an array of two or more positions\");return _({type:\"LineString\",coordinates:e},t,n)}function w(e,t){void 0===t&&(t={});var n={type:\"FeatureCollection\"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function b(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function T(e){if(Array.isArray(e))return e;if(\"Feature\"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\")}function S(e,t){if(\"Feature\"===e.type)t(e,0);else if(\"FeatureCollection\"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}y.prototype={clone:function(){return new y(this.x,this.y,this.z)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=t,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),n=Math.sin(e),i=n*this.x+t*this.y;return this.x=t*this.x-n*this.y,this.y=i,this},_rotateAround:function(e,t){var n=Math.cos(e),i=Math.sin(e),r=t.y+i*(this.x-t.x)+n*(this.y-t.y);return this.x=t.x+n*(this.x-t.x)-i*(this.y-t.y),this.y=r,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},y.convert=function(e){return e instanceof y?e:Array.isArray(e)?new y(e[0],e[1],e[2]):e};var A=function(e,t){if(!e)throw new Error(\"No coordinates passed\");return{type:\"Feature\",geometry:{type:\"LineString\",coordinates:e},properties:t||{}}},P=function(e,t){if(null===e)throw new Error(\"No coordinates passed\");for(var n=0;n<e.length;n++)for(var i=e[n],r=0;r<i[i.length-1].length;r++){if(i.length<4)throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");if(i[i.length-1][r]!==i[0][r])throw new Error(\"First and last Position are not equivalent.\")}var a={type:\"Feature\",geometry:{type:\"Polygon\",coordinates:e},properties:t};return a.properties||(a.properties={}),a},E=Math.pow(2,53)-1;function M(e,t,n,i){var r=new f(e,t,n,i);return function(e){return r.solve(e)}}function C(e,t,n){return Math.min(n,Math.max(t,e))}function I(e,t,n){var i=n-t,r=((e-t)%i+i)%i+t;return r===t?n:r}function L(e){var t=[];for(var n in e)t.push(e[n]);return t}function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];for(var r=0,a=n;r<a.length;r++){var o=a[r];for(var s in o)e[s]=o[s]}return e}M(.25,.1,.25,1),M(0,.7,1,.3),M(0,0,1,1),M(.42,0,1,1),M(0,0,.58,1),M(.42,0,.58,1);var k=1;function O(e,t){return-1!==e.indexOf(t,e.length-t.length)}function N(e,t,n){var i={};for(var r in e)i[r]=t.call(n||this,e[r],r,e);return i}function D(e){return Array.isArray(e)?e.map(D):\"object\"===h(e)&&e?N(e,D):e}var F={};function z(e){F[e]||(\"undefined\"!=typeof console&&console.warn(e),F[e]=!0)}function B(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}function V(e){for(var t,n,i=0,r=0,a=e.length,o=a-1;r<a;o=r++)i+=((n=e[o]).x-(t=e[r]).x)*(t.y+n.y);return i}function U(){return\"undefined\"!=typeof WorkerGlobalScope&&\"undefined\"!=typeof self&&self instanceof WorkerGlobalScope}function G(e){return\"boolean\"==typeof e}var H=j;function j(e,t,n){var i=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var r=new Int32Array(this.arrayBuffer);e=r[0],this.d=(t=r[1])+2*(n=r[2]);for(var a=0;a<this.d*this.d;a++){var o=r[3+a],s=r[3+a+1];i.push(o===s?null:r.subarray(o,s))}var l=r[3+i.length+1];this.keys=r.subarray(r[3+i.length],l),this.bboxes=r.subarray(l),this.insert=this._insertReadonly}else{this.d=t+2*n;for(var u=0;u<this.d*this.d;u++)i.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=n,this.scale=t/e,this.uid=0;var c=n/t*e;this.min=-c,this.max=e+c}j.prototype.insert=function(e,t,n,i,r){this._forEachCell(t,n,i,r,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(n),this.bboxes.push(i),this.bboxes.push(r)},j.prototype._insertReadonly=function(){throw\"Cannot insert into a GridIndex created from an ArrayBuffer.\"},j.prototype._insertCell=function(e,t,n,i,r,a){this.cells[r].push(a)},j.prototype.query=function(e,t,n,i,r){var a=this.min,o=this.max;if(e<=a&&t<=a&&o<=n&&o<=i&&!r)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(e,t,n,i,this._queryCell,s,{},r),s},j.prototype._queryCell=function(e,t,n,i,r,a,o,s){var l=this.cells[r];if(null!==l)for(var u=this.keys,c=this.bboxes,h=0;h<l.length;h++){var f=l[h];if(void 0===o[f]){var d=4*f;(s?s(c[d+0],c[d+1],c[d+2],c[d+3]):e<=c[d+2]&&t<=c[d+3]&&n>=c[d+0]&&i>=c[d+1])?(o[f]=!0,a.push(u[f])):o[f]=!1}}},j.prototype._forEachCell=function(e,t,n,i,r,a,o,s){for(var l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(n),h=this._convertToCellCoord(i),f=l;f<=c;f++)for(var d=u;d<=h;d++){var p=this.d*d+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(d),this._convertFromCellCoord(f+1),this._convertFromCellCoord(d+1)))&&r.call(this,e,t,n,i,p,a,o,s))return}},j.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},j.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},j.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=3+this.cells.length+1+1,n=0,i=0;i<this.cells.length;i++)n+=this.cells[i].length;var r=new Int32Array(t+n+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;for(var a=t,o=0;o<e.length;o++){var s=e[o];r[3+o]=a,r.set(s,a),a+=s.length}return r[3+e.length]=a,r.set(this.keys,a),r[3+e.length+1]=a+=this.keys.length,r.set(this.bboxes,a),a+=this.bboxes.length,r.buffer};var Y=c((function(e){function t(n,i){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,i)}e.exports=t})),q=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}},X=c((function(e){function t(n,i,r){return e.exports=t=q()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&Y(r,n.prototype),r},t.apply(null,arguments)}e.exports=t})),W=function(e){return function(e){if(Array.isArray(e))return a(e)}(e)||r(e)||o(e)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()};const Z={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Q(e){return(e=Math.round(e))<0?0:e>255?255:e}function K(e){return e<0?0:e>1?1:e}function J(e){return Q(\"%\"===e[e.length-1]?Number(e.slice(0,-1))/100*255:Number(e))}function $(e){return\"%\"!==e[e.length-1]?null:K(Number(e.slice(0,-1))/100)}function ee(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function te(e){return e<48?NaN:e<=57?e-48:e<97?NaN:e<=102?e-87:NaN}const ne=new Set([\" \",\"\\t\",\"\\n\",\"\\r\",\",\",\"/\"]);function ie(e){const t=e.trim().toLowerCase();if(t in Z)return Z[t].slice();if(\"#\"===t[0]){const e=4===t.length||5===t.length,n=7===t.length||9===t.length;if(!e&&!n)return null;const i=e?1:2,r=[0,0,0,255],a=5===t.length||9===t.length?4:3;for(let n=0;n<a;n++){const a=te(t.charCodeAt(n*i+1));if(r[n]=16*a+(e?a:te(t.charCodeAt(n*i+2))),Number.isNaN(r[n]))return null}return r[3]/=255,r}const n=t.indexOf(\"(\");let i=t.indexOf(\")\");if(-1===i&&(i=t.length),-1!==n&&(i+1===t.length||i===t.length)){const e=t.substr(0,n),r=[];let a=\"\";for(let e=n+1;e<i;e++)ne.has(t[e])?0!==a.length&&(r.push(a),a=\"\"):a+=t[e];0!==a.length&&r.push(a);const o=4===r.length?function(e){return $(e)??K(Number(e))}(r.pop()):1;if(3!==r.length)return null;let s,l,u,c,h,f;switch(e){case\"rgba\":case\"rgb\":return f=[...r.map(J),o],f.some(Number.isNaN)?null:f;case\"hsla\":case\"hsl\":return s=(function(e){return e.endsWith(\"deg\")?Number(e.slice(0,-3)):e.endsWith(\"grad\")?360*Number(e.slice(0,-4))/400:e.endsWith(\"rad\")?360*Number(e.slice(0,-3))/(2*Math.PI):e.endsWith(\"turn\")?360*Number(e.slice(0,-4)):Number(e)}(r[0])%360+360)%360/360,Number.isNaN(s)?null:(l=$(r[1]),Number.isNaN(l)||null===l?null:(u=$(r[2]),Number.isNaN(u)||null===u?null:(h=u<=.5?u*(l+1):u+l-u*l,c=2*u-h,[Q(255*ee(c,h,s+1/3)),Q(255*ee(c,h,s)),Q(255*ee(c,h,s-1/3)),o])));default:return null}}return null}function re(e,t){return null!=e?e:t}function ae(e){return null!=e}re.EMPTY_OBJECT=Object.freeze({});var oe=function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Y(e,t)},se=function(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e},le=function(e,t){return!t||\"object\"!==h(t)&&\"function\"!=typeof t?se(e):t},ue=c((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t})),ce=c((function(e){function t(n){var i=\"function\"==typeof Map?new Map:void 0;return e.exports=t=function(e){if(null===e||-1===Function.toString.call(e).indexOf(\"[native code]\"))return e;if(\"function\"!=typeof e)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==i){if(i.has(e))return i.get(e);i.set(e,t)}function t(){return X(e,arguments,ue(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Y(t,e)},t(n)}e.exports=t})),he=1/Math.PI*180,fe=1/180*Math.PI,de=1e-12;function pe(e,t,n){if(me(e)){n=n||((r=e).clone?r.clone():X(Array,W(r)));for(var i=0;i<n.length&&i<e.length;++i)n[i]=t(e[i],i,n);return n}var r;return t(e)}function me(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ve(e){return pe(e,(function(e){return e*fe}))}function ye(e){return pe(e,(function(e){return e*he}))}function _e(e,t,n){return pe(e,(function(e){return Math.max(t,Math.min(n,e))}))}function ge(e,t){if(e===t)return!0;if(me(e)&&me(t)){if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!ge(e[n],t[n]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):!(!Number.isFinite(e)||!Number.isFinite(t))&&Math.abs(e-t)<=de*Math.max(1,Math.abs(e),Math.abs(t))}var xe=function(t){oe(o,t);var i,r,a=(i=o,r=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ue(i);if(r){var n=ue(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return le(this,e)});function o(){return e(this,o),a.apply(this,arguments)}return n(o,[{key:\"ELEMENTS\",get:function(){return this.length}},{key:\"elements\",get:function(){return this}},{key:\"clone\",value:function(){return(new this.constructor).copy(this)}},{key:\"from\",value:function(e){return me(e)?this.copy(e):this.fromObject(e)}},{key:\"fromArray\",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}},{key:\"to\",value:function(e){return e===this?this:me(e)?this.toArray(e):this.toObject(e)}},{key:\"toTarget\",value:function(e){return e?this.to(e):this}},{key:\"toArray\",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)e[t+n]=this[n];return e}},{key:\"toObject\",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=0;t<this.ELEMENTS;++t)e[t]=this[t];return e}},{key:\"toFloat32Array\",value:function(){return new Float32Array(this.toArray())}},{key:\"toString\",value:function(){return this._formatString()}},{key:\"_formatString\",value:function(){for(var e=\"\",t=0;t<this.ELEMENTS;++t)e+=(t>0?\", \":\"\")+(n=function(e){return Math.round(e/de)*de}(n=this[t]),\"\".concat(parseFloat(n.toPrecision(4))));var n;return\"[\".concat(e,\"]\")}},{key:\"equals\",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(!ge(this[t],e[t]))return!1;return!0}},{key:\"negate\",value:function(){for(var e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}},{key:\"add\",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,r=t;i<r.length;i++)for(var a=r[i],o=0;o<this.ELEMENTS;++o)this[o]+=a[o];return this.check()}},{key:\"subtract\",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,r=t;i<r.length;i++)for(var a=r[i],o=0;o<this.ELEMENTS;++o)this[o]-=a[o];return this.check()}},{key:\"sub\",value:function(e){return this.subtract(e)}},{key:\"setScalar\",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}},{key:\"addScalar\",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}},{key:\"subScalar\",value:function(e){return this.addScalar(-e)}},{key:\"multiplyScalar\",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:\"divideScalar\",value:function(e){return this.multiplyScalar(1/e)}},{key:\"clampScalar\",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}},{key:\"multiplyByScalar\",value:function(e){return this.multiplyScalar(e)}},{key:\"divideByScalar\",value:function(e){return this.divideScalar(e)}},{key:\"check\",value:function(){return this}},{key:\"validate\",value:function(){for(var e=this.length===this.ELEMENTS,t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}}]),o}(ce(Array)),we={};function be(e,t){if(e.length!==t)return!1;for(var n=0;n<e.length;++n)if(!Number.isFinite(e[n]))return!1;return!0}function Te(e){if(!Number.isFinite(e))throw new Error(\"Invalid number \".concat(e));return e}function Se(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:\"\";if(!be(e,t))throw new Error(\"math.gl: \".concat(n,\" some fields set to invalid numbers'\"));return e}function Ae(e,t){we[e]||(we[e]=!0,console.warn(\"\".concat(e,\" has been removed in version \").concat(t,\", see upgrade guide for more information\")))}var Pe=function(t){oe(o,t);var i,r,a=(i=o,r=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ue(i);if(r){var n=ue(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return le(this,e)});function o(){return e(this,o),a.apply(this,arguments)}return n(o,[{key:\"copy\",value:function(e){for(var t=0;t<this.ELEMENTS;t++)this[t]=e[t];return this}},{key:\"len\",value:function(){return Math.sqrt(this.lengthSquared())}},{key:\"magnitude\",value:function(){return this.len()}},{key:\"lengthSquared\",value:function(){for(var e=0,t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}},{key:\"magnitudeSquared\",value:function(){return this.lengthSquared()}},{key:\"distance\",value:function(e){return Math.sqrt(this.distanceSquared(e))}},{key:\"distanceSquared\",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n){var i=this[n]-e[n];t+=i*i}return Te(t)}},{key:\"dot\",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n)t+=this[n]*e[n];return Te(t)}},{key:\"normalize\",value:function(){var e=this.magnitude();if(0!==e)for(var t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}},{key:\"multiply\",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,r=t;i<r.length;i++)for(var a=r[i],o=0;o<this.ELEMENTS;++o)this[o]*=a[o];return this.check()}},{key:\"divide\",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,r=t;i<r.length;i++)for(var a=r[i],o=0;o<this.ELEMENTS;++o)this[o]/=a[o];return this.check()}},{key:\"lengthSq\",value:function(){return this.lengthSquared()}},{key:\"distanceTo\",value:function(e){return this.distance(e)}},{key:\"distanceToSquared\",value:function(e){return this.distanceSquared(e)}},{key:\"getComponent\",value:function(e){return Te(this[e])}},{key:\"setComponent\",value:function(e,t){return this[e]=t,this.check()}},{key:\"addVectors\",value:function(e,t){return this.copy(e).add(t)}},{key:\"subVectors\",value:function(e,t){return this.copy(e).subtract(t)}},{key:\"multiplyVectors\",value:function(e,t){return this.copy(e).multiply(t)}},{key:\"addScaledVector\",value:function(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}},{key:\"scale\",value:function(e){if(me(e))for(var t=0;t<this.ELEMENTS;++t)this[t]*=e[t];else this.multiplyScalar(e);return this}},{key:\"lerp\",value:function(e,t,n){void 0===n&&\"number\"==typeof t&&(n=t,t=e,e=this);for(var i=0;i<this.ELEMENTS;++i){var r=e[i];this[i]=r+n*(t[i]-r)}return this.check()}},{key:\"min\",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}},{key:\"max\",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}},{key:\"clamp\",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}}]),o}(xe),Ee=1e-6,Me=\"undefined\"!=typeof Float32Array?Float32Array:Array;function Ce(e,t){if(e===t){var n=t[1];e[1]=t[2],e[2]=n}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e}function Ie(e,t,n){var i=t[0],r=t[1],a=t[2],o=t[3],s=n[0],l=n[1],u=n[2],c=n[3];return e[0]=i*s+a*l,e[1]=r*s+o*l,e[2]=i*u+a*c,e[3]=r*u+o*c,e}function Le(e,t,n){var i=t[0],r=t[1],a=t[2],o=t[3],s=Math.sin(n),l=Math.cos(n);return e[0]=i*l+a*s,e[1]=r*l+o*s,e[2]=i*-s+a*l,e[3]=r*-s+o*l,e}function Re(e,t,n){var i=t[1],r=t[2],a=t[3],o=n[0],s=n[1];return e[0]=t[0]*o,e[1]=i*o,e[2]=r*s,e[3]=a*s,e}function ke(e,t){if(e===t){var n=t[1],i=t[2],r=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=i,e[7]=r}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function Oe(e,t){var n=t[0],i=t[1],r=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=c*o-s*u,f=-c*a+s*l,d=u*a-o*l,p=n*h+i*f+r*d;return p?(e[0]=h*(p=1/p),e[1]=(-c*i+r*u)*p,e[2]=(s*i-r*o)*p,e[3]=f*p,e[4]=(c*n-r*l)*p,e[5]=(-s*n+r*a)*p,e[6]=d*p,e[7]=(-u*n+i*l)*p,e[8]=(o*n-i*a)*p,e):null}function Ne(e,t,n){var i=t[0],r=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],f=n[0],d=n[1],p=n[2],m=n[3],v=n[4],y=n[5],_=n[6],g=n[7],x=n[8];return e[0]=f*i+d*o+p*u,e[1]=f*r+d*s+p*c,e[2]=f*a+d*l+p*h,e[3]=m*i+v*o+y*u,e[4]=m*r+v*s+y*c,e[5]=m*a+v*l+y*h,e[6]=_*i+g*o+x*u,e[7]=_*r+g*s+x*c,e[8]=_*a+g*l+x*h,e}function De(e,t,n){var i=t[0],r=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],f=n[0],d=n[1];return e[0]=i,e[1]=r,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=f*i+d*o+u,e[7]=f*r+d*s+c,e[8]=f*a+d*l+h,e}function Fe(e,t,n){var i=t[0],r=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],f=Math.sin(n),d=Math.cos(n);return e[0]=d*i+f*o,e[1]=d*r+f*s,e[2]=d*a+f*l,e[3]=d*o-f*i,e[4]=d*s-f*r,e[5]=d*l-f*a,e[6]=u,e[7]=c,e[8]=h,e}function ze(e,t,n){var i=n[0],r=n[1];return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=r*t[3],e[4]=r*t[4],e[5]=r*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Be(e,t){var n=t[0],i=t[1],r=t[2],a=t[3],o=n+n,s=i+i,l=r+r,u=n*o,c=i*o,h=i*s,f=r*o,d=r*s,p=r*l,m=a*o,v=a*s,y=a*l;return e[0]=1-h-p,e[3]=c-y,e[6]=f+v,e[1]=c+y,e[4]=1-u-p,e[7]=d-m,e[2]=f-v,e[5]=d+m,e[8]=1-u-h,e}function Ve(e,t){if(e===t){var n=t[1],i=t[2],r=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=i,e[9]=a,e[11]=t[14],e[12]=r,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function Ue(e,t){var n=t[0],i=t[1],r=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],f=t[10],d=t[11],p=t[12],m=t[13],v=t[14],y=t[15],_=n*s-i*o,g=n*l-r*o,x=n*u-a*o,w=i*l-r*s,b=i*u-a*s,T=r*u-a*l,S=c*m-h*p,A=c*v-f*p,P=c*y-d*p,E=h*v-f*m,M=h*y-d*m,C=f*y-d*v,I=_*C-g*M+x*E+w*P-b*A+T*S;return I?(e[0]=(s*C-l*M+u*E)*(I=1/I),e[1]=(r*M-i*C-a*E)*I,e[2]=(m*T-v*b+y*w)*I,e[3]=(f*b-h*T-d*w)*I,e[4]=(l*P-o*C-u*A)*I,e[5]=(n*C-r*P+a*A)*I,e[6]=(v*x-p*T-y*g)*I,e[7]=(c*T-f*x+d*g)*I,e[8]=(o*M-s*P+u*S)*I,e[9]=(i*P-n*M-a*S)*I,e[10]=(p*b-m*x+y*_)*I,e[11]=(h*x-c*b-d*_)*I,e[12]=(s*A-o*E-l*S)*I,e[13]=(n*E-i*A+r*S)*I,e[14]=(m*g-p*w-v*_)*I,e[15]=(c*w-h*g+f*_)*I,e):null}function Ge(e,t,n){var i=t[0],r=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],f=t[9],d=t[10],p=t[11],m=t[12],v=t[13],y=t[14],_=t[15],g=n[0],x=n[1],w=n[2],b=n[3];return e[0]=g*i+x*s+w*h+b*m,e[1]=g*r+x*l+w*f+b*v,e[2]=g*a+x*u+w*d+b*y,e[3]=g*o+x*c+w*p+b*_,e[4]=(g=n[4])*i+(x=n[5])*s+(w=n[6])*h+(b=n[7])*m,e[5]=g*r+x*l+w*f+b*v,e[6]=g*a+x*u+w*d+b*y,e[7]=g*o+x*c+w*p+b*_,e[8]=(g=n[8])*i+(x=n[9])*s+(w=n[10])*h+(b=n[11])*m,e[9]=g*r+x*l+w*f+b*v,e[10]=g*a+x*u+w*d+b*y,e[11]=g*o+x*c+w*p+b*_,e[12]=(g=n[12])*i+(x=n[13])*s+(w=n[14])*h+(b=n[15])*m,e[13]=g*r+x*l+w*f+b*v,e[14]=g*a+x*u+w*d+b*y,e[15]=g*o+x*c+w*p+b*_,e}function He(e,t,n){var i,r,a,o,s,l,u,c,h,f,d,p,m=n[0],v=n[1],y=n[2];return t===e?(e[12]=t[0]*m+t[4]*v+t[8]*y+t[12],e[13]=t[1]*m+t[5]*v+t[9]*y+t[13],e[14]=t[2]*m+t[6]*v+t[10]*y+t[14],e[15]=t[3]*m+t[7]*v+t[11]*y+t[15]):(r=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],f=t[9],d=t[10],p=t[11],e[0]=i=t[0],e[1]=r,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=h,e[9]=f,e[10]=d,e[11]=p,e[12]=i*m+s*v+h*y+t[12],e[13]=r*m+l*v+f*y+t[13],e[14]=a*m+u*v+d*y+t[14],e[15]=o*m+c*v+p*y+t[15]),e}function je(e,t,n){var i=n[0],r=n[1],a=n[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Ye(e,t,n,i){var r,a,o,s,l,u,c,h,f,d,p,m,v,y,_,g,x,w,b,T,S,A,P,E,M=i[0],C=i[1],I=i[2],L=Math.hypot(M,C,I);return L<Ee?null:(M*=L=1/L,C*=L,I*=L,r=Math.sin(n),a=Math.cos(n),l=t[1],u=t[2],c=t[3],f=t[5],d=t[6],p=t[7],v=t[9],y=t[10],_=t[11],b=M*C*(o=1-a)-I*r,T=C*C*o+a,S=I*C*o+M*r,A=M*I*o+C*r,P=C*I*o-M*r,E=I*I*o+a,e[0]=(s=t[0])*(g=M*M*o+a)+(h=t[4])*(x=C*M*o+I*r)+(m=t[8])*(w=I*M*o-C*r),e[1]=l*g+f*x+v*w,e[2]=u*g+d*x+y*w,e[3]=c*g+p*x+_*w,e[4]=s*b+h*T+m*S,e[5]=l*b+f*T+v*S,e[6]=u*b+d*T+y*S,e[7]=c*b+p*T+_*S,e[8]=s*A+h*P+m*E,e[9]=l*A+f*P+v*E,e[10]=u*A+d*P+y*E,e[11]=c*A+p*P+_*E,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function qe(e,t,n){var i=Math.sin(n),r=Math.cos(n),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*r+u*i,e[5]=o*r+c*i,e[6]=s*r+h*i,e[7]=l*r+f*i,e[8]=u*r-a*i,e[9]=c*r-o*i,e[10]=h*r-s*i,e[11]=f*r-l*i,e}function Xe(e,t,n){var i=Math.sin(n),r=Math.cos(n),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],h=t[10],f=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*r-u*i,e[1]=o*r-c*i,e[2]=s*r-h*i,e[3]=l*r-f*i,e[8]=a*i+u*r,e[9]=o*i+c*r,e[10]=s*i+h*r,e[11]=l*i+f*r,e}function We(e,t,n){var i=Math.sin(n),r=Math.cos(n),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],h=t[6],f=t[7];return t!==e&&(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[0]=a*r+u*i,e[1]=o*r+c*i,e[2]=s*r+h*i,e[3]=l*r+f*i,e[4]=u*r-a*i,e[5]=c*r-o*i,e[6]=h*r-s*i,e[7]=f*r-l*i,e}function Ze(e,t,n,i){var r,a,o,s,l,u,c,h,f,d,p=t[0],m=t[1],v=t[2],y=i[0],_=i[1],g=i[2],x=n[0],w=n[1],b=n[2];return Math.abs(p-x)<Ee&&Math.abs(m-w)<Ee&&Math.abs(v-b)<Ee?function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}(e):(c=p-x,h=m-w,f=v-b,r=_*(f*=d=1/Math.hypot(c,h,f))-g*(h*=d),a=g*(c*=d)-y*f,o=y*h-_*c,(d=Math.hypot(r,a,o))?(r*=d=1/d,a*=d,o*=d):(r=0,a=0,o=0),s=h*o-f*a,l=f*r-c*o,u=c*a-h*r,(d=Math.hypot(s,l,u))?(s*=d=1/d,l*=d,u*=d):(s=0,l=0,u=0),e[0]=r,e[1]=s,e[2]=c,e[3]=0,e[4]=a,e[5]=l,e[6]=h,e[7]=0,e[8]=o,e[9]=u,e[10]=f,e[11]=0,e[12]=-(r*p+a*m+o*v),e[13]=-(s*p+l*m+u*v),e[14]=-(c*p+h*m+f*v),e[15]=1,e)}function Qe(){var e=new Me(3);return Me!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function Ke(e){return Math.hypot(e[0],e[1],e[2])}function Je(e,t,n){var i=new Me(3);return i[0]=e,i[1]=t,i[2]=n,i}function $e(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function et(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function tt(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function nt(e,t){var n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return n*n+i*i+r*r}function it(e,t){var n=t[0],i=t[1],r=t[2],a=n*n+i*i+r*r;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}function rt(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function at(e,t,n){var i=t[0],r=t[1],a=t[2],o=n[0],s=n[1],l=n[2];return e[0]=r*l-a*s,e[1]=a*o-i*l,e[2]=i*s-r*o,e}function ot(e,t,n){var i=t[0],r=t[1],a=t[2],o=n[3]*i+n[7]*r+n[11]*a+n[15];return e[0]=(n[0]*i+n[4]*r+n[8]*a+n[12])/(o=o||1),e[1]=(n[1]*i+n[5]*r+n[9]*a+n[13])/o,e[2]=(n[2]*i+n[6]*r+n[10]*a+n[14])/o,e}function st(e,t,n){var i=t[0],r=t[1],a=t[2];return e[0]=i*n[0]+r*n[3]+a*n[6],e[1]=i*n[1]+r*n[4]+a*n[7],e[2]=i*n[2]+r*n[5]+a*n[8],e}function lt(e,t,n){var i=n[0],r=n[1],a=n[2],o=t[0],s=t[1],l=t[2],u=r*l-a*s,c=a*o-i*l,h=i*s-r*o,f=r*h-a*c,d=a*u-i*h,p=i*c-r*u,m=2*n[3];return c*=m,h*=m,d*=2,p*=2,e[0]=o+(u*=m)+(f*=2),e[1]=s+c+d,e[2]=l+h+p,e}function ut(e,t){var n=e[0],i=e[1],r=e[2],a=t[0],o=t[1],s=t[2],l=Math.sqrt(n*n+i*i+r*r)*Math.sqrt(a*a+o*o+s*s),u=l&&rt(e,t)/l;return Math.acos(Math.min(Math.max(u,-1),1))}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var ct=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e},ht=Ke;function ft(e,t,n){var i=t[0],r=t[1],a=t[2],o=t[3];return e[0]=n[0]*i+n[4]*r+n[8]*a+n[12]*o,e[1]=n[1]*i+n[5]*r+n[9]*a+n[13]*o,e[2]=n[2]*i+n[6]*r+n[10]*a+n[14]*o,e[3]=n[3]*i+n[7]*r+n[11]*a+n[15]*o,e}function dt(e,t,n){var i=t[0],r=t[1],a=t[2],o=n[0],s=n[1],l=n[2],u=n[3],c=u*i+s*a-l*r,h=u*r+l*i-o*a,f=u*a+o*r-s*i,d=-o*i-s*r-l*a;return e[0]=c*u+d*-o+h*-l-f*-s,e[1]=h*u+d*-s+f*-o-c*-l,e[2]=f*u+d*-l+c*-s-h*-o,e[3]=t[3],e}function pt(){var e=new Me(4);return Me!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function mt(e,t,n){n*=.5;var i=Math.sin(n);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(n),e}function vt(e,t){var n=2*Math.acos(t[3]),i=Math.sin(n/2);return i>Ee?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),n}function yt(e,t,n){var i=t[0],r=t[1],a=t[2],o=t[3],s=n[0],l=n[1],u=n[2],c=n[3];return e[0]=i*c+o*s+r*u-a*l,e[1]=r*c+o*l+a*s-i*u,e[2]=a*c+o*u+i*l-r*s,e[3]=o*c-i*s-r*l-a*u,e}Qe(),function(){var e;e=new Me(4),Me!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0)}();var _t,gt,xt,wt,bt=(_t=Qe(),gt=Je(1,0,0),xt=Je(0,1,0),function(e,t,n){var i=rt(t,n);return i<-.999999?(at(_t,gt,t),ht(_t)<1e-6&&at(_t,xt,t),it(_t,_t),mt(e,_t,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(at(_t,t,n),e[0]=_t[0],e[1]=_t[1],e[2]=_t[2],e[3]=1+i,function(e,t){var n=t[0],i=t[1],r=t[2],a=t[3],o=n*n+i*i+r*r+a*a;return o>0&&(o=1/Math.sqrt(o)),e[0]=n*o,e[1]=i*o,e[2]=r*o,e[3]=a*o,e}(e,e))});function Tt(e,t,n){var i=t[0],r=t[1];return e[0]=n[0]*i+n[2]*r,e[1]=n[1]*i+n[3]*r,e}function St(e,t,n){var i=t[0],r=t[1];return e[0]=n[0]*i+n[3]*r+n[6],e[1]=n[1]*i+n[4]*r+n[7],e}function At(e,t,n){var i=t[0],r=t[1];return e[0]=n[0]*i+n[4]*r+n[12],e[1]=n[1]*i+n[5]*r+n[13],e}function Pt(e,t,n){var i=t[0],r=t[1],a=n[3]*i+n[7]*r||1;return e[0]=(n[0]*i+n[4]*r)/a,e[1]=(n[1]*i+n[5]*r)/a,e}function Et(e,t,n){var i=t[0],r=t[1],a=t[2],o=n[3]*i+n[7]*r+n[11]*a||1;return e[0]=(n[0]*i+n[4]*r+n[8]*a)/o,e[1]=(n[1]*i+n[5]*r+n[9]*a)/o,e[2]=(n[2]*i+n[6]*r+n[10]*a)/o,e}function Mt(e,t,n){var i=t[0],r=t[1];return e[0]=n[0]*i+n[2]*r,e[1]=n[1]*i+n[3]*r,e[2]=t[2],e}function Ct(e,t,n){var i=t[0],r=t[1];return e[0]=n[0]*i+n[2]*r,e[1]=n[1]*i+n[3]*r,e[2]=t[2],e[3]=t[3],e}function It(e,t,n){var i=t[0],r=t[1],a=t[2];return e[0]=n[0]*i+n[3]*r+n[6]*a,e[1]=n[1]*i+n[4]*r+n[7]*a,e[2]=n[2]*i+n[5]*r+n[8]*a,e[3]=t[3],e}pt(),pt(),wt=new Me(9),Me!=Float32Array&&(wt[1]=0,wt[2]=0,wt[3]=0,wt[5]=0,wt[6]=0,wt[7]=0),wt[0]=1,wt[4]=1,wt[8]=1,function(){var e=new Me(2);Me!=Float32Array&&(e[0]=0,e[1]=0)}();var Lt=6378137,Rt=3.141592653589793,kt={DEFAULT_SPHERE_TRIANGLES:[],SCROLL_ZOOM_SPHERE_CONTROL:4,TILE_GRIDSAMPLES_SPLIT:{SMALL:4,MIDDLE:6,LARGE:9,LARGE_S:20,SMALL_Z_SAMPLES:16,MIDDLE_Z_SAMPLES:8,LARGE_Z_SAMPLES:2,LARGE_S_Z_SAMPLES:1,THE_MIN_SAMPLES:1},TRANSFORM:{PROJECTION_CHANGE_SMALL_ZOOM:5,PROJECTION_CHANGE_MIDDLE_ZOOM:10,PROJECTION_CHANGE_LARGE_ZOOM:15,MAX_LAT:90,MIN_LAT:-90,SPHERE_MAX_PITCH:90,PLAIN_MAX_PITCH:90,SPHERE_DRAG_PAN_MAX_PITCH:45,DEG_TO_RAD:Rt/180,RAD_TO_DEG:180/Rt,R:Lt,R1:6356752.314245179,REAL_R:6378137,R2:40680631590769,R_SCALE:1,R_ZOOM:1,CIR:2*Rt*Lt,COVERING_TILE_ZOOM:6,EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,UNIT_Z:[0,0,1],UNIT_Z_REVERSE:[0,0,-1],VIEW_MAX_BOUNDING:{west:-180,south:-85.05113,east:180,north:85.05113},PI:Rt,TWO_PI:2*Rt,PI_OVER_TWO:Rt/2,FP_ZOOM:17,TERRAIN_FIND_ZOOM_MIN:5,TERRAIN_SIMPLIFY_ZOOM_MAX:15,ERR_TERRAIN_ALT:-Lt,OFFSCREEN_WIDTH:2048,OFFSCREEN_HEIGHT:2048,SHADOW_VIEWPORT_SIZE:[8192,8192],RAY_PICK_MIN_ZOOM:4,BOUND_KEYS:[\"topLeft\",\"topMidL\",\"topMiddle\",\"topMidR\",\"topRight\",\"bottomRight\",\"bottomMiddle\",\"bottomLeft\"],FOV_IN_RADIANS:.6435011087932844,FOV_IN_DEGREES:36.86989764584402},CesiumMath:{EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536,FOUR_GIGABYTES:4294967296,PI:Math.PI,ONE_OVER_PI:1/Math.PI,PI_OVER_TWO:Math.PI/2,PI_OVER_THREE:Math.PI/3,PI_OVER_FOUR:Math.PI/4,PI_OVER_SIX:Math.PI/6,THREE_PI_OVER_TWO:3*Math.PI/2,TWO_PI:2*Math.PI,ONE_OVER_TWO_PI:1/(2*Math.PI),RADIANS_PER_DEGREE:Math.PI/180,DEGREES_PER_RADIAN:180/Math.PI,RADIANS_PER_ARCSECOND:Math.PI/180/3600,log2:re(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),clamp:function(e,t,n){return e<t?t:e>n?n:e},equalsEpsilon:function(e,t,n,i){n=n||0,i=i||n;var r=Math.abs(e-t);return r<=i||r<=n*Math.max(Math.abs(e),Math.abs(t))},toRadians:function(e){return e*kt.CesiumMath.RADIANS_PER_DEGREE},toDegrees:function(e){return e*kt.CesiumMath.DEGREES_PER_RADIAN},negativePiToPi:function(e){return e>=-kt.CesiumMath.PI&&e<=kt.CesiumMath.PI?e:kt.CesiumMath.zeroToTwoPi(e+kt.CesiumMath.PI)-kt.CesiumMath.PI},zeroToTwoPi:function(e){if(e>=0&&e<=kt.CesiumMath.TWO_PI)return e;var t=kt.CesiumMath.mod(e,kt.CesiumMath.TWO_PI);return Math.abs(t)<kt.CesiumMath.EPSILON14&&Math.abs(e)>kt.CesiumMath.EPSILON14?kt.CesiumMath.TWO_PI:t},mod:function(e,t){return Math.sign(e)===Math.sign(t)&&Math.abs(e)<Math.abs(t)?e:(e%t+t)%t},acosClamped:function(e){return Math.acos(C(e,-1,1))},asinClamped:function(e){return Math.asin(C(e,-1,1))},chordLength:function(e,t){if(void 0===e)throw new Error(\"angle is required.\");if(void 0===t)throw new Error(\"radius is required.\");return 2*t*Math.sin(.5*e)},fastApproximateAtan2:function(e,t){var n,i=Math.abs(e);n=Math.abs(t);var r=Math.max(i,n),a=(n=Math.min(i,n))/r;if(isNaN(a))throw new Error(\"either x or y must be nonzero\");return i=kt.CesiumMath.fastApproximateAtan(a),i=Math.abs(t)>Math.abs(e)?kt.CesiumMath.PI_OVER_TWO-i:i,i=e<0?kt.CesiumMath.PI-i:i,t<0?-i:i},fastApproximateAtan:function(e){return e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)}},TEXTUREWRAP:{REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648},TEXTUREMAGNIFICATIONFILTER:{NEAREST:9728,LINEAR:9729},TEXTUREMINNIFICATIONFILTER:{NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987},SOURCE:{MAX_BOUNDS:[[-180,90],[180,90],[180,-90],[-180,-90]],ERROR_IMG_INDEX:-999,CLOCK_SKEW_RETRY_TIMEOUT:3e4,TRANSPARENT_PNG_URL:\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=\",MAX_PARALLEL_IMAGE_REQUESTS:16,GLOBAL_SOURCE_ID:\"sphere-image-globe\",SKYBOX_SOURCE_ID:\"sphere-image-skybox\",PANORAMA_SOURCE_ID:\"panorama-special-source\",ATMOSPHERE_SOURCE_ID:\"sphere-atmosphere\",COSMOS_SOURCE_ID:\"sphere-cosmos\",MAX_GLTF_TILE_COUNT:300,MAX_GLTF_TILE_TO_FIND_PARENT:64,MAX_IMAGE_CONCURRENCY:32,TEXTURE_CUBE_KEYS:[\"px\",\"nx\",\"py\",\"ny\",\"pz\",\"nz\"],ION_ACCESS_TOKEN:\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzMGY4ODczYy1mNTk4LTRiMDUtYmIxYy0xZWYwOWZmMGY4NjQiLCJpZCI6NDQsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJhc3NldHMiOlsxLDIsMyw0LDYxOTMsNjI3Myw3MTYyLDczNTMsNzE0Ml0sImlhdCI6MTU0MTYxODM0NX0.lWnGs9ySXO4QK3HagcMsDpZ8L01DpmUDQm38-2QAQuE\"},HIGHLIGHT_TYPE:{PRIMITIVE:\"PRIMITIVE\",NODE:\"NODE\",SCENE:\"SCENE\"},MODEL_TYPE:{OSGB:\"osgb\",E3DCM:\"e3dcm\",TDMODEL:\"3dmodel\"},LAYER:{PANORAMA_LAYER_ID:\"panorama-special-layer\",RADIATION_REGIONS:5},TILE:{EXTENT:8192,DEPTH_MAX_RANGE:1,OFFSCREEN_SIZE:1024},FPMODE:{MAP:\"MAP\",DRAG_ROTATE:\"DRAG_ROTATE\",NULL:\"NULL\"},FRAMEBUFFER:{DEPTH_IMAGE_SCALE:1},EFFECTS:{FOG_START_DISTANCE:4e3,FOG_CALC_LENGTH:2e4,SHADOW_OFFSET:25e-8},CAMERA:{SUNLIGHT_CAMERA_ID:\"SUNLIGHT_CAMERA_ID\",SKYBOX_CAMERA_ID:\"SKYBOX_CAMERA_ID\",ATMOSPHERE_BLEND_CAMERA_ID:\"ATMOSPHERE_BLEND_CAMERA_ID\",DRAW_MODE:{NORMAL:\"NORMAL\",OFFSCREEN:\"OFFSCREEN\",OFFSCREEN_VIEWSHED:\"OFFSCREEN_VIEWSHED\",ONSCREEN_SHADOW:\"SHADOW\",ONSCREEN_VIEWSHED:\"VIEWSHED\",ONSCREEN_ALL:\"ONSCREEN_ALL\"},SUNLIGHT_FIXED_MODE:{FIXED:\"FIXED\",DYNAMIC:\"DYNAMIC\"}},GL_CONST:{SHADOW_TEXTURE_UNIT1:{VALUE:33984,INDEX:0},SHADOW_TEXTURE_UNIT2:{VALUE:33985,INDEX:1},SHADOW_BASE_TEXTURE_UNIT:{VALUE:33986,INDEX:2},FXAA_TEXTURE_UNIT1:{VALUE:33987,INDEX:3},BLUR_TEXTURE_UNIT1:{VALUE:33988,INDEX:4},BLUR_TEXTURE_UNIT2:{VALUE:33989,INDEX:5},MODEL_TEXTURE_UNIT1:{VALUE:33990,INDEX:6},MODEL_TEXTURE_UNIT2:{VALUE:33991,INDEX:7},MODEL_TEXTURE_UNIT3:{VALUE:33992,INDEX:8},MODEL_TEXTURE_UNIT4:{VALUE:33993,INDEX:9},MODEL_TEXTURE_UNIT5:{VALUE:33994,INDEX:10},VIDEO_TEXTURE_UNIT1:{VALUE:33995,INDEX:11},PATTERN_TEXTURE_UNIT1:{VALUE:33996,INDEX:12},BRDF_TEXTURE_UNIT:{VALUE:33997,INDEX:13},TEXTURE14:{VALUE:33998,INDEX:14},TEXTURE15:{VALUE:33999,INDEX:15},TEXTURE16:{VALUE:34e3,INDEX:16},TEXTURE17:{VALUE:34001,INDEX:17},TEXTURE18:{VALUE:34002,INDEX:18}},PERFORMANCE:{MODE:{FLIGHT:\"FLIGHT\",MANUAL:\"MANUAL\"},SMOOTH_CONSTS:{FRAME_RATE:30,FRAME_DURATION:33.33}},COMPRESSED_TEXTURE_TYPE:{COMPRESSED_RGB_S3TC:{COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779},COMPRESSED_RGB_PVRTC:{COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843},COMPRESSED_RGB_ETC1_WEBGL:36196},COLORTYPEANDLENGTH:{ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,FRAGMENT_SHADER:35632},PixelDatatype:{UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT_OES:36193,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635}},Ot=\"default\",Nt=\"time-sequence\",Dt=function(t){oe(o,t);var i,r,a=(i=o,r=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ue(i);if(r){var n=ue(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return le(this,e)});function o(){return e(this,o),a.apply(this,arguments)}return n(o,[{key:\"RANK\",get:function(){return 0}},{key:\"toString\",value:function(){var e=\"[\";e+=\"row-major:\";for(var t=0;t<this.RANK;++t)for(var n=0;n<this.RANK;++n)e+=\" \".concat(this[n*this.RANK+t]);return e+\"]\"}},{key:\"getElementIndex\",value:function(e,t){return t*this.RANK+e}},{key:\"getElement\",value:function(e,t){return this[t*this.RANK+e]}},{key:\"setElement\",value:function(e,t,n){return this[t*this.RANK+e]=Te(n),this}},{key:\"getColumn\",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),n=e*this.RANK,i=0;i<this.RANK;++i)t[i]=this[n+i];return t}},{key:\"setColumn\",value:function(e,t){for(var n=e*this.RANK,i=0;i<this.RANK;++i)this[n+i]=t[i];return this}}]),o}(xe),Ft={},zt=new Float32Array(1),Bt=new Uint8Array(zt.buffer),Vt=new Uint32Array([287454020]),Ut=68===new Uint8Array(Vt.buffer)[0],Gt=function(t){oe(o,t);var i,r,a=(i=o,r=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ue(i);if(r){var n=ue(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return le(this,e)});function o(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return e(this,o),t=a.call(this,-0,-0,-0,-0),me(n)&&1===arguments.length?t.copy(n):(t[0]=n,t[1]=i,t[2]=r,t[3]=s),t}return n(o,[{key:\"ELEMENTS\",get:function(){return 4}},{key:\"x\",get:function(){return this[0]},set:function(e){this[0]=Te(e)}},{key:\"y\",get:function(){return this[1]},set:function(e){this[1]=Te(e)}},{key:\"z\",get:function(){return this[2]},set:function(e){this[2]=Te(e)}},{key:\"w\",get:function(){return this[3]},set:function(e){this[3]=Te(e)}},{key:\"set\",value:function(e,t,n,i){return this[0]=e,this[1]=t,this[2]=n,this[3]=i,this.check()}},{key:\"copy\",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}},{key:\"fromObject\",value:function(e){return this[0]=e.x,this[1]=e.y,this[2]=e.z,this[3]=e.w,this}},{key:\"toObject\",value:function(e){return e.x=this[0],e.y=this[1],e.z=this[2],e.w=this[3],e}},{key:\"transform\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;return ft(t,this,e),t.check()}},{key:\"transformByMatrix3\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;return It(t,this,e),t.check()}},{key:\"transformByMatrix2\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;return Ct(t,this,e),t.check()}},{key:\"transformByQuaternion\",value:function(e,t){return dt(t,this,e),t.check()}},{key:\"applyMatrix4\",value:function(e){return e.transform(this,this),this}},{key:\"clone\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new o;return o.clone(this,e)}},{key:\"equals\",value:function(e){return o.equals(this,e)}},{key:\"equalsEpsilon\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;return o.equalsEpsilon(this,e,t,n)}},{key:\"toString\",value:function(){return\"(\".concat(this.x,\", \").concat(this.y,\", \").concat(this.z,\", \").concat(this.w,\")\")}}],[{key:\"ZERO\",get:function(){return Ft.ZERO=Ft.ZERO||Object.freeze(new o(0,0,0,0))}},{key:\"ONE\",get:function(){return Ft.ONE=Ft.ONE||Object.freeze(new o(1,1,1,1))}},{key:\"UNIT_X\",get:function(){return Ft.UNIT_X=Ft.UNIT_X||Object.freeze(new o(1,0,0,0))}},{key:\"UNIT_Y\",get:function(){return Ft.UNIT_Y=Ft.UNIT_Y||Object.freeze(new o(0,1,0,0))}},{key:\"UNIT_Z\",get:function(){return Ft.UNIT_Z=Ft.UNIT_Z||Object.freeze(new o(0,0,1,0))}},{key:\"UNIT_W\",get:function(){return Ft.UNIT_W=Ft.UNIT_W||Object.freeze(new o(0,0,0,1))}},{key:\"fromElements\",value:function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new o;return r.x=e,r.y=t,r.z=n,r.w=i,r}},{key:\"clone\",value:function(e){var t=arguments.length>1&&voi