/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */ (window.fileUpload_bundle_jsonpfunction=window.fileUpload_bundle_jsonpfunction||[]).push([[1],Array(20).concat([function(t,e,n){t.exports=n(9)(2964)},function(t,e,n){t.exports=n(9)(2980)},function(t,e,n){t.exports=n(9)(2952)},function(t,e,n){t.exports=n(9)(2957)},function(t,e,n){t.exports=n(9)(2951)},function(t,e,n){t.exports=n(9)(507)},function(t,e,n){"use strict";var r=n(20),i=n(25);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"JSONLoader",{enumerable:!0,get:function(){return b.JSONLoader}}),Object.defineProperty(e,"RequestScheduler",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"_NodeFileSystem",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(e,"_addAliases",{enumerable:!0,get:function(){return _.addAliases}}),Object.defineProperty(e,"assert",{enumerable:!0,get:function(){return s.assert}}),Object.defineProperty(e,"canEncodeWithWorker",{enumerable:!0,get:function(){return c.canEncodeWithWorker}}),Object.defineProperty(e,"canParseWithWorker",{enumerable:!0,get:function(){return l.canParseWithWorker}}),Object.defineProperty(e,"compareArrayBuffers",{enumerable:!0,get:function(){return f.compareArrayBuffers}}),Object.defineProperty(e,"concatenateArrayBuffers",{enumerable:!0,get:function(){return f.concatenateArrayBuffers}}),Object.defineProperty(e,"concatenateArrayBuffersAsync",{enumerable:!0,get:function(){return v.concatenateArrayBuffersAsync}}),Object.defineProperty(e,"concatenateTypedArrays",{enumerable:!0,get:function(){return f.concatenateTypedArrays}}),Object.defineProperty(e,"copyArrayBuffer",{enumerable:!0,get:function(){return d.copyArrayBuffer}}),Object.defineProperty(e,"copyBinaryToDataView",{enumerable:!0,get:function(){return p.copyBinaryToDataView}}),Object.defineProperty(e,"copyPaddedArrayBufferToDataView",{enumerable:!0,get:function(){return p.copyPaddedArrayBufferToDataView}}),Object.defineProperty(e,"copyPaddedStringToDataView",{enumerable:!0,get:function(){return p.copyPaddedStringToDataView}}),Object.defineProperty(e,"copyStringToDataView",{enumerable:!0,get:function(){return p.copyStringToDataView}}),Object.defineProperty(e,"copyToArray",{enumerable:!0,get:function(){return d.copyToArray}}),Object.defineProperty(e,"createLoaderWorker",{enumerable:!0,get:function(){return u.createLoaderWorker}}),Object.defineProperty(e,"document",{enumerable:!0,get:function(){return o.document}}),Object.defineProperty(e,"forEach",{enumerable:!0,get:function(){return v.forEach}}),e.fs=void 0,Object.defineProperty(e,"getFirstCharacters",{enumerable:!0,get:function(){return g.getFirstCharacters}}),Object.defineProperty(e,"getMagicString",{enumerable:!0,get:function(){return g.getMagicString}}),Object.defineProperty(e,"getPathPrefix",{enumerable:!0,get:function(){return _.getPathPrefix}}),Object.defineProperty(e,"global",{enumerable:!0,get:function(){return o.global}}),Object.defineProperty(e,"isBrowser",{enumerable:!0,get:function(){return o.isBrowser}}),Object.defineProperty(e,"isBuffer",{enumerable:!0,get:function(){return x.isBuffer}}),Object.defineProperty(e,"isWorker",{enumerable:!0,get:function(){return o.isWorker}}),Object.defineProperty(e,"makeLineIterator",{enumerable:!0,get:function(){return y.makeLineIterator}}),Object.defineProperty(e,"makeNumberedLineIterator",{enumerable:!0,get:function(){return y.makeNumberedLineIterator}}),Object.defineProperty(e,"makeReadableFile",{enumerable:!0,get:function(){return O.makeReadableFile}}),Object.defineProperty(e,"makeTextDecoderIterator",{enumerable:!0,get:function(){return y.makeTextDecoderIterator}}),Object.defineProperty(e,"makeTextEncoderIterator",{enumerable:!0,get:function(){return y.makeTextEncoderIterator}}),Object.defineProperty(e,"makeWritableFile",{enumerable:!0,get:function(){return S.makeWritableFile}}),Object.defineProperty(e,"mergeLoaderOptions",{enumerable:!0,get:function(){return a.mergeLoaderOptions}}),Object.defineProperty(e,"nodeVersion",{enumerable:!0,get:function(){return o.nodeVersion}}),Object.defineProperty(e,"padStringToByteAlignment",{enumerable:!0,get:function(){return p.padStringToByteAlignment}}),Object.defineProperty(e,"padToNBytes",{enumerable:!0,get:function(){return d.padToNBytes}}),Object.defineProperty(e,"parseJSON",{enumerable:!0,get:function(){return h.parseJSON}}),Object.defineProperty(e,"parseWithWorker",{enumerable:!0,get:function(){return l.parseWithWorker}}),e.path=void 0,Object.defineProperty(e,"promisify1",{enumerable:!0,get:function(){return E.promisify1}}),Object.defineProperty(e,"promisify2",{enumerable:!0,get:function(){return E.promisify2}}),Object.defineProperty(e,"resolvePath",{enumerable:!0,get:function(){return _.resolvePath}}),Object.defineProperty(e,"self",{enumerable:!0,get:function(){return o.self}}),Object.defineProperty(e,"setPathPrefix",{enumerable:!0,get:function(){return _.setPathPrefix}}),Object.defineProperty(e,"sliceArrayBuffer",{enumerable:!0,get:function(){return f.sliceArrayBuffer}}),e.stream=void 0,Object.defineProperty(e,"toArrayBuffer",{enumerable:!0,get:function(){return x.toArrayBuffer}}),Object.defineProperty(e,"toBuffer",{enumerable:!0,get:function(){return x.toBuffer}}),Object.defineProperty(e,"window",{enumerable:!0,get:function(){return o.window}});var s=n(76),o=n(54),a=n(123),u=n(124),l=n(133),c=n(134),h=n(135),f=n(85),d=n(86),p=n(136),g=n(84),y=n(137),v=n(139),m=r(n(140)),_=n(142),b=n(143),x=n(144),E=n(88),w=C(n(145));e.path=w;var I=C(n(57));e.fs=I;var M=C(n(148));e.stream=M;var O=n(150),S=n(151),N=r(n(152));function P(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(P=function(t){return t?n:e})(t)}function C(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var n=P(e);if(n&&n.has(t))return n.get(t);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var a=s?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}},function(t,e,n){t.exports=n(9)(1463)},function(t,e,n){t.exports=n(9)(2962)},function(t,e,n){t.exports=n(9)(2961)},function(t,e,n){var r=n(56);t.exports=function(t){return new r(t,0)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(138);t.exports=function(t){return function(){return new r(t.apply(this,arguments))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.isWritableStream=e.isWritableNodeStream=e.isWritableDOMStream=e.isResponse=e.isReadableStream=e.isReadableNodeStream=e.isReadableDOMStream=e.isPureObject=e.isPromise=e.isObject=e.isIterator=e.isIterable=e.isFile=e.isBuffer=e.isBlob=e.isAsyncIterable=void 0;var i=r(n(25)),s=function(t){return"boolean"==typeof t},o=function(t){return"function"==typeof t},a=function(t){return null!==t&&"object"===(0,i.default)(t)};e.isObject=a,e.isPureObject=function(t){return a(t)&&t.constructor==={}.constructor},e.isPromise=function(t){return a(t)&&o(t.then)},e.isIterable=function(t){return t&&"function"==typeof t[Symbol.iterator]},e.isAsyncIterable=function(t){return t&&"function"==typeof t[Symbol.asyncIterator]},e.isIterator=function(t){return t&&o(t.next)},e.isResponse=function(t){return"undefined"!=typeof Response&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json},e.isFile=function(t){return"undefined"!=typeof File&&t instanceof File},e.isBlob=function(t){return"undefined"!=typeof Blob&&t instanceof Blob},e.isBuffer=function(t){return t&&"object"===(0,i.default)(t)&&t.isBuffer};var u=function(t){return a(t)&&o(t.abort)&&o(t.getWriter)};e.isWritableDOMStream=u;var l=function(t){return"undefined"!=typeof ReadableStream&&t instanceof ReadableStream||a(t)&&o(t.tee)&&o(t.cancel)&&o(t.getReader)};e.isReadableDOMStream=l;var c=function(t){return a(t)&&o(t.end)&&o(t.write)&&s(t.writable)};e.isWritableNodeStream=c;var h=function(t){return a(t)&&o(t.read)&&o(t.pipe)&&s(t.readable)};e.isReadableNodeStream=h,e.isReadableStream=function(t){return l(t)||h(t)},e.isWritableStream=function(t){return u(t)||c(t)}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.configure=function(t){for(var e in t)(0,s.default)(e in u),u[e]=t[e];return u},e.formatValue=function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).precision,n=void 0===e?u.precision:e;return t=function(t){return Math.round(t/u.EPSILON)*u.EPSILON}(t),"".concat(parseFloat(t.toPrecision(n)))},e.isArray=l,e.clone=function(t){return"clone"in t?t.clone():t.slice()},e.toRadians=function(t){return c(t)},e.toDegrees=function(t){return h(t)},e.radians=c,e.degrees=h,e.sin=function(t,e){return f(t,(function(t){return Math.sin(t)}),e)},e.cos=function(t,e){return f(t,(function(t){return Math.cos(t)}),e)},e.tan=function(t,e){return f(t,(function(t){return Math.tan(t)}),e)},e.asin=function(t,e){return f(t,(function(t){return Math.asin(t)}),e)},e.acos=function(t,e){return f(t,(function(t){return Math.acos(t)}),e)},e.atan=function(t,e){return f(t,(function(t){return Math.atan(t)}),e)},e.clamp=function(t,e,n){return f(t,(function(t){return Math.max(e,Math.min(n,t))}))},e.lerp=function t(e,n,r){return l(e)?e.map((function(e,i){return t(e,n[i],r)})):r*n+(1-r)*e},e.equals=function t(e,n,r){var i=u.EPSILON;r&&(u.EPSILON=r);try{if(e===n)return!0;if(l(e)&&l(n)){if(e.length!==n.length)return!1;for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:"";if(r.config.debug&&!i(t,e))throw new Error("math.gl: ".concat(n," some fields set to invalid numbers'"));return t},e.deprecated=function(t,e){s[t]||(s[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))};var r=n(33);function i(t,e){if(t.length!==e)return!1;for(var n=0;n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw s}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&(s=1/Math.sqrt(s)),t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t},e.dot=p,e.cross=function(t,e,n){var r=e[0],i=e[1],s=e[2],o=n[0],a=n[1],u=n[2];return t[0]=i*u-s*a,t[1]=s*o-r*u,t[2]=r*a-i*o,t},e.lerp=function(t,e,n,r){var i=e[0],s=e[1],o=e[2];return t[0]=i+r*(n[0]-i),t[1]=s+r*(n[1]-s),t[2]=o+r*(n[2]-o),t},e.hermite=function(t,e,n,r,i,s){var o=s*s,a=o*(2*s-3)+1,u=o*(s-2)+s,l=o*(s-1),c=o*(3-2*s);return t[0]=e[0]*a+n[0]*u+r[0]*l+i[0]*c,t[1]=e[1]*a+n[1]*u+r[1]*l+i[1]*c,t[2]=e[2]*a+n[2]*u+r[2]*l+i[2]*c,t},e.bezier=function(t,e,n,r,i,s){var o=1-s,a=o*o,u=s*s,l=a*o,c=3*s*a,h=3*u*o,f=u*s;return t[0]=e[0]*l+n[0]*c+r[0]*h+i[0]*f,t[1]=e[1]*l+n[1]*c+r[1]*h+i[1]*f,t[2]=e[2]*l+n[2]*c+r[2]*h+i[2]*f,t},e.random=function(t,e){e=e||1;var n=2*i.RANDOM()*Math.PI,r=2*i.RANDOM()-1,s=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*s,t[1]=Math.sin(n)*s,t[2]=r*e,t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1],s=e[2],o=n[3]*r+n[7]*i+n[11]*s+n[15];return o=o||1,t[0]=(n[0]*r+n[4]*i+n[8]*s+n[12])/o,t[1]=(n[1]*r+n[5]*i+n[9]*s+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*s+n[14])/o,t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1],s=e[2];return t[0]=r*n[0]+i*n[3]+s*n[6],t[1]=r*n[1]+i*n[4]+s*n[7],t[2]=r*n[2]+i*n[5]+s*n[8],t},e.transformQuat=function(t,e,n){var r=n[0],i=n[1],s=n[2],o=n[3],a=e[0],u=e[1],l=e[2],c=i*l-s*u,h=s*a-r*l,f=r*u-i*a,d=i*f-s*h,p=s*c-r*f,g=r*h-i*c,y=2*o;return c*=y,h*=y,f*=y,d*=2,p*=2,g*=2,t[0]=a+c+d,t[1]=u+h+p,t[2]=l+f+g,t},e.rotateX=function(t,e,n,r){var i=[],s=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],s[0]=i[0],s[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),s[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=s[0]+n[0],t[1]=s[1]+n[1],t[2]=s[2]+n[2],t},e.rotateY=function(t,e,n,r){var i=[],s=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],s[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),s[1]=i[1],s[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=s[0]+n[0],t[1]=s[1]+n[1],t[2]=s[2]+n[2],t},e.rotateZ=function(t,e,n,r){var i=[],s=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],s[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),s[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),s[2]=i[2],t[0]=s[0]+n[0],t[1]=s[1]+n[1],t[2]=s[2]+n[2],t},e.angle=function(t,e){var n=t[0],r=t[1],i=t[2],s=e[0],o=e[1],a=e[2],u=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(s*s+o*o+a*a),l=u&&p(t,e)/u;return Math.acos(Math.min(Math.max(l,-1),1))},e.zero=function(t){return t[0]=0,t[1]=0,t[2]=0,t},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],r=t[1],s=t[2],o=e[0],a=e[1],u=e[2];return Math.abs(n-o)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(s-u)<=i.EPSILON*Math.max(1,Math.abs(s),Math.abs(u))},e.forEach=e.sqrLen=e.len=e.sqrDist=e.dist=e.div=e.mul=e.sub=void 0;var i=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var n=s(e);if(n&&n.has(t))return n.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,n&&n.set(t,i),i}(n(40));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(s=function(t){return t?n:e})(t)}function o(){var t=new i.ARRAY_TYPE(3);return i.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function a(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(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 f(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 d(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function p(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}var g=u;e.sub=g;var y=l;e.mul=y;var v=c;e.div=v;var m=h;e.dist=m;var _=f;e.sqrDist=_;var b=a;e.len=b;var x=d;e.sqrLen=x;var E,w=(E=o(),function(t,e,n,r,i,s){var o,a;for(e||(e=3),n||(n=0),a=r?Math.min(r*e+n,t.length):t.length,o=n;o1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,o=r||new Set;if(e)if(s(e))o.add(e);else if(s(e.buffer))o.add(e.buffer);else if(ArrayBuffer.isView(e));else if(n&&"object"===(0,i.default)(e))for(var a in e)t(e[a],n,o);return void 0===r?Array.from(o):[]},e.getTransferListForWriter=function t(e){if(null===e)return{};var n=Object.assign({},e);return Object.keys(n).forEach((function(r){"object"!==(0,i.default)(e[r])||ArrayBuffer.isView(e[r])||e[r]instanceof Array?"function"==typeof n[r]||n[r]instanceof RegExp?n[r]={}:n[r]=e[r]:n[r]=t(e[r])})),n};var i=r(n(25));function s(t){return!!t&&(t instanceof ArrayBuffer||"undefined"!=typeof MessagePort&&t instanceof MessagePort||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.selectLoader=function(t){return x.apply(this,arguments)},e.selectLoaderSync=E;var i=r(n(21)),s=r(n(2)),o=r(n(25)),a=r(n(38)),u=r(n(24)),l=n(26),c=n(37),h=n(157),f=n(44),d=n(94),p=n(32),g=n(58);function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function v(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw s}}}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==a[1]?a[1]:[],r=a.length>2?a[2]:void 0,s=a.length>3?a[3]:void 0,w(e)){t.next=5;break}return t.abrupt("return",null);case 5:if(!(o=E(e,n,v(v({},r),{},{nothrow:!0}),s))){t.next=8;break}return t.abrupt("return",o);case 8:if(!(0,p.isBlob)(e)){t.next=13;break}return t.next=11,e.slice(0,10).arrayBuffer();case 11:e=t.sent,o=E(e,n,r,s);case 13:if(o||null!=r&&r.nothrow){t.next=15;break}throw new Error(I(e));case 15:return t.abrupt("return",o);case 16:case"end":return t.stop()}}),t)}))),x.apply(this,arguments)}function E(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if(!w(t))return null;if(e&&!Array.isArray(e))return(0,c.normalizeLoader)(e);var i,s=[];e&&(s=s.concat(e)),null!=n&&n.ignoreRegisteredLoaders||(i=s).push.apply(i,(0,a.default)((0,d.getRegisteredLoaders)())),function(t){var e,n=m(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;(0,c.normalizeLoader)(r)}}catch(t){n.e(t)}finally{n.f()}}(s);var o=function(t,e,n,r){var i,s=(0,f.getResourceUrl)(t),o=(0,f.getResourceMIMEType)(t),a=(0,g.stripQueryString)(s)||(null==r?void 0:r.url),u=null,l="";return null!=n&&n.mimeType&&(u=M(e,null==n?void 0:n.mimeType),l="match forced by supplied MIME type ".concat(null==n?void 0:n.mimeType)),u=u||function(t,e){var n=e&&b.exec(e),r=n&&n[1];return r?function(t,e){e=e.toLowerCase();var n,r=m(t);try{for(r.s();!(n=r.n()).done;){var i,s=n.value,o=m(s.extensions);try{for(o.s();!(i=o.n()).done;)if(i.value.toLowerCase()===e)return s}catch(t){o.e(t)}finally{o.f()}}}catch(t){r.e(t)}finally{r.f()}return null}(t,r):null}(e,a),l=l||(u?"matched url ".concat(a):""),u=u||M(e,o),l=l||(u?"matched MIME type ".concat(o):""),u=u||function(t,e){if(!e)return null;var n,r=m(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if("string"==typeof e){if(O(e,i))return i}else if(ArrayBuffer.isView(e)){if(S(e.buffer,e.byteOffset,i))return i}else if(e instanceof ArrayBuffer&&S(e,0,i))return i}}catch(t){r.e(t)}finally{r.f()}return null}(e,t),l=l||(u?"matched initial data ".concat(N(t)):""),u=u||M(e,null==n?void 0:n.fallbackMimeType),(l=l||(u?"matched fallback MIME type ".concat(o):""))&&h.log.log(1,"selectLoader selected ".concat(null===(i=u)||void 0===i?void 0:i.name,": ").concat(l,".")),u}(t,s,n,r);if(!(o||null!=n&&n.nothrow))throw new Error(I(t));return o}function w(t){return!(t instanceof Response&&204===t.status)}function I(t){var e=(0,f.getResourceUrl)(t),n=(0,f.getResourceMIMEType)(t),r="No valid loader found (";r+=e?"".concat(l.path.filename(e),", "):"no url provided, ",r+="MIME type: ".concat(n?'"'.concat(n,'"'):"not provided",", ");var i=t?N(t):"";return(r+=i?' first bytes: "'.concat(i,'"'):"first bytes: not available")+")"}function M(t,e){var n,r=m(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.mimeTypes&&i.mimeTypes.includes(e))return i;if(e==="application/x.".concat(i.id))return i}}catch(t){r.e(t)}finally{r.f()}return null}function O(t,e){return e.testText?e.testText(t):(Array.isArray(e.tests)?e.tests:[e.tests]).some((function(e){return t.startsWith(e)}))}function S(t,e,n){return(Array.isArray(n.tests)?n.tests:[n.tests]).some((function(r){return function(t,e,n,r){if(r instanceof ArrayBuffer)return(0,l.compareArrayBuffers)(r,t,r.byteLength);switch((0,o.default)(r)){case"function":return r(t,n);case"string":return r===P(t,e,r.length);default:return!1}}(t,e,n,r)}))}function N(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;return"string"==typeof t?t.slice(0,e):ArrayBuffer.isView(t)?P(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?P(t,0,e):""}function P(t,e,n){if(t.byteLength=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw s}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:null;if((0,s.default)(this,t),(0,a.default)(this,"path",void 0),this.path=["$"],n instanceof t)this.path=(0,i.default)(n.path);else if(Array.isArray(n))(e=this.path).push.apply(e,(0,i.default)(n));else if("string"==typeof n&&(this.path=n.split("."),"$"!==this.path[0]))throw new Error("JSONPaths must start with $")}return(0,o.default)(t,[{key:"clone",value:function(){return new t(this)}},{key:"toString",value:function(){return this.path.join(".")}},{key:"push",value:function(t){this.path.push(t)}},{key:"pop",value:function(){return this.path.pop()}},{key:"set",value:function(t){this.path[this.path.length-1]=t}},{key:"equals",value:function(t){if(!this||!t||this.path.length!==t.path.length)return!1;for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:0,n=0;n0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n0?", ":"")+(0,l.formatValue)(this[n],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}},{key:"equals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e=0)}function l(){return!("object"==typeof e&&"[object process]"===String(e)&&!e.browser)||u()}function c(){return l()&&"undefined"!=typeof document}((t,e)=>{for(var n in e)r(t,n,{get:e[n],enumerable:!0})})(a,{VERSION:()=>m,assert:()=>E,console:()=>y,document:()=>p,getBrowser:()=>x,global:()=>h,isBrowser:()=>l,isBrowserMainThread:()=>c,isElectron:()=>u,isMobile:()=>b,process:()=>g,self:()=>f,window:()=>d}),t.exports=(n=a,((t,e,n,a)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of s(e))o.call(t,n)||undefined===n||r(t,n,{get:()=>e[n],enumerable:!(a=i(e,n))||a.enumerable});return t})(r({},"__esModule",{value:!0}),n));var h=globalThis,f=globalThis.self||globalThis.window||globalThis.global,d=globalThis.window||globalThis.self||globalThis.global,p=globalThis.document||{},g=globalThis.process||{},y=globalThis.console,v=globalThis.navigator||{},m="undefined"!=typeof __VERSION__?__VERSION__:"untranspiled source",_=(l(),globalThis);function b(){return void 0!==_.orientation}function x(t){if(!t&&!l())return"Node";if(u(t))return"Electron";const e=t||v.userAgent||"";if(e.indexOf("Edge")>-1)return"Edge";const n=-1!==e.indexOf("MSIE "),r=-1!==e.indexOf("Trident/");return n||r?"IE":_.chrome?"Chrome":_.safari?"Safari":_.mozInnerScreenX?"Firefox":"Unknown"}function E(t,e){if(!t)throw new Error(e||"Assertion failed")}}).call(this,n(42))},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.parse=y;var i=r(n(21)),s=r(n(25)),o=r(n(24)),a=n(43),u=n(26),l=n(37),c=n(32),h=n(39),f=n(62),d=n(63),p=n(44),g=n(49);function y(t,e,n,r){return v.apply(this,arguments)}function v(){return(v=(0,o.default)(i.default.mark((function t(e,n,r,o){var u,c,f,v;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(0,a.assert)(!o||"object"===(0,s.default)(o)),!n||Array.isArray(n)||(0,l.isLoaderObject)(n)||(o=void 0,r=n,n=void 0),t.next=4,e;case 4:return e=t.sent,r=r||{},u=(0,p.getResourceUrl)(e),c=n,f=(0,d.getLoadersFromContext)(c,o),t.next=11,(0,g.selectLoader)(e,f,r);case 11:if(v=t.sent){t.next=14;break}return t.abrupt("return",null);case 14:return r=(0,h.normalizeOptions)(r,v,f,u),o=(0,d.getLoaderContext)({url:u,parse:y,loaders:f},r,o||null),t.next=18,m(v,e,r,o);case 18:return t.abrupt("return",t.sent);case 19:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function m(t,e,n,r){return _.apply(this,arguments)}function _(){return(_=(0,o.default)(i.default.mark((function t(e,n,r,s){var o,l,h,d,p,g,v,m;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(0,a.validateWorkerVersion)(e),(0,c.isResponse)(n)&&(l=(o=n).ok,h=o.redirected,d=o.status,p=o.statusText,g=o.type,v=o.url,m=Object.fromEntries(o.headers.entries()),s.response={headers:m,ok:l,redirected:h,status:d,statusText:p,type:g,url:v}),t.next=4,(0,f.getArrayBufferOrStringFromData)(n,e,r);case 4:if(n=t.sent,!e.parseTextSync||"string"!=typeof n){t.next=8;break}return r.dataType="text",t.abrupt("return",e.parseTextSync(n,r,s,e));case 8:if(!(0,u.canParseWithWorker)(e,r)){t.next=12;break}return t.next=11,(0,u.parseWithWorker)(e,n,r,s,y);case 11:case 15:case 19:return t.abrupt("return",t.sent);case 12:if(!e.parseText||"string"!=typeof n){t.next=16;break}return t.next=15,e.parseText(n,r,s,e);case 16:if(!e.parse){t.next=20;break}return t.next=19,e.parse(n,r,s,e);case 20:throw(0,a.assert)(!e.parseSync),new Error("".concat(e.id," loader - no parser found and worker is disabled"));case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.getArrayBufferOrStringFromData=function(t,e,n){return f.apply(this,arguments)},e.getArrayBufferOrStringFromDataSync=h,e.getAsyncIterableFromData=function(t,e){return d.apply(this,arguments)},e.getReadableStream=function(t){return p.apply(this,arguments)};var i=r(n(21)),s=r(n(24)),o=n(26),a=n(32),u=n(95),l=n(90),c="Cannot convert supplied data type";function h(t,e,n){if(e.text&&"string"==typeof t)return t;if((0,a.isBuffer)(t)&&(t=t.buffer),t instanceof ArrayBuffer){var r=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(r):r}if(ArrayBuffer.isView(t)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);var i=t.buffer,s=t.byteLength||t.length;return 0===t.byteOffset&&s===i.byteLength||(i=i.slice(t.byteOffset,t.byteOffset+s)),i}throw new Error(c)}function f(){return(f=(0,s.default)(i.default.mark((function t(e,n,r){var s,f;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=e instanceof ArrayBuffer||ArrayBuffer.isView(e),"string"!=typeof e&&!s){t.next=3;break}return t.abrupt("return",h(e,n));case 3:if(!(0,a.isBlob)(e)){t.next=7;break}return t.next=6,(0,l.makeResponse)(e);case 6:e=t.sent;case 7:if(!(0,a.isResponse)(e)){t.next=21;break}return f=e,t.next=11,(0,l.checkResponse)(f);case 11:if(!n.binary){t.next=17;break}return t.next=14,f.arrayBuffer();case 14:t.t0=t.sent,t.next=20;break;case 17:return t.next=19,f.text();case 19:t.t0=t.sent;case 20:return t.abrupt("return",t.t0);case 21:if((0,a.isReadableStream)(e)&&(e=(0,u.makeIterator)(e,r)),!(0,a.isIterable)(e)&&!(0,a.isAsyncIterable)(e)){t.next=24;break}return t.abrupt("return",(0,o.concatenateArrayBuffersAsync)(e));case 24:throw new Error(c);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function d(){return(d=(0,s.default)(i.default.mark((function t(e,n){var r,s;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(0,a.isIterator)(e)){t.next=2;break}return t.abrupt("return",e);case 2:if(!(0,a.isResponse)(e)){t.next=10;break}return r=e,t.next=6,(0,l.checkResponse)(r);case 6:return t.next=8,r.body;case 8:return s=t.sent,t.abrupt("return",(0,u.makeIterator)(s,n));case 10:if(!(0,a.isBlob)(e)&&!(0,a.isReadableStream)(e)){t.next=12;break}return t.abrupt("return",(0,u.makeIterator)(e,n));case 12:if(!(0,a.isAsyncIterable)(e)){t.next=14;break}return t.abrupt("return",e[Symbol.asyncIterator]());case 14:return t.abrupt("return",g(e));case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(){return(p=(0,s.default)(i.default.mark((function t(e){var n;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(0,a.isReadableStream)(e)){t.next=2;break}return t.abrupt("return",e);case 2:if(!(0,a.isResponse)(e)){t.next=4;break}return t.abrupt("return",e.body);case 4:return t.next=6,(0,l.makeResponse)(e);case 6:return n=t.sent,t.abrupt("return",n.body);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function g(t){if(ArrayBuffer.isView(t))return i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.buffer;case 2:case"end":return e.stop()}}),e)}))();if(t instanceof ArrayBuffer)return i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:case"end":return e.stop()}}),e)}))();if((0,a.isIterator)(t))return t;if((0,a.isIterable)(t))return t[Symbol.iterator]();throw new Error(c)}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.getLoaderContext=function(t,e,n){if(n)return n;var r=function(t){for(var e=1;e1){var n=t.container;return new h.default(t.jsonpath).setFieldAtPath(n,e),n}return t.container};var i=r(n(21)),s=r(n(2)),o=r(n(30)),a=r(n(31)),u=n(66),l=n(26),c=r(n(186)),h=r(n(51));function f(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw s}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&_.getStreamingJsonPathAsString(),!(O.length>0&&p)){t.next=24;break}if(!a){t.next=23;break}return N={shape:v,batchType:"partial-result",data:[],length:0,bytesUsed:0,container:_.getPartialResult(),jsonpath:S},t.next=23,N;case 23:p=!1;case 24:P=f(O),t.prev=25,P.s();case 27:if((C=P.n()).done){t.next=36;break}if(L=C.value,m.addRow(L),!(T=m.getFullBatch({jsonpath:S}))){t.next=34;break}return t.next=34,T;case 34:t.next=27;break;case 36:t.next=41;break;case 38:t.prev=38,t.t0=t.catch(25),P.e(t.t0);case 41:return t.prev=41,P.f(),t.finish(41);case 44:if(m.chunkComplete(M),!(R=m.getFullBatch({jsonpath:S}))){t.next=49;break}return t.next=49,R;case 49:b=!1,t.next=12;break;case 52:t.next=58;break;case 54:t.prev=54,t.t1=t.catch(10),x=!0,E=t.t1;case 58:if(t.prev=58,t.prev=59,!b||null==w.return){t.next=63;break}return t.next=63,(0,o.default)(w.return());case 63:if(t.prev=63,!x){t.next=66;break}throw E;case 66:return t.finish(63);case 67:return t.finish(58);case 68:if(k=_.getStreamingJsonPathAsString(),!(A=m.getFinalBatch({jsonpath:k}))){t.next=73;break}return t.next=73,A;case 73:if(!a){t.next=77;break}return j={shape:v,batchType:"final-result",container:_.getPartialResult(),jsonpath:_.getStreamingJsonPathAsString(),data:[],length:0},t.next=77,j;case 77:case"end":return t.stop()}}),t,null,[[10,54,58,68],[25,38,41,44],[59,,63,67]])})))).apply(this,arguments)}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AsyncQueue",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"Binary",{enumerable:!0,get:function(){return c.Binary}}),Object.defineProperty(e,"Bool",{enumerable:!0,get:function(){return c.Bool}}),Object.defineProperty(e,"ColumnarTableBatchAggregator",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"DataType",{enumerable:!0,get:function(){return c.DataType}}),Object.defineProperty(e,"Date",{enumerable:!0,get:function(){return c.Date}}),Object.defineProperty(e,"DateDay",{enumerable:!0,get:function(){return c.DateDay}}),Object.defineProperty(e,"DateMillisecond",{enumerable:!0,get:function(){return c.DateMillisecond}}),Object.defineProperty(e,"Field",{enumerable:!0,get:function(){return c.Field}}),Object.defineProperty(e,"FixedSizeList",{enumerable:!0,get:function(){return c.FixedSizeList}}),Object.defineProperty(e,"Float",{enumerable:!0,get:function(){return c.Float}}),Object.defineProperty(e,"Float16",{enumerable:!0,get:function(){return c.Float16}}),Object.defineProperty(e,"Float32",{enumerable:!0,get:function(){return c.Float32}}),Object.defineProperty(e,"Float64",{enumerable:!0,get:function(){return c.Float64}}),Object.defineProperty(e,"Int",{enumerable:!0,get:function(){return c.Int}}),Object.defineProperty(e,"Int16",{enumerable:!0,get:function(){return c.Int16}}),Object.defineProperty(e,"Int32",{enumerable:!0,get:function(){return c.Int32}}),Object.defineProperty(e,"Int64",{enumerable:!0,get:function(){return c.Int64}}),Object.defineProperty(e,"Int8",{enumerable:!0,get:function(){return c.Int8}}),Object.defineProperty(e,"Interval",{enumerable:!0,get:function(){return c.Interval}}),Object.defineProperty(e,"IntervalDayTime",{enumerable:!0,get:function(){return c.IntervalDayTime}}),Object.defineProperty(e,"IntervalYearMonth",{enumerable:!0,get:function(){return c.IntervalYearMonth}}),Object.defineProperty(e,"Null",{enumerable:!0,get:function(){return c.Null}}),Object.defineProperty(e,"RowTableBatchAggregator",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"Schema",{enumerable:!0,get:function(){return c.Schema}}),Object.defineProperty(e,"Struct",{enumerable:!0,get:function(){return c.Struct}}),Object.defineProperty(e,"TableBatchBuilder",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return c.Time}}),Object.defineProperty(e,"TimeMillisecond",{enumerable:!0,get:function(){return c.TimeMillisecond}}),Object.defineProperty(e,"TimeSecond",{enumerable:!0,get:function(){return c.TimeSecond}}),Object.defineProperty(e,"Timestamp",{enumerable:!0,get:function(){return c.Timestamp}}),Object.defineProperty(e,"TimestampMicrosecond",{enumerable:!0,get:function(){return c.TimestampMicrosecond}}),Object.defineProperty(e,"TimestampMillisecond",{enumerable:!0,get:function(){return c.TimestampMillisecond}}),Object.defineProperty(e,"TimestampNanosecond",{enumerable:!0,get:function(){return c.TimestampNanosecond}}),Object.defineProperty(e,"TimestampSecond",{enumerable:!0,get:function(){return c.TimestampSecond}}),Object.defineProperty(e,"Uint16",{enumerable:!0,get:function(){return c.Uint16}}),Object.defineProperty(e,"Uint32",{enumerable:!0,get:function(){return c.Uint32}}),Object.defineProperty(e,"Uint64",{enumerable:!0,get:function(){return c.Uint64}}),Object.defineProperty(e,"Uint8",{enumerable:!0,get:function(){return c.Uint8}}),Object.defineProperty(e,"Utf8",{enumerable:!0,get:function(){return c.Utf8}}),Object.defineProperty(e,"convertToArrayRow",{enumerable:!0,get:function(){return a.convertToArrayRow}}),Object.defineProperty(e,"convertToObjectRow",{enumerable:!0,get:function(){return a.convertToObjectRow}}),Object.defineProperty(e,"deduceMeshField",{enumerable:!0,get:function(){return l.deduceMeshField}}),Object.defineProperty(e,"deduceMeshSchema",{enumerable:!0,get:function(){return l.deduceMeshSchema}}),Object.defineProperty(e,"deduceTypeFromColumn",{enumerable:!0,get:function(){return h.deduceTypeFromColumn}}),Object.defineProperty(e,"deduceTypeFromValue",{enumerable:!0,get:function(){return h.deduceTypeFromValue}}),Object.defineProperty(e,"getArrowTypeFromTypedArray",{enumerable:!0,get:function(){return d.getArrowTypeFromTypedArray}}),Object.defineProperty(e,"getMeshBoundingBox",{enumerable:!0,get:function(){return u.getMeshBoundingBox}}),Object.defineProperty(e,"getMeshSize",{enumerable:!0,get:function(){return u.getMeshSize}}),Object.defineProperty(e,"getTypeInfo",{enumerable:!0,get:function(){return f.getTypeInfo}}),Object.defineProperty(e,"makeMeshAttributeMetadata",{enumerable:!0,get:function(){return l.makeMeshAttributeMetadata}});var i=r(n(173)),s=r(n(99)),o=r(n(101)),a=n(100),u=n(175),l=n(176),c=n(50),h=n(182),f=n(183),d=n(103),p=r(n(184))},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(22)),s=r(n(23)),o=r(n(28)),a=r(n(29)),u=r(n(27)),l=r(n(52)),c=n(34),h=r(n(68));var f=function(t){(0,o.default)(l,t);var e,n,r=(e=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,u.default)(e);if(n){var i=(0,u.default)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,a.default)(this,t)});function l(){return(0,i.default)(this,l),r.apply(this,arguments)}return(0,s.default)(l,[{key:"x",get:function(){return this[0]},set:function(t){this[0]=(0,c.checkNumber)(t)}},{key:"y",get:function(){return this[1]},set:function(t){this[1]=(0,c.checkNumber)(t)}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var t=0,e=0;e=0&&t=0&&t0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},e.lerp=function(t,e,n,r){var i=e[0],s=e[1];return t[0]=i+r*(n[0]-i),t[1]=s+r*(n[1]-s),t},e.random=function(t,e){e=e||1;var n=2*i.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(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},e.transformMat2d=function(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},e.transformMat3=function(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},e.transformMat4=function(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},e.rotate=function(t,e,n,r){var i=e[0]-n[0],s=e[1]-n[1],o=Math.sin(r),a=Math.cos(r);return t[0]=i*a-s*o+n[0],t[1]=i*o+s*a+n[1],t},e.angle=function(t,e){var n=t[0],r=t[1],i=e[0],s=e[1],o=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+s*s),a=o&&(n*i+r*s)/o;return Math.acos(Math.min(Math.max(a,-1),1))},e.zero=function(t){return t[0]=0,t[1]=0,t},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],r=t[1],s=e[0],o=e[1];return Math.abs(n-s)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-o)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))},e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0;var i=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var n=s(e);if(n&&n.has(t))return n.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,n&&n.set(t,i),i}(n(40));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(s=function(t){return t?n:e})(t)}function o(){var t=new i.ARRAY_TYPE(2);return i.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function u(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function l(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.hypot(n,r)}function h(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function f(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function d(t){var e=t[0],n=t[1];return e*e+n*n}var p=f;e.len=p;var g=a;e.sub=g;var y=u;e.mul=y;var v=l;e.div=v;var m=c;e.dist=m;var _=h;e.sqrDist=_;var b=d;e.sqrLen=b;var x,E=(x=o(),function(t,e,n,r,i,s){var o,a;for(e||(e=2),n||(n=0),a=r?Math.min(r*e+n,t.length):t.length,o=n;o0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,s.default)(this,i),t=r.call(this,-0,-0,-0),1===arguments.length&&(0,h.isArray)(e)?t.copy(e):(h.config.debug&&((0,f.checkNumber)(e),(0,f.checkNumber)(n),(0,f.checkNumber)(o)),t[0]=e,t[1]=n,t[2]=o),t}return(0,o.default)(i,[{key:"set",value:function(t,e,n){return this[0]=t,this[1]=e,this[2]=n,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}},{key:"fromObject",value:function(t){return h.config.debug&&((0,f.checkNumber)(t.x),(0,f.checkNumber)(t.y),(0,f.checkNumber)(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(t){this[2]=(0,f.checkNumber)(t)}},{key:"angle",value:function(t){return d.angle(this,t)}},{key:"cross",value:function(t){return d.cross(this,this,t),this.check()}},{key:"rotateX",value:function(t){var e=t.radians,n=t.origin,r=void 0===n?v:n;return d.rotateX(this,this,r,e),this.check()}},{key:"rotateY",value:function(t){var e=t.radians,n=t.origin,r=void 0===n?v:n;return d.rotateY(this,this,r,e),this.check()}},{key:"rotateZ",value:function(t){var e=t.radians,n=t.origin,r=void 0===n?v:n;return d.rotateZ(this,this,r,e),this.check()}},{key:"transform",value:function(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return d.transformMat4(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return(0,p.vec3_transformMat4AsVector)(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return d.transformMat3(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return(0,p.vec3_transformMat2)(this,this,t),this.check()}},{key:"transformByQuaternion",value:function(t){return d.transformQuat(this,this,t),this.check()}}],[{key:"ZERO",get:function(){return y||(y=new i(0,0,0),Object.freeze(y)),y}}]),i}(c.default);e.default=m},function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.create=o,e.clone=function(t){var e=new i.ARRAY_TYPE(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},e.fromValues=function(t,e,n,r){var s=new i.ARRAY_TYPE(4);return s[0]=t,s[1]=e,s[2]=n,s[3]=r,s},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},e.set=function(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t},e.add=function(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},e.subtract=a,e.multiply=u,e.divide=l,e.ceil=function(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},e.floor=function(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},e.min=function(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},e.max=function(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},e.round=function(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},e.scale=function(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},e.scaleAndAdd=function(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},e.distance=c,e.squaredDistance=h,e.length=f,e.squaredLength=d,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},e.normalize=function(t,e){var n=e[0],r=e[1],i=e[2],s=e[3],o=n*n+r*r+i*i+s*s;return o>0&&(o=1/Math.sqrt(o)),t[0]=n*o,t[1]=r*o,t[2]=i*o,t[3]=s*o,t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},e.cross=function(t,e,n,r){var i=n[0]*r[1]-n[1]*r[0],s=n[0]*r[2]-n[2]*r[0],o=n[0]*r[3]-n[3]*r[0],a=n[1]*r[2]-n[2]*r[1],u=n[1]*r[3]-n[3]*r[1],l=n[2]*r[3]-n[3]*r[2],c=e[0],h=e[1],f=e[2],d=e[3];return t[0]=h*l-f*u+d*a,t[1]=-c*l+f*o-d*s,t[2]=c*u-h*o+d*i,t[3]=-c*a+h*s-f*i,t},e.lerp=function(t,e,n,r){var i=e[0],s=e[1],o=e[2],a=e[3];return t[0]=i+r*(n[0]-i),t[1]=s+r*(n[1]-s),t[2]=o+r*(n[2]-o),t[3]=a+r*(n[3]-a),t},e.random=function(t,e){var n,r,s,o,a,u;e=e||1;do{a=(n=2*i.RANDOM()-1)*n+(r=2*i.RANDOM()-1)*r}while(a>=1);do{u=(s=2*i.RANDOM()-1)*s+(o=2*i.RANDOM()-1)*o}while(u>=1);var l=Math.sqrt((1-a)/u);return t[0]=e*n,t[1]=e*r,t[2]=e*s*l,t[3]=e*o*l,t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1],s=e[2],o=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*s+n[12]*o,t[1]=n[1]*r+n[5]*i+n[9]*s+n[13]*o,t[2]=n[2]*r+n[6]*i+n[10]*s+n[14]*o,t[3]=n[3]*r+n[7]*i+n[11]*s+n[15]*o,t},e.transformQuat=function(t,e,n){var r=e[0],i=e[1],s=e[2],o=n[0],a=n[1],u=n[2],l=n[3],c=l*r+a*s-u*i,h=l*i+u*r-o*s,f=l*s+o*i-a*r,d=-o*r-a*i-u*s;return t[0]=c*l+d*-o+h*-u-f*-a,t[1]=h*l+d*-a+f*-o-c*-u,t[2]=f*l+d*-u+c*-a-h*-o,t[3]=e[3],t},e.zero=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},e.str=function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},e.equals=function(t,e){var n=t[0],r=t[1],s=t[2],o=t[3],a=e[0],u=e[1],l=e[2],c=e[3];return Math.abs(n-a)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-u)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(s-l)<=i.EPSILON*Math.max(1,Math.abs(s),Math.abs(l))&&Math.abs(o-c)<=i.EPSILON*Math.max(1,Math.abs(o),Math.abs(c))},e.forEach=e.sqrLen=e.len=e.sqrDist=e.dist=e.div=e.mul=e.sub=void 0;var i=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var n=s(e);if(n&&n.has(t))return n.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,n&&n.set(t,i),i}(n(40));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(s=function(t){return t?n:e})(t)}function o(){var t=new i.ARRAY_TYPE(4);return i.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function a(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 u(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 l(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 c(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],s=e[3]-t[3];return Math.hypot(n,r,i,s)}function h(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],s=e[3]-t[3];return n*n+r*r+i*i+s*s}function f(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function d(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}var p=a;e.sub=p;var g=u;e.mul=g;var y=l;e.div=y;var v=c;e.dist=v;var m=h;e.sqrDist=m;var _=f;e.len=_;var b=d;e.sqrLen=b;var x,E=(x=o(),function(t,e,n,r,i,s){var o,a;for(e||(e=4),n||(n=0),a=r?Math.min(r*e+n,t.length):t.length,o=n;o2&&void 0!==arguments[2]?arguments[2]:{};return i(t,n)!==e&&(function(t,e){for(var n=e.start,r=void 0===n?0:n,i=e.end,s=void 0===i?t.length:i,o=e.size,a=void 0===o?2:o,u=(s-r)/a,l=Math.floor(u/2),c=0;c2&&void 0!==arguments[2]?arguments[2]:{},i=n.start,s=void 0===i?0:i,o=n.end,a=void 0===o?t.length:o,u=n.size,l=void 0===u?2:u,c=n.isClosed,h=(a-s)/l,f=0;f2&&void 0!==arguments[2]?arguments[2]:{})!==e&&(t.reverse(),!0)},e.getPolygonWindingDirectionPoints=o,e.getPolygonSignedAreaPoints=a,e.forEachSegmentInPolygonPoints=function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.start,s=void 0===i?0:i,o=n.end,a=void 0===o?t.length:o,u=n.isClosed,l=s;l1&&void 0!==arguments[1]?arguments[1]:{};return Math.sign(s(t,e))}function s(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.start,r=void 0===n?0:n,i=e.end,s=void 0===i?t.length:i,o=e.size||2,a=0,u=r,l=s-o;u1&&void 0!==arguments[1]?arguments[1]:{};return Math.sign(a(t,e))}function a(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.start,r=void 0===n?0:n,i=e.end,s=void 0===i?t.length:i,o=0,a=r,u=s-1;a0){for(var i=!0,s=0;s4&&void 0!==arguments[4]?arguments[4]:[],s=r+e*n,o=0;o=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw s}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{};return t._workerFarm=t._workerFarm||new t({}),t._workerFarm.setProps(e),t._workerFarm}}]),t}();e.default=p,(0,o.default)(p,"_workerFarm",void 0)},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(21)),s=r(n(24)),o=r(n(22)),a=r(n(23)),u=r(n(2)),l=n(47),c=r(n(55)),h=r(n(78));function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e1&&void 0!==a[1]?a[1]:function(t,e,n){return t.done(n)},r=a.length>2&&void 0!==a[2]?a[2]:function(t,e){return t.error(e)},s=new Promise((function(t){return o.jobQueue.push({name:e,onMessage:n,onError:r,onStart:t}),o})),this._startQueuedJob(),t.next=6,s;case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"_startQueuedJob",value:(e=(0,s.default)(i.default.mark((function t(){var e,n,r;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.jobQueue.length){t.next=2;break}return t.abrupt("return");case 2:if(e=this._getAvailableWorker()){t.next=5;break}return t.abrupt("return");case 5:if(!(n=this.jobQueue.shift())){t.next=18;break}return this.onDebug({message:"Starting job",name:n.name,workerThread:e,backlog:this.jobQueue.length}),r=new h.default(n.name,e),e.onMessage=function(t){return n.onMessage(r,t.type,t.payload)},e.onError=function(t){return n.onError(r,t)},n.onStart(r),t.prev=12,t.next=15,r.result;case 15:return t.prev=15,this.returnWorkerToQueue(e),t.finish(15);case 18:case"end":return t.stop()}}),t,this,[[12,,15,18]])}))),function(){return e.apply(this,arguments)})},{key:"returnWorkerToQueue",value:function(t){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(t.destroy(),this.count--):this.idleQueue.push(t),this.isDestroyed||this._startQueuedJob()}},{key:"_getAvailableWorker",value:function(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count1&&void 0!==arguments[1]?arguments[1]:{},n=e[t.id]||{},s="".concat(t.id,"-worker.js"),o=n.workerUrl;if(o||"compression"!==t.id||(o=e.workerUrl),"test"===e._workerType&&(o="modules/".concat(t.module,"/dist/").concat(s)),!o){var a=t.version;"latest"===a&&(a=i);var u=a?"@".concat(a):"";o="https://unpkg.com/@loaders.gl/".concat(t.module).concat(u,"/dist/").concat(s)}return(0,r.assert)(o),o};var r=n(36),i=(n(46),"latest"),s="3.4.7"},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i,s=r(n(22)),o=r(n(23)),a=r(n(2));i=Symbol.asyncIterator;var u=function(){function t(){(0,s.default)(this,t),(0,a.default)(this,"_values",void 0),(0,a.default)(this,"_settlers",void 0),(0,a.default)(this,"_closed",void 0),this._values=[],this._settlers=[],this._closed=!1}return(0,o.default)(t,[{key:i,value:function(){return this}},{key:"push",value:function(t){return this.enqueue(t)}},{key:"enqueue",value:function(t){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");var e=this._settlers.shift();t instanceof Error?e.reject(t):e.resolve({value:t})}else this._values.push(t)}},{key:"close",value:function(){for(;this._settlers.length>0;)this._settlers.shift().resolve({done:!0});this._closed=!0}},{key:"next",value:function(){var t=this;if(this._values.length>0){var e=this._values.shift();return e instanceof Error?Promise.reject(e):Promise.resolve({done:!1,value:e})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0,value:void 0})}return new Promise((function(e,n){t._settlers.push({resolve:e,reject:n})}))}}]),t}();e.default=u},function(t,e,n){"use strict";function r(t,e,n){if(t.byteLength<=e+n)return"";for(var r=new DataView(t),i="",s=0;s1&&void 0!==arguments[1]?arguments[1]:5;return"string"==typeof t?t.slice(0,e):ArrayBuffer.isView(t)?r(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?r(t,0,e):""},e.getMagicString=r},function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}(s);try{for(l.s();!(i=l.n()).done;){var c=i.value;a.set(c,u),u+=c.byteLength}}catch(t){l.e(t)}finally{l.f()}return a.buffer},e.concatenateTypedArrays=function(){for(var t=arguments.length,e=new Array(t),n=0;n1&&r[0].constructor||null;if(!i)throw new Error('"concatenateTypedArrays" - incorrect quantity of arguments or arguments have incompatible data types');for(var s=new i(r.reduce((function(t,e){return t+e.length}),0)),o=0,a=0,u=r;a3&&void 0!==arguments[3]?arguments[3]:e.byteLength,i=new Uint8Array(t,n,r),s=new Uint8Array(e);return i.set(s),t},e.copyToArray=function(t,e,n){var r;if(t instanceof ArrayBuffer)r=new Uint8Array(t);else{var s=t.byteOffset,o=t.byteLength;r=new Uint8Array(t.buffer||t.arrayBuffer,s,o)}return e.set(r,n),n+i(r.byteLength,4)},e.padToNBytes=i;var r=n(76);function i(t,e){return(0,r.assert)(t>=0),(0,r.assert)(e>0),t+(e-1)&~(e-1)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toArrayBuffer=function(t){return t},e.toBuffer=function(t){throw new Error("Buffer not supported in browser")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.promisify1=function(t){return function(e){return new Promise((function(n,r){return t(e,(function(t,e){return t?r(t):n(e)}))}))}},e.promisify2=function(t){return function(e,n){return new Promise((function(r,i){return t(e,n,(function(t,e){return t?i(t):r(e)}))}))}},e.promisify3=function(t){return function(e,n,r){return new Promise((function(i,s){return t(e,n,r,(function(t,e){return t?s(t):i(e)}))}))}}},function(t,e,n){t.exports=n(9)(2943)},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.checkResponse=function(t){return l.apply(this,arguments)},e.checkResponseSync=function(t){if(!t.ok){var e="".concat(t.status," ").concat(t.statusText);throw e=e.length>60?"".concat(e.slice(0,60),"..."):e,new Error(e)}},e.makeResponse=function(t){return u.apply(this,arguments)};var i=r(n(21)),s=r(n(24)),o=n(32),a=n(44);function u(){return(u=(0,s.default)(i.default.mark((function t(e){var n,r,s,u,l,c;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(0,o.isResponse)(e)){t.next=2;break}return t.abrupt("return",e);case 2:return n={},(r=(0,a.getResourceContentLength)(e))>=0&&(n["content-length"]=String(r)),s=(0,a.getResourceUrl)(e),(u=(0,a.getResourceMIMEType)(e))&&(n["content-type"]=u),t.next=10,f(e);case 10:return(l=t.sent)&&(n["x-first-bytes"]=l),"string"==typeof e&&(e=(new TextEncoder).encode(e)),c=new Response(e,{headers:n}),Object.defineProperty(c,"url",{value:s}),t.abrupt("return",c);case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function l(){return(l=(0,s.default)(i.default.mark((function t(e){var n;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.ok){t.next=5;break}return t.next=3,c(e);case 3:throw n=t.sent,new Error(n);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function c(t){return h.apply(this,arguments)}function h(){return(h=(0,s.default)(i.default.mark((function t(e){var n,r,s;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n="Failed to fetch resource ".concat(e.url," (").concat(e.status,"): "),t.prev=1,r=e.headers.get("Content-Type"),s=e.statusText,!r.includes("application/json")){t.next=11;break}return t.t0=s,t.t1=" ",t.next=9,e.text();case 9:t.t2=t.sent,s=t.t0+=t.t1.concat.call(t.t1,t.t2);case 11:n=(n+=s).length>60?"".concat(n.slice(0,60),"..."):n,t.next=17;break;case 15:t.prev=15,t.t3=t.catch(1);case 17:return t.abrupt("return",n);case 18:case"end":return t.stop()}}),t,null,[[1,15]])})))).apply(this,arguments)}function f(t){return d.apply(this,arguments)}function d(){return(d=(0,s.default)(i.default.mark((function t(e){var n,r,s,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=5,"string"!=typeof e){t.next=3;break}return t.abrupt("return","data:,".concat(e.slice(0,n)));case 3:if(!(e instanceof Blob)){t.next=8;break}return r=e.slice(0,5),t.next=7,new Promise((function(t){var e=new FileReader;e.onload=function(e){var n;return t(null==e||null===(n=e.target)||void 0===n?void 0:n.result)},e.readAsDataURL(r)}));case 7:return t.abrupt("return",t.sent);case 8:if(!(e instanceof ArrayBuffer)){t.next=12;break}return s=e.slice(0,n),o=p(s),t.abrupt("return","data:base64,".concat(o));case 12:return t.abrupt("return",null);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(t){for(var e="",n=new Uint8Array(t),r=0;r{for(var n in e)i(t,n,{get:e[n],enumerable:!0})})(u,{COLOR:()=>g,LocalStorage:()=>c,Log:()=>N,addColor:()=>m,autobind:()=>_,default:()=>T,getHiResTimestamp:()=>E,leftPad:()=>h,rightPad:()=>f}),t.exports=(r=u,((t,e,n,r)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of o(e))a.call(t,n)||undefined===n||i(t,n,{get:()=>e[n],enumerable:!(r=s(e,n))||r.enumerable});return t})(i({},"__esModule",{value:!0}),r));var l=n(60),c=class{constructor(t,e,n="sessionStorage"){this.storage=function(t){try{const e=window[t],n="__storage_test__";return e.setItem(n,n),e.removeItem(n),e}catch(t){return null}}(n),this.id=t,this.config=e,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let t={};if(this.storage){const e=this.storage.getItem(this.id);t=e?JSON.parse(e):{}}return Object.assign(this.config,t),this}};function h(t,e=8){const n=Math.max(e-t.length,0);return`${" ".repeat(n)}${t}`}function f(t,e=8){const n=Math.max(e-t.length,0);return`${t}${" ".repeat(n)}`}function d(t,e,n,r=600){const i=t.src.replace(/\(/g,"%28").replace(/\)/g,"%29");t.width>r&&(n=Math.min(n,r/t.width));const s=t.width*n,o=t.height*n;return[`${e} %c+`,["font-size:1px;",`padding:${Math.floor(o/2)}px ${Math.floor(s/2)}px;`,`line-height:${o}px;`,`background:url(${i});`,`background-size:${s}px ${o}px;`,"color:transparent;"].join("")]}var p=n(60),g=(t=>(t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE",t))(g||{}),y=10;function v(t){return"string"!=typeof t?t:(t=t.toUpperCase(),g[t]||37)}function m(t,e,n){return p.isBrowser||"string"!=typeof t||(e&&(t=`[${v(e)}m${t}`),n&&(t=`[${v(n)+y}m${t}`)),t}function _(t,e=["constructor"]){const n=Object.getPrototypeOf(t),r=Object.getOwnPropertyNames(n),i=t;for(const n of r){const r=i[n];"function"==typeof r&&(e.find((t=>n===t))||(i[n]=r.bind(t)))}}function b(t,e){if(!t)throw new Error(e||"Assertion failed")}var x=n(60);function E(){var t,e,n,r,i;let s;if((0,x.isBrowser)()&&x.window.performance)s=null==(n=null==(e=null==(t=x.window)?void 0:t.performance)?void 0:e.now)?void 0:n.call(e);else if("hrtime"in x.process){const t=null==(i=null==(r=x.process)?void 0:r.hrtime)?void 0:i.call(r);s=1e3*t[0]+t[1]/1e6}else s=Date.now();return s}var w={debug:(0,l.isBrowser)()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},I={enabled:!0,level:0};function M(){}var O={},S={once:!0},N=class{constructor({id:t}={id:""}){this.VERSION=l.VERSION,this._startTs=E(),this._deltaTs=E(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=t,this.userData={},this._storage=new c(`__probe-${this.id}__`,I),this.timeStamp(`${this.id} started`),_(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((E()-this._startTs).toPrecision(10))}getDelta(){return Number((E()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._storage.setConfiguration({enabled:t}),this}setLevel(t){return this._storage.setConfiguration({level:t}),this}get(t){return this._storage.config[t]}set(t,e){this._storage.setConfiguration({[t]:e})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,e){b(t,e)}warn(t){return this._getLogFunction(0,t,w.warn,arguments,S)}error(t){return this._getLogFunction(0,t,w.error,arguments)}deprecated(t,e){return this.warn(`\`${t}\` is deprecated and will be removed in a later version. Use \`${e}\` instead`)}removed(t,e){return this.error(`\`${t}\` has been removed. Use \`${e}\` instead`)}probe(t,e){return this._getLogFunction(t,e,w.log,arguments,{time:!0,once:!0})}log(t,e){return this._getLogFunction(t,e,w.debug,arguments)}info(t,e){return this._getLogFunction(t,e,console.info,arguments)}once(t,e){return this._getLogFunction(t,e,w.debug||w.info,arguments,S)}table(t,e,n){return e?this._getLogFunction(t,e,console.table||M,n&&[n],{tag:L(e)}):M}image({logLevel:t,priority:e,image:n,message:r="",scale:i=1}){return this._shouldLog(t||e)?(0,l.isBrowser)()?function({image:t,message:e="",scale:n=1}){if("string"==typeof t){const r=new Image;return r.onload=()=>{const t=d(r,e,n);console.log(...t)},r.src=t,M}const r=t.nodeName||"";if("img"===r.toLowerCase())return console.log(...d(t,e,n)),M;if("canvas"===r.toLowerCase()){const r=new Image;return r.onload=()=>console.log(...d(r,e,n)),r.src=t.toDataURL(),M}return M}({image:n,message:r,scale:i}):function({image:t,message:e="",scale:n=1}){return console.warn("removed"),M}({image:n,message:r,scale:i}):M}time(t,e){return this._getLogFunction(t,e,console.time?console.time:console.info)}timeEnd(t,e){return this._getLogFunction(t,e,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,e){return this._getLogFunction(t,e,console.timeStamp||M)}group(t,e,n={collapsed:!1}){const r=C({logLevel:t,message:e,opts:n}),{collapsed:i}=n;return r.method=(i?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}groupCollapsed(t,e,n={}){return this.group(t,e,Object.assign({},n,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||M)}withGroup(t,e,n){this.group(t,e)();try{n()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=P(t)}_getLogFunction(t,e,n,r,i){if(this._shouldLog(t)){i=C({logLevel:t,message:e,args:r,opts:i}),b(n=n||i.method),i.total=this.getTotal(),i.delta=this.getDelta(),this._deltaTs=E();const s=i.tag||i.message;if(i.once&&s){if(O[s])return M;O[s]=E()}return e=function(t,e,n){if("string"==typeof e){const r=n.time?h(function(t){let e;return e=t<10?`${t.toFixed(2)}ms`:t<100?`${t.toFixed(1)}ms`:t<1e3?`${t.toFixed(0)}ms`:`${(t/1e3).toFixed(2)}s`,e}(n.total)):"";e=m(e=n.time?`${t}: ${r} ${e}`:`${t}: ${e}`,n.color,n.background)}return e}(this.id,i.message,i),n.bind(console,e,...i.args)}return M}};function P(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return b(Number.isFinite(e)&&e>=0),e}function C(t){const{logLevel:e,message:n}=t;t.logLevel=P(e);const r=t.args?Array.from(t.args):[];for(;r.length&&r.shift()!==n;);switch(typeof e){case"string":case"function":void 0!==n&&r.unshift(n),t.message=e;break;case"object":Object.assign(t,e)}"function"==typeof t.message&&(t.message=t.message());const i=typeof t.message;return b("string"===i||"object"===i),Object.assign(t,{args:r},t.opts)}function L(t){for(const e in t)for(const n in t[e])return n||"untitled";return"empty"}N.VERSION=l.VERSION,globalThis.probe={};var T=new N({id:"@probe.gl/log"})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._unregisterLoaders=function(){(0,i.getGlobalLoaderState)().loaderRegistry=[]},e.getRegisteredLoaders=function(){return o()},e.registerLoaders=function(t){var e,n=o(),i=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t))){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}(t=Array.isArray(t)?t:[t]);try{var a=function(){var t=e.value,i=(0,r.normalizeLoader)(t);n.find((function(t){return i===t}))||n.unshift(i)};for(i.s();!(e=i.n()).done;)a()}catch(t){i.e(t)}finally{i.f()}};var r=n(37),i=n(39);function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==h[1]?h[1]:[],r=e,s=!1,o=!1,t.prev=4,u=x(n);case 6:return t.next=8,u.next();case 8:if(!(s=!(l=t.sent).done)){t.next=14;break}c=l.value,r=c(r);case 11:s=!1,t.next=6;break;case 14:t.next=20;break;case 16:t.prev=16,t.t0=t.catch(4),o=!0,a=t.t0;case 20:if(t.prev=20,t.prev=21,!s||null==u.return){t.next=25;break}return t.next=25,u.return();case 25:if(t.prev=25,!o){t.next=28;break}throw a;case 28:return t.finish(25);case 29:return t.finish(20);case 30:return t.abrupt("return",r);case 31:case"end":return t.stop()}}),t,null,[[4,16,20,30],[21,,25,29]])}))),C.apply(this,arguments)}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.encode=y,e.encodeInBatches=_,e.encodeSync=function(t,e,n){if(e.encodeSync)return e.encodeSync(t,n);throw new Error("Writer could not synchronously encode data")},e.encodeText=function(t,e,n){return m.apply(this,arguments)},e.encodeURLtoURL=b;var i=r(n(21)),s=r(n(2)),o=r(n(24)),a=n(26),u=n(43),l=n(59),c=n(53),h=n(91);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e0?this.allocated*=2:100,this.columns={},this.schema){var e=this.schema[t],n=e.type||Float32Array,r=this.columns[e.index];if(r&&ArrayBuffer.isView(r)){var i=new n(this.allocated);i.set(r),this.columns[e.index]=i}else r?(r.length=this.allocated,this.columns[e.index]=r):this.columns[e.index]=new n(this.allocated)}}},{key:"_pruneColumns",value:function(){for(var t=0,e=Object.entries(this.columns);t0&&void 0!==arguments[0]?arguments[0]:{};(0,i.default)(this,t),(0,o.default)(this,"options",d),(0,o.default)(this,"bufferCheckPosition",l),(0,o.default)(this,"q",""),(0,o.default)(this,"c",""),(0,o.default)(this,"p",""),(0,o.default)(this,"closed",!1),(0,o.default)(this,"closedRoot",!1),(0,o.default)(this,"sawRoot",!1),(0,o.default)(this,"error",null),(0,o.default)(this,"state",c.BEGIN),(0,o.default)(this,"stack",[]),(0,o.default)(this,"position",0),(0,o.default)(this,"column",0),(0,o.default)(this,"line",1),(0,o.default)(this,"slashed",!1),(0,o.default)(this,"unicodeI",0),(0,o.default)(this,"unicodeS",null),(0,o.default)(this,"depth",0),(0,o.default)(this,"textNode",void 0),(0,o.default)(this,"numberNode",void 0),this.options=u(u({},d),e),this.textNode=void 0,this.numberNode="",this.emit("onready")}return(0,s.default)(t,[{key:"end",value:function(){return this.state===c.VALUE&&0===this.depth||this._error("Unexpected end"),this._closeValue(),this.c="",this.closed=!0,this.emit("onend"),this}},{key:"resume",value:function(){return this.error=null,this}},{key:"close",value:function(){return this.write(null)}},{key:"emit",value:function(t,e){var n,r;null===(n=(r=this.options)[t])||void 0===n||n.call(r,e,this)}},{key:"emitNode",value:function(t,e){this._closeValue(),this.emit(t,e)}},{key:"write",value:function(t){if(this.error)throw this.error;if(this.closed)return this._error("Cannot write after close. Assign an onready handler.");if(null===t)return this.end();for(var e=0,n=t.charCodeAt(0),r=this.p;n&&(r=n,this.c=n=t.charCodeAt(e++),r!==n?this.p=r:r=this.p,n);)switch(this.position++,n===h.lineFeed?(this.line++,this.column=0):this.column++,this.state){case c.BEGIN:n===h.openBrace?this.state=c.OPEN_OBJECT:n===h.openBracket?this.state=c.OPEN_ARRAY:g(n)||this._error("Non-whitespace before {[.");continue;case c.OPEN_KEY:case c.OPEN_OBJECT:if(g(n))continue;if(this.state===c.OPEN_KEY)this.stack.push(c.CLOSE_KEY);else{if(n===h.closeBrace){this.emit("onopenobject"),this.depth++,this.emit("oncloseobject"),this.depth--,this.state=this.stack.pop()||c.VALUE;continue}this.stack.push(c.CLOSE_OBJECT)}n===h.doubleQuote?this.state=c.STRING:this._error('Malformed object key should start with "');continue;case c.CLOSE_KEY:case c.CLOSE_OBJECT:if(g(n))continue;n===h.colon?(this.state===c.CLOSE_OBJECT?(this.stack.push(c.CLOSE_OBJECT),this._closeValue("onopenobject"),this.depth++):this._closeValue("onkey"),this.state=c.VALUE):n===h.closeBrace?(this.emitNode("oncloseobject"),this.depth--,this.state=this.stack.pop()||c.VALUE):n===h.comma?(this.state===c.CLOSE_OBJECT&&this.stack.push(c.CLOSE_OBJECT),this._closeValue(),this.state=c.OPEN_KEY):this._error("Bad object");continue;case c.OPEN_ARRAY:case c.VALUE:if(g(n))continue;if(this.state===c.OPEN_ARRAY){if(this.emit("onopenarray"),this.depth++,this.state=c.VALUE,n===h.closeBracket){this.emit("onclosearray"),this.depth--,this.state=this.stack.pop()||c.VALUE;continue}this.stack.push(c.CLOSE_ARRAY)}n===h.doubleQuote?this.state=c.STRING:n===h.openBrace?this.state=c.OPEN_OBJECT:n===h.openBracket?this.state=c.OPEN_ARRAY:n===h.t?this.state=c.TRUE:n===h.f?this.state=c.FALSE:n===h.n?this.state=c.NULL:n===h.minus?this.numberNode+="-":h._0<=n&&n<=h._9?(this.numberNode+=String.fromCharCode(n),this.state=c.NUMBER_DIGIT):this._error("Bad value");continue;case c.CLOSE_ARRAY:if(n===h.comma)this.stack.push(c.CLOSE_ARRAY),this._closeValue("onvalue"),this.state=c.VALUE;else if(n===h.closeBracket)this.emitNode("onclosearray"),this.depth--,this.state=this.stack.pop()||c.VALUE;else{if(g(n))continue;this._error("Bad array")}continue;case c.STRING:void 0===this.textNode&&(this.textNode="");var i=e-1,s=this.slashed,o=this.unicodeI;t:for(;;){for(;o>0;)if(this.unicodeS+=String.fromCharCode(n),n=t.charCodeAt(e++),this.position++,4===o?(this.textNode+=String.fromCharCode(parseInt(this.unicodeS,16)),o=0,i=e-1):o++,!n)break t;if(n===h.doubleQuote&&!s){this.state=this.stack.pop()||c.VALUE,this.textNode+=t.substring(i,e-1),this.position+=e-1-i;break}if(n===h.backslash&&!s&&(s=!0,this.textNode+=t.substring(i,e-1),this.position+=e-1-i,n=t.charCodeAt(e++),this.position++,!n))break;if(s){if(s=!1,n===h.n?this.textNode+="\n":n===h.r?this.textNode+="\r":n===h.t?this.textNode+="\t":n===h.f?this.textNode+="\f":n===h.b?this.textNode+="\b":n===h.u?(o=1,this.unicodeS=""):this.textNode+=String.fromCharCode(n),n=t.charCodeAt(e++),this.position++,i=e-1,n)continue;break}f.lastIndex=e;var a=f.exec(t);if(null===a){e=t.length+1,this.textNode+=t.substring(i,e-1),this.position+=e-1-i;break}if(e=a.index+1,!(n=t.charCodeAt(a.index))){this.textNode+=t.substring(i,e-1),this.position+=e-1-i;break}}this.slashed=s,this.unicodeI=o;continue;case c.TRUE:n===h.r?this.state=c.TRUE2:this._error("Invalid true started with t".concat(n));continue;case c.TRUE2:n===h.u?this.state=c.TRUE3:this._error("Invalid true started with tr".concat(n));continue;case c.TRUE3:n===h.e?(this.emit("onvalue",!0),this.state=this.stack.pop()||c.VALUE):this._error("Invalid true started with tru".concat(n));continue;case c.FALSE:n===h.a?this.state=c.FALSE2:this._error("Invalid false started with f".concat(n));continue;case c.FALSE2:n===h.l?this.state=c.FALSE3:this._error("Invalid false started with fa".concat(n));continue;case c.FALSE3:n===h.s?this.state=c.FALSE4:this._error("Invalid false started with fal".concat(n));continue;case c.FALSE4:n===h.e?(this.emit("onvalue",!1),this.state=this.stack.pop()||c.VALUE):this._error("Invalid false started with fals".concat(n));continue;case c.NULL:n===h.u?this.state=c.NULL2:this._error("Invalid null started with n".concat(n));continue;case c.NULL2:n===h.l?this.state=c.NULL3:this._error("Invalid null started with nu".concat(n));continue;case c.NULL3:n===h.l?(this.emit("onvalue",null),this.state=this.stack.pop()||c.VALUE):this._error("Invalid null started with nul".concat(n));continue;case c.NUMBER_DECIMAL_POINT:n===h.period?(this.numberNode+=".",this.state=c.NUMBER_DIGIT):this._error("Leading zero not followed by .");continue;case c.NUMBER_DIGIT:h._0<=n&&n<=h._9?this.numberNode+=String.fromCharCode(n):n===h.period?(-1!==this.numberNode.indexOf(".")&&this._error("Invalid number has two dots"),this.numberNode+="."):n===h.e||n===h.E?(-1===this.numberNode.indexOf("e")&&-1===this.numberNode.indexOf("E")||this._error("Invalid number has two exponential"),this.numberNode+="e"):n===h.plus||n===h.minus?(r!==h.e&&r!==h.E&&this._error("Invalid symbol in number"),this.numberNode+=String.fromCharCode(n)):(this._closeNumber(),e--,this.state=this.stack.pop()||c.VALUE);continue;default:this._error("Unknown state: ".concat(this.state))}return this.position>=this.bufferCheckPosition&&function(t){for(var e=Math.max(l,10),n=0,r=0,i=["textNode","numberNode"];re&&("text"===s||t._error("Max buffer length exceeded: ".concat(s))),n=Math.max(n,o)}t.bufferCheckPosition=l-n+t.position}(this),this.emit("onchunkparsed"),this}},{key:"_closeValue",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"onvalue";void 0!==this.textNode&&this.emit(t,this.textNode),this.textNode=void 0}},{key:"_closeNumber",value:function(){this.numberNode&&this.emit("onvalue",parseFloat(this.numberNode)),this.numberNode=""}},{key:"_error",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this._closeValue(),t+="\nLine: ".concat(this.line,"\nColumn: ").concat(this.column,"\nChar: ").concat(this.c);var e=new Error(t);this.error=e,this.emit("onerror",e)}}]),t}();function g(t){return t===h.carriageReturn||t===h.lineFeed||t===h.space||t===h.tab}e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"binaryToGeoJson",{enumerable:!0,get:function(){return o.binaryToGeoJson}}),Object.defineProperty(e,"binaryToGeojson",{enumerable:!0,get:function(){return o.binaryToGeojson}}),Object.defineProperty(e,"binaryToGeometry",{enumerable:!0,get:function(){return o.binaryToGeometry}}),Object.defineProperty(e,"flatGeojsonToBinary",{enumerable:!0,get:function(){return r.flatGeojsonToBinary}}),Object.defineProperty(e,"geojsonToBinary",{enumerable:!0,get:function(){return i.geojsonToBinary}}),Object.defineProperty(e,"geojsonToFlatGeojson",{enumerable:!0,get:function(){return s.geojsonToFlatGeojson}}),Object.defineProperty(e,"transformBinaryCoords",{enumerable:!0,get:function(){return a.transformBinaryCoords}}),Object.defineProperty(e,"transformGeoJsonCoords",{enumerable:!0,get:function(){return a.transformGeoJsonCoords}});var r=n(106),i=n(204),s=n(117),o=n(206),a=n(207)},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.TEST_EXPORTS=void 0,e.flatGeojsonToBinary=function(t,e,n){var r=h(t),i=Object.keys(r).filter((function(t){return r[t]!==Array}));return function(t,e,n){for(var r=e.pointPositionsCount,i=e.pointFeaturesCount,s=e.linePositionsCount,a=e.linePathsCount,u=e.lineFeaturesCount,c=e.polygonPositionsCount,h=e.polygonObjectsCount,g=e.polygonRingsCount,v=e.polygonFeaturesCount,_=e.propArrayTypes,b=e.coordLength,x=n.numericPropKeys,E=void 0===x?[]:x,w=n.PositionDataType,I=void 0===w?Float32Array:w,M=(t[0]&&"id"in t[0]),O=t.length>65535?Uint32Array:Uint16Array,S={type:"Point",positions:new I(r*b),globalFeatureIds:new O(r),featureIds:i>65535?new Uint32Array(r):new Uint16Array(r),numericProps:{},properties:[],fields:[]},N={type:"LineString",pathIndices:s>65535?new Uint32Array(a+1):new Uint16Array(a+1),positions:new I(s*b),globalFeatureIds:new O(s),featureIds:u>65535?new Uint32Array(s):new Uint16Array(s),numericProps:{},properties:[],fields:[]},P={type:"Polygon",polygonIndices:c>65535?new Uint32Array(h+1):new Uint16Array(h+1),primitivePolygonIndices:c>65535?new Uint32Array(g+1):new Uint16Array(g+1),positions:new I(c*b),triangles:[],globalFeatureIds:new O(c),featureIds:v>65535?new Uint32Array(c):new Uint16Array(c),numericProps:{},properties:[],fields:[]},C=0,L=[S,N,P];C=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){u=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(u)throw s}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return(0,o.default)(this,i),t=r.call(this,-0,-0,-0,-0),(0,f.isArray)(e)&&1===arguments.length?t.copy(e):(f.config.debug&&((0,d.checkNumber)(e),(0,d.checkNumber)(n),(0,d.checkNumber)(s),(0,d.checkNumber)(a)),t[0]=e,t[1]=n,t[2]=s,t[3]=a),t}return(0,a.default)(i,[{key:"set",value:function(t,e,n,r){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}},{key:"fromObject",value:function(t){return f.config.debug&&((0,d.checkNumber)(t.x),(0,d.checkNumber)(t.y),(0,d.checkNumber)(t.z),(0,d.checkNumber)(t.w)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t.z=this[2],t.w=this[3],t}},{key:"ELEMENTS",get:function(){return 4}},{key:"z",get:function(){return this[2]},set:function(t){this[2]=(0,d.checkNumber)(t)}},{key:"w",get:function(){return this[3]},set:function(t){this[3]=(0,d.checkNumber)(t)}},{key:"transform",value:function(t){return p.transformMat4(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return(0,g.vec4_transformMat3)(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return(0,g.vec4_transformMat2)(this,this,t),this.check()}},{key:"transformByQuaternion",value:function(t){return p.transformQuat(this,this,t),this.check()}},{key:"applyMatrix4",value:function(t){return t.transform(this,this),this}}],[{key:"ZERO",get:function(){return s||(s=new i(0,0,0,0),Object.freeze(s)),s}}]),i}(h.default);e.default=v},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(22)),s=r(n(23)),o=r(n(28)),a=r(n(29)),u=r(n(27)),l=r(n(52)),c=n(34),h=n(33);var f=function(t){(0,o.default)(l,t);var e,n,r=(e=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,u.default)(e);if(n){var i=(0,u.default)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,a.default)(this,t)});function l(){return(0,i.default)(this,l),r.apply(this,arguments)}return(0,s.default)(l,[{key:"toString",value:function(){var t="[";if(h.config.printRowMajor){t+="row-major:";for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),n=t*this.RANK,r=0;r0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}},{key:"getTranslation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}},{key:"getRotation",value:function(t,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];var n=this.getScale(e),r=1/n[0],i=1/n[1],s=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*s,t[3]=0,t[4]=this[4]*r,t[5]=this[5]*i,t[6]=this[6]*s,t[7]=0,t[8]=this[8]*r,t[9]=this[9]*i,t[10]=this[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{key:"getRotationMatrix3",value:function(t,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];var n=this.getScale(e),r=1/n[0],i=1/n[1],s=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*s,t[3]=this[4]*r,t[4]=this[5]*i,t[5]=this[6]*s,t[6]=this[8]*r,t[7]=this[9]*i,t[8]=this[10]*s,t}},{key:"transpose",value:function(){return p.transpose(this,this),this.check()}},{key:"invert",value:function(){return p.invert(this,this),this.check()}},{key:"multiplyLeft",value:function(t){return p.multiply(this,t,this),this.check()}},{key:"multiplyRight",value:function(t){return p.multiply(this,this,t),this.check()}},{key:"rotateX",value:function(t){return p.rotateX(this,this,t),this.check()}},{key:"rotateY",value:function(t){return p.rotateY(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return p.rotateZ(this,this,t),this.check()}},{key:"rotateXYZ",value:function(t){return this.rotateX(t[0]).rotateY(t[1]).rotateZ(t[2])}},{key:"rotateAxis",value:function(t,e){return p.rotate(this,this,t,e),this.check()}},{key:"scale",value:function(t){return p.scale(this,this,Array.isArray(t)?t:[t,t,t]),this.check()}},{key:"translate",value:function(t){return p.translate(this,this,t),this.check()}},{key:"transform",value:function(t,e){return 4===t.length?(e=v.transformMat4(e||[-0,-0,-0,-0],t,this),(0,f.checkVector)(e,4),e):this.transformAsPoint(t,e)}},{key:"transformAsPoint",value:function(t,e){var n;switch(t.length){case 2:n=g.transformMat4(e||[-0,-0],t,this);break;case 3:n=y.transformMat4(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return(0,f.checkVector)(n,t.length),n}},{key:"transformAsVector",value:function(t,e){var n;switch(t.length){case 2:n=(0,d.vec2_transformMat4AsVector)(e||[-0,-0],t,this);break;case 3:n=(0,d.vec3_transformMat4AsVector)(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return(0,f.checkVector)(n,t.length),n}},{key:"transformPoint",value:function(t,e){return this.transformAsPoint(t,e)}},{key:"transformVector",value:function(t,e){return this.transformAsPoint(t,e)}},{key:"transformDirection",value:function(t,e){return this.transformAsVector(t,e)}},{key:"makeRotationX",value:function(t){return this.identity().rotateX(t)}},{key:"makeTranslation",value:function(t,e,n){return this.identity().translate([t,e,n])}}],[{key:"IDENTITY",get:function(){return O()}},{key:"ZERO",get:function(){return M()}}]),i}(h.default);function M(){return b||(b=new I([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Object.freeze(b)),b}function O(){return x||(x=new I,Object.freeze(x)),x}function S(t){if(t>2*Math.PI)throw Error("expected radians")}e.default=I},function(t,e,n){"use strict";var r=n(20),i=n(25);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=r(n(22)),o=r(n(23)),a=r(n(28)),u=r(n(29)),l=r(n(27)),c=r(n(52)),h=n(34),f=r(n(109)),d=y(n(198)),p=y(n(71));function g(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(g=function(t){return t?n:e})(t)}function y(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var n=g(e);if(n&&n.has(t))return n.get(t);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var a=s?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}var v=[0,0,0,1],m=function(t){(0,a.default)(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,l.default)(e);if(n){var i=(0,l.default)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.default)(this,t)});function i(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return(0,s.default)(this,i),t=r.call(this,-0,-0,-0,-0),Array.isArray(e)&&1===arguments.length?t.copy(e):t.set(e,n,o,a),t}return(0,o.default)(i,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}},{key:"set",value:function(t,e,n,r){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this.check()}},{key:"fromObject",value:function(t){return this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this.check()}},{key:"fromMatrix3",value:function(t){return d.fromMat3(this,t),this.check()}},{key:"fromAxisRotation",value:function(t,e){return d.setAxisAngle(this,t,e),this.check()}},{key:"identity",value:function(){return d.identity(this),this.check()}},{key:"setAxisAngle",value:function(t,e){return this.fromAxisRotation(t,e)}},{key:"ELEMENTS",get:function(){return 4}},{key:"x",get:function(){return this[0]},set:function(t){this[0]=(0,h.checkNumber)(t)}},{key:"y",get:function(){return this[1]},set:function(t){this[1]=(0,h.checkNumber)(t)}},{key:"z",get:function(){return this[2]},set:function(t){this[2]=(0,h.checkNumber)(t)}},{key:"w",get:function(){return this[3]},set:function(t){this[3]=(0,h.checkNumber)(t)}},{key:"len",value:function(){return d.length(this)}},{key:"lengthSquared",value:function(){return d.squaredLength(this)}},{key:"dot",value:function(t){return d.dot(this,t)}},{key:"rotationTo",value:function(t,e){return d.rotationTo(this,t,e),this.check()}},{key:"add",value:function(t){return d.add(this,this,t),this.check()}},{key:"calculateW",value:function(){return d.calculateW(this,this),this.check()}},{key:"conjugate",value:function(){return d.conjugate(this,this),this.check()}},{key:"invert",value:function(){return d.invert(this,this),this.check()}},{key:"lerp",value:function(t,e,n){return void 0===n?this.lerp(this,t,e):(d.lerp(this,t,e,n),this.check())}},{key:"multiplyRight",value:function(t){return d.multiply(this,this,t),this.check()}},{key:"multiplyLeft",value:function(t){return d.multiply(this,t,this),this.check()}},{key:"normalize",value:function(){var t=this.len(),e=t>0?1/t:0;return this[0]=this[0]*e,this[1]=this[1]*e,this[2]=this[2]*e,this[3]=this[3]*e,0===t&&(this[3]=1),this.check()}},{key:"rotateX",value:function(t){return d.rotateX(this,this,t),this.check()}},{key:"rotateY",value:function(t){return d.rotateY(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return d.rotateZ(this,this,t),this.check()}},{key:"scale",value:function(t){return d.scale(this,this,t),this.check()}},{key:"slerp",value:function(t,e,n){var r,i,s;switch(arguments.length){case 1:var o=t,a=o.start;r=void 0===a?v:a,i=o.target,s=o.ratio;break;case 2:r=this,i=t,s=e;break;default:r=t,i=e,s=n}return d.slerp(this,r,i,s),this.check()}},{key:"transformVector4",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new f.default;return p.transformQuat(e,t,this),(0,h.checkVector)(e,4)}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"setFromAxisAngle",value:function(t,e){return this.setAxisAngle(t,e)}},{key:"premultiply",value:function(t){return this.multiplyLeft(t)}},{key:"multiply",value:function(t){return this.multiplyRight(t)}}]),i}(c.default);e.default=m},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(35)),s=r(n(22)),o=r(n(23)),a=r(n(28)),u=r(n(29)),l=r(n(27)),c=r(n(52)),h=r(n(113)),f=n(33),d=n(34);var p,g="Unknown Euler angle order",y=.99999;!function(t){t[t.ZYX=0]="ZYX",t[t.YXZ=1]="YXZ",t[t.XZY=2]="XZY",t[t.ZXY=3]="ZXY",t[t.YZX=4]="YZX",t[t.XYZ=5]="XYZ"}(p||(p={}));var v=function(t){(0,a.default)(c,t);var e,n,r=(e=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,l.default)(e);if(n){var i=(0,l.default)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.default)(this,t)});function c(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c.DefaultOrder;return(0,s.default)(this,c),t=r.call(this,-0,-0,-0,-0),arguments.length>0&&Array.isArray(arguments[0])?(e=t).fromVector3.apply(e,arguments):t.set(n,i,o,a),t}return(0,o.default)(c,[{key:"ELEMENTS",get:function(){return 4}},{key:"fromQuaternion",value:function(t){var e=(0,i.default)(t,4),n=e[0],r=e[1],s=e[2],o=e[3],a=r*r,u=-2*(a+s*s)+1,l=2*(n*r+o*s),h=-2*(n*s-o*r),f=2*(r*s+o*n),d=-2*(n*n+a)+1;h=(h=h>1?1:h)<-1?-1:h;var p=Math.atan2(f,d),g=Math.asin(h),y=Math.atan2(l,u);return this.set(p,g,y,c.RollPitchYaw)}},{key:"fromObject",value:function(t){throw new Error("not implemented")}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=Number.isFinite(t[3])||this.order,this.check()}},{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;return this[0]=t,this[1]=e,this[2]=n,this[3]=Number.isFinite(r)?r:this[3],this.check()}},{key:"validate",value:function(){return(t=this[3])>=0&&t<6&&Number.isFinite(this[0])&&Number.isFinite(this[1])&&Number.isFinite(this[2]);var t}},{key:"toArray",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t}},{key:"toArray4",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t[e+3]=this[3],t}},{key:"toVector3",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=this[0],t[1]=this[1],t[2]=this[2],t}},{key:"x",get:function(){return this[0]},set:function(t){this[0]=(0,d.checkNumber)(t)}},{key:"y",get:function(){return this[1]},set:function(t){this[1]=(0,d.checkNumber)(t)}},{key:"z",get:function(){return this[2]},set:function(t){this[2]=(0,d.checkNumber)(t)}},{key:"alpha",get:function(){return this[0]},set:function(t){this[0]=(0,d.checkNumber)(t)}},{key:"beta",get:function(){return this[1]},set:function(t){this[1]=(0,d.checkNumber)(t)}},{key:"gamma",get:function(){return this[2]},set:function(t){this[2]=(0,d.checkNumber)(t)}},{key:"phi",get:function(){return this[0]},set:function(t){this[0]=(0,d.checkNumber)(t)}},{key:"theta",get:function(){return this[1]},set:function(t){this[1]=(0,d.checkNumber)(t)}},{key:"psi",get:function(){return this[2]},set:function(t){this[2]=(0,d.checkNumber)(t)}},{key:"roll",get:function(){return this[0]},set:function(t){this[0]=(0,d.checkNumber)(t)}},{key:"pitch",get:function(){return this[1]},set:function(t){this[1]=(0,d.checkNumber)(t)}},{key:"yaw",get:function(){return this[2]},set:function(t){this[2]=(0,d.checkNumber)(t)}},{key:"order",get:function(){return this[3]},set:function(t){this[3]=function(t){if(t<0&&t>=6)throw new Error(g);return t}(t)}},{key:"fromVector3",value:function(t,e){return this.set(t[0],t[1],t[2],Number.isFinite(e)?e:this[3])}},{key:"fromArray",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this[0]=t[0+e],this[1]=t[1+e],this[2]=t[2+e],void 0!==t[3]&&(this[3]=t[3]),this.check()}},{key:"fromRollPitchYaw",value:function(t,e,n){return this.set(t,e,n,p.ZYX)}},{key:"fromRotationMatrix",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.DefaultOrder;return this._fromRotationMatrix(t,e),this.check()}},{key:"getRotationMatrix",value:function(t){return this._getRotationMatrix(t)}},{key:"getQuaternion",value:function(){var t=new h.default;switch(this[4]){case p.XYZ:return t.rotateX(this[0]).rotateY(this[1]).rotateZ(this[2]);case p.YXZ:return t.rotateY(this[0]).rotateX(this[1]).rotateZ(this[2]);case p.ZXY:return t.rotateZ(this[0]).rotateX(this[1]).rotateY(this[2]);case p.ZYX:return t.rotateZ(this[0]).rotateY(this[1]).rotateX(this[2]);case p.YZX:return t.rotateY(this[0]).rotateZ(this[1]).rotateX(this[2]);case p.XZY:return t.rotateX(this[0]).rotateZ(this[1]).rotateY(this[2]);default:throw new Error(g)}}},{key:"_fromRotationMatrix",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.DefaultOrder,n=t[0],r=t[4],i=t[8],s=t[1],o=t[5],a=t[9],u=t[2],l=t[6],h=t[10];switch(e=e||this[3]){case c.XYZ:this[1]=Math.asin((0,f.clamp)(i,-1,1)),Math.abs(i)4&&void 0!==arguments[4]?arguments[4]:[];if(8&n)i=(r[3]-t[1])/(e[1]-t[1]),s=3;else if(4&n)i=(r[1]-t[1])/(e[1]-t[1]),s=1;else if(2&n)i=(r[2]-t[0])/(e[0]-t[0]),s=2;else{if(!(1&n))return null;i=(r[0]-t[0])/(e[0]-t[0]),s=0}for(var a=0;ae[2]&&(n|=2),t[1]e[3]&&(n|=8),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cutPolylineByGrid=function(t,e){var n,s,o=e||{},a=o.size,u=void 0===a?2:a,h=o.broken,f=void 0!==h&&h,d=o.gridResolution,p=void 0===d?10:d,g=o.gridOffset,y=void 0===g?[0,0]:g,v=o.startIndex,m=void 0===v?0:v,_=o.endIndex,b=((void 0===_?t.length:_)-m)/u,x=[],E=[x],w=(0,i.getPointAtIndex)(t,0,u,m),I=l(w,p,y,[]),M=[];(0,i.push)(x,w);for(var O=1;Ou&&(x=[],E.push(x),(0,i.push)(x,w)),s=(0,r.bitCode)(n,I)}(0,i.push)(x,n),(0,i.copy)(w,n)}return f?E:E[0]},e.cutPolygonByGrid=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0;if(!t.length)return[];for(var i=n||{},s=i.size,c=void 0===s?2:s,f=i.gridResolution,d=void 0===f?10:f,p=i.gridOffset,g=void 0===p?[0,0]:p,y=i.edgeTypes,v=void 0!==y&&y,m=[],_=[{pos:t,types:v?new Array(t.length/c).fill(o):null,holes:e||[]}],b=[[],[]],x=[];_.length;){var E=_.shift(),w=E.pos,I=E.types,M=E.holes;h(w,c,M[0]||w.length,b),x=l(b[0],d,g,x);var O=(0,r.bitCode)(b[1],x);if(O){var S=u(w,I,c,0,M[0]||w.length,x,O),N={pos:S[0].pos,types:S[0].types,holes:[]},P={pos:S[1].pos,types:S[1].types,holes:[]};_.push(N,P);for(var C=0;C=0?((0,i.push)(g,c)&&v.push(f),w+=h):v.length&&(v[v.length-1]=s),(0,i.copy)(_,c),b=h,x=f;return[E?{pos:p,types:e&&y}:null,w?{pos:g,types:e&&v}:null]}function l(t,e,n,r){var i=Math.floor((t[0]-n[0])/e)*e+n[0],s=Math.floor((t[1]-n[1])/e)*e+n[1];return r[0]=i,r[1]=s,r[2]=i+e,r[3]=s+e,r}function c(t,e,n){8&n?(t[1]+=e,t[3]+=e):4&n?(t[1]-=e,t[3]-=e):2&n?(t[0]+=e,t[2]+=e):1&n&&(t[0]-=e,t[2]-=e)}function h(t,e,n,r){for(var i=1/0,s=-1/0,o=1/0,a=-1/0,u=0;us?l:s,o=ca?c:a}return r[0][0]=i,r[0][1]=o,r[1][0]=s,r[1][1]=a,r}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.geojsonToFlatGeojson=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{coordLength:2,fixRingWinding:!0};return t.map((function(t){return function(t,e){var n=t.geometry;if("GeometryCollection"===n.type)throw new Error("GeometryCollection type not supported");var r,i,s=[],o=[];switch(n.type){case"Point":i="Point",h(n.coordinates,s,o,e);break;case"MultiPoint":i="Point",n.coordinates.map((function(t){return h(t,s,o,e)}));break;case"LineString":i="LineString",f(n.coordinates,s,o,e);break;case"MultiLineString":i="LineString",n.coordinates.map((function(t){return f(t,s,o,e)}));break;case"Polygon":i="Polygon",r=[],d(n.coordinates,s,o,r,e);break;case"MultiPolygon":i="Polygon",r=[],n.coordinates.map((function(t){return d(t,s,o,r,e)}));break;default:throw new Error("Unknown type: ".concat(i))}return u(u({},t),{},{geometry:{type:i,indices:o,data:s,areas:r}})}(t,e)}))};var i=r(n(2)),s=r(n(38)),o=n(107);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw s}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&y)&&(d.reverse(),g=-g),u.push(g),f(d,e,c,i),a++}}catch(t){h.e(t)}finally{h.f()}a>0&&(r.push(u),n.push(c))}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(35)),s=r(n(22)),o=r(n(23)),a=r(n(2));function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw s}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t)return!0}catch(t){r.e(t)}finally{r.f()}return!1}},{key:"findBufferOffsets",value:function(t){for(var e=-this.offset,n=[],r=0;r0&&this.offset-this.maxRewindBytes>=this.arrayBuffers[0].byteLength;)this.offset-=this.arrayBuffers[0].byteLength,this.arrayBuffers.shift()}},{key:"_combineArrayBuffers",value:function(t){var e,n=0,r=u(t);try{for(r.s();!(e=r.n()).done;){var s=e.value,o=(0,i.default)(s[1],2),a=o[0];n+=o[1]-a}}catch(t){r.e(t)}finally{r.f()}var l,c=new Uint8Array(n),h=0,f=u(t);try{for(f.s();!(l=f.n()).done;){var d=l.value,p=(0,i.default)(d,2),g=p[0],y=(0,i.default)(p[1],2),v=y[0],m=y[1],_=new Uint8Array(this.arrayBuffers[g]);c.set(_.subarray(v,m),h),h+=m-v}}catch(t){f.e(t)}finally{f.f()}return c.buffer}},{key:"skip",value:function(t){this.offset+=t}},{key:"rewind",value:function(t){this.offset-=t}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseSHPHeader=function(t){var e={magic:t.getInt32(0,i),length:2*t.getInt32(24,i),version:t.getInt32(28,r),type:t.getInt32(32,r),bbox:{minX:t.getFloat64(36,r),minY:t.getFloat64(44,r),minZ:t.getFloat64(68,r),minM:t.getFloat64(84,r),maxX:t.getFloat64(52,r),maxY:t.getFloat64(60,r),maxZ:t.getFloat64(76,r),maxM:t.getFloat64(92,r)}};return e.magic!==s&&console.error("SHP file: bad magic number ".concat(e.magic)),1e3!==e.version&&console.error("SHP file: bad version ".concat(e.version)),e};var r=!0,i=!1,s=9994},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.DBFWorkerLoader=e.DBFLoader=void 0;var i=r(n(21)),s=r(n(24)),o=r(n(2)),a=n(218);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e>>=1)e+=(t.high&n)===n?"1":"0";for(n=2147483648;0>>=1)e+=(t.low&n)===n?"1":"0";return e},s.isNaN=function(t){return Number.isNaN(t)},s.isInfinite=function(t){return!Number.isFinite(t)},s.MAX_VALUE=Number.MAX_VALUE,s.longBitsToDouble="function"==typeof Float64Array&&"function"==typeof Int32Array?(c=2146435072,h=new Float64Array(1),f=new Int32Array(h.buffer),s.doubleToLongBits=function(t){h[0]=t;var e=0|f[0],n=0|f[1];return(n&c)===c&&0!=(1048575&n)&&0!==e&&(e=0,n=2146959360),new i(n,e)},function(t){return f[0]=t.low,f[1]=t.high,h[0]}):(o=Math.log2,a=Math.floor,u=Math.pow,l=function(){for(var t=53;0>>=1,p|=(1&d)<<31,d>>>=1,n!==r&&(d|=524288);if(f=s+1023,c=0===e,e=t-e,s<52&&0!==e)for(r=0;;){if(1<=(n=2*e)?(e=n-1,c?(f--,c=!1):(r<<=1,r|=1,s++)):(e=n,c?0==--f&&(s++,c=!1):(r<<=1,s++)),20===s)d|=r,r=0;else if(52===s){p|=r;break}if(1===n){s<20?d|=r<<20-s:s<52&&(p|=r<<52-s);break}}return d|=f<<20,new i(d|=h,p)},function(t){var e,n,r,i,s=t.high,o=t.low;n=s&1<<31?-1:1,r=((2146435072&s)>>20)-1023,i=0,e=1<<19;for(var a=1;a<=20;a++)s&e&&(i+=u(2,-a)),e>>>=1;for(e=1<<31,a=21;a<=52;a++)o&e&&(i+=u(2,-a)),e>>>=1;if(-1023===r){if(0===i)return 0*n;r=-1022}else{if(1024===r)return 0===i?n/0:NaN;i+=1}return n*i*u(2,r)}),(v.prototype=Object.create(Error.prototype)).constructor=Error,m(_,v),e(_.prototype,{interfaces_:function(){return[]},getClass:function(){return _}}),e(b.prototype,{interfaces_:function(){return[]},getClass:function(){return b}}),b.shouldNeverReachHere=function(){if(0===arguments.length)b.shouldNeverReachHere(null);else if(1===arguments.length){var t=arguments[0];throw new _("Should never reach here"+(null!==t?": "+t:""))}},b.isTrue=function(){if(1===arguments.length){var t=arguments[0];b.isTrue(t,null)}else if(2===arguments.length){var e=arguments[1];if(!arguments[0])throw null===e?new _:new _(e)}},b.equals=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];b.equals(t,e,null)}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];if(!r.equals(n))throw new _("Expected "+n+" but encountered "+r+(null!==i?": "+i:""))}},e(x.prototype,{setOrdinate:function(t,e){switch(t){case x.X:this.x=e;break;case x.Y:this.y=e;break;case x.Z:this.z=e;break;default:throw new r("Invalid ordinate index: "+t)}},equals2D:function(){if(1===arguments.length){var t=arguments[0];return this.x===t.x&&this.y===t.y}if(2===arguments.length){var e=arguments[0],r=arguments[1];return!!n.equalsWithTolerance(this.x,e.x,r)&&!!n.equalsWithTolerance(this.y,e.y,r)}},getOrdinate:function(t){switch(t){case x.X:return this.x;case x.Y:return this.y;case x.Z:return this.z}throw new r("Invalid ordinate index: "+t)},equals3D:function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||s.isNaN(this.z)&&s.isNaN(t.z))},equals:function(t){return t instanceof x&&this.equals2D(t)},equalInZ:function(t,e){return n.equalsWithTolerance(this.z,t.z,e)},compareTo:function(t){var e=t;return this.xe.x?1:this.ye.y?1:0},clone:function(){try{return null}catch(t){if(t instanceof CloneNotSupportedException)return b.shouldNeverReachHere("this shouldn't happen because this class is Cloneable"),null;throw t}},copy:function(){return new x(this)},toString:function(){return"("+this.x+", "+this.y+", "+this.z+")"},distance3D:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)},distance:function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},hashCode:function(){var t=17;return 37*(t=37*t+x.hashCode(this.x))+x.hashCode(this.y)},setCoordinate:function(t){this.x=t.x,this.y=t.y,this.z=t.z},interfaces_:function(){return[d,p,y]},getClass:function(){return x}}),x.hashCode=function(){if(1===arguments.length&&"number"==typeof arguments[0]){var t=arguments[0],e=s.doubleToLongBits(t);return Math.trunc(e^e>>>32)}},e(E.prototype,{compare:function(t,e){var n=t,r=e,i=E.compare(n.x,r.x);if(0!==i)return i;var s=E.compare(n.y,r.y);return 0!==s?s:this._dimensionsToTest<=2?0:E.compare(n.z,r.z)},interfaces_:function(){return[g]},getClass:function(){return E}}),E.compare=function(t,e){return t=this.size())throw new O;return this.array_[t]},C.prototype.isEmpty=function(){return 0===this.array_.length},C.prototype.size=function(){return this.array_.length},C.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;et._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny;return new R(e,this._maxx=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy}},intersects:function(){if(1===arguments.length){if(arguments[0]instanceof R){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxxthis._maxy||t._maxythis._maxx||(n.x>r.x?n.x:r.x)this._maxy||(n.y>r.y?n.y:r.y)this._maxx||ithis._maxy||sthis._maxx&&(this._maxx=e._maxx),e._minythis._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(nthis._maxx&&(this._maxx=n),rthis._maxy&&(this._maxy=r))}},minExtent:function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return te._minx?1:this._minye._miny?1:this._maxxe._maxx?1:this._maxye._maxy?1:0},translate:function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},toString:function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},setToNull:function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},getHeight:function(){return this.isNull()?0:this._maxy-this._miny},maxExtent:function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return ethis._maxx||this._miny>this._maxy)&&this.setToNull()}},contains:function(){if(1===arguments.length){if(arguments[0]instanceof R){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof x){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.covers(n,r)}},centre:function(){return this.isNull()?null:new x((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},init:function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof x){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof R){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(4===arguments.length){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3];this._maxx=it._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxyt._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},hashCode:function(){var t=17;return 37*(t=37*(t=37*(t=37*t+x.hashCode(this._minx))+x.hashCode(this._maxx))+x.hashCode(this._miny))+x.hashCode(this._maxy)},interfaces_:function(){return[d,y]},getClass:function(){return R}}),R.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.xe.x?t.x:e.x)&&n.y>=(t.ye.y?t.y:e.y)}if(4===arguments.length){var r=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3],a=Math.min(s.x,o.x),u=Math.max(s.x,o.x),l=Math.min(r.x,i.x),c=Math.max(r.x,i.x);return!(ut?1:0},D.isNaN=function(t){return Number.isNaN(t)},F.isWhitespace=function(t){return t<=32&&0<=t||127==t},F.toUpperCase=function(t){return t.toUpperCase()},e(B.prototype,{le:function(t){return this._hi=a-u&&(f=!1),!f)break}return e[0]=r,o.toString()},sqr:function(){return this.multiply(this)},doubleValue:function(){return this._hi+this._lo},subtract:function(){if(arguments[0]instanceof B){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},equals:function(){if(1===arguments.length&&arguments[0]instanceof B){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},isZero:function(){return 0===this._hi&&0===this._lo},selfSubtract:function(){if(arguments[0]instanceof B){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},getSpecialNumberString:function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},min:function(t){return this.le(t)?this:t},selfDivide:function(){if(1===arguments.length){if(arguments[0]instanceof B){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n,r,i,s,o=arguments[0],a=arguments[1],u=null,l=null,c=null,h=null;return i=this._hi/o,h=(u=(c=B.SPLIT*i)-(u=c-i))*(l=(h=B.SPLIT*o)-(l=h-o))-(s=i*o)+u*(r=o-l)+(n=i-u)*l+n*r,h=i+(c=(this._hi-s-h+this._lo-i*a)/o),this._hi=h,this._lo=i-h+c,this}},dump:function(){return"DD<"+this._hi+", "+this._lo+">"},divide:function(){if(arguments[0]instanceof B){var t,e,n,r,i=arguments[0],o=null,a=null,u=null,l=null;return t=(n=this._hi/i._hi)-(o=(u=B.SPLIT*n)-(o=u-n)),l=o*(a=(l=B.SPLIT*i._hi)-(a=l-i._hi))-(r=n*i._hi)+o*(e=i._hi-a)+t*a+t*e,new B(l=n+(u=(this._hi-r-l+this._lo-n*i._lo)/i._hi),n-l+u)}if("number"==typeof arguments[0]){var c=arguments[0];return s.isNaN(c)?B.createNaN():B.copy(this).selfDivide(c,0)}},ge:function(t){return this._hi>t._hi||this._hi===t._hi&&this._lo>=t._lo},pow:function(t){if(0===t)return B.valueOf(1);var e=new B(this),n=B.valueOf(1),r=Math.abs(t);if(1e._hi?1:this._loe._lo?1:0},rint:function(){return this.isNaN()?this:this.add(.5).floor()},setValue:function(){if(arguments[0]instanceof B){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},max:function(t){return this.ge(t)?this:t},sqrt:function(){if(this.isZero())return B.valueOf(0);if(this.isNegative())return B.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=B.valueOf(e),r=this.subtract(n.sqr())._hi*(.5*t);return n.add(r)},selfAdd:function(){if(1===arguments.length){if(arguments[0]instanceof B){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0],n=null,r=null,i=null,s=null,o=null,a=null;return s=(i=this._hi+e)-(o=i-this._hi),r=(a=(s=e-o+(this._hi-s))+this._lo)+(i-(n=i+a)),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(2===arguments.length){var u,l=arguments[0],c=arguments[1],h=(n=null,r=null,null);i=null,s=null,o=null,a=null,i=this._hi+l,u=this._lo+c,s=i-(o=i-this._hi),h=u-(a=u-this._lo);var f=(n=i+(o=(s=l-o+(this._hi-s))+u))+(o=(h=c-a+(this._lo-h))+(r=o+(i-n))),d=o+(n-f);return this._hi=f,this._lo=d,this}},selfMultiply:function(){if(1===arguments.length){if(arguments[0]instanceof B){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n,r,i=arguments[0],s=arguments[1],o=null,a=null,u=null,l=null;o=(u=B.SPLIT*this._hi)-this._hi,l=B.SPLIT*i,o=u-o,n=this._hi-o,a=l-i;var c=(u=this._hi*i)+(l=o*(a=l-a)-u+o*(r=i-a)+n*a+n*r+(this._hi*s+this._lo*i)),h=l+(o=u-c);return this._hi=c,this._lo=h,this}},selfSqr:function(){return this.selfMultiply(this)},floor:function(){if(this.isNaN())return B.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new B(t,e)},negate:function(){return this.isNaN()?this:new B(-this._hi,-this._lo)},clone:function(){try{return null}catch(t){if(t instanceof CloneNotSupportedException)return null;throw t}},multiply:function(){if(arguments[0]instanceof B){var t=arguments[0];return t.isNaN()?B.createNaN():B.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return s.isNaN(e)?B.createNaN():B.copy(this).selfMultiply(e,0)}},isNaN:function(){return s.isNaN(this._hi)},intValue:function(){return Math.trunc(this._hi)},toString:function(){var t=B.magnitude(this._hi);return-3<=t&&t<=20?this.toStandardNotation():this.toSciNotation()},toStandardNotation:function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,i=n;if("."===n.charAt(0))i="0"+n;else if(r<0)i="0."+B.stringOfChar("0",-r)+n;else if(-1===n.indexOf(".")){var s=r-n.length;i=n+B.stringOfChar("0",s)+".0"}return this.isNegative()?"-"+i:i},reciprocal:function(){var t,e,n,r,i=null,s=null,o=null,a=null;t=(n=1/this._hi)-(i=(o=B.SPLIT*n)-(i=o-n)),s=(a=B.SPLIT*this._hi)-this._hi;var u=n+(o=(1-(r=n*this._hi)-(a=i*(s=a-s)-r+i*(e=this._hi-s)+t*s+t*e)-n*this._lo)/this._hi);return new B(u,n-u+o)},toSciNotation:function(){if(this.isZero())return B.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=B.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===n.charAt(0))throw new IllegalStateException("Found leading zero: "+n);var i="";1t._hi||this._hi===t._hi&&this._lo>t._lo},isNegative:function(){return this._hi<0||0===this._hi&&this._lo<0},trunc:function(){return this.isNaN()?B.NaN:this.isPositive()?this.floor():this.ceil()},signum:function(){return 0n.y&&(n=o,i=s)}for(var a=i;(a-=1)<0&&(a=e),t[a].equals2D(n)&&a!==i;);for(var u=i;t[u=(u+1)%e].equals2D(n)&&u!==i;);var l=t[a],c=t[u];if(l.equals2D(n)||c.equals2D(n)||l.equals2D(c))return!1;var h=q.index(l,n,c);return 0===h?l.x>c.x:0=t?e:[]},nt.indexOf=function(t,e){for(var n=0;n=t.length&&(r=0),nr.length)return 1;if(0===n.length)return 0;var i=nt.compare(n,r);return nt.isEqualReversed(n,r)?0:i},OLDcompare:function(t,e){var n=t,r=e;if(n.lengthr.length)return 1;if(0===n.length)return 0;for(var i=nt.increasingDirection(n),s=nt.increasingDirection(r),o=0= 2)");this._points=t},isCoordinate:function(t){for(var e=0;e= 4)")},getGeometryType:function(){return J.TYPENAME_LINEARRING},copy:function(){return new Wt(this._points.copy(),this._factory)},interfaces_:function(){return[]},getClass:function(){return Wt}}),Wt.MINIMUM_VALID_SIZE=4,Wt.serialVersionUID=-0x3b229e262367a600,m(Xt,Ot),e(Xt.prototype,{equalsExact:function(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof J){var t=arguments[0],e=arguments[1];return!!this.isEquivalentClass(t)&&Ot.prototype.equalsExact.call(this,t,e)}return Ot.prototype.equalsExact.apply(this,arguments)},getBoundaryDimension:function(){return 1},getTypeCode:function(){return J.TYPECODE_MULTIPOLYGON},getDimension:function(){return 2},reverse:function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n>32),n=java.lang.Double.doubleToLongBits(this.p1.x);return n^=31*java.lang.Double.doubleToLongBits(this.p1.y),e^Math.trunc(n)^Math.trunc(n>>32)},interfaces_:function(){return[d,y]},getClass:function(){return ve}}),ve.midPoint=function(t,e){return new x((t.x+e.x)/2,(t.y+e.y)/2)},ve.serialVersionUID=0x2d2172135f411c00,e(me.prototype,{interfaces_:function(){return[]},getClass:function(){return me}}),me.toLocationSymbol=function(t){switch(t){case me.EXTERIOR:return"e";case me.BOUNDARY:return"b";case me.INTERIOR:return"i";case me.NONE:return"-"}throw new r("Unknown location value: "+t)},me.INTERIOR=0,me.BOUNDARY=1,me.EXTERIOR=2,me.NONE=-1,e(_e.prototype,{isIntersects:function(){return!this.isDisjoint()},isCovers:function(){return(_e.isTrue(this._matrix[me.INTERIOR][me.INTERIOR])||_e.isTrue(this._matrix[me.INTERIOR][me.BOUNDARY])||_e.isTrue(this._matrix[me.BOUNDARY][me.INTERIOR])||_e.isTrue(this._matrix[me.BOUNDARY][me.BOUNDARY]))&&this._matrix[me.EXTERIOR][me.INTERIOR]===wt.FALSE&&this._matrix[me.EXTERIOR][me.BOUNDARY]===wt.FALSE},isCoveredBy:function(){return(_e.isTrue(this._matrix[me.INTERIOR][me.INTERIOR])||_e.isTrue(this._matrix[me.INTERIOR][me.BOUNDARY])||_e.isTrue(this._matrix[me.BOUNDARY][me.INTERIOR])||_e.isTrue(this._matrix[me.BOUNDARY][me.BOUNDARY]))&&this._matrix[me.INTERIOR][me.EXTERIOR]===wt.FALSE&&this._matrix[me.BOUNDARY][me.EXTERIOR]===wt.FALSE},set:function(){if(1===arguments.length)for(var t=arguments[0],e=0;eMath.PI;)t-=be.PI_TIMES_2;for(;t<=-Math.PI;)t+=be.PI_TIMES_2;return t},be.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],r=n.x-e.x,i=n.y-e.y;return Math.atan2(i,r)}},be.isAcute=function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return 0Math.PI&&(n=2*Math.PI-n),n},be.toRadians=function(t){return t*Math.PI/180},be.getTurn=function(t,e){var n=Math.sin(e-t);return 0Math.PI?i-be.PI_TIMES_2:i},be.PI_TIMES_2=2*Math.PI,be.PI_OVER_2=Math.PI/2,be.PI_OVER_4=Math.PI/4,be.COUNTERCLOCKWISE=q.COUNTERCLOCKWISE,be.CLOCKWISE=q.CLOCKWISE,be.NONE=q.COLLINEAR,e(xe.prototype,{area:function(){return xe.area(this.p0,this.p1,this.p2)},signedArea:function(){return xe.signedArea(this.p0,this.p1,this.p2)},interpolateZ:function(t){if(null===t)throw new r("Supplied point is null.");return xe.interpolateZ(t,this.p0,this.p1,this.p2)},longestSideLength:function(){return xe.longestSideLength(this.p0,this.p1,this.p2)},isAcute:function(){return xe.isAcute(this.p0,this.p1,this.p2)},circumcentre:function(){return xe.circumcentre(this.p0,this.p1,this.p2)},area3D:function(){return xe.area3D(this.p0,this.p1,this.p2)},centroid:function(){return xe.centroid(this.p0,this.p1,this.p2)},inCentre:function(){return xe.inCentre(this.p0,this.p1,this.p2)},interfaces_:function(){return[]},getClass:function(){return xe}}),xe.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},xe.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},xe.det=function(t,e,n,r){return t*r-e*n},xe.interpolateZ=function(t,e,n,r){var i=e.x,s=e.y,o=n.x-i,a=r.x-i,u=n.y-s,l=r.y-s,c=o*l-a*u,h=t.x-i,f=t.y-s,d=(l*h-a*f)/c,p=(-u*h+o*f)/c;return e.z+d*(n.z-e.z)+p*(r.z-e.z)},xe.longestSideLength=function(t,e,n){var r=t.distance(e),i=e.distance(n),s=n.distance(t),o=r;return othis._distance&&this.initialize(e,n,r)}},interfaces_:function(){return[]},getClass:function(){return we}}),e(Ie.prototype,{interfaces_:function(){return[]},getClass:function(){return Ie}}),Ie.computeDistance=function(){if(arguments[2]instanceof we&&arguments[0]instanceof Bt&&arguments[1]instanceof x)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=new ve,i=t.getCoordinates(),s=0;se||this._max=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var i=q.index(t,e,this._p);if(i===q.COLLINEAR)return this._isPointOnSegment=!0,null;e.y=this._max)throw new N;var t=this._parent.getGeometryN(this._index++);return t instanceof Ot?(this._subcollectionIterator=new Ve(t),this._subcollectionIterator.next()):t},remove:function(){throw new UnsupportedOperationException(this.getClass().getName())},hasNext:function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},interfaces_:function(){return[I]},getClass:function(){return Ve}}),Ve.isAtomic=function(t){return!(t instanceof Ot)},e(Ye.prototype,{locate:function(t){return Ye.locate(t,this._geom)},interfaces_:function(){return[Ce]},getClass:function(){return Ye}}),Ye.locatePointInPolygon=function(t,e){if(e.isEmpty())return me.EXTERIOR;var n=e.getExteriorRing(),r=Ye.locatePointInRing(t,n);if(r!==me.INTERIOR)return r;for(var i=0;in.y&&(n=o,i=s)}for(var a=i;(a-=1)<0&&(a=e),t[a].equals2D(n)&&a!==i;);for(var u=i;t[u=(u+1)%e].equals2D(n)&&u!==i;);var l=t[a],c=t[u];if(l.equals2D(n)||c.equals2D(n)||l.equals2D(c))return!1;var h=$e.computeOrientation(l,n,c);return 0===h?l.x>c.x:0=this.size())throw new IndexOutOfBoundsException;return this.array_[t]},en.prototype.push=function(t){return this.array_.push(t),t},en.prototype.pop=function(t){if(0===this.array_.length)throw new tn;return this.array_.pop()},en.prototype.peek=function(){if(0===this.array_.length)throw new tn;return this.array_[this.array_.length-1]},en.prototype.empty=function(){return 0===this.array_.length},en.prototype.isEmpty=function(){return this.empty()},en.prototype.search=function(t){return this.array_.indexOf(t)},en.prototype.size=function(){return this.array_.length},en.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;ee[2].y&&(e[2]=t[r]),t[r].x+t[r].y>e[3].x+e[3].y&&(e[3]=t[r]),t[r].x>e[4].x&&(e[4]=t[r]),t[r].x-t[r].y>e[5].x-e[5].y&&(e[5]=t[r]),t[r].ythis._maxWidth)&&(this._interiorPoint=e,this._maxWidth=n)},getInteriorPoint:function(){return this._interiorPoint},widestGeometry:function(){if(arguments[0]instanceof Ot){var t=arguments[0];if(t.isEmpty())return t;for(var e=t.getGeometryN(0),n=1;ne.getEnvelopeInternal().getWidth()&&(e=t.getGeometryN(n));return e}if(arguments[0]instanceof J){var r=arguments[0];return r instanceof Ot?this.widestGeometry(r):r}},horizontalBisector:function(t){var e=t.getEnvelopeInternal(),n=an.getBisectorY(t);return this._factory.createLineString([new x(e.getMinX(),n),new x(e.getMaxX(),n)])},add:function(t){if(t instanceof Vt)this.addPolygon(t);else if(t instanceof Ot)for(var e=t,n=0;nthis._loY&&(this._loY=t):t>this._centreY&&t=e&&(n=1),t.max<=e&&(n=0),n},e(fn.prototype,{expandToInclude:function(t){t.max>this.max&&(this.max=t.max),t.minn||this.max=this.min&&e<=this.max}}else if(2===arguments.length){var n=arguments[1];return arguments[0]>=this.min&&n<=this.max}},init:function(t,e){this.min=t,(this.max=e)=n.x?i.y>=n.y?bn.NE:bn.SE:i.y>=n.y?bn.NW:bn.SW}},bn.NE=0,bn.NW=1,bn.SW=2,bn.SE=3,e(xn.prototype,{interfaces_:function(){return[]},getClass:function(){return xn}}),xn.getChainStartIndices=function(t){var e=0,n=new C;n.add(new D(e));do{var r=xn.findChainEnd(t,e);n.add(new D(r)),e=r}while(e=t.length-1)return t.length-1;for(var r=bn.quadrant(t[n],t[n+1]),i=e+1;i=t.length&&(e=0),e},Sn.computeC=function(t,e,n){return t*n.y-e*n.x},Sn.getMinimumDiameter=function(t){return new Sn(t).getDiameter()},Sn.getMinimumRectangle=function(t){return new Sn(t).getMinimumRectangle()},Sn.computeSegmentForLine=function(t,e,n){var r=null;return new ve(r,Math.abs(e)>Math.abs(t)?(r=new x(0,n/e),new x(1,n/e-t/e)):(r=new x(n/t,0),new x(n/t-e/t,1)))};var Nn=Object.freeze({distance:Ne,locate:We,match:Qe,Angle:be,Centroid:Ke,CGAlgorithms:$e,ConvexHull:rn,Distance:Y,InteriorPointArea:on,InteriorPointLine:un,InteriorPointPoint:ln,RobustLineIntersector:ye,MCPointInRing:In,MinimumBoundingCircle:On,MinimumDiameter:Sn});function Pn(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1}function Cn(){this._inputGeom=null,this._distanceTolerance=null;var t=arguments[0];this._inputGeom=t}function Ln(){Pn.apply(this),this.distanceTolerance=null;var t=arguments[0];this.distanceTolerance=t}e(Pn.prototype,{transformPoint:function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},transformPolygon:function(t,e){var n=!0,r=this.transformLinearRing(t.getExteriorRing(),t);null!==r&&r instanceof Wt&&!r.isEmpty()||(n=!1);for(var i=new C,s=0;se._xValue?1:this._eventTypee._eventType?1:0},getInsertEvent:function(){return this._insertEvent},isInsert:function(){return this._eventType===zn.INSERT},isSameLabel:function(t){return null!==this._label&&this._label===t._label},getDeleteEventIndex:function(){return this._deleteEventIndex},interfaces_:function(){return[d]},getClass:function(){return zn}}),zn.INSERT=1,zn.DELETE=2,e(Vn.prototype,{interfaces_:function(){return[]},getClass:function(){return Vn}}),e(Yn.prototype,{isTrivialIntersection:function(t,e,n,r){if(t===n&&1===this._li.getIntersectionNum()){if(Yn.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.getNumPoints()-1;if(0===e&&r===i||0===r&&e===i)return!0}}return!1},getProperIntersectionPoint:function(){return this._properIntersectionPoint},setIsDoneIfProperInt:function(t){this._isDoneWhenProperInt=t},hasProperInteriorIntersection:function(){return this._hasProperInterior},isBoundaryPointInternal:function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next().getCoordinate();if(t.isIntersection(r))return!0}return!1},hasProperIntersection:function(){return this._hasProper},hasIntersection:function(){return this._hasIntersection},isDone:function(){return this._isDone},isBoundaryPoint:function(t,e){return!(null===e||!this.isBoundaryPointInternal(t,e[0])&&!this.isBoundaryPointInternal(t,e[1]))},setBoundaryNodes:function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},addIntersections:function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],s=t.getCoordinates()[e+1],o=n.getCoordinates()[r],a=n.getCoordinates()[r+1];this._li.computeIntersection(i,s,o,a),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},interfaces_:function(){return[]},getClass:function(){return Yn}}),Yn.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)},m(Wn,Vn),e(Wn.prototype,{prepareEvents:function(){ke.sort(this.events);for(var t=0;tthis.location.length){var e=new Array(3).fill(null);e[qn.ON]=this.location[qn.ON],e[qn.LEFT]=me.NONE,e[qn.RIGHT]=me.NONE,this.location=e}for(var n=0;ne&&(r=1),this._depth[t][n]=r}}},getDelta:function(t){return this._depth[t][qn.RIGHT]-this._depth[t][qn.LEFT]},getLocation:function(t,e){return this._depth[t][e]<=0?me.EXTERIOR:me.INTERIOR},toString:function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},add:function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<2;e++)for(var n=1;n<3;n++){var r=t.getLocation(e,n);r!==me.EXTERIOR&&r!==me.INTERIOR||(this.isNull(e,n)?this._depth[e][n]=$n.depthAtLocation(r):this._depth[e][n]+=$n.depthAtLocation(r))}else if(3===arguments.length){var i=arguments[0],s=arguments[1];arguments[2]===me.INTERIOR&&this._depth[i][s]++}},interfaces_:function(){return[]},getClass:function(){return $n}}),$n.depthAtLocation=function(t){return t===me.EXTERIOR?0:t===me.INTERIOR?1:$n.NULL_VALUE},$n.NULL_VALUE=-1,e(tr.prototype,{setVisited:function(t){this._isVisited=t},setInResult:function(t){this._isInResult=t},isCovered:function(){return this._isCovered},isCoveredSet:function(){return this._isCoveredSet},setLabel:function(t){this._label=t},getLabel:function(){return this._label},setCovered:function(t){this._isCovered=t,this._isCoveredSet=!0},updateIM:function(t){b.isTrue(2<=this._label.getGeometryCount(),"found partial label"),this.computeIM(t)},isInResult:function(){return this._isInResult},isVisited:function(){return this._isVisited},interfaces_:function(){return[]},getClass:function(){return tr}}),m(er,tr),e(er.prototype,{getDepth:function(){return this._depth},getCollapsedEdge:function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new er(t,Hn.toLineLabel(this._label))},isIsolated:function(){return this._isIsolated},getCoordinates:function(){return this.pts},setIsolated:function(t){this._isIsolated=t},setName:function(t){this._name=t},equals:function(t){if(!(t instanceof er))return!1;var e=t;if(this.pts.length!==e.pts.length)return!1;for(var n=!0,r=!0,i=this.pts.length,s=0;st._quadrant?1:this._quadrant=e&&(t.getMinY()>=n&&(r=3),t.getMaxY()<=n&&(r=1)),t.getMaxX()<=e&&(t.getMinY()>=n&&(r=2),t.getMaxY()<=n&&(r=0)),r},e(vr.prototype,{getLevel:function(){return this._level},computeKey:function(){if(1===arguments.length){var t=arguments[0];for(this._level=vr.computeQuadLevel(t),this._env=new R,this.computeKey(this._level,t);!this._env.contains(t);)this._level+=1,this.computeKey(this._level,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=dn.powerOf2(e);this._pt.x=Math.floor(n.getMinX()/r)*r,this._pt.y=Math.floor(n.getMinY()/r)*r,this._env.init(this._pt.x,this._pt.x+r,this._pt.y,this._pt.y+r)}},getEnvelope:function(){return this._env},getCentre:function(){return new x((this._env.getMinX()+this._env.getMaxX())/2,(this._env.getMinY()+this._env.getMaxY())/2)},getPoint:function(){return this._pt},interfaces_:function(){return[]},getClass:function(){return vr}}),vr.computeQuadLevel=function(t){var e=t.getWidth(),n=t.getHeight();return dn.exponent(nSr.area(this._boundable2)?this.expand(this._boundable1,this._boundable2,t,e):this.expand(this._boundable2,this._boundable1,t,e),null;if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new r("neither boundable is composite")},isLeaves:function(){return!(Sr.isComposite(this._boundable1)||Sr.isComposite(this._boundable2))},compareTo:function(t){var e=t;return this._distancee._distance?1:0},expand:function(t,e,n,r){for(var i=t.getChildBoundables().iterator();i.hasNext();){var s=new Sr(i.next(),e,this._itemDistance);s.getDistance()m&&(y.poll(),y.add(v)),a=y.peek().getDistance()):v.expandToQueue(d,a)}return Cr.getItems(y)}}else if(4===arguments.length){var _=arguments[2],b=arguments[3];return f=new Ir(arguments[0],arguments[1]),e=new Sr(this.getRoot(),f,_),this.nearestNeighbour(e,b)}},interfaces_:function(){return[br,y]},getClass:function(){return Cr}}),Cr.centreX=function(t){return Cr.avg(t.getMinX(),t.getMaxX())},Cr.avg=function(t,e){return(t+e)/2},Cr.getItems=function(t){for(var e=new Array(t.size()).fill(null),n=0;!t.isEmpty();){var r=t.poll();e[n]=r.getBoundable(0).getItem(),n++}return e},Cr.centreY=function(t){return Cr.avg(t.getMinY(),t.getMaxY())},m(Lr,Or),e(Lr.prototype,{computeBounds:function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new R(n.getBounds()):t.expandToInclude(n.getBounds())}return t},interfaces_:function(){return[]},getClass:function(){return Lr}}),Cr.STRtreeNode=Lr,Cr.serialVersionUID=0x39920f7d5f261e0,Cr.xComparator={interfaces_:function(){return[g]},compare:function(t,e){return Nr.compareDoubles(Cr.centreX(t.getBounds()),Cr.centreX(e.getBounds()))}},Cr.yComparator={interfaces_:function(){return[g]},compare:function(t,e){return Nr.compareDoubles(Cr.centreY(t.getBounds()),Cr.centreY(e.getBounds()))}},Cr.intersectsOp={interfaces_:function(){return[IntersectsOp]},intersects:function(t,e){return t.intersects(e)}},Cr.DEFAULT_NODE_CAPACITY=10;var Tr=Object.freeze({STRtree:Cr}),Rr=Object.freeze({kdtree:gr,quadtree:Er,strtree:Tr}),kr=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"];function Ar(t){this.geometryFactory=t||new le}e(Ar.prototype,{read:function(t){var e,n=(e="string"==typeof t?JSON.parse(t):t).type;if(!jr[n])throw new Error("Unknown GeoJSON type: "+e.type);return-1!==kr.indexOf(n)?jr[n].call(this,e.coordinates):"GeometryCollection"===n?jr[n].call(this,e.geometries):jr[n].call(this,e)},write:function(t){var e=t.getGeometryType();if(!Dr[e])throw new Error("Geometry is not supported");return Dr[e].call(this,t)}});var jr={Feature:function(t){var e={};for(var n in t)e[n]=t[n];if(t.geometry){var r=t.geometry.type;if(!jr[r])throw new Error("Unknown GeoJSON type: "+t.type);e.geometry=this.read(t.geometry)}return t.bbox&&(e.bbox=jr.bbox.call(this,t.bbox)),e},FeatureCollection:function(t){var e={};if(t.features){e.features=[];for(var n=0;nn.getId()&&(n.computeOverlaps(i,t),this._nOverlaps++),this._segInt.isDone())return null}},interfaces_:function(){return[]},getClass:function(){return ei}}),m(ni,Kr),e(ni.prototype,{overlap:function(){if(4!==arguments.length)return Kr.prototype.overlap.apply(this,arguments);var t=arguments[1],e=arguments[2],n=arguments[3],r=arguments[0].getContext(),i=e.getContext();this._si.processIntersections(r,t,i,n)},interfaces_:function(){return[]},getClass:function(){return ni}}),ei.SegmentOverlapAction=ni,e(ri.prototype,{rescale:function(){if(w(arguments[0],M))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.rescale(e.getCoordinates())}else if(arguments[0]instanceof Array){var n=arguments[0];for(2===n.length&&(new x(n[0]),new x(n[1])),t=0;tthis._minCoord.y&&n.y>this._minCoord.y&&r===q.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)},getRightmostSideOfSegment:function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var r=qn.LEFT;return n[e].ythis._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])},findRightmostEdgeAtNode:function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},findEdge:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}b.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===qn.LEFT&&(this._orientedDe=this._minDe.getSym())},interfaces_:function(){return[]},getClass:function(){return ui}}),li.prototype.addLast=function(t){this.array_.push(t)},li.prototype.removeFirst=function(){return this.array_.shift()},li.prototype.isEmpty=function(){return 0===this.array_.length},e(ci.prototype,{clearVisitedEdges:function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)},getRightmostCoordinate:function(){return this._rightMostCoord},computeNodeDepth:function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();)if((r=n.next()).isVisited()||r.getSym().isVisited()){e=r;break}if(null===e)throw new sr("unable to find edge to compute depths at "+t.getCoordinate());for(t.getEdges().computeDepths(e),n=t.getEdges().iterator();n.hasNext();){var r;(r=n.next()).setVisited(!0),this.copySymDepths(r)}},computeDepth:function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.getNode(),e.getLabel(),e.setEdgeDepths(qn.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},create:function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},findResultEdges:function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();1<=e.getDepth(qn.RIGHT)&&e.getDepth(qn.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},computeDepths:function(t){var e=new ut,n=new li,r=t.getNode();for(n.addLast(r),e.add(r),t.setVisited(!0);!n.isEmpty();){var i=n.removeFirst();e.add(i),this.computeNodeDepth(i);for(var s=i.getEdges().iterator();s.hasNext();){var o=s.next().getSym();if(!o.isVisited()){var a=o.getNode();e.contains(a)||(n.addLast(a),e.add(a))}}}},compareTo:function(t){var e=t;return this._rightMostCoord.xe._rightMostCoord.x?1:0},getEnvelope:function(){if(null===this._env){for(var t=new R,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),r=0;rthis._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},addPoints:function(t,e,n){var r=t.getCoordinates();if(e){var i=1;n&&(i=0);for(var s=i;sthis._bufParams.getMitreLimit()&&(i=!1)}catch(t){if(!(t instanceof A))throw t;s=new x(0,0),i=!1}i?this._segList.addPt(s):this.addLimitedMitreJoin(e,n,r,this._bufParams.getMitreLimit())},addOutsideTurn:function(t,e){if(this._offset0.p1.distance(this._offset1.p0)i.getMaxY()||this.findStabbedSegments(t,r.getDirectedEdges(),e)}return e}if(3===arguments.length)if(w(arguments[2],S)&&arguments[0]instanceof x&&arguments[1]instanceof or){var s=arguments[0],o=arguments[1],a=arguments[2],u=o.getEdge().getCoordinates();for(n=0;nthis._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)this._seg.p1.y||q.index(this._seg.p0,this._seg.p1,s)===q.RIGHT)){var l=o.getDepth(qn.LEFT);this._seg.p0.equals(u[n])||(l=o.getDepth(qn.RIGHT));var c=new bi(this._seg,l);a.add(c)}}else if(w(arguments[2],S)&&arguments[0]instanceof x&&w(arguments[1],S)){var h=arguments[0],f=arguments[2];for(n=arguments[1].iterator();n.hasNext();){var d=n.next();d.isForward()&&this.findStabbedSegments(h,d,f)}}},getDepth:function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:ke.min(e)._leftDepth},interfaces_:function(){return[]},getClass:function(){return _i}}),e(bi.prototype,{compareTo:function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n||0!=(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},compareX:function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},toString:function(){return this._upwardSeg.toString()},interfaces_:function(){return[d]},getClass:function(){return bi}}),_i.DepthSegment=bi,e(xi.prototype,{addPoint:function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,me.EXTERIOR,me.INTERIOR)},addPolygon:function(t){var e=this._distance,n=qn.LEFT;this._distance<0&&(e=-this._distance,n=qn.RIGHT);var r=t.getExteriorRing(),i=nt.removeRepeatedPoints(r.getCoordinates());if(this._distance<0&&this.isErodedCompletely(r,this._distance))return null;if(this._distance<=0&&i.length<3)return null;this.addPolygonRing(i,e,n,me.EXTERIOR,me.INTERIOR);for(var s=0;s=Wt.MINIMUM_VALID_SIZE&&q.isCCW(t)&&(s=i,o=r,n=qn.opposite(n));var a=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(a,s,o)},add:function(t){if(t.isEmpty())return null;if(t instanceof Vt)this.addPolygon(t);else if(t instanceof Bt)this.addLineString(t);else if(t instanceof qt)this.addPoint(t);else if(t instanceof Yt)this.addCollection(t);else if(t instanceof St)this.addCollection(t);else if(t instanceof Xt)this.addCollection(t);else{if(!(t instanceof Ot))throw new UnsupportedOperationException(t.getClass().getName());this.addCollection(t)}},isErodedCompletely:function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var r=t.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>i},addCollection:function(t){for(var e=0;er||this._maxys;if(o)return!1;var a=this.intersectsToleranceSquare(t,e);return b.isTrue(!(o&&a),"Found bad envelope test"),a},initCorners:function(t){this._minx=t.x-.5,this._maxx=t.x+.5,this._miny=t.y-.5,this._maxy=t.y+.5,this._corner[0]=new x(this._maxx,this._maxy),this._corner[1]=new x(this._minx,this._maxy),this._corner[2]=new x(this._minx,this._miny),this._corner[3]=new x(this._maxx,this._miny)},intersects:function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},scale:function(t){return Math.round(t*this._scaleFactor)},getCoordinate:function(){return this._originalPt},copyScaled:function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},getSafeEnvelope:function(){if(null===this._safeEnv){var t=Li.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new R(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},intersectsPixelClosure:function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))))},intersectsToleranceSquare:function(t,e){var n=!1,r=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper()||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper()||n&&r||t.equals(this._pt)||e.equals(this._pt)))))},addSnappedNode:function(t,e){var n=t.getCoordinate(e),r=t.getCoordinate(e+1);return!!this.intersects(n,r)&&(t.addIntersection(this.getCoordinate(),e),!0)},interfaces_:function(){return[]},getClass:function(){return Li}}),Li.SAFE_ENV_EXPANSION_FACTOR=.75,e(Ti.prototype,{snap:function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2],i=e.getSafeEnvelope(),s=new Ri(e,n,r);return this._index.query(i,{interfaces_:function(){return[Pe]},visitItem:function(t){t.select(i,s)}}),s.isNodeAdded()}},interfaces_:function(){return[]},getClass:function(){return Ti}}),m(Ri,cn),e(Ri.prototype,{isNodeAdded:function(){return this._isNodeAdded},select:function(){if(!(2===arguments.length&&Number.isInteger(arguments[1])&&arguments[0]instanceof _n))return cn.prototype.select.apply(this,arguments);var t=arguments[1],e=arguments[0].getContext();if(null!==this._parentEdge&&e===this._parentEdge&&t===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(e,t)},interfaces_:function(){return[]},getClass:function(){return Ri}}),Ti.HotPixelSnapAction=Ri,e(ki.prototype,{processIntersections:function(t,e,n,r){if(t===n&&e===r)return null;var i=t.getCoordinates()[e],s=t.getCoordinates()[e+1],o=n.getCoordinates()[r],a=n.getCoordinates()[r+1];if(this._li.computeIntersection(i,s,o,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;uthis._minDistance)return null;for(var r=t.getCoordinates(),i=e.getCoordinate(),s=0;sthis._minDistance)return null;r=a.getCoordinates();var c=u.getCoordinates();for(s=0;st._quadrant?1:this._quadrant=t.size()-2},hasIntersection:function(){return null!==this._interiorIntersection},isDone:function(){return!this._findAllIntersections&&null!==this._interiorIntersection},interfaces_:function(){return[Si]},getClass:function(){return is}}),is.createAllIntersectionsFinder=function(t){var e=new is(t);return e.setFindAllIntersections(!0),e},is.createAnyIntersectionFinder=function(t){return new is(t)},is.createIntersectionCounter=function(t){var e=new is(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e},e(ss.prototype,{execute:function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},getIntersections:function(){return this._segInt.getIntersections()},isValid:function(){return this.execute(),this._isValid},setFindAllIntersections:function(t){this._findAllIntersections=t},checkInteriorIntersections:function(){this._isValid=!0,this._segInt=new is(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new ei;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},checkValid:function(){if(this.execute(),!this._isValid)throw new sr(this.getErrorMessage(),this._segInt.getInteriorIntersection())},getErrorMessage:function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+pe.toLineString(t[0],t[1])+" and "+pe.toLineString(t[2],t[3])},interfaces_:function(){return[]},getClass:function(){return ss}}),ss.computeIntersections=function(t){var e=new ss(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()},e(os.prototype,{checkValid:function(){this._nv.checkValid()},interfaces_:function(){return[]},getClass:function(){return os}}),os.toSegmentStrings=function(t){for(var e=new C,n=t.iterator();n.hasNext();){var r=n.next();e.add(new rs(r.getCoordinates(),r))}return e},os.checkValid=function(t){new os(t).checkValid()},e(as.prototype,{map:function(t){for(var e=new C,n=0;n>>20},ds.zeroLowerBits=function(t,e){var n="low";if(32=t.getNumPoints()&&null===r)return null;var s=t.getCoordinate(i);null!==r&&r.segmentIndex===n.segmentIndex&&(s=r.coord);var o=new ir(t,n.coord,s,new Hn(t.getLabel()));e.add(o)},createEdgeEndForPrev:function(t,e,n,r){var i=n.segmentIndex;if(0===n.dist){if(0===i)return null;i--}var s=t.getCoordinate(i);null!==r&&r.segmentIndex>=i&&(s=r.coord);var o=new Hn(t.getLabel());o.flip();var a=new ir(t,n.coord,s,o);e.add(a)},computeEdgeEnds:function(){if(1===arguments.length){for(var t=arguments[0],e=new C,n=t;n.hasNext();){var r=n.next();this.computeEdgeEnds(r,e)}return e}if(2===arguments.length){var i=arguments[0],s=arguments[1],o=i.getEdgeIntersectionList();o.addEndpoints();var a=o.iterator(),u=null,l=null;if(!a.hasNext())return null;for(var c=a.next();u=l,l=c,c=null,a.hasNext()&&(c=a.next()),null!==l&&(this.createEdgeEndForPrev(i,s,l,u),this.createEdgeEndForNext(i,s,l,c)),null!==l;);}},interfaces_:function(){return[]},getClass:function(){return Cs}}),m(Ls,ir),e(Ls.prototype,{insert:function(t){this._edgeEnds.add(t)},print:function(t){t.println("EdgeEndBundle--\x3e Label: "+this._label);for(var e=this.iterator();e.hasNext();)e.next().print(t),t.println()},iterator:function(){return this._edgeEnds.iterator()},getEdgeEnds:function(){return this._edgeEnds},computeLabelOn:function(t,e){for(var n=0,r=!1,i=this.iterator();i.hasNext();)(s=i.next().getLabel().getLocation(t))===me.BOUNDARY&&n++,s===me.INTERIOR&&(r=!0);var s=me.NONE;r&&(s=me.INTERIOR),0t.y&&(i=!0),i?this._li.computeIntersection(t,e,this._diagDown0,this._diagDown1):this._li.computeIntersection(t,e,this._diagUp0,this._diagUp1),!!this._li.hasIntersection()},interfaces_:function(){return[]},getClass:function(){return Ds}}),e(Fs.prototype,{applyTo:function(t){for(var e=0;e=this._rectEnv.getMinX()&&e.getMaxX()<=this._rectEnv.getMaxX()||e.getMinY()>=this._rectEnv.getMinY()&&e.getMaxY()<=this._rectEnv.getMaxY()?(this._intersects=!0,null):void 0:null},intersects:function(){return this._intersects},interfaces_:function(){return[]},getClass:function(){return Gs}}),m(qs,Fs),e(qs.prototype,{isDone:function(){return!0===this._containsPoint},visit:function(t){if(!(t instanceof Vt))return null;var e=t.getEnvelopeInternal();if(!this._rectEnv.intersects(e))return null;for(var n=new x,r=0;r<4;r++)if(this._rectSeq.getCoordinate(r,n),e.contains(n)&&Ye.containsPointInPolygon(n,t))return this._containsPoint=!0,null},containsPoint:function(){return this._containsPoint},interfaces_:function(){return[]},getClass:function(){return qs}}),m(Us,Fs),e(Us.prototype,{intersects:function(){return this._hasIntersection},isDone:function(){return!0===this._hasIntersection},visit:function(t){var e=t.getEnvelopeInternal();if(!this._rectEnv.intersects(e))return null;var n=De.getLines(t);this.checkIntersectionWithLineStrings(n)},checkIntersectionWithLineStrings:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();if(this.checkIntersectionWithSegments(n),this._hasIntersection)return null}},checkIntersectionWithSegments:function(t){for(var e=t.getCoordinateSequence(),n=1;n=t.size()?null:t.get(e)},Hs.union=function(t){return new Hs(t).union()},Hs.STRTREE_NODE_CAPACITY=4,e(Js.prototype,{unionNoOpt:function(t){var e=this._geomFact.createPoint();return ms.overlayOp(t,e,bs.UNION)},unionWithNull:function(t,e){return null===t&&null===e?null:null===e?t:null===t?e:t.union(e)},extract:function(){if(w(arguments[0],M))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.extract(e)}else if(arguments[0]instanceof J){var n=arguments[0];null===this._geomFact&&(this._geomFact=n.getFactory()),Xs.extract(n,J.TYPENAME_POLYGON,this._polygons),Xs.extract(n,J.TYPENAME_LINESTRING,this._lines),Xs.extract(n,J.TYPENAME_POINT,this._points)}},union:function(){if(null===this._geomFact)return null;var t=null;if(0this._distanceTolerance&&(s=!1);var u=new ve;if(u.p0=this._linePts[t],u.p1=this._linePts[e],r[0]=t,r[1]=e,this.hasBadIntersection(this._line,r,u)&&(s=!1),s)return i=this.flatten(t,e),this._line.addToResult(i),null;this.simplifySection(t,a,n),this.simplifySection(a,e,n)},hasBadOutputIntersection:function(t){for(var e=this._outputIndex.query(t).iterator();e.hasNext();){var n=e.next();if(this.hasInteriorIntersection(n,t))return!0}return!1},findFurthestPoint:function(t,e,n,r){var i=new ve;i.p0=t[e],i.p1=t[n];for(var s=-1,o=e,a=e+1;a=e[0]&&r=e||this._segmentIndex===e&&1<=this._segmentFraction},isValid:function(t){if(this._componentIndex<0||this._componentIndex>=t.getNumGeometries())return!1;var e=t.getGeometryN(this._componentIndex);return!(this._segmentIndex<0||this._segmentIndex>e.getNumPoints()||this._segmentIndex===e.getNumPoints()&&0!==this._segmentFraction||this._segmentFraction<0||1=e.getNumPoints()-1)return n;var r=e.getCoordinateN(this._segmentIndex+1);return Wo.pointAlongSegmentByFraction(n,r,this._segmentFraction)},getSegmentFraction:function(){return this._segmentFraction},getSegment:function(t){var e=t.getGeometryN(this._componentIndex),n=e.getCoordinateN(this._segmentIndex);return this._segmentIndex>=e.getNumPoints()-1?new ve(e.getCoordinateN(e.getNumPoints()-2),n):new ve(n,e.getCoordinateN(this._segmentIndex+1))},clamp:function(t){if(this._componentIndex>=t.getNumGeometries())return this.setToEnd(t),null;if(this._segmentIndex>=t.getNumPoints()){var e=t.getGeometryN(this._componentIndex);this._segmentIndex=e.getNumPoints()-1,this._segmentFraction=1}},setToEnd:function(t){this._componentIndex=t.getNumGeometries()-1;var e=t.getGeometryN(this._componentIndex);this._segmentIndex=e.getNumPoints()-1,this._segmentFraction=1},compareTo:function(t){var e=t;return this._componentIndexe._componentIndex?1:this._segmentIndexe._segmentIndex?1:this._segmentFractione._segmentFraction?1:0},copy:function(){return new Wo(this._componentIndex,this._segmentIndex,this._segmentFraction)},toString:function(){return"LinearLoc["+this._componentIndex+", "+this._segmentIndex+", "+this._segmentFraction+"]"},isOnSameSegment:function(t){return this._componentIndex===t._componentIndex&&(this._segmentIndex===t._segmentIndex||t._segmentIndex-this._segmentIndex==1&&0===t._segmentFraction||this._segmentIndex-t._segmentIndex==1&&0===this._segmentFraction)},snapToVertex:function(t,e){if(this._segmentFraction<=0||1<=this._segmentFraction)return null;var n=this.getSegmentLength(t),r=this._segmentFraction*n,i=n-r;r<=i&&rt?1:this._segmentIndexe?1:this._segmentFractionn?1:0},getSegmentLength:function(t){var e=t.getGeometryN(this._componentIndex),n=this._segmentIndex;this._segmentIndex>=e.getNumPoints()-1&&(n=e.getNumPoints()-2);var r=e.getCoordinateN(n),i=e.getCoordinateN(n+1);return r.distance(i)},isVertex:function(){return this._segmentFraction<=0||1<=this._segmentFraction},interfaces_:function(){return[d]},getClass:function(){return Wo}}),Wo.getEndLocation=function(t){var e=new Wo;return e.setToEnd(t),e},Wo.pointAlongSegmentByFraction=function(t,e,n){return n<=0?t:1<=n?e:new x((e.x-t.x)*n+t.x,(e.y-t.y)*n+t.y,(e.z-t.z)*n+t.z)},Wo.compareLocationValues=function(t,e,n,r,i,s){return t=this._currentLine.getNumPoints()&&(this._componentIndex++,this.loadCurrentLine(),this._vertexIndex=0)},loadCurrentLine:function(){if(this._componentIndex>=this._numLines)return this._currentLine=null;this._currentLine=this._linearGeom.getGeometryN(this._componentIndex)},getSegmentStart:function(){return this._currentLine.getCoordinateN(this._vertexIndex)},isEndOfLine:function(){return!(this._componentIndex>=this._numLines||this._vertexIndex=this._numLines||this._componentIndex===this._numLines-1&&this._vertexIndex>=this._currentLine.getNumPoints())},interfaces_:function(){return[]},getClass:function(){return Xo}}),Xo.segmentEndVertexIndex=function(t){return 0=n.length&&(s=n.length-1),t.isVertex()||r.add(t.getCoordinate(this._line));for(var o=i;o<=s;o++)r.add(n[o]);e.isVertex()||r.add(e.getCoordinate(this._line)),r.size()<=0&&r.add(t.getCoordinate(this._line));var a=r.toCoordinateArray();return a.length<=1&&(a=[a[0],a[0]]),this._line.getFactory().createLineString(a)},extract:function(t,e){return e.compareTo(t)<0?this.reverse(this.computeLinear(e,t)):this.computeLinear(t,e)},reverse:function(t){return t instanceof Bt||t instanceof St?t.reverse():(b.shouldNeverReachHere("non-linear geometry encountered"),null)},interfaces_:function(){return[]},getClass:function(){return Qo}}),Qo.extract=function(t,e,n){return new Qo(t).extract(e,n)},e(Ko.prototype,{clampIndex:function(t){var e=t.copy();return e.clamp(this._linearGeom),e},project:function(t){return Ho.indexOf(this._linearGeom,t)},checkGeometryType:function(){if(!(this._linearGeom instanceof Bt||this._linearGeom instanceof St))throw new r("Input geometry must be linear")},extractPoint:function(){if(1===arguments.length)return arguments[0].getCoordinate(this._linearGeom);if(2===arguments.length){var t=arguments[1],e=arguments[0].toLowest(this._linearGeom);return e.getSegment(this._linearGeom).pointAlongOffset(e.getSegmentFraction(),t)}},isValidIndex:function(t){return t.isValid(this._linearGeom)},getEndIndex:function(){return Wo.getEndLocation(this._linearGeom)},getStartIndex:function(){return new Wo},indexOfAfter:function(t,e){return Ho.indexOfAfter(this._linearGeom,t,e)},extractLine:function(t,e){return Qo.extract(this._linearGeom,t,e)},indexOf:function(t){return Ho.indexOf(this._linearGeom,t)},indicesOf:function(t){return Jo.indicesOf(this._linearGeom,t)},interfaces_:function(){return[]},getClass:function(){return Ko}}),e($o.prototype,{indexOf:function(t){return this.indexOfFromStart(t,-1)},indexOfFromStart:function(t,e){for(var n=s.MAX_VALUE,r=e,i=0,o=new ve,a=new Xo(this._linearGeom);a.hasNext();){if(!a.isEndOfLine()){o.p0=a.getSegmentStart(),o.p1=a.getSegmentEnd();var u=o.distance(t),l=this.segmentNearestMeasure(o,t,i);u=this._linearGeom.getNumGeometries()-1)return t;for(;++e=this.getStartIndex()&&t<=this.getEndIndex()},getEndIndex:function(){return this._linearGeom.getLength()},getStartIndex:function(){return 0},indexOfAfter:function(t,e){return $o.indexOfAfter(this._linearGeom,t,e)},extractLine:function(t,e){new Ko(this._linearGeom);var n=this.clampIndex(t),r=this.clampIndex(e),i=n===r,s=this.locationOf(n,i),o=this.locationOf(r);return Qo.extract(this._linearGeom,s,o)},indexOf:function(t){return $o.indexOf(this._linearGeom,t)},indicesOf:function(t){var e=Jo.indicesOf(this._linearGeom,t);return[ta.getLength(this._linearGeom,e[0]),ta.getLength(this._linearGeom,e[1])]},interfaces_:function(){return[]},getClass:function(){return ea}});var na=Object.freeze({LengthIndexedLine:ea,LengthLocationMap:ta,LinearGeometryBuilder:Zo,LinearIterator:Xo,LinearLocation:Wo,LocationIndexedLine:Ko});function ra(){}e(ra.prototype,{interfaces_:function(){return[]},getClass:function(){return ra}}),ra.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return bs.createEmptyResult(bs.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),ms.overlayOp(t,e,bs.UNION)},e(J.prototype,{equalsTopo:function(t){return!!this.getEnvelopeInternal().equals(t.getEnvelopeInternal())&&zs.relate(this,t).isEquals(this.getDimension(),t.getDimension())},union:function(){if(0===arguments.length)return Js.union(this);if(1===arguments.length){var t=arguments[0];return ra.union(this,t)}},isValid:function(){return no.isValid(this)},intersection:function(t){if(this.isEmpty()||t.isEmpty())return bs.createEmptyResult(bs.INTERSECTION,this,t,this._factory);if(this.isGeometryCollection()){var e=t;return as.map(this,{interfaces_:function(){return[MapOp]},map:function(t){return t.intersection(e)}})}return this.checkNotGeometryCollection(this),this.checkNotGeometryCollection(t),ms.overlayOp(this,t,bs.INTERSECTION)},covers:function(t){return zs.covers(this,t)},coveredBy:function(t){return zs.covers(t,this)},touches:function(t){return zs.touches(this,t)},intersects:function(t){return zs.intersects(this,t)},within:function(t){return zs.contains(t,this)},overlaps:function(t){return zs.overlaps(this,t)},disjoint:function(t){return zs.disjoint(this,t)},crosses:function(t){return zs.crosses(this,t)},buffer:function(){if(1===arguments.length){var t=arguments[0];return ji.bufferOp(this,t)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return ji.bufferOp(this,e,n)}if(3===arguments.length){var r=arguments[0],i=arguments[1],s=arguments[2];return ji.bufferOp(this,r,i,s)}},convexHull:function(){return new rn(this).getConvexHull()},relate:function(){for(var t=arguments.length,e=new Array(t),n=0;n=Math.abs(a)?n-u+a:a-u+n,n=u}n+r>=0!=!!e&&t.reverse()}t.exports=function t(e,r){var i,s=e&&e.type;if("FeatureCollection"===s)for(i=0;i2&&void 0!==_[2]?_[2]:{},s=_.length>3&&void 0!==_[3]?_[3]:{},l=(0,a.getWorkerName)(e),h=o.default.getWorkerFarm(r),f=r.source,d={name:l,source:f},f||(d.url=(0,a.getWorkerURL)(e,r)),p=h.getWorkerPool(d),g=r.jobName||e.name,t.next=11,p.startJob(g,c.bind(null,s));case 11:return y=t.sent,v=(0,u.getTransferListForWriter)(r),y.postMessage("process",{input:n,options:v}),t.next=16,y.result;case 16:return m=t.sent,t.abrupt("return",m.result);case 18:case"end":return t.stop()}}),t)}))),l.apply(this,arguments)}function c(t,e,n,r){return h.apply(this,arguments)}function h(){return(h=(0,s.default)(i.default.mark((function t(e,n,r,s){var o,a,u,l,c;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=r,t.next="done"===t.t0?3:"error"===t.t0?5:"process"===t.t0?7:23;break;case 3:return n.done(s),t.abrupt("break",24);case 5:return n.error(new Error(s.error)),t.abrupt("break",24);case 7:if(o=s.id,a=s.input,u=s.options,t.prev=8,e.process){t.next=12;break}return n.postMessage("error",{id:o,error:"Worker not set up to process on main thread"}),t.abrupt("return");case 12:return t.next=14,e.process(a,u);case 14:l=t.sent,n.postMessage("done",{id:o,result:l}),t.next=22;break;case 18:t.prev=18,t.t1=t.catch(8),c=t.t1 instanceof Error?t.t1.message:"unknown error",n.postMessage("error",{id:o,error:c});case 22:return t.abrupt("break",24);case 23:console.warn("process-on-worker: unknown message ".concat(r));case 24:case"end":return t.stop()}}),t,null,[[8,18]])})))).apply(this,arguments)}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.createWorker=function(t,e){if(a.default.inWorkerThread()){var n,r={process:d};a.default.onmessage=(n=(0,s.default)(i.default.mark((function n(s,l){var f,d,p,g,y,v,m,_,b;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.prev=0,n.t0=s,n.next="process"===n.t0?4:"process-in-batches"===n.t0?11:"input-batch"===n.t0?46:"input-done"===n.t0?48:50;break;case 4:if(t){n.next=6;break}throw new Error("Worker does not support atomic processing");case 6:return n.next=8,t(l.input,l.options||{},r);case 8:return f=n.sent,a.default.postMessage("done",{result:f}),n.abrupt("break",50);case 11:if(e){n.next=13;break}throw new Error("Worker does not support batched processing");case 13:c=new o.default,h=l.options||{},d=e(c,h,r),p=!1,g=!1,n.prev=18,v=u(d);case 20:return n.next=22,v.next();case 22:if(!(p=!(m=n.sent).done)){n.next=28;break}_=m.value,a.default.postMessage("output-batch",{result:_});case 25:p=!1,n.next=20;break;case 28:n.next=34;break;case 30:n.prev=30,n.t1=n.catch(18),g=!0,y=n.t1;case 34:if(n.prev=34,n.prev=35,!p||null==v.return){n.next=39;break}return n.next=39,v.return();case 39:if(n.prev=39,!g){n.next=42;break}throw y;case 42:return n.finish(39);case 43:return n.finish(34);case 44:return a.default.postMessage("done",{}),n.abrupt("break",50);case 46:return c.push(l.input),n.abrupt("break",50);case 48:return c.close(),n.abrupt("break",50);case 50:n.next=56;break;case 52:n.prev=52,n.t2=n.catch(0),b=n.t2 instanceof Error?n.t2.message:"",a.default.postMessage("error",{error:b});case 56:case"end":return n.stop()}}),n,null,[[0,52],[18,30,34,44],[35,,39,43]])}))),function(t,e){return n.apply(this,arguments)})}};var i=r(n(21)),s=r(n(24)),o=r(n(83)),a=r(n(81));function u(t){var e,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(e=t[n]))return e.call(t);if(r&&null!=(e=t[r]))return new l(e.call(t));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function l(t){function e(t){if(Object(t)!==t)return Promise.reject(new TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then((function(t){return{value:t,done:e}}))}return l=function(t){this.s=t,this.n=t.next},l.prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(t){var n=this.s.return;return void 0===n?Promise.resolve({value:t,done:!0}):e(n.apply(this.s,arguments))},throw:function(t){var n=this.s.return;return void 0===n?Promise.reject(t):e(n.apply(this.s,arguments))}},new l(t)}var c,h,f=0;function d(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var i=f++;a.default.addEventListener((function t(e,s){if(s.id===i)switch(e){case"done":a.default.removeEventListener(t),n(s.result);break;case"error":a.default.removeEventListener(t),r(s.error)}}));var s={id:i,input:t,options:e};a.default.postMessage("process",s)}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateWorkerVersion=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.VERSION;(0,r.assert)(t,"no worker provided");var n=t.version;return!(!e||!n)};var r=n(36),i=n(46)},function(t,e,n){"use strict";var r=n(20),i=n(25);Object.defineProperty(e,"__esModule",{value:!0}),e.getLibraryUrl=p,e.loadLibrary=function(t){return d.apply(this,arguments)};var s=r(n(21)),o=r(n(24)),a=n(47),u=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var n=c(e);if(n&&n.has(t))return n.get(t);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var a=s?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}(n(131)),l=n(36);function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(c=function(t){return t?n:e})(t)}n(46);var h="3.4.7",f={};function d(){return d=(0,o.default)(s.default.mark((function t(e){var n,r,i=arguments;return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>2&&void 0!==i[2]?i[2]:{},(n=i.length>1&&void 0!==i[1]?i[1]:null)&&(e=p(e,n,r)),f[e]=f[e]||g(e),t.next=6,f[e];case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)}))),d.apply(this,arguments)}function p(t,e,n){if(t.startsWith("http"))return t;var r=n.modules||{};return r[t]?r[t]:a.isBrowser?n.CDN?((0,l.assert)(n.CDN.startsWith("http")),"".concat(n.CDN,"/").concat(e,"@").concat(h,"/dist/libs/").concat(t)):a.isWorker?"../src/libs/".concat(t):"modules/".concat(e,"/src/libs/").concat(t):"modules/".concat(e,"/dist/libs/").concat(t)}function g(t){return y.apply(this,arguments)}function y(){return(y=(0,o.default)(s.default.mark((function t(e){var n,r,i;return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.endsWith("wasm")){t.next=7;break}return t.next=3,fetch(e);case 3:return n=t.sent,t.next=6,n.arrayBuffer();case 6:return t.abrupt("return",t.sent);case 7:if(a.isBrowser){t.next=20;break}if(t.prev=8,t.t0=u&&u.requireFromFile,!t.t0){t.next=14;break}return t.next=13,u.requireFromFile(e);case 13:t.t0=t.sent;case 14:return t.abrupt("return",t.t0);case 17:return t.prev=17,t.t1=t.catch(8),t.abrupt("return",null);case 20:if(!a.isWorker){t.next=22;break}return t.abrupt("return",importScripts(e));case 22:return t.next=24,fetch(e);case 24:return r=t.sent,t.next=27,r.text();case 27:return i=t.sent,t.abrupt("return",v(i,e));case 29:case"end":return t.stop()}}),t,null,[[8,17]])})))).apply(this,arguments)}function v(t,e){if(!a.isBrowser)return u.requireFromString&&u.requireFromString(t,e);if(a.isWorker)return eval.call(a.global,t),null;var n=document.createElement("script");n.id=e;try{n.appendChild(document.createTextNode(t))}catch(e){n.text=t}return document.body.appendChild(n),null}},function(t,e){},function(t,e){},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.canParseWithWorker=function(t,e){return!!o.WorkerFarm.isSupported()&&(!!(o.isBrowser||null!=e&&e._nodeWorkers)&&(t.worker&&(null==e?void 0:e.worker)))},e.parseWithWorker=function(t,e,n,r,i){return a.apply(this,arguments)};var i=r(n(21)),s=r(n(24)),o=n(43);function a(){return(a=(0,s.default)(i.default.mark((function t(e,n,r,s,a){var l,c,h,f,d,p;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=e.id,c=(0,o.getWorkerURL)(e,r),h=o.WorkerFarm.getWorkerFarm(r),f=h.getWorkerPool({name:l,url:c}),r=JSON.parse(JSON.stringify(r)),s=JSON.parse(JSON.stringify(s||{})),t.next=8,f.startJob("process-on-worker",u.bind(null,a));case 8:return(d=t.sent).postMessage("process",{input:n,options:r,context:s}),t.next=12,d.result;case 12:return p=t.sent,t.next=15,p.result;case 15:return t.abrupt("return",t.sent);case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function u(t,e,n,r){return l.apply(this,arguments)}function l(){return(l=(0,s.default)(i.default.mark((function t(e,n,r,s){var o,a,u,l,c;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=r,t.next="done"===t.t0?3:"error"===t.t0?5:"process"===t.t0?7:20;break;case 3:return n.done(s),t.abrupt("break",21);case 5:return n.error(new Error(s.error)),t.abrupt("break",21);case 7:return o=s.id,a=s.input,u=s.options,t.prev=8,t.next=11,e(a,u);case 11:l=t.sent,n.postMessage("done",{id:o,result:l}),t.next=19;break;case 15:t.prev=15,t.t1=t.catch(8),c=t.t1 instanceof Error?t.t1.message:"unknown error",n.postMessage("error",{id:o,error:c});case 19:return t.abrupt("break",21);case 20:console.warn("parse-with-worker unknown message ".concat(r));case 21:case"end":return t.stop()}}),t,null,[[8,15]])})))).apply(this,arguments)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.canEncodeWithWorker=function(t,e){return!!r.WorkerFarm.isSupported()&&(!!(i.isBrowser||null!=e&&e._nodeWorkers)&&(t.worker&&(null==e?void 0:e.worker)))};var r=n(43),i=n(54)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseJSON=function(t){try{return JSON.parse(t)}catch(e){throw new Error('Failed to parse JSON from data starting with "'.concat((0,r.getFirstCharacters)(t),'"'))}};var r=n(84)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.copyBinaryToDataView=function(t,e,n,r){if(t)for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{};return i.default.mark((function n(){var r,o,u,l,c,h,f;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=new TextDecoder(void 0,e),o=!1,u=!1,n.prev=3,c=a(t);case 5:return n.next=7,(0,s.default)(c.next());case 7:if(!(o=!(h=n.sent).done)){n.next=14;break}return f=h.value,n.next=11,"string"==typeof f?f:r.decode(f,{stream:!0});case 11:o=!1,n.next=5;break;case 14:n.next=20;break;case 16:n.prev=16,n.t0=n.catch(3),u=!0,l=n.t0;case 20:if(n.prev=20,n.prev=21,!o||null==c.return){n.next=25;break}return n.next=25,(0,s.default)(c.return());case 25:if(n.prev=25,!u){n.next=28;break}throw l;case 28:return n.finish(25);case 29:return n.finish(20);case 30:case"end":return n.stop()}}),n,null,[[3,16,20,30],[21,,25,29]])}))()})),l.apply(this,arguments)}function c(){return(c=(0,o.default)(i.default.mark((function t(e){var n,r,o,u,l,c,h;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=new TextEncoder,r=!1,o=!1,t.prev=3,l=a(e);case 5:return t.next=7,(0,s.default)(l.next());case 7:if(!(r=!(c=t.sent).done)){t.next=14;break}return h=c.value,t.next=11,"string"==typeof h?n.encode(h):h;case 11:r=!1,t.next=5;break;case 14:t.next=20;break;case 16:t.prev=16,t.t0=t.catch(3),o=!0,u=t.t0;case 20:if(t.prev=20,t.prev=21,!r||null==l.return){t.next=25;break}return t.next=25,(0,s.default)(l.return());case 25:if(t.prev=25,!o){t.next=28;break}throw u;case 28:return t.finish(25);case 29:return t.finish(20);case 30:case"end":return t.stop()}}),t,null,[[3,16,20,30],[21,,25,29]])})))).apply(this,arguments)}function h(){return(h=(0,o.default)(i.default.mark((function t(e){var n,r,o,u,l,c,h,f,d;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n="",r=!1,o=!1,t.prev=3,l=a(e);case 5:return t.next=7,(0,s.default)(l.next());case 7:if(!(r=!(c=t.sent).done)){t.next=21;break}h=c.value,n+=h,f=void 0;case 11:if(!((f=n.indexOf("\n"))>=0)){t.next=18;break}return d=n.slice(0,f+1),n=n.slice(f+1),t.next=16,d;case 16:t.next=11;break;case 18:r=!1,t.next=5;break;case 21:t.next=27;break;case 23:t.prev=23,t.t0=t.catch(3),o=!0,u=t.t0;case 27:if(t.prev=27,t.prev=28,!r||null==l.return){t.next=32;break}return t.next=32,(0,s.default)(l.return());case 32:if(t.prev=32,!o){t.next=35;break}throw u;case 35:return t.finish(32);case 36:return t.finish(27);case 37:if(!(n.length>0)){t.next=40;break}return t.next=40,n;case 40:case"end":return t.stop()}}),t,null,[[3,23,27,37],[28,,32,36]])})))).apply(this,arguments)}function f(){return(f=(0,o.default)(i.default.mark((function t(e){var n,r,o,u,l,c,h;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=1,r=!1,o=!1,t.prev=3,l=a(e);case 5:return t.next=7,(0,s.default)(l.next());case 7:if(!(r=!(c=t.sent).done)){t.next=15;break}return h=c.value,t.next=11,{counter:n,line:h};case 11:n++;case 12:r=!1,t.next=5;break;case 15:t.next=21;break;case 17:t.prev=17,t.t0=t.catch(3),o=!0,u=t.t0;case 21:if(t.prev=21,t.prev=22,!r||null==l.return){t.next=26;break}return t.next=26,(0,s.default)(l.return());case 26:if(t.prev=26,!o){t.next=29;break}throw u;case 29:return t.finish(26);case 30:return t.finish(21);case 31:case"end":return t.stop()}}),t,null,[[3,17,21,31],[22,,26,30]])})))).apply(this,arguments)}},function(t,e,n){var r=n(56);function i(t){var e,n;function i(e,n){try{var o=t[e](n),a=o.value,u=a instanceof r;Promise.resolve(u?a.v:a).then((function(n){if(u){var r="return"===e?"return":"next";if(!a.k||n.done)return i(r,n);n=t[r](n).value}s(o.done?"return":"normal",n)}),(function(t){i("throw",t)}))}catch(t){s("throw",t)}}function s(t,r){switch(t){case"return":e.resolve({value:r,done:!0});break;case"throw":e.reject(r);break;default:e.resolve({value:r,done:!1})}(e=e.next)?i(e.key,e.arg):n=null}this._invoke=function(t,r){return new Promise((function(s,o){var a={key:t,arg:r,resolve:s,reject:o,next:null};n?n=n.next=a:(e=n=a,i(t,r))}))},"function"!=typeof t.return&&(this.return=void 0)}i.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},i.prototype.next=function(t){return this._invoke("next",t)},i.prototype.throw=function(t){return this._invoke("throw",t)},i.prototype.return=function(t){return this._invoke("return",t)},t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.concatenateArrayBuffersAsync=function(t){return c.apply(this,arguments)},e.concatenateStringsAsync=function(t){return h.apply(this,arguments)},e.forEach=function(t,e){return l.apply(this,arguments)};var i=r(n(21)),s=r(n(24)),o=n(85);function a(t){var e,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(e=t[n]))return e.call(t);if(r&&null!=(e=t[r]))return new u(e.call(t));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function u(t){function e(t){if(Object(t)!==t)return Promise.reject(new TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then((function(t){return{value:t,done:e}}))}return u=function(t){this.s=t,this.n=t.next},u.prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(t){var n=this.s.return;return void 0===n?Promise.resolve({value:t,done:!0}):e(n.apply(this.s,arguments))},throw:function(t){var n=this.s.return;return void 0===n?Promise.reject(t):e(n.apply(this.s,arguments))}},new u(t)}function l(){return(l=(0,s.default)(i.default.mark((function t(e,n){var r,s,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,e.next();case 3:if(r=t.sent,s=r.done,o=r.value,!s){t.next=9;break}return e.return(),t.abrupt("return");case 9:if(!n(o)){t.next=12;break}return t.abrupt("return");case 12:t.next=0;break;case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function c(){return(c=(0,s.default)(i.default.mark((function t(e){var n,r,s,u,l,c,h;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],r=!1,s=!1,t.prev=3,l=a(e);case 5:return t.next=7,l.next();case 7:if(!(r=!(c=t.sent).done)){t.next=13;break}h=c.value,n.push(h);case 10:r=!1,t.next=5;break;case 13:t.next=19;break;case 15:t.prev=15,t.t0=t.catch(3),s=!0,u=t.t0;case 19:if(t.prev=19,t.prev=20,!r||null==l.return){t.next=24;break}return t.next=24,l.return();case 24:if(t.prev=24,!s){t.next=27;break}throw u;case 27:return t.finish(24);case 28:return t.finish(19);case 29:return t.abrupt("return",o.concatenateArrayBuffers.apply(void 0,n));case 30:case"end":return t.stop()}}),t,null,[[3,15,19,29],[20,,24,28]])})))).apply(this,arguments)}function h(){return(h=(0,s.default)(i.default.mark((function t(e){var n,r,s,o,u,l,c;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],r=!1,s=!1,t.prev=3,u=a(e);case 5:return t.next=7,u.next();case 7:if(!(r=!(l=t.sent).done)){t.next=13;break}c=l.value,n.push(c);case 10:r=!1,t.next=5;break;case 13:t.next=19;break;case 15:t.prev=15,t.t0=t.catch(3),s=!0,o=t.t0;case 19:if(t.prev=19,t.prev=20,!r||null==u.return){t.next=24;break}return t.next=24,u.return();case 24:if(t.prev=24,!s){t.next=27;break}throw o;case 27:return t.finish(24);case 28:return t.finish(19);case 29:return t.abrupt("return",n.join(""));case 30:case"end":return t.stop()}}),t,null,[[3,15,19,29],[20,,24,28]])})))).apply(this,arguments)}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(22)),s=r(n(23)),o=r(n(2)),a=n(141);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};(0,i.default)(this,t),(0,o.default)(this,"props",void 0),(0,o.default)(this,"stats",void 0),(0,o.default)(this,"activeRequestCount",0),(0,o.default)(this,"requestQueue",[]),(0,o.default)(this,"requestMap",new Map),(0,o.default)(this,"deferredUpdate",null),this.props=l(l({},g),e),this.stats=new a.Stats({id:this.props.id}),this.stats.get(c),this.stats.get(h),this.stats.get(f),this.stats.get(d),this.stats.get(p)}return(0,s.default)(t,[{key:"scheduleRequest",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return 0};if(!this.props.throttleRequests)return Promise.resolve({done:function(){}});if(this.requestMap.has(t))return this.requestMap.get(t);var n={handle:t,priority:0,getPriority:e},r=new Promise((function(t){return n.resolve=t,n}));return this.requestQueue.push(n),this.requestMap.set(t,r),this._issueNewRequests(),r}},{key:"_issueRequest",value:function(t){var e=this,n=t.handle,r=t.resolve,i=!1,s=function(){i||(i=!0,e.requestMap.delete(n),e.activeRequestCount--,e._issueNewRequests())};return this.activeRequestCount++,r?r({done:s}):Promise.resolve({done:s})}},{key:"_issueNewRequests",value:function(){var t=this;this.deferredUpdate||(this.deferredUpdate=setTimeout((function(){return t._issueNewRequestsAsync()}),0))}},{key:"_issueNewRequestsAsync",value:function(){this.deferredUpdate=null;var t=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(0!==t){this._updateAllRequests();for(var e=0;e{for(var n in e)r(t,n,{get:e[n],enumerable:!0})})(a,{Stat:()=>l,Stats:()=>c,_getHiResTimestamp:()=>u}),t.exports=(n=a,((t,e,n,a)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of s(e))o.call(t,n)||undefined===n||r(t,n,{get:()=>e[n],enumerable:!(a=i(e,n))||a.enumerable});return t})(r({},"__esModule",{value:!0}),n));var l=class{constructor(t,e){this.sampleSize=1,this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this.name=t,this.type=e,this.reset()}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}setSampleSize(t){return this.sampleSize=t,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(t){return this._count+=t,this._samples++,this._checkSampling(),this}subtractCount(t){return this._count-=t,this._samples++,this._checkSampling(),this}addTime(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=u(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(u()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}},c=class{constructor(t){this.stats={},this.id=t.id,this.stats={},this._initializeStats(t.stats),Object.seal(this)}get(t,e="count"){return this._getOrCreate({name:t,type:e})}get size(){return Object.keys(this.stats).length}reset(){for(const t of Object.values(this.stats))t.reset();return this}forEach(t){for(const e of Object.values(this.stats))t(e)}getTable(){const t={};return this.forEach((e=>{t[e.name]={time:e.time||0,count:e.count||0,average:e.getAverageTime()||0,hz:e.getHz()||0}})),t}_initializeStats(t=[]){t.forEach((t=>this._getOrCreate(t)))}_getOrCreate(t){const{name:e,type:n}=t;let r=this.stats[e];return r||(r=t instanceof l?t:new l(e,n),this.stats[e]=r),r}}}).call(this,n(42))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addAliases=function(t){Object.assign(i,t)},e.getPathPrefix=function(){return r},e.resolvePath=function(t){for(var e in i)if(t.startsWith(e)){var n=i[e];t=t.replace(e,n)}return t.startsWith("http://")||t.startsWith("https://")||(t="".concat(r).concat(t)),t},e.setPathPrefix=function(t){r=t};var r="",i={}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e._typecheckJSONLoader=e.JSONLoader=void 0;var i,s=r(n(21)),o=r(n(24)),a={name:"JSON",id:"json",module:"json",version:"3.4.7",extensions:["json","geojson"],mimeTypes:["application/json"],category:"json",text:!0,parseTextSync:u,parse:(i=(0,o.default)(s.default.mark((function t(e){return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",u((new TextDecoder).decode(e)));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)}),options:{}};function u(t){return JSON.parse(t)}e.JSONLoader=a;var l=a;e._typecheckJSONLoader=l},function(t,e,n){"use strict";var r=n(20),i=n(25);Object.defineProperty(e,"__esModule",{value:!0}),e.isBuffer=u,e.toArrayBuffer=function(t){if(u(t))return o.toArrayBuffer(t);if(t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return 0===t.byteOffset&&t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);if("string"==typeof t){var e=t;return(new TextEncoder).encode(e).buffer}if(t&&"object"===(0,s.default)(t)&&t._toArrayBuffer)return t._toArrayBuffer();throw new Error("toArrayBuffer")},e.toBuffer=function(t){return o.toBuffer?o.toBuffer(t):t};var s=r(n(25)),o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var n=a(e);if(n&&n.has(t))return n.get(t);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var u=s?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}(n(87));function a(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(a=function(t){return t?n:e})(t)}function u(t){return t&&"object"===(0,s.default)(t)&&t.isBuffer}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dirname=function(t){var e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(0,e):""},e.filename=function(t){var e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(e+1):""},e.join=function(){for(var t=arguments.length,e=new Array(t),n=0;n=-1&&!a;u--){var l=void 0;u>=0?l=t[u]:(void 0===n&&(n=(0,r.getCWD)()),l=n),0!==l.length&&(o="".concat(l,"/").concat(o),a=l.charCodeAt(0)===i)}return o=function(t,e){for(var n,r="",o=-1,a=0,u=!1,l=0;l<=t.length;++l){if(l2){for(var c=r.length-1,h=c;h>=0&&r.charCodeAt(h)!==i;--h);if(h!==c){r=-1===h?"":r.slice(0,h),o=l,a=0,u=!1;continue}}else if(2===r.length||1===r.length){r="",o=l,a=0,u=!1;continue}e&&(r.length>0?r+="/..":r="..",u=!0)}else{var f=t.slice(o+1,l);r.length>0?r+="/".concat(f):r=f,u=!1}o=l,a=0}else n===s&&-1!==a?++a:a=-1}return r}(o,!a),a?"/".concat(o):o.length>0?o:"."};var r=n(146),i=47,s=46},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.getCWD=function(){var e;if(void 0!==t&&void 0!==t.cwd)return t.cwd();var n=null===(e=window.location)||void 0===e?void 0:e.pathname;return(null==n?void 0:n.slice(0,n.lastIndexOf("/")+1))||""}}).call(this,n(42))},function(t,e){},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.isSupported=e.Transform=void 0;var i,s=r(n(149));e.Transform=i;var o=Boolean(s.default);e.isSupported=o;try{e.Transform=i=s.default.Transform}catch(t){}},function(t,e){},function(t,e,n){"use strict";(function(t){var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.makeReadableFile=function(e){if(e instanceof ArrayBuffer){var n=e;return{read:(o=(0,s.default)(i.default.mark((function n(r,s){return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",t.from(e,r,s));case 1:case"end":return n.stop()}}),n)}))),function(t,e){return o.apply(this,arguments)}),close:(r=(0,s.default)(i.default.mark((function t(){return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)}),size:n.byteLength}}var r,o,a,u,l=e;return{read:(u=(0,s.default)(i.default.mark((function e(n,r){var s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.slice(n,n+r).arrayBuffer();case 2:return s=e.sent,e.abrupt("return",t.from(s));case 4:case"end":return e.stop()}}),e)}))),function(t,e){return u.apply(this,arguments)}),close:(a=(0,s.default)(i.default.mark((function t(){return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)}),size:l.size}};var i=r(n(21)),s=r(n(24))}).call(this,n(89).Buffer)},function(t,e,n){"use strict";var r=n(20),i=n(25);Object.defineProperty(e,"__esModule",{value:!0}),e.makeWritableFile=function(t,e){if(a.isBrowser)return{write:(r=(0,o.default)(s.default.mark((function t(){return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)}),close:(n=(0,o.default)(s.default.mark((function t(){return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})};var n,r,i,l="string"==typeof t?u.createWriteStream(t,e):t;return{write:(i=(0,o.default)(s.default.mark((function t(e){return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){l.write(e,(function(e){return e?n(e):t()}))})));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)}),close:function(){return new Promise((function(t,e){l.close((function(n){return n?e(n):t()}))}))}}};var s=r(n(21)),o=r(n(24)),a=n(54),u=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var n=l(e);if(n&&n.has(t))return n.get(t);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var a=s?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}(n(57));function l(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(l=function(t){return t?n:e})(t)}},function(t,e,n){"use strict";var r=n(20),i=n(25);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=r(n(21)),o=r(n(24)),a=r(n(22)),u=r(n(23)),l=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var n=c(e);if(n&&n.has(t))return n.get(t);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var a=s?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}(n(57));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(c=function(t){return t?n:e})(t)}var h=function(){function t(e){(0,a.default)(this,t),this.fetch=e._fetch}var e,n,r,i,c,h,f;return(0,u.default)(t,[{key:"readdir",value:(f=(0,o.default)(s.default.mark((function t(){var e,n,r=arguments;return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:".",n=r.length>1?r[1]:void 0,t.next=4,l.readdir(e,n);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)}))),function(){return f.apply(this,arguments)})},{key:"stat",value:(h=(0,o.default)(s.default.mark((function t(e,n){var r;return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.stat(e,n);case 2:return r=t.sent,t.abrupt("return",{size:Number(r.size),isDirectory:function(){return!1},info:r});case 4:case"end":return t.stop()}}),t)}))),function(t,e){return h.apply(this,arguments)})},{key:"fetch",value:(c=(0,o.default)(s.default.mark((function t(e,n){var r;return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.fetch||this.fetch,t.abrupt("return",r(e,n));case 2:case"end":return t.stop()}}),t,this)}))),function(t,e){return c.apply(this,arguments)})},{key:"open",value:(i=(0,o.default)(s.default.mark((function t(e,n,r){return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.open(e,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),function(t,e,n){return i.apply(this,arguments)})},{key:"close",value:(r=(0,o.default)(s.default.mark((function t(e){return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.close(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)})},{key:"fstat",value:(n=(0,o.default)(s.default.mark((function t(e){var n;return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.fstat(e);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"read",value:(e=(0,o.default)(s.default.mark((function t(e,n){var r,i,o,a,u,c,h,f,d,p,g;return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=n.buffer,i=void 0===r?null:r,o=n.offset,a=void 0===o?0:o,u=n.length,c=void 0===u?i.byteLength:u,h=n.position,f=void 0===h?null:h,d=0;case 2:if(!(d1&&void 0!==arguments[1]?arguments[1]:{};if(t=(0,r.resolvePath)(t),!r.isBrowser){var n=r.fs.readFileSync(t,e);return"string"!=typeof n?(0,r.toArrayBuffer)(n):n}return e.nothrow||(0,r.assert)(!1),null};var r=n(26)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.REMOVED_LOADER_OPTIONS=e.DEFAULT_LOADER_OPTIONS=void 0;var r=n(26),i={fetch:null,mimeType:void 0,nothrow:!1,log:new(n(92).ConsoleLog),CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:r.isBrowser,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]};e.DEFAULT_LOADER_OPTIONS=i,e.REMOVED_LOADER_OPTIONS={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.log=void 0;var r=new(n(93).Log)({id:"loaders.gl"});e.log=r},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.makeStringIterator=a;var i=r(n(21)),s=i.default.mark(a),o=262144;function a(t,e){var n,r,a,u,l;return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:n=(null==e?void 0:e.chunkSize)||o,r=0,a=new TextEncoder;case 3:if(!(r1&&void 0!==arguments[1]?arguments[1]:{};return i.default.mark((function n(){var r,o,a,u,l,c;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=e.chunkSize,o=void 0===r?s:r,a=0;case 2:if(!(a2&&void 0!==f[2]?f[2]:function(){},o=f.length>3&&void 0!==f[3]?f[3]:function(){},t.next=4,e;case 4:if((e=t.sent).ok){t.next=7;break}return t.abrupt("return",e);case 7:if(u=e.body){t.next=10;break}return t.abrupt("return",e);case 10:if(l=e.headers.get("content-length")||0,(c=l?parseInt(l):0)>0){t.next=14;break}return t.abrupt("return",e);case 14:if("undefined"!=typeof ReadableStream&&u.getReader){t.next=16;break}return t.abrupt("return",e);case 16:return h=new ReadableStream({start:function(t){return(0,s.default)(i.default.mark((function e(){var s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=u.getReader(),e.next=3,a(t,s,0,c,n,r,o);case 3:case"end":return e.stop()}}),e)})))()}}),t.abrupt("return",new Response(h));case 18:case"end":return t.stop()}}),t)}))),o.apply(this,arguments)}function a(t,e,n,r,i,s,o){return u.apply(this,arguments)}function u(){return(u=(0,s.default)(i.default.mark((function t(e,n,r,s,o,u,l){var c,h,f,d;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n.read();case 3:if(c=t.sent,h=c.done,f=c.value,!h){t.next=10;break}return u(),e.close(),t.abrupt("return");case 10:return r+=f.byteLength,d=Math.round(r/s*100),o(d,{loadedBytes:r,totalBytes:s}),e.enqueue(f),t.next=16,a(e,n,r,s,o,u,l);case 16:t.next=22;break;case 18:t.prev=18,t.t0=t.catch(0),e.error(t.t0),l(t.t0);case 22:case"end":return t.stop()}}),t,null,[[0,18]])})))).apply(this,arguments)}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(21)),s=r(n(24)),o=r(n(22)),a=r(n(23)),u=r(n(2)),l=function(){function t(e,n){(0,o.default)(this,t),(0,u.default)(this,"_fetch",void 0),(0,u.default)(this,"files",{}),(0,u.default)(this,"lowerCaseFiles",{}),(0,u.default)(this,"usedFiles",{}),this._fetch=(null==n?void 0:n.fetch)||fetch;for(var r=0;r3&&void 0!==a[3]?a[3]:n.byteLength,s=e,t.next=7,s.slice(0,0+r).arrayBuffer();case 7:return o=t.sent,t.abrupt("return",{bytesRead:r,buffer:o});case 9:case"end":return t.stop()}}),t)}))),function(t,e){return n.apply(this,arguments)})},{key:"close",value:(e=(0,s.default)(i.default.mark((function t(e){return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(t){return e.apply(this,arguments)})},{key:"_getFile",value:function(t,e){var n=this.files[t]||this.lowerCaseFiles[t];return n&&e&&(this.usedFiles[t]=!0),n}}]),t}();e.default=l},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"JSONLoader",{enumerable:!0,get:function(){return i.JSONLoader}}),Object.defineProperty(e,"NDJSONLoader",{enumerable:!0,get:function(){return s.NDJSONLoader}}),Object.defineProperty(e,"_ClarinetParser",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"_GeoJSONLoader",{enumerable:!0,get:function(){return o.GeoJSONLoader}}),Object.defineProperty(e,"_GeoJSONWorkerLoader",{enumerable:!0,get:function(){return o.GeoJSONWorkerLoader}}),Object.defineProperty(e,"_JSONPath",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"_rebuildJsonObject",{enumerable:!0,get:function(){return l.rebuildJsonObject}});var i=n(172),s=n(190),o=n(193),a=r(n(51)),u=r(n(104)),l=n(65)},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.JSONLoader=void 0;var i=r(n(21)),s=r(n(2)),o=r(n(24)),a=r(n(98)),u=r(n(65));function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e=this.options.limit)||!!(Boolean(null===(e=this.options)||void 0===e?void 0:e._limitMB)&&this.totalBytes/1e6>=this.options._limitMB)}},{key:"addRow",value:function(t){this.limitReached()||(this.totalLength++,this.rowBytes=this.rowBytes||this._estimateRowMB(t),this.totalBytes+=this.rowBytes,Array.isArray(t)?this.addArrayRow(t):this.addObjectRow(t))}},{key:"addArrayRow",value:function(t){if(!this.aggregator){var e=this._getTableBatchType();this.aggregator=new e(this.schema,this.options)}this.aggregator.addArrayRow(t)}},{key:"addObjectRow",value:function(t){if(!this.aggregator){var e=this._getTableBatchType();this.aggregator=new e(this.schema,this.options)}this.aggregator.addObjectRow(t)}},{key:"chunkComplete",value:function(t){t instanceof ArrayBuffer&&(this.bytesUsed+=t.byteLength),"string"==typeof t&&(this.bytesUsed+=t.length),this.isChunkComplete=!0}},{key:"getFullBatch",value:function(t){return this._isFull()?this._getBatch(t):null}},{key:"getFinalBatch",value:function(t){return this._getBatch(t)}},{key:"_estimateRowMB",value:function(t){return Array.isArray(t)?8*t.length:8*Object.keys(t).length}},{key:"_isFull",value:function(){if(!this.aggregator||0===this.aggregator.rowCount())return!1;if("auto"===this.options.batchSize){if(!this.isChunkComplete)return!1}else if(this.options.batchSize>this.aggregator.rowCount())return!1;return!(this.options.batchDebounceMs>Date.now()-this.lastBatchEmittedMs||(this.isChunkComplete=!1,this.lastBatchEmittedMs=Date.now(),0))}},{key:"_getBatch",value:function(t){if(!this.aggregator)return null;null!=t&&t.bytesUsed&&(this.bytesUsed=t.bytesUsed);var e=this.aggregator.getBatch();return e.count=this.batchCount,e.bytesUsed=this.bytesUsed,Object.assign(e,t),this.batchCount++,this.aggregator=null,e}},{key:"_getTableBatchType",value:function(){switch(this.options.shape){case"row-table":return a.default;case"array-row-table":case"object-row-table":return u.default;case"columnar-table":return l.default;case"arrow-table":if(!t.ArrowBatch)throw new Error(d);return t.ArrowBatch;default:throw new Error(d)}}}]),t}();e.default=p,(0,o.default)(p,"ArrowBatch",void 0)},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(22)),s=r(n(23)),o=r(n(2)),a=function(){function t(e,n){if((0,i.default)(this,t),(0,o.default)(this,"schema",void 0),(0,o.default)(this,"options",void 0),(0,o.default)(this,"length",0),(0,o.default)(this,"rows",null),(0,o.default)(this,"cursor",0),(0,o.default)(this,"_headers",[]),this.options=n,this.schema=e,!Array.isArray(e))for(var r in this._headers=[],e)this._headers[e[r].index]=e[r].name}return(0,s.default)(t,[{key:"rowCount",value:function(){return this.length}},{key:"addArrayRow",value:function(t,e){Number.isFinite(e)&&(this.cursor=e),this.rows=this.rows||new Array(100),this.rows[this.length]=t,this.length++}},{key:"addObjectRow",value:function(t,e){Number.isFinite(e)&&(this.cursor=e),this.rows=this.rows||new Array(100),this.rows[this.length]=t,this.length++}},{key:"getBatch",value:function(){var t=this.rows;return t?(t=t.slice(0,this.length),this.rows=null,{shape:this.options.shape,batchType:"data",data:t,length:this.length,schema:this.schema,cursor:this.cursor}):null}}]),t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMeshBoundingBox=function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,s=-1/0,o=-1/0,a=t.POSITION?t.POSITION.value:[],u=a&&a.length,l=0;li?c:i,s=h>s?h:s,o=f>o?f:o}return[[e,n,r],[i,s,o]]},e.getMeshSize=function(t){var e=0;for(var n in t){var r=t[n];ArrayBuffer.isView(r)&&(e+=r.byteLength*r.BYTES_PER_ELEMENT)}return e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deduceMeshField=s,e.deduceMeshSchema=function(t,e){var n=function(t){var e=[];for(var n in t){var r=t[n];e.push(s(n,r))}return e}(t);return new r.Schema(n,e)},e.makeMeshAttributeMetadata=o;var r=n(50),i=n(103);function s(t,e,n){var s=(0,i.getArrowTypeFromTypedArray)(e.value),a=n||o(e);return new r.Field(t,new r.FixedSizeList(e.size,new r.Field("value",s)),!1,a)}function o(t){var e=new Map;return"byteOffset"in t&&e.set("byteOffset",t.byteOffset.toString(10)),"byteStride"in t&&e.set("byteStride",t.byteStride.toString(10)),"normalized"in t&&e.set("normalized",t.normalized.toString()),e}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(38)),s=r(n(22)),o=r(n(23)),a=r(n(2)),u=n(178);function l(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw s}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;(0,i.default)(this,t),(0,o.default)(this,"name",void 0),(0,o.default)(this,"type",void 0),(0,o.default)(this,"nullable",void 0),(0,o.default)(this,"metadata",void 0),this.name=e,this.type=n,this.nullable=r,this.metadata=s}return(0,s.default)(t,[{key:"typeId",get:function(){return this.type&&this.type.typeId}},{key:"clone",value:function(){return new t(this.name,this.type,this.nullable,this.metadata)}},{key:"compareTo",value:function(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}},{key:"toString",value:function(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}]),t}();e.default=a},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.TimestampSecond=e.TimestampNanosecond=e.TimestampMillisecond=e.TimestampMicrosecond=e.Timestamp=e.TimeSecond=e.TimeMillisecond=e.Time=e.Struct=e.Null=e.IntervalYearMonth=e.IntervalDayTime=e.Interval=e.Int8=e.Int64=e.Int32=e.Int16=e.Int=e.Float64=e.Float32=e.Float16=e.Float=e.FixedSizeList=e.DateMillisecond=e.DateDay=e.Date=e.DataType=e.Bool=e.Binary=void 0,Object.defineProperty(e,"Type",{enumerable:!0,get:function(){return _.Type}}),e.Utf8=e.Uint8=e.Uint64=e.Uint32=e.Uint16=void 0;var i,s,o,a,u,l,c,h,f=r(n(102)),d=r(n(2)),p=r(n(28)),g=r(n(29)),y=r(n(27)),v=r(n(22)),m=r(n(23)),_=n(181);function b(t){var e=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(t){return!1}}();return function(){var n,r=(0,y.default)(t);if(e){var i=(0,y.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,g.default)(this,n)}}var x=function(){function t(){(0,v.default)(this,t)}return(0,m.default)(t,[{key:"typeId",get:function(){return _.Type.NONE}},{key:"compareTo",value:function(t){return this===t}}],[{key:"isNull",value:function(t){return t&&t.typeId===_.Type.Null}},{key:"isInt",value:function(t){return t&&t.typeId===_.Type.Int}},{key:"isFloat",value:function(t){return t&&t.typeId===_.Type.Float}},{key:"isBinary",value:function(t){return t&&t.typeId===_.Type.Binary}},{key:"isUtf8",value:function(t){return t&&t.typeId===_.Type.Utf8}},{key:"isBool",value:function(t){return t&&t.typeId===_.Type.Bool}},{key:"isDecimal",value:function(t){return t&&t.typeId===_.Type.Decimal}},{key:"isDate",value:function(t){return t&&t.typeId===_.Type.Date}},{key:"isTime",value:function(t){return t&&t.typeId===_.Type.Time}},{key:"isTimestamp",value:function(t){return t&&t.typeId===_.Type.Timestamp}},{key:"isInterval",value:function(t){return t&&t.typeId===_.Type.Interval}},{key:"isList",value:function(t){return t&&t.typeId===_.Type.List}},{key:"isStruct",value:function(t){return t&&t.typeId===_.Type.Struct}},{key:"isUnion",value:function(t){return t&&t.typeId===_.Type.Union}},{key:"isFixedSizeBinary",value:function(t){return t&&t.typeId===_.Type.FixedSizeBinary}},{key:"isFixedSizeList",value:function(t){return t&&t.typeId===_.Type.FixedSizeList}},{key:"isMap",value:function(t){return t&&t.typeId===_.Type.Map}},{key:"isDictionary",value:function(t){return t&&t.typeId===_.Type.Dictionary}}]),t}();e.DataType=x;var E=function(t,e){(0,p.default)(r,t);var n=b(r);function r(){return(0,v.default)(this,r),n.apply(this,arguments)}return(0,m.default)(r,[{key:"typeId",get:function(){return _.Type.Null}},{key:e,get:function(){return"Null"}},{key:"toString",value:function(){return"Null"}}]),r}(x,Symbol.toStringTag);e.Null=E;var w=function(t,e){(0,p.default)(r,t);var n=b(r);function r(){return(0,v.default)(this,r),n.apply(this,arguments)}return(0,m.default)(r,[{key:"typeId",get:function(){return _.Type.Bool}},{key:e,get:function(){return"Bool"}},{key:"toString",value:function(){return"Bool"}}]),r}(x,Symbol.toStringTag);e.Bool=w,i=Symbol.toStringTag;var I=function(t){(0,p.default)(n,t);var e=b(n);function n(t,r){var i;return(0,v.default)(this,n),i=e.call(this),(0,d.default)((0,f.default)(i),"isSigned",void 0),(0,d.default)((0,f.default)(i),"bitWidth",void 0),i.isSigned=t,i.bitWidth=r,i}return(0,m.default)(n,[{key:"typeId",get:function(){return _.Type.Int}},{key:i,get:function(){return"Int"}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}]),n}(x);e.Int=I;var M=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,!0,8)}return(0,m.default)(n)}(I);e.Int8=M;var O=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,!0,16)}return(0,m.default)(n)}(I);e.Int16=O;var S=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,!0,32)}return(0,m.default)(n)}(I);e.Int32=S;var N=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,!0,64)}return(0,m.default)(n)}(I);e.Int64=N;var P=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,!1,8)}return(0,m.default)(n)}(I);e.Uint8=P;var C=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,!1,16)}return(0,m.default)(n)}(I);e.Uint16=C;var L=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,!1,32)}return(0,m.default)(n)}(I);e.Uint32=L;var T=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,!1,64)}return(0,m.default)(n)}(I);e.Uint64=T;var R={HALF:16,SINGLE:32,DOUBLE:64};s=Symbol.toStringTag;var k=function(t){(0,p.default)(n,t);var e=b(n);function n(t){var r;return(0,v.default)(this,n),r=e.call(this),(0,d.default)((0,f.default)(r),"precision",void 0),r.precision=t,r}return(0,m.default)(n,[{key:"typeId",get:function(){return _.Type.Float}},{key:s,get:function(){return"Float"}},{key:"toString",value:function(){return"Float".concat(this.precision)}}]),n}(x);e.Float=k;var A=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,R.HALF)}return(0,m.default)(n)}(k);e.Float16=A;var j=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,R.SINGLE)}return(0,m.default)(n)}(k);e.Float32=j;var D=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,R.DOUBLE)}return(0,m.default)(n)}(k);e.Float64=D;var F=function(t,e){(0,p.default)(r,t);var n=b(r);function r(){return(0,v.default)(this,r),n.call(this)}return(0,m.default)(r,[{key:"typeId",get:function(){return _.Type.Binary}},{key:"toString",value:function(){return"Binary"}},{key:e,get:function(){return"Binary"}}]),r}(x,Symbol.toStringTag);e.Binary=F;var B=function(t,e){(0,p.default)(r,t);var n=b(r);function r(){return(0,v.default)(this,r),n.apply(this,arguments)}return(0,m.default)(r,[{key:"typeId",get:function(){return _.Type.Utf8}},{key:e,get:function(){return"Utf8"}},{key:"toString",value:function(){return"Utf8"}}]),r}(x,Symbol.toStringTag);e.Utf8=B;var G={DAY:0,MILLISECOND:1};o=Symbol.toStringTag;var q=function(t){(0,p.default)(n,t);var e=b(n);function n(t){var r;return(0,v.default)(this,n),r=e.call(this),(0,d.default)((0,f.default)(r),"unit",void 0),r.unit=t,r}return(0,m.default)(n,[{key:"typeId",get:function(){return _.Type.Date}},{key:o,get:function(){return"Date"}},{key:"toString",value:function(){return"Date".concat(32*(this.unit+1),"<").concat(G[this.unit],">")}}]),n}(x);e.Date=q;var U=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,G.DAY)}return(0,m.default)(n)}(q);e.DateDay=U;var z=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,G.MILLISECOND)}return(0,m.default)(n)}(q);e.DateMillisecond=z;var V={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9};a=Symbol.toStringTag;var Y=function(t){(0,p.default)(n,t);var e=b(n);function n(t,r){var i;return(0,v.default)(this,n),i=e.call(this),(0,d.default)((0,f.default)(i),"unit",void 0),(0,d.default)((0,f.default)(i),"bitWidth",void 0),i.unit=t,i.bitWidth=r,i}return(0,m.default)(n,[{key:"typeId",get:function(){return _.Type.Time}},{key:"toString",value:function(){return"Time".concat(this.bitWidth,"<").concat(V[this.unit],">")}},{key:a,get:function(){return"Time"}}]),n}(x);e.Time=Y;var W=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,V.SECOND,32)}return(0,m.default)(n)}(Y);e.TimeSecond=W;var X=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,V.MILLISECOND,32)}return(0,m.default)(n)}(Y);e.TimeMillisecond=X,u=Symbol.toStringTag;var H=function(t){(0,p.default)(n,t);var e=b(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(0,v.default)(this,n),r=e.call(this),(0,d.default)((0,f.default)(r),"unit",void 0),(0,d.default)((0,f.default)(r),"timezone",void 0),r.unit=t,r.timezone=i,r}return(0,m.default)(n,[{key:"typeId",get:function(){return _.Type.Timestamp}},{key:u,get:function(){return"Timestamp"}},{key:"toString",value:function(){return"Timestamp<".concat(V[this.unit]).concat(this.timezone?", ".concat(this.timezone):"",">")}}]),n}(x);e.Timestamp=H;var J=function(t){(0,p.default)(n,t);var e=b(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,v.default)(this,n),e.call(this,V.SECOND,t)}return(0,m.default)(n)}(H);e.TimestampSecond=J;var Z=function(t){(0,p.default)(n,t);var e=b(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,v.default)(this,n),e.call(this,V.MILLISECOND,t)}return(0,m.default)(n)}(H);e.TimestampMillisecond=Z;var Q=function(t){(0,p.default)(n,t);var e=b(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,v.default)(this,n),e.call(this,V.MICROSECOND,t)}return(0,m.default)(n)}(H);e.TimestampMicrosecond=Q;var K=function(t){(0,p.default)(n,t);var e=b(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,v.default)(this,n),e.call(this,V.NANOSECOND,t)}return(0,m.default)(n)}(H);e.TimestampNanosecond=K;var $={DAY_TIME:0,YEAR_MONTH:1};l=Symbol.toStringTag;var tt=function(t){(0,p.default)(n,t);var e=b(n);function n(t){var r;return(0,v.default)(this,n),r=e.call(this),(0,d.default)((0,f.default)(r),"unit",void 0),r.unit=t,r}return(0,m.default)(n,[{key:"typeId",get:function(){return _.Type.Interval}},{key:l,get:function(){return"Interval"}},{key:"toString",value:function(){return"Interval<".concat($[this.unit],">")}}]),n}(x);e.Interval=tt;var et=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,$.DAY_TIME)}return(0,m.default)(n)}(tt);e.IntervalDayTime=et;var nt=function(t){(0,p.default)(n,t);var e=b(n);function n(){return(0,v.default)(this,n),e.call(this,$.YEAR_MONTH)}return(0,m.default)(n)}(tt);e.IntervalYearMonth=nt,c=Symbol.toStringTag;var rt=function(t){(0,p.default)(n,t);var e=b(n);function n(t,r){var i;return(0,v.default)(this,n),i=e.call(this),(0,d.default)((0,f.default)(i),"listSize",void 0),(0,d.default)((0,f.default)(i),"children",void 0),i.listSize=t,i.children=[r],i}return(0,m.default)(n,[{key:"typeId",get:function(){return _.Type.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:c,get:function(){return"FixedSizeList"}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}]),n}(x);e.FixedSizeList=rt,h=Symbol.toStringTag;var it=function(t){(0,p.default)(n,t);var e=b(n);function n(t){var r;return(0,v.default)(this,n),r=e.call(this),(0,d.default)((0,f.default)(r),"children",void 0),r.children=t,r}return(0,m.default)(n,[{key:"typeId",get:function(){return _.Type.Struct}},{key:"toString",value:function(){return"Struct<{".concat(this.children.map((function(t){return"".concat(t.name,":").concat(t.type)})).join(", "),"}>")}},{key:h,get:function(){return"Struct"}}]),n}(x);e.Struct=it},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Type=void 0;var r=function(t){return t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth",t}({});e.Type=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deduceTypeFromColumn=function(t){return t instanceof Date?Date:t instanceof Number?Float32Array:"string"==typeof t?String:null},e.deduceTypeFromValue=function(t){return t instanceof Date?Date:t instanceof Number?Float32Array:"string"==typeof t?String:null}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTypeInfo=function(t){return{typeId:t.typeId,ArrayType:t.ArrayType,typeName:t.toString(),typeEnumName:s(t.typeId),precision:t.precision}};var r=n(50),i=null;function s(t){if(!i)for(var e in i={},r.Type)i[r.Type[e]]=e;return i[t]}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.takeAsync=function(t){return g.apply(this,arguments)};var i,s=r(n(21)),o=r(n(24)),a=r(n(2)),u=r(n(22)),l=r(n(23)),c=r(n(28)),h=r(n(29)),f=r(n(27));var d=function(t){(0,c.default)(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,f.default)(e);if(n){var i=(0,f.default)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,h.default)(this,t)});function i(){return(0,u.default)(this,i),r.apply(this,arguments)}return(0,l.default)(i,[{key:"enqueue",value:function(t){return this.push(t)}},{key:"dequeue",value:function(){return this.shift()}}]),i}((0,r(n(185)).default)(Array));i=Symbol.asyncIterator;var p=function(){function t(){(0,u.default)(this,t),(0,a.default)(this,"_values",void 0),(0,a.default)(this,"_settlers",void 0),(0,a.default)(this,"_closed",void 0),this._values=new d,this._settlers=new d,this._closed=!1}return(0,l.default)(t,[{key:"close",value:function(){for(;this._settlers.length>0;)this._settlers.dequeue().resolve({done:!0});this._closed=!0}},{key:i,value:function(){return this}},{key:"enqueue",value:function(t){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");var e=this._settlers.dequeue();t instanceof Error?e.reject(t):e.resolve({value:t})}else this._values.enqueue(t)}},{key:"next",value:function(){var t=this;if(this._values.length>0){var e=this._values.dequeue();return e instanceof Error?Promise.reject(e):Promise.resolve({value:e})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0})}return new Promise((function(e,n){t._settlers.enqueue({resolve:e,reject:n})}))}}]),t}();function g(){return g=(0,o.default)(s.default.mark((function t(e){var n,r,i,o,a,u=arguments;return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=u.length>1&&void 0!==u[1]?u[1]:1/0,r=[],i=e[Symbol.asyncIterator]();case 3:if(!(r.lengtht.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{};(0,s.default)(this,d),t=r.call(this,{onopenarray:function(){if(!t.streamingArray&&t._matchJSONPath())return t.streamingJsonPath=t.getJsonPath().clone(),t.streamingArray=[],void t._openArray(t.streamingArray);t._openArray()},onopenobject:function(e){t.topLevelObject?t._openObject({}):(t.topLevelObject={},t._openObject(t.topLevelObject)),void 0!==e&&t.parser.emit("onkey",e)}}),(0,f.default)((0,a.default)(t),"jsonPaths",void 0),(0,f.default)((0,a.default)(t),"streamingJsonPath",null),(0,f.default)((0,a.default)(t),"streamingArray",null),(0,f.default)((0,a.default)(t),"topLevelObject",null);var n=e.jsonpaths||[];return t.jsonPaths=n.map((function(t){return new p.default(t)})),t}return(0,o.default)(d,[{key:"write",value:function(t){(0,u.default)((0,h.default)(d.prototype),"write",this).call(this,t);var e=[];return this.streamingArray&&(e=(0,i.default)(this.streamingArray),this.streamingArray.length=0),e}},{key:"getPartialResult",value:function(){return this.topLevelObject}},{key:"getStreamingJsonPath",value:function(){return this.streamingJsonPath}},{key:"getStreamingJsonPathAsString",value:function(){return this.streamingJsonPath&&this.streamingJsonPath.toString()}},{key:"getJsonPath",value:function(){return this.jsonpath}},{key:"_matchJSONPath",value:function(){var t=this.getJsonPath();if(0===this.jsonPaths.length)return!0;var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw s}}}}(this.jsonPaths);try{for(n.s();!(e=n.n()).done;)if(e.value.equals(t))return!0}catch(t){n.e(t)}finally{n.f()}return!1}}]),d}(d.default);e.default=y},function(t,e,n){var r=n(188);function i(){return"undefined"!=typeof Reflect&&Reflect.get?(t.exports=i=Reflect.get.bind(),t.exports.__esModule=!0,t.exports.default=t.exports):(t.exports=i=function(t,e,n){var i=r(t,e);if(i){var s=Object.getOwnPropertyDescriptor(i,e);return s.get?s.get.call(arguments.length<3?t:n):s.value}},t.exports.__esModule=!0,t.exports.default=t.exports),i.apply(this,arguments)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(27);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(22)),s=r(n(23)),o=r(n(2)),a=r(n(104)),u=r(n(51));function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var c=function(){function t(e){var n=this;(0,i.default)(this,t),(0,o.default)(this,"parser",void 0),(0,o.default)(this,"result",void 0),(0,o.default)(this,"previousStates",[]),(0,o.default)(this,"currentState",Object.freeze({container:[],key:null})),(0,o.default)(this,"jsonpath",new u.default),this.reset(),this.parser=new a.default(function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:[];this.jsonpath.push(null),this._pushOrSet(t),this.previousStates.push(this.currentState),this.currentState={container:t,isArray:!0,key:null}}},{key:"_closeArray",value:function(){this.jsonpath.pop(),this.currentState=this.previousStates.pop()}},{key:"_openObject",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.jsonpath.push(null),this._pushOrSet(t),this.previousStates.push(this.currentState),this.currentState={container:t,isArray:!1,key:null}}},{key:"_closeObject",value:function(){this.jsonpath.pop(),this.currentState=this.previousStates.pop()}}]),t}();e.default=c},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.NDJSONLoader=void 0;var i,s=r(n(21)),o=r(n(24)),a=r(n(191)),u=r(n(192)),l={name:"NDJSON",id:"ndjson",module:"json",version:"3.4.7",extensions:["ndjson","jsonl"],mimeTypes:["application/x-ndjson","application/jsonlines","application/json-seq"],category:"table",text:!0,parse:(i=(0,o.default)(s.default.mark((function t(e){return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,a.default)((new TextDecoder).decode(e)));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)}),parseTextSync:a.default,parseInBatches:u.default,options:{}};e.NDJSONLoader=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t.trim().split("\n").map((function(t,e){try{return JSON.parse(t)}catch(t){throw new Error("NDJSONLoader: failed to parse JSON on line ".concat(e+1))}}))}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return p.apply(this,arguments)};var i=r(n(21)),s=r(n(2)),o=r(n(30)),a=r(n(31)),u=n(66),l=n(26);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};(0,i.default)(this,t),(0,o.default)(this,"points",void 0),(0,o.default)(this,"isFlatArray",void 0),(0,o.default)(this,"options",void 0),this.points=e,this.isFlatArray=!(0,a.isArray)(e[0]),this.options={start:n.start||0,end:n.end||e.length,size:n.size||2,isClosed:n.isClosed},Object.freeze(this)}return(0,s.default)(t,[{key:"getSignedArea",value:function(){return this.isFlatArray?(0,u.getPolygonSignedArea)(this.points,this.options):(0,u.getPolygonSignedAreaPoints)(this.points,this.options)}},{key:"getArea",value:function(){return Math.abs(this.getSignedArea())}},{key:"getWindingDirection",value:function(){return Math.sign(this.getSignedArea())}},{key:"forEachSegment",value:function(t){this.isFlatArray?(0,u.forEachSegmentInPolygon)(this.points,(function(e,n,r,i,s,o){t([e,n],[r,i],s,o)}),this.options):(0,u.forEachSegmentInPolygonPoints)(this.points,t,this.options)}},{key:"modifyWindingDirection",value:function(t){return this.isFlatArray?(0,u.modifyPolygonWindingDirection)(this.points,t,this.options):(0,u.modifyPolygonWindingDirectionPoints)(this.points,t,this.options)}}]),t}();e.default=l},function(t,e,n){"use strict";var r=n(20),i=n(25);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=r(n(22)),o=r(n(23)),a=r(n(28)),u=r(n(29)),l=r(n(27)),c=r(n(67)),h=n(33),f=n(34),d=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var n=g(e);if(n&&n.has(t))return n.get(t);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var a=s?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}(n(69)),p=n(45);function g(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(g=function(t){return t?n:e})(t)}var y=function(t){(0,a.default)(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,l.default)(e);if(n){var i=(0,l.default)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.default)(this,t)});function i(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,s.default)(this,i),t=r.call(this,2),(0,h.isArray)(e)&&1===arguments.length?t.copy(e):(h.config.debug&&((0,f.checkNumber)(e),(0,f.checkNumber)(n)),t[0]=e,t[1]=n),t}return(0,o.default)(i,[{key:"set",value:function(t,e){return this[0]=t,this[1]=e,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this.check()}},{key:"fromObject",value:function(t){return h.config.debug&&((0,f.checkNumber)(t.x),(0,f.checkNumber)(t.y)),this[0]=t.x,this[1]=t.y,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t}},{key:"ELEMENTS",get:function(){return 2}},{key:"horizontalAngle",value:function(){return Math.atan2(this.y,this.x)}},{key:"verticalAngle",value:function(){return Math.atan2(this.x,this.y)}},{key:"transform",value:function(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return d.transformMat4(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return(0,p.vec2_transformMat4AsVector)(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return d.transformMat3(this,this,t),this.check()}},{key:"transformByMatrix2x3",value:function(t){return d.transformMat2d(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return d.transformMat2(this,this,t),this.check()}}]),i}(c.default);e.default=y},function(t,e,n){"use strict";var r=n(20),i=n(25);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s,o=r(n(22)),a=r(n(23)),u=r(n(28)),l=r(n(29)),c=r(n(27)),h=r(n(110)),f=n(34),d=n(45),p=m(n(111)),g=m(n(69)),y=m(n(41));function v(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(v=function(t){return t?n:e})(t)}function m(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var n=v(e);if(n&&n.has(t))return n.get(t);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var a=s?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}!function(t){t[t.COL0ROW0=0]="COL0ROW0",t[t.COL0ROW1=1]="COL0ROW1",t[t.COL0ROW2=2]="COL0ROW2",t[t.COL1ROW0=3]="COL1ROW0",t[t.COL1ROW1=4]="COL1ROW1",t[t.COL1ROW2=5]="COL1ROW2",t[t.COL2ROW0=6]="COL2ROW0",t[t.COL2ROW1=7]="COL2ROW1",t[t.COL2ROW2=8]="COL2ROW2"}(s||(s={}));var _,b,x=Object.freeze([1,0,0,0,1,0,0,0,1]),E=function(t){(0,u.default)(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=(0,c.default)(e);if(n){var i=(0,c.default)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.default)(this,t)});function i(t){for(var e,n=arguments.length,s=new Array(n>1?n-1:0),a=1;a0?e.copy([t].concat(s)):e.identity(),e}return(0,a.default)(i,[{key:"ELEMENTS",get:function(){return 9}},{key:"RANK",get:function(){return 3}},{key:"INDICES",get:function(){return s}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}},{key:"identity",value:function(){return this.copy(x)}},{key:"fromObject",value:function(t){return this.check()}},{key:"fromQuaternion",value:function(t){return p.fromQuat(this,t),this.check()}},{key:"set",value:function(t,e,n,r,i,s,o,a,u){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this[4]=i,this[5]=s,this[6]=o,this[7]=a,this[8]=u,this.check()}},{key:"setRowMajor",value:function(t,e,n,r,i,s,o,a,u){return this[0]=t,this[1]=r,this[2]=o,this[3]=e,this[4]=i,this[5]=a,this[6]=n,this[7]=s,this[8]=u,this.check()}},{key:"determinant",value:function(){return p.determinant(this)}},{key:"transpose",value:function(){return p.transpose(this,this),this.check()}},{key:"invert",value:function(){return p.invert(this,this),this.check()}},{key:"multiplyLeft",value:function(t){return p.multiply(this,t,this),this.check()}},{key:"multiplyRight",value:function(t){return p.multiply(this,this,t),this.check()}},{key:"rotate",value:function(t){return p.rotate(this,this,t),this.check()}},{key:"scale",value:function(t){return Array.isArray(t)?p.scale(this,this,t):p.scale(this,this,[t,t]),this.check()}},{key:"translate",value:function(t){return p.translate(this,this,t),this.check()}},{key:"transform",value:function(t,e){var n;switch(t.length){case 2:n=g.transformMat3(e||[-0,-0],t,this);break;case 3:n=y.transformMat3(e||[-0,-0,-0],t,this);break;case 4:n=(0,d.vec4_transformMat3)(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return(0,f.checkVector)(n,t.length),n}},{key:"transformVector",value:function(t,e){return this.transform(t,e)}},{key:"transformVector2",value:function(t,e){return this.transform(t,e)}},{key:"transformVector3",value:function(t,e){return this.transform(t,e)}}],[{key:"IDENTITY",get:function(){return I()}},{key:"ZERO",get:function(){return w()}}]),i}(h.default);function w(){return _||(_=new E([0,0,0,0,0,0,0,0,0]),Object.freeze(_)),_}function I(){return b||(b=new E,Object.freeze(b)),b}e.default=E},function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.create=function(){var t=new i.ARRAY_TYPE(16);return i.ARRAY_TYPE!=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},e.clone=function(t){var e=new i.ARRAY_TYPE(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},e.copy=function(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},e.fromValues=function(t,e,n,r,s,o,a,u,l,c,h,f,d,p,g,y){var v=new i.ARRAY_TYPE(16);return v[0]=t,v[1]=e,v[2]=n,v[3]=r,v[4]=s,v[5]=o,v[6]=a,v[7]=u,v[8]=l,v[9]=c,v[10]=h,v[11]=f,v[12]=d,v[13]=p,v[14]=g,v[15]=y,v},e.set=function(t,e,n,r,i,s,o,a,u,l,c,h,f,d,p,g,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=o,t[6]=a,t[7]=u,t[8]=l,t[9]=c,t[10]=h,t[11]=f,t[12]=d,t[13]=p,t[14]=g,t[15]=y,t},e.identity=o,e.transpose=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],s=e[6],o=e[7],a=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]=s,t[11]=e[14],t[12]=i,t[13]=o,t[14]=a}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},e.invert=function(t,e){var n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],u=e[6],l=e[7],c=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],y=e[14],v=e[15],m=n*a-r*o,_=n*u-i*o,b=n*l-s*o,x=r*u-i*a,E=r*l-s*a,w=i*l-s*u,I=c*g-h*p,M=c*y-f*p,O=c*v-d*p,S=h*y-f*g,N=h*v-d*g,P=f*v-d*y,C=m*P-_*N+b*S+x*O-E*M+w*I;return C?(C=1/C,t[0]=(a*P-u*N+l*S)*C,t[1]=(i*N-r*P-s*S)*C,t[2]=(g*w-y*E+v*x)*C,t[3]=(f*E-h*w-d*x)*C,t[4]=(u*O-o*P-l*M)*C,t[5]=(n*P-i*O+s*M)*C,t[6]=(y*b-p*w-v*_)*C,t[7]=(c*w-f*b+d*_)*C,t[8]=(o*N-a*O+l*I)*C,t[9]=(r*O-n*N-s*I)*C,t[10]=(p*E-g*b+v*m)*C,t[11]=(h*b-c*E-d*m)*C,t[12]=(a*M-o*S-u*I)*C,t[13]=(n*S-r*M+i*I)*C,t[14]=(g*_-p*x-y*m)*C,t[15]=(c*x-h*_+f*m)*C,t):null},e.adjoint=function(t,e){var n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],u=e[6],l=e[7],c=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],y=e[14],v=e[15];return t[0]=a*(f*v-d*y)-h*(u*v-l*y)+g*(u*d-l*f),t[1]=-(r*(f*v-d*y)-h*(i*v-s*y)+g*(i*d-s*f)),t[2]=r*(u*v-l*y)-a*(i*v-s*y)+g*(i*l-s*u),t[3]=-(r*(u*d-l*f)-a*(i*d-s*f)+h*(i*l-s*u)),t[4]=-(o*(f*v-d*y)-c*(u*v-l*y)+p*(u*d-l*f)),t[5]=n*(f*v-d*y)-c*(i*v-s*y)+p*(i*d-s*f),t[6]=-(n*(u*v-l*y)-o*(i*v-s*y)+p*(i*l-s*u)),t[7]=n*(u*d-l*f)-o*(i*d-s*f)+c*(i*l-s*u),t[8]=o*(h*v-d*g)-c*(a*v-l*g)+p*(a*d-l*h),t[9]=-(n*(h*v-d*g)-c*(r*v-s*g)+p*(r*d-s*h)),t[10]=n*(a*v-l*g)-o*(r*v-s*g)+p*(r*l-s*a),t[11]=-(n*(a*d-l*h)-o*(r*d-s*h)+c*(r*l-s*a)),t[12]=-(o*(h*y-f*g)-c*(a*y-u*g)+p*(a*f-u*h)),t[13]=n*(h*y-f*g)-c*(r*y-i*g)+p*(r*f-i*h),t[14]=-(n*(a*y-u*g)-o*(r*y-i*g)+p*(r*u-i*a)),t[15]=n*(a*f-u*h)-o*(r*f-i*h)+c*(r*u-i*a),t},e.determinant=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],s=t[4],o=t[5],a=t[6],u=t[7],l=t[8],c=t[9],h=t[10],f=t[11],d=t[12],p=t[13],g=t[14],y=t[15];return(e*o-n*s)*(h*y-f*g)-(e*a-r*s)*(c*y-f*p)+(e*u-i*s)*(c*g-h*p)+(n*a-r*o)*(l*y-f*d)-(n*u-i*o)*(l*g-h*d)+(r*u-i*a)*(l*p-c*d)},e.multiply=a,e.translate=function(t,e,n){var r,i,s,o,a,u,l,c,h,f,d,p,g=n[0],y=n[1],v=n[2];return e===t?(t[12]=e[0]*g+e[4]*y+e[8]*v+e[12],t[13]=e[1]*g+e[5]*y+e[9]*v+e[13],t[14]=e[2]*g+e[6]*y+e[10]*v+e[14],t[15]=e[3]*g+e[7]*y+e[11]*v+e[15]):(r=e[0],i=e[1],s=e[2],o=e[3],a=e[4],u=e[5],l=e[6],c=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=s,t[3]=o,t[4]=a,t[5]=u,t[6]=l,t[7]=c,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*g+a*y+h*v+e[12],t[13]=i*g+u*y+f*v+e[13],t[14]=s*g+l*y+d*v+e[14],t[15]=o*g+c*y+p*v+e[15]),t},e.scale=function(t,e,n){var r=n[0],i=n[1],s=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]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},e.rotate=function(t,e,n,r){var s,o,a,u,l,c,h,f,d,p,g,y,v,m,_,b,x,E,w,I,M,O,S,N,P=r[0],C=r[1],L=r[2],T=Math.hypot(P,C,L);return T0?(n[0]=2*(l*a+f*r+c*o-h*s)/d,n[1]=2*(c*a+f*s+h*r-l*o)/d,n[2]=2*(h*a+f*o+l*s-c*r)/d):(n[0]=2*(l*a+f*r+c*o-h*s),n[1]=2*(c*a+f*s+h*r-l*o),n[2]=2*(h*a+f*o+l*s-c*r)),u(t,e,n),t},e.getTranslation=function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},e.getScaling=l,e.getRotation=function(t,e){var n=new i.ARRAY_TYPE(3);l(n,e);var r=1/n[0],s=1/n[1],o=1/n[2],a=e[0]*r,u=e[1]*s,c=e[2]*o,h=e[4]*r,f=e[5]*s,d=e[6]*o,p=e[8]*r,g=e[9]*s,y=e[10]*o,v=a+f+y,m=0;return v>0?(m=2*Math.sqrt(v+1),t[3]=.25*m,t[0]=(d-g)/m,t[1]=(p-c)/m,t[2]=(u-h)/m):a>f&&a>y?(m=2*Math.sqrt(1+a-f-y),t[3]=(d-g)/m,t[0]=.25*m,t[1]=(u+h)/m,t[2]=(p+c)/m):f>y?(m=2*Math.sqrt(1+f-a-y),t[3]=(p-c)/m,t[0]=(u+h)/m,t[1]=.25*m,t[2]=(d+g)/m):(m=2*Math.sqrt(1+y-a-f),t[3]=(u-h)/m,t[0]=(p+c)/m,t[1]=(d+g)/m,t[2]=.25*m),t},e.fromRotationTranslationScale=function(t,e,n,r){var i=e[0],s=e[1],o=e[2],a=e[3],u=i+i,l=s+s,c=o+o,h=i*u,f=i*l,d=i*c,p=s*l,g=s*c,y=o*c,v=a*u,m=a*l,_=a*c,b=r[0],x=r[1],E=r[2];return t[0]=(1-(p+y))*b,t[1]=(f+_)*b,t[2]=(d-m)*b,t[3]=0,t[4]=(f-_)*x,t[5]=(1-(h+y))*x,t[6]=(g+v)*x,t[7]=0,t[8]=(d+m)*E,t[9]=(g-v)*E,t[10]=(1-(h+p))*E,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},e.fromRotationTranslationScaleOrigin=function(t,e,n,r,i){var s=e[0],o=e[1],a=e[2],u=e[3],l=s+s,c=o+o,h=a+a,f=s*l,d=s*c,p=s*h,g=o*c,y=o*h,v=a*h,m=u*l,_=u*c,b=u*h,x=r[0],E=r[1],w=r[2],I=i[0],M=i[1],O=i[2],S=(1-(g+v))*x,N=(d+b)*x,P=(p-_)*x,C=(d-b)*E,L=(1-(f+v))*E,T=(y+m)*E,R=(p+_)*w,k=(y-m)*w,A=(1-(f+g))*w;return t[0]=S,t[1]=N,t[2]=P,t[3]=0,t[4]=C,t[5]=L,t[6]=T,t[7]=0,t[8]=R,t[9]=k,t[10]=A,t[11]=0,t[12]=n[0]+I-(S*I+C*M+R*O),t[13]=n[1]+M-(N*I+L*M+k*O),t[14]=n[2]+O-(P*I+T*M+A*O),t[15]=1,t},e.fromQuat=function(t,e){var n=e[0],r=e[1],i=e[2],s=e[3],o=n+n,a=r+r,u=i+i,l=n*o,c=r*o,h=r*a,f=i*o,d=i*a,p=i*u,g=s*o,y=s*a,v=s*u;return t[0]=1-h-p,t[1]=c+v,t[2]=f-y,t[3]=0,t[4]=c-v,t[5]=1-l-p,t[6]=d+g,t[7]=0,t[8]=f+y,t[9]=d-g,t[10]=1-l-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.frustum=function(t,e,n,r,i,s,o){var a=1/(n-e),u=1/(i-r),l=1/(s-o);return t[0]=2*s*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*s*u,t[6]=0,t[7]=0,t[8]=(n+e)*a,t[9]=(i+r)*u,t[10]=(o+s)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*s*2*l,t[15]=0,t},e.perspectiveNO=c,e.perspectiveZO=function(t,e,n,r,i){var s,o=1/Math.tan(e/2);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,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?(s=1/(r-i),t[10]=i*s,t[14]=i*r*s):(t[10]=-1,t[14]=-r),t},e.perspectiveFromFieldOfView=function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),s=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),a=Math.tan(e.rightDegrees*Math.PI/180),u=2/(o+a),l=2/(i+s);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-a)*u*.5,t[9]=(i-s)*l*.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},e.orthoNO=f,e.orthoZO=function(t,e,n,r,i,s,o){var a=1/(e-n),u=1/(r-i),l=1/(s-o);return t[0]=-2*a,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]=l,t[11]=0,t[12]=(e+n)*a,t[13]=(i+r)*u,t[14]=s*l,t[15]=1,t},e.lookAt=function(t,e,n,r){var s,a,u,l,c,h,f,d,p,g,y=e[0],v=e[1],m=e[2],_=r[0],b=r[1],x=r[2],E=n[0],w=n[1],I=n[2];return Math.abs(y-E)0&&(c*=d=1/Math.sqrt(d),h*=d,f*=d);var p=u*f-l*h,g=l*c-a*f,y=a*h-u*c;return(d=p*p+g*g+y*y)>0&&(p*=d=1/Math.sqrt(d),g*=d,y*=d),t[0]=p,t[1]=g,t[2]=y,t[3]=0,t[4]=h*y-f*g,t[5]=f*p-c*y,t[6]=c*g-h*p,t[7]=0,t[8]=c,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=s,t[14]=o,t[15]=1,t},e.str=function(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]+")"},e.frob=function(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])},e.add=function(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},e.subtract=p,e.multiplyScalar=function(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},e.multiplyScalarAndAdd=function(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},e.exactEquals=function(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]},e.equals=function(t,e){var n=t[0],r=t[1],s=t[2],o=t[3],a=t[4],u=t[5],l=t[6],c=t[7],h=t[8],f=t[9],d=t[10],p=t[11],g=t[12],y=t[13],v=t[14],m=t[15],_=e[0],b=e[1],x=e[2],E=e[3],w=e[4],I=e[5],M=e[6],O=e[7],S=e[8],N=e[9],P=e[10],C=e[11],L=e[12],T=e[13],R=e[14],k=e[15];return Math.abs(n-_)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(_))&&Math.abs(r-b)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(s-x)<=i.EPSILON*Math.max(1,Math.abs(s),Math.abs(x))&&Math.abs(o-E)<=i.EPSILON*Math.max(1,Math.abs(o),Math.abs(E))&&Math.abs(a-w)<=i.EPSILON*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(u-I)<=i.EPSILON*Math.max(1,Math.abs(u),Math.abs(I))&&Math.abs(l-M)<=i.EPSILON*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-O)<=i.EPSILON*Math.max(1,Math.abs(c),Math.abs(O))&&Math.abs(h-S)<=i.EPSILON*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(f-N)<=i.EPSILON*Math.max(1,Math.abs(f),Math.abs(N))&&Math.abs(d-P)<=i.EPSILON*Math.max(1,Math.abs(d),Math.abs(P))&&Math.abs(p-C)<=i.EPSILON*Math.max(1,Math.abs(p),Math.abs(C))&&Math.abs(g-L)<=i.EPSILON*Math.max(1,Math.abs(g),Math.abs(L))&&Math.abs(y-T)<=i.EPSILON*Math.max(1,Math.abs(y),Math.abs(T))&&Math.abs(v-R)<=i.EPSILON*Math.max(1,Math.abs(v),Math.abs(R))&&Math.abs(m-k)<=i.EPSILON*Math.max(1,Math.abs(m),Math.abs(k))},e.sub=e.mul=e.ortho=e.perspective=void 0;var i=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var n=s(e);if(n&&n.has(t))return n.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,n&&n.set(t,i),i}(n(40));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(s=function(t){return t?n:e})(t)}function o(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 a(t,e,n){var r=e[0],i=e[1],s=e[2],o=e[3],a=e[4],u=e[5],l=e[6],c=e[7],h=e[8],f=e[9],d=e[10],p=e[11],g=e[12],y=e[13],v=e[14],m=e[15],_=n[0],b=n[1],x=n[2],E=n[3];return t[0]=_*r+b*a+x*h+E*g,t[1]=_*i+b*u+x*f+E*y,t[2]=_*s+b*l+x*d+E*v,t[3]=_*o+b*c+x*p+E*m,_=n[4],b=n[5],x=n[6],E=n[7],t[4]=_*r+b*a+x*h+E*g,t[5]=_*i+b*u+x*f+E*y,t[6]=_*s+b*l+x*d+E*v,t[7]=_*o+b*c+x*p+E*m,_=n[8],b=n[9],x=n[10],E=n[11],t[8]=_*r+b*a+x*h+E*g,t[9]=_*i+b*u+x*f+E*y,t[10]=_*s+b*l+x*d+E*v,t[11]=_*o+b*c+x*p+E*m,_=n[12],b=n[13],x=n[14],E=n[15],t[12]=_*r+b*a+x*h+E*g,t[13]=_*i+b*u+x*f+E*y,t[14]=_*s+b*l+x*d+E*v,t[15]=_*o+b*c+x*p+E*m,t}function u(t,e,n){var r=e[0],i=e[1],s=e[2],o=e[3],a=r+r,u=i+i,l=s+s,c=r*a,h=r*u,f=r*l,d=i*u,p=i*l,g=s*l,y=o*a,v=o*u,m=o*l;return t[0]=1-(d+g),t[1]=h+m,t[2]=f-v,t[3]=0,t[4]=h-m,t[5]=1-(c+g),t[6]=p+y,t[7]=0,t[8]=f+v,t[9]=p-y,t[10]=1-(c+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function l(t,e){var n=e[0],r=e[1],i=e[2],s=e[4],o=e[5],a=e[6],u=e[8],l=e[9],c=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(s,o,a),t[2]=Math.hypot(u,l,c),t}function c(t,e,n,r,i){var s,o=1/Math.tan(e/2);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,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?(s=1/(r-i),t[10]=(i+r)*s,t[14]=2*i*r*s):(t[10]=-1,t[14]=-2*r),t}var h=c;function f(t,e,n,r,i,s,o){var a=1/(e-n),u=1/(r-i),l=1/(s-o);return t[0]=-2*a,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*l,t[11]=0,t[12]=(e+n)*a,t[13]=(i+r)*u,t[14]=(o+s)*l,t[15]=1,t}e.perspective=h;var d=f;function p(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}e.ortho=d;var g=a;e.mul=g;var y=p;e.sub=y},function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.create=c,e.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},e.setAxisAngle=h,e.getAxisAngle=function(t,e){var n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>i.EPSILON?(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},e.getAngle=function(t,e){var n=I(t,e);return Math.acos(2*n*n-1)},e.multiply=f,e.rotateX=function(t,e,n){n*=.5;var r=e[0],i=e[1],s=e[2],o=e[3],a=Math.sin(n),u=Math.cos(n);return t[0]=r*u+o*a,t[1]=i*u+s*a,t[2]=s*u-i*a,t[3]=o*u-r*a,t},e.rotateY=function(t,e,n){n*=.5;var r=e[0],i=e[1],s=e[2],o=e[3],a=Math.sin(n),u=Math.cos(n);return t[0]=r*u-s*a,t[1]=i*u+o*a,t[2]=s*u+r*a,t[3]=o*u-i*a,t},e.rotateZ=function(t,e,n){n*=.5;var r=e[0],i=e[1],s=e[2],o=e[3],a=Math.sin(n),u=Math.cos(n);return t[0]=r*u+i*a,t[1]=i*u-r*a,t[2]=s*u+o*a,t[3]=o*u-s*a,t},e.calculateW=function(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},e.exp=d,e.ln=p,e.pow=function(t,e,n){return p(t,e),w(t,t,n),d(t,t),t},e.slerp=g,e.random=function(t){var e=i.RANDOM(),n=i.RANDOM(),r=i.RANDOM(),s=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=s*Math.sin(2*Math.PI*n),t[1]=s*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},e.invert=function(t,e){var n=e[0],r=e[1],i=e[2],s=e[3],o=n*n+r*r+i*i+s*s,a=o?1/o:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=s*a,t},e.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},e.fromMat3=y,e.fromEuler=function(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var s=Math.sin(e),o=Math.cos(e),a=Math.sin(n),u=Math.cos(n),l=Math.sin(r),c=Math.cos(r);return t[0]=s*u*c-o*a*l,t[1]=o*a*c+s*u*l,t[2]=o*u*l-s*a*c,t[3]=o*u*c+s*a*l,t},e.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},e.setAxes=e.sqlerp=e.rotationTo=e.equals=e.exactEquals=e.normalize=e.sqrLen=e.squaredLength=e.len=e.length=e.lerp=e.dot=e.scale=e.mul=e.add=e.set=e.copy=e.fromValues=e.clone=void 0;var i=l(n(40)),s=l(n(111)),o=l(n(41)),a=l(n(71));function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(u=function(t){return t?n:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var n=u(e);if(n&&n.has(t))return n.get(t);var i={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var a=s?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(i,o,a):i[o]=t[o]}return i.default=t,n&&n.set(t,i),i}function c(){var t=new i.ARRAY_TYPE(4);return i.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function h(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 f(t,e,n){var r=e[0],i=e[1],s=e[2],o=e[3],a=n[0],u=n[1],l=n[2],c=n[3];return t[0]=r*c+o*a+i*l-s*u,t[1]=i*c+o*u+s*a-r*l,t[2]=s*c+o*l+r*u-i*a,t[3]=o*c-r*a-i*u-s*l,t}function d(t,e){var n=e[0],r=e[1],i=e[2],s=e[3],o=Math.sqrt(n*n+r*r+i*i),a=Math.exp(s),u=o>0?a*Math.sin(o)/o:0;return t[0]=n*u,t[1]=r*u,t[2]=i*u,t[3]=a*Math.cos(o),t}function p(t,e){var n=e[0],r=e[1],i=e[2],s=e[3],o=Math.sqrt(n*n+r*r+i*i),a=o>0?Math.atan2(o,s)/o:0;return t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=.5*Math.log(n*n+r*r+i*i+s*s),t}function g(t,e,n,r){var s,o,a,u,l,c=e[0],h=e[1],f=e[2],d=e[3],p=n[0],g=n[1],y=n[2],v=n[3];return(o=c*p+h*g+f*y+d*v)<0&&(o=-o,p=-p,g=-g,y=-y,v=-v),1-o>i.EPSILON?(s=Math.acos(o),a=Math.sin(s),u=Math.sin((1-r)*s)/a,l=Math.sin(r*s)/a):(u=1-r,l=r),t[0]=u*c+l*p,t[1]=u*h+l*g,t[2]=u*f+l*y,t[3]=u*d+l*v,t}function y(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 s=(i+1)%3,o=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*s+s]-e[3*o+o]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*s+o]-e[3*o+s])*n,t[s]=(e[3*s+i]+e[3*i+s])*n,t[o]=(e[3*o+i]+e[3*i+o])*n}return t}var v=a.clone;e.clone=v;var m=a.fromValues;e.fromValues=m;var _=a.copy;e.copy=_;var b=a.set;e.set=b;var x=a.add;e.add=x;var E=f;e.mul=E;var w=a.scale;e.scale=w;var I=a.dot;e.dot=I;var M=a.lerp;e.lerp=M;var O=a.length;e.length=O;var S=O;e.len=S;var N=a.squaredLength;e.squaredLength=N;var P=N;e.sqrLen=P;var C=a.normalize;e.normalize=C;var L=a.exactEquals;e.exactEquals=L;var T=a.equals;e.equals=T;var R,k,A,j=(R=o.create(),k=o.fromValues(1,0,0),A=o.fromValues(0,1,0),function(t,e,n){var r=o.dot(e,n);return r<-.999999?(o.cross(R,k,e),o.len(R)<1e-6&&o.cross(R,A,e),o.normalize(R,R),h(t,R,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(o.cross(R,e,n),t[0]=R[0],t[1]=R[1],t[2]=R[2],t[3]=1+r,C(t,t))});e.rotationTo=j;var D,F,B=(D=c(),F=c(),function(t,e,n,r,i,s){return g(D,e,i,s),g(F,n,r,s),g(t,D,F,2*s*(1-s)),t});e.sqlerp=B;var G,q=(G=s.create(),function(t,e,n,r){return G[0]=n[0],G[3]=n[1],G[6]=n[2],G[1]=r[0],G[4]=r[1],G[7]=r[2],G[2]=-e[0],G[5]=-e[1],G[8]=-e[2],C(t,y(t,G))});e.setAxes=q},function(t,e,n){"use strict";var r=n(20),i=n(25);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=r(n(35)),o=r(n(22)),a=r(n(23)),u=r(n(2)),l=r(n(70)),c=n(33),h=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var n=f(e);if(n&&n.has(t))return n.get(t);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var a=s?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}(n(41));function f(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(f=function(t){return t?n:e})(t)}var d=1e-6,p=6371e3,g=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.phi,r=void 0===n?0:n,i=e.theta,s=void 0===i?0:i,a=e.radius,l=void 0===a?1:a,c=e.bearing,h=e.pitch,f=e.altitude,d=e.radiusScale,g=void 0===d?p:d;(0,o.default)(this,t),(0,u.default)(this,"phi",void 0),(0,u.default)(this,"theta",void 0),(0,u.default)(this,"radius",void 0),(0,u.default)(this,"radiusScale",void 0),this.phi=r,this.theta=s,this.radius=l||f||1,this.radiusScale=g||1,void 0!==c&&(this.bearing=c),void 0!==h&&(this.pitch=h),this.check()}return(0,a.default)(t,[{key:"toString",value:function(){return this.formatString(c.config)}},{key:"formatString",value:function(t){var e=t.printTypes,n=void 0!==e&&e,r=c.formatValue;return"".concat(n?"Spherical":"","[rho:").concat(r(this.radius),",theta:").concat(r(this.theta),",phi:").concat(r(this.phi),"]")}},{key:"equals",value:function(t){return(0,c.equals)(this.radius,t.radius)&&(0,c.equals)(this.theta,t.theta)&&(0,c.equals)(this.phi,t.phi)}},{key:"exactEquals",value:function(t){return this.radius===t.radius&&this.theta===t.theta&&this.phi===t.phi}},{key:"bearing",get:function(){return 180-(0,c.degrees)(this.phi)},set:function(t){this.phi=Math.PI-(0,c.radians)(t)}},{key:"pitch",get:function(){return(0,c.degrees)(this.theta)},set:function(t){this.theta=(0,c.radians)(t)}},{key:"longitude",get:function(){return(0,c.degrees)(this.phi)}},{key:"latitude",get:function(){return(0,c.degrees)(this.theta)}},{key:"lng",get:function(){return(0,c.degrees)(this.phi)}},{key:"lat",get:function(){return(0,c.degrees)(this.theta)}},{key:"z",get:function(){return(this.radius-1)*this.radiusScale}},{key:"set",value:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this.check()}},{key:"clone",value:function(){return(new t).copy(this)}},{key:"copy",value:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this.check()}},{key:"fromLngLatZ",value:function(t){var e=(0,s.default)(t,3),n=e[0],r=e[1],i=e[2];return this.radius=1+i/this.radiusScale,this.phi=(0,c.radians)(r),this.theta=(0,c.radians)(n),this.check()}},{key:"fromVector3",value:function(t){return this.radius=h.length(t),this.radius>0&&(this.theta=Math.atan2(t[0],t[1]),this.phi=Math.acos((0,c.clamp)(t[2]/this.radius,-1,1))),this.check()}},{key:"toVector3",value:function(){return new l.default(0,0,this.radius).rotateX({radians:this.theta}).rotateZ({radians:this.phi})}},{key:"makeSafe",value:function(){return this.phi=Math.max(d,Math.min(Math.PI-d,this.phi)),this}},{key:"check",value:function(){if(!(Number.isFinite(this.phi)&&Number.isFinite(this.theta)&&this.radius>0))throw new Error("SphericalCoordinates: some fields set to invalid numbers");return this}}]),t}();e.default=g},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(22)),s=r(n(23)),o=r(n(2)),a=r(n(112)),u=r(n(70)),l=r(n(114)),c=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.x,r=void 0===n?0:n,s=e.y,a=void 0===s?0:s,c=e.z,h=void 0===c?0:c,f=e.roll,d=void 0===f?0:f,p=e.pitch,g=void 0===p?0:p,y=e.yaw,v=void 0===y?0:y,m=e.position,_=e.orientation;(0,i.default)(this,t),(0,o.default)(this,"position",void 0),(0,o.default)(this,"orientation",void 0),Array.isArray(m)&&3===m.length?this.position=new u.default(m):this.position=new u.default(r,a,h),Array.isArray(_)&&4===_.length?this.orientation=new l.default(_,_[3]):this.orientation=new l.default(d,g,v,l.default.RollPitchYaw)}return(0,s.default)(t,[{key:"x",get:function(){return this.position.x},set:function(t){this.position.x=t}},{key:"y",get:function(){return this.position.y},set:function(t){this.position.y=t}},{key:"z",get:function(){return this.position.z},set:function(t){this.position.z=t}},{key:"roll",get:function(){return this.orientation.roll},set:function(t){this.orientation.roll=t}},{key:"pitch",get:function(){return this.orientation.pitch},set:function(t){this.orientation.pitch=t}},{key:"yaw",get:function(){return this.orientation.yaw},set:function(t){this.orientation.yaw=t}},{key:"getPosition",value:function(){return this.position}},{key:"getOrientation",value:function(){return this.orientation}},{key:"equals",value:function(t){return!!t&&this.position.equals(t.position)&&this.orientation.equals(t.orientation)}},{key:"exactEquals",value:function(t){return!!t&&this.position.exactEquals(t.position)&&this.orientation.exactEquals(t.orientation)}},{key:"getTransformationMatrix",value:function(){var t=Math.sin(this.roll),e=Math.sin(this.pitch),n=Math.sin(this.yaw),r=Math.cos(this.roll),i=Math.cos(this.pitch),s=Math.cos(this.yaw);return(new a.default).setRowMajor(s*i,-n*r+s*e*t,n*t+s*e*r,this.x,n*i,s*r+n*e*t,-s*t+n*e*r,this.y,-e,i*t,i*r,this.z,0,0,0,1)}},{key:"getTransformationMatrixFromPose",value:function(t){return(new a.default).multiplyRight(this.getTransformationMatrix()).multiplyRight(t.getTransformationMatrix().invert())}},{key:"getTransformationMatrixToPose",value:function(t){return(new a.default).multiplyRight(t.getTransformationMatrix()).multiplyRight(this.getTransformationMatrix().invert())}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={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,PI_OVER_TWO:Math.PI/2,PI_OVER_FOUR:Math.PI/4,PI_OVER_SIX:Math.PI/6,TWO_PI:2*Math.PI};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.earcut=function(t,e){var n,r,a,u,l,c,d,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,y=arguments.length>3?arguments[3]:void 0,v=e&&e.length,m=v?e[0]*p:t.length,_=i(t,0,m,p,!0,y&&y[0]),b=[];if(!_||_.next===_.prev)return b;if(v&&(_=function(t,e,n,r,o){var a,u,l,c=[];for(a=0,u=e.length;a80*p){u=r=t[0],l=a=t[1];for(var x=p;xr&&(r=c),d>a&&(a=d);n=0!==(n=Math.max(r-u,a-l))?1/n:0}return o(_,b,p,u,l,n),b};var r=n(72);function i(t,e,n,i,s,o){var a,u;if(void 0===o&&(o=(0,r.getPolygonSignedArea)(t,{start:e,end:n,size:i})),s===o<0)for(a=e;a=e;a-=i)u=M(a,t[a],t[a+1],u);return u&&_(u,u.next)&&(O(u),u=u.next),u}function s(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!_(r,r.next)&&0!==m(r.prev,r,r.next))r=r.next;else{if(O(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function o(t,e,n,r,i,h,f){if(t){!f&&h&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=p(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,s,o,a,u,l=1;do{for(i=t,t=null,u=null,r=0;i;){for(r++,o=i,s=0,n=0;n0||a>0&&o;)0!==s&&(0===a||!o||i.z<=o.z)?(e=i,i=i.nextZ,s--):(e=o,o=o.nextZ,a--),u?u.nextZ=e:t=e,e.prevZ=u,u=e;i=o}u.nextZ=null,l*=2}while(r>1)}(i)}(t,r,i,h);for(var d,g,y=t;t.prev!==t.next;)if(d=t.prev,g=t.next,h?u(t,r,i,h):a(t))e.push(d.i/n),e.push(t.i/n),e.push(g.i/n),O(t),t=g.next,y=g.next;else if((t=g)===y){f?1===f?o(t=l(s(t),e,n),e,n,r,i,h,2):2===f&&c(t,e,n,r,i,h):o(s(t),e,n,r,i,h,1);break}}}function a(t){var e=t.prev,n=t,r=t.next;if(m(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(y(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&m(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(t,e,n,r){var i=t.prev,s=t,o=t.next;if(m(i,s,o)>=0)return!1;for(var a=i.xs.x?i.x>o.x?i.x:o.x:s.x>o.x?s.x:o.x,c=i.y>s.y?i.y>o.y?i.y:o.y:s.y>o.y?s.y:o.y,h=p(a,u,e,n,r),f=p(l,c,e,n,r),d=t.prevZ,g=t.nextZ;d&&d.z>=h&&g&&g.z<=f;){if(d!==t.prev&&d!==t.next&&y(i.x,i.y,s.x,s.y,o.x,o.y,d.x,d.y)&&m(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,g!==t.prev&&g!==t.next&&y(i.x,i.y,s.x,s.y,o.x,o.y,g.x,g.y)&&m(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&y(i.x,i.y,s.x,s.y,o.x,o.y,d.x,d.y)&&m(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;g&&g.z<=f;){if(g!==t.prev&&g!==t.next&&y(i.x,i.y,s.x,s.y,o.x,o.y,g.x,g.y)&&m(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function l(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!_(i,o)&&b(i,r,r.next,o)&&w(i,o)&&w(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),O(r),O(r.next),r=t=o),r=r.next}while(r!==t);return s(r)}function c(t,e,n,r,i,a){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&v(u,l)){var c=I(u,l);return u=s(u,u.next),c=s(c,c.next),o(u,e,n,r,i,a),void o(c,e,n,r,i,a)}l=l.next}u=u.next}while(u!==t)}function h(t,e){return t.x-e.x}function f(t,e){if(e=function(t,e){var n,r=e,i=t.x,s=t.y,o=-1/0;do{if(s<=r.y&&s>=r.next.y&&r.next.y!==r.y){var a=r.x+(s-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=i&&a>o){if(o=a,a===i){if(s===r.y)return r;if(s===r.next.y)return r.next}n=r.x=r.x&&r.x>=c&&i!==r.x&&y(sn.x||r.x===n.x&&d(n,r)))&&(n=r,f=u)),r=r.next}while(r!==l);return n}(t,e),e){var n=I(e,t);s(e,e.next),s(n,n.next)}}function d(t,e){return m(t.prev,t,e.prev)<0&&m(e.next,t,t.next)<0}function p(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){var e=t,n=t;do{(e.x=0&&(t-o)*(r-a)-(n-o)*(e-a)>=0&&(n-o)*(s-a)-(i-o)*(r-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&b(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(w(t,e)&&w(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,s=(t.y+e.y)/2;do{n.y>s!=n.next.y>s&&n.next.y!==n.y&&i<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(m(t.prev,t,e.prev)||m(t,e.prev,e))||_(t,e)&&m(t.prev,t,t.next)>0&&m(e.prev,e,e.next)>0)}function m(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function _(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,r){var i=E(m(t,e,n)),s=E(m(t,e,r)),o=E(m(n,r,t)),a=E(m(n,r,e));return i!==s&&o!==a||!(0!==i||!x(t,n,e))||!(0!==s||!x(t,r,e))||!(0!==o||!x(n,t,r))||!(0!==a||!x(n,e,r))}function x(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function E(t){return t>0?1:t<0?-1:0}function w(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function I(t,e){var n=new S(t.i,t.x,t.y),r=new S(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,s.next=r,r.prev=s,r}function M(t,e,n,r){var i=new S(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function O(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cutPolylineByMercatorBounds=function(t,e){var n=e||{},i=n.size,o=void 0===i?2:i,a=n.startIndex,u=void 0===a?0:a,l=n.endIndex,f=void 0===l?t.length:l,d=n.normalize,p=void 0===d||d,g=t.slice(u,f);c(g,o,0,f-u);var y=(0,r.cutPolylineByGrid)(g,{size:o,broken:!0,gridResolution:360,gridOffset:[-180,-180]});if(p){var v,m=s(y);try{for(m.s();!(v=m.n()).done;)h(v.value,o)}catch(t){m.e(t)}finally{m.f()}}return y},e.cutPolygonByMercatorBounds=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,i=n||{},o=i.size,a=void 0===o?2:o,f=i.normalize,d=void 0===f||f,p=i.edgeTypes,g=void 0!==p&&p;e=e||[];for(var y=[],v=[],m=0,_=0,b=0;b<=e.length;b++){for(var x=e[b]||t.length,E=_,w=u(t,a,m,x),I=w;I=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,s=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw s}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);ni&&(i=a,s=o-1)}return s}function l(t,e,n,r){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:a,o=t[n],u=t[r-e];if(Math.abs(o-u)>180){var l=(0,i.getPointAtIndex)(t,0,e,n);l[0]+=360*Math.round((u-o)/360),(0,i.push)(t,l),l[1]=Math.sign(l[1])*s,(0,i.push)(t,l),l[0]=o,(0,i.push)(t,l)}}function c(t,e,n,r){for(var i,s=t[0],o=n;o180||a<-180)&&(i-=360*Math.round(a/360)),t[o]=s=i}}function h(t,e){for(var n,r=t.length/e,i=0;i1&&void 0!==arguments[1]?arguments[1]:{fixRingWinding:!0},n=(0,r.extractGeometryInfo)(t),o=n.coordLength,a=e.fixRingWinding,u=(0,i.geojsonToFlatGeojson)(t,{coordLength:o,fixRingWinding:a});return(0,s.flatGeojsonToBinary)(u,n,{numericPropKeys:e.numericPropKeys,PositionDataType:e.PositionDataType||Float32Array})};var r=n(205),i=n(117),s=n(106)},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.extractGeometryInfo=function(t){var e,n=0,r=0,o=0,a=0,u=0,l=0,c=0,h=0,f=0,d=new Set,p=s(t);try{for(p.s();!(e=p.n()).done;){var g=e.value.geometry;switch(g.type){case"Point":r++,n++,d.add(g.coordinates.length);break;case"MultiPoint":r++,n+=g.coordinates.length;var y,v=s(g.coordinates);try{for(v.s();!(y=v.n()).done;){var m=y.value;d.add(m.length)}}catch(t){v.e(t)}finally{v.f()}break;case"LineString":u++,o+=g.coordinates.length,a++;var _,b=s(g.coordinates);try{for(b.s();!(_=b.n()).done;){var x=_.value;d.add(x.length)}}catch(t){b.e(t)}finally{b.f()}break;case"MultiLineString":u++;var E,w=s(g.coordinates);try{for(w.s();!(E=w.n()).done;){var I=E.value;o+=I.length,a++;var M,O=s(I);try{for(O.s();!(M=O.n()).done;){var S=M.value;d.add(S.length)}}catch(t){O.e(t)}finally{O.f()}}}catch(t){w.e(t)}finally{w.f()}break;case"Polygon":f++,c++,h+=g.coordinates.length;var N=g.coordinates.flat();l+=N.length;var P,C=s(N);try{for(C.s();!(P=C.n()).done;){var L=P.value;d.add(L.length)}}catch(t){C.e(t)}finally{C.f()}break;case"MultiPolygon":f++;var T,R=s(g.coordinates);try{for(R.s();!(T=R.n()).done;){var k=T.value;c++,h+=k.length;var A=k.flat();l+=A.length;var j,D=s(A);try{for(D.s();!(j=D.n()).done;){var F=j.value;d.add(F.length)}}catch(t){D.e(t)}finally{D.f()}}}catch(t){R.e(t)}finally{R.f()}break;default:throw new Error("Unsupported geometry type: ".concat(g.type))}}}catch(t){p.e(t)}finally{p.f()}return{coordLength:d.size>0?Math.max.apply(Math,(0,i.default)(d)):2,pointPositionsCount:n,pointFeaturesCount:r,linePositionsCount:o,linePathsCount:a,lineFeaturesCount:u,polygonPositionsCount:l,polygonObjectsCount:c,polygonRingsCount:h,polygonFeaturesCount:f}};var i=r(n(38));function s(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,s=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw s}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:"feature";switch(n){case"feature":return u(t,e);case"geometry":return l(t);default:throw new Error(n)}},e.binaryToGeojson=function(t,e){var n=null==e?void 0:e.globalFeatureId;return void 0!==n?function(t,e){var n,r=o(c(t));try{for(r.s();!(n=r.n()).done;){for(var i=n.value,s=0,a=i.featureIds.value[0],u=0;u=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){u=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(u)throw s}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1?{type:"MultiPoint",coordinates:r}:{type:"Point",coordinates:r[0]}}(t,e,n);case"LineString":return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=t.positions,i=t.pathIndices.value.filter((function(t){return t>=e&&t<=n}));if(!(i.length>2))return{type:"LineString",coordinates:d(r,i[0],i[1])};for(var s=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:0,n=Object.assign({},t.properties[t.featureIds.value[e]]);for(var r in t.numericProps)n[r]=t.numericProps[r].value[e];return n}(t,e,n),a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.fields&&t.fields[t.featureIds.value[e]]}(t,e,n);return function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:-1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=t.positions,i=t.polygonIndices.value.filter((function(t){return t>=e&&t<=n})),s=t.primitivePolygonIndices.value.filter((function(t){return t>=e&&t<=n}));if(!(i.length>2)){for(var o=[],a=0;at.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.geometry.coordinates=s(o.geometry.coordinates,e)}}catch(t){i.e(t)}finally{i.f()}return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DBFLoader",{enumerable:!0,get:function(){return i.DBFLoader}}),Object.defineProperty(e,"DBFWorkerLoader",{enumerable:!0,get:function(){return i.DBFWorkerLoader}}),Object.defineProperty(e,"SHPLoader",{enumerable:!0,get:function(){return s.SHPLoader}}),Object.defineProperty(e,"SHPWorkerLoader",{enumerable:!0,get:function(){return s.SHPWorkerLoader}}),Object.defineProperty(e,"ShapefileLoader",{enumerable:!0,get:function(){return r.ShapefileLoader}});var r=n(209),i=n(120),s=n(74)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._typecheckShapefileLoader=e.ShapefileLoader=void 0;var r=n(74),i=n(212),s={name:"Shapefile",id:"shapefile",module:"shapefile",version:"3.4.7",category:"geometry",extensions:["shp"],mimeTypes:["application/octet-stream"],tests:[new Uint8Array(r.SHP_MAGIC_NUMBER).buffer],options:{shapefile:{},shp:{_maxDimensions:4}},parse:i.parseShapefile,parseInBatches:i.parseShapefileInBatches};e.ShapefileLoader=s;var o=s;e._typecheckShapefileLoader=o},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.parseSHP=function(t,e){var n=new b(e);return n.write(t),n.end(),n.result},e.parseSHPInBatches=function(t,e){return x.apply(this,arguments)};var i=r(n(21)),s=r(n(22)),o=r(n(23)),a=r(n(2)),u=r(n(30)),l=r(n(31)),c=r(n(118)),h=n(119),f=n(211);function d(t){var e,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(e=t[n]))return e.call(t);if(r&&null!=(e=t[r]))return new p(e.call(t));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function p(t){function e(t){if(Object(t)!==t)return Promise.reject(new TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then((function(t){return{value:t,done:e}}))}return p=function(t){this.s=t,this.n=t.next},p.prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(t){var n=this.s.return;return void 0===n?Promise.resolve({value:t,done:!0}):e(n.apply(this.s,arguments))},throw:function(t){var n=this.s.return;return void 0===n?Promise.reject(t):e(n.apply(this.s,arguments))}},new p(t)}var g=!0,y=!1,v=100,m=12,_={EXPECTING_HEADER:0,EXPECTING_RECORD:1,END:2,ERROR:3},b=function(){function t(e){(0,s.default)(this,t),(0,a.default)(this,"options",{}),(0,a.default)(this,"binaryReader",new c.default({maxRewindBytes:m})),(0,a.default)(this,"state",_.EXPECTING_HEADER),(0,a.default)(this,"result",{geometries:[],progress:{bytesTotal:NaN,bytesUsed:NaN,rows:NaN},currentIndex:NaN}),this.options=e}return(0,o.default)(t,[{key:"write",value:function(t){this.binaryReader.write(t),this.state=E(this.state,this.result,this.binaryReader,this.options)}},{key:"end",value:function(){this.binaryReader.end(),this.state=E(this.state,this.result,this.binaryReader,this.options),this.state!==_.END&&(this.state=_.ERROR,this.result.error="SHP incomplete file")}}]),t}();function x(){return(x=(0,l.default)(i.default.mark((function t(e,n){var r,s,o,a,l,c,h,f;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=new b(n),s=!1,o=!1,a=!1,t.prev=4,c=d(e);case 6:return t.next=8,(0,u.default)(c.next());case 8:if(!(o=!(h=t.sent).done)){t.next=22;break}if(f=h.value,r.write(f),s||!r.result.header){t.next=15;break}return s=!0,t.next=15,r.result.header;case 15:if(!(r.result.geometries.length>0)){t.next=19;break}return t.next=18,r.result.geometries;case 18:r.result.geometries=[];case 19:o=!1,t.next=6;break;case 22:t.next=28;break;case 24:t.prev=24,t.t0=t.catch(4),a=!0,l=t.t0;case 28:if(t.prev=28,t.prev=29,!o||null==c.return){t.next=33;break}return t.next=33,(0,u.default)(c.return());case 33:if(t.prev=33,!a){t.next=36;break}throw l;case 36:return t.finish(33);case 37:return t.finish(28);case 38:if(r.end(),!(r.result.geometries.length>0)){t.next=42;break}return t.next=42,r.result.geometries;case 42:return t.abrupt("return");case 43:case"end":return t.stop()}}),t,null,[[4,24,28,38],[29,,33,37]])})))).apply(this,arguments)}function E(t,e,n,r){for(;;)try{switch(t){case _.ERROR:case _.END:return t;case _.EXPECTING_HEADER:var i=n.getDataView(v);if(!i)return t;e.header=(0,h.parseSHPHeader)(i),e.progress={bytesUsed:0,bytesTotal:e.header.length,rows:0},e.currentIndex=1,t=_.EXPECTING_RECORD;break;case _.EXPECTING_RECORD:for(;n.hasAvailableBytes(m);){var s,o=n.getDataView(m),a={recordNumber:o.getInt32(0,y),byteLength:2*o.getInt32(4,y),type:o.getInt32(8,g)};if(!n.hasAvailableBytes(a.byteLength-4))return n.rewind(m),t;if(a.byteLength<4||a.type!==(null===(s=e.header)||void 0===s?void 0:s.type)||a.recordNumber!==e.currentIndex)n.rewind(m-4);else{n.rewind(4);var u=n.getDataView(a.byteLength),l=(0,f.parseRecord)(u,r);e.geometries.push(l),e.currentIndex++,e.progress.rows=e.currentIndex-1}}return n.ended&&(t=_.END),t;default:return t=_.ERROR,e.error="illegal parser state ".concat(t),t}}catch(n){return t=_.ERROR,e.error="SHP parsing failed: ".concat(null==n?void 0:n.message),t}}},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.parseRecord=function(t,e){var n=((null==e?void 0:e.shp)||{})._maxDimensions,r=void 0===n?4:n,i=0,l=t.getInt32(i,s);switch(i+=Int32Array.BYTES_PER_ELEMENT,l){case 0:return null;case 1:return o(t,i,Math.min(2,r));case 3:return u(t,i,Math.min(2,r),"LineString");case 5:return u(t,i,Math.min(2,r),"Polygon");case 8:return a(t,i,Math.min(2,r));case 11:return o(t,i,Math.min(4,r));case 13:return u(t,i,Math.min(4,r),"LineString");case 15:return u(t,i,Math.min(4,r),"Polygon");case 18:return a(t,i,Math.min(4,r));case 21:return o(t,i,Math.min(3,r));case 23:return u(t,i,Math.min(3,r),"LineString");case 25:return u(t,i,Math.min(3,r),"Polygon");case 28:return a(t,i,Math.min(3,r));default:throw new Error("unsupported shape type: ".concat(l))}};var i=r(n(35)),s=!0;function o(t,e,n){var r,s=l(t,e,1,n),o=(0,i.default)(s,2);return r=o[0],e=o[1],{positions:{value:r,size:n},type:"Point"}}function a(t,e,n){e+=4*Float64Array.BYTES_PER_ELEMENT;var r,o=t.getInt32(e,s),a=null,u=null,h=l(t,e+=Int32Array.BYTES_PER_ELEMENT,o,2),f=(0,i.default)(h,2);if(r=f[0],e=f[1],4===n){var d=l(t,e+=2*Float64Array.BYTES_PER_ELEMENT,o,1),p=(0,i.default)(d,2);u=p[0],e=p[1]}if(n>=3){var g=l(t,e+=2*Float64Array.BYTES_PER_ELEMENT,o,1),y=(0,i.default)(g,2);a=y[0],e=y[1]}return{positions:{value:c(r,a,u),size:n},type:"Point"}}function u(t,e,n,r){e+=4*Float64Array.BYTES_PER_ELEMENT;var o=t.getInt32(e,s);e+=Int32Array.BYTES_PER_ELEMENT;var a=t.getInt32(e,s);e+=Int32Array.BYTES_PER_ELEMENT;var u=t.byteOffset+e,f=o*Int32Array.BYTES_PER_ELEMENT,d=new Int32Array(o+1);d.set(new Int32Array(t.buffer.slice(u,u+f))),d[o]=a;var p=null,g=null,y=null,v=l(t,e+=o*Int32Array.BYTES_PER_ELEMENT,a,2),m=(0,i.default)(v,2);if(p=m[0],e=m[1],4===n){var _=l(t,e+=2*Float64Array.BYTES_PER_ELEMENT,a,1),b=(0,i.default)(_,2);y=b[0],e=b[1]}if(n>=3){var x=l(t,e+=2*Float64Array.BYTES_PER_ELEMENT,a,1),E=(0,i.default)(x,2);g=E[0],e=E[1]}var w=c(p,g,y);if("LineString"===r)return{type:r,positions:{value:w,size:n},pathIndices:{value:d,size:1}};for(var I=[],M=1;M0&&I.push(O)}return I.push(a),{type:r,positions:{value:w,size:n},primitivePolygonIndices:{value:d,size:1},polygonIndices:{value:new Uint32Array(I),size:1}}}function l(t,e,n,r){var i=t.byteOffset+e,s=n*r*Float64Array.BYTES_PER_ELEMENT;return[new Float64Array(t.buffer.slice(i,i+s)),e+s]}function c(t,e,n){if(!e&&!n)return t;var r=t.length,i=2;n&&n.length&&(r+=n.length,i++),e&&e.length&&(r+=e.length,i++);for(var s=new Float64Array(r),o=0;ot.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw s}}}}(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;n.push((0,c.binaryToGeometry)(i))}}catch(t){r.e(t)}finally{r.f()}return n}function I(t,e){for(var n=[],r=0;r=0?t.substr(0,e):"":e}(t),r=function(t){var e=t&&t.lastIndexOf(".");return"number"==typeof e?e>=0?t.substr(e+1):"":e}(t);return r===r.toUpperCase()&&(e=e.toUpperCase()),"".concat(n,".").concat(e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Proj4Projection",{enumerable:!0,get:function(){return r.Proj4Projection}});var r=n(214)},function(t,e,n){"use strict";var r=n(20);Object.defineProperty(e,"__esModule",{value:!0}),e.Proj4Projection=void 0;var i=r(n(22)),s=r(n(23)),o=r(n(215)),a=function(){function t(e){var n=e.from,r=void 0===n?"WGS84":n,s=e.to,a=void 0===s?"WGS84":s;(0,i.default)(this,t);var u=(0,o.default)(r,a);if(!u)throw new Error("Invalid projection");this.project=u.forward,this.unproject=u.inverse}return(0,s.default)(t,null,[{key:"defineProjectionAliases",value:function(t){var e=[];for(var n in t)e.push([n,t[n]]);o.default.defs(e)}}]),t}();e.Proj4Projection=a},function(t,e,n){t.exports=function(){"use strict";var t=1,e=2,n=4,r=5,i=484813681109536e-20,s=Math.PI/2,o=.16666666666666666,a=.04722222222222222,u=.022156084656084655,l=1e-10,c=.017453292519943295,h=57.29577951308232,f=Math.PI/4,d=2*Math.PI,p=3.14159265359,g={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},y={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},v=/[\s_\-\/\(\)]/g;function m(t,e){if(t[e])return t[e];for(var n,r=Object.keys(t),i=e.toLowerCase().replace(v,""),s=-1;++s=this.text.length)return;t=this.text[this.place++]}switch(this.state){case b:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},O.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(I.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},O.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=b)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=b,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},O.prototype.number=function(t){if(!M.test(t)){if(I.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},O.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},O.prototype.keyword=function(t){if(w.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=b)}if(!I.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},O.prototype.neutral=function(t){if(E.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(M.test(t))return this.word=t,void(this.state=3);if(!I.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},O.prototype.output=function(){for(;this.place0?90:-90),t.lat_ts=t.lat1)}(i),i};function T(t){var e=this;if(2===arguments.length){var n=arguments[1];"string"==typeof n?"+"===n.charAt(0)?T[t]=_(arguments[1]):T[t]=L(arguments[1]):T[t]=n}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?T.apply(e,t):T(t)}));if("string"==typeof t){if(t in T)return T[t]}else"EPSG"in t?T["EPSG:"+t.EPSG]=t:"ESRI"in t?T["ESRI:"+t.ESRI]=t:"IAU2000"in t?T["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(T);var R=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var k=["3857","900913","3785","102113"];function A(t){if(!function(t){return"string"==typeof t}(t))return t;if(function(t){return t in T}(t))return T[t];if(function(t){return R.some((function(e){return t.indexOf(e)>-1}))}(t)){var e=L(t);if(function(t){var e=m(t,"authority");if(e){var n=m(e,"epsg");return n&&k.indexOf(n)>-1}}(e))return T["EPSG:3857"];var n=function(t){var e=m(t,"extension");if(e)return m(e,"proj4")}(e);return n?_(n):e}return function(t){return"+"===t[0]}(t)?_(t):void 0}var j=function(t,e){var n,r;if(t=t||{},!e)return t;for(r in e)void 0!==(n=e[r])&&(t[r]=n);return t},D=function(t,e,n){var r=t*e;return n/Math.sqrt(1-r*r)},F=function(t){return t<0?-1:1},B=function(t){return Math.abs(t)<=p?t:t-F(t)*d},G=function(t,e,n){var r=t*n,i=.5*t;return r=Math.pow((1-r)/(1+r),i),Math.tan(.5*(s-e))/r},q=function(t,e){for(var n,r,i=.5*t,o=s-2*Math.atan(e),a=0;a<=15;a++)if(n=t*Math.sin(o),o+=r=s-2*Math.atan(e*Math.pow((1-n)/(1+n),i))-o,Math.abs(r)<=1e-10)return o;return-9999};function U(t){return t}var z=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=D(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var e,n,r=t.x,i=t.y;if(i*h>90&&i*h<-90&&r*h>180&&r*h<-180)return null;if(Math.abs(Math.abs(i)-s)<=l)return null;if(this.sphere)e=this.x0+this.a*this.k0*B(r-this.long0),n=this.y0+this.a*this.k0*Math.log(Math.tan(f+.5*i));else{var o=Math.sin(i),a=G(this.e,i,o);e=this.x0+this.a*this.k0*B(r-this.long0),n=this.y0-this.a*this.k0*Math.log(a)}return t.x=e,t.y=n,t},inverse:function(t){var e,n,r=t.x-this.x0,i=t.y-this.y0;if(this.sphere)n=s-2*Math.atan(Math.exp(-i/(this.a*this.k0)));else{var o=Math.exp(-i/(this.a*this.k0));if(-9999===(n=q(this.e,o)))return null}return e=B(this.long0+r/(this.a*this.k0)),t.x=e,t.y=n,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:U,inverse:U,names:["longlat","identity"]}],V={},Y=[];function W(t,e){var n=Y.length;return t.names?(Y[n]=t,t.names.forEach((function(t){V[t.toLowerCase()]=n})),this):(console.log(e),!0)}var X={start:function(){z.forEach(W)},add:W,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==V[e]&&Y[V[e]]?Y[V[e]]:void 0}},H={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},J=H.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};H.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var Z={};function Q(s,c){if(!(this instanceof Q))return new Q(s);c=c||function(t){if(t)throw t};var h,f,d,p,g,y,v,_=A(s);if("object"==typeof _){var b=Q.projections.get(_.projName);if(b){if(_.datumCode&&"none"!==_.datumCode){var x=m(Z,_.datumCode);x&&(_.datum_params=x.towgs84?x.towgs84.split(","):null,_.ellps=x.ellipse,_.datumName=x.datumName?x.datumName:_.datumCode)}_.k0=_.k0||1,_.axis=_.axis||"enu",_.ellps=_.ellps||"wgs84";var E=function(t,e,n,r,i){if(!t){var s=m(H,r);s||(s=J),t=s.a,e=s.b,n=s.rf}return n&&!e&&(e=(1-1/n)*t),(0===n||Math.abs(t-e)3&&(0===h.datum_params[3]&&0===h.datum_params[4]&&0===h.datum_params[5]&&0===h.datum_params[6]||(h.datum_type=e,h.datum_params[3]*=i,h.datum_params[4]*=i,h.datum_params[5]*=i,h.datum_params[6]=h.datum_params[6]/1e6+1))),h.a=a,h.b=u,h.es=l,h.ep2=c,h}(_.datumCode,_.datum_params,E.a,E.b,w.es,w.ep2);j(this,_),j(this,b),this.a=E.a,this.b=E.b,this.rf=E.rf,this.sphere=E.sphere,this.es=w.es,this.e=w.e,this.ep2=w.ep2,this.datum=I,this.init(),c(null,this)}else c(s)}else c(s)}function K(t,e,n){var r,i,o,a,u=t.x,l=t.y,c=t.z?t.z:0;if(l<-s&&l>-1.001*s)l=-s;else if(l>s&&l<1.001*s)l=s;else{if(l<-s)return{x:-1/0,y:-1/0,z:t.z};if(l>s)return{x:1/0,y:1/0,z:t.z}}return u>Math.PI&&(u-=2*Math.PI),i=Math.sin(l),a=Math.cos(l),o=i*i,{x:((r=n/Math.sqrt(1-e*o))+c)*a*Math.cos(u),y:(r+c)*a*Math.sin(u),z:(r*(1-e)+c)*i}}function $(t,e,n,r){var i,s,o,a,u,l,c,h,f,d,p,g,y,v,m,_=1e-12,b=t.x,x=t.y,E=t.z?t.z:0;if(i=Math.sqrt(b*b+x*x),s=Math.sqrt(b*b+x*x+E*E),i/n<_){if(v=0,s/n<_)return m=-r,{x:t.x,y:t.y,z:t.z}}else v=Math.atan2(x,b);o=E/s,h=(a=i/s)*(1-e)*(u=1/Math.sqrt(1-e*(2-e)*a*a)),f=o*u,y=0;do{y++,l=e*(c=n/Math.sqrt(1-e*f*f))/(c+(m=i*h+E*f-c*(1-e*f*f))),g=(p=o*(u=1/Math.sqrt(1-l*(2-l)*a*a)))*h-(d=a*(1-l)*u)*f,h=d,f=p}while(g*g>1e-24&&y<30);return{x:v,y:Math.atan(p/Math.abs(d)),z:m}}function tt(n){return n===t||n===e}Z.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},Z.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},Z.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},Z.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},Z.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},Z.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},Z.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},Z.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},Z.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},Z.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},Z.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},Z.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},Z.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},Z.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},Z.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},Z.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},Z.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},Q.projections=X,Q.projections.start();var et=function(n,i,s){return function(n,r){return n.datum_type===r.datum_type&&!(n.a!==r.a||Math.abs(n.es-r.es)>5e-11)&&(n.datum_type===t?n.datum_params[0]===r.datum_params[0]&&n.datum_params[1]===r.datum_params[1]&&n.datum_params[2]===r.datum_params[2]:n.datum_type!==e||n.datum_params[0]===r.datum_params[0]&&n.datum_params[1]===r.datum_params[1]&&n.datum_params[2]===r.datum_params[2]&&n.datum_params[3]===r.datum_params[3]&&n.datum_params[4]===r.datum_params[4]&&n.datum_params[5]===r.datum_params[5]&&n.datum_params[6]===r.datum_params[6])}(n,i)||n.datum_type===r||i.datum_type===r?s:n.es!==i.es||n.a!==i.a||tt(n.datum_type)||tt(i.datum_type)?(s=K(s,n.es,n.a),tt(n.datum_type)&&(s=function(n,r,i){if(r===t)return{x:n.x+i[0],y:n.y+i[1],z:n.z+i[2]};if(r===e){var s=i[0],o=i[1],a=i[2],u=i[3],l=i[4],c=i[5],h=i[6];return{x:h*(n.x-c*n.y+l*n.z)+s,y:h*(c*n.x+n.y-u*n.z)+o,z:h*(-l*n.x+u*n.y+n.z)+a}}}(s,n.datum_type,n.datum_params)),tt(i.datum_type)&&(s=function(n,r,i){if(r===t)return{x:n.x-i[0],y:n.y-i[1],z:n.z-i[2]};if(r===e){var s=i[0],o=i[1],a=i[2],u=i[3],l=i[4],c=i[5],h=i[6],f=(n.x-s)/h,d=(n.y-o)/h,p=(n.z-a)/h;return{x:f+c*d-l*p,y:-c*f+d+u*p,z:l*f-u*d+p}}}(s,i.datum_type,i.datum_params)),$(s,i.es,i.a,i.b)):s},nt=function(t,e,n){var r,i,s,o=n.x,a=n.y,u=n.z||0,l={};for(s=0;s<3;s++)if(!e||2!==s||void 0!==n.z)switch(0===s?(r=o,i=-1!=="ew".indexOf(t.axis[s])?"x":"y"):1===s?(r=a,i=-1!=="ns".indexOf(t.axis[s])?"y":"x"):(r=u,i="z"),t.axis[s]){case"e":case"w":case"n":case"s":l[i]=r;break;case"u":void 0!==n[i]&&(l.z=r);break;case"d":void 0!==n[i]&&(l.z=-r);break;default:return null}return l},rt=function(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e},it=function(t){st(t.x),st(t.y)};function st(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function ot(n,r,i){var s;if(Array.isArray(i)&&(i=rt(i)),it(i),n.datum&&r.datum&&function(n,r){return(n.datum.datum_type===t||n.datum.datum_type===e)&&"WGS84"!==r.datumCode||(r.datum.datum_type===t||r.datum.datum_type===e)&&"WGS84"!==n.datumCode}(n,r)&&(i=ot(n,s=new Q("WGS84"),i),n=s),"enu"!==n.axis&&(i=nt(n,!1,i)),"longlat"===n.projName)i={x:i.x*c,y:i.y*c,z:i.z||0};else if(n.to_meter&&(i={x:i.x*n.to_meter,y:i.y*n.to_meter,z:i.z||0}),!(i=n.inverse(i)))return;return n.from_greenwich&&(i.x+=n.from_greenwich),i=et(n.datum,r.datum,i),r.from_greenwich&&(i={x:i.x-r.from_greenwich,y:i.y,z:i.z||0}),"longlat"===r.projName?i={x:i.x*h,y:i.y*h,z:i.z||0}:(i=r.forward(i),r.to_meter&&(i={x:i.x/r.to_meter,y:i.y/r.to_meter,z:i.z||0})),"enu"!==r.axis?nt(r,!0,i):i}var at=Q("WGS84");function ut(t,e,n){var r,i,s;return Array.isArray(n)?(r=ot(t,e,n)||{x:NaN,y:NaN},n.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof r.z?[r.x,r.y,r.z].concat(n.splice(3)):[r.x,r.y,n[2]].concat(n.splice(3)):[r.x,r.y].concat(n.splice(2)):[r.x,r.y]):(i=ot(t,e,n),2===(s=Object.keys(n)).length||s.forEach((function(r){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===r||"y"===r||"z"===r)return}else if("x"===r||"y"===r)return;i[r]=n[r]})),i)}function lt(t){return t instanceof Q?t:t.oProj?t.oProj:Q(t)}function ct(t,e,n){t=lt(t);var r,i=!1;return void 0===e?(e=t,t=at,i=!0):(void 0!==e.x||Array.isArray(e))&&(n=e,e=t,t=at,i=!0),e=lt(e),n?ut(t,e,n):(r={forward:function(n){return ut(t,e,n)},inverse:function(n){return ut(e,t,n)}},i&&(r.oProj=e),r)}var ht=6,ft="AJSAJS",dt="AFAFAF",pt=65,gt=73,yt=79,vt=86,mt=90,_t={forward:bt,inverse:function(t){var e=It(St(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]},toPoint:xt};function bt(t,e){return e=e||5,function(t,e){var n="00000"+t.easting,r="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(i=t.easting,s=t.northing,o=t.zoneNumber,a=Ot(o),u=Math.floor(i/1e5),l=Math.floor(s/1e5)%20,c=a,h=c-1,f=ft.charCodeAt(h),d=dt.charCodeAt(h),p=f+u-1,g=d+l,y=!1,p>mt&&(p=p-mt+pt-1,y=!0),(p===gt||fgt||(p>gt||fyt||(p>yt||fmt&&(p=p-mt+pt-1),g>vt?(g=g-vt+pt-1,y=!0):y=!1,(g===gt||dgt||(g>gt||dyt||(g>yt||dvt&&(g=g-vt+pt-1),String.fromCharCode(p)+String.fromCharCode(g))+n.substr(n.length-5,e)+r.substr(r.length-5,e);var i,s,o,a,u,l,c,h,f,d,p,g,y}(function(t){var e,n,r,i,s,o,a,u=t.lat,l=t.lon,c=6378137,h=.00669438,f=.9996,d=Et(u),p=Et(l);a=Math.floor((l+180)/6)+1,180===l&&(a=60),u>=56&&u<64&&l>=3&&l<12&&(a=32),u>=72&&u<84&&(l>=0&&l<9?a=31:l>=9&&l<21?a=33:l>=21&&l<33?a=35:l>=33&&l<42&&(a=37)),o=Et(6*(a-1)-180+3),e=h/(1-h),n=c/Math.sqrt(1-h*Math.sin(d)*Math.sin(d)),r=Math.tan(d)*Math.tan(d),i=e*Math.cos(d)*Math.cos(d);var g=f*n*((s=Math.cos(d)*(p-o))+(1-r+i)*s*s*s/6+(5-18*r+r*r+72*i-58*e)*s*s*s*s*s/120)+5e5,y=f*(c*((1-h/4-3*h*h/64-5*h*h*h/256)*d-(3*h/8+3*h*h/32+45*h*h*h/1024)*Math.sin(2*d)+(15*h*h/256+45*h*h*h/1024)*Math.sin(4*d)-35*h*h*h/3072*Math.sin(6*d))+n*Math.tan(d)*(s*s/2+(5-r+9*i+4*i*i)*s*s*s*s/24+(61-58*r+r*r+600*i-330*e)*s*s*s*s*s*s/720));return u<0&&(y+=1e7),{northing:Math.round(y),easting:Math.round(g),zoneNumber:a,zoneLetter:Mt(u)}}({lat:t[1],lon:t[0]}),e)}function xt(t){var e=It(St(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function Et(t){return t*(Math.PI/180)}function wt(t){return t/Math.PI*180}function It(t){var e=t.northing,n=t.easting,r=t.zoneLetter,i=t.zoneNumber;if(i<0||i>60)return null;var s,o,a,u,l,c,h,f,d,p=.9996,g=6378137,y=.00669438,v=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),m=n-5e5,_=e;r<"N"&&(_-=1e7),h=6*(i-1)-180+3,s=.006739496752268451,d=(f=_/p/6367449.145945056)+(3*v/2-27*v*v*v/32)*Math.sin(2*f)+(21*v*v/16-55*v*v*v*v/32)*Math.sin(4*f)+151*v*v*v/96*Math.sin(6*f),o=g/Math.sqrt(1-y*Math.sin(d)*Math.sin(d)),a=Math.tan(d)*Math.tan(d),u=s*Math.cos(d)*Math.cos(d),l=.99330562*g/Math.pow(1-y*Math.sin(d)*Math.sin(d),1.5),c=m/(o*p);var b=d-o*Math.tan(d)/l*(c*c/2-(5+3*a+10*u-4*u*u-9*s)*c*c*c*c/24+(61+90*a+298*u+45*a*a-1.6983531815716497-3*u*u)*c*c*c*c*c*c/720);b=wt(b);var x,E=(c-(1+2*a+u)*c*c*c/6+(5-2*u+28*a-3*u*u+8*s+24*a*a)*c*c*c*c*c/120)/Math.cos(d);if(E=h+wt(E),t.accuracy){var w=It({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});x={top:w.lat,right:w.lon,bottom:b,left:E}}else x={lat:b,lon:E};return x}function Mt(t){var e="Z";return 84>=t&&t>=72?e="X":72>t&&t>=64?e="W":64>t&&t>=56?e="V":56>t&&t>=48?e="U":48>t&&t>=40?e="T":40>t&&t>=32?e="S":32>t&&t>=24?e="R":24>t&&t>=16?e="Q":16>t&&t>=8?e="P":8>t&&t>=0?e="N":0>t&&t>=-8?e="M":-8>t&&t>=-16?e="L":-16>t&&t>=-24?e="K":-24>t&&t>=-32?e="J":-32>t&&t>=-40?e="H":-40>t&&t>=-48?e="G":-48>t&&t>=-56?e="F":-56>t&&t>=-64?e="E":-64>t&&t>=-72?e="D":-72>t&&t>=-80&&(e="C"),e}function Ot(t){var e=t%ht;return 0===e&&(e=ht),e}function St(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,n=t.length,r=null,i="",s=0;!/[A-Z]/.test(e=t.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+t;i+=e,s++}var o=parseInt(i,10);if(0===s||s+3>n)throw"MGRSPoint bad conversion from: "+t;var a=t.charAt(s++);if(a<="A"||"B"===a||"Y"===a||a>="Z"||"I"===a||"O"===a)throw"MGRSPoint zone letter "+a+" not handled: "+t;r=t.substring(s,s+=2);for(var u=Ot(o),l=function(t,e){for(var n=ft.charCodeAt(e-1),r=1e5,i=!1;n!==t.charCodeAt(0);){if(++n===gt&&n++,n===yt&&n++,n>mt){if(i)throw"Bad character: "+t;n=pt,i=!0}r+=1e5}return r}(r.charAt(0),u),c=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var n=dt.charCodeAt(e-1),r=0,i=!1;n!==t.charCodeAt(0);){if(++n===gt&&n++,n===yt&&n++,n>vt){if(i)throw"Bad character: "+t;n=pt,i=!0}r+=1e5}return r}(r.charAt(1),u);c0&&(f=1e5/Math.pow(10,g),d=t.substring(s,s+g),y=parseFloat(d)*f,p=t.substring(s+g),v=parseFloat(p)*f),{easting:y+l,northing:v+c,zoneLetter:a,zoneNumber:o,accuracy:f}}function Nt(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function Pt(t,e,n){if(!(this instanceof Pt))return new Pt(t,e,n);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var r=t.split(",");this.x=parseFloat(r[0],10),this.y=parseFloat(r[1],10),this.z=parseFloat(r[2],10)||0}else this.x=t,this.y=e,this.z=n||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Pt.fromMGRS=function(t){return new Pt(xt(t))},Pt.prototype.toMGRS=function(t){return bt([this.x,this.y],t)};var Ct=.046875,Lt=.01953125,Tt=.01068115234375,Rt=function(t){var e=[];e[0]=1-t*(.25+t*(Ct+t*(Lt+t*Tt))),e[1]=t*(.75-t*(Ct+t*(Lt+t*Tt)));var n=t*t;return e[2]=n*(.46875-t*(.013020833333333334+.007120768229166667*t)),n*=t,e[3]=n*(.3645833333333333-.005696614583333333*t),e[4]=n*t*.3076171875,e},kt=function(t,e,n,r){return n*=e,e*=e,r[0]*t-n*(r[1]+e*(r[2]+e*(r[3]+e*r[4])))},At=function(t,e,n){for(var r=1/(1-e),i=t,s=20;s;--s){var o=Math.sin(i),a=1-e*o*o;if(i-=a=(kt(i,o,Math.cos(i),n)-t)*(a*Math.sqrt(a))*r,Math.abs(a)l?Math.tan(s):0,g=Math.pow(p,2),y=Math.pow(g,2);e=1-this.es*Math.pow(a,2),c/=Math.sqrt(e);var v=kt(s,a,u,this.en);n=this.a*(this.k0*c*(1+h/6*(1-g+f+h/20*(5-18*g+y+14*f-58*g*f+h/42*(61+179*y-y*g-479*g)))))+this.x0,r=this.a*(this.k0*(v-this.ml0+a*o*c/2*(1+h/12*(5-g+9*f+4*d+h/30*(61+y-58*g+270*f-330*g*f+h/56*(1385+543*y-y*g-3111*g))))))+this.y0}else{var m=u*Math.sin(o);if(Math.abs(Math.abs(m)-1)=1){if(m-1>l)return 93;r=0}else r=Math.acos(r);s<0&&(r=-r),r=this.a*this.k0*(r-this.lat0)+this.y0}return t.x=n,t.y=r,t},inverse:function(t){var e,n,r,i,o=(t.x-this.x0)*(1/this.a),a=(t.y-this.y0)*(1/this.a);if(this.es)if(e=this.ml0+a/this.k0,n=At(e,this.es,this.en),Math.abs(n)l?Math.tan(n):0,f=this.ep2*Math.pow(c,2),d=Math.pow(f,2),p=Math.pow(h,2),g=Math.pow(p,2);e=1-this.es*Math.pow(u,2);var y=o*Math.sqrt(e)/this.k0,v=Math.pow(y,2);r=n-(e*=h)*v/(1-this.es)*.5*(1-v/12*(5+3*p-9*f*p+f-4*d-v/30*(61+90*p-252*f*p+45*g+46*f-v/56*(1385+3633*p+4095*g+1574*g*p)))),i=B(this.long0+y*(1-v/6*(1+2*p+f-v/20*(5+28*p+24*g+8*f*p+6*f-v/42*(61+662*p+1320*g+720*g*p))))/c)}else r=s*F(a),i=0;else{var m=Math.exp(o/this.k0),_=.5*(m-1/m),b=this.lat0+a/this.k0,x=Math.cos(b);e=Math.sqrt((1-Math.pow(x,2))/(1+Math.pow(_,2))),r=Math.asin(e),a<0&&(r=-r),i=0===_&&0===x?0:B(Math.atan2(_,x)+this.long0)}return t.x=i,t.y=r,t},names:["Transverse_Mercator","Transverse Mercator","tmerc"]},Dt=function(t){var e=Math.exp(t);return(e-1/e)/2},Ft=function(t,e){t=Math.abs(t),e=Math.abs(e);var n=Math.max(t,e),r=Math.min(t,e)/(n||1);return n*Math.sqrt(1+Math.pow(r,2))},Bt=function(t){var e=Math.abs(t);return e=function(t){var e=1+t,n=e-1;return 0===n?t:t*Math.log(e)/n}(e*(1+e/(Ft(1,e)+1))),t<0?-e:e},Gt=function(t,e){for(var n,r=2*Math.cos(2*e),i=t.length-1,s=t[i],o=0;--i>=0;)n=r*s-o+t[i],o=s,s=n;return e+n*Math.sin(2*e)},qt=function(t,e){for(var n,r=2*Math.cos(e),i=t.length-1,s=t[i],o=0;--i>=0;)n=r*s-o+t[i],o=s,s=n;return Math.sin(e)*n},Ut=function(t,e,n){for(var r,i,s=Math.sin(e),o=Math.cos(e),a=Dt(n),u=function(t){var e=Math.exp(t);return(e+1/e)/2}(n),l=2*o*u,c=-2*s*a,h=t.length-1,f=t[h],d=0,p=0,g=0;--h>=0;)r=p,i=d,f=l*(p=f)-r-c*(d=g)+t[h],g=c*p-i+l*d;return[(l=s*u)*f-(c=o*a)*g,l*g+c*f]};var zt={init:function(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),n=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),n*=e,this.cgb[1]=n*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=n*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),n*=e,this.cgb[2]=n*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=n*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),n*=e,this.cgb[3]=n*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=n*(1237/630+e*(e*(-24832/14175)-2.4)),n*=e,this.cgb[4]=n*(4174/315+e*(-144838/6237)),this.cbg[4]=n*(-734/315+e*(109598/31185)),n*=e,this.cgb[5]=n*(601676/22275),this.cbg[5]=n*(444337/155925),n=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+n*(1/4+n*(1/64+n/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=n*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=n*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),n*=e,this.utg[2]=n*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=n*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),n*=e,this.utg[3]=n*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=n*(49561/161280+e*(-179/168+e*(6601661/7257600))),n*=e,this.utg[4]=n*(-4583/161280+e*(108847/3991680)),this.gtu[4]=n*(34729/80640+e*(-3418889/1995840)),n*=e,this.utg[5]=n*(-20648693/638668800),this.gtu[5]=.6650675310896665*n;var r=Gt(this.cbg,this.lat0);this.Zb=-this.Qn*(r+qt(this.gtu,2*r))},forward:function(t){var e=B(t.x-this.long0),n=t.y;n=Gt(this.cbg,n);var r=Math.sin(n),i=Math.cos(n),s=Math.sin(e),o=Math.cos(e);n=Math.atan2(r,o*i),e=Math.atan2(s*i,Ft(r,i*o)),e=Bt(Math.tan(e));var a,u,l=Ut(this.gtu,2*n,2*e);return n+=l[0],e+=l[1],Math.abs(e)<=2.623395162778?(a=this.a*(this.Qn*e)+this.x0,u=this.a*(this.Qn*n+this.Zb)+this.y0):(a=1/0,u=1/0),t.x=a,t.y=u,t},inverse:function(t){var e,n,r=(t.x-this.x0)*(1/this.a),i=(t.y-this.y0)*(1/this.a);if(i=(i-this.Zb)/this.Qn,r/=this.Qn,Math.abs(r)<=2.623395162778){var s=Ut(this.utg,2*i,2*r);i+=s[0],r+=s[1],r=Math.atan(Dt(r));var o=Math.sin(i),a=Math.cos(i),u=Math.sin(r),l=Math.cos(r);i=Math.atan2(o*l,Ft(u,l*a)),r=Math.atan2(u,l*a),e=B(r+this.long0),n=Gt(this.cgb,i)}else e=1/0,n=1/0;return t.x=e,t.y=n,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"]},Vt=function(t,e){if(void 0===t){if((t=Math.floor(30*(B(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t};var Yt={init:function(){var t=Vt(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*c,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,zt.init.apply(this),this.forward=zt.forward,this.inverse=zt.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},Wt=function(t,e){return Math.pow((1-t)/(1+t),e)},Xt=20;var Ht={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+f)/(Math.pow(Math.tan(.5*this.lat0+f),this.C)*Wt(this.e*t,this.ratexp))},forward:function(t){var e=t.x,n=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+f),this.C)*Wt(this.e*Math.sin(n),this.ratexp))-s,t.x=this.C*e,t},inverse:function(t){for(var e=t.x/this.C,n=t.y,r=Math.pow(Math.tan(.5*n+f)/this.K,1/this.C),i=Xt;i>0&&(n=2*Math.atan(r*Wt(this.e*Math.sin(t.y),-.5*this.e))-s,!(Math.abs(n-t.y)<1e-14));--i)t.y=n;return i?(t.x=e,t.y=n,t):null},names:["gauss"]};var Jt={init:function(){Ht.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,n,r,i;return t.x=B(t.x-this.long0),Ht.forward.apply(this,[t]),e=Math.sin(t.y),n=Math.cos(t.y),r=Math.cos(t.x),i=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*n*r),t.x=i*n*Math.sin(t.x),t.y=i*(this.cosc0*e-this.sinc0*n*r),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,n,r,i,s;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,s=Math.sqrt(t.x*t.x+t.y*t.y)){var o=2*Math.atan2(s,this.R2);e=Math.sin(o),n=Math.cos(o),i=Math.asin(n*this.sinc0+t.y*e*this.cosc0/s),r=Math.atan2(t.x*e,s*this.cosc0*n-t.y*this.sinc0*e)}else i=this.phic0,r=0;return t.x=r,t.y=i,Ht.inverse.apply(this,[t]),t.x=B(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var Zt={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=l&&(this.k0=.5*(1+F(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=l&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=l&&(this.k0=.5*this.cons*D(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/G(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=D(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-s,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,n,r,i,o,a,u=t.x,c=t.y,h=Math.sin(c),f=Math.cos(c),d=B(u-this.long0);return Math.abs(Math.abs(u-this.long0)-Math.PI)<=l&&Math.abs(c+this.lat0)<=l?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*h+this.coslat0*f*Math.cos(d)),t.x=this.a*e*f*Math.sin(d)+this.x0,t.y=this.a*e*(this.coslat0*h-this.sinlat0*f*Math.cos(d))+this.y0,t):(n=2*Math.atan(this.ssfn_(c,h,this.e))-s,i=Math.cos(n),r=Math.sin(n),Math.abs(this.coslat0)<=l?(o=G(this.e,c*this.con,this.con*h),a=2*this.a*this.k0*o/this.cons,t.x=this.x0+a*Math.sin(u-this.long0),t.y=this.y0-this.con*a*Math.cos(u-this.long0),t):(Math.abs(this.sinlat0)0?B(this.long0+Math.atan2(t.x,-1*t.y)):B(this.long0+Math.atan2(t.x,t.y)):B(this.long0+Math.atan2(t.x*Math.sin(u),a*this.coslat0*Math.cos(u)-t.y*this.sinlat0*Math.sin(u))),t.x=e,t.y=n,t)}if(Math.abs(this.coslat0)<=l){if(a<=l)return n=this.lat0,e=this.long0,t.x=e,t.y=n,t;t.x*=this.con,t.y*=this.con,r=a*this.cons/(2*this.a*this.k0),n=this.con*q(this.e,r),e=this.con*B(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else i=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,a<=l?o=this.X0:(o=Math.asin(Math.cos(i)*this.sinX0+t.y*Math.sin(i)*this.cosX0/a),e=B(this.long0+Math.atan2(t.x*Math.sin(i),a*this.cosX0*Math.cos(i)-t.y*this.sinX0*Math.sin(i)))),n=-1*q(this.e,Math.tan(.5*(s+o)));return t.x=e,t.y=n,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(t,e,n){return e*=n,Math.tan(.5*(s+t))*Math.pow((1-e)/(1+e),.5*n)}};var Qt={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),n=this.a,r=1/this.rf,i=2*r-Math.pow(r,2),s=this.e=Math.sqrt(i);this.R=this.k0*n*Math.sqrt(1-i)/(1-i*Math.pow(e,2)),this.alpha=Math.sqrt(1+i/(1-i)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),a=Math.log(Math.tan(Math.PI/4+t/2)),u=Math.log((1+s*e)/(1-s*e));this.K=o-this.alpha*a+this.alpha*s/2*u},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),n=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),r=-this.alpha*(e+n)+this.K,i=2*(Math.atan(Math.exp(r))-Math.PI/4),s=this.alpha*(t.x-this.lambda0),o=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(s))),a=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(s));return t.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,t.x=this.R*o+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,n=t.y-this.y0,r=e/this.R,i=2*(Math.atan(Math.exp(n/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(r)),o=Math.atan(Math.sin(r)/(Math.cos(this.b0)*Math.cos(r)-Math.sin(this.b0)*Math.tan(i))),a=this.lambda0+o/this.alpha,u=0,l=s,c=-1e3,h=0;Math.abs(l-c)>1e-7;){if(++h>20)return;u=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),c=l,l=2*Math.atan(Math.exp(u))-Math.PI/2}return t.x=a,t.y=l,t},names:["somerc"]};var Kt={init:function(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var t=Math.sin(this.lat0),e=Math.cos(this.lat0),n=this.e*t;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(e,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-n*n);var r,i,s=G(this.e,this.lat0,t),o=this.bl/e*Math.sqrt((1-this.es)/(1-n*n));if(o*o<1&&(o=1),isNaN(this.longc)){var a=G(this.e,this.lat1,Math.sin(this.lat1)),u=G(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(o+Math.sqrt(o*o-1))*Math.pow(s,this.bl):this.el=(o-Math.sqrt(o*o-1))*Math.pow(s,this.bl);var l=Math.pow(a,this.bl),c=Math.pow(u,this.bl);i=.5*((r=this.el/l)-1/r);var h=(this.el*this.el-c*l)/(this.el*this.el+c*l),f=(c-l)/(c+l),d=B(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(h*Math.tan(.5*this.bl*d)/f)/this.bl,this.long0=B(this.long0);var p=B(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*p)/i),this.alpha=Math.asin(o*Math.sin(this.gamma0))}else r=this.lat0>=0?o+Math.sqrt(o*o-1):o-Math.sqrt(o*o-1),this.el=r*Math.pow(s,this.bl),i=.5*(r-1/r),this.gamma0=Math.asin(Math.sin(this.alpha)/o),this.long0=this.longc-Math.asin(i*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(o*o-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(o*o-1),Math.cos(this.alpha))},forward:function(t){var e,n,r,i=t.x,o=t.y,a=B(i-this.long0);if(Math.abs(Math.abs(o)-s)<=l)r=o>0?-1:1,n=this.al/this.bl*Math.log(Math.tan(f+r*this.gamma0*.5)),e=-1*r*s*this.al/this.bl;else{var u=G(this.e,o,Math.sin(o)),c=this.el/Math.pow(u,this.bl),h=.5*(c-1/c),d=.5*(c+1/c),p=Math.sin(this.bl*a),g=(h*Math.sin(this.gamma0)-p*Math.cos(this.gamma0))/d;n=Math.abs(Math.abs(g)-1)<=l?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-g)/(1+g))/this.bl,e=Math.abs(Math.cos(this.bl*a))<=l?this.al*this.bl*a:this.al*Math.atan2(h*Math.cos(this.gamma0)+p*Math.sin(this.gamma0),Math.cos(this.bl*a))/this.bl}return this.no_rot?(t.x=this.x0+e,t.y=this.y0+n):(e-=this.uc,t.x=this.x0+n*Math.cos(this.alpha)+e*Math.sin(this.alpha),t.y=this.y0+e*Math.cos(this.alpha)-n*Math.sin(this.alpha)),t},inverse:function(t){var e,n;this.no_rot?(n=t.y-this.y0,e=t.x-this.x0):(n=(t.x-this.x0)*Math.cos(this.alpha)-(t.y-this.y0)*Math.sin(this.alpha),e=(t.y-this.y0)*Math.cos(this.alpha)+(t.x-this.x0)*Math.sin(this.alpha),e+=this.uc);var r=Math.exp(-1*this.bl*n/this.al),i=.5*(r-1/r),o=.5*(r+1/r),a=Math.sin(this.bl*e/this.al),u=(a*Math.cos(this.gamma0)+i*Math.sin(this.gamma0))/o,c=Math.pow(this.el/Math.sqrt((1+u)/(1-u)),1/this.bl);return Math.abs(u-1)l?this.ns=Math.log(r/a)/Math.log(i/u):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=r/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e=t.x,n=t.y;Math.abs(2*Math.abs(n)-Math.PI)<=l&&(n=F(n)*(s-2*l));var r,i,o=Math.abs(Math.abs(n)-s);if(o>l)r=G(this.e,n,Math.sin(n)),i=this.a*this.f0*Math.pow(r,this.ns);else{if((o=n*this.ns)<=0)return null;i=0}var a=this.ns*B(e-this.long0);return t.x=this.k0*(i*Math.sin(a))+this.x0,t.y=this.k0*(this.rh-i*Math.cos(a))+this.y0,t},inverse:function(t){var e,n,r,i,o,a=(t.x-this.x0)/this.k0,u=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(a*a+u*u),n=1):(e=-Math.sqrt(a*a+u*u),n=-1);var l=0;if(0!==e&&(l=Math.atan2(n*a,n*u)),0!==e||this.ns>0){if(n=1/this.ns,r=Math.pow(e/(this.a*this.f0),n),-9999===(i=q(this.e,r)))return null}else i=-s;return o=B(l/this.ns+this.long0),t.x=o,t.y=i,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"]};var te={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,n,r,i,s,o,a,u=t.x,l=t.y,c=B(u-this.long0);return e=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),n=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/e)-this.s45),r=-c*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(n)+Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),s=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(i)),o=this.n*s,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),t.y=a*Math.cos(o)/1,t.x=a*Math.sin(o)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,n,r,i,s,o,a,u=t.x;t.x=t.y,t.y=u,this.czech||(t.y*=-1,t.x*=-1),s=Math.sqrt(t.x*t.x+t.y*t.y),i=Math.atan2(t.y,t.x)/Math.sin(this.s0),r=2*(Math.atan(Math.pow(this.ro0/s,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(r)-Math.sin(this.ad)*Math.cos(r)*Math.cos(i)),n=Math.asin(Math.cos(r)*Math.sin(i)/Math.cos(e)),t.x=this.long0-n/this.alfa,o=e,a=0;var l=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-t.y)<1e-10&&(a=1),o=t.y,l+=1}while(0===a&&l<15);return l>=15?null:t},names:["Krovak","krovak"]},ee=function(t,e,n,r,i){return t*i-e*Math.sin(2*i)+n*Math.sin(4*i)-r*Math.sin(6*i)},ne=function(t){return 1-.25*t*(1+t/16*(3+1.25*t))},re=function(t){return.375*t*(1+.25*t*(1+.46875*t))},ie=function(t){return.05859375*t*t*(1+.75*t)},se=function(t){return t*t*t*(35/3072)},oe=function(t,e,n){var r=e*n;return t/Math.sqrt(1-r*r)},ae=function(t){return Math.abs(t)1e-7?(1-t*t)*(e/(1-(n=t*e)*n)-.5/t*Math.log((1-n)/(1+n))):2*e};var he=.3333333333333333,fe=.17222222222222222,de=.10257936507936508,pe=.06388888888888888,ge=.0664021164021164,ye=.016415012942191543;var ve={init:function(){var t,e=Math.abs(this.lat0);if(Math.abs(e-s)0)switch(this.qp=ce(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,n=[];return n[0]=t*he,e=t*t,n[0]+=e*fe,n[1]=e*pe,e*=t,n[0]+=e*de,n[1]+=e*ge,n[2]=e*ye,n}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=ce(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var e,n,r,i,o,a,u,c,h,d,p=t.x,g=t.y;if(p=B(p-this.long0),this.sphere){if(o=Math.sin(g),d=Math.cos(g),r=Math.cos(p),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((n=this.mode===this.EQUIT?1+d*r:1+this.sinph0*o+this.cosph0*d*r)<=l)return null;e=(n=Math.sqrt(2/n))*d*Math.sin(p),n*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*d*r}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(r=-r),Math.abs(g+this.lat0)=0?(e=(h=Math.sqrt(a))*i,n=r*(this.mode===this.S_POLE?h:-h)):e=n=0}}return t.x=this.a*e+this.x0,t.y=this.a*n+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,n,r,i,o,a,u,c,h,f,d=t.x/this.a,p=t.y/this.a;if(this.sphere){var g,y=0,v=0;if((n=.5*(g=Math.sqrt(d*d+p*p)))>1)return null;switch(n=2*Math.asin(n),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(v=Math.sin(n),y=Math.cos(n)),this.mode){case this.EQUIT:n=Math.abs(g)<=l?0:Math.asin(p*v/g),d*=v,p=y*g;break;case this.OBLIQ:n=Math.abs(g)<=l?this.lat0:Math.asin(y*this.sinph0+p*v*this.cosph0/g),d*=v*this.cosph0,p=(y-Math.sin(n)*this.sinph0)*g;break;case this.N_POLE:p=-p,n=s-n;break;case this.S_POLE:n-=s}e=0!==p||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(d,p):0}else{if(u=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(d/=this.dd,p*=this.dd,(a=Math.sqrt(d*d+p*p))1&&(t=t>1?1:-1),Math.asin(t)};var _e={init:function(){Math.abs(this.lat1+this.lat2)l?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,n=t.y;this.sin_phi=Math.sin(n),this.cos_phi=Math.cos(n);var r=ce(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*r)/this.ns0,s=this.ns0*B(e-this.long0),o=i*Math.sin(s)+this.x0,a=this.rh-i*Math.cos(s)+this.y0;return t.x=o,t.y=a,t},inverse:function(t){var e,n,r,i,s,o;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),r=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),r=-1),i=0,0!==e&&(i=Math.atan2(r*t.x,r*t.y)),r=e*this.ns0/this.a,this.sphere?o=Math.asin((this.c-r*r)/(2*this.ns0)):(n=(this.c-r*r)/this.ns0,o=this.phi1z(this.e3,n)),s=B(i/this.ns0+this.long0),t.x=s,t.y=o,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,e){var n,r,i,s,o=me(.5*e);if(t0||Math.abs(s)<=l?(o=this.x0+1*this.a*n*Math.sin(r)/s,a=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*i)/s):(o=this.x0+this.infinity_dist*n*Math.sin(r),a=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*n*i)),t.x=o,t.y=a,t},inverse:function(t){var e,n,r,i,s,o;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(i=Math.atan2(e,this.rc),n=Math.sin(i),r=Math.cos(i),o=me(r*this.sin_p14+t.y*n*this.cos_p14/e),s=Math.atan2(t.x*n,e*this.cos_p14*r-t.y*this.sin_p14*n),s=B(this.long0+s)):(o=this.phic0,s=0),t.x=s,t.y=o,t},names:["gnom"]},xe=function(t,e){var n=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-n)<1e-6)return e<0?-1*s:s;for(var r,i,o,a,u=Math.asin(.5*e),l=0;l<30;l++)if(i=Math.sin(u),o=Math.cos(u),a=t*i,u+=r=Math.pow(1-a*a,2)/(2*o)*(e/(1-t*t)-i/(1-a*a)+.5/t*Math.log((1-a)/(1+a))),Math.abs(r)<=1e-10)return u;return NaN};var Ee={init:function(){this.sphere||(this.k0=D(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,n,r=t.x,i=t.y,s=B(r-this.long0);if(this.sphere)e=this.x0+this.a*s*Math.cos(this.lat_ts),n=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var o=ce(this.e,Math.sin(i));e=this.x0+this.a*this.k0*s,n=this.y0+this.a*o*.5/this.k0}return t.x=e,t.y=n,t},inverse:function(t){var e,n;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=B(this.long0+t.x/this.a/Math.cos(this.lat_ts)),n=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(n=xe(this.e,2*t.y*this.k0/this.a),e=B(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=n,t},names:["cea"]};var we={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,n=t.y,r=B(e-this.long0),i=ae(n-this.lat0);return t.x=this.x0+this.a*r*this.rc,t.y=this.y0+this.a*i,t},inverse:function(t){var e=t.x,n=t.y;return t.x=B(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=ae(this.lat0+(n-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},Ie=20;var Me={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ne(this.es),this.e1=re(this.es),this.e2=ie(this.es),this.e3=se(this.es),this.ml0=this.a*ee(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,n,r,i=t.x,s=t.y,o=B(i-this.long0);if(r=o*Math.sin(s),this.sphere)Math.abs(s)<=l?(e=this.a*o,n=-1*this.a*this.lat0):(e=this.a*Math.sin(r)/Math.tan(s),n=this.a*(ae(s-this.lat0)+(1-Math.cos(r))/Math.tan(s)));else if(Math.abs(s)<=l)e=this.a*o,n=-1*this.ml0;else{var a=oe(this.a,this.e,Math.sin(s))/Math.tan(s);e=a*Math.sin(r),n=this.a*ee(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+a*(1-Math.cos(r))}return t.x=e+this.x0,t.y=n+this.y0,t},inverse:function(t){var e,n,r,i,s,o,a,u,c;if(r=t.x-this.x0,i=t.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=l)e=B(r/this.a+this.long0),n=0;else{var h;for(o=this.lat0+i/this.a,a=r*r/this.a/this.a+o*o,u=o,s=Ie;s;--s)if(u+=c=-1*(o*(u*(h=Math.tan(u))+1)-u-.5*(u*u+a)*h)/((u-o)/h-1),Math.abs(c)<=l){n=u;break}e=B(this.long0+Math.asin(r*Math.tan(u)/this.a)/Math.sin(n))}else if(Math.abs(i+this.ml0)<=l)n=0,e=B(this.long0+r/this.a);else{var f,d,p,g,y;for(o=(this.ml0+i)/this.a,a=r*r/this.a/this.a+o*o,u=o,s=Ie;s;--s)if(y=this.e*Math.sin(u),f=Math.sqrt(1-y*y)*Math.tan(u),d=this.a*ee(this.e0,this.e1,this.e2,this.e3,u),p=this.e0-2*this.e1*Math.cos(2*u)+4*this.e2*Math.cos(4*u)-6*this.e3*Math.cos(6*u),u-=c=(o*(f*(g=d/this.a)+1)-g-.5*f*(g*g+a))/(this.es*Math.sin(2*u)*(g*g+a-2*o*g)/(4*f)+(o-g)*(f*p-2/Math.sin(2*u))-p),Math.abs(c)<=l){n=u;break}f=Math.sqrt(1-this.es*Math.pow(Math.sin(n),2))*Math.tan(n),e=B(this.long0+Math.asin(r*f/this.a)/Math.sin(n))}return t.x=e,t.y=n,t},names:["Polyconic","poly"]};var Oe={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var e,n=t.x,r=t.y-this.lat0,s=n-this.long0,o=r/i*1e-5,a=s,u=1,l=0;for(e=1;e<=10;e++)u*=o,l+=this.A[e]*u;var c,h=l,f=a,d=1,p=0,g=0,y=0;for(e=1;e<=6;e++)c=p*h+d*f,d=d*h-p*f,p=c,g=g+this.B_re[e]*d-this.B_im[e]*p,y=y+this.B_im[e]*d+this.B_re[e]*p;return t.x=y*this.a+this.x0,t.y=g*this.a+this.y0,t},inverse:function(t){var e,n,r=t.x,s=t.y,o=r-this.x0,a=(s-this.y0)/this.a,u=o/this.a,l=1,c=0,h=0,f=0;for(e=1;e<=6;e++)n=c*a+l*u,l=l*a-c*u,c=n,h=h+this.C_re[e]*l-this.C_im[e]*c,f=f+this.C_im[e]*l+this.C_re[e]*c;for(var d=0;d.999999999999&&(n=.999999999999),e=Math.asin(n);var r=B(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));r<-Math.PI&&(r=-Math.PI),r>Math.PI&&(r=Math.PI),n=(2*e+Math.sin(2*e))/Math.PI,Math.abs(n)>1&&(n=1);var i=Math.asin(n);return t.x=r,t.y=i,t},names:["Mollweide","moll"]};var Le={init:function(){Math.abs(this.lat1+this.lat2)=0?(n=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(n=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var s=0;if(0!==n&&(s=Math.atan2(e*t.x,e*t.y)),this.sphere)return i=B(this.long0+s/this.ns),r=ae(this.g-n/this.a),t.x=i,t.y=r,t;var o=this.g-n/this.a;return r=ue(o,this.e0,this.e1,this.e2,this.e3),i=B(this.long0+s/this.ns),t.x=i,t.y=r,t},names:["Equidistant_Conic","eqdc"]};var Te={init:function(){this.R=this.a},forward:function(t){var e,n,r=t.x,i=t.y,o=B(r-this.long0);Math.abs(i)<=l&&(e=this.x0+this.R*o,n=this.y0);var a=me(2*Math.abs(i/Math.PI));(Math.abs(o)<=l||Math.abs(Math.abs(i)-s)<=l)&&(e=this.x0,n=i>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var u=.5*Math.abs(Math.PI/o-o/Math.PI),c=u*u,h=Math.sin(a),f=Math.cos(a),d=f/(h+f-1),p=d*d,g=d*(2/h-1),y=g*g,v=Math.PI*this.R*(u*(d-y)+Math.sqrt(c*(d-y)*(d-y)-(y+c)*(p-y)))/(y+c);o<0&&(v=-v),e=this.x0+v;var m=c+d;return v=Math.PI*this.R*(g*m-u*Math.sqrt((y+c)*(c+1)-m*m))/(y+c),n=i>=0?this.y0+v:this.y0-v,t.x=e,t.y=n,t},inverse:function(t){var e,n,r,i,s,o,a,u,c,h,f,d;return t.x-=this.x0,t.y-=this.y0,f=Math.PI*this.R,s=(r=t.x/f)*r+(i=t.y/f)*i,f=3*(i*i/(u=-2*(o=-Math.abs(i)*(1+s))+1+2*i*i+s*s)+(2*(a=o-2*i*i+r*r)*a*a/u/u/u-9*o*a/u/u)/27)/(c=(o-a*a/3/u)/u)/(h=2*Math.sqrt(-c/3)),Math.abs(f)>1&&(f=f>=0?1:-1),d=Math.acos(f)/3,n=t.y>=0?(-h*Math.cos(d+Math.PI/3)-a/3/u)*Math.PI:-(-h*Math.cos(d+Math.PI/3)-a/3/u)*Math.PI,e=Math.abs(r)2*s*this.a)return;return n=e/this.a,r=Math.sin(n),i=Math.cos(n),o=this.long0,Math.abs(e)<=l?a=this.lat0:(a=me(i*this.sin_p12+t.y*r*this.cos_p12/e),u=Math.abs(this.lat0)-s,o=Math.abs(u)<=l?this.lat0>=0?B(this.long0+Math.atan2(t.x,-t.y)):B(this.long0-Math.atan2(-t.x,t.y)):B(this.long0+Math.atan2(t.x*r,e*this.cos_p12*i-t.y*this.sin_p12*r))),t.x=o,t.y=a,t}return c=ne(this.es),h=re(this.es),f=ie(this.es),d=se(this.es),Math.abs(this.sin_p12-1)<=l?(p=this.a*ee(c,h,f,d,s),e=Math.sqrt(t.x*t.x+t.y*t.y),a=ue((p-e)/this.a,c,h,f,d),o=B(this.long0+Math.atan2(t.x,-1*t.y)),t.x=o,t.y=a,t):Math.abs(this.sin_p12+1)<=l?(p=this.a*ee(c,h,f,d,s),e=Math.sqrt(t.x*t.x+t.y*t.y),a=ue((e-p)/this.a,c,h,f,d),o=B(this.long0+Math.atan2(t.x,t.y)),t.x=o,t.y=a,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),v=Math.atan2(t.x,t.y),g=oe(this.a,this.e,this.sin_p12),m=Math.cos(v),b=-(_=this.e*this.cos_p12*m)*_/(1-this.es),x=3*this.es*(1-b)*this.sin_p12*this.cos_p12*m/(1-this.es),I=1-b*(w=(E=e/g)-b*(1+b)*Math.pow(E,3)/6-x*(1+3*b)*Math.pow(E,4)/24)*w/2-E*w*w*w/6,y=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*m),o=B(this.long0+Math.asin(Math.sin(v)*Math.sin(w)/Math.cos(y))),M=Math.sin(y),a=Math.atan2((M-this.es*I*this.sin_p12)*Math.tan(y),M*(1-this.es)),t.x=o,t.y=a,t)},names:["Azimuthal_Equidistant","aeqd"]};var ke={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,n,r,i,s,o,a,u=t.x,c=t.y;return r=B(u-this.long0),e=Math.sin(c),n=Math.cos(c),i=Math.cos(r),1,((s=this.sin_p14*e+this.cos_p14*n*i)>0||Math.abs(s)<=l)&&(o=1*this.a*n*Math.sin(r),a=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*i)),t.x=o,t.y=a,t},inverse:function(t){var e,n,r,i,o,a,u;return t.x-=this.x0,t.y-=this.y0,e=Math.sqrt(t.x*t.x+t.y*t.y),n=me(e/this.a),r=Math.sin(n),i=Math.cos(n),a=this.long0,Math.abs(e)<=l?(u=this.lat0,t.x=a,t.y=u,t):(u=me(i*this.sin_p14+t.y*r*this.cos_p14/e),o=Math.abs(this.lat0)-s,Math.abs(o)<=l?(a=this.lat0>=0?B(this.long0+Math.atan2(t.x,-t.y)):B(this.long0-Math.atan2(-t.x,t.y)),t.x=a,t.y=u,t):(a=B(this.long0+Math.atan2(t.x*r,e*this.cos_p14*i-t.y*this.sin_p14*r)),t.x=a,t.y=u,t))},names:["ortho"]},Ae={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},je={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function De(t,e,n,r){var i;return tf&&i<=s+f?(r.value=je.AREA_1,i-=s):i>s+f||i<=-(s+f)?(r.value=je.AREA_2,i=i>=0?i-p:i+p):(r.value=je.AREA_3,i+=s)),i}function Fe(t,e){var n=t+e;return n<-p?n+=d:n>+p&&(n-=d),n}var Be={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=s-f/2?this.face=Ae.TOP:this.lat0<=-(s-f/2)?this.face=Ae.BOTTOM:Math.abs(this.long0)<=f?this.face=Ae.FRONT:Math.abs(this.long0)<=s+f?this.face=this.long0>0?Ae.RIGHT:Ae.LEFT:this.face=Ae.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,n,r,i,o,a,u={x:0,y:0},l={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,n=t.x,this.face===Ae.TOP)i=s-e,n>=f&&n<=s+f?(l.value=je.AREA_0,r=n-s):n>s+f||n<=-(s+f)?(l.value=je.AREA_1,r=n>0?n-p:n+p):n>-(s+f)&&n<=-f?(l.value=je.AREA_2,r=n+s):(l.value=je.AREA_3,r=n);else if(this.face===Ae.BOTTOM)i=s+e,n>=f&&n<=s+f?(l.value=je.AREA_0,r=-n+s):n=-f?(l.value=je.AREA_1,r=-n):n<-f&&n>=-(s+f)?(l.value=je.AREA_2,r=-n-s):(l.value=je.AREA_3,r=n>0?-n+p:-n-p);else{var c,h,d,g,y,v;this.face===Ae.RIGHT?n=Fe(n,+s):this.face===Ae.BACK?n=Fe(n,+p):this.face===Ae.LEFT&&(n=Fe(n,-s)),g=Math.sin(e),y=Math.cos(e),v=Math.sin(n),c=y*Math.cos(n),h=y*v,d=g,this.face===Ae.FRONT?r=De(i=Math.acos(c),d,h,l):this.face===Ae.RIGHT?r=De(i=Math.acos(h),d,-c,l):this.face===Ae.BACK?r=De(i=Math.acos(-c),d,-h,l):this.face===Ae.LEFT?r=De(i=Math.acos(-h),d,c,l):(i=r=0,l.value=je.AREA_0)}return a=Math.atan(12/p*(r+Math.acos(Math.sin(r)*Math.cos(f))-s)),o=Math.sqrt((1-Math.cos(i))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(r))))),l.value===je.AREA_1?a+=s:l.value===je.AREA_2?a+=p:l.value===je.AREA_3&&(a+=1.5*p),u.x=o*Math.cos(a),u.y=o*Math.sin(a),u.x=u.x*this.a+this.x0,u.y=u.y*this.a+this.y0,t.x=u.x,t.y=u.y,t},inverse:function(t){var e,n,r,i,o,a,u,l,c,h,f,d,g={lam:0,phi:0},y={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,n=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?y.value=je.AREA_0:t.y>=0&&t.y>=Math.abs(t.x)?(y.value=je.AREA_1,e-=s):t.x<0&&-t.x>=Math.abs(t.y)?(y.value=je.AREA_2,e=e<0?e+p:e-p):(y.value=je.AREA_3,e+=s),c=p/12*Math.tan(e),o=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),a=Math.atan(o),(u=1-(r=Math.cos(e))*r*(i=Math.tan(n))*i*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?u=-1:u>1&&(u=1),this.face===Ae.TOP)l=Math.acos(u),g.phi=s-l,y.value===je.AREA_0?g.lam=a+s:y.value===je.AREA_1?g.lam=a<0?a+p:a-p:y.value===je.AREA_2?g.lam=a-s:g.lam=a;else if(this.face===Ae.BOTTOM)l=Math.acos(u),g.phi=l-s,y.value===je.AREA_0?g.lam=-a+s:y.value===je.AREA_1?g.lam=-a:y.value===je.AREA_2?g.lam=-a-s:g.lam=a<0?-a-p:-a+p;else{var v,m,_;c=(v=u)*v,m=(c+=(_=c>=1?0:Math.sqrt(1-c)*Math.sin(a))*_)>=1?0:Math.sqrt(1-c),y.value===je.AREA_1?(c=m,m=-_,_=c):y.value===je.AREA_2?(m=-m,_=-_):y.value===je.AREA_3&&(c=m,m=_,_=-c),this.face===Ae.RIGHT?(c=v,v=-m,m=c):this.face===Ae.BACK?(v=-v,m=-m):this.face===Ae.LEFT&&(c=v,v=m,m=-c),g.phi=Math.acos(-_)-s,g.lam=Math.atan2(m,v),this.face===Ae.RIGHT?g.lam=Fe(g.lam,-s):this.face===Ae.BACK?g.lam=Fe(g.lam,-p):this.face===Ae.LEFT&&(g.lam=Fe(g.lam,+s))}return 0!==this.es&&(h=g.phi<0?1:0,f=Math.tan(g.phi),d=this.b/Math.sqrt(f*f+this.one_minus_f_squared),g.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),h&&(g.phi=-g.phi)),g.lam+=this.long0,t.x=g.lam,t.y=g.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Ge=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],qe=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ue=.8487,ze=1.3523,Ve=h/5,Ye=1/Ve,We=18,Xe=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))},He=function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])};var Je={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=B(t.x-this.long0),n=Math.abs(t.y),r=Math.floor(n*Ve);r<0?r=0:r>=We&&(r=We-1),n=h*(n-Ye*r);var i={x:Xe(Ge[r],n)*e,y:Xe(qe[r],n)};return t.y<0&&(i.y=-i.y),i.x=i.x*this.a*Ue+this.x0,i.y=i.y*this.a*ze+this.y0,i},inverse:function(t){var e={x:(t.x-this.x0)/(this.a*Ue),y:Math.abs(t.y-this.y0)/(this.a*ze)};if(e.y>=1)e.x/=Ge[We][0],e.y=t.y<0?-s:s;else{var n=Math.floor(e.y*We);for(n<0?n=0:n>=We&&(n=We-1);;)if(qe[n][0]>e.y)--n;else{if(!(qe[n+1][0]<=e.y))break;++n}var r=qe[n],i=5*(e.y-r[0])/(qe[n+1][0]-r[0]);i=function(t,e,n,r){for(var i=e;r;--r){var s=t(i);if(i-=s,Math.abs(s)1&&void 0!==arguments[1]?arguments[1]:{},i=(r.dbf||{}).encoding,s=new m({encoding:void 0===i?"latin1":i});s.write(t),s.end();var o=s.result,a=o.data,u=o.schema;switch((null==r||null===(e=r.tables)||void 0===e?void 0:e.format)||(null==r||null===(n=r.dbf)||void 0===n?void 0:n.shape)){case"object-row-table":return{shape:"object-row-table",schema:u,data:a};case"table":return{schema:u,rows:a};default:return a}},e.parseDBFInBatches=function(t){return _.apply(this,arguments)};var i=r(n(21)),s=r(n(22)),o=r(n(23)),a=r(n(2)),u=r(n(30)),l=r(n(31)),c=n(66),h=r(n(118));function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:{};return i.default.mark((function n(){var r,s,o,a,l,c,h,f,p,g;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=e.dbf||{},s=r.encoding,o=new m({encoding:void 0===s?"latin1":s}),a=!1,l=!1,c=!1,n.prev=5,f=d(t);case 7:return n.next=9,(0,u.default)(f.next());case 9:if(!(l=!(p=n.sent).done)){n.next=23;break}if(g=p.value,o.write(g),a||!o.result.dbfHeader){n.next=16;break}return a=!0,n.next=16,o.result.dbfHeader;case 16:if(!(o.result.data.length>0)){n.next=20;break}return n.next=19,o.result.data;case 19:o.result.data=[];case 20:l=!1,n.next=7;break;case 23:n.next=29;break;case 25:n.prev=25,n.t0=n.catch(5),c=!0,h=n.t0;case 29:if(n.prev=29,n.prev=30,!l||null==f.return){n.next=34;break}return n.next=34,(0,u.default)(f.return());case 34:if(n.prev=34,!c){n.next=37;break}throw h;case 37:return n.finish(34);case 38:return n.finish(29);case 39:if(o.end(),!(o.result.data.length>0)){n.next=43;break}return n.next=43,o.result.data;case 43:case"end":return n.stop()}}),n,null,[[5,25,29,39],[30,,34,38]])}))()})),_.apply(this,arguments)}function b(t,e,n,r){for(;;)try{switch(t){case v.ERROR:case v.END:return t;case v.START:var i=n.getDataView(y);if(!i)return t;e.dbfHeader={year:(p=i).getUint8(1)+1900,month:p.getUint8(2),day:p.getUint8(3),nRecords:p.getUint32(4,g),headerLength:p.getUint16(8,g),recordLength:p.getUint16(10,g),languageDriver:p.getUint8(29)},e.progress={bytesUsed:0,rowsTotal:e.dbfHeader.nRecords,rows:0},t=v.FIELD_DESCRIPTORS;break;case v.FIELD_DESCRIPTORS:var s=n.getDataView(e.dbfHeader.headerLength-y);if(!s)return t;e.dbfFields=x(s,r),e.schema=new c.Schema(e.dbfFields.map((function(t){return I(t)}))),t=v.FIELD_PROPERTIES,n.skip(1);break;case v.FIELD_PROPERTIES:for(var o=(null==e?void 0:e.dbfHeader)||{},a=o.recordLength,u=void 0===a?0:a,l=o.nRecords,h=void 0===l?0:l;e.data.length=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw s}}}}(e);try{for(o.s();!(r=o.n()).done;){var a=r.value,u=n.decode(new Uint8Array(t.buffer,t.byteOffset+s,a.fieldLength));i[a.name]=w(u,a.dataType),s+=a.fieldLength}}catch(t){o.e(t)}finally{o.f()}return i}function w(t,e){switch(e){case"B":case"F":case"N":case"O":return function(t){var e=parseFloat(t);return isNaN(e)?null:e}(t);case"C":return function(t){return t.trim()||null}(t);case"D":return r=t,Date.UTC(r.slice(0,4),parseInt(r.slice(4,6),10)-1,r.slice(6,8));case"L":return!/^[nf]$/i.test(n=t)&&(!!/^[yt]$/i.test(n)||null);default:throw new Error("Unsupported data type")}var n,r}function I(t){var e=t.name,n=t.dataType;switch(t.fieldLength,t.decimal,n){case"B":case"F":case"N":case"O":return new c.Field(e,new c.Float64,!0);case"C":return new c.Field(e,new c.Utf8,!0);case"D":return new c.Field(e,new c.TimestampMillisecond,!0);case"L":return new c.Field(e,new c.Bool,!0);default:throw new Error("Unsupported data type")}}},function(t,e,n){"use strict";n.r(e),n.d(e,"GeoUploadWizard",(function(){return geo_upload_wizard_GeoUploadWizard})),n.d(e,"IndexNameForm",(function(){return index_name_form_IndexNameForm})),n.d(e,"importerFactory",(function(){return $}));var r=n(2),i=n.n(r),s=n(5),o=n.n(s),a=n(14),u=n(6),l=n(15),c=n(4),h=n(0),f=n(171),d=n(75),p=n(16),g=n.n(p),y=n(17),v=n.n(y);const m=1e6;class importer_Importer{constructor(){i()(this,"_docArray",[]),i()(this,"_chunkSize",5e3)}read(t){const e=new TextDecoder,n=100*h.f,r=Math.ceil(t.byteLength/n);let i=0;for(let s=0;svoid 0!==t.date&&"{{ event.timezone }}"===t.date.timezone));e&&(e.date.timezone=v.a.tz.guess())}}(r),function(t){const e=t=>{const n=[];return Object.entries(t).forEach((([t,r])=>{n.push(t),((t,e=[])=>"object"==typeof t&&null!==t&&Object.keys(t).length>0&&(0===e.length||e.every((e=>({}.hasOwnProperty.call(t,e))))))(r)&&n.push(...e(r))})),n},n=e(t);return 0!==Object(p.intersection)(["inference","enrich"],n).length}(r)&&(this._chunkSize=100);const i=void 0!==r?{id:`${t}-pipeline`,pipeline:r}:{};return await b({id:void 0,index:t,data:[],settings:e,mappings:n,ingestPipeline:i})}async import(t,e,n,r){if(!t||!e)return{success:!1,error:a.i18n.translate("xpack.fileUpload.import.noIdOrIndexSuppliedErrorMessage",{defaultMessage:"no ID or index supplied"})};const i=function(t,e){const n=[],r=Object(p.chunk)(t,e);for(let t=0;tm){const t=Math.floor(m/s*i),r=Object(p.chunk)(e,t);n.push(...r)}else n.push(e)}return n}(this._docArray,this._chunkSize),s={id:n};let o=!0;const u=[];let l;for(let n=0;n0;)try{c=await b({id:t,index:e,data:i[n],settings:{},mappings:{},ingestPipeline:s}),a<5&&console.log("Retrying import "+(5-a)),a--}catch(t){c.success=!1,c.error=t,a=0}if(!c.success){console.error(c),o=!1,l=c.error,_(c,u,n,this._chunkSize);break}r((n+1)/i.length*100),_(c,u,n,this._chunkSize)}const c={success:o,failures:u,docCount:this._docArray.length};return o?r(100):c.error=l,c}}function _(t,e,n,r){if(t.failures&&t.failures.length){for(let e=0;e0||this._hasNext)&&this._isActive;){if(await this._readUntil(void 0,L),!this._isActive)return{success:!1,failures:o};if(void 0!==l){const t=await l;if(l=void 0,t.failures&&o.push(...t.failures),!t.success){s=!1,u=t.error;break}}const a=P(this._features,this._geoFieldType,i),c=this._blockSizeInBytes;this._features=[],this._blockSizeInBytes=0,l=this._importBlock(t,e,n,a,c,r)}if(l){const t=await l;t.failures&&o.push(...t.failures),t.success||(s=!1,u=t.error)}return r(100),{success:s,failures:o,docCount:this._totalFeaturesRead,error:u}}async _importBlock(t,e,n,r,i,s){let o=!0;const a=[];let u;for(let l=0;l0;)try{if(h=await b({id:t,index:e,data:r[l],settings:{},mappings:{},ingestPipeline:{id:n}}),!this._isActive)return{success:!1,failures:a};c<5&&console.log("Retrying import "+(5-c)),c--}catch(t){h.success=!1,h.error=t,c=0}if(h.failures&&h.failures.length){for(let t=0;tN(t)))],t.geometryTypesMap.forEach(((t,e)=>{this._geometryTypesMap.set(e,t)})),this._invalidFeatures=[...this._invalidFeatures,...t.invalidFeatures],this._totalBytesRead=this._totalBytesRead+t.bytesRead,this._totalFeaturesRead=this._totalFeaturesRead+t.features.length+t.invalidFeatures.length}}_readNext(t,e){throw new Error("Should implement AbstractGeoFileImporter._next")}_getProgress(t,e){return e/this._file.size*100}_getIsActive(){return this._isActive}_getFile(){return this._file}read(t){throw new Error("read(data: ArrayBuffer) not supported, use previewFile and import instead.")}_createDocs(t){throw new Error("_createDocs not implemented.")}}const T=[".json",".geojson"],R=["EPSG:4326","urn:ogc:def:crs:OGC:1.3:CRS84"];class geojson_importer_GeoJsonImporter extends abstract_geo_file_importer_AbstractGeoFileImporter{constructor(...t){super(...t),i()(this,"_iterator",void 0),i()(this,"_prevBatchLastFeature",void 0)}async _readNext(t,e){var n;let r=t;const i={bytesRead:0,features:[],geometryTypesMap:new Map,invalidFeatures:[],hasNext:!0};if(void 0===this._iterator&&(this._iterator=(await Object(d.loadInBatches)(this._getFile(),f.JSONLoader,{metadata:!0,json:{jsonpaths:["$.features"]}}))[Symbol.asyncIterator]()),!this._getIsActive()||!this._iterator)return i.hasNext=!1,i;const{value:s,done:o}=await this._iterator.next();if(!this._getIsActive()||o||void 0===s)return i.hasNext=!1,i;if("metadata"===s.batchType)return i;if("object"==typeof(null===(n=s.container)||void 0===n?void 0:n.crs)){var u,l;const t=s.container.crs;if("link"===(null==t?void 0:t.type)||"name"===(null==t?void 0:t.type)&&!R.includes(null!==(u=null==t||null===(l=t.properties)||void 0===l?void 0:l.name)&&void 0!==u?u:""))throw new Error(a.i18n.translate("xpack.fileUpload.geojsonImporter.unsupportedCrs",{defaultMessage:"Unsupported coordinate reference system, expecting {supportedCrsList}",values:{supportedCrsList:R.join(", ")}}))}s.bytesUsed&&(i.bytesRead=s.bytesUsed-e);const c=this._prevBatchLastFeature?[this._prevBatchLastFeature]:[];this._prevBatchLastFeature=void 0;const h="final-result"===s.batchType;h?0===r&&0===c.length&&s.container&&c.push(s.container):s.data&&c.push(...s.data);for(let t=0;t1&&e.pop(),e.join(".")}class side_car_file_picker_SideCarFilePicker extends s.Component{constructor(...t){super(...t),i()(this,"state",{error:"",isInvalid:!1}),i()(this,"_onSelect",(t=>{if(!t||0===t.length)return this.setState({error:"",isInvalid:!1}),void this.props.onSelect(null);const e=t[0];if(!this._isSideCarFileValid(e))return this.setState({error:this._getSideCarFileNameError(),isInvalid:!0}),void this.props.onSelect(null);this.setState({error:"",isInvalid:!1}),this.props.onSelect(e)}))}_isSideCarFileValid(t){return j(this.props.shapefileName)===j(t.name)}_getSideCarFileNameError(){return a.i18n.translate("xpack.fileUpload.shapefile.sideCarFilePicker.error",{defaultMessage:"{ext} expected to be {shapefileName}{ext}",values:{ext:this.props.ext,shapefileName:j(this.props.shapefileName)}})}render(){return Object(A.jsx)(u.EuiFormRow,{isInvalid:this.state.isInvalid,error:this.state.error},Object(A.jsx)(u.EuiFilePicker,{initialPromptText:a.i18n.translate("xpack.fileUpload.shapefile.sideCarFilePicker.promptText",{defaultMessage:"Select '{ext}' file",values:{ext:this.props.ext}}),onChange:this._onSelect,accept:this.props.ext,display:"default",isInvalid:this.state.isInvalid,"data-test-subj":`shapefileSideCarFilePicker${this.props.ext.replace(".","_")}`}))}}function D(t){return Object(A.jsx)(o.a.Fragment,null,Object(A.jsx)(side_car_file_picker_SideCarFilePicker,{ext:".dbf",onSelect:t.onDbfSelect,shapefileName:t.shapefileName}),Object(A.jsx)(side_car_file_picker_SideCarFilePicker,{ext:".prj",onSelect:t.onPrjSelect,shapefileName:t.shapefileName}),Object(A.jsx)(side_car_file_picker_SideCarFilePicker,{ext:".shx",onSelect:t.onShxSelect,shapefileName:t.shapefileName}))}class shapefile_importer_ShapefileImporter extends abstract_geo_file_importer_AbstractGeoFileImporter{constructor(...t){super(...t),i()(this,"_tableRowCount",null),i()(this,"_dbfFile",null),i()(this,"_prjFile",null),i()(this,"_shxFile",null),i()(this,"_iterator",void 0)}canPreview(){return null!==this._dbfFile&&null!==this._prjFile&&null!==this._shxFile}renderEditor(t){return this.canPreview()?null:Object(A.jsx)(D,{shapefileName:this._getFile().name,onDbfSelect:e=>{this._dbfFile=e,t()},onPrjSelect:e=>{this._prjFile=e,t()},onShxSelect:e=>{this._shxFile=e,t()}})}async _setTableRowCount(){if(!this._dbfFile)return;const t=(await Object(d.loadInBatches)(this._dbfFile,k.DBFLoader,{metadata:!1,dbf:{encoding:"latin1"}}))[Symbol.asyncIterator](),{value:e}=await t.next();e.nRecords&&"number"==typeof e.nRecords&&(this._tableRowCount=e.nRecords)}_getProgress(t,e){return null===this._tableRowCount||0===this._tableRowCount?0:t>this._tableRowCount?100:t/this._tableRowCount*100}async _readNext(t,e){const n={bytesRead:0,features:[],geometryTypesMap:new Map,invalidFeatures:[],hasNext:!0};if(void 0===this._iterator){const t=[];this._dbfFile&&t.push(this._dbfFile),this._prjFile&&t.push(this._prjFile),this._shxFile&&t.push(this._shxFile);const e=new d._BrowserFileSystem([this._getFile(),...t]);this._iterator=await Object(d.loadInBatches)(this._getFile().name,k.ShapefileLoader,{fetch:e.fetch,gis:{reproject:!0,_targetCrs:"EPSG:4326"},shp:{_maxDimensions:2},metadata:!1}),await this._setTableRowCount()}const{value:r,done:i}=await this._iterator.next();if(!this._getIsActive()||i)return n.hasNext=!1,n;for(let t=0;t{if(this.props.onClear(),this.setState({defaultIndexName:null,error:null,isLoadingPreview:!1,importer:null,previewSummary:null}),t&&t.length){const e=t[0];try{const t=function(t){!function(t,e,n){if(t.size>Object(F.a)()&&null!=n&&n.checkSizeLimit)throw new Error(a.i18n.translate("xpack.fileUpload.fileSizeError",{defaultMessage:"File size {fileSize} exceeds maximum file size of {maxFileSize}",values:{fileSize:G(t.size),maxFileSize:Object(F.b)()}}));if(!t.name)throw new Error(a.i18n.translate("xpack.fileUpload.noFileNameError",{defaultMessage:"File name not provided"}));if(!e.includes(B(t)))throw new Error(a.i18n.translate("xpack.fileUpload.fileTypeError",{defaultMessage:"File is not one of acceptable types: {types}",values:{types:e.join(", ")}}))}(t,q,U);const e=B(t);return T.includes(e)?new geojson_importer_GeoJsonImporter(t):new shapefile_importer_ShapefileImporter(t)}(e);this.setState({defaultIndexName:e.name.split(".")[0].toLowerCase(),importer:t},this._loadFilePreview)}catch(t){this.setState({error:t.message})}}})),i()(this,"_loadFilePreview",(async()=>{if(!this.state.importer||!this.state.importer.canPreview())return;this.setState({isLoadingPreview:!0});let t=null,e=null;try{e=await this.state.importer.previewFile(1e4,3*h.f),0===e.features.length&&(t=a.i18n.translate("xpack.fileUpload.geoFilePicker.noFeaturesDetected",{defaultMessage:"No features found in selected file."}))}catch(e){t=e.message}this._isMounted&&(this.setState({error:t,isLoadingPreview:!1,previewSummary:!t&&e?a.i18n.translate("xpack.fileUpload.geoFilePicker.previewSummary",{defaultMessage:"Previewing {numFeatures} features, {previewCoverage}% of file.",values:{numFeatures:e.features.length,previewCoverage:e.previewCoverage}}):null}),e&&this.props.onSelect({...e,importer:this.state.importer,indexName:this.state.defaultIndexName?this.state.defaultIndexName:"features"}))}))}async componentDidMount(){this._isMounted=!0}componentWillUnmount(){this._isMounted=!1}_renderHelpText(){return null!==this.state.previewSummary?this.state.previewSummary:Object(A.jsx)("span",null,a.i18n.translate("xpack.fileUpload.geoFilePicker.acceptedFormats",{defaultMessage:"Formats accepted: {fileTypes}",values:{fileTypes:q.join(", ")}}))}_renderImporterEditor(){return this.state.importer?this.state.importer.renderEditor(this._loadFilePreview):null}render(){return Object(A.jsx)(o.a.Fragment,null,Object(A.jsx)(u.EuiFormRow,{isInvalid:!!this.state.error,error:this.state.error?[this.state.error]:[],helpText:this._renderHelpText()},Object(A.jsx)(u.EuiFilePicker,{initialPromptText:a.i18n.translate("xpack.fileUpload.geoFilePicker.filePicker",{defaultMessage:"Select or drag and drop a file"}),onChange:this._onFileSelect,accept:q.join(","),isLoading:this.state.isLoadingPreview,"data-test-subj":"geoFilePicker"})),this._renderImporterEditor())}}var z=n(1);const V=async t=>t?function(t){const e=encodeURI(t).split(/%(?:u[0-9A-F]{2})?[0-9A-F]{2}|./).length-1,n=new RegExp('[\\\\/*?"<>|\\s,#]+');return!(e>255||t!==t.toLowerCase()||"."===t||".."===t||null!==t.match(/^[-_+]/)||null!==t.match(n))}(t)?(await Object(c.a)().getTitles()).includes(t)?a.i18n.translate("xpack.fileUpload.dataViewAlreadyExistsErrorMessage",{defaultMessage:"Data view already exists."}):await Object(z.d)(t)?a.i18n.translate("xpack.fileUpload.indexNameAlreadyExistsErrorMessage",{defaultMessage:"Index name already exists."}):void 0:a.i18n.translate("xpack.fileUpload.indexNameContainsIllegalCharactersErrorMessage",{defaultMessage:"Index name contains illegal characters."}):a.i18n.translate("xpack.fileUpload.indexNameRequired",{defaultMessage:"Index name required"});class index_name_form_IndexNameForm extends s.Component{constructor(...t){super(...t),i()(this,"_isMounted",!1),i()(this,"_onIndexNameChange",(t=>{const e=t.target.value;this.props.onIndexNameChange(e),this._validateIndexName(e),this.props.onIndexNameValidationStart()})),i()(this,"_validateIndexName",g.a.debounce((async t=>{const e=await V(t);this._isMounted&&t===this.props.indexName&&(this.props.onIndexNameValidationEnd(),this.props.onIndexNameChange(t,e))}),500))}componentDidMount(){this._isMounted=!0}componentWillUnmount(){this._isMounted=!1}render(){const t=[...this.props.indexNameError?[this.props.indexNameError]:[]];return Object(A.jsx)(o.a.Fragment,null,Object(A.jsx)(u.EuiFormRow,{label:a.i18n.translate("xpack.fileUpload.indexNameForm.enterIndexNameLabel",{defaultMessage:"Index name"}),isInvalid:!!t.length,error:t},Object(A.jsx)(u.EuiFieldText,{"data-test-subj":"fileUploadIndexNameInput",value:this.props.indexName,onChange:this._onIndexNameChange,isInvalid:!!t.length,"aria-label":a.i18n.translate("xpack.fileUpload.indexNameForm.indexNameReqField",{defaultMessage:"Index name, required field"})})),Object(A.jsx)(u.EuiSpacer,{size:"m"}),Object(A.jsx)(u.EuiCallOut,{title:a.i18n.translate("xpack.fileUpload.indexNameForm.indexNameGuidelines",{defaultMessage:"Index name guidelines"}),size:"s"},Object(A.jsx)("ul",{style:{marginBottom:0}},Object(A.jsx)("li",null,a.i18n.translate("xpack.fileUpload.indexNameForm.guidelines.mustBeNewIndex",{defaultMessage:"Must be a new index"})),Object(A.jsx)("li",null,a.i18n.translate("xpack.fileUpload.indexNameForm.guidelines.lowercaseOnly",{defaultMessage:"Lowercase only"})),Object(A.jsx)("li",null,a.i18n.translate("xpack.fileUpload.indexNameForm.guidelines.cannotInclude",{defaultMessage:'Cannot include \\\\, /, *, ?, ", <, >, |, " " (space character), , (comma), #'})),Object(A.jsx)("li",null,a.i18n.translate("xpack.fileUpload.indexNameForm.guidelines.cannotStartWith",{defaultMessage:"Cannot start with -, _, +"})),Object(A.jsx)("li",null,a.i18n.translate("xpack.fileUpload.indexNameForm.guidelines.cannotBe",{defaultMessage:"Cannot be . or .."})),Object(A.jsx)("li",null,a.i18n.translate("xpack.fileUpload.indexNameForm.guidelines.length",{defaultMessage:"Cannot be longer than 255 bytes (note it is bytes, so multi-byte characters will count towards the 255 limit faster)"})))))}}const Y=[{text:l.ES_FIELD_TYPES.GEO_POINT,value:l.ES_FIELD_TYPES.GEO_POINT},{text:l.ES_FIELD_TYPES.GEO_SHAPE,value:l.ES_FIELD_TYPES.GEO_SHAPE}];class geo_upload_form_GeoUploadForm extends s.Component{constructor(...t){super(...t),i()(this,"_isMounted",!1),i()(this,"state",{hasFile:!1,isPointsOnly:!1}),i()(this,"_onFileSelect",(async t=>{this.setState({hasFile:!0,isPointsOnly:t.hasPoints&&!t.hasShapes}),this.props.onFileSelect(t),this.props.onIndexNameValidationStart();const e=await V(t.indexName);if(!this._isMounted)return;this.props.onIndexNameValidationEnd(),this.props.onIndexNameChange(t.indexName,e);const n=t.hasPoints&&!t.hasShapes?l.ES_FIELD_TYPES.GEO_POINT:l.ES_FIELD_TYPES.GEO_SHAPE;this.props.onGeoFieldTypeSelect(n)})),i()(this,"_onFileClear",(()=>{this.setState({hasFile:!1,isPointsOnly:!1}),this.props.onFileClear(),this.props.onIndexNameChange("")})),i()(this,"_onGeoFieldTypeSelect",(t=>this.props.onGeoFieldTypeSelect(t.target.value))),i()(this,"_onSmallChunksChange",(t=>{this.props.onSmallChunksChange(t.target.checked)}))}componentDidMount(){this._isMounted=!0}componentWillUnmount(){this._isMounted=!1}_renderGeoFieldTypeSelect(){return this.state.hasFile&&this.state.isPointsOnly?Object(A.jsx)(u.EuiFormRow,{label:a.i18n.translate("xpack.fileUpload.indexSettings.enterIndexTypeLabel",{defaultMessage:"Index type"})},Object(A.jsx)(u.EuiSelect,{"data-test-subj":"fileImportIndexSelect",options:Y,value:this.props.geoFieldType,onChange:this._onGeoFieldTypeSelect})):null}render(){return Object(A.jsx)(u.EuiForm,null,Object(A.jsx)(geo_file_picker_GeoFilePicker,{onSelect:this._onFileSelect,onClear:this._onFileClear}),this._renderGeoFieldTypeSelect(),this.state.hasFile?Object(A.jsx)(o.a.Fragment,null,Object(A.jsx)(index_name_form_IndexNameForm,{indexName:this.props.indexName,indexNameError:this.props.indexNameError,onIndexNameChange:this.props.onIndexNameChange,onIndexNameValidationStart:this.props.onIndexNameValidationStart,onIndexNameValidationEnd:this.props.onIndexNameValidationEnd}),Object(A.jsx)(u.EuiSpacer,{size:"m"}),Object(A.jsx)(u.EuiFormRow,{display:"columnCompressedSwitch"},Object(A.jsx)(u.EuiToolTip,{position:"top",content:a.i18n.translate("xpack.fileUpload.smallChunks.tooltip",{defaultMessage:"Use to alleviate request timeout failures."})},Object(A.jsx)(u.EuiSwitch,{label:a.i18n.translate("xpack.fileUpload.smallChunks.switchLabel",{defaultMessage:"Upload file in smaller chunks"}),checked:this.props.smallChunks,onChange:this._onSmallChunksChange,compressed:!0})))):null)}}var W=n(18),X=n(19);function H(t,e){const n="number"==typeof e?a.i18n.translate("xpack.fileUpload.geoUploadWizard.outOfTotalMsg",{defaultMessage:"of {totalFeaturesCount}",values:{totalFeaturesCount:e}}):"";return a.i18n.translate("xpack.fileUpload.geoUploadWizard.partialImportMsg",{defaultMessage:"Unable to index {failedFeaturesCount} {outOfTotalMsg} features.",values:{failedFeaturesCount:t,outOfTotalMsg:n}})}const J={uiSettings:Object(c.f)(),settings:Object(c.d)(),theme:Object(c.e)()},Z="fileUploadStatusCallout";class import_complete_view_ImportCompleteView extends s.Component{_renderCodeEditor(t,e,n){if(!t)return null;const r=JSON.stringify(t,null,2);return Object(A.jsx)(s.Fragment,null,Object(A.jsx)(u.EuiFlexGroup,{justifyContent:"spaceBetween",alignItems:"flexEnd"},Object(A.jsx)(u.EuiFlexItem,{grow:!1},Object(A.jsx)(u.EuiTitle,{size:"xxs"},Object(A.jsx)("h4",null,e))),Object(A.jsx)(u.EuiFlexItem,{grow:!1},Object(A.jsx)(u.EuiCopy,{textToCopy:r},(t=>Object(A.jsx)(u.EuiButtonIcon,{size:"s",onClick:t,iconType:"copy",color:"text","data-test-subj":n,"aria-label":a.i18n.translate("xpack.fileUpload.importComplete.copyButtonAriaLabel",{defaultMessage:"Copy to clipboard"})}))))),Object(A.jsx)("div",{style:{height:"200px"}},Object(A.jsx)(X.CodeEditor,{languageId:"json",value:r,options:{readOnly:!0,lineNumbers:"off",fontSize:12,minimap:{enabled:!1},scrollBeyondLastLine:!1,wordWrap:"on",wrappingIndent:"indent",automaticLayout:!0}})),Object(A.jsx)(u.EuiSpacer,{size:"m"}))}_getStatusMsg(){var t;if(this.props.failedPermissionCheck)return Object(A.jsx)(u.EuiCallOut,{title:a.i18n.translate("xpack.fileUpload.importComplete.uploadFailureTitle",{defaultMessage:"Unable to upload file"}),color:"danger",iconType:"warning","data-test-subj":Z},Object(A.jsx)("p",null,a.i18n.translate("xpack.fileUpload.importComplete.permissionFailureMsg",{defaultMessage:'You do not have permission to create or import data into index "{indexName}".',values:{indexName:this.props.indexName}})),Object(A.jsx)(u.EuiLink,{href:Object(c.b)().links.maps.importGeospatialPrivileges,target:"_blank",external:!0},a.i18n.translate("xpack.fileUpload.importComplete.permission.docLink",{defaultMessage:"View file import permissions"})));if(!this.props.importResults||!this.props.importResults.success){var e,n,r,i,s,o;let t;null!==(e=this.props.importResults)&&void 0!==e&&null!==(n=e.error)&&void 0!==n&&null!==(r=n.body)&&void 0!==r&&r.message?t=this.props.importResults.error.body.message:null!==(i=this.props.importResults)&&void 0!==i&&null!==(s=i.error)&&void 0!==s&&null!==(o=s.error)&&void 0!==o&&o.reason&&(t=this.props.importResults.error.error.reason);const l=t?a.i18n.translate("xpack.fileUpload.importComplete.uploadFailureMsgErrorBlock",{defaultMessage:"Error: {reason}",values:{reason:t}}):"";return Object(A.jsx)(u.EuiCallOut,{title:a.i18n.translate("xpack.fileUpload.importComplete.uploadFailureTitle",{defaultMessage:"Unable to upload file"}),color:"danger",iconType:"warning","data-test-subj":Z},Object(A.jsx)("p",null,l))}return null!==(t=this.props.importResults.failures)&&void 0!==t&&t.length?Object(A.jsx)(u.EuiCallOut,{title:a.i18n.translate("xpack.fileUpload.importComplete.uploadSuccessWithFailuresTitle",{defaultMessage:"File upload complete with failures"}),color:"warning",iconType:"help","data-test-subj":Z},Object(A.jsx)("p",null,H(this.props.importResults.failures.length,this.props.importResults.docCount))):Object(A.jsx)(u.EuiCallOut,{title:a.i18n.translate("xpack.fileUpload.importComplete.uploadSuccessTitle",{defaultMessage:"File upload complete"}),"data-test-subj":Z},Object(A.jsx)("p",null,a.i18n.translate("xpack.fileUpload.importComplete.uploadSuccessMsg",{defaultMessage:"Indexed {numFeatures} features.",values:{numFeatures:this.props.importResults.docCount}})))}_renderIndexManagementMsg(){return this.props.importResults&&this.props.importResults.success?Object(A.jsx)(u.EuiText,null,Object(A.jsx)("p",null,Object(A.jsx)(W.FormattedMessage,{id:"xpack.fileUpload.importComplete.indexModsMsg",defaultMessage:"To modify the index, go to "}),Object(A.jsx)("a",{"data-test-subj":"indexManagementNewIndexLink",target:"_blank",href:Object(c.c)().basePath.prepend("/app/management/kibana/dataViews")},Object(A.jsx)(W.FormattedMessage,{id:"xpack.fileUpload.importComplete.indexMgmtLink",defaultMessage:"Index Management."})))):null}render(){return Object(A.jsx)(X.KibanaContextProvider,{services:J},this._getStatusMsg(),this._renderCodeEditor(this.props.importResults,a.i18n.translate("xpack.fileUpload.importComplete.indexingResponse",{defaultMessage:"Import response"}),"indexRespCopyButton"),this._renderCodeEditor(this.props.dataViewResp,a.i18n.translate("xpack.fileUpload.importComplete.dataViewResponse",{defaultMessage:"Data view response"}),"dataViewRespCopyButton"),this._renderIndexManagementMsg())}}var Q;function K(t){return a.i18n.translate("xpack.fileUpload.geoUploadWizard.writingToIndex",{defaultMessage:"Writing to index: {progress}% complete",values:{progress:t}})}!function(t){t.CONFIGURE="CONFIGURE",t.IMPORT="IMPORT",t.COMPLETE="COMPLETE"}(Q||(Q={}));class geo_upload_wizard_GeoUploadWizard extends s.Component{constructor(...t){super(...t),i()(this,"_geoFileImporter",void 0),i()(this,"_isMounted",!1),i()(this,"state",{failedPermissionCheck:!1,geoFieldType:l.ES_FIELD_TYPES.GEO_SHAPE,importStatus:"",indexName:"",phase:Q.CONFIGURE,smallChunks:!1}),i()(this,"_import",(async()=>{var t;if(!this._geoFileImporter)return;const e=await Object(z.f)({checkCreateDataView:!0,checkHasManagePipeline:!1,indexName:this.state.indexName});if(!this._isMounted)return;if(!e)return this.setState({phase:Q.COMPLETE,failedPermissionCheck:!0}),void this.props.onUploadError();const n={properties:{geometry:{type:this.state.geoFieldType}}};this.setState({importStatus:a.i18n.translate("xpack.fileUpload.geoUploadWizard.dataIndexingStarted",{defaultMessage:"Creating index: {indexName}",values:{indexName:this.state.indexName}}),phase:Q.IMPORT}),this._geoFileImporter.setGeoFieldType(this.state.geoFieldType);const r=await this._geoFileImporter.initializeImport(this.state.indexName,{number_of_shards:1},n,{description:"",processors:[]});if(!this._isMounted)return;if(void 0===r.index||void 0===r.id)return this.setState({phase:Q.COMPLETE,importResults:r}),void this.props.onUploadError();this.setState({importStatus:K(0)}),this._geoFileImporter.setSmallChunks(this.state.smallChunks);const i=await this._geoFileImporter.import(r.id,this.state.indexName,r.pipelineId,(t=>{this._isMounted&&this.setState({importStatus:K(t)})}));if(!this._isMounted)return;if(!i.success)return this.setState({importResults:i,importStatus:a.i18n.translate("xpack.fileUpload.geoUploadWizard.dataIndexingError",{defaultMessage:"Data indexing error"}),phase:Q.COMPLETE}),void this.props.onUploadError();if(i.docCount===(null===(t=i.failures)||void 0===t?void 0:t.length))return this.setState({importResults:{...i,success:!1,error:{error:{reason:H(i.failures.length,i.docCount)}}},phase:Q.COMPLETE}),void this.props.onUploadError();let s,o;this.setState({importResults:i,importStatus:a.i18n.translate("xpack.fileUpload.geoUploadWizard.creatingDataView",{defaultMessage:"Creating data view: {indexName}",values:{indexName:this.state.indexName}})});try{if(s=await Object(c.a)().createAndSave({title:this.state.indexName},!0),!s.id)throw new Error("id not provided");const t=s.fields.find((t=>[l.ES_FIELD_TYPES.GEO_POINT,l.ES_FIELD_TYPES.GEO_SHAPE].includes(t.type)));if(!t)throw new Error("geo field not created");o={indexPatternId:s.id,geoFieldName:t.name,geoFieldType:t.type,docCount:void 0!==i.docCount?i.docCount:0}}catch(t){return void(this._isMounted&&(this.setState({importStatus:a.i18n.translate("xpack.fileUpload.geoUploadWizard.dataViewError",{defaultMessage:"Unable to create data view"}),phase:Q.COMPLETE}),this.props.onUploadError()))}this._isMounted&&(this.setState({dataViewResp:{success:!0,id:s.id,fields:s.fields},phase:Q.COMPLETE,importStatus:""}),this.props.onUploadComplete(o))})),i()(this,"_onFileSelect",(({features:t,importer:e,indexName:n,previewCoverage:r})=>{this._geoFileImporter=e,this.props.onFileSelect({type:"FeatureCollection",features:t},n,r)})),i()(this,"_onFileClear",(()=>{this._geoFileImporter&&(this._geoFileImporter.destroy(),this._geoFileImporter=void 0),this.props.onFileClear()})),i()(this,"_onGeoFieldTypeSelect",(t=>{this.setState({geoFieldType:t})})),i()(this,"_onIndexNameChange",((t,e)=>{this.setState({indexName:t,indexNameError:e}),t&&void 0===e?this.props.enableImportBtn():this.props.disableImportBtn()})),i()(this,"_onSmallChunksChange",(t=>{this.setState({smallChunks:t})}))}componentDidMount(){this._isMounted=!0}componentWillUnmount(){this._isMounted=!1,this._geoFileImporter&&(this._geoFileImporter.destroy(),this._geoFileImporter=void 0)}componentDidUpdate(){this.props.isIndexingTriggered&&this.state.phase===Q.CONFIGURE&&this._import()}render(){return this.state.phase===Q.IMPORT?Object(A.jsx)(s.Fragment,null,Object(A.jsx)(u.EuiProgress,{size:"xs",color:"accent",position:"absolute"}),Object(A.jsx)(u.EuiText,null,Object(A.jsx)("p",null,this.state.importStatus))):this.state.phase===Q.COMPLETE?Object(A.jsx)(import_complete_view_ImportCompleteView,{importResults:this.state.importResults,dataViewResp:this.state.dataViewResp,indexName:this.state.indexName,failedPermissionCheck:this.state.failedPermissionCheck}):Object(A.jsx)(geo_upload_form_GeoUploadForm,{geoFieldType:this.state.geoFieldType,indexName:this.state.indexName,indexNameError:this.state.indexNameError,onFileClear:this._onFileClear,onFileSelect:this._onFileSelect,smallChunks:this.state.smallChunks,onGeoFieldTypeSelect:this._onGeoFieldTypeSelect,onIndexNameChange:this._onIndexNameChange,onIndexNameValidationStart:this.props.disableImportBtn,onIndexNameValidationEnd:this.props.enableImportBtn,onSmallChunksChange:this._onSmallChunksChange})}}class message_importer_MessageImporter extends importer_Importer{constructor(t){super(),i()(this,"_excludeLinesRegex",void 0),i()(this,"_multilineStartRegex",void 0),this._excludeLinesRegex=void 0===t.excludeLinesPattern?null:new RegExp(t.excludeLinesPattern),this._multilineStartRegex=void 0===t.multilineStartPattern?null:new RegExp(t.multilineStartPattern)}_createDocs(t,e){let n=0;try{const r=[];let i="",s="";for(let n=0;n