diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f07fcd..e7ebdc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,18 @@ [Official Releases](https://github.com/NASA-AMMOS/LithoSphere/releases) +## v1.4.1 + +_May 2, 2022_ + +#### Added + +- New `initialCamera` constructor option + ## v1.4.0 +--- + _Mar 29, 2022_ #### Added diff --git a/dist/lithosphere.js b/dist/lithosphere.js new file mode 100644 index 0000000..7df2376 --- /dev/null +++ b/dist/lithosphere.js @@ -0,0 +1,2312 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define("LithoSphere", [], factory); + else if(typeof exports === 'object') + exports["LithoSphere"] = factory(); + else + root["LithoSphere"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = "C:\\Users\\tsoliman\\Documents\\Projects\\LithoSphere\\public/"; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./src/lithosphere.ts"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./node_modules/3d-tiles-renderer/src/base/B3DMLoaderBase.js": +/*!*******************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/base/B3DMLoaderBase.js ***! + \*******************************************************************/ +/*! exports provided: B3DMLoaderBase */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"B3DMLoaderBase\", function() { return B3DMLoaderBase; });\n/* harmony import */ var _utilities_FeatureTable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utilities/FeatureTable.js */ \"./node_modules/3d-tiles-renderer/src/utilities/FeatureTable.js\");\n// B3DM File Format\r\n// https://github.com/CesiumGS/3d-tiles/blob/master/specification/TileFormats/Batched3DModel/README.md\r\n\r\n\r\n\r\nclass B3DMLoaderBase {\r\n\r\n\tconstructor() {\r\n\r\n\t\tthis.fetchOptions = {};\r\n\r\n\t}\r\n\r\n\tload( url ) {\r\n\r\n\t\treturn fetch( url, this.fetchOptions )\r\n\t\t\t.then( res => {\r\n\r\n\t\t\t\tif ( ! res.ok ) {\r\n\r\n\t\t\t\t\tthrow new Error( `Failed to load file \"${ url }\" with status ${ res.status } : ${ res.statusText }` );\r\n\r\n\t\t\t\t}\r\n\t\t\t\treturn res.arrayBuffer();\r\n\r\n\t\t\t} )\r\n\t\t\t.then( buffer => this.parse( buffer ) );\r\n\r\n\t}\r\n\r\n\tparse( buffer ) {\r\n\r\n\t\t// TODO: this should be able to take a uint8array with an offset and length\r\n\t\tconst dataView = new DataView( buffer );\r\n\r\n\t\t// 28-byte header\r\n\r\n\t\t// 4 bytes\r\n\t\tconst magic =\r\n\t\t\tString.fromCharCode( dataView.getUint8( 0 ) ) +\r\n\t\t\tString.fromCharCode( dataView.getUint8( 1 ) ) +\r\n\t\t\tString.fromCharCode( dataView.getUint8( 2 ) ) +\r\n\t\t\tString.fromCharCode( dataView.getUint8( 3 ) );\r\n\r\n\t\tconsole.assert( magic === 'b3dm' );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst version = dataView.getUint32( 4, true );\r\n\r\n\t\tconsole.assert( version === 1 );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst byteLength = dataView.getUint32( 8, true );\r\n\r\n\t\tconsole.assert( byteLength === buffer.byteLength );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst featureTableJSONByteLength = dataView.getUint32( 12, true );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst featureTableBinaryByteLength = dataView.getUint32( 16, true );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst batchTableJSONByteLength = dataView.getUint32( 20, true );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst batchTableBinaryByteLength = dataView.getUint32( 24, true );\r\n\r\n\t\t// Feature Table\r\n\t\tconst featureTableStart = 28;\r\n\t\tconst featureTableBuffer = buffer.slice(\r\n\t\t\tfeatureTableStart,\r\n\t\t\tfeatureTableStart + featureTableJSONByteLength + featureTableBinaryByteLength,\r\n\t\t);\r\n\t\tconst featureTable = new _utilities_FeatureTable_js__WEBPACK_IMPORTED_MODULE_0__[\"FeatureTable\"](\r\n\t\t\tfeatureTableBuffer,\r\n\t\t\t0,\r\n\t\t\tfeatureTableJSONByteLength,\r\n\t\t\tfeatureTableBinaryByteLength,\r\n\t\t);\r\n\r\n\t\t// Batch Table\r\n\t\tconst batchTableStart = featureTableStart + featureTableJSONByteLength + featureTableBinaryByteLength;\r\n\t\tconst batchTableBuffer = buffer.slice(\r\n\t\t\tbatchTableStart,\r\n\t\t\tbatchTableStart + batchTableJSONByteLength + batchTableBinaryByteLength,\r\n\t\t);\r\n\t\tconst batchTable = new _utilities_FeatureTable_js__WEBPACK_IMPORTED_MODULE_0__[\"BatchTable\"](\r\n\t\t\tbatchTableBuffer,\r\n\t\t\tfeatureTable.getData( 'BATCH_LENGTH' ),\r\n\t\t\t0,\r\n\t\t\tbatchTableJSONByteLength,\r\n\t\t\tbatchTableBinaryByteLength,\r\n\t\t);\r\n\r\n\t\tconst glbStart = batchTableStart + batchTableJSONByteLength + batchTableBinaryByteLength;\r\n\t\tconst glbBytes = new Uint8Array( buffer, glbStart, byteLength - glbStart );\r\n\r\n\t\treturn {\r\n\t\t\tversion,\r\n\t\t\tfeatureTable,\r\n\t\t\tbatchTable,\r\n\t\t\tglbBytes,\r\n\t\t};\r\n\r\n\t}\r\n\r\n}\r\n\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/base/B3DMLoaderBase.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/base/CMPTLoaderBase.js": +/*!*******************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/base/CMPTLoaderBase.js ***! + \*******************************************************************/ +/*! exports provided: CMPTLoaderBase */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CMPTLoaderBase\", function() { return CMPTLoaderBase; });\n// CMPT File Format\r\n// https://github.com/CesiumGS/3d-tiles/blob/master/specification/TileFormats/Composite/README.md\r\n\r\nclass CMPTLoaderBase {\r\n\r\n\tconstructor() {\r\n\r\n\t\tthis.fetchOptions = {};\r\n\t\tthis.workingPath = '';\r\n\r\n\t}\r\n\r\n\tload( url ) {\r\n\r\n\t\treturn fetch( url, this.fetchOptions )\r\n\t\t\t.then( res => {\r\n\r\n\t\t\t\tif ( ! res.ok ) {\r\n\r\n\t\t\t\t\tthrow new Error( `Failed to load file \"${ url }\" with status ${ res.status } : ${ res.statusText }` );\r\n\r\n\t\t\t\t}\r\n\t\t\t\treturn res.arrayBuffer();\r\n\r\n\t\t\t} )\r\n\t\t\t.then( buffer => {\r\n\r\n\t\t\t\tif ( this.workingPath === '' ) {\r\n\r\n\t\t\t\t\tconst splits = url.split( /\\\\\\//g );\r\n\t\t\t\t\tsplits.pop();\r\n\t\t\t\t\tthis.workingPath = splits.join( '/' );\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn this.parse( buffer );\r\n\r\n\t\t\t} );\r\n\r\n\t}\r\n\r\n\tparse( buffer ) {\r\n\r\n\t\tconst dataView = new DataView( buffer );\r\n\r\n\t\t// 16-byte header\r\n\r\n\t\t// 4 bytes\r\n\t\tconst magic =\r\n\t\t\tString.fromCharCode( dataView.getUint8( 0 ) ) +\r\n\t\t\tString.fromCharCode( dataView.getUint8( 1 ) ) +\r\n\t\t\tString.fromCharCode( dataView.getUint8( 2 ) ) +\r\n\t\t\tString.fromCharCode( dataView.getUint8( 3 ) );\r\n\r\n\t\tconsole.assert( magic === 'cmpt' );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst version = dataView.getUint32( 4, true );\r\n\r\n\t\tconsole.assert( version === 1 );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst byteLength = dataView.getUint32( 8, true );\r\n\r\n\t\tconsole.assert( byteLength === buffer.byteLength );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst tilesLength = dataView.getUint32( 12, true );\r\n\r\n\t\tconst tiles = [];\r\n\t\tlet offset = 16;\r\n\t\tfor ( let i = 0; i < tilesLength; i ++ ) {\r\n\r\n\t\t\tconst tileView = new DataView( buffer, offset, 12 );\r\n\t\t\tconst tileMagic =\r\n\t\t\t\tString.fromCharCode( tileView.getUint8( 0 ) ) +\r\n\t\t\t\tString.fromCharCode( tileView.getUint8( 1 ) ) +\r\n\t\t\t\tString.fromCharCode( tileView.getUint8( 2 ) ) +\r\n\t\t\t\tString.fromCharCode( tileView.getUint8( 3 ) );\r\n\t\t\tconst tileVersion = tileView.getUint32( 4, true );\r\n\t\t\tconst byteLength = tileView.getUint32( 8, true );\r\n\r\n\t\t\tconst tileBuffer = new Uint8Array( buffer, offset, byteLength );\r\n\t\t\ttiles.push( {\r\n\r\n\t\t\t\ttype: tileMagic,\r\n\t\t\t\tbuffer: tileBuffer,\r\n\t\t\t\tversion: tileVersion,\r\n\r\n\t\t\t} );\r\n\t\t\toffset += byteLength;\r\n\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tversion,\r\n\t\t\ttiles,\r\n\t\t};\r\n\r\n\t}\r\n\r\n}\r\n\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/base/CMPTLoaderBase.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/base/I3DMLoaderBase.js": +/*!*******************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/base/I3DMLoaderBase.js ***! + \*******************************************************************/ +/*! exports provided: I3DMLoaderBase */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"I3DMLoaderBase\", function() { return I3DMLoaderBase; });\n/* harmony import */ var _utilities_FeatureTable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utilities/FeatureTable.js */ \"./node_modules/3d-tiles-renderer/src/utilities/FeatureTable.js\");\n/* harmony import */ var _utilities_arrayToString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utilities/arrayToString.js */ \"./node_modules/3d-tiles-renderer/src/utilities/arrayToString.js\");\n// I3DM File Format\r\n// https://github.com/CesiumGS/3d-tiles/blob/master/specification/TileFormats/Instanced3DModel/README.md\r\n\r\n\r\n\r\n\r\nclass I3DMLoaderBase {\r\n\r\n\tconstructor() {\r\n\r\n\t\tthis.fetchOptions = {};\r\n\t\tthis.workingPath = '';\r\n\r\n\t}\r\n\r\n\tresolveExternalURL( url ) {\r\n\r\n\t\tif ( /^[^\\\\/]/ ) {\r\n\r\n\t\t\treturn this.workingPath + '/' + url;\r\n\r\n\t\t} else {}\r\n\r\n\t}\r\n\r\n\tload( url ) {\r\n\r\n\t\treturn fetch( url, this.fetchOptions )\r\n\t\t\t.then( res => {\r\n\r\n\t\t\t\tif ( ! res.ok ) {\r\n\r\n\t\t\t\t\tthrow new Error( `Failed to load file \"${ url }\" with status ${ res.status } : ${ res.statusText }` );\r\n\r\n\t\t\t\t}\r\n\t\t\t\treturn res.arrayBuffer();\r\n\r\n\t\t\t} )\r\n\t\t\t.then( buffer => {\r\n\r\n\t\t\t\tif ( this.workingPath === '' ) {\r\n\r\n\t\t\t\t\tconst splits = url.split( /\\\\\\//g );\r\n\t\t\t\t\tsplits.pop();\r\n\t\t\t\t\tthis.workingPath = splits.join( '/' );\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn this.parse( buffer );\r\n\r\n\t\t\t} );\r\n\r\n\t}\r\n\r\n\tparse( buffer ) {\r\n\r\n\t\tconst dataView = new DataView( buffer );\r\n\r\n\t\t// 32-byte header\r\n\r\n\t\t// 4 bytes\r\n\t\tconst magic =\r\n\t\t\tString.fromCharCode( dataView.getUint8( 0 ) ) +\r\n\t\t\tString.fromCharCode( dataView.getUint8( 1 ) ) +\r\n\t\t\tString.fromCharCode( dataView.getUint8( 2 ) ) +\r\n\t\t\tString.fromCharCode( dataView.getUint8( 3 ) );\r\n\r\n\t\tconsole.assert( magic === 'i3dm' );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst version = dataView.getUint32( 4, true );\r\n\r\n\t\tconsole.assert( version === 1 );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst byteLength = dataView.getUint32( 8, true );\r\n\r\n\t\tconsole.assert( byteLength === buffer.byteLength );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst featureTableJSONByteLength = dataView.getUint32( 12, true );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst featureTableBinaryByteLength = dataView.getUint32( 16, true );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst batchTableJSONByteLength = dataView.getUint32( 20, true );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst batchTableBinaryByteLength = dataView.getUint32( 24, true );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst gltfFormat = dataView.getUint32( 28, true );\r\n\r\n\t\t// Feature Table\r\n\t\tconst featureTableStart = 32;\r\n\t\tconst featureTableBuffer = buffer.slice(\r\n\t\t\tfeatureTableStart,\r\n\t\t\tfeatureTableStart + featureTableJSONByteLength + featureTableBinaryByteLength,\r\n\t\t);\r\n\t\tconst featureTable = new _utilities_FeatureTable_js__WEBPACK_IMPORTED_MODULE_0__[\"FeatureTable\"](\r\n\t\t\tfeatureTableBuffer,\r\n\t\t\t0,\r\n\t\t\tfeatureTableJSONByteLength,\r\n\t\t\tfeatureTableBinaryByteLength,\r\n\t\t);\r\n\r\n\t\t// Batch Table\r\n\t\tconst batchTableStart = featureTableStart + featureTableJSONByteLength + featureTableBinaryByteLength;\r\n\t\tconst batchTableBuffer = buffer.slice(\r\n\t\t\tbatchTableStart,\r\n\t\t\tbatchTableStart + batchTableJSONByteLength + batchTableBinaryByteLength,\r\n\t\t);\r\n\t\tconst batchTable = new _utilities_FeatureTable_js__WEBPACK_IMPORTED_MODULE_0__[\"BatchTable\"](\r\n\t\t\tbatchTableBuffer,\r\n\t\t\tfeatureTable.getData( 'INSTANCES_LENGTH' ),\r\n\t\t\t0,\r\n\t\t\tbatchTableJSONByteLength,\r\n\t\t\tbatchTableBinaryByteLength,\r\n\t\t);\r\n\r\n\t\tconst glbStart = batchTableStart + batchTableJSONByteLength + batchTableBinaryByteLength;\r\n\t\tconst bodyBytes = new Uint8Array( buffer, glbStart, byteLength - glbStart );\r\n\r\n\t\tlet glbBytes = null;\r\n\t\tlet promise = null;\r\n\t\tif ( gltfFormat ) {\r\n\r\n\t\t\tglbBytes = bodyBytes;\r\n\t\t\tpromise = Promise.resolve();\r\n\r\n\t\t} else {\r\n\r\n\t\t\tconst externalUri = this.resolveExternalURL( Object(_utilities_arrayToString_js__WEBPACK_IMPORTED_MODULE_1__[\"arrayToString\"])( bodyBytes ) );\r\n\t\t\tpromise = fetch( externalUri, this.fetchOptions )\r\n\t\t\t\t.then( res => {\r\n\r\n\t\t\t\t\tif ( ! res.ok ) {\r\n\r\n\t\t\t\t\t\tthrow new Error( `I3DMLoaderBase : Failed to load file \"${ externalUri }\" with status ${ res.status } : ${ res.statusText }` );\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn res.arrayBuffer();\r\n\r\n\t\t\t\t} )\r\n\t\t\t\t.then( buffer => {\r\n\r\n\t\t\t\t\tglbBytes = new Uint8Array( buffer );\r\n\r\n\t\t\t\t} );\r\n\r\n\t\t}\r\n\r\n\t\treturn promise.then( () => {\r\n\r\n\t\t\treturn {\r\n\t\t\t\tversion,\r\n\t\t\t\tfeatureTable,\r\n\t\t\t\tbatchTable,\r\n\t\t\t\tglbBytes,\r\n\t\t\t};\r\n\r\n\t\t} );\r\n\r\n\t}\r\n\r\n}\r\n\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/base/I3DMLoaderBase.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/base/PNTSLoaderBase.js": +/*!*******************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/base/PNTSLoaderBase.js ***! + \*******************************************************************/ +/*! exports provided: PNTSLoaderBase */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PNTSLoaderBase\", function() { return PNTSLoaderBase; });\n/* harmony import */ var _utilities_FeatureTable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utilities/FeatureTable.js */ \"./node_modules/3d-tiles-renderer/src/utilities/FeatureTable.js\");\n// PNTS File Format\r\n// https://github.com/CesiumGS/3d-tiles/blob/master/specification/TileFormats/PointCloud/README.md\r\n\r\n\r\n\r\nclass PNTSLoaderBase {\r\n\r\n\tconstructor() {\r\n\r\n\t\tthis.fetchOptions = {};\r\n\r\n\t}\r\n\r\n\tload( url ) {\r\n\r\n\t\treturn fetch( url, this.fetchOptions )\r\n\t\t\t.then( res => {\r\n\r\n\t\t\t\tif ( ! res.ok ) {\r\n\r\n\t\t\t\t\tthrow new Error( `Failed to load file \"${ url }\" with status ${ res.status } : ${ res.statusText }` );\r\n\r\n\t\t\t\t}\r\n\t\t\t\treturn res.arrayBuffer();\r\n\r\n\t\t\t} )\r\n\t\t\t.then( buffer => this.parse( buffer ) );\r\n\r\n\t}\r\n\r\n\tparse( buffer ) {\r\n\r\n\t\tconst dataView = new DataView( buffer );\r\n\r\n\t\t// 28-byte header\r\n\r\n\t\t// 4 bytes\r\n\t\tconst magic =\r\n\t\t\tString.fromCharCode( dataView.getUint8( 0 ) ) +\r\n\t\t\tString.fromCharCode( dataView.getUint8( 1 ) ) +\r\n\t\t\tString.fromCharCode( dataView.getUint8( 2 ) ) +\r\n\t\t\tString.fromCharCode( dataView.getUint8( 3 ) );\r\n\r\n\t\tconsole.assert( magic === 'pnts' );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst version = dataView.getUint32( 4, true );\r\n\r\n\t\tconsole.assert( version === 1 );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst byteLength = dataView.getUint32( 8, true );\r\n\r\n\t\tconsole.assert( byteLength === buffer.byteLength );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst featureTableJSONByteLength = dataView.getUint32( 12, true );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst featureTableBinaryByteLength = dataView.getUint32( 16, true );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst batchTableJSONByteLength = dataView.getUint32( 20, true );\r\n\r\n\t\t// 4 bytes\r\n\t\tconst batchTableBinaryByteLength = dataView.getUint32( 24, true );\r\n\r\n\t\t// Feature Table\r\n\t\tconst featureTableStart = 28;\r\n\t\tconst featureTableBuffer = buffer.slice(\r\n\t\t\tfeatureTableStart,\r\n\t\t\tfeatureTableStart + featureTableJSONByteLength + featureTableBinaryByteLength,\r\n\t\t);\r\n\t\tconst featureTable = new _utilities_FeatureTable_js__WEBPACK_IMPORTED_MODULE_0__[\"FeatureTable\"](\r\n\t\t\tfeatureTableBuffer,\r\n\t\t\t0,\r\n\t\t\tfeatureTableJSONByteLength,\r\n\t\t\tfeatureTableBinaryByteLength,\r\n\t\t);\r\n\r\n\t\t// Batch Table\r\n\t\tconst batchTableStart = featureTableStart + featureTableJSONByteLength + featureTableBinaryByteLength;\r\n\t\tconst batchTableBuffer = buffer.slice(\r\n\t\t\tbatchTableStart,\r\n\t\t\tbatchTableStart + batchTableJSONByteLength + batchTableBinaryByteLength,\r\n\t\t);\r\n\t\tconst batchTable = new _utilities_FeatureTable_js__WEBPACK_IMPORTED_MODULE_0__[\"BatchTable\"](\r\n\t\t\tbatchTableBuffer,\r\n\t\t\tfeatureTable.getData( 'BATCH_LENGTH' ) || featureTable.getData( 'POINTS_LENGTH' ),\r\n\t\t\t0,\r\n\t\t\tbatchTableJSONByteLength,\r\n\t\t\tbatchTableBinaryByteLength,\r\n\t\t);\r\n\r\n\t\treturn {\r\n\t\t\tversion,\r\n\t\t\tfeatureTable,\r\n\t\t\tbatchTable,\r\n\t\t};\r\n\r\n\t}\r\n\r\n}\r\n\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/base/PNTSLoaderBase.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/base/TilesRendererBase.js": +/*!**********************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/base/TilesRendererBase.js ***! + \**********************************************************************/ +/*! exports provided: TilesRendererBase */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TilesRendererBase\", function() { return TilesRendererBase; });\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utilities_urlJoin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utilities/urlJoin.js */ \"./node_modules/3d-tiles-renderer/src/utilities/urlJoin.js\");\n/* harmony import */ var _utilities_LRUCache_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utilities/LRUCache.js */ \"./node_modules/3d-tiles-renderer/src/utilities/LRUCache.js\");\n/* harmony import */ var _utilities_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utilities/PriorityQueue.js */ \"./node_modules/3d-tiles-renderer/src/utilities/PriorityQueue.js\");\n/* harmony import */ var _traverseFunctions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./traverseFunctions.js */ \"./node_modules/3d-tiles-renderer/src/base/traverseFunctions.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/3d-tiles-renderer/src/base/constants.js\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// Function for sorting the evicted LRU items. We should evict the shallowest depth first.\r\nconst priorityCallback = tile => 1 / ( tile.__depthFromRenderedParent + 1 );\r\n\r\nclass TilesRendererBase {\r\n\r\n\tget rootTileSet() {\r\n\r\n\t\tconst tileSet = this.tileSets[ this.rootURL ];\r\n\t\tif ( ! tileSet || tileSet instanceof Promise ) {\r\n\r\n\t\t\treturn null;\r\n\r\n\t\t} else {\r\n\r\n\t\t\treturn tileSet;\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tget root() {\r\n\r\n\t\tconst tileSet = this.rootTileSet;\r\n\t\treturn tileSet ? tileSet.root : null;\r\n\r\n\t}\r\n\r\n\tconstructor( url ) {\r\n\r\n\t\t// state\r\n\t\tthis.tileSets = {};\r\n\t\tthis.rootURL = url;\r\n\t\tthis.fetchOptions = {};\r\n\r\n\t\tthis.preprocessURL = null;\r\n\r\n\t\tconst lruCache = new _utilities_LRUCache_js__WEBPACK_IMPORTED_MODULE_2__[\"LRUCache\"]();\r\n\t\tlruCache.unloadPriorityCallback = priorityCallback;\r\n\r\n\t\tconst downloadQueue = new _utilities_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_3__[\"PriorityQueue\"]();\r\n\t\tdownloadQueue.maxJobs = 4;\r\n\t\tdownloadQueue.priorityCallback = priorityCallback;\r\n\r\n\t\tconst parseQueue = new _utilities_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_3__[\"PriorityQueue\"]();\r\n\t\tparseQueue.maxJobs = 1;\r\n\t\tparseQueue.priorityCallback = priorityCallback;\r\n\r\n\t\tthis.lruCache = lruCache;\r\n\t\tthis.downloadQueue = downloadQueue;\r\n\t\tthis.parseQueue = parseQueue;\r\n\t\tthis.stats = {\r\n\t\t\tparsing: 0,\r\n\t\t\tdownloading: 0,\r\n\t\t\tfailed: 0,\r\n\t\t\tinFrustum: 0,\r\n\t\t\tused: 0,\r\n\t\t\tactive: 0,\r\n\t\t\tvisible: 0,\r\n\t\t};\r\n\t\tthis.frameCount = 0;\r\n\r\n\t\t// options\r\n\t\tthis.errorTarget = 6.0;\r\n\t\tthis.errorThreshold = Infinity;\r\n\t\tthis.loadSiblings = true;\r\n\t\tthis.displayActiveTiles = false;\r\n\t\tthis.maxDepth = Infinity;\r\n\t\tthis.stopAtEmptyTiles = true;\r\n\r\n\t}\r\n\r\n\ttraverse( beforecb, aftercb ) {\r\n\r\n\t\tconst tileSets = this.tileSets;\r\n\t\tconst rootTileSet = tileSets[ this.rootURL ];\r\n\t\tif ( ! rootTileSet || ! rootTileSet.root ) return;\r\n\r\n\t\tObject(_traverseFunctions_js__WEBPACK_IMPORTED_MODULE_4__[\"traverseSet\"])( rootTileSet.root, beforecb, aftercb );\r\n\r\n\t}\r\n\r\n\t// Public API\r\n\tupdate() {\r\n\r\n\t\tconst stats = this.stats;\r\n\t\tconst lruCache = this.lruCache;\r\n\t\tconst tileSets = this.tileSets;\r\n\t\tconst rootTileSet = tileSets[ this.rootURL ];\r\n\t\tif ( ! ( this.rootURL in tileSets ) ) {\r\n\r\n\t\t\tthis.loadRootTileSet( this.rootURL );\r\n\t\t\treturn;\r\n\r\n\t\t} else if ( ! rootTileSet || ! rootTileSet.root ) {\r\n\r\n\t\t\treturn;\r\n\r\n\t\t}\r\n\r\n\t\tconst root = rootTileSet.root;\r\n\r\n\t\tstats.inFrustum = 0,\r\n\t\tstats.used = 0,\r\n\t\tstats.active = 0,\r\n\t\tstats.visible = 0,\r\n\t\tthis.frameCount ++;\r\n\r\n\t\tObject(_traverseFunctions_js__WEBPACK_IMPORTED_MODULE_4__[\"determineFrustumSet\"])( root, this );\r\n\t\tObject(_traverseFunctions_js__WEBPACK_IMPORTED_MODULE_4__[\"markUsedSetLeaves\"])( root, this );\r\n\t\tObject(_traverseFunctions_js__WEBPACK_IMPORTED_MODULE_4__[\"skipTraversal\"])( root, this );\r\n\t\tObject(_traverseFunctions_js__WEBPACK_IMPORTED_MODULE_4__[\"toggleTiles\"])( root, this );\r\n\r\n\t\tlruCache.scheduleUnload();\r\n\r\n\t}\r\n\r\n\t// Overrideable\r\n\tparseTile( buffer, tile, extension ) {\r\n\r\n\t\treturn null;\r\n\r\n\t}\r\n\r\n\tdisposeTile( tile ) {\r\n\r\n\t}\r\n\r\n\tpreprocessNode( tile, parentTile, tileSetDir ) {\r\n\r\n\t\tif ( tile.content ) {\r\n\r\n\t\t\t// Fix old file formats\r\n\t\t\tif ( ! ( 'uri' in tile.content ) && 'url' in tile.content ) {\r\n\r\n\t\t\t\ttile.content.uri = tile.content.url;\r\n\t\t\t\tdelete tile.content.url;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif ( tile.content.uri ) {\r\n\r\n\t\t\t\ttile.content.uri = Object(_utilities_urlJoin_js__WEBPACK_IMPORTED_MODULE_1__[\"urlJoin\"])( tileSetDir, tile.content.uri );\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// NOTE: fix for some cases where tilesets provide the bounding volume\r\n\t\t\t// but volumes are not present.\r\n\t\t\tif (\r\n\t\t\t\ttile.content.boundingVolume &&\r\n\t\t\t\t! (\r\n\t\t\t\t\t'box' in tile.content.boundingVolume ||\r\n\t\t\t\t\t'sphere' in tile.content.boundingVolume ||\r\n\t\t\t\t\t'region' in tile.content.boundingVolume\r\n\t\t\t\t)\r\n\t\t\t) {\r\n\r\n\t\t\t\tdelete tile.content.boundingVolume;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\ttile.parent = parentTile;\r\n\t\ttile.children = tile.children || [];\r\n\r\n\t\tconst uri = tile.content && tile.content.uri;\r\n\t\tif ( uri ) {\r\n\r\n\t\t\t// \"content\" should only indicate loadable meshes, not external tile sets\r\n\t\t\tconst isExternalTileSet = /\\.json$/i.test( tile.content.uri );\r\n\t\t\ttile.__externalTileSet = isExternalTileSet;\r\n\t\t\ttile.__contentEmpty = isExternalTileSet;\r\n\r\n\t\t} else {\r\n\r\n\t\t\ttile.__externalTileSet = false;\r\n\t\t\ttile.__contentEmpty = true;\r\n\r\n\t\t}\r\n\r\n\t\ttile.__error = 0.0;\r\n\t\ttile.__inFrustum = false;\r\n\t\ttile.__isLeaf = false;\r\n\r\n\t\ttile.__usedLastFrame = false;\r\n\t\ttile.__used = false;\r\n\r\n\t\ttile.__wasSetVisible = false;\r\n\t\ttile.__visible = false;\r\n\t\ttile.__childrenWereVisible = false;\r\n\t\ttile.__allChildrenLoaded = false;\r\n\r\n\t\ttile.__wasSetActive = false;\r\n\t\ttile.__active = false;\r\n\r\n\t\ttile.__loadingState = _constants_js__WEBPACK_IMPORTED_MODULE_5__[\"UNLOADED\"];\r\n\t\ttile.__loadIndex = 0;\r\n\r\n\t\ttile.__loadAbort = null;\r\n\r\n\t\ttile.__depthFromRenderedParent = - 1;\r\n\t\tif ( parentTile === null ) {\r\n\r\n\t\t\ttile.__depth = 0;\r\n\t\t\ttile.refine = tile.refine || 'REPLACE';\r\n\r\n\t\t} else {\r\n\r\n\t\t\ttile.__depth = parentTile.__depth + 1;\r\n\t\t\ttile.refine = tile.refine || parentTile.refine;\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tsetTileActive( tile, state ) {\r\n\r\n\t}\r\n\r\n\tsetTileVisible( tile, state ) {\r\n\r\n\t}\r\n\r\n\tcalculateError( tile ) {\r\n\r\n\t\treturn 0;\r\n\r\n\t}\r\n\r\n\ttileInView( tile ) {\r\n\r\n\t\treturn true;\r\n\r\n\t}\r\n\r\n\t// Private Functions\r\n\tfetchTileSet( url, fetchOptions, parent = null ) {\r\n\r\n\t\treturn fetch( url, fetchOptions )\r\n\t\t\t.then( res => {\r\n\r\n\t\t\t\tif ( res.ok ) {\r\n\r\n\t\t\t\t\treturn res.json();\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tthrow new Error( `TilesRenderer: Failed to load tileset \"${ url }\" with status ${ res.status } : ${ res.statusText }` );\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} )\r\n\t\t\t.then( json => {\r\n\r\n\t\t\t\tconst version = json.asset.version;\r\n\t\t\t\tconsole.assert(\r\n\t\t\t\t\tversion === '1.0' || version === '0.0',\r\n\t\t\t\t\t'asset.version is expected to be a string of \"1.0\" or \"0.0\"'\r\n\t\t\t\t);\r\n\r\n\t\t\t\tconst basePath = path__WEBPACK_IMPORTED_MODULE_0___default.a.dirname( url );\r\n\r\n\t\t\t\tObject(_traverseFunctions_js__WEBPACK_IMPORTED_MODULE_4__[\"traverseSet\"])(\r\n\t\t\t\t\tjson.root,\r\n\t\t\t\t\t( node, parent ) => this.preprocessNode( node, parent, basePath ),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tparent,\r\n\t\t\t\t\tparent ? parent.__depth : 0,\r\n\t\t\t\t);\r\n\r\n\t\t\t\treturn json;\r\n\r\n\t\t\t} );\r\n\r\n\t}\r\n\r\n\tloadRootTileSet( url ) {\r\n\r\n\t\tconst tileSets = this.tileSets;\r\n\t\tif ( ! ( url in tileSets ) ) {\r\n\r\n\t\t\tconst pr = this\r\n\t\t\t\t.fetchTileSet( url, this.fetchOptions )\r\n\t\t\t\t.then( json => {\r\n\r\n\t\t\t\t\ttileSets[ url ] = json;\r\n\r\n\t\t\t\t} );\r\n\r\n\t\t\tpr.catch( err => {\r\n\r\n\t\t\t\tconsole.error( err );\r\n\t\t\t\ttileSets[ url ] = err;\r\n\r\n\t\t\t} );\r\n\r\n\t\t\ttileSets[ url ] = pr;\r\n\r\n\t\t\treturn pr;\r\n\r\n\t\t} else if ( tileSets[ url ] instanceof Error ) {\r\n\r\n\t\t\treturn Promise.reject( tileSets[ url ] );\r\n\r\n\t\t} else {\r\n\r\n\t\t\treturn Promise.resolve( tileSets[ url ] );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\trequestTileContents( tile ) {\r\n\r\n\t\t// If the tile is already being loaded then don't\r\n\t\t// start it again.\r\n\t\tif ( tile.__loadingState !== _constants_js__WEBPACK_IMPORTED_MODULE_5__[\"UNLOADED\"] ) {\r\n\r\n\t\t\treturn;\r\n\r\n\t\t}\r\n\r\n\t\tconst stats = this.stats;\r\n\t\tconst lruCache = this.lruCache;\r\n\t\tconst downloadQueue = this.downloadQueue;\r\n\t\tconst parseQueue = this.parseQueue;\r\n\t\tconst isExternalTileSet = tile.__externalTileSet;\r\n\t\tlruCache.add( tile, t => {\r\n\r\n\t\t\t// Stop the load if it's started\r\n\t\t\tif ( t.__loadingState === _constants_js__WEBPACK_IMPORTED_MODULE_5__[\"LOADING\"] ) {\r\n\r\n\t\t\t\tt.__loadAbort.abort();\r\n\t\t\t\tt.__loadAbort = null;\r\n\r\n\t\t\t} else if ( isExternalTileSet ) {\r\n\r\n\t\t\t\tt.children.length = 0;\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tthis.disposeTile( t );\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Decrement stats\r\n\t\t\tif ( t.__loadingState === _constants_js__WEBPACK_IMPORTED_MODULE_5__[\"LOADING\"] ) {\r\n\r\n\t\t\t\tstats.downloading --;\r\n\r\n\t\t\t} else if ( t.__loadingState === _constants_js__WEBPACK_IMPORTED_MODULE_5__[\"PARSING\"] ) {\r\n\r\n\t\t\t\tstats.parsing --;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tt.__loadingState = _constants_js__WEBPACK_IMPORTED_MODULE_5__[\"UNLOADED\"];\r\n\t\t\tt.__loadIndex ++;\r\n\r\n\t\t\tparseQueue.remove( t );\r\n\t\t\tdownloadQueue.remove( t );\r\n\r\n\t\t} );\r\n\r\n\t\t// Track a new load index so we avoid the condition where this load is stopped and\r\n\t\t// another begins soon after so we don't parse twice.\r\n\t\ttile.__loadIndex ++;\r\n\t\tconst loadIndex = tile.__loadIndex;\r\n\t\tconst controller = new AbortController();\r\n\t\tconst signal = controller.signal;\r\n\r\n\t\tstats.downloading ++;\r\n\t\ttile.__loadAbort = controller;\r\n\t\ttile.__loadingState = _constants_js__WEBPACK_IMPORTED_MODULE_5__[\"LOADING\"];\r\n\r\n\t\tconst errorCallback = e => {\r\n\r\n\t\t\t// if it has been unloaded then the tile has been disposed\r\n\t\t\tif ( tile.__loadIndex !== loadIndex ) {\r\n\r\n\t\t\t\treturn;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif ( e.name !== 'AbortError' ) {\r\n\r\n\t\t\t\tparseQueue.remove( tile );\r\n\t\t\t\tdownloadQueue.remove( tile );\r\n\r\n\t\t\t\tif ( tile.__loadingState === _constants_js__WEBPACK_IMPORTED_MODULE_5__[\"PARSING\"] ) {\r\n\r\n\t\t\t\t\tstats.parsing --;\r\n\r\n\t\t\t\t} else if ( tile.__loadingState === _constants_js__WEBPACK_IMPORTED_MODULE_5__[\"LOADING\"] ) {\r\n\r\n\t\t\t\t\tstats.downloading --;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstats.failed ++;\r\n\r\n\t\t\t\tconsole.error( `TilesRenderer : Failed to load tile at url \"${ tile.content.uri }\".` );\r\n\t\t\t\tconsole.error( e );\r\n\t\t\t\ttile.__loadingState = _constants_js__WEBPACK_IMPORTED_MODULE_5__[\"FAILED\"];\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tlruCache.remove( tile );\r\n\r\n\t\t\t}\r\n\r\n\t\t};\r\n\r\n\t\tif ( isExternalTileSet ) {\r\n\r\n\t\t\tdownloadQueue.add( tile, tile => {\r\n\r\n\t\t\t\t// if it has been unloaded then the tile has been disposed\r\n\t\t\t\tif ( tile.__loadIndex !== loadIndex ) {\r\n\r\n\t\t\t\t\treturn Promise.resolve();\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst uri = this.preprocessURL ? this.preprocessURL( tile.content.uri ) : tile.content.uri;\r\n\t\t\t\treturn this.fetchTileSet( uri, Object.assign( { signal }, this.fetchOptions ), tile );\r\n\r\n\t\t\t} )\r\n\t\t\t\t.then( json => {\r\n\r\n\t\t\t\t\t// if it has been unloaded then the tile has been disposed\r\n\t\t\t\t\tif ( tile.__loadIndex !== loadIndex ) {\r\n\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tstats.downloading --;\r\n\t\t\t\t\ttile.__loadAbort = null;\r\n\t\t\t\t\ttile.__loadingState = _constants_js__WEBPACK_IMPORTED_MODULE_5__[\"LOADED\"];\r\n\r\n\t\t\t\t\ttile.children.push( json.root );\r\n\r\n\t\t\t\t} )\r\n\t\t\t\t.catch( errorCallback );\r\n\r\n\t\t} else {\r\n\r\n\t\t\tdownloadQueue.add( tile, tile => {\r\n\r\n\t\t\t\tif ( tile.__loadIndex !== loadIndex ) {\r\n\r\n\t\t\t\t\treturn Promise.resolve();\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst uri = this.preprocessURL ? this.preprocessURL( tile.content.uri ) : tile.content.uri;\r\n\t\t\t\treturn fetch( uri, Object.assign( { signal }, this.fetchOptions ) );\r\n\r\n\t\t\t} )\r\n\t\t\t\t.then( res => {\r\n\r\n\t\t\t\t\tif ( tile.__loadIndex !== loadIndex ) {\r\n\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ( res.ok ) {\r\n\r\n\t\t\t\t\t\treturn res.arrayBuffer();\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tthrow new Error( `Failed to load model with error code ${res.status}` );\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} )\r\n\t\t\t\t.then( buffer => {\r\n\r\n\t\t\t\t\t// if it has been unloaded then the tile has been disposed\r\n\t\t\t\t\tif ( tile.__loadIndex !== loadIndex ) {\r\n\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tstats.downloading --;\r\n\t\t\t\t\tstats.parsing ++;\r\n\t\t\t\t\ttile.__loadAbort = null;\r\n\t\t\t\t\ttile.__loadingState = _constants_js__WEBPACK_IMPORTED_MODULE_5__[\"PARSING\"];\r\n\r\n\t\t\t\t\treturn parseQueue.add( tile, tile => {\r\n\r\n\t\t\t\t\t\t// if it has been unloaded then the tile has been disposed\r\n\t\t\t\t\t\tif ( tile.__loadIndex !== loadIndex ) {\r\n\r\n\t\t\t\t\t\t\treturn Promise.resolve();\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst uri = tile.content.uri;\r\n\t\t\t\t\t\tconst extension = uri.split( /\\./g ).pop();\r\n\r\n\t\t\t\t\t\treturn this.parseTile( buffer, tile, extension );\r\n\r\n\t\t\t\t\t} );\r\n\r\n\t\t\t\t} )\r\n\t\t\t\t.then( () => {\r\n\r\n\t\t\t\t\t// if it has been unloaded then the tile has been disposed\r\n\t\t\t\t\tif ( tile.__loadIndex !== loadIndex ) {\r\n\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tstats.parsing --;\r\n\t\t\t\t\ttile.__loadingState = _constants_js__WEBPACK_IMPORTED_MODULE_5__[\"LOADED\"];\r\n\r\n\t\t\t\t\tif ( tile.__wasSetVisible ) {\r\n\r\n\t\t\t\t\t\tthis.setTileVisible( tile, true );\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ( tile.__wasSetActive ) {\r\n\r\n\t\t\t\t\t\tthis.setTileActive( tile, true );\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} )\r\n\t\t\t\t.catch( errorCallback );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tdispose() {\r\n\r\n\t\tconst lruCache = this.lruCache;\r\n\t\tthis.traverse( tile => {\r\n\r\n\t\t\tlruCache.remove( tile );\r\n\r\n\t\t} );\r\n\r\n\t}\r\n\r\n}\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/base/TilesRendererBase.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/base/constants.js": +/*!**************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/base/constants.js ***! + \**************************************************************/ +/*! exports provided: UNLOADED, LOADING, PARSING, LOADED, FAILED */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"UNLOADED\", function() { return UNLOADED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"LOADING\", function() { return LOADING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PARSING\", function() { return PARSING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"LOADED\", function() { return LOADED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"FAILED\", function() { return FAILED; });\nconst UNLOADED = 0;\nconst LOADING = 1;\nconst PARSING = 2;\nconst LOADED = 3;\nconst FAILED = 4;\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/base/constants.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/base/traverseFunctions.js": +/*!**********************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/base/traverseFunctions.js ***! + \**********************************************************************/ +/*! exports provided: traverseSet, determineFrustumSet, markUsedSetLeaves, skipTraversal, toggleTiles */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"traverseSet\", function() { return traverseSet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"determineFrustumSet\", function() { return determineFrustumSet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"markUsedSetLeaves\", function() { return markUsedSetLeaves; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"skipTraversal\", function() { return skipTraversal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toggleTiles\", function() { return toggleTiles; });\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/3d-tiles-renderer/src/base/constants.js\");\n\r\n\r\nfunction isDownloadFinished( value ) {\r\n\r\n\treturn value === _constants_js__WEBPACK_IMPORTED_MODULE_0__[\"LOADED\"] || value === _constants_js__WEBPACK_IMPORTED_MODULE_0__[\"FAILED\"];\r\n\r\n}\r\n\r\n// Checks whether this tile was last used on the given frame.\r\nfunction isUsedThisFrame( tile, frameCount ) {\r\n\r\n\treturn tile.__lastFrameVisited === frameCount && tile.__used;\r\n\r\n}\r\n\r\n// Resets the frame frame information for the given tile\r\nfunction resetFrameState( tile, frameCount ) {\r\n\r\n\tif ( tile.__lastFrameVisited !== frameCount ) {\r\n\r\n\t\ttile.__lastFrameVisited = frameCount;\r\n\t\ttile.__used = false;\r\n\t\ttile.__inFrustum = false;\r\n\t\ttile.__isLeaf = false;\r\n\t\ttile.__visible = false;\r\n\t\ttile.__active = false;\r\n\t\ttile.__error = 0;\r\n\t\ttile.__childrenWereVisible = false;\r\n\t\ttile.__allChildrenLoaded = false;\r\n\r\n\t}\r\n\r\n}\r\n\r\n// Recursively mark tiles used down to the next tile with content\r\nfunction recursivelyMarkUsed( tile, frameCount, lruCache ) {\r\n\r\n\tresetFrameState( tile, frameCount );\r\n\r\n\ttile.__used = true;\r\n\tlruCache.markUsed( tile );\r\n\tif ( tile.__contentEmpty ) {\r\n\r\n\t\tconst children = tile.children;\r\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\r\n\r\n\t\t\trecursivelyMarkUsed( children[ i ], frameCount, lruCache );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n}\r\n\r\nfunction recursivelyLoadTiles( tile, depthFromRenderedParent, renderer ) {\r\n\r\n\t// Try to load any external tile set children if the external tile set has loaded.\r\n\tconst doTraverse =\r\n\t\ttile.__contentEmpty && (\r\n\t\t\t! tile.__externalTileSet ||\r\n\t\t\tisDownloadFinished( tile.__loadingState )\r\n\t\t);\r\n\tif ( doTraverse ) {\r\n\r\n\t\tconst children = tile.children;\r\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\r\n\r\n\t\t\t// don't increment depth to rendered parent here because we should treat\r\n\t\t\t// the next layer of rendered children as just a single depth away for the\r\n\t\t\t// sake of sorting.\r\n\t\t\tconst child = children[ i ];\r\n\t\t\tchild.__depthFromRenderedParent = depthFromRenderedParent;\r\n\t\t\trecursivelyLoadTiles( child, depthFromRenderedParent, renderer );\r\n\r\n\t\t}\r\n\r\n\t} else {\r\n\r\n\t\trenderer.requestTileContents( tile );\r\n\r\n\t}\r\n\r\n}\r\n\r\n// Helper function for recursively traversing a tile set. If `beforeCb` returns `true` then the\r\n// traversal will end early.\r\nfunction traverseSet( tile, beforeCb = null, afterCb = null, parent = null, depth = 0 ) {\r\n\r\n\tif ( beforeCb && beforeCb( tile, parent, depth ) ) {\r\n\r\n\t\tif ( afterCb ) {\r\n\r\n\t\t\tafterCb( tile, parent, depth );\r\n\r\n\t\t}\r\n\r\n\t\treturn;\r\n\r\n\t}\r\n\r\n\tconst children = tile.children;\r\n\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\r\n\r\n\t\ttraverseSet( children[ i ], beforeCb, afterCb, tile, depth + 1 );\r\n\r\n\t}\r\n\r\n\tif ( afterCb ) {\r\n\r\n\t\tafterCb( tile, parent, depth );\r\n\r\n\t}\r\n\r\n}\r\n\r\n// Determine which tiles are within the camera frustum.\r\n// TODO: this is marking items as used in the lrucache, which means some data is\r\n// being kept around that isn't being used -- is that okay?\r\nfunction determineFrustumSet( tile, renderer ) {\r\n\r\n\tconst stats = renderer.stats;\r\n\tconst frameCount = renderer.frameCount;\r\n\tconst errorTarget = renderer.errorTarget;\r\n\tconst maxDepth = renderer.maxDepth;\r\n\tconst loadSiblings = renderer.loadSiblings;\r\n\tconst lruCache = renderer.lruCache;\r\n\tconst stopAtEmptyTiles = renderer.stopAtEmptyTiles;\r\n\tresetFrameState( tile, frameCount );\r\n\r\n\t// Early out if this tile is not within view.\r\n\tconst inFrustum = renderer.tileInView( tile );\r\n\tif ( inFrustum === false ) {\r\n\r\n\t\treturn false;\r\n\r\n\t}\r\n\r\n\ttile.__used = true;\r\n\tlruCache.markUsed( tile );\r\n\r\n\ttile.__inFrustum = true;\r\n\tstats.inFrustum ++;\r\n\r\n\t// Early out if this tile has less error than we're targeting but don't stop\r\n\t// at an external tile set.\r\n\tif ( ( stopAtEmptyTiles || ! tile.__contentEmpty ) && ! tile.__externalTileSet ) {\r\n\r\n\t\tconst error = renderer.calculateError( tile );\r\n\t\ttile.__error = error;\r\n\t\tif ( error <= errorTarget ) {\r\n\r\n\t\t\treturn true;\r\n\r\n\t\t}\r\n\r\n\t\t// Early out if we've reached the maximum allowed depth.\r\n\t\tif ( renderer.maxDepth > 0 && tile.__depth + 1 >= maxDepth ) {\r\n\r\n\t\t\treturn true;\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t// Traverse children and see if any children are in view.\r\n\tlet anyChildrenUsed = false;\r\n\tconst children = tile.children;\r\n\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\r\n\r\n\t\tconst c = children[ i ];\r\n\t\tconst r = determineFrustumSet( c, renderer );\r\n\t\tanyChildrenUsed = anyChildrenUsed || r;\r\n\r\n\t}\r\n\r\n\t// If there are children within view and we are loading siblings then mark\r\n\t// all sibling tiles as used, as well.\r\n\tif ( anyChildrenUsed && loadSiblings ) {\r\n\r\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\r\n\r\n\t\t\tconst c = children[ i ];\r\n\t\t\trecursivelyMarkUsed( c, frameCount, lruCache );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\treturn true;\r\n\r\n}\r\n\r\n// Traverse and mark the tiles that are at the leaf nodes of the \"used\" tree.\r\nfunction markUsedSetLeaves( tile, renderer ) {\r\n\r\n\tconst stats = renderer.stats;\r\n\tconst frameCount = renderer.frameCount;\r\n\tif ( ! isUsedThisFrame( tile, frameCount ) ) {\r\n\r\n\t\treturn;\r\n\r\n\t}\r\n\r\n\tstats.used ++;\r\n\r\n\t// This tile is a leaf if none of the children had been used.\r\n\tconst children = tile.children;\r\n\tlet anyChildrenUsed = false;\r\n\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\r\n\r\n\t\tconst c = children[ i ];\r\n\t\tanyChildrenUsed = anyChildrenUsed || isUsedThisFrame( c, frameCount );\r\n\r\n\t}\r\n\r\n\r\n\tif ( ! anyChildrenUsed ) {\r\n\r\n\t\t// TODO: This isn't necessarily right because it's possible that a parent tile is considered in the\r\n\t\t// frustum while the child tiles are not, making them unused. If all children have loaded and were properly\r\n\t\t// considered to be in the used set then we shouldn't set ourselves to a leaf here.\r\n\t\ttile.__isLeaf = true;\r\n\r\n\t} else {\r\n\r\n\t\tlet childrenWereVisible = false;\r\n\t\tlet allChildrenLoaded = true;\r\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\r\n\r\n\t\t\tconst c = children[ i ];\r\n\t\t\tmarkUsedSetLeaves( c, renderer );\r\n\t\t\tchildrenWereVisible = childrenWereVisible || c.__wasSetVisible || c.__childrenWereVisible;\r\n\r\n\t\t\tif ( isUsedThisFrame( c, frameCount ) ) {\r\n\r\n\t\t\t\tconst childLoaded =\r\n\t\t\t\t\tc.__allChildrenLoaded ||\r\n\t\t\t\t\t( ! c.__contentEmpty && isDownloadFinished( c.__loadingState ) ) ||\r\n\t\t\t\t\t( c.__externalTileSet && c.__loadingState === _constants_js__WEBPACK_IMPORTED_MODULE_0__[\"FAILED\"] );\r\n\t\t\t\tallChildrenLoaded = allChildrenLoaded && childLoaded;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\ttile.__childrenWereVisible = childrenWereVisible;\r\n\t\ttile.__allChildrenLoaded = allChildrenLoaded;\r\n\r\n\r\n\t}\r\n\r\n}\r\n\r\n// Skip past tiles we consider unrenderable because they are outside the error threshold.\r\nfunction skipTraversal( tile, renderer ) {\r\n\r\n\tconst stats = renderer.stats;\r\n\tconst frameCount = renderer.frameCount;\r\n\tif ( ! isUsedThisFrame( tile, frameCount ) ) {\r\n\r\n\t\treturn;\r\n\r\n\t}\r\n\r\n\tconst parent = tile.parent;\r\n\tconst parentDepthToParent = parent ? parent.__depthFromRenderedParent : - 1;\r\n\ttile.__depthFromRenderedParent = parentDepthToParent;\r\n\r\n\t// Request the tile contents or mark it as visible if we've found a leaf.\r\n\tconst lruCache = renderer.lruCache;\r\n\tif ( tile.__isLeaf ) {\r\n\r\n\t\ttile.__depthFromRenderedParent ++;\r\n\r\n\t\tif ( tile.__loadingState === _constants_js__WEBPACK_IMPORTED_MODULE_0__[\"LOADED\"] ) {\r\n\r\n\t\t\tif ( tile.__inFrustum ) {\r\n\r\n\t\t\t\ttile.__visible = true;\r\n\t\t\t\tstats.visible ++;\r\n\r\n\t\t\t}\r\n\t\t\ttile.__active = true;\r\n\t\t\tstats.active ++;\r\n\r\n\t\t} else if ( ! lruCache.isFull() && ( ! tile.__contentEmpty || tile.__externalTileSet ) ) {\r\n\r\n\t\t\trenderer.requestTileContents( tile );\r\n\r\n\t\t}\r\n\r\n\t\treturn;\r\n\r\n\t}\r\n\r\n\tconst errorRequirement = ( renderer.errorTarget + 1 ) * renderer.errorThreshold;\r\n\tconst meetsSSE = tile.__error <= errorRequirement;\r\n\tconst includeTile = meetsSSE || tile.refine === 'ADD';\r\n\tconst hasModel = ! tile.__contentEmpty;\r\n\tconst hasContent = hasModel || tile.__externalTileSet;\r\n\tconst loadedContent = isDownloadFinished( tile.__loadingState ) && hasContent;\r\n\tconst childrenWereVisible = tile.__childrenWereVisible;\r\n\tconst children = tile.children;\r\n\tlet allChildrenHaveContent = tile.__allChildrenLoaded;\r\n\r\n\t// Increment the relative depth of the node to the nearest rendered parent if it has content\r\n\t// and is being rendered.\r\n\tif ( includeTile && hasModel ) {\r\n\r\n\t\ttile.__depthFromRenderedParent ++;\r\n\r\n\t}\r\n\r\n\t// If we've met the SSE requirements and we can load content then fire a fetch.\r\n\tif ( includeTile && ! loadedContent && ! lruCache.isFull() && hasContent ) {\r\n\r\n\t\trenderer.requestTileContents( tile );\r\n\r\n\t}\r\n\r\n\t// Only mark this tile as visible if it meets the screen space error requirements, has loaded content, not\r\n\t// all children have loaded yet, and if no children were visible last frame. We want to keep children visible\r\n\t// that _were_ visible to avoid a pop in level of detail as the camera moves around and parent / sibling tiles\r\n\t// load in.\r\n\r\n\t// Skip the tile entirely if there's no content to load\r\n\tif (\r\n\t\t( meetsSSE && ! allChildrenHaveContent && ! childrenWereVisible && loadedContent )\r\n\t\t\t|| ( tile.refine === 'ADD' && loadedContent )\r\n\t) {\r\n\r\n\t\tif ( tile.__inFrustum ) {\r\n\r\n\t\t\ttile.__visible = true;\r\n\t\t\tstats.visible ++;\r\n\r\n\t\t}\r\n\t\ttile.__active = true;\r\n\t\tstats.active ++;\r\n\r\n\t}\r\n\r\n\t// If we're additive then don't stop the traversal here because it doesn't matter whether the children load in\r\n\t// at the same rate.\r\n\tif ( tile.refine !== 'ADD' && meetsSSE && ! allChildrenHaveContent && loadedContent ) {\r\n\r\n\t\t// load the child content if we've found that we've been loaded so we can move down to the next tile\r\n\t\t// layer when the data has loaded.\r\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\r\n\r\n\t\t\tconst c = children[ i ];\r\n\t\t\tif ( isUsedThisFrame( c, frameCount ) && ! lruCache.isFull() ) {\r\n\r\n\t\t\t\tc.__depthFromRenderedParent = tile.__depthFromRenderedParent + 1;\r\n\t\t\t\trecursivelyLoadTiles( c, c.__depthFromRenderedParent, renderer );\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t} else {\r\n\r\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\r\n\r\n\t\t\tconst c = children[ i ];\r\n\t\t\tif ( isUsedThisFrame( c, frameCount ) ) {\r\n\r\n\t\t\t\tskipTraversal( c, renderer );\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n}\r\n\r\n// Final traverse to toggle tile visibility.\r\nfunction toggleTiles( tile, renderer ) {\r\n\r\n\tconst frameCount = renderer.frameCount;\r\n\tconst isUsed = isUsedThisFrame( tile, frameCount );\r\n\tif ( isUsed || tile.__usedLastFrame ) {\r\n\r\n\t\tlet setActive = false;\r\n\t\tlet setVisible = false;\r\n\t\tif ( isUsed ) {\r\n\r\n\t\t\t// enable visibility if active due to shadows\r\n\t\t\tsetActive = tile.__active;\r\n\t\t\tif ( renderer.displayActiveTiles ) {\r\n\r\n\t\t\t\tsetVisible = tile.__active || tile.__visible;\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tsetVisible = tile.__visible;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t// If the active or visible state changed then call the functions.\r\n\t\tif ( ! tile.__contentEmpty && tile.__loadingState === _constants_js__WEBPACK_IMPORTED_MODULE_0__[\"LOADED\"] ) {\r\n\r\n\t\t\tif ( tile.__wasSetActive !== setActive ) {\r\n\r\n\t\t\t\trenderer.setTileActive( tile, setActive );\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif ( tile.__wasSetVisible !== setVisible ) {\r\n\r\n\t\t\t\trenderer.setTileVisible( tile, setVisible );\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\ttile.__wasSetActive = setActive;\r\n\t\ttile.__wasSetVisible = setVisible;\r\n\t\ttile.__usedLastFrame = isUsed;\r\n\r\n\t\tconst children = tile.children;\r\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\r\n\r\n\t\t\tconst c = children[ i ];\r\n\t\t\ttoggleTiles( c, renderer );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n}\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/base/traverseFunctions.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/index.js": +/*!*****************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/index.js ***! + \*****************************************************/ +/*! exports provided: DebugTilesRenderer, TilesRenderer, B3DMLoader, PNTSLoader, I3DMLoader, CMPTLoader, TilesRendererBase, B3DMLoaderBase, I3DMLoaderBase, PNTSLoaderBase, CMPTLoaderBase, LRUCache, PriorityQueue, NONE, SCREEN_ERROR, GEOMETRIC_ERROR, DISTANCE, DEPTH, RELATIVE_DEPTH, IS_LEAF, RANDOM_COLOR */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _three_DebugTilesRenderer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./three/DebugTilesRenderer.js */ \"./node_modules/3d-tiles-renderer/src/three/DebugTilesRenderer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"DebugTilesRenderer\", function() { return _three_DebugTilesRenderer_js__WEBPACK_IMPORTED_MODULE_0__[\"DebugTilesRenderer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"NONE\", function() { return _three_DebugTilesRenderer_js__WEBPACK_IMPORTED_MODULE_0__[\"NONE\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"SCREEN_ERROR\", function() { return _three_DebugTilesRenderer_js__WEBPACK_IMPORTED_MODULE_0__[\"SCREEN_ERROR\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"GEOMETRIC_ERROR\", function() { return _three_DebugTilesRenderer_js__WEBPACK_IMPORTED_MODULE_0__[\"GEOMETRIC_ERROR\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"DISTANCE\", function() { return _three_DebugTilesRenderer_js__WEBPACK_IMPORTED_MODULE_0__[\"DISTANCE\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"DEPTH\", function() { return _three_DebugTilesRenderer_js__WEBPACK_IMPORTED_MODULE_0__[\"DEPTH\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"RELATIVE_DEPTH\", function() { return _three_DebugTilesRenderer_js__WEBPACK_IMPORTED_MODULE_0__[\"RELATIVE_DEPTH\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"IS_LEAF\", function() { return _three_DebugTilesRenderer_js__WEBPACK_IMPORTED_MODULE_0__[\"IS_LEAF\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"RANDOM_COLOR\", function() { return _three_DebugTilesRenderer_js__WEBPACK_IMPORTED_MODULE_0__[\"RANDOM_COLOR\"]; });\n\n/* harmony import */ var _three_TilesRenderer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./three/TilesRenderer.js */ \"./node_modules/3d-tiles-renderer/src/three/TilesRenderer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"TilesRenderer\", function() { return _three_TilesRenderer_js__WEBPACK_IMPORTED_MODULE_1__[\"TilesRenderer\"]; });\n\n/* harmony import */ var _three_B3DMLoader_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./three/B3DMLoader.js */ \"./node_modules/3d-tiles-renderer/src/three/B3DMLoader.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"B3DMLoader\", function() { return _three_B3DMLoader_js__WEBPACK_IMPORTED_MODULE_2__[\"B3DMLoader\"]; });\n\n/* harmony import */ var _three_PNTSLoader_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./three/PNTSLoader.js */ \"./node_modules/3d-tiles-renderer/src/three/PNTSLoader.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"PNTSLoader\", function() { return _three_PNTSLoader_js__WEBPACK_IMPORTED_MODULE_3__[\"PNTSLoader\"]; });\n\n/* harmony import */ var _three_I3DMLoader_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./three/I3DMLoader.js */ \"./node_modules/3d-tiles-renderer/src/three/I3DMLoader.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"I3DMLoader\", function() { return _three_I3DMLoader_js__WEBPACK_IMPORTED_MODULE_4__[\"I3DMLoader\"]; });\n\n/* harmony import */ var _three_CMPTLoader_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./three/CMPTLoader.js */ \"./node_modules/3d-tiles-renderer/src/three/CMPTLoader.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"CMPTLoader\", function() { return _three_CMPTLoader_js__WEBPACK_IMPORTED_MODULE_5__[\"CMPTLoader\"]; });\n\n/* harmony import */ var _base_TilesRendererBase_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./base/TilesRendererBase.js */ \"./node_modules/3d-tiles-renderer/src/base/TilesRendererBase.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"TilesRendererBase\", function() { return _base_TilesRendererBase_js__WEBPACK_IMPORTED_MODULE_6__[\"TilesRendererBase\"]; });\n\n/* harmony import */ var _base_B3DMLoaderBase_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./base/B3DMLoaderBase.js */ \"./node_modules/3d-tiles-renderer/src/base/B3DMLoaderBase.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"B3DMLoaderBase\", function() { return _base_B3DMLoaderBase_js__WEBPACK_IMPORTED_MODULE_7__[\"B3DMLoaderBase\"]; });\n\n/* harmony import */ var _base_I3DMLoaderBase_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./base/I3DMLoaderBase.js */ \"./node_modules/3d-tiles-renderer/src/base/I3DMLoaderBase.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"I3DMLoaderBase\", function() { return _base_I3DMLoaderBase_js__WEBPACK_IMPORTED_MODULE_8__[\"I3DMLoaderBase\"]; });\n\n/* harmony import */ var _base_PNTSLoaderBase_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./base/PNTSLoaderBase.js */ \"./node_modules/3d-tiles-renderer/src/base/PNTSLoaderBase.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"PNTSLoaderBase\", function() { return _base_PNTSLoaderBase_js__WEBPACK_IMPORTED_MODULE_9__[\"PNTSLoaderBase\"]; });\n\n/* harmony import */ var _base_CMPTLoaderBase_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./base/CMPTLoaderBase.js */ \"./node_modules/3d-tiles-renderer/src/base/CMPTLoaderBase.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"CMPTLoaderBase\", function() { return _base_CMPTLoaderBase_js__WEBPACK_IMPORTED_MODULE_10__[\"CMPTLoaderBase\"]; });\n\n/* harmony import */ var _utilities_LRUCache_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utilities/LRUCache.js */ \"./node_modules/3d-tiles-renderer/src/utilities/LRUCache.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"LRUCache\", function() { return _utilities_LRUCache_js__WEBPACK_IMPORTED_MODULE_11__[\"LRUCache\"]; });\n\n/* harmony import */ var _utilities_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utilities/PriorityQueue.js */ \"./node_modules/3d-tiles-renderer/src/utilities/PriorityQueue.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"PriorityQueue\", function() { return _utilities_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_12__[\"PriorityQueue\"]; });\n\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/index.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/three/B3DMLoader.js": +/*!****************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/three/B3DMLoader.js ***! + \****************************************************************/ +/*! exports provided: B3DMLoader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"B3DMLoader\", function() { return B3DMLoader; });\n/* harmony import */ var _base_B3DMLoaderBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../base/B3DMLoaderBase.js */ \"./node_modules/3d-tiles-renderer/src/base/B3DMLoaderBase.js\");\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ \"./node_modules/three/build/three.module.js\");\n/* harmony import */ var three_examples_jsm_loaders_GLTFLoader_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! three/examples/jsm/loaders/GLTFLoader.js */ \"./node_modules/three/examples/jsm/loaders/GLTFLoader.js\");\n\r\n\r\n\r\n\r\nclass B3DMLoader extends _base_B3DMLoaderBase_js__WEBPACK_IMPORTED_MODULE_0__[\"B3DMLoaderBase\"] {\r\n\r\n\tconstructor( manager = three__WEBPACK_IMPORTED_MODULE_1__[\"DefaultLoadingManager\"] ) {\r\n\r\n\t\tsuper();\r\n\t\tthis.manager = manager;\r\n\r\n\t}\r\n\r\n\tparse( buffer ) {\r\n\r\n\t\tconst b3dm = super.parse( buffer );\r\n\t\tconst gltfBuffer = b3dm.glbBytes.slice().buffer;\r\n\t\treturn new Promise( ( resolve, reject ) => {\r\n\r\n\t\t\tconst manager = this.manager;\r\n\t\t\tconst loader = manager.getHandler( 'path.gltf' ) || new three_examples_jsm_loaders_GLTFLoader_js__WEBPACK_IMPORTED_MODULE_2__[\"GLTFLoader\"]( manager );\r\n\t\t\tloader.parse( gltfBuffer, null, model => {\r\n\r\n\t\t\t\tconst { batchTable, featureTable } = b3dm;\r\n\t\t\t\tconst { scene } = model;\r\n\r\n\t\t\t\tconst rtcCenter = featureTable.getData( 'RTC_CENTER' );\r\n\t\t\t\tif ( rtcCenter ) {\r\n\r\n\t\t\t\t\tscene.position.x += rtcCenter[ 0 ];\r\n\t\t\t\t\tscene.position.y += rtcCenter[ 1 ];\r\n\t\t\t\t\tscene.position.z += rtcCenter[ 2 ];\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmodel.batchTable = batchTable;\r\n\t\t\t\tmodel.featureTable = featureTable;\r\n\r\n\t\t\t\tscene.batchTable = batchTable;\r\n\t\t\t\tscene.featureTable = featureTable;\r\n\r\n\t\t\t\tresolve( model );\r\n\r\n\t\t\t}, reject );\r\n\r\n\t\t} );\r\n\r\n\t}\r\n\r\n}\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/three/B3DMLoader.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/three/CMPTLoader.js": +/*!****************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/three/CMPTLoader.js ***! + \****************************************************************/ +/*! exports provided: CMPTLoader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CMPTLoader\", function() { return CMPTLoader; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! three */ \"./node_modules/three/build/three.module.js\");\n/* harmony import */ var _base_CMPTLoaderBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/CMPTLoaderBase.js */ \"./node_modules/3d-tiles-renderer/src/base/CMPTLoaderBase.js\");\n/* harmony import */ var _B3DMLoader_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./B3DMLoader.js */ \"./node_modules/3d-tiles-renderer/src/three/B3DMLoader.js\");\n/* harmony import */ var _PNTSLoader_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PNTSLoader.js */ \"./node_modules/3d-tiles-renderer/src/three/PNTSLoader.js\");\n/* harmony import */ var _I3DMLoader_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./I3DMLoader.js */ \"./node_modules/3d-tiles-renderer/src/three/I3DMLoader.js\");\n\r\n\r\n\r\n\r\n\r\n\r\nclass CMPTLoader extends _base_CMPTLoaderBase_js__WEBPACK_IMPORTED_MODULE_1__[\"CMPTLoaderBase\"] {\r\n\r\n\tconstructor( manager = three__WEBPACK_IMPORTED_MODULE_0__[\"DefaultLoadingManager\"] ) {\r\n\r\n\t\tsuper();\r\n\t\tthis.manager = manager;\r\n\r\n\t}\r\n\r\n\tparse( buffer ) {\r\n\r\n\t\tconst result = super.parse( buffer );\r\n\t\tconst manager = this.manager;\r\n\t\tconst group = new three__WEBPACK_IMPORTED_MODULE_0__[\"Group\"]();\r\n\t\tconst results = [];\r\n\t\tconst promises = [];\r\n\r\n\t\tfor ( const i in result.tiles ) {\r\n\r\n\t\t\tconst { type, buffer } = result.tiles[ i ];\r\n\t\t\tswitch ( type ) {\r\n\r\n\t\t\t\tcase 'b3dm': {\r\n\r\n\t\t\t\t\tconst slicedBuffer = buffer.slice();\r\n\t\t\t\t\tconst promise = new _B3DMLoader_js__WEBPACK_IMPORTED_MODULE_2__[\"B3DMLoader\"]( manager )\r\n\t\t\t\t\t\t.parse( slicedBuffer.buffer )\r\n\t\t\t\t\t\t.then( res => {\r\n\r\n\t\t\t\t\t\t\tresults.push( res );\r\n\t\t\t\t\t\t\tgroup.add( res.scene );\r\n\r\n\t\t\t\t\t\t} );\r\n\r\n\t\t\t\t\tpromises.push( promise );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcase 'pnts': {\r\n\r\n\t\t\t\t\tconst slicedBuffer = buffer.slice();\r\n\t\t\t\t\tconst pointsResult = new _PNTSLoader_js__WEBPACK_IMPORTED_MODULE_3__[\"PNTSLoader\"]( manager ).parse( slicedBuffer.buffer );\r\n\t\t\t\t\tresults.push( pointsResult );\r\n\t\t\t\t\tgroup.add( pointsResult.scene );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcase 'i3dm': {\r\n\r\n\t\t\t\t\tconst slicedBuffer = buffer.slice();\r\n\t\t\t\t\tconst loader = new _I3DMLoader_js__WEBPACK_IMPORTED_MODULE_4__[\"I3DMLoader\"]( manager );\r\n\t\t\t\t\tloader.workingPath = this.workingPath;\r\n\t\t\t\t\tloader.fetchOptions = this.fetchOptions;\r\n\r\n\t\t\t\t\tconst promise = loader\r\n\t\t\t\t\t\t.parse( slicedBuffer.buffer )\r\n\t\t\t\t\t\t.then( res => {\r\n\r\n\t\t\t\t\t\t\tresults.push( res );\r\n\t\t\t\t\t\t\tgroup.add( res.scene );\r\n\r\n\t\t\t\t\t\t} );\r\n\t\t\t\t\tpromises.push( promise );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn Promise.all( promises ).then( () => {\r\n\r\n\t\t\treturn {\r\n\r\n\t\t\t\ttiles: results,\r\n\t\t\t\tscene: group,\r\n\r\n\t\t\t};\r\n\r\n\t\t} );\r\n\r\n\t}\r\n\r\n}\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/three/CMPTLoader.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/three/DebugTilesRenderer.js": +/*!************************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/three/DebugTilesRenderer.js ***! + \************************************************************************/ +/*! exports provided: NONE, SCREEN_ERROR, GEOMETRIC_ERROR, DISTANCE, DEPTH, RELATIVE_DEPTH, IS_LEAF, RANDOM_COLOR, DebugTilesRenderer */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NONE\", function() { return NONE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SCREEN_ERROR\", function() { return SCREEN_ERROR; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GEOMETRIC_ERROR\", function() { return GEOMETRIC_ERROR; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DISTANCE\", function() { return DISTANCE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DEPTH\", function() { return DEPTH; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RELATIVE_DEPTH\", function() { return RELATIVE_DEPTH; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"IS_LEAF\", function() { return IS_LEAF; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RANDOM_COLOR\", function() { return RANDOM_COLOR; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DebugTilesRenderer\", function() { return DebugTilesRenderer; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! three */ \"./node_modules/three/build/three.module.js\");\n/* harmony import */ var _TilesRenderer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TilesRenderer.js */ \"./node_modules/3d-tiles-renderer/src/three/TilesRenderer.js\");\n/* harmony import */ var _SphereHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SphereHelper.js */ \"./node_modules/3d-tiles-renderer/src/three/SphereHelper.js\");\n\r\n\r\n\r\n\r\nconst ORIGINAL_MATERIAL = Symbol( 'ORIGINAL_MATERIAL' );\r\nconst HAS_RANDOM_COLOR = Symbol( 'HAS_RANDOM_COLOR' );\r\n\r\nfunction emptyRaycast() {}\r\n\r\nconst NONE = 0;\r\nconst SCREEN_ERROR = 1;\r\nconst GEOMETRIC_ERROR = 2;\r\nconst DISTANCE = 3;\r\nconst DEPTH = 4;\r\nconst RELATIVE_DEPTH = 5;\r\nconst IS_LEAF = 6;\r\nconst RANDOM_COLOR = 7;\r\n\r\nclass DebugTilesRenderer extends _TilesRenderer_js__WEBPACK_IMPORTED_MODULE_1__[\"TilesRenderer\"] {\r\n\r\n\tconstructor( ...args ) {\r\n\r\n\t\tsuper( ...args );\r\n\r\n\t\tconst tilesGroup = this.group;\r\n\t\tconst boxGroup = new three__WEBPACK_IMPORTED_MODULE_0__[\"Group\"]();\r\n\t\ttilesGroup.add( boxGroup );\r\n\r\n\t\tconst sphereGroup = new three__WEBPACK_IMPORTED_MODULE_0__[\"Group\"]();\r\n\t\ttilesGroup.add( sphereGroup );\r\n\r\n\t\tthis.displayBoxBounds = false;\r\n\t\tthis.displaySphereBounds = false;\r\n\t\tthis.colorMode = NONE;\r\n\t\tthis.boxGroup = boxGroup;\r\n\t\tthis.sphereGroup = sphereGroup;\r\n\t\tthis.maxDebugDepth = - 1;\r\n\t\tthis.maxDebugDistance = - 1;\r\n\t\tthis.maxDebugError = - 1;\r\n\r\n\t\tthis.extremeDebugDepth = - 1;\r\n\t\tthis.extremeDebugError = - 1;\r\n\r\n\t}\r\n\r\n\tinitExtremes() {\r\n\r\n\t\t// initialize the extreme values of the hierarchy\r\n\t\tlet maxDepth = - 1;\r\n\t\tthis.traverse( tile => {\r\n\r\n\t\t\tmaxDepth = Math.max( maxDepth, tile.__depth );\r\n\r\n\t\t} );\r\n\r\n\t\tlet maxError = - 1;\r\n\t\tthis.traverse( tile => {\r\n\r\n\t\t\tmaxError = Math.max( maxError, tile.geometricError );\r\n\r\n\t\t} );\r\n\r\n\t\tthis.extremeDebugDepth = maxDepth;\r\n\t\tthis.extremeDebugError = maxError;\r\n\r\n\t}\r\n\r\n\tloadTileSet( ...args ) {\r\n\r\n\t\tconst pr = super.loadTileSet( ...args );\r\n\t\tpr\r\n\t\t\t.then( () => this.initExtremes() )\r\n\t\t\t.catch( () => {\r\n\r\n\t\t\t\t// error is logged internally\r\n\r\n\t\t\t} );\r\n\r\n\t\treturn pr;\r\n\r\n\t}\r\n\r\n\tgetTileInformationFromActiveObject( object ) {\r\n\r\n\t\t// Find which tile this scene is associated with. This is slow and\r\n\t\t// intended for debug purposes only.\r\n\t\tlet targetTile = null;\r\n\t\tconst activeTiles = this.activeTiles;\r\n\t\tactiveTiles.forEach( tile => {\r\n\r\n\t\t\tif ( targetTile ) {\r\n\r\n\t\t\t\treturn true;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tconst scene = tile.cached.scene;\r\n\t\t\tif ( scene ) {\r\n\r\n\t\t\t\tscene.traverse( c => {\r\n\r\n\t\t\t\t\tif ( c === object ) {\r\n\r\n\t\t\t\t\t\ttargetTile = tile;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} );\r\n\r\n\t\t\t}\r\n\r\n\t\t} );\r\n\r\n\t\tif ( targetTile ) {\r\n\r\n\t\t\treturn {\r\n\r\n\t\t\t\tdistanceToCamera: targetTile.cached.distance,\r\n\t\t\t\tgeometricError: targetTile.geometricError,\r\n\t\t\t\tscreenSpaceError: targetTile.__error,\r\n\t\t\t\tdepth: targetTile.__depth,\r\n\t\t\t\tisLeaf: targetTile.__isLeaf\r\n\r\n\t\t\t};\r\n\r\n\t\t} else {\r\n\r\n\t\t\treturn null;\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tupdate() {\r\n\r\n\t\tsuper.update();\r\n\r\n\t\tif ( ! this.root ) {\r\n\r\n\t\t\treturn;\r\n\r\n\t\t}\r\n\r\n\t\t// set box or sphere visibility\r\n\t\tthis.boxGroup.visible = this.displayBoxBounds;\r\n\t\tthis.sphereGroup.visible = this.displaySphereBounds;\r\n\r\n\t\t// get max values to use for materials\r\n\t\tlet maxDepth = - 1;\r\n\t\tif ( this.maxDebugDepth === - 1 ) {\r\n\r\n\t\t\tmaxDepth = this.extremeDebugDepth;\r\n\r\n\t\t} else {\r\n\r\n\t\t\tmaxDepth = this.maxDebugDepth;\r\n\r\n\t\t}\r\n\r\n\t\tlet maxError = - 1;\r\n\t\tif ( this.maxDebugError === - 1 ) {\r\n\r\n\t\t\tmaxError = this.extremeDebugError;\r\n\r\n\t\t} else {\r\n\r\n\t\t\tmaxError = this.maxDebugError;\r\n\r\n\t\t}\r\n\r\n\t\tlet maxDistance = - 1;\r\n\t\tif ( this.maxDebugDistance === - 1 ) {\r\n\r\n\t\t\tmaxDistance = this.root.cached.sphere.radius;\r\n\r\n\t\t} else {\r\n\r\n\t\t\tmaxDistance = this.maxDebugDistance;\r\n\r\n\t\t}\r\n\r\n\t\tconst errorTarget = this.errorTarget;\r\n\t\tconst colorMode = this.colorMode;\r\n\t\tconst visibleTiles = this.visibleTiles;\r\n\t\tvisibleTiles.forEach( tile => {\r\n\r\n\t\t\tconst scene = tile.cached.scene;\r\n\r\n\t\t\t// create a random color per-tile\r\n\t\t\tlet h, s, l;\r\n\t\t\tif ( colorMode === RANDOM_COLOR ) {\r\n\r\n\t\t\t\th = Math.random();\r\n\t\t\t\ts = 0.5 + Math.random() * 0.5;\r\n\t\t\t\tl = 0.375 + Math.random() * 0.25;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tscene.traverse( c => {\r\n\r\n\t\t\t\tconst currMaterial = c.material;\r\n\t\t\t\tif ( currMaterial ) {\r\n\r\n\t\t\t\t\t// Reset the material if needed\r\n\t\t\t\t\tconst originalMaterial = c[ ORIGINAL_MATERIAL ];\r\n\t\t\t\t\tif ( colorMode === NONE && currMaterial !== originalMaterial ) {\r\n\r\n\t\t\t\t\t\tc.material.dispose();\r\n\t\t\t\t\t\tc.material = c[ ORIGINAL_MATERIAL ];\r\n\r\n\t\t\t\t\t} else if ( colorMode !== NONE && currMaterial === originalMaterial ) {\r\n\r\n\t\t\t\t\t\tif ( c.isPoints ) {\r\n\r\n\t\t\t\t\t\t\tconst pointsMaterial = new three__WEBPACK_IMPORTED_MODULE_0__[\"PointsMaterial\"]();\r\n\t\t\t\t\t\t\tpointsMaterial.size = originalMaterial.size;\r\n\t\t\t\t\t\t\tpointsMaterial.sizeAttenuation = originalMaterial.sizeAttenuation;\r\n\t\t\t\t\t\t\tc.material = pointsMaterial;\r\n\r\n\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\tc.material = new three__WEBPACK_IMPORTED_MODULE_0__[\"MeshBasicMaterial\"]();\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ( colorMode !== RANDOM_COLOR ) {\r\n\r\n\t\t\t\t\t\tdelete c.material[ HAS_RANDOM_COLOR ];\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Set the color on the basic material\r\n\t\t\t\t\tswitch ( colorMode ) {\r\n\r\n\t\t\t\t\t\tcase DEPTH: {\r\n\r\n\t\t\t\t\t\t\tconst val = tile.__depth / maxDepth;\r\n\t\t\t\t\t\t\tc.material.color.setRGB( val, val, val );\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcase RELATIVE_DEPTH: {\r\n\r\n\t\t\t\t\t\t\tconst val = tile.__depthFromRenderedParent / maxDepth;\r\n\t\t\t\t\t\t\tc.material.color.setRGB( val, val, val );\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcase SCREEN_ERROR: {\r\n\r\n\t\t\t\t\t\t\tconst val = tile.__error / errorTarget;\r\n\t\t\t\t\t\t\tif ( val > 1.0 ) {\r\n\r\n\t\t\t\t\t\t\t\tc.material.color.setRGB( 1.0, 0.0, 0.0 );\r\n\r\n\t\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t\tc.material.color.setRGB( val, val, val );\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcase GEOMETRIC_ERROR: {\r\n\r\n\t\t\t\t\t\t\tconst val = Math.min( tile.geometricError / maxError, 1 );\r\n\t\t\t\t\t\t\tc.material.color.setRGB( val, val, val );\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcase DISTANCE: {\r\n\r\n\t\t\t\t\t\t\t// We don't update the distance if the geometric error is 0.0 so\r\n\t\t\t\t\t\t\t// it will always be black.\r\n\t\t\t\t\t\t\tconst val = Math.min( tile.cached.distance / maxDistance, 1 );\r\n\t\t\t\t\t\t\tc.material.color.setRGB( val, val, val );\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcase IS_LEAF: {\r\n\r\n\t\t\t\t\t\t\tif ( ! tile.children || tile.children.length === 0 ) {\r\n\r\n\t\t\t\t\t\t\t\tc.material.color.set( 0xffffff );\r\n\r\n\t\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t\tc.material.color.set( 0 );\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcase RANDOM_COLOR: {\r\n\r\n\t\t\t\t\t\t\tif ( ! c.material[ HAS_RANDOM_COLOR ] ) {\r\n\r\n\t\t\t\t\t\t\t\tc.material.color.setHSL( h, s, l );\r\n\t\t\t\t\t\t\t\tc.material[ HAS_RANDOM_COLOR ] = true;\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} );\r\n\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\tsetTileVisible( tile, visible ) {\r\n\r\n\t\tsuper.setTileVisible( tile, visible );\r\n\r\n\t\tconst cached = tile.cached;\r\n\t\tconst sphereGroup = this.sphereGroup;\r\n\t\tconst boxGroup = this.boxGroup;\r\n\t\tconst boxHelperGroup = cached.boxHelperGroup;\r\n\t\tconst sphereHelper = cached.sphereHelper;\r\n\r\n\t\tif ( ! visible ) {\r\n\r\n\t\t\tboxGroup.remove( boxHelperGroup );\r\n\t\t\tsphereGroup.remove( sphereHelper );\r\n\r\n\t\t} else {\r\n\r\n\t\t\tboxGroup.add( boxHelperGroup );\r\n\t\t\tboxHelperGroup.updateMatrixWorld( true );\r\n\r\n\t\t\tsphereGroup.add( sphereHelper );\r\n\t\t\tsphereHelper.updateMatrixWorld( true );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tparseTile( buffer, tile, extension ) {\r\n\r\n\t\treturn super\r\n\t\t\t.parseTile( buffer, tile, extension )\r\n\t\t\t.then( () => {\r\n\r\n\t\t\t\tconst cached = tile.cached;\r\n\t\t\t\tconst scene = cached.scene;\r\n\t\t\t\tif ( scene ) {\r\n\r\n\t\t\t\t\tconst cachedBox = cached.box;\r\n\t\t\t\t\tconst cachedBoxMat = cached.boxTransform;\r\n\r\n\t\t\t\t\t// Create debug bounding box\r\n\t\t\t\t\tconst boxHelperGroup = new three__WEBPACK_IMPORTED_MODULE_0__[\"Group\"]();\r\n\t\t\t\t\tboxHelperGroup.matrix.copy( cachedBoxMat );\r\n\t\t\t\t\tboxHelperGroup.matrix.decompose( boxHelperGroup.position, boxHelperGroup.quaternion, boxHelperGroup.scale );\r\n\r\n\t\t\t\t\tconst boxHelper = new three__WEBPACK_IMPORTED_MODULE_0__[\"Box3Helper\"]( cachedBox );\r\n\t\t\t\t\tboxHelper.raycast = emptyRaycast;\r\n\t\t\t\t\tboxHelperGroup.add( boxHelper );\r\n\r\n\t\t\t\t\tcached.boxHelperGroup = boxHelperGroup;\r\n\r\n\t\t\t\t\tif ( this.visibleTiles.has( tile ) && this.displayBoxBounds ) {\r\n\r\n\t\t\t\t\t\tthis.boxGroup.add( boxHelperGroup );\r\n\t\t\t\t\t\tboxHelperGroup.updateMatrixWorld( true );\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Create debugbounding sphere\r\n\t\t\t\t\tconst cachedSphere = cached.sphere;\r\n\t\t\t\t\tconst sphereHelper = new _SphereHelper_js__WEBPACK_IMPORTED_MODULE_2__[\"SphereHelper\"]( cachedSphere );\r\n\t\t\t\t\tsphereHelper.raycast = emptyRaycast;\r\n\t\t\t\t\tcached.sphereHelper = sphereHelper;\r\n\r\n\t\t\t\t\tif ( this.visibleTiles.has( tile ) && this.displaySphereBounds ) {\r\n\r\n\t\t\t\t\t\tthis.sphereGroup.add( sphereHelper );\r\n\t\t\t\t\t\tsphereHelper.updateMatrixWorld( true );\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Cache the original materials\r\n\t\t\t\t\tscene.traverse( c => {\r\n\r\n\t\t\t\t\t\tconst material = c.material;\r\n\t\t\t\t\t\tif ( material ) {\r\n\r\n\t\t\t\t\t\t\tc[ ORIGINAL_MATERIAL ] = material;\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} );\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} );\r\n\r\n\t}\r\n\r\n\tdisposeTile( tile ) {\r\n\r\n\t\tsuper.disposeTile( tile );\r\n\r\n\t\tconst cached = tile.cached;\r\n\t\tif ( cached.boxHelperGroup ) {\r\n\r\n\t\t\tcached.boxHelperGroup.children[ 0 ].geometry.dispose();\r\n\t\t\tcached.sphereHelper.geometry.dispose();\r\n\r\n\t\t\tdelete cached.boxHelperGroup;\r\n\t\t\tdelete cached.sphereHelper;\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n}\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/three/DebugTilesRenderer.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/three/I3DMLoader.js": +/*!****************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/three/I3DMLoader.js ***! + \****************************************************************/ +/*! exports provided: I3DMLoader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"I3DMLoader\", function() { return I3DMLoader; });\n/* harmony import */ var _base_I3DMLoaderBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../base/I3DMLoaderBase.js */ \"./node_modules/3d-tiles-renderer/src/base/I3DMLoaderBase.js\");\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ \"./node_modules/three/build/three.module.js\");\n/* harmony import */ var three_examples_jsm_loaders_GLTFLoader_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! three/examples/jsm/loaders/GLTFLoader.js */ \"./node_modules/three/examples/jsm/loaders/GLTFLoader.js\");\n\r\n\r\n\r\n\r\nconst tempPos = new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"]();\r\nconst tempQuat = new three__WEBPACK_IMPORTED_MODULE_1__[\"Quaternion\"]();\r\nconst tempSca = new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"]();\r\nconst tempMat = new three__WEBPACK_IMPORTED_MODULE_1__[\"Matrix4\"]();\r\nclass I3DMLoader extends _base_I3DMLoaderBase_js__WEBPACK_IMPORTED_MODULE_0__[\"I3DMLoaderBase\"] {\r\n\r\n\tconstructor( manager = three__WEBPACK_IMPORTED_MODULE_1__[\"DefaultLoadingManager\"] ) {\r\n\r\n\t\tsuper();\r\n\t\tthis.manager = manager;\r\n\r\n\t}\r\n\r\n\tresolveExternalURL( url ) {\r\n\r\n\t\treturn this.manager.resolveURL( super.resolveExternalURL( url ) );\r\n\r\n\t}\r\n\r\n\tparse( buffer ) {\r\n\r\n\t\treturn super\r\n\t\t\t.parse( buffer )\r\n\t\t\t.then( i3dm => {\r\n\r\n\t\t\t\tconst { featureTable, batchTable } = i3dm;\r\n\t\t\t\tconst gltfBuffer = i3dm.glbBytes.slice().buffer;\r\n\t\t\t\treturn new Promise( ( resolve, reject ) => {\r\n\r\n\t\t\t\t\tconst manager = this.manager;\r\n\t\t\t\t\tconst loader = manager.getHandler( 'path.gltf' ) || new three_examples_jsm_loaders_GLTFLoader_js__WEBPACK_IMPORTED_MODULE_2__[\"GLTFLoader\"]( manager );\r\n\t\t\t\t\tloader.parse( gltfBuffer, null, model => {\r\n\r\n\t\t\t\t\t\tconst INSTANCES_LENGTH = featureTable.getData( 'INSTANCES_LENGTH' );\r\n\r\n\t\t\t\t\t\t// RTC_CENTER\r\n\t\t\t\t\t\t// QUANTIZED_VOLUME_OFFSET\r\n\t\t\t\t\t\t// QUANTIZED_VOLUME_SCALE\r\n\t\t\t\t\t\t// EAST_NORTH_UP\r\n\r\n\t\t\t\t\t\tconst POSITION = featureTable.getData( 'POSITION', INSTANCES_LENGTH, 'FLOAT', 'VEC3' );\r\n\r\n\t\t\t\t\t\t// POSITION_QUANTIZED\r\n\t\t\t\t\t\t// NORMAL_UP\r\n\t\t\t\t\t\t// NORMAL_RIGHT\r\n\t\t\t\t\t\t// NORMAL_UP_OCT32P\r\n\t\t\t\t\t\t// NORMAL_RIGHT_OCT32P\r\n\t\t\t\t\t\t// SCALE\r\n\t\t\t\t\t\t// SCALE_NON_UNIFORM\r\n\t\t\t\t\t\t// BATCH_ID\r\n\r\n\t\t\t\t\t\tconst instanceMap = new Map();\r\n\t\t\t\t\t\tconst instances = [];\r\n\t\t\t\t\t\tmodel.scene.traverse( child => {\r\n\r\n\t\t\t\t\t\t\tif ( child.isMesh ) {\r\n\r\n\t\t\t\t\t\t\t\tconst { geometry, material } = child;\r\n\t\t\t\t\t\t\t\tconst instancedMesh = new three__WEBPACK_IMPORTED_MODULE_1__[\"InstancedMesh\"]( geometry, material, INSTANCES_LENGTH );\r\n\t\t\t\t\t\t\t\tinstances.push( instancedMesh );\r\n\t\t\t\t\t\t\t\tinstanceMap.set( child, instancedMesh );\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t} );\r\n\r\n\t\t\t\t\t\tconst averageVector = new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"]();\r\n\t\t\t\t\t\tfor ( let i = 0; i < INSTANCES_LENGTH; i ++ ) {\r\n\r\n\t\t\t\t\t\t\t// TODO: handle quantized position\r\n\t\t\t\t\t\t\taverageVector.x += POSITION[ i * 3 + 0 ] / INSTANCES_LENGTH;\r\n\t\t\t\t\t\t\taverageVector.y += POSITION[ i * 3 + 1 ] / INSTANCES_LENGTH;\r\n\t\t\t\t\t\t\taverageVector.z += POSITION[ i * 3 + 2 ] / INSTANCES_LENGTH;\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// replace the meshes with instanced meshes\r\n\t\t\t\t\t\tinstanceMap.forEach( ( instancedMesh, mesh ) => {\r\n\r\n\t\t\t\t\t\t\tconst parent = mesh.parent;\r\n\t\t\t\t\t\t\tif ( parent ) {\r\n\r\n\t\t\t\t\t\t\t\t// Mesh have no children\r\n\t\t\t\t\t\t\t\tparent.remove( mesh );\r\n\t\t\t\t\t\t\t\tparent.add( instancedMesh );\r\n\r\n\t\t\t\t\t\t\t\t// Center the instance around an average point to avoid jitter at large scales.\r\n\t\t\t\t\t\t\t\tinstancedMesh\r\n\t\t\t\t\t\t\t\t\t.position\r\n\t\t\t\t\t\t\t\t\t.copy( averageVector );\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t} );\r\n\r\n\t\t\t\t\t\tfor ( let i = 0; i < INSTANCES_LENGTH; i ++ ) {\r\n\r\n\t\t\t\t\t\t\t// TODO: handle quantized position\r\n\t\t\t\t\t\t\ttempPos.set(\r\n\t\t\t\t\t\t\t\tPOSITION[ i * 3 + 0 ] - averageVector.x,\r\n\t\t\t\t\t\t\t\tPOSITION[ i * 3 + 1 ] - averageVector.y,\r\n\t\t\t\t\t\t\t\tPOSITION[ i * 3 + 2 ] - averageVector.z,\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t// TODO: handle normal orientation features\r\n\t\t\t\t\t\t\ttempQuat.set( 0, 0, 0, 1 );\r\n\r\n\t\t\t\t\t\t\t// TODO: handle scale features\r\n\t\t\t\t\t\t\ttempSca.set( 1, 1, 1 );\r\n\r\n\t\t\t\t\t\t\ttempMat.compose( tempPos, tempQuat, tempSca );\r\n\r\n\t\t\t\t\t\t\tfor ( let j = 0, l = instances.length; j < l; j ++ ) {\r\n\r\n\t\t\t\t\t\t\t\tconst instance = instances[ j ];\r\n\t\t\t\t\t\t\t\tinstance.setMatrixAt( i, tempMat );\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmodel.batchTable = batchTable;\r\n\t\t\t\t\t\tmodel.featureTable = featureTable;\r\n\r\n\t\t\t\t\t\tmodel.scene.batchTable = batchTable;\r\n\t\t\t\t\t\tmodel.scene.featureTable = featureTable;\r\n\r\n\t\t\t\t\t\tresolve( model );\r\n\r\n\t\t\t\t\t}, reject );\r\n\r\n\t\t\t\t} );\r\n\r\n\t\t\t} );\r\n\r\n\t}\r\n\r\n}\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/three/I3DMLoader.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/three/PNTSLoader.js": +/*!****************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/three/PNTSLoader.js ***! + \****************************************************************/ +/*! exports provided: PNTSLoader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PNTSLoader\", function() { return PNTSLoader; });\n/* harmony import */ var _base_PNTSLoaderBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../base/PNTSLoaderBase.js */ \"./node_modules/3d-tiles-renderer/src/base/PNTSLoaderBase.js\");\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ \"./node_modules/three/build/three.module.js\");\n\r\n\r\n\r\nclass PNTSLoader extends _base_PNTSLoaderBase_js__WEBPACK_IMPORTED_MODULE_0__[\"PNTSLoaderBase\"] {\r\n\r\n\tconstructor( manager = three__WEBPACK_IMPORTED_MODULE_1__[\"DefaultLoadingManager\"] ) {\r\n\r\n\t\tsuper();\r\n\t\tthis.manager = manager;\r\n\r\n\t}\r\n\r\n\tparse( buffer ) {\r\n\r\n\t\tconst result = super.parse( buffer );\r\n\t\tconst { featureTable } = result;\r\n\r\n\t\t// global semantics\r\n\t\tconst POINTS_LENGTH = featureTable.getData( 'POINTS_LENGTH' );\r\n\r\n\t\t// RTC_CENTER\r\n\t\t// QUANTIZED_VOLUME_OFFSET\r\n\t\t// QUANTIZED_VOLUME_SCALE\r\n\t\t// CONSTANT_RGBA\r\n\t\t// BATCH_LENGTH\r\n\r\n\t\tconst POSITION = featureTable.getData( 'POSITION', POINTS_LENGTH, 'FLOAT', 'VEC3' );\r\n\t\tconst RGB = featureTable.getData( 'RGB', POINTS_LENGTH, 'UNSIGNED_BYTE', 'VEC3' );\r\n\r\n\t\t// POSITION_QUANTIZED\r\n\t\t// RGBA\r\n\t\t// RGB565\r\n\t\t// NORMAL\r\n\t\t// NORMAL_OCT16P\r\n\t\t// BATCH_ID\r\n\r\n\t\tif ( POSITION === null ) {\r\n\r\n\t\t\tthrow new Error( 'PNTSLoader : POSITION_QUANTIZED feature type is not supported.' );\r\n\r\n\t\t}\r\n\r\n\t\tconst geometry = new three__WEBPACK_IMPORTED_MODULE_1__[\"BufferGeometry\"]();\r\n\t\tgeometry.setAttribute( 'position', new three__WEBPACK_IMPORTED_MODULE_1__[\"BufferAttribute\"]( POSITION, 3, false ) );\r\n\r\n\t\tconst material = new three__WEBPACK_IMPORTED_MODULE_1__[\"PointsMaterial\"]();\r\n\t\tmaterial.size = 2;\r\n\t\tmaterial.sizeAttenuation = false;\r\n\r\n\t\tif ( RGB !== null ) {\r\n\r\n\t\t\tgeometry.setAttribute( 'color', new three__WEBPACK_IMPORTED_MODULE_1__[\"BufferAttribute\"]( RGB, 3, true ) );\r\n\t\t\tmaterial.vertexColors = true;\r\n\r\n\t\t}\r\n\r\n\t\tconst object = new three__WEBPACK_IMPORTED_MODULE_1__[\"Points\"]( geometry, material );\r\n\t\tresult.scene = object;\r\n\t\tresult.scene.featureTable = featureTable;\r\n\r\n\t\treturn result;\r\n\r\n\t}\r\n\r\n}\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/three/PNTSLoader.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/three/SphereHelper.js": +/*!******************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/three/SphereHelper.js ***! + \******************************************************************/ +/*! exports provided: SphereHelper */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SphereHelper\", function() { return SphereHelper; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! three */ \"./node_modules/three/build/three.module.js\");\n\r\n\r\nconst _vector = new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"]();\r\nconst axes = [ 'x', 'y', 'z' ];\r\nclass SphereHelper extends three__WEBPACK_IMPORTED_MODULE_0__[\"LineSegments\"] {\r\n\r\n\tconstructor( sphere, color = 0xffff00, angleSteps = 40 ) {\r\n\r\n\t\tconst geometry = new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"]();\r\n\t\tconst positions = [];\r\n\t\tfor ( let i = 0; i < 3; i ++ ) {\r\n\r\n\t\t\tconst axis1 = axes[ i ];\r\n\t\t\tconst axis2 = axes[ ( i + 1 ) % 3 ];\r\n\t\t\t_vector.set( 0, 0, 0 );\r\n\r\n\t\t\tfor ( let a = 0; a < angleSteps; a ++ ) {\r\n\r\n\t\t\t\tlet angle;\r\n\t\t\t\tangle = 2 * Math.PI * a / ( angleSteps - 1 );\r\n\t\t\t\t_vector[ axis1 ] = Math.sin( angle );\r\n\t\t\t\t_vector[ axis2 ] = Math.cos( angle );\r\n\r\n\t\t\t\tpositions.push( _vector.x, _vector.y, _vector.z );\r\n\r\n\t\t\t\tangle = 2 * Math.PI * ( a + 1 ) / ( angleSteps - 1 );\r\n\t\t\t\t_vector[ axis1 ] = Math.sin( angle );\r\n\t\t\t\t_vector[ axis2 ] = Math.cos( angle );\r\n\r\n\t\t\t\tpositions.push( _vector.x, _vector.y, _vector.z );\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t}\r\n\r\n\t\tgeometry.setAttribute( 'position', new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"]( new Float32Array( positions ), 3 ) );\r\n\t\tgeometry.computeBoundingSphere();\r\n\r\n\t\tsuper( geometry, new three__WEBPACK_IMPORTED_MODULE_0__[\"LineBasicMaterial\"]( { color: color, toneMapped: false } ) );\r\n\t\tthis.sphere = sphere;\r\n\t\tthis.type = 'SphereHelper';\r\n\r\n\t}\r\n\r\n\tupdateMatrixWorld( force ) {\r\n\r\n\t\tconst sphere = this.sphere;\r\n\t\tthis.position.copy( sphere.center );\r\n\t\tthis.scale.setScalar( sphere.radius );\r\n\t\tsuper.updateMatrixWorld( force );\r\n\r\n\t}\r\n\r\n}\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/three/SphereHelper.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/three/TilesGroup.js": +/*!****************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/three/TilesGroup.js ***! + \****************************************************************/ +/*! exports provided: TilesGroup */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TilesGroup\", function() { return TilesGroup; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! three */ \"./node_modules/three/build/three.module.js\");\n\r\n\r\n// Specialization of \"Group\" that only updates world matrices of children if\r\n// the transform has changed since the last update and ignores the \"force\"\r\n// parameter under the assumption that the children tiles will not move.\r\nconst tempMat = new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix4\"]();\r\nclass TilesGroup extends three__WEBPACK_IMPORTED_MODULE_0__[\"Group\"] {\r\n\r\n\tconstructor( tilesRenderer ) {\r\n\r\n\t\tsuper();\r\n\t\tthis.tilesRenderer = tilesRenderer;\r\n\r\n\t}\r\n\r\n\traycast( raycaster, intersects ) {\r\n\r\n\t\tthis.tilesRenderer.raycast( raycaster, intersects );\r\n\r\n\t}\r\n\r\n\tupdateMatrixWorld( force ) {\r\n\r\n\t\tif ( this.matrixAutoUpdate ) {\r\n\r\n\t\t\tthis.updateMatrix();\r\n\r\n\t\t}\r\n\r\n\t\tif ( this.matrixWorldNeedsUpdate || force ) {\r\n\r\n\t\t\tif ( this.parent === null ) {\r\n\r\n\t\t\t\ttempMat.copy( this.matrix );\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\ttempMat.multiplyMatrices( this.parent.matrixWorld, this.matrix );\r\n\r\n\t\t\t}\r\n\r\n\t\t\tthis.matrixWorldNeedsUpdate = false;\r\n\r\n\t\t\t// check if the matrix changed relative to what it was.\r\n\t\t\tconst elA = tempMat.elements;\r\n\t\t\tconst elB = this.matrixWorld.elements;\r\n\t\t\tlet isDifferent = false;\r\n\t\t\tfor ( let i = 0; i < 16; i ++ ) {\r\n\r\n\t\t\t\tconst itemA = elA[ i ];\r\n\t\t\t\tconst itemB = elB[ i ];\r\n\t\t\t\tconst diff = Math.abs( itemA - itemB );\r\n\r\n\t\t\t\tif ( diff > Number.EPSILON ) {\r\n\r\n\t\t\t\t\tisDifferent = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif ( isDifferent ) {\r\n\r\n\t\t\t\tthis.matrixWorld.copy( tempMat );\r\n\r\n\t\t\t\t// update children\r\n\t\t\t\t// the children will not have to change unless the parent group has updated\r\n\t\t\t\tconst children = this.children;\r\n\t\t\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\r\n\r\n\t\t\t\t\tchildren[ i ].updateMatrixWorld();\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n}\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/three/TilesGroup.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/three/TilesRenderer.js": +/*!*******************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/three/TilesRenderer.js ***! + \*******************************************************************/ +/*! exports provided: TilesRenderer */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TilesRenderer\", function() { return TilesRenderer; });\n/* harmony import */ var _base_TilesRendererBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../base/TilesRendererBase.js */ \"./node_modules/3d-tiles-renderer/src/base/TilesRendererBase.js\");\n/* harmony import */ var _B3DMLoader_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./B3DMLoader.js */ \"./node_modules/3d-tiles-renderer/src/three/B3DMLoader.js\");\n/* harmony import */ var _PNTSLoader_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PNTSLoader.js */ \"./node_modules/3d-tiles-renderer/src/three/PNTSLoader.js\");\n/* harmony import */ var _I3DMLoader_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./I3DMLoader.js */ \"./node_modules/3d-tiles-renderer/src/three/I3DMLoader.js\");\n/* harmony import */ var _CMPTLoader_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CMPTLoader.js */ \"./node_modules/3d-tiles-renderer/src/three/CMPTLoader.js\");\n/* harmony import */ var _TilesGroup_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TilesGroup.js */ \"./node_modules/3d-tiles-renderer/src/three/TilesGroup.js\");\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! three */ \"./node_modules/three/build/three.module.js\");\n/* harmony import */ var _raycastTraverse_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./raycastTraverse.js */ \"./node_modules/3d-tiles-renderer/src/three/raycastTraverse.js\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst INITIAL_FRUSTUM_CULLED = Symbol( 'INITIAL_FRUSTUM_CULLED' );\r\nconst DEG2RAD = three__WEBPACK_IMPORTED_MODULE_6__[\"Math\"].DEG2RAD;\r\nconst tempMat = new three__WEBPACK_IMPORTED_MODULE_6__[\"Matrix4\"]();\r\nconst tempMat2 = new three__WEBPACK_IMPORTED_MODULE_6__[\"Matrix4\"]();\r\nconst tempVector = new three__WEBPACK_IMPORTED_MODULE_6__[\"Vector3\"]();\r\nconst vecX = new three__WEBPACK_IMPORTED_MODULE_6__[\"Vector3\"]();\r\nconst vecY = new three__WEBPACK_IMPORTED_MODULE_6__[\"Vector3\"]();\r\nconst vecZ = new three__WEBPACK_IMPORTED_MODULE_6__[\"Vector3\"]();\r\n\r\nconst X_AXIS = new three__WEBPACK_IMPORTED_MODULE_6__[\"Vector3\"]( 1, 0, 0 );\r\nconst Y_AXIS = new three__WEBPACK_IMPORTED_MODULE_6__[\"Vector3\"]( 0, 1, 0 );\r\n\r\nfunction emptyRaycast() {}\r\n\r\nfunction updateFrustumCulled( object, toInitialValue ) {\r\n\r\n\tobject.traverse( c => {\r\n\r\n\t\tc.frustumCulled = c[ INITIAL_FRUSTUM_CULLED ] && toInitialValue;\r\n\r\n\t} );\r\n\r\n}\r\n\r\nclass TilesRenderer extends _base_TilesRendererBase_js__WEBPACK_IMPORTED_MODULE_0__[\"TilesRendererBase\"] {\r\n\r\n\tget autoDisableRendererCulling() {\r\n\r\n\t\treturn this._autoDisableRendererCulling;\r\n\r\n\t}\r\n\r\n\tset autoDisableRendererCulling( value ) {\r\n\r\n\t\tif ( this._autoDisableRendererCulling !== value ) {\r\n\r\n\t\t\tsuper._autoDisableRendererCulling = value;\r\n\t\t\tthis.traverse( tile => {\r\n\r\n\t\t\t\tif ( tile.scene ) {\r\n\r\n\t\t\t\t\tupdateFrustumCulled( tile.scene, value );\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tconstructor( ...args ) {\r\n\r\n\t\tsuper( ...args );\r\n\t\tthis.group = new _TilesGroup_js__WEBPACK_IMPORTED_MODULE_5__[\"TilesGroup\"]( this );\r\n\t\tthis.cameras = [];\r\n\t\tthis.cameraMap = new Map();\r\n\t\tthis.cameraInfo = [];\r\n\t\tthis.activeTiles = new Set();\r\n\t\tthis.visibleTiles = new Set();\r\n\t\tthis._autoDisableRendererCulling = true;\r\n\r\n\t\tthis.onLoadTileSet = null;\r\n\t\tthis.onLoadModel = null;\r\n\t\tthis.onDisposeModel = null;\r\n\r\n\t\tconst manager = new three__WEBPACK_IMPORTED_MODULE_6__[\"LoadingManager\"]();\r\n\t\tmanager.setURLModifier( url => {\r\n\r\n\t\t\tif ( this.preprocessURL ) {\r\n\r\n\t\t\t\treturn this.preprocessURL( url );\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\treturn url;\r\n\r\n\t\t\t}\r\n\r\n\t\t} );\r\n\t\tthis.manager = manager;\r\n\r\n\t}\r\n\r\n\t/* Public API */\r\n\tgetBounds( box ) {\r\n\r\n\t\tif ( ! this.root ) {\r\n\r\n\t\t\treturn false;\r\n\r\n\t\t}\r\n\r\n\t\tconst cached = this.root.cached;\r\n\t\tconst boundingBox = cached.box;\r\n\t\tconst obbMat = cached.boxTransform;\r\n\r\n\t\tif ( boundingBox ) {\r\n\r\n\t\t\tbox.copy( boundingBox );\r\n\t\t\tbox.applyMatrix4( obbMat );\r\n\r\n\t\t\treturn true;\r\n\r\n\t\t} else {\r\n\r\n\t\t\treturn false;\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tgetOrientedBounds( box, matrix ) {\r\n\r\n\t\tif ( ! this.root ) {\r\n\r\n\t\t\treturn false;\r\n\r\n\t\t}\r\n\r\n\t\tconst cached = this.root.cached;\r\n\t\tconst boundingBox = cached.box;\r\n\t\tconst obbMat = cached.boxTransform;\r\n\r\n\t\tif ( box ) {\r\n\r\n\t\t\tbox.copy( boundingBox );\r\n\t\t\tmatrix.copy( obbMat );\r\n\r\n\t\t\treturn true;\r\n\r\n\t\t} else {\r\n\r\n\t\t\treturn false;\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tforEachLoadedModel( callback ) {\r\n\r\n\t\tthis.traverse( tile => {\r\n\r\n\t\t\tconst scene = tile.cached.scene;\r\n\t\t\tif ( scene ) {\r\n\r\n\t\t\t\tcallback( scene, tile );\r\n\r\n\t\t\t}\r\n\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\traycast( raycaster, intersects ) {\r\n\r\n\t\tif ( ! this.root ) {\r\n\r\n\t\t\treturn;\r\n\r\n\t\t}\r\n\r\n\t\tif ( raycaster.firstHitOnly ) {\r\n\r\n\t\t\tconst hit = Object(_raycastTraverse_js__WEBPACK_IMPORTED_MODULE_7__[\"raycastTraverseFirstHit\"])( this.root, this.group, this.activeTiles, raycaster );\r\n\t\t\tif ( hit ) {\r\n\r\n\t\t\t\tintersects.push( hit );\r\n\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\r\n\t\t\tObject(_raycastTraverse_js__WEBPACK_IMPORTED_MODULE_7__[\"raycastTraverse\"])( this.root, this.group, this.activeTiles, raycaster, intersects );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\thasCamera( camera ) {\r\n\r\n\t\treturn this.cameraMap.has( camera );\r\n\r\n\t}\r\n\r\n\tsetCamera( camera ) {\r\n\r\n\t\tconst cameras = this.cameras;\r\n\t\tconst cameraMap = this.cameraMap;\r\n\t\tif ( ! cameraMap.has( camera ) ) {\r\n\r\n\t\t\tcameraMap.set( camera, new three__WEBPACK_IMPORTED_MODULE_6__[\"Vector2\"]() );\r\n\t\t\tcameras.push( camera );\r\n\t\t\treturn true;\r\n\r\n\t\t}\r\n\t\treturn false;\r\n\r\n\t}\r\n\r\n\tsetResolution( camera, xOrVec, y ) {\r\n\r\n\t\tconst cameraMap = this.cameraMap;\r\n\t\tif ( ! cameraMap.has( camera ) ) {\r\n\r\n\t\t\treturn false;\r\n\r\n\t\t}\r\n\r\n\t\tif ( xOrVec instanceof three__WEBPACK_IMPORTED_MODULE_6__[\"Vector2\"] ) {\r\n\r\n\t\t\tcameraMap.get( camera ).copy( xOrVec );\r\n\r\n\t\t} else {\r\n\r\n\t\t\tcameraMap.get( camera ).set( xOrVec, y );\r\n\r\n\t\t}\r\n\t\treturn true;\r\n\r\n\t}\r\n\r\n\tsetResolutionFromRenderer( camera, renderer ) {\r\n\r\n\t\tconst cameraMap = this.cameraMap;\r\n\t\tif ( ! cameraMap.has( camera ) ) {\r\n\r\n\t\t\treturn false;\r\n\r\n\t\t}\r\n\r\n\t\tconst resolution = cameraMap.get( camera );\r\n\t\trenderer.getSize( resolution );\r\n\t\tresolution.multiplyScalar( renderer.getPixelRatio() );\r\n\t\treturn true;\r\n\r\n\t}\r\n\r\n\tdeleteCamera( camera ) {\r\n\r\n\t\tconst cameras = this.cameras;\r\n\t\tconst cameraMap = this.cameraMap;\r\n\t\tif ( cameraMap.has( camera ) ) {\r\n\r\n\t\t\tconst index = cameras.indexOf( camera );\r\n\t\t\tcameras.splice( index, 1 );\r\n\t\t\tcameraMap.delete( camera );\r\n\t\t\treturn true;\r\n\r\n\t\t}\r\n\t\treturn false;\r\n\r\n\t}\r\n\r\n\t/* Overriden */\r\n\tfetchTileSet( url, ...rest ) {\r\n\r\n\t\tconst pr = super.fetchTileSet( url, ...rest );\r\n\t\tpr.then( json => {\r\n\r\n\t\t\tif ( this.onLoadTileSet ) {\r\n\r\n\t\t\t\t// Push this onto the end of the event stack to ensure this runs\r\n\t\t\t\t// after the base renderer has placed the provided json where it\r\n\t\t\t\t// needs to be placed and is ready for an update.\r\n\t\t\t\tPromise.resolve().then( () => {\r\n\r\n\t\t\t\t\tthis.onLoadTileSet( json, url );\r\n\r\n\t\t\t\t} );\r\n\r\n\t\t\t}\r\n\r\n\t\t} );\r\n\t\treturn pr;\r\n\r\n\t}\r\n\r\n\tupdate() {\r\n\r\n\t\tconst group = this.group;\r\n\t\tconst cameras = this.cameras;\r\n\t\tconst cameraMap = this.cameraMap;\r\n\t\tconst cameraInfo = this.cameraInfo;\r\n\r\n\t\tif ( cameras.length === 0 ) {\r\n\r\n\t\t\tconsole.warn( 'TilesRenderer: no cameras defined. Cannot update 3d tiles.' );\r\n\t\t\treturn;\r\n\r\n\t\t}\r\n\r\n\t\t// automatically scale the array of cameraInfo to match the cameras\r\n\t\twhile ( cameraInfo.length > cameras.length ) {\r\n\r\n\t\t\tcameraInfo.pop();\r\n\r\n\t\t}\r\n\r\n\t\twhile ( cameraInfo.length < cameras.length ) {\r\n\r\n\t\t\tcameraInfo.push( {\r\n\r\n\t\t\t\tfrustum: new three__WEBPACK_IMPORTED_MODULE_6__[\"Frustum\"](),\r\n\t\t\t\tsseDenominator: - 1,\r\n\t\t\t\tposition: new three__WEBPACK_IMPORTED_MODULE_6__[\"Vector3\"](),\r\n\t\t\t\tinvScale: - 1,\r\n\t\t\t\tpixelSize: 0,\r\n\r\n\t\t\t} );\r\n\r\n\t\t}\r\n\r\n\t\t// extract scale of group container\r\n\t\ttempMat2.copy( group.matrixWorld ).invert();\r\n\r\n\t\tlet invScale;\r\n\t\ttempVector.setFromMatrixScale( tempMat2 );\r\n\t\tinvScale = tempVector.x;\r\n\r\n\t\tif ( Math.abs( Math.max( tempVector.x - tempVector.y, tempVector.x - tempVector.z ) ) > 1e-6 ) {\r\n\r\n\t\t\tconsole.warn( 'ThreeTilesRenderer : Non uniform scale used for tile which may cause issues when calculating screen space error.' );\r\n\r\n\t\t}\r\n\r\n\t\t// store the camera cameraInfo in the 3d tiles root frame\r\n\t\tfor ( let i = 0, l = cameraInfo.length; i < l; i ++ ) {\r\n\r\n\t\t\tconst camera = cameras[ i ];\r\n\t\t\tconst info = cameraInfo[ i ];\r\n\t\t\tconst frustum = info.frustum;\r\n\t\t\tconst position = info.position;\r\n\t\t\tconst resolution = cameraMap.get( camera );\r\n\r\n\t\t\tif ( resolution.width === 0 || resolution.height === 0 ) {\r\n\r\n\t\t\t\tconsole.warn( 'TilesRenderer: resolution for camera error calculation is not set.' );\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif ( camera.isPerspectiveCamera ) {\r\n\r\n\t\t\t\tinfo.sseDenominator = 2 * Math.tan( 0.5 * camera.fov * DEG2RAD ) / resolution.height;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif ( camera.isOrthographicCamera ) {\r\n\r\n\t\t\t\tconst w = camera.right - camera.left;\r\n\t\t\t\tconst h = camera.top - camera.bottom;\r\n\t\t\t\tinfo.pixelSize = Math.max( h / resolution.height, w / resolution.width );\r\n\r\n\t\t\t}\r\n\r\n\t\t\tinfo.invScale = invScale;\r\n\r\n\t\t\t// get frustum in group root frame\r\n\t\t\ttempMat.copy( group.matrixWorld );\r\n\t\t\ttempMat.premultiply( camera.matrixWorldInverse );\r\n\t\t\ttempMat.premultiply( camera.projectionMatrix );\r\n\r\n\t\t\tfrustum.setFromProjectionMatrix( tempMat );\r\n\r\n\t\t\t// get transform position in group root frame\r\n\t\t\tposition.set( 0, 0, 0 );\r\n\t\t\tposition.applyMatrix4( camera.matrixWorld );\r\n\t\t\tposition.applyMatrix4( tempMat2 );\r\n\r\n\t\t}\r\n\r\n\t\tsuper.update();\r\n\r\n\t}\r\n\r\n\tpreprocessNode( tile, parentTile, tileSetDir ) {\r\n\r\n\t\tsuper.preprocessNode( tile, parentTile, tileSetDir );\r\n\r\n\t\tconst transform = new three__WEBPACK_IMPORTED_MODULE_6__[\"Matrix4\"]();\r\n\t\tif ( tile.transform ) {\r\n\r\n\t\t\tconst transformArr = tile.transform;\r\n\t\t\tfor ( let i = 0; i < 16; i ++ ) {\r\n\r\n\t\t\t\ttransform.elements[ i ] = transformArr[ i ];\r\n\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\r\n\t\t\ttransform.identity();\r\n\r\n\t\t}\r\n\r\n\t\tif ( parentTile ) {\r\n\r\n\t\t\ttransform.premultiply( parentTile.cached.transform );\r\n\r\n\t\t}\r\n\r\n\t\tlet box = null;\r\n\t\tlet boxTransform = null;\r\n\t\tlet boxTransformInverse = null;\r\n\t\tif ( 'box' in tile.boundingVolume ) {\r\n\r\n\t\t\tconst data = tile.boundingVolume.box;\r\n\t\t\tbox = new three__WEBPACK_IMPORTED_MODULE_6__[\"Box3\"]();\r\n\t\t\tboxTransform = new three__WEBPACK_IMPORTED_MODULE_6__[\"Matrix4\"]();\r\n\t\t\tboxTransformInverse = new three__WEBPACK_IMPORTED_MODULE_6__[\"Matrix4\"]();\r\n\r\n\t\t\t// get the extents of the bounds in each axis\r\n\t\t\tvecX.set( data[ 3 ], data[ 4 ], data[ 5 ] );\r\n\t\t\tvecY.set( data[ 6 ], data[ 7 ], data[ 8 ] );\r\n\t\t\tvecZ.set( data[ 9 ], data[ 10 ], data[ 11 ] );\r\n\r\n\t\t\tconst scaleX = vecX.length();\r\n\t\t\tconst scaleY = vecY.length();\r\n\t\t\tconst scaleZ = vecZ.length();\r\n\r\n\t\t\tvecX.normalize();\r\n\t\t\tvecY.normalize();\r\n\t\t\tvecZ.normalize();\r\n\r\n\t\t\t// create the oriented frame that the box exists in\r\n\t\t\tboxTransform.set(\r\n\t\t\t\tvecX.x, vecY.x, vecZ.x, data[ 0 ],\r\n\t\t\t\tvecX.y, vecY.y, vecZ.y, data[ 1 ],\r\n\t\t\t\tvecX.z, vecY.z, vecZ.z, data[ 2 ],\r\n\t\t\t\t0, 0, 0, 1\r\n\t\t\t);\r\n\t\t\tboxTransform.premultiply( transform );\r\n\t\t\tboxTransformInverse.copy( boxTransform ).invert();\r\n\r\n\t\t\t// scale the box by the extents\r\n\t\t\tbox.min.set( - scaleX, - scaleY, - scaleZ );\r\n\t\t\tbox.max.set( scaleX, scaleY, scaleZ );\r\n\r\n\t\t}\r\n\r\n\t\tlet sphere = null;\r\n\t\tif ( 'sphere' in tile.boundingVolume ) {\r\n\r\n\t\t\tconst data = tile.boundingVolume.sphere;\r\n\t\t\tsphere = new three__WEBPACK_IMPORTED_MODULE_6__[\"Sphere\"]();\r\n\t\t\tsphere.center.set( data[ 0 ], data[ 1 ], data[ 2 ] );\r\n\t\t\tsphere.radius = data[ 3 ];\r\n\t\t\tsphere.applyMatrix4( transform );\r\n\r\n\t\t} else if ( 'box' in tile.boundingVolume ) {\r\n\r\n\t\t\tconst data = tile.boundingVolume.box;\r\n\t\t\tsphere = new three__WEBPACK_IMPORTED_MODULE_6__[\"Sphere\"]();\r\n\t\t\tbox.getBoundingSphere( sphere );\r\n\t\t\tsphere.center.set( data[ 0 ], data[ 1 ], data[ 2 ] );\r\n\t\t\tsphere.applyMatrix4( transform );\r\n\r\n\t\t}\r\n\r\n\t\tlet region = null;\r\n\t\tif ( 'region' in tile.boundingVolume ) {\r\n\r\n\t\t\tconsole.warn( 'ThreeTilesRenderer: region bounding volume not supported.' );\r\n\r\n\t\t}\r\n\r\n\t\ttile.cached = {\r\n\r\n\t\t\tloadIndex: 0,\r\n\t\t\ttransform,\r\n\t\t\tactive: false,\r\n\t\t\tinFrustum: [],\r\n\r\n\t\t\tbox,\r\n\t\t\tboxTransform,\r\n\t\t\tboxTransformInverse,\r\n\t\t\tsphere,\r\n\t\t\tregion,\r\n\r\n\t\t\tscene: null,\r\n\t\t\tgeometry: null,\r\n\t\t\tmaterial: null,\r\n\t\t\tdistance: Infinity\r\n\r\n\t\t};\r\n\r\n\t}\r\n\r\n\tparseTile( buffer, tile, extension ) {\r\n\r\n\t\ttile._loadIndex = tile._loadIndex || 0;\r\n\t\ttile._loadIndex ++;\r\n\r\n\t\tconst uri = tile.content.uri;\r\n\t\tconst uriSplits = uri.split( /[\\\\\\/]/g );\r\n\t\turiSplits.pop();\r\n\t\tconst workingPath = uriSplits.join( '/' );\r\n\t\tconst fetchOptions = this.fetchOptions;\r\n\r\n\t\tconst manager = this.manager;\r\n\t\tconst loadIndex = tile._loadIndex;\r\n\t\tlet promise = null;\r\n\r\n\t\tswitch ( extension ) {\r\n\r\n\t\t\tcase 'b3dm':\r\n\t\t\t\tpromise = new _B3DMLoader_js__WEBPACK_IMPORTED_MODULE_1__[\"B3DMLoader\"]( manager )\r\n\t\t\t\t\t.parse( buffer )\r\n\t\t\t\t\t.then( res => res.scene );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'pnts':\r\n\t\t\t\tpromise = Promise.resolve( new _PNTSLoader_js__WEBPACK_IMPORTED_MODULE_2__[\"PNTSLoader\"]( manager ).parse( buffer ).scene );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'i3dm': {\r\n\r\n\t\t\t\tconst loader = new _I3DMLoader_js__WEBPACK_IMPORTED_MODULE_3__[\"I3DMLoader\"]( manager );\r\n\t\t\t\tloader.workingPath = workingPath;\r\n\t\t\t\tloader.fetchOptions = fetchOptions;\r\n\t\t\t\tpromise = loader\r\n\t\t\t\t\t.parse( buffer )\r\n\t\t\t\t\t.then( res => res.scene );\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tcase 'cmpt': {\r\n\r\n\t\t\t\tconst loader = new _CMPTLoader_js__WEBPACK_IMPORTED_MODULE_4__[\"CMPTLoader\"]( manager );\r\n\t\t\t\tloader.workingPath = workingPath;\r\n\t\t\t\tloader.fetchOptions = fetchOptions;\r\n\t\t\t\tpromise = loader\r\n\t\t\t\t\t.parse( buffer )\r\n\t\t\t\t\t.then( res => res.scene\t);\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tconsole.warn( `TilesRenderer: Content type \"${ extension }\" not supported.` );\r\n\t\t\t\tpromise = Promise.resolve( null );\r\n\t\t\t\tbreak;\r\n\r\n\t\t}\r\n\r\n\t\treturn promise.then( scene => {\r\n\r\n\t\t\tif ( tile._loadIndex !== loadIndex ) {\r\n\r\n\t\t\t\treturn;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tconst upAxis = this.rootTileSet.asset && this.rootTileSet.asset.gltfUpAxis || 'y';\r\n\t\t\tconst cached = tile.cached;\r\n\t\t\tconst cachedTransform = cached.transform;\r\n\r\n\t\t\tswitch ( upAxis.toLowerCase() ) {\r\n\r\n\t\t\t\tcase 'x':\r\n\t\t\t\t\tscene.matrix.makeRotationAxis( Y_AXIS, - Math.PI / 2 );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'y':\r\n\t\t\t\t\tscene.matrix.makeRotationAxis( X_AXIS, Math.PI / 2 );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'z':\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tscene.matrix.premultiply( cachedTransform );\r\n\t\t\tscene.matrix.decompose( scene.position, scene.quaternion, scene.scale );\r\n\t\t\tscene.traverse( c => {\r\n\r\n\t\t\t\tc[ INITIAL_FRUSTUM_CULLED ] = c.frustumCulled;\r\n\r\n\t\t\t} );\r\n\t\t\tupdateFrustumCulled( scene, this.autoDisableRendererCulling );\r\n\r\n\t\t\tcached.scene = scene;\r\n\r\n\t\t\t// We handle raycasting in a custom way so remove it from here\r\n\t\t\tscene.traverse( c => {\r\n\r\n\t\t\t\tc.raycast = emptyRaycast;\r\n\r\n\t\t\t} );\r\n\r\n\t\t\tconst materials = [];\r\n\t\t\tconst geometry = [];\r\n\t\t\tconst textures = [];\r\n\t\t\tscene.traverse( c => {\r\n\r\n\t\t\t\tif ( c.geometry ) {\r\n\r\n\t\t\t\t\tgeometry.push( c.geometry );\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( c.material ) {\r\n\r\n\t\t\t\t\tconst material = c.material;\r\n\t\t\t\t\tmaterials.push( c.material );\r\n\r\n\t\t\t\t\tfor ( const key in material ) {\r\n\r\n\t\t\t\t\t\tconst value = material[ key ];\r\n\t\t\t\t\t\tif ( value && value.isTexture ) {\r\n\r\n\t\t\t\t\t\t\ttextures.push( value );\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} );\r\n\r\n\t\t\tcached.materials = materials;\r\n\t\t\tcached.geometry = geometry;\r\n\t\t\tcached.textures = textures;\r\n\r\n\t\t\tif ( this.onLoadModel ) {\r\n\r\n\t\t\t\tthis.onLoadModel( scene, tile );\r\n\r\n\t\t\t}\r\n\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\tdisposeTile( tile ) {\r\n\r\n\t\t// This could get called before the tile has finished downloading\r\n\t\tconst cached = tile.cached;\r\n\t\tif ( cached.scene ) {\r\n\r\n\t\t\tconst materials = cached.materials;\r\n\t\t\tconst geometry = cached.geometry;\r\n\t\t\tconst textures = cached.textures;\r\n\r\n\t\t\tfor ( let i = 0, l = geometry.length; i < l; i ++ ) {\r\n\r\n\t\t\t\tgeometry[ i ].dispose();\r\n\r\n\t\t\t}\r\n\r\n\t\t\tfor ( let i = 0, l = materials.length; i < l; i ++ ) {\r\n\r\n\t\t\t\tmaterials[ i ].dispose();\r\n\r\n\t\t\t}\r\n\r\n\t\t\tfor ( let i = 0, l = textures.length; i < l; i ++ ) {\r\n\r\n\t\t\t\tconst texture = textures[ i ];\r\n\t\t\t\ttexture.dispose();\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif ( this.onDisposeModel ) {\r\n\r\n\t\t\t\tthis.onDisposeModel( cached.scene, tile );\r\n\r\n\t\t\t}\r\n\r\n\t\t\tcached.scene = null;\r\n\t\t\tcached.materials = null;\r\n\t\t\tcached.textures = null;\r\n\t\t\tcached.geometry = null;\r\n\r\n\t\t}\r\n\r\n\t\ttile._loadIndex ++;\r\n\r\n\t}\r\n\r\n\tsetTileVisible( tile, visible ) {\r\n\r\n\t\tconst scene = tile.cached.scene;\r\n\t\tconst visibleTiles = this.visibleTiles;\r\n\t\tconst group = this.group;\r\n\t\tif ( visible ) {\r\n\r\n\t\t\tgroup.add( scene );\r\n\t\t\tvisibleTiles.add( tile );\r\n\t\t\tscene.updateMatrixWorld( true );\r\n\r\n\t\t} else {\r\n\r\n\t\t\tgroup.remove( scene );\r\n\t\t\tvisibleTiles.delete( tile );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tsetTileActive( tile, active ) {\r\n\r\n\t\tconst activeTiles = this.activeTiles;\r\n\t\tif ( active ) {\r\n\r\n\t\t\tactiveTiles.add( tile );\r\n\r\n\t\t} else {\r\n\r\n\t\t\tactiveTiles.delete( tile );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tcalculateError( tile ) {\r\n\r\n\t\tif ( tile.geometricError === 0.0 ) {\r\n\r\n\t\t\treturn 0.0;\r\n\r\n\t\t}\r\n\r\n\t\tconst cached = tile.cached;\r\n\t\tconst inFrustum = cached.inFrustum;\r\n\t\tconst cameras = this.cameras;\r\n\t\tconst cameraInfo = this.cameraInfo;\r\n\r\n\t\t// TODO: Use the content bounding volume here?\r\n\t\tconst boundingVolume = tile.boundingVolume;\r\n\t\tif ( 'box' in boundingVolume ) {\r\n\r\n\t\t\tconst boundingBox = cached.box;\r\n\t\t\tconst boxTransformInverse = cached.boxTransformInverse;\r\n\r\n\t\t\tlet maxError = - Infinity;\r\n\t\t\tlet minDistance = Infinity;\r\n\t\t\tfor ( let i = 0, l = cameras.length; i < l; i ++ ) {\r\n\r\n\t\t\t\tif ( ! inFrustum[ i ] ) {\r\n\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// transform camera position into local frame of the tile bounding box\r\n\t\t\t\tconst camera = cameras[ i ];\r\n\t\t\t\tconst info = cameraInfo[ i ];\r\n\t\t\t\tconst invScale = info.invScale;\r\n\t\t\t\ttempVector.copy( info.position );\r\n\t\t\t\ttempVector.applyMatrix4( boxTransformInverse );\r\n\r\n\t\t\t\tlet error;\r\n\t\t\t\tif ( camera.isOrthographicCamera ) {\r\n\r\n\t\t\t\t\tconst pixelSize = info.pixelSize;\r\n\t\t\t\t\terror = tile.geometricError / ( pixelSize * invScale );\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tconst distance = boundingBox.distanceToPoint( tempVector );\r\n\t\t\t\t\tconst scaledDistance = distance * invScale;\r\n\t\t\t\t\tconst sseDenominator = info.sseDenominator;\r\n\t\t\t\t\terror = tile.geometricError / ( scaledDistance * sseDenominator );\r\n\r\n\t\t\t\t\tminDistance = Math.min( minDistance, scaledDistance );\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmaxError = Math.max( maxError, error );\r\n\r\n\t\t\t}\r\n\r\n\t\t\ttile.cached.distance = minDistance;\r\n\r\n\t\t\treturn maxError;\r\n\r\n\t\t} else if ( 'sphere' in boundingVolume ) {\r\n\r\n\t\t\t// const sphere = cached.sphere;\r\n\r\n\t\t\tconsole.warn( 'ThreeTilesRenderer : Sphere bounds not supported.' );\r\n\r\n\t\t} else if ( 'region' in boundingVolume ) {\r\n\r\n\t\t\t// unsupported\r\n\t\t\tconsole.warn( 'ThreeTilesRenderer : Region bounds not supported.' );\r\n\r\n\t\t}\r\n\r\n\t\treturn Infinity;\r\n\r\n\t}\r\n\r\n\ttileInView( tile ) {\r\n\r\n\t\t// TODO: we should use the more precise bounding volumes here if possible\r\n\t\t// cache the root-space planes\r\n\t\t// Use separating axis theorem for frustum and obb\r\n\r\n\t\tconst cached = tile.cached;\r\n\t\tconst sphere = cached.sphere;\r\n\t\tconst inFrustum = cached.inFrustum;\r\n\t\tif ( sphere ) {\r\n\r\n\t\t\tconst cameraInfo = this.cameraInfo;\r\n\t\t\tlet inView = false;\r\n\t\t\tfor ( let i = 0, l = cameraInfo.length; i < l; i ++ ) {\r\n\r\n\t\t\t\t// Track which camera frustums this tile is in so we can use it\r\n\t\t\t\t// to ignore the error calculations for cameras that can't see it\r\n\t\t\t\tconst frustum = cameraInfo[ i ].frustum;\r\n\t\t\t\tif ( frustum.intersectsSphere( sphere ) ) {\r\n\r\n\t\t\t\t\tinView = true;\r\n\t\t\t\t\tinFrustum[ i ] = true;\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tinFrustum[ i ] = false;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\treturn inView;\r\n\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\r\n\t}\r\n\r\n\r\n}\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/three/TilesRenderer.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/three/raycastTraverse.js": +/*!*********************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/three/raycastTraverse.js ***! + \*********************************************************************/ +/*! exports provided: raycastTraverseFirstHit, raycastTraverse */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"raycastTraverseFirstHit\", function() { return raycastTraverseFirstHit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"raycastTraverse\", function() { return raycastTraverse; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! three */ \"./node_modules/three/build/three.module.js\");\n\r\nconst _sphere = new three__WEBPACK_IMPORTED_MODULE_0__[\"Sphere\"]();\r\nconst _mat = new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix4\"]();\r\nconst _vec = new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"]();\r\nconst _vec2 = new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"]();\r\nconst _ray = new three__WEBPACK_IMPORTED_MODULE_0__[\"Ray\"]();\r\n\r\nconst _hitArray = [];\r\n\r\nfunction distanceSort( a, b ) {\r\n\r\n\treturn a.distance - b.distance;\r\n\r\n}\r\n\r\nfunction intersectTileScene( scene, raycaster, intersects ) {\r\n\r\n\t// Don't intersect the box3 helpers because those are used for debugging\r\n\tscene.traverse( c => {\r\n\r\n\t\t// We set the default raycast function to empty so three.js doesn't automatically cast against it\r\n\t\tObject.getPrototypeOf( c ).raycast.call( c, raycaster, intersects );\r\n\r\n\t} );\r\n\r\n}\r\n\r\n// Returns the closest hit when traversing the tree\r\nfunction raycastTraverseFirstHit( root, group, activeTiles, raycaster ) {\r\n\r\n\t// If the root is active make sure we've checked it\r\n\tif ( activeTiles.has( root ) ) {\r\n\r\n\t\tintersectTileScene( root.cached.scene, raycaster, _hitArray );\r\n\r\n\t\tif ( _hitArray.length > 0 ) {\r\n\r\n\t\t\tif ( _hitArray.length > 1 ) {\r\n\r\n\t\t\t\t_hitArray.sort( distanceSort );\r\n\r\n\t\t\t}\r\n\r\n\t\t\tconst res = _hitArray[ 0 ];\r\n\t\t\t_hitArray.length = 0;\r\n\t\t\treturn res;\r\n\r\n\t\t} else {\r\n\r\n\t\t\treturn null;\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t// TODO: can we avoid creating a new array here every time to save on memory?\r\n\tconst array = [];\r\n\tconst children = root.children;\r\n\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\r\n\r\n\t\tconst tile = children[ i ];\r\n\t\tconst cached = tile.cached;\r\n\t\tconst groupMatrixWorld = group.matrixWorld;\r\n\r\n\t\t_mat.copy( groupMatrixWorld );\r\n\r\n\t\t// if we don't hit the sphere then early out\r\n\t\tconst sphere = cached.sphere;\r\n\t\tif ( sphere ) {\r\n\r\n\t\t\t_sphere.copy( sphere );\r\n\t\t\t_sphere.applyMatrix4( _mat );\r\n\t\t\tif ( ! raycaster.ray.intersectsSphere( _sphere ) ) {\r\n\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t// TODO: check region?\r\n\r\n\t\tconst boundingBox = cached.box;\r\n\t\tconst obbMat = cached.boxTransform;\r\n\t\tif ( boundingBox ) {\r\n\r\n\t\t\t_mat.multiply( obbMat ).invert();\r\n\t\t\t_ray.copy( raycaster.ray );\r\n\t\t\t_ray.applyMatrix4( _mat );\r\n\t\t\tif ( _ray.intersectBox( boundingBox, _vec ) ) {\r\n\r\n\t\t\t\t// account for tile scale\r\n\t\t\t\tlet invScale;\r\n\t\t\t\t_vec2.setFromMatrixScale( _mat );\r\n\t\t\t\tinvScale = _vec2.x;\r\n\r\n\t\t\t\tif ( Math.abs( Math.max( _vec2.x - _vec2.y, _vec2.x - _vec2.z ) ) > 1e-6 ) {\r\n\r\n\t\t\t\t\tconsole.warn( 'ThreeTilesRenderer : Non uniform scale used for tile which may cause issues when raycasting.' );\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// if we intersect the box save the distance to the tile bounds\r\n\t\t\t\tlet data = {\r\n\t\t\t\t\tdistance: Infinity,\r\n\t\t\t\t\ttile: null\r\n\t\t\t\t};\r\n\t\t\t\tarray.push( data );\r\n\r\n\t\t\t\tdata.distance = _vec.distanceToSquared( _ray.origin ) * invScale * invScale;\r\n\t\t\t\tdata.tile = tile;\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t// sort them by ascending distance\r\n\tarray.sort( distanceSort );\r\n\r\n\t// traverse until we find the best hit and early out if a tile bounds\r\n\t// couldn't possible include a best hit\r\n\tlet bestDistanceSquared = Infinity;\r\n\tlet bestHit = null;\r\n\tfor ( let i = 0, l = array.length; i < l; i ++ ) {\r\n\r\n\t\tconst data = array[ i ];\r\n\t\tconst distanceSquared = data.distance;\r\n\t\tif ( distanceSquared > bestDistanceSquared ) {\r\n\r\n\t\t\tbreak;\r\n\r\n\t\t} else {\r\n\r\n\t\t\tconst tile = data.tile;\r\n\t\t\tconst scene = tile.cached.scene;\r\n\r\n\t\t\tlet hit = null;\r\n\t\t\tif ( activeTiles.has( tile ) ) {\r\n\r\n\t\t\t\t// save the hit if it's closer\r\n\t\t\t\tintersectTileScene( scene, raycaster, _hitArray );\r\n\t\t\t\tif ( _hitArray.length > 0 ) {\r\n\r\n\t\t\t\t\tif ( _hitArray.length > 1 ) {\r\n\r\n\t\t\t\t\t\t_hitArray.sort( distanceSort );\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\thit = _hitArray[ 0 ];\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\thit = raycastTraverseFirstHit( tile, group, activeTiles, raycaster );\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif ( hit ) {\r\n\r\n\t\t\t\tconst hitDistanceSquared = hit.distance * hit.distance;\r\n\t\t\t\tif ( hitDistanceSquared < bestDistanceSquared ) {\r\n\r\n\t\t\t\t\tbestDistanceSquared = hitDistanceSquared;\r\n\t\t\t\t\tbestHit = hit;\r\n\r\n\t\t\t\t}\r\n\t\t\t\t_hitArray.length = 0;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\treturn bestHit;\r\n\r\n}\r\n\r\nfunction raycastTraverse( tile, group, activeTiles, raycaster, intersects ) {\r\n\r\n\tconst cached = tile.cached;\r\n\tconst groupMatrixWorld = group.matrixWorld;\r\n\r\n\t_mat.copy( groupMatrixWorld );\r\n\r\n\t// Early out if we don't hit this tile sphere\r\n\tconst sphere = cached.sphere;\r\n\tif ( sphere ) {\r\n\r\n\t\t_sphere.copy( sphere );\r\n\t\t_sphere.applyMatrix4( _mat );\r\n\t\tif ( ! raycaster.ray.intersectsSphere( _sphere ) ) {\r\n\r\n\t\t\treturn;\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t// Early out if we don't this this tile box\r\n\tconst boundingBox = cached.box;\r\n\tconst obbMat = cached.boxTransform;\r\n\tif ( boundingBox ) {\r\n\r\n\t\t_mat.multiply( obbMat ).invert();\r\n\t\t_ray.copy( raycaster.ray ).applyMatrix4( _mat );\r\n\t\tif ( ! _ray.intersectsBox( boundingBox ) ) {\r\n\r\n\t\t\treturn;\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t// TODO: check region\r\n\r\n\tconst scene = cached.scene;\r\n\tif ( activeTiles.has( tile ) ) {\r\n\r\n\t\tintersectTileScene( scene, raycaster, intersects );\r\n\t\treturn;\r\n\r\n\t}\r\n\r\n\tconst children = tile.children;\r\n\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\r\n\r\n\t\traycastTraverse( children[ i ], group, activeTiles, raycaster, intersects );\r\n\r\n\t}\r\n\r\n}\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/three/raycastTraverse.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/utilities/FeatureTable.js": +/*!**********************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/utilities/FeatureTable.js ***! + \**********************************************************************/ +/*! exports provided: FeatureTable, BatchTable */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"FeatureTable\", function() { return FeatureTable; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"BatchTable\", function() { return BatchTable; });\n/* harmony import */ var _arrayToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayToString.js */ \"./node_modules/3d-tiles-renderer/src/utilities/arrayToString.js\");\n\r\n\r\nclass FeatureTable {\r\n\r\n\tconstructor( buffer, start, headerLength, binLength ) {\r\n\r\n\t\tthis.buffer = buffer;\r\n\t\tthis.binOffset = start + headerLength;\r\n\t\tthis.binLength = binLength;\r\n\r\n\t\tlet header = null;\r\n\t\tif ( headerLength !== 0 ) {\r\n\r\n\t\t\tconst headerData = new Uint8Array( buffer, start, headerLength );\r\n\t\t\theader = JSON.parse( Object(_arrayToString_js__WEBPACK_IMPORTED_MODULE_0__[\"arrayToString\"])( headerData ) );\r\n\r\n\t\t} else {\r\n\r\n\t\t\theader = {};\r\n\r\n\t\t}\r\n\t\tthis.header = header;\r\n\r\n\t}\r\n\r\n\tgetKeys() {\r\n\r\n\t\treturn Object.keys( this.header );\r\n\r\n\t}\r\n\r\n\tgetData( key, count, defaultComponentType = null, defaultType = null ) {\r\n\r\n\t\tconst header = this.header;\r\n\r\n\t\tif ( ! ( key in header ) ) {\r\n\r\n\t\t\treturn null;\r\n\r\n\t\t}\r\n\r\n\t\tconst feature = header[ key ];\r\n\t\tif ( ! ( feature instanceof Object ) ) {\r\n\r\n\t\t\treturn feature;\r\n\r\n\t\t} else if ( Array.isArray( feature ) ) {\r\n\r\n\t\t\treturn feature;\r\n\r\n\t\t} else {\r\n\r\n\t\t\tconst { buffer, binOffset, binLength } = this;\r\n\t\t\tconst byteOffset = feature.byteOffset || 0;\r\n\t\t\tconst featureType = feature.type || defaultType;\r\n\t\t\tconst featureComponentType = feature.componentType || defaultComponentType;\r\n\r\n\t\t\tif ( 'type' in feature && defaultType && feature.type !== defaultType ) {\r\n\r\n\t\t\t\tthrow new Error( 'FeatureTable: Specified type does not match expected type.' );\r\n\r\n\t\t\t}\r\n\r\n\t\t\tlet stride;\r\n\t\t\tswitch ( featureType ) {\r\n\r\n\t\t\t\tcase 'SCALAR':\r\n\t\t\t\t\tstride = 1;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'VEC2':\r\n\t\t\t\t\tstride = 2;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'VEC3':\r\n\t\t\t\t\tstride = 3;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'VEC4':\r\n\t\t\t\t\tstride = 4;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new Error( `FeatureTable : Feature type not provided for \"${ key }\".` );\r\n\r\n\t\t\t}\r\n\r\n\t\t\tlet data;\r\n\t\t\tconst arrayStart = binOffset + byteOffset;\r\n\t\t\tconst arrayLength = count * stride;\r\n\r\n\t\t\tswitch ( featureComponentType ) {\r\n\r\n\t\t\t\tcase 'BYTE':\r\n\t\t\t\t\tdata = new Int8Array( buffer, arrayStart, arrayLength );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'UNSIGNED_BYTE':\r\n\t\t\t\t\tdata = new Uint8Array( buffer, arrayStart, arrayLength );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'SHORT':\r\n\t\t\t\t\tdata = new Int16Array( buffer, arrayStart, arrayLength );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'UNSIGNED_SHORT':\r\n\t\t\t\t\tdata = new Uint16Array( buffer, arrayStart, arrayLength );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'INT':\r\n\t\t\t\t\tdata = new Int32Array( buffer, arrayStart, arrayLength );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'UNSIGNED_INT':\r\n\t\t\t\t\tdata = new Uint32Array( buffer, arrayStart, arrayLength );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'FLOAT':\r\n\t\t\t\t\tdata = new Float32Array( buffer, arrayStart, arrayLength );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'DOUBLE':\r\n\t\t\t\t\tdata = new Float64Array( buffer, arrayStart, arrayLength );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new Error( `FeatureTable : Feature component type not provided for \"${ key }\".` );\r\n\r\n\t\t\t}\r\n\r\n\t\t\tconst dataEnd = arrayStart + arrayLength * data.BYTES_PER_ELEMENT;\r\n\t\t\tif ( dataEnd > binOffset + binLength ) {\r\n\r\n\t\t\t\tthrow new Error( 'FeatureTable: Feature data read outside binary body length.' );\r\n\r\n\t\t\t}\r\n\r\n\t\t\treturn data;\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n}\r\n\r\nclass BatchTable extends FeatureTable {\r\n\r\n\tconstructor( buffer, batchSize, start, headerLength, binLength ) {\r\n\r\n\t\tsuper( buffer, start, headerLength, binLength );\r\n\t\tthis.batchSize = batchSize;\r\n\r\n\t}\r\n\r\n\tgetData( key, componentType = null, type = null ) {\r\n\r\n\t\treturn super.getData( key, this.batchSize, type, componentType );\r\n\r\n\t}\r\n\r\n}\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/utilities/FeatureTable.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/utilities/LRUCache.js": +/*!******************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/utilities/LRUCache.js ***! + \******************************************************************/ +/*! exports provided: LRUCache */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"LRUCache\", function() { return LRUCache; });\n// Fires at the end of the frame and before the next one\r\nfunction enqueueMicrotask( callback ) {\r\n\r\n\tPromise.resolve().then( callback );\r\n\r\n}\r\n\r\nclass LRUCache {\r\n\r\n\tconstructor() {\r\n\r\n\t\t// options\r\n\t\tthis.maxSize = 800;\r\n\t\tthis.minSize = 600;\r\n\t\tthis.unloadPercent = 0.05;\r\n\r\n\t\t// \"itemSet\" doubles as both the list of the full set of items currently\r\n\t\t// stored in the cache (keys) as well as a map to the time the item was last\r\n\t\t// used so it can be sorted appropriately.\r\n\t\tthis.itemSet = new Map();\r\n\t\tthis.itemList = [];\r\n\t\tthis.usedSet = new Set();\r\n\t\tthis.callbacks = new Map();\r\n\r\n\t\tthis.unloadPriorityCallback = null;\r\n\r\n\t\tconst itemSet = this.itemSet;\r\n\t\tthis.defaultPriorityCallback = item => itemSet.get( item );\r\n\r\n\t}\r\n\r\n\t// Returns whether or not the cache has reached the maximum size\r\n\tisFull() {\r\n\r\n\t\treturn this.itemSet.size >= this.maxSize;\r\n\r\n\t}\r\n\r\n\tadd( item, removeCb ) {\r\n\r\n\t\tconst itemSet = this.itemSet;\r\n\t\tif ( itemSet.has( item ) ) {\r\n\r\n\t\t\treturn false;\r\n\r\n\t\t}\r\n\r\n\t\tif ( this.isFull() ) {\r\n\r\n\t\t\treturn false;\r\n\r\n\t\t}\r\n\r\n\t\tconst usedSet = this.usedSet;\r\n\t\tconst itemList = this.itemList;\r\n\t\tconst callbacks = this.callbacks;\r\n\t\titemList.push( item );\r\n\t\tusedSet.add( item );\r\n\t\titemSet.set( item, Date.now() );\r\n\t\tcallbacks.set( item, removeCb );\r\n\r\n\t\treturn true;\r\n\r\n\t}\r\n\r\n\tremove( item ) {\r\n\r\n\t\tconst usedSet = this.usedSet;\r\n\t\tconst itemSet = this.itemSet;\r\n\t\tconst itemList = this.itemList;\r\n\t\tconst callbacks = this.callbacks;\r\n\r\n\t\tif ( itemSet.has( item ) ) {\r\n\r\n\t\t\tcallbacks.get( item )( item );\r\n\r\n\t\t\tconst index = itemList.indexOf( item );\r\n\t\t\titemList.splice( index, 1 );\r\n\t\t\tusedSet.delete( item );\r\n\t\t\titemSet.delete( item );\r\n\t\t\tcallbacks.delete( item );\r\n\r\n\t\t\treturn true;\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\r\n\t}\r\n\r\n\tmarkUsed( item ) {\r\n\r\n\t\tconst itemSet = this.itemSet;\r\n\t\tconst usedSet = this.usedSet;\r\n\t\tif ( itemSet.has( item ) && ! usedSet.has( item ) ) {\r\n\r\n\t\t\titemSet.set( item, Date.now() );\r\n\t\t\tusedSet.add( item );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tmarkAllUnused() {\r\n\r\n\t\tthis.usedSet.clear();\r\n\r\n\t}\r\n\r\n\t// TODO: this should be renamed because it's not necessarily unloading all unused content\r\n\t// Maybe call it \"cleanup\" or \"unloadToMinSize\"\r\n\tunloadUnusedContent() {\r\n\r\n\t\tconst unloadPercent = this.unloadPercent;\r\n\t\tconst targetSize = this.minSize;\r\n\t\tconst itemList = this.itemList;\r\n\t\tconst itemSet = this.itemSet;\r\n\t\tconst usedSet = this.usedSet;\r\n\t\tconst callbacks = this.callbacks;\r\n\t\tconst unused = itemList.length - usedSet.size;\r\n\t\tconst excess = itemList.length - targetSize;\r\n\t\tconst unloadPriorityCallback = this.unloadPriorityCallback || this.defaultPriorityCallback;\r\n\r\n\t\tif ( excess > 0 && unused > 0 ) {\r\n\r\n\t\t\t// used items should be at the end of the array\r\n\t\t\titemList.sort( ( a, b ) => {\r\n\r\n\t\t\t\tconst usedA = usedSet.has( a );\r\n\t\t\t\tconst usedB = usedSet.has( b );\r\n\t\t\t\tif ( usedA && usedB ) {\r\n\r\n\t\t\t\t\t// If they're both used then don't bother moving them\r\n\t\t\t\t\treturn 0;\r\n\r\n\t\t\t\t} else if ( ! usedA && ! usedB ) {\r\n\r\n\t\t\t\t\t// Use the sort function otherwise\r\n\t\t\t\t\t// higher priority should be further to the left\r\n\t\t\t\t\treturn unloadPriorityCallback( b ) - unloadPriorityCallback( a );\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// If one is used and the other is not move the used one towards the end of the array\r\n\t\t\t\t\treturn usedA ? 1 : - 1;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} );\r\n\r\n\t\t\t// address corner cases where the minSize might be zero or smaller than maxSize - minSize,\r\n\t\t\t// which would result in a very small or no items being unloaded.\r\n\t\t\tconst unusedExcess = Math.min( excess, unused );\r\n\t\t\tconst maxUnload = Math.max( targetSize * unloadPercent, unusedExcess * unloadPercent );\r\n\t\t\tlet nodesToUnload = Math.min( maxUnload, unused );\r\n\t\t\tnodesToUnload = Math.ceil( nodesToUnload );\r\n\r\n\t\t\tconst removedItems = itemList.splice( 0, nodesToUnload );\r\n\t\t\tfor ( let i = 0, l = removedItems.length; i < l; i ++ ) {\r\n\r\n\t\t\t\tconst item = removedItems[ i ];\r\n\t\t\t\tcallbacks.get( item )( item );\r\n\t\t\t\titemSet.delete( item );\r\n\t\t\t\tcallbacks.delete( item );\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tscheduleUnload( markAllUnused = true ) {\r\n\r\n\t\tif ( ! this.scheduled ) {\r\n\r\n\t\t\tthis.scheduled = true;\r\n\t\t\tenqueueMicrotask( () => {\r\n\r\n\t\t\t\tthis.scheduled = false;\r\n\t\t\t\tthis.unloadUnusedContent();\r\n\t\t\t\tif ( markAllUnused ) {\r\n\r\n\t\t\t\t\tthis.markAllUnused();\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n}\r\n\r\n\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/utilities/LRUCache.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/utilities/PriorityQueue.js": +/*!***********************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/utilities/PriorityQueue.js ***! + \***********************************************************************/ +/*! exports provided: PriorityQueue */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PriorityQueue\", function() { return PriorityQueue; });\nclass PriorityQueue {\r\n\r\n\tconstructor() {\r\n\r\n\t\t// options\r\n\t\tthis.maxJobs = 6;\r\n\r\n\t\tthis.items = [];\r\n\t\tthis.callbacks = new Map();\r\n\t\tthis.currJobs = 0;\r\n\t\tthis.scheduled = false;\r\n\t\tthis.autoUpdate = true;\r\n\r\n\t\tthis.priorityCallback = () => {\r\n\r\n\t\t\tthrow new Error( 'PriorityQueue: PriorityCallback function not defined.' );\r\n\r\n\t\t};\r\n\r\n\t}\r\n\r\n\tsort() {\r\n\r\n\t\tconst priorityCallback = this.priorityCallback;\r\n\t\tconst items = this.items;\r\n\t\titems.sort( ( a, b ) => {\r\n\r\n\t\t\treturn priorityCallback( a ) - priorityCallback( b );\r\n\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\tadd( item, callback ) {\r\n\r\n\t\treturn new Promise( ( resolve, reject ) => {\r\n\r\n\t\t\tconst prCallback = ( ...args ) => callback( ...args ).then( resolve ).catch( reject );\r\n\t\t\tconst items = this.items;\r\n\t\t\tconst callbacks = this.callbacks;\r\n\r\n\t\t\titems.push( item );\r\n\t\t\tcallbacks.set( item, prCallback );\r\n\r\n\t\t\tif ( this.autoUpdate ) {\r\n\r\n\t\t\t\tthis.scheduleJobRun();\r\n\r\n\t\t\t}\r\n\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\tremove( item ) {\r\n\r\n\t\tconst items = this.items;\r\n\t\tconst callbacks = this.callbacks;\r\n\r\n\t\tconst index = items.indexOf( item );\r\n\t\tif ( index !== - 1 ) {\r\n\r\n\t\t\titems.splice( index, 1 );\r\n\t\t\tcallbacks.delete( item );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\ttryRunJobs() {\r\n\r\n\t\tthis.sort();\r\n\r\n\t\tconst items = this.items;\r\n\t\tconst callbacks = this.callbacks;\r\n\t\tconst maxJobs = this.maxJobs;\r\n\t\tlet currJobs = this.currJobs;\r\n\t\twhile ( maxJobs > currJobs && items.length > 0 ) {\r\n\r\n\t\t\tcurrJobs ++;\r\n\t\t\tconst item = items.pop();\r\n\t\t\tconst callback = callbacks.get( item );\r\n\t\t\tcallbacks.delete( item );\r\n\t\t\tcallback( item )\r\n\t\t\t\t.then( () => {\r\n\r\n\t\t\t\t\tthis.currJobs --;\r\n\r\n\t\t\t\t\tif ( this.autoUpdate ) {\r\n\r\n\t\t\t\t\t\tthis.scheduleJobRun();\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} )\r\n\t\t\t\t.catch( () => {\r\n\r\n\t\t\t\t\tthis.currJobs --;\r\n\r\n\t\t\t\t\tif ( this.autoUpdate ) {\r\n\r\n\t\t\t\t\t\tthis.scheduleJobRun();\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} );\r\n\r\n\t\t}\r\n\t\tthis.currJobs = currJobs;\r\n\r\n\t}\r\n\r\n\tscheduleJobRun() {\r\n\r\n\t\tif ( ! this.scheduled ) {\r\n\r\n\t\t\trequestAnimationFrame( () => {\r\n\r\n\t\t\t\tthis.tryRunJobs();\r\n\t\t\t\tthis.scheduled = false;\r\n\r\n\t\t\t} );\r\n\t\t\tthis.scheduled = true;\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n}\r\n\r\n\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/utilities/PriorityQueue.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/utilities/arrayToString.js": +/*!***********************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/utilities/arrayToString.js ***! + \***********************************************************************/ +/*! exports provided: arrayToString */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"arrayToString\", function() { return arrayToString; });\nfunction arrayToString( array ) {\r\n\r\n\tlet str = '';\r\n\tfor ( let i = 0, l = array.length; i < l; i ++ ) {\r\n\r\n\t\tstr += String.fromCharCode( array[ i ] );\r\n\r\n\t}\r\n\r\n\treturn str;\r\n\r\n}\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/utilities/arrayToString.js?"); + +/***/ }), + +/***/ "./node_modules/3d-tiles-renderer/src/utilities/urlJoin.js": +/*!*****************************************************************!*\ + !*** ./node_modules/3d-tiles-renderer/src/utilities/urlJoin.js ***! + \*****************************************************************/ +/*! exports provided: urlJoin */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"urlJoin\", function() { return urlJoin; });\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);\n\r\n\r\n// Function that properly handles path resolution for parts that have\r\n// a protocol component like \"http://\".\r\nfunction urlJoin( ...args ) {\r\n\r\n\tconst protocolRegex = /^[a-zA-Z]+:\\/\\//;\r\n\tlet lastRoot = - 1;\r\n\tfor ( let i = 0, l = args.length; i < l; i ++ ) {\r\n\r\n\t\tif ( protocolRegex.test( args[ i ] ) ) {\r\n\r\n\t\t\tlastRoot = i;\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tif ( lastRoot === - 1 ) {\r\n\r\n\t\treturn path__WEBPACK_IMPORTED_MODULE_0___default.a.join( ...args ).replace( /\\\\/g, '/' );\r\n\r\n\t} else {\r\n\r\n\t\tconst parts = lastRoot <= 0 ? args : args.slice( lastRoot );\r\n\t\tconst protocol = parts[ 0 ].match( protocolRegex )[ 0 ];\r\n\t\tparts[ 0 ] = parts[ 0 ].substring( protocol.length );\r\n\r\n\t\treturn ( protocol + path__WEBPACK_IMPORTED_MODULE_0___default.a.join( ...parts ) ).replace( /\\\\/g, '/' );\r\n\r\n\t}\r\n\r\n}\r\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/3d-tiles-renderer/src/utilities/urlJoin.js?"); + +/***/ }), + +/***/ "./node_modules/@turf/bbox/dist/es/index.js": +/*!**************************************************!*\ + !*** ./node_modules/@turf/bbox/dist/es/index.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _turf_meta__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @turf/meta */ \"./node_modules/@turf/meta/dist/es/index.js\");\n\n/**\n * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.\n *\n * @name bbox\n * @param {GeoJSON} geojson any GeoJSON object\n * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order\n * @example\n * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);\n * var bbox = turf.bbox(line);\n * var bboxPolygon = turf.bboxPolygon(bbox);\n *\n * //addToMap\n * var addToMap = [line, bboxPolygon]\n */\nfunction bbox(geojson) {\n var result = [Infinity, Infinity, -Infinity, -Infinity];\n Object(_turf_meta__WEBPACK_IMPORTED_MODULE_0__[\"coordEach\"])(geojson, function (coord) {\n if (result[0] > coord[0]) {\n result[0] = coord[0];\n }\n if (result[1] > coord[1]) {\n result[1] = coord[1];\n }\n if (result[2] < coord[0]) {\n result[2] = coord[0];\n }\n if (result[3] < coord[1]) {\n result[3] = coord[1];\n }\n });\n return result;\n}\nbbox[\"default\"] = bbox;\n/* harmony default export */ __webpack_exports__[\"default\"] = (bbox);\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/@turf/bbox/dist/es/index.js?"); + +/***/ }), + +/***/ "./node_modules/@turf/boolean-disjoint/dist/es/index.js": +/*!**************************************************************!*\ + !*** ./node_modules/@turf/boolean-disjoint/dist/es/index.js ***! + \**************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _turf_boolean_point_in_polygon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @turf/boolean-point-in-polygon */ \"./node_modules/@turf/boolean-point-in-polygon/dist/es/index.js\");\n/* harmony import */ var _turf_line_intersect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @turf/line-intersect */ \"./node_modules/@turf/line-intersect/dist/es/index.js\");\n/* harmony import */ var _turf_meta__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @turf/meta */ \"./node_modules/@turf/meta/dist/es/index.js\");\n/* harmony import */ var _turf_polygon_to_line__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @turf/polygon-to-line */ \"./node_modules/@turf/polygon-to-line/dist/es/index.js\");\n\n\n\n\n/**\n * Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set.\n *\n * @name booleanDisjoint\n * @param {Geometry|Feature} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var point = turf.point([2, 2]);\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n *\n * turf.booleanDisjoint(line, point);\n * //=true\n */\nfunction booleanDisjoint(feature1, feature2) {\n var bool = true;\n Object(_turf_meta__WEBPACK_IMPORTED_MODULE_2__[\"flattenEach\"])(feature1, function (flatten1) {\n Object(_turf_meta__WEBPACK_IMPORTED_MODULE_2__[\"flattenEach\"])(feature2, function (flatten2) {\n if (bool === false) {\n return false;\n }\n bool = disjoint(flatten1.geometry, flatten2.geometry);\n });\n });\n return bool;\n}\n/**\n * Disjoint operation for simple Geometries (Point/LineString/Polygon)\n *\n * @private\n * @param {Geometry} geom1 GeoJSON Geometry\n * @param {Geometry} geom2 GeoJSON Geometry\n * @returns {boolean} true/false\n */\nfunction disjoint(geom1, geom2) {\n switch (geom1.type) {\n case \"Point\":\n switch (geom2.type) {\n case \"Point\":\n return !compareCoords(geom1.coordinates, geom2.coordinates);\n case \"LineString\":\n return !isPointOnLine(geom2, geom1);\n case \"Polygon\":\n return !Object(_turf_boolean_point_in_polygon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(geom1, geom2);\n }\n /* istanbul ignore next */\n break;\n case \"LineString\":\n switch (geom2.type) {\n case \"Point\":\n return !isPointOnLine(geom1, geom2);\n case \"LineString\":\n return !isLineOnLine(geom1, geom2);\n case \"Polygon\":\n return !isLineInPoly(geom2, geom1);\n }\n /* istanbul ignore next */\n break;\n case \"Polygon\":\n switch (geom2.type) {\n case \"Point\":\n return !Object(_turf_boolean_point_in_polygon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(geom2, geom1);\n case \"LineString\":\n return !isLineInPoly(geom1, geom2);\n case \"Polygon\":\n return !isPolyInPoly(geom2, geom1);\n }\n }\n return false;\n}\n// http://stackoverflow.com/a/11908158/1979085\nfunction isPointOnLine(lineString, pt) {\n for (var i = 0; i < lineString.coordinates.length - 1; i++) {\n if (isPointOnLineSegment(lineString.coordinates[i], lineString.coordinates[i + 1], pt.coordinates)) {\n return true;\n }\n }\n return false;\n}\nfunction isLineOnLine(lineString1, lineString2) {\n var doLinesIntersect = Object(_turf_line_intersect__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(lineString1, lineString2);\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\nfunction isLineInPoly(polygon, lineString) {\n for (var _i = 0, _a = lineString.coordinates; _i < _a.length; _i++) {\n var coord = _a[_i];\n if (Object(_turf_boolean_point_in_polygon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(coord, polygon)) {\n return true;\n }\n }\n var doLinesIntersect = Object(_turf_line_intersect__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(lineString, Object(_turf_polygon_to_line__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(polygon));\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n/**\n * Is Polygon (geom1) in Polygon (geom2)\n * Only takes into account outer rings\n * See http://stackoverflow.com/a/4833823/1979085\n *\n * @private\n * @param {Geometry|Feature} feature1 Polygon1\n * @param {Geometry|Feature} feature2 Polygon2\n * @returns {boolean} true/false\n */\nfunction isPolyInPoly(feature1, feature2) {\n for (var _i = 0, _a = feature1.coordinates[0]; _i < _a.length; _i++) {\n var coord1 = _a[_i];\n if (Object(_turf_boolean_point_in_polygon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(coord1, feature2)) {\n return true;\n }\n }\n for (var _b = 0, _c = feature2.coordinates[0]; _b < _c.length; _b++) {\n var coord2 = _c[_b];\n if (Object(_turf_boolean_point_in_polygon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(coord2, feature1)) {\n return true;\n }\n }\n var doLinesIntersect = Object(_turf_line_intersect__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_turf_polygon_to_line__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(feature1), Object(_turf_polygon_to_line__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(feature2));\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\nfunction isPointOnLineSegment(lineSegmentStart, lineSegmentEnd, pt) {\n var dxc = pt[0] - lineSegmentStart[0];\n var dyc = pt[1] - lineSegmentStart[1];\n var dxl = lineSegmentEnd[0] - lineSegmentStart[0];\n var dyl = lineSegmentEnd[1] - lineSegmentStart[1];\n var cross = dxc * dyl - dyc * dxl;\n if (cross !== 0) {\n return false;\n }\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n if (dxl > 0) {\n return lineSegmentStart[0] <= pt[0] && pt[0] <= lineSegmentEnd[0];\n }\n else {\n return lineSegmentEnd[0] <= pt[0] && pt[0] <= lineSegmentStart[0];\n }\n }\n else if (dyl > 0) {\n return lineSegmentStart[1] <= pt[1] && pt[1] <= lineSegmentEnd[1];\n }\n else {\n return lineSegmentEnd[1] <= pt[1] && pt[1] <= lineSegmentStart[1];\n }\n}\n/**\n * compareCoords\n *\n * @private\n * @param {Position} pair1 point [x,y]\n * @param {Position} pair2 point [x,y]\n * @returns {boolean} true/false if coord pairs match\n */\nfunction compareCoords(pair1, pair2) {\n return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (booleanDisjoint);\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/@turf/boolean-disjoint/dist/es/index.js?"); + +/***/ }), + +/***/ "./node_modules/@turf/boolean-intersects/dist/es/index.js": +/*!****************************************************************!*\ + !*** ./node_modules/@turf/boolean-intersects/dist/es/index.js ***! + \****************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return booleanIntersects; });\n/* harmony import */ var _turf_boolean_disjoint__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @turf/boolean-disjoint */ \"./node_modules/@turf/boolean-disjoint/dist/es/index.js\");\n/* harmony import */ var _turf_meta__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @turf/meta */ \"./node_modules/@turf/meta/dist/es/index.js\");\n\n\n/**\n * Boolean-intersects returns (TRUE) two geometries intersect.\n *\n * @name booleanIntersects\n * @param {Geometry|Feature} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var point = turf.point([2, 2]);\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n *\n * turf.booleanIntersects(line, point);\n * //=true\n */\nfunction booleanIntersects(feature1, feature2) {\n var bool = false;\n Object(_turf_meta__WEBPACK_IMPORTED_MODULE_1__[\"flattenEach\"])(feature1, function (flatten1) {\n Object(_turf_meta__WEBPACK_IMPORTED_MODULE_1__[\"flattenEach\"])(feature2, function (flatten2) {\n if (bool === true) {\n return true;\n }\n bool = !Object(_turf_boolean_disjoint__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(flatten1.geometry, flatten2.geometry);\n });\n });\n return bool;\n}\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/@turf/boolean-intersects/dist/es/index.js?"); + +/***/ }), + +/***/ "./node_modules/@turf/boolean-point-in-polygon/dist/es/index.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@turf/boolean-point-in-polygon/dist/es/index.js ***! + \**********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return booleanPointInPolygon; });\n/* harmony import */ var _turf_invariant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @turf/invariant */ \"./node_modules/@turf/invariant/dist/es/index.js\");\n\n// http://en.wikipedia.org/wiki/Even%E2%80%93odd_rule\n// modified from: https://github.com/substack/point-in-polygon/blob/master/index.js\n// which was modified from http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html\n/**\n * Takes a {@link Point} and a {@link Polygon} or {@link MultiPolygon} and determines if the point\n * resides inside the polygon. The polygon can be convex or concave. The function accounts for holes.\n *\n * @name booleanPointInPolygon\n * @param {Coord} point input point\n * @param {Feature} polygon input polygon or multipolygon\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.ignoreBoundary=false] True if polygon boundary should be ignored when determining if\n * the point is inside the polygon otherwise false.\n * @returns {boolean} `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon\n * @example\n * var pt = turf.point([-77, 44]);\n * var poly = turf.polygon([[\n * [-81, 41],\n * [-81, 47],\n * [-72, 47],\n * [-72, 41],\n * [-81, 41]\n * ]]);\n *\n * turf.booleanPointInPolygon(pt, poly);\n * //= true\n */\nfunction booleanPointInPolygon(point, polygon, options) {\n if (options === void 0) { options = {}; }\n // validation\n if (!point) {\n throw new Error(\"point is required\");\n }\n if (!polygon) {\n throw new Error(\"polygon is required\");\n }\n var pt = Object(_turf_invariant__WEBPACK_IMPORTED_MODULE_0__[\"getCoord\"])(point);\n var geom = Object(_turf_invariant__WEBPACK_IMPORTED_MODULE_0__[\"getGeom\"])(polygon);\n var type = geom.type;\n var bbox = polygon.bbox;\n var polys = geom.coordinates;\n // Quick elimination if point is not inside bbox\n if (bbox && inBBox(pt, bbox) === false) {\n return false;\n }\n // normalize to multipolygon\n if (type === \"Polygon\") {\n polys = [polys];\n }\n var insidePoly = false;\n for (var i = 0; i < polys.length && !insidePoly; i++) {\n // check if it is in the outer ring first\n if (inRing(pt, polys[i][0], options.ignoreBoundary)) {\n var inHole = false;\n var k = 1;\n // check for the point in any of the holes\n while (k < polys[i].length && !inHole) {\n if (inRing(pt, polys[i][k], !options.ignoreBoundary)) {\n inHole = true;\n }\n k++;\n }\n if (!inHole) {\n insidePoly = true;\n }\n }\n }\n return insidePoly;\n}\n/**\n * inRing\n *\n * @private\n * @param {Array} pt [x,y]\n * @param {Array>} ring [[x,y], [x,y],..]\n * @param {boolean} ignoreBoundary ignoreBoundary\n * @returns {boolean} inRing\n */\nfunction inRing(pt, ring, ignoreBoundary) {\n var isInside = false;\n if (ring[0][0] === ring[ring.length - 1][0] &&\n ring[0][1] === ring[ring.length - 1][1]) {\n ring = ring.slice(0, ring.length - 1);\n }\n for (var i = 0, j = ring.length - 1; i < ring.length; j = i++) {\n var xi = ring[i][0];\n var yi = ring[i][1];\n var xj = ring[j][0];\n var yj = ring[j][1];\n var onBoundary = pt[1] * (xi - xj) + yi * (xj - pt[0]) + yj * (pt[0] - xi) === 0 &&\n (xi - pt[0]) * (xj - pt[0]) <= 0 &&\n (yi - pt[1]) * (yj - pt[1]) <= 0;\n if (onBoundary) {\n return !ignoreBoundary;\n }\n var intersect = yi > pt[1] !== yj > pt[1] &&\n pt[0] < ((xj - xi) * (pt[1] - yi)) / (yj - yi) + xi;\n if (intersect) {\n isInside = !isInside;\n }\n }\n return isInside;\n}\n/**\n * inBBox\n *\n * @private\n * @param {Position} pt point [x,y]\n * @param {BBox} bbox BBox [west, south, east, north]\n * @returns {boolean} true/false if point is inside BBox\n */\nfunction inBBox(pt, bbox) {\n return (bbox[0] <= pt[0] && bbox[1] <= pt[1] && bbox[2] >= pt[0] && bbox[3] >= pt[1]);\n}\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/@turf/boolean-point-in-polygon/dist/es/index.js?"); + +/***/ }), + +/***/ "./node_modules/@turf/circle/dist/es/index.js": +/*!****************************************************!*\ + !*** ./node_modules/@turf/circle/dist/es/index.js ***! + \****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _turf_destination__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @turf/destination */ \"./node_modules/@turf/destination/dist/es/index.js\");\n/* harmony import */ var _turf_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @turf/helpers */ \"./node_modules/@turf/helpers/dist/es/index.js\");\n\n\n/**\n * Takes a {@link Point} and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision.\n *\n * @name circle\n * @param {Feature|number[]} center center point\n * @param {number} radius radius of the circle\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.steps=64] number of steps\n * @param {string} [options.units='kilometers'] miles, kilometers, degrees, or radians\n * @param {Object} [options.properties={}] properties\n * @returns {Feature} circle polygon\n * @example\n * var center = [-75.343, 39.984];\n * var radius = 5;\n * var options = {steps: 10, units: 'kilometers', properties: {foo: 'bar'}};\n * var circle = turf.circle(center, radius, options);\n *\n * //addToMap\n * var addToMap = [turf.point(center), circle]\n */\nfunction circle(center, radius, options) {\n if (options === void 0) { options = {}; }\n // default params\n var steps = options.steps || 64;\n var properties = options.properties\n ? options.properties\n : !Array.isArray(center) && center.type === \"Feature\" && center.properties\n ? center.properties\n : {};\n // main\n var coordinates = [];\n for (var i = 0; i < steps; i++) {\n coordinates.push(Object(_turf_destination__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(center, radius, (i * -360) / steps, options).geometry\n .coordinates);\n }\n coordinates.push(coordinates[0]);\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_1__[\"polygon\"])([coordinates], properties);\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (circle);\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/@turf/circle/dist/es/index.js?"); + +/***/ }), + +/***/ "./node_modules/@turf/destination/dist/es/index.js": +/*!*********************************************************!*\ + !*** ./node_modules/@turf/destination/dist/es/index.js ***! + \*********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return destination; });\n/* harmony import */ var _turf_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @turf/helpers */ \"./node_modules/@turf/helpers/dist/es/index.js\");\n/* harmony import */ var _turf_invariant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @turf/invariant */ \"./node_modules/@turf/invariant/dist/es/index.js\");\n// http://en.wikipedia.org/wiki/Haversine_formula\n// http://www.movable-type.co.uk/scripts/latlong.html\n\n\n/**\n * Takes a {@link Point} and calculates the location of a destination point given a distance in\n * degrees, radians, miles, or kilometers; and bearing in degrees.\n * This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature.\n *\n * @name destination\n * @param {Coord} origin starting point\n * @param {number} distance distance from the origin point\n * @param {number} bearing ranging from -180 to 180\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] miles, kilometers, degrees, or radians\n * @param {Object} [options.properties={}] Translate properties to Point\n * @returns {Feature} destination point\n * @example\n * var point = turf.point([-75.343, 39.984]);\n * var distance = 50;\n * var bearing = 90;\n * var options = {units: 'miles'};\n *\n * var destination = turf.destination(point, distance, bearing, options);\n *\n * //addToMap\n * var addToMap = [point, destination]\n * destination.properties['marker-color'] = '#f00';\n * point.properties['marker-color'] = '#0f0';\n */\nfunction destination(origin, distance, bearing, options) {\n if (options === void 0) { options = {}; }\n // Handle input\n var coordinates1 = Object(_turf_invariant__WEBPACK_IMPORTED_MODULE_1__[\"getCoord\"])(origin);\n var longitude1 = Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"degreesToRadians\"])(coordinates1[0]);\n var latitude1 = Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"degreesToRadians\"])(coordinates1[1]);\n var bearingRad = Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"degreesToRadians\"])(bearing);\n var radians = Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"lengthToRadians\"])(distance, options.units);\n // Main\n var latitude2 = Math.asin(Math.sin(latitude1) * Math.cos(radians) +\n Math.cos(latitude1) * Math.sin(radians) * Math.cos(bearingRad));\n var longitude2 = longitude1 +\n Math.atan2(Math.sin(bearingRad) * Math.sin(radians) * Math.cos(latitude1), Math.cos(radians) - Math.sin(latitude1) * Math.sin(latitude2));\n var lng = Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"radiansToDegrees\"])(longitude2);\n var lat = Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"radiansToDegrees\"])(latitude2);\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"point\"])([lng, lat], options.properties);\n}\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/@turf/destination/dist/es/index.js?"); + +/***/ }), + +/***/ "./node_modules/@turf/helpers/dist/es/index.js": +/*!*****************************************************!*\ + !*** ./node_modules/@turf/helpers/dist/es/index.js ***! + \*****************************************************/ +/*! exports provided: earthRadius, factors, unitsFactors, areaFactors, feature, geometry, point, points, polygon, polygons, lineString, lineStrings, featureCollection, multiLineString, multiPoint, multiPolygon, geometryCollection, round, radiansToLength, lengthToRadians, lengthToDegrees, bearingToAzimuth, radiansToDegrees, degreesToRadians, convertLength, convertArea, isNumber, isObject, validateBBox, validateId */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"earthRadius\", function() { return earthRadius; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"factors\", function() { return factors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"unitsFactors\", function() { return unitsFactors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"areaFactors\", function() { return areaFactors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"feature\", function() { return feature; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"geometry\", function() { return geometry; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"point\", function() { return point; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"points\", function() { return points; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polygon\", function() { return polygon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polygons\", function() { return polygons; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lineString\", function() { return lineString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lineStrings\", function() { return lineStrings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"featureCollection\", function() { return featureCollection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiLineString\", function() { return multiLineString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiPoint\", function() { return multiPoint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiPolygon\", function() { return multiPolygon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"geometryCollection\", function() { return geometryCollection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"round\", function() { return round; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"radiansToLength\", function() { return radiansToLength; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lengthToRadians\", function() { return lengthToRadians; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lengthToDegrees\", function() { return lengthToDegrees; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bearingToAzimuth\", function() { return bearingToAzimuth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"radiansToDegrees\", function() { return radiansToDegrees; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"degreesToRadians\", function() { return degreesToRadians; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"convertLength\", function() { return convertLength; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"convertArea\", function() { return convertArea; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isNumber\", function() { return isNumber; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isObject\", function() { return isObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"validateBBox\", function() { return validateBBox; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"validateId\", function() { return validateId; });\n/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nvar earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nvar factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius / 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nvar unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1 / 1.0936,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nvar areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nfunction feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nfunction geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nfunction point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nfunction points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nfunction polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nfunction polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nfunction lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nfunction lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nfunction featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nfunction multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nfunction multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nfunction multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nfunction geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nfunction round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nfunction radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nfunction lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nfunction lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nfunction bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nfunction radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nfunction degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nfunction convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nfunction convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nfunction isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nfunction isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nfunction validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nfunction validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/@turf/helpers/dist/es/index.js?"); + +/***/ }), + +/***/ "./node_modules/@turf/invariant/dist/es/index.js": +/*!*******************************************************!*\ + !*** ./node_modules/@turf/invariant/dist/es/index.js ***! + \*******************************************************/ +/*! exports provided: getCoord, getCoords, containsNumber, geojsonType, featureOf, collectionOf, getGeom, getType */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getCoord\", function() { return getCoord; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getCoords\", function() { return getCoords; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"containsNumber\", function() { return containsNumber; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"geojsonType\", function() { return geojsonType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"featureOf\", function() { return featureOf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"collectionOf\", function() { return collectionOf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getGeom\", function() { return getGeom; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getType\", function() { return getType; });\n/* harmony import */ var _turf_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @turf/helpers */ \"./node_modules/@turf/helpers/dist/es/index.js\");\n\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array|Geometry|Feature} coord GeoJSON Point or an Array of numbers\n * @returns {Array} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nfunction getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nfunction getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nfunction containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"isNumber\"])(coordinates[0]) &&\n Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"isNumber\"])(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nfunction featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nfunction getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nfunction getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/@turf/invariant/dist/es/index.js?"); + +/***/ }), + +/***/ "./node_modules/@turf/line-intersect/dist/es/index.js": +/*!************************************************************!*\ + !*** ./node_modules/@turf/line-intersect/dist/es/index.js ***! + \************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _turf_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @turf/helpers */ \"./node_modules/@turf/helpers/dist/es/index.js\");\n/* harmony import */ var _turf_invariant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @turf/invariant */ \"./node_modules/@turf/invariant/dist/es/index.js\");\n/* harmony import */ var _turf_line_segment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @turf/line-segment */ \"./node_modules/@turf/line-segment/dist/es/index.js\");\n/* harmony import */ var _turf_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @turf/meta */ \"./node_modules/@turf/meta/dist/es/index.js\");\n/* harmony import */ var geojson_rbush__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! geojson-rbush */ \"./node_modules/geojson-rbush/index.js\");\n/* harmony import */ var geojson_rbush__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(geojson_rbush__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\n/**\n * Takes any LineString or Polygon GeoJSON and returns the intersecting point(s).\n *\n * @name lineIntersect\n * @param {GeoJSON} line1 any LineString or Polygon\n * @param {GeoJSON} line2 any LineString or Polygon\n * @returns {FeatureCollection} point(s) that intersect both\n * @example\n * var line1 = turf.lineString([[126, -11], [129, -21]]);\n * var line2 = turf.lineString([[123, -18], [131, -14]]);\n * var intersects = turf.lineIntersect(line1, line2);\n *\n * //addToMap\n * var addToMap = [line1, line2, intersects]\n */\nfunction lineIntersect(line1, line2) {\n var unique = {};\n var results = [];\n // First, normalize geometries to features\n // Then, handle simple 2-vertex segments\n if (line1.type === \"LineString\") {\n line1 = Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"feature\"])(line1);\n }\n if (line2.type === \"LineString\") {\n line2 = Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"feature\"])(line2);\n }\n if (line1.type === \"Feature\" &&\n line2.type === \"Feature\" &&\n line1.geometry !== null &&\n line2.geometry !== null &&\n line1.geometry.type === \"LineString\" &&\n line2.geometry.type === \"LineString\" &&\n line1.geometry.coordinates.length === 2 &&\n line2.geometry.coordinates.length === 2) {\n var intersect = intersects(line1, line2);\n if (intersect) {\n results.push(intersect);\n }\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"featureCollection\"])(results);\n }\n // Handles complex GeoJSON Geometries\n var tree = geojson_rbush__WEBPACK_IMPORTED_MODULE_4___default()();\n tree.load(Object(_turf_line_segment__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(line2));\n Object(_turf_meta__WEBPACK_IMPORTED_MODULE_3__[\"featureEach\"])(Object(_turf_line_segment__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(line1), function (segment) {\n Object(_turf_meta__WEBPACK_IMPORTED_MODULE_3__[\"featureEach\"])(tree.search(segment), function (match) {\n var intersect = intersects(segment, match);\n if (intersect) {\n // prevent duplicate points https://github.com/Turfjs/turf/issues/688\n var key = Object(_turf_invariant__WEBPACK_IMPORTED_MODULE_1__[\"getCoords\"])(intersect).join(\",\");\n if (!unique[key]) {\n unique[key] = true;\n results.push(intersect);\n }\n }\n });\n });\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"featureCollection\"])(results);\n}\n/**\n * Find a point that intersects LineStrings with two coordinates each\n *\n * @private\n * @param {Feature} line1 GeoJSON LineString (Must only contain 2 coordinates)\n * @param {Feature} line2 GeoJSON LineString (Must only contain 2 coordinates)\n * @returns {Feature} intersecting GeoJSON Point\n */\nfunction intersects(line1, line2) {\n var coords1 = Object(_turf_invariant__WEBPACK_IMPORTED_MODULE_1__[\"getCoords\"])(line1);\n var coords2 = Object(_turf_invariant__WEBPACK_IMPORTED_MODULE_1__[\"getCoords\"])(line2);\n if (coords1.length !== 2) {\n throw new Error(\" line1 must only contain 2 coordinates\");\n }\n if (coords2.length !== 2) {\n throw new Error(\" line2 must only contain 2 coordinates\");\n }\n var x1 = coords1[0][0];\n var y1 = coords1[0][1];\n var x2 = coords1[1][0];\n var y2 = coords1[1][1];\n var x3 = coords2[0][0];\n var y3 = coords2[0][1];\n var x4 = coords2[1][0];\n var y4 = coords2[1][1];\n var denom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);\n var numeA = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3);\n var numeB = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3);\n if (denom === 0) {\n if (numeA === 0 && numeB === 0) {\n return null;\n }\n return null;\n }\n var uA = numeA / denom;\n var uB = numeB / denom;\n if (uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1) {\n var x = x1 + uA * (x2 - x1);\n var y = y1 + uA * (y2 - y1);\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"point\"])([x, y]);\n }\n return null;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (lineIntersect);\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/@turf/line-intersect/dist/es/index.js?"); + +/***/ }), + +/***/ "./node_modules/@turf/line-segment/dist/es/index.js": +/*!**********************************************************!*\ + !*** ./node_modules/@turf/line-segment/dist/es/index.js ***! + \**********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _turf_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @turf/helpers */ \"./node_modules/@turf/helpers/dist/es/index.js\");\n/* harmony import */ var _turf_invariant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @turf/invariant */ \"./node_modules/@turf/invariant/dist/es/index.js\");\n/* harmony import */ var _turf_meta__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @turf/meta */ \"./node_modules/@turf/meta/dist/es/index.js\");\n\n\n\n/**\n * Creates a {@link FeatureCollection} of 2-vertex {@link LineString} segments from a\n * {@link LineString|(Multi)LineString} or {@link Polygon|(Multi)Polygon}.\n *\n * @name lineSegment\n * @param {GeoJSON} geojson GeoJSON Polygon or LineString\n * @returns {FeatureCollection} 2-vertex line segments\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n * var segments = turf.lineSegment(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, segments]\n */\nfunction lineSegment(geojson) {\n if (!geojson) {\n throw new Error(\"geojson is required\");\n }\n var results = [];\n Object(_turf_meta__WEBPACK_IMPORTED_MODULE_2__[\"flattenEach\"])(geojson, function (feature) {\n lineSegmentFeature(feature, results);\n });\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"featureCollection\"])(results);\n}\n/**\n * Line Segment\n *\n * @private\n * @param {Feature} geojson Line or polygon feature\n * @param {Array} results push to results\n * @returns {void}\n */\nfunction lineSegmentFeature(geojson, results) {\n var coords = [];\n var geometry = geojson.geometry;\n if (geometry !== null) {\n switch (geometry.type) {\n case \"Polygon\":\n coords = Object(_turf_invariant__WEBPACK_IMPORTED_MODULE_1__[\"getCoords\"])(geometry);\n break;\n case \"LineString\":\n coords = [Object(_turf_invariant__WEBPACK_IMPORTED_MODULE_1__[\"getCoords\"])(geometry)];\n }\n coords.forEach(function (coord) {\n var segments = createSegments(coord, geojson.properties);\n segments.forEach(function (segment) {\n segment.id = results.length;\n results.push(segment);\n });\n });\n }\n}\n/**\n * Create Segments from LineString coordinates\n *\n * @private\n * @param {Array>} coords LineString coordinates\n * @param {*} properties GeoJSON properties\n * @returns {Array>} line segments\n */\nfunction createSegments(coords, properties) {\n var segments = [];\n coords.reduce(function (previousCoords, currentCoords) {\n var segment = Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"lineString\"])([previousCoords, currentCoords], properties);\n segment.bbox = bbox(previousCoords, currentCoords);\n segments.push(segment);\n return currentCoords;\n });\n return segments;\n}\n/**\n * Create BBox between two coordinates (faster than @turf/bbox)\n *\n * @private\n * @param {Array} coords1 Point coordinate\n * @param {Array} coords2 Point coordinate\n * @returns {BBox} [west, south, east, north]\n */\nfunction bbox(coords1, coords2) {\n var x1 = coords1[0];\n var y1 = coords1[1];\n var x2 = coords2[0];\n var y2 = coords2[1];\n var west = x1 < x2 ? x1 : x2;\n var south = y1 < y2 ? y1 : y2;\n var east = x1 > x2 ? x1 : x2;\n var north = y1 > y2 ? y1 : y2;\n return [west, south, east, north];\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (lineSegment);\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/@turf/line-segment/dist/es/index.js?"); + +/***/ }), + +/***/ "./node_modules/@turf/meta/dist/es/index.js": +/*!**************************************************!*\ + !*** ./node_modules/@turf/meta/dist/es/index.js ***! + \**************************************************/ +/*! exports provided: coordEach, coordReduce, propEach, propReduce, featureEach, featureReduce, coordAll, geomEach, geomReduce, flattenEach, flattenReduce, segmentEach, segmentReduce, lineEach, lineReduce, findSegment, findPoint */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"coordEach\", function() { return coordEach; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"coordReduce\", function() { return coordReduce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"propEach\", function() { return propEach; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"propReduce\", function() { return propReduce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"featureEach\", function() { return featureEach; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"featureReduce\", function() { return featureReduce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"coordAll\", function() { return coordAll; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"geomEach\", function() { return geomEach; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"geomReduce\", function() { return geomReduce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flattenEach\", function() { return flattenEach; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flattenReduce\", function() { return flattenReduce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"segmentEach\", function() { return segmentEach; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"segmentReduce\", function() { return segmentReduce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lineEach\", function() { return lineEach; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lineReduce\", function() { return lineReduce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findSegment\", function() { return findSegment; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findPoint\", function() { return findPoint; });\n/* harmony import */ var _turf_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @turf/helpers */ \"./node_modules/@turf/helpers/dist/es/index.js\");\n\n\n/**\n * Callback for coordEach\n *\n * @callback coordEachCallback\n * @param {Array} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()\n *\n * @name coordEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction coordEach(geojson, callback, excludeWrapCoord) {\n // Handles null Geometry -- Skips this GeoJSON\n if (geojson === null) return;\n var j,\n k,\n l,\n geometry,\n stopG,\n coords,\n geometryMaybeCollection,\n wrapShrink = 0,\n coordIndex = 0,\n isGeometryCollection,\n type = geojson.type,\n isFeatureCollection = type === \"FeatureCollection\",\n isFeature = type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (var featureIndex = 0; featureIndex < stop; featureIndex++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[featureIndex].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {\n var multiFeatureIndex = 0;\n var geometryIndex = 0;\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[geomIndex]\n : geometryMaybeCollection;\n\n // Handles null Geometry -- Skips this geometry\n if (geometry === null) continue;\n coords = geometry.coordinates;\n var geomType = geometry.type;\n\n wrapShrink =\n excludeWrapCoord &&\n (geomType === \"Polygon\" || geomType === \"MultiPolygon\")\n ? 1\n : 0;\n\n switch (geomType) {\n case null:\n break;\n case \"Point\":\n if (\n callback(\n coords,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n multiFeatureIndex++;\n break;\n case \"LineString\":\n case \"MultiPoint\":\n for (j = 0; j < coords.length; j++) {\n if (\n callback(\n coords[j],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n if (geomType === \"MultiPoint\") multiFeatureIndex++;\n }\n if (geomType === \"LineString\") multiFeatureIndex++;\n break;\n case \"Polygon\":\n case \"MultiLineString\":\n for (j = 0; j < coords.length; j++) {\n for (k = 0; k < coords[j].length - wrapShrink; k++) {\n if (\n callback(\n coords[j][k],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n if (geomType === \"MultiLineString\") multiFeatureIndex++;\n if (geomType === \"Polygon\") geometryIndex++;\n }\n if (geomType === \"Polygon\") multiFeatureIndex++;\n break;\n case \"MultiPolygon\":\n for (j = 0; j < coords.length; j++) {\n geometryIndex = 0;\n for (k = 0; k < coords[j].length; k++) {\n for (l = 0; l < coords[j][k].length - wrapShrink; l++) {\n if (\n callback(\n coords[j][k][l],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n geometryIndex++;\n }\n multiFeatureIndex++;\n }\n break;\n case \"GeometryCollection\":\n for (j = 0; j < geometry.geometries.length; j++)\n if (\n coordEach(geometry.geometries[j], callback, excludeWrapCoord) ===\n false\n )\n return false;\n break;\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n }\n}\n\n/**\n * Callback for coordReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback coordReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Array} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Reduce coordinates in any GeoJSON object, similar to Array.reduce()\n *\n * @name coordReduce\n * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentCoord;\n * });\n */\nfunction coordReduce(geojson, callback, initialValue, excludeWrapCoord) {\n var previousValue = initialValue;\n coordEach(\n geojson,\n function (\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) {\n if (coordIndex === 0 && initialValue === undefined)\n previousValue = currentCoord;\n else\n previousValue = callback(\n previousValue,\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n },\n excludeWrapCoord\n );\n return previousValue;\n}\n\n/**\n * Callback for propEach\n *\n * @callback propEachCallback\n * @param {Object} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over properties in any GeoJSON object, similar to Array.forEach()\n *\n * @name propEach\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentProperties, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propEach(features, function (currentProperties, featureIndex) {\n * //=currentProperties\n * //=featureIndex\n * });\n */\nfunction propEach(geojson, callback) {\n var i;\n switch (geojson.type) {\n case \"FeatureCollection\":\n for (i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i].properties, i) === false) break;\n }\n break;\n case \"Feature\":\n callback(geojson.properties, 0);\n break;\n }\n}\n\n/**\n * Callback for propReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback propReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {*} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce properties in any GeoJSON object into a single value,\n * similar to how Array.reduce works. However, in this case we lazily run\n * the reduction, so an array of all properties is unnecessary.\n *\n * @name propReduce\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n * //=previousValue\n * //=currentProperties\n * //=featureIndex\n * return currentProperties\n * });\n */\nfunction propReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n propEach(geojson, function (currentProperties, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentProperties;\n else\n previousValue = callback(previousValue, currentProperties, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Callback for featureEach\n *\n * @callback featureEachCallback\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name featureEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.featureEach(features, function (currentFeature, featureIndex) {\n * //=currentFeature\n * //=featureIndex\n * });\n */\nfunction featureEach(geojson, callback) {\n if (geojson.type === \"Feature\") {\n callback(geojson, 0);\n } else if (geojson.type === \"FeatureCollection\") {\n for (var i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i], i) === false) break;\n }\n }\n}\n\n/**\n * Callback for featureReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback featureReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name featureReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * return currentFeature\n * });\n */\nfunction featureReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n featureEach(geojson, function (currentFeature, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentFeature;\n else previousValue = callback(previousValue, currentFeature, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Get all coordinates from any GeoJSON object.\n *\n * @name coordAll\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @returns {Array>} coordinate position array\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * var coords = turf.coordAll(features);\n * //= [[26, 37], [36, 53]]\n */\nfunction coordAll(geojson) {\n var coords = [];\n coordEach(geojson, function (coord) {\n coords.push(coord);\n });\n return coords;\n}\n\n/**\n * Callback for geomEach\n *\n * @callback geomEachCallback\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()\n *\n * @name geomEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * });\n */\nfunction geomEach(geojson, callback) {\n var i,\n j,\n g,\n geometry,\n stopG,\n geometryMaybeCollection,\n isGeometryCollection,\n featureProperties,\n featureBBox,\n featureId,\n featureIndex = 0,\n isFeatureCollection = geojson.type === \"FeatureCollection\",\n isFeature = geojson.type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (i = 0; i < stop; i++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[i].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n featureProperties = isFeatureCollection\n ? geojson.features[i].properties\n : isFeature\n ? geojson.properties\n : {};\n featureBBox = isFeatureCollection\n ? geojson.features[i].bbox\n : isFeature\n ? geojson.bbox\n : undefined;\n featureId = isFeatureCollection\n ? geojson.features[i].id\n : isFeature\n ? geojson.id\n : undefined;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (g = 0; g < stopG; g++) {\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[g]\n : geometryMaybeCollection;\n\n // Handle null Geometry\n if (geometry === null) {\n if (\n callback(\n null,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n continue;\n }\n switch (geometry.type) {\n case \"Point\":\n case \"LineString\":\n case \"MultiPoint\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\": {\n if (\n callback(\n geometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n break;\n }\n case \"GeometryCollection\": {\n for (j = 0; j < geometry.geometries.length; j++) {\n if (\n callback(\n geometry.geometries[j],\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n }\n break;\n }\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n // Only increase `featureIndex` per each feature\n featureIndex++;\n }\n}\n\n/**\n * Callback for geomReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback geomReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Reduce geometry in any GeoJSON object, similar to Array.reduce().\n *\n * @name geomReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=previousValue\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * return currentGeometry\n * });\n */\nfunction geomReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n geomEach(\n geojson,\n function (\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentGeometry;\n else\n previousValue = callback(\n previousValue,\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for flattenEach\n *\n * @callback flattenEachCallback\n * @param {Feature} currentFeature The current flattened feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Iterate over flattened features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name flattenEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * });\n */\nfunction flattenEach(geojson, callback) {\n geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {\n // Callback for single geometry\n var type = geometry === null ? null : geometry.type;\n switch (type) {\n case null:\n case \"Point\":\n case \"LineString\":\n case \"Polygon\":\n if (\n callback(\n Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"feature\"])(geometry, properties, { bbox: bbox, id: id }),\n featureIndex,\n 0\n ) === false\n )\n return false;\n return;\n }\n\n var geomType;\n\n // Callback for multi-geometry\n switch (type) {\n case \"MultiPoint\":\n geomType = \"Point\";\n break;\n case \"MultiLineString\":\n geomType = \"LineString\";\n break;\n case \"MultiPolygon\":\n geomType = \"Polygon\";\n break;\n }\n\n for (\n var multiFeatureIndex = 0;\n multiFeatureIndex < geometry.coordinates.length;\n multiFeatureIndex++\n ) {\n var coordinate = geometry.coordinates[multiFeatureIndex];\n var geom = {\n type: geomType,\n coordinates: coordinate,\n };\n if (\n callback(Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"feature\"])(geom, properties), featureIndex, multiFeatureIndex) ===\n false\n )\n return false;\n }\n });\n}\n\n/**\n * Callback for flattenReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback flattenReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Reduce flattened features in any GeoJSON object, similar to Array.reduce().\n *\n * @name flattenReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * return currentFeature\n * });\n */\nfunction flattenReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n flattenEach(\n geojson,\n function (currentFeature, featureIndex, multiFeatureIndex) {\n if (\n featureIndex === 0 &&\n multiFeatureIndex === 0 &&\n initialValue === undefined\n )\n previousValue = currentFeature;\n else\n previousValue = callback(\n previousValue,\n currentFeature,\n featureIndex,\n multiFeatureIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for segmentEach\n *\n * @callback segmentEachCallback\n * @param {Feature} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //=currentSegment\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * //=segmentIndex\n * });\n *\n * // Calculate the total number of segments\n * var total = 0;\n * turf.segmentEach(polygon, function () {\n * total++;\n * });\n */\nfunction segmentEach(geojson, callback) {\n flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {\n var segmentIndex = 0;\n\n // Exclude null Geometries\n if (!feature$$1.geometry) return;\n // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n var type = feature$$1.geometry.type;\n if (type === \"Point\" || type === \"MultiPoint\") return;\n\n // Generate 2-vertex line segments\n var previousCoords;\n var previousFeatureIndex = 0;\n var previousMultiIndex = 0;\n var prevGeomIndex = 0;\n if (\n coordEach(\n feature$$1,\n function (\n currentCoord,\n coordIndex,\n featureIndexCoord,\n multiPartIndexCoord,\n geometryIndex\n ) {\n // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`\n if (\n previousCoords === undefined ||\n featureIndex > previousFeatureIndex ||\n multiPartIndexCoord > previousMultiIndex ||\n geometryIndex > prevGeomIndex\n ) {\n previousCoords = currentCoord;\n previousFeatureIndex = featureIndex;\n previousMultiIndex = multiPartIndexCoord;\n prevGeomIndex = geometryIndex;\n segmentIndex = 0;\n return;\n }\n var currentSegment = Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"lineString\"])(\n [previousCoords, currentCoord],\n feature$$1.properties\n );\n if (\n callback(\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) === false\n )\n return false;\n segmentIndex++;\n previousCoords = currentCoord;\n }\n ) === false\n )\n return false;\n });\n}\n\n/**\n * Callback for segmentReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback segmentReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n */\n\n/**\n * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //= previousSegment\n * //= currentSegment\n * //= featureIndex\n * //= multiFeatureIndex\n * //= geometryIndex\n * //= segmentIndex\n * return currentSegment\n * });\n *\n * // Calculate the total number of segments\n * var initialValue = 0\n * var total = turf.segmentReduce(polygon, function (previousValue) {\n * previousValue++;\n * return previousValue;\n * }, initialValue);\n */\nfunction segmentReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n var started = false;\n segmentEach(\n geojson,\n function (\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) {\n if (started === false && initialValue === undefined)\n previousValue = currentSegment;\n else\n previousValue = callback(\n previousValue,\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n );\n started = true;\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for lineEach\n *\n * @callback lineEachCallback\n * @param {Feature} currentLine The current LineString|LinearRing being processed\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,\n * similar to Array.forEach.\n *\n * @name lineEach\n * @param {Geometry|Feature} geojson object\n * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @example\n * var multiLine = turf.multiLineString([\n * [[26, 37], [35, 45]],\n * [[36, 53], [38, 50], [41, 55]]\n * ]);\n *\n * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction lineEach(geojson, callback) {\n // validation\n if (!geojson) throw new Error(\"geojson is required\");\n\n flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {\n if (feature$$1.geometry === null) return;\n var type = feature$$1.geometry.type;\n var coords = feature$$1.geometry.coordinates;\n switch (type) {\n case \"LineString\":\n if (callback(feature$$1, featureIndex, multiFeatureIndex, 0, 0) === false)\n return false;\n break;\n case \"Polygon\":\n for (\n var geometryIndex = 0;\n geometryIndex < coords.length;\n geometryIndex++\n ) {\n if (\n callback(\n Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"lineString\"])(coords[geometryIndex], feature$$1.properties),\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n }\n break;\n }\n });\n}\n\n/**\n * Callback for lineReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback lineReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentLine The current LineString|LinearRing being processed.\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name lineReduce\n * @param {Geometry|Feature} geojson object\n * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var multiPoly = turf.multiPolygon([\n * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),\n * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])\n * ]);\n *\n * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentLine\n * });\n */\nfunction lineReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n lineEach(\n geojson,\n function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentLine;\n else\n previousValue = callback(\n previousValue,\n currentLine,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n * Point & MultiPoint will always return null.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.segmentIndex=0] Segment Index\n * @param {Object} [options.properties={}] Translate Properties to output LineString\n * @param {BBox} [options.bbox={}] Translate BBox to output LineString\n * @param {number|string} [options.id={}] Translate Id to output LineString\n * @returns {Feature} 2-vertex GeoJSON Feature LineString\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findSegment(multiLine);\n * // => Feature>\n *\n * // First Segment of 2nd Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: 1});\n * // => Feature>\n *\n * // Last Segment of Last Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});\n * // => Feature>\n */\nfunction findSegment(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"isObject\"])(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var segmentIndex = options.segmentIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find SegmentIndex\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"lineString\"])(\n [coords[segmentIndex], coords[segmentIndex + 1]],\n properties,\n options\n );\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[geometryIndex].length + segmentIndex - 1;\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"lineString\"])(\n [\n coords[geometryIndex][segmentIndex],\n coords[geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"lineString\"])(\n [\n coords[multiFeatureIndex][segmentIndex],\n coords[multiFeatureIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex =\n coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"lineString\"])(\n [\n coords[multiFeatureIndex][geometryIndex][segmentIndex],\n coords[multiFeatureIndex][geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\n/**\n * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.coordIndex=0] Coord Index\n * @param {Object} [options.properties={}] Translate Properties to output Point\n * @param {BBox} [options.bbox={}] Translate BBox to output Point\n * @param {number|string} [options.id={}] Translate Id to output Point\n * @returns {Feature} 2-vertex GeoJSON Feature Point\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findPoint(multiLine);\n * // => Feature>\n *\n * // First Segment of the 2nd Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: 1});\n * // => Feature>\n *\n * // Last Segment of last Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});\n * // => Feature>\n */\nfunction findPoint(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"isObject\"])(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var coordIndex = options.coordIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find Coord Index\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"point\"])(coords, properties, options);\n case \"MultiPoint\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"point\"])(coords[multiFeatureIndex], properties, options);\n case \"LineString\":\n if (coordIndex < 0) coordIndex = coords.length + coordIndex;\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"point\"])(coords[coordIndex], properties, options);\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (coordIndex < 0)\n coordIndex = coords[geometryIndex].length + coordIndex;\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"point\"])(coords[geometryIndex][coordIndex], properties, options);\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (coordIndex < 0)\n coordIndex = coords[multiFeatureIndex].length + coordIndex;\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"point\"])(coords[multiFeatureIndex][coordIndex], properties, options);\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (coordIndex < 0)\n coordIndex =\n coords[multiFeatureIndex][geometryIndex].length - coordIndex;\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"point\"])(\n coords[multiFeatureIndex][geometryIndex][coordIndex],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\n\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/@turf/meta/dist/es/index.js?"); + +/***/ }), + +/***/ "./node_modules/@turf/polygon-to-line/dist/es/index.js": +/*!*************************************************************!*\ + !*** ./node_modules/@turf/polygon-to-line/dist/es/index.js ***! + \*************************************************************/ +/*! exports provided: default, polygonToLine, multiPolygonToLine, coordsToLine */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polygonToLine\", function() { return polygonToLine; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiPolygonToLine\", function() { return multiPolygonToLine; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"coordsToLine\", function() { return coordsToLine; });\n/* harmony import */ var _turf_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @turf/helpers */ \"./node_modules/@turf/helpers/dist/es/index.js\");\n/* harmony import */ var _turf_invariant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @turf/invariant */ \"./node_modules/@turf/invariant/dist/es/index.js\");\n\n\n/**\n * Converts a {@link Polygon} to {@link LineString|(Multi)LineString} or {@link MultiPolygon} to a\n * {@link FeatureCollection} of {@link LineString|(Multi)LineString}.\n *\n * @name polygonToLine\n * @param {Feature} poly Feature to convert\n * @param {Object} [options={}] Optional parameters\n * @param {Object} [options.properties={}] translates GeoJSON properties to Feature\n * @returns {FeatureCollection|Feature} converted (Multi)Polygon to (Multi)LineString\n * @example\n * var poly = turf.polygon([[[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]]);\n *\n * var line = turf.polygonToLine(poly);\n *\n * //addToMap\n * var addToMap = [line];\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (poly, options) {\n if (options === void 0) { options = {}; }\n var geom = Object(_turf_invariant__WEBPACK_IMPORTED_MODULE_1__[\"getGeom\"])(poly);\n if (!options.properties && poly.type === \"Feature\") {\n options.properties = poly.properties;\n }\n switch (geom.type) {\n case \"Polygon\":\n return polygonToLine(geom, options);\n case \"MultiPolygon\":\n return multiPolygonToLine(geom, options);\n default:\n throw new Error(\"invalid poly\");\n }\n});\n/**\n * @private\n */\nfunction polygonToLine(poly, options) {\n if (options === void 0) { options = {}; }\n var geom = Object(_turf_invariant__WEBPACK_IMPORTED_MODULE_1__[\"getGeom\"])(poly);\n var coords = geom.coordinates;\n var properties = options.properties\n ? options.properties\n : poly.type === \"Feature\"\n ? poly.properties\n : {};\n return coordsToLine(coords, properties);\n}\n/**\n * @private\n */\nfunction multiPolygonToLine(multiPoly, options) {\n if (options === void 0) { options = {}; }\n var geom = Object(_turf_invariant__WEBPACK_IMPORTED_MODULE_1__[\"getGeom\"])(multiPoly);\n var coords = geom.coordinates;\n var properties = options.properties\n ? options.properties\n : multiPoly.type === \"Feature\"\n ? multiPoly.properties\n : {};\n var lines = [];\n coords.forEach(function (coord) {\n lines.push(coordsToLine(coord, properties));\n });\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"featureCollection\"])(lines);\n}\n/**\n * @private\n */\nfunction coordsToLine(coords, properties) {\n if (coords.length > 1) {\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"multiLineString\"])(coords, properties);\n }\n return Object(_turf_helpers__WEBPACK_IMPORTED_MODULE_0__[\"lineString\"])(coords[0], properties);\n}\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/@turf/polygon-to-line/dist/es/index.js?"); + +/***/ }), + +/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js?!./src/controls/navigation.css": +/*!*******************************************************************************************************************************!*\ + !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ref--5-2!./src/controls/navigation.css ***! + \*******************************************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \"#_lithosphere_control_navigation_root {\\r\\n display: flex;\\r\\n}\\r\\n#_lithosphere_control_navigation_root svg {\\r\\n width: 24px;\\r\\n height: 24px;\\r\\n}\\r\\n#_lithosphere_control_navigation_root > div {\\r\\n width: 80px;\\r\\n margin-right: 6px;\\r\\n display: flex;\\r\\n flex-flow: column;\\r\\n}\\r\\n#_lithosphere_control_navigation_root > div > div:first-child {\\r\\n background: black;\\r\\n color: white;\\r\\n height: 26px;\\r\\n line-height: 26px;\\r\\n text-transform: uppercase;\\r\\n font-size: 12px;\\r\\n}\\r\\n#_lithosphere_control_navigation_root > div > div:first-child svg {\\r\\n width: 18px;\\r\\n height: 18px;\\r\\n padding: 4px 0px;\\r\\n}\\r\\n\\r\\n._lithosphere_control_navigation_panel {\\r\\n width: 80px;\\r\\n max-height: 0px;\\r\\n overflow: hidden;\\r\\n line-height: 42px;\\r\\n background: black;\\r\\n color: white;\\r\\n display: flex;\\r\\n border-top: 1px solid #444;\\r\\n opacity: 0;\\r\\n pointer-events: none;\\r\\n transition: all 0.2s ease-out;\\r\\n}\\r\\n\\r\\n#_lithosphere_control_navigation_root\\r\\n > div:hover\\r\\n > ._lithosphere_control_navigation_panel,\\r\\n#_lithosphere_control_navigation_root\\r\\n ._lithosphere_control_navigation_panel.active {\\r\\n opacity: 1;\\r\\n max-height: 100px;\\r\\n pointer-events: inherit;\\r\\n}\\r\\n._lithosphere_control_navigation_panel div {\\r\\n cursor: pointer;\\r\\n transition: background 0.2s ease-out;\\r\\n}\\r\\n._lithosphere_control_navigation_panel div:hover {\\r\\n background: rgba(255, 255, 255, 0.15);\\r\\n}\\r\\n\\r\\n#_lithosphere_control_navigation_spin_root\\r\\n ._lithosphere_control_navigation_panel {\\r\\n height: 30px;\\r\\n}\\r\\n#_lithosphere_control_navigation_dolly_root\\r\\n ._lithosphere_control_navigation_panel {\\r\\n height: 30px;\\r\\n}\\r\\n#_lithosphere_control_navigation_pan_root\\r\\n ._lithosphere_control_navigation_panel {\\r\\n line-height: 30px;\\r\\n height: 90px;\\r\\n flex-flow: column;\\r\\n}\\r\\n#_lithosphere_control_navigation_zoom_root\\r\\n ._lithosphere_control_navigation_panel {\\r\\n height: 30px;\\r\\n}\\r\\n\\r\\n#_lithosphere_control_navigation_spin_left,\\r\\n#_lithosphere_control_navigation_spin_right,\\r\\n#_lithosphere_control_navigation_dolly_up,\\r\\n#_lithosphere_control_navigation_dolly_down,\\r\\n#_lithosphere_control_navigation_zoom_in,\\r\\n#_lithosphere_control_navigation_zoom_out {\\r\\n width: 50%;\\r\\n text-align: center;\\r\\n}\\r\\n\\r\\n#_lithosphere_control_navigation_pan_up {\\r\\n height: 30px;\\r\\n line-height: 49px;\\r\\n text-align: center;\\r\\n}\\r\\n#_lithosphere_control_navigation_pan_left,\\r\\n#_lithosphere_control_navigation_pan_right {\\r\\n height: 30px;\\r\\n line-height: 44px;\\r\\n width: 50%;\\r\\n text-align: center;\\r\\n}\\r\\n#_lithosphere_control_navigation_pan_down {\\r\\n height: 30px;\\r\\n line-height: 38px;\\r\\n text-align: center;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://LithoSphere/./src/controls/navigation.css?./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ref--5-2"); + +/***/ }), + +/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js?!./src/secondary/loadingScreen.css": +/*!***********************************************************************************************************************************!*\ + !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ref--5-2!./src/secondary/loadingScreen.css ***! + \***********************************************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \"._lithosphere_loadingscreen_loading {\\r\\n position: absolute;\\r\\n width: 100%;\\r\\n height: 100%;\\r\\n perspective: 160px;\\r\\n top: 0;\\r\\n left: 0;\\r\\n}\\r\\n\\r\\n._lithosphere_loadingscreen_loading > div {\\r\\n width: 60px;\\r\\n height: 60px;\\r\\n background: rgba(255, 255, 255, 0);\\r\\n position: absolute;\\r\\n left: 50%;\\r\\n margin-left: -30px;\\r\\n top: 50%;\\r\\n margin-top: -5px;\\r\\n border-radius: 2px;\\r\\n border: 2px solid rgba(255, 255, 255, 0.7);\\r\\n}\\r\\n\\r\\n@-webkit-keyframes translateIn {\\r\\n 30% {\\r\\n transform: rotateX(60deg) rotateY(0deg) rotateZ(45deg) translateZ(20px)\\r\\n scale(1);\\r\\n opacity: 0.7;\\r\\n background: rgba(255, 255, 255, 0.3);\\r\\n }\\r\\n 100% {\\r\\n transform: rotateX(65deg) rotateY(0deg) rotateZ(45deg) translateZ(0px)\\r\\n scale(0.85);\\r\\n opacity: 0;\\r\\n background: rgba(255, 255, 255, 0);\\r\\n }\\r\\n}\\r\\n\\r\\n@keyframes translateIn {\\r\\n 30% {\\r\\n transform: rotateX(60deg) rotateY(0deg) rotateZ(45deg) translateZ(20px)\\r\\n scale(1);\\r\\n opacity: 0.7;\\r\\n background: rgba(255, 255, 255, 0.3);\\r\\n }\\r\\n 100% {\\r\\n transform: rotateX(65deg) rotateY(0deg) rotateZ(45deg) translateZ(0px)\\r\\n scale(0.85);\\r\\n opacity: 0;\\r\\n background: rgba(255, 255, 255, 0);\\r\\n }\\r\\n}\\r\\n\\r\\n._lithosphere_loadingscreen_loading > div {\\r\\n opacity: 0;\\r\\n}\\r\\n._lithosphere_loadingscreen_loading > div:nth-of-type(1) {\\r\\n transform: rotateX(70deg) rotateY(0deg) rotateZ(45deg) translateZ(30px);\\r\\n -webkit-animation: translateIn 1.9s ease-in infinite 500ms;\\r\\n animation: translateIn 1.9s ease-in infinite 500ms;\\r\\n}\\r\\n._lithosphere_loadingscreen_loading > div:nth-of-type(2) {\\r\\n transform: rotateX(70deg) rotateY(0deg) rotateZ(45deg) translateZ(60px);\\r\\n -webkit-animation: translateIn 1.9s ease-in infinite 700ms;\\r\\n animation: translateIn 1.9s ease-in infinite 700ms;\\r\\n}\\r\\n._lithosphere_loadingscreen_loading > div:nth-of-type(3) {\\r\\n transform: rotateX(70deg) rotateY(0deg) rotateZ(45deg) translateZ(85px);\\r\\n -webkit-animation: translateIn 1.9s ease-in infinite 800ms;\\r\\n animation: translateIn 1.9s ease-in infinite 800ms;\\r\\n}\\r\\n._lithosphere_loadingscreen_loading > div:nth-of-type(4) {\\r\\n transform: rotateX(70deg) rotateY(0deg) rotateZ(45deg) translateZ(105px);\\r\\n -webkit-animation: translateIn 1.9s ease-in infinite 1000ms;\\r\\n animation: translateIn 1.9s ease-in infinite 1000ms;\\r\\n}\\r\\n._lithosphere_loadingscreen_loading > div:nth-of-type(5) {\\r\\n transform: rotateX(70deg) rotateY(0deg) rotateZ(45deg) translateZ(120px);\\r\\n -webkit-animation: translateIn 1.9s ease-in infinite 1200ms;\\r\\n animation: translateIn 1.9s ease-in infinite 1200ms;\\r\\n}\\r\\n._lithosphere_loadingscreen_loading > div:nth-of-type(6) {\\r\\n transform: rotateX(70deg) rotateY(0deg) rotateZ(45deg) translateZ(130px);\\r\\n -webkit-animation: translateIn 1.9s ease-in infinite 1400ms;\\r\\n animation: translateIn 1.9s ease-in infinite 1400ms;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://LithoSphere/./src/secondary/loadingScreen.css?./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ref--5-2"); + +/***/ }), + +/***/ "./node_modules/css-loader/dist/runtime/api.js": +/*!*****************************************************!*\ + !*** ./node_modules/css-loader/dist/runtime/api.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join(\"\");\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === \"string\") {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, \"\"]];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\n//# sourceURL=webpack://LithoSphere/./node_modules/css-loader/dist/runtime/api.js?"); + +/***/ }), + +/***/ "./node_modules/geojson-rbush/index.js": +/*!*********************************************!*\ + !*** ./node_modules/geojson-rbush/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var rbush = __webpack_require__(/*! rbush */ \"./node_modules/rbush/index.js\");\nvar helpers = __webpack_require__(/*! @turf/helpers */ \"./node_modules/@turf/helpers/dist/es/index.js\");\nvar meta = __webpack_require__(/*! @turf/meta */ \"./node_modules/@turf/meta/dist/es/index.js\");\nvar turfBBox = __webpack_require__(/*! @turf/bbox */ \"./node_modules/@turf/bbox/dist/es/index.js\").default;\nvar featureEach = meta.featureEach;\nvar coordEach = meta.coordEach;\nvar polygon = helpers.polygon;\nvar featureCollection = helpers.featureCollection;\n\n/**\n * GeoJSON implementation of [RBush](https://github.com/mourner/rbush#rbush) spatial index.\n *\n * @name rbush\n * @param {number} [maxEntries=9] defines the maximum number of entries in a tree node. 9 (used by default) is a\n * reasonable choice for most applications. Higher value means faster insertion and slower search, and vice versa.\n * @returns {RBush} GeoJSON RBush\n * @example\n * var geojsonRbush = require('geojson-rbush').default;\n * var tree = geojsonRbush();\n */\nfunction geojsonRbush(maxEntries) {\n var tree = rbush(maxEntries);\n /**\n * [insert](https://github.com/mourner/rbush#data-format)\n *\n * @param {Feature} feature insert single GeoJSON Feature\n * @returns {RBush} GeoJSON RBush\n * @example\n * var poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\n * tree.insert(poly)\n */\n tree.insert = function (feature) {\n if (feature.type !== 'Feature') throw new Error('invalid feature');\n feature.bbox = feature.bbox ? feature.bbox : turfBBox(feature);\n return rbush.prototype.insert.call(this, feature);\n };\n\n /**\n * [load](https://github.com/mourner/rbush#bulk-inserting-data)\n *\n * @param {FeatureCollection|Array} features load entire GeoJSON FeatureCollection\n * @returns {RBush} GeoJSON RBush\n * @example\n * var polys = turf.polygons([\n * [[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]],\n * [[[-93, 32], [-83, 32], [-83, 39], [-93, 39], [-93, 32]]]\n * ]);\n * tree.load(polys);\n */\n tree.load = function (features) {\n var load = [];\n // Load an Array of Features\n if (Array.isArray(features)) {\n features.forEach(function (feature) {\n if (feature.type !== 'Feature') throw new Error('invalid features');\n feature.bbox = feature.bbox ? feature.bbox : turfBBox(feature);\n load.push(feature);\n });\n } else {\n // Load a FeatureCollection\n featureEach(features, function (feature) {\n if (feature.type !== 'Feature') throw new Error('invalid features');\n feature.bbox = feature.bbox ? feature.bbox : turfBBox(feature);\n load.push(feature);\n });\n }\n return rbush.prototype.load.call(this, load);\n };\n\n /**\n * [remove](https://github.com/mourner/rbush#removing-data)\n *\n * @param {Feature} feature remove single GeoJSON Feature\n * @param {Function} equals Pass a custom equals function to compare by value for removal.\n * @returns {RBush} GeoJSON RBush\n * @example\n * var poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\n *\n * tree.remove(poly);\n */\n tree.remove = function (feature, equals) {\n if (feature.type !== 'Feature') throw new Error('invalid feature');\n feature.bbox = feature.bbox ? feature.bbox : turfBBox(feature);\n return rbush.prototype.remove.call(this, feature, equals);\n };\n\n /**\n * [clear](https://github.com/mourner/rbush#removing-data)\n *\n * @returns {RBush} GeoJSON Rbush\n * @example\n * tree.clear()\n */\n tree.clear = function () {\n return rbush.prototype.clear.call(this);\n };\n\n /**\n * [search](https://github.com/mourner/rbush#search)\n *\n * @param {BBox|FeatureCollection|Feature} geojson search with GeoJSON\n * @returns {FeatureCollection} all features that intersects with the given GeoJSON.\n * @example\n * var poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\n *\n * tree.search(poly);\n */\n tree.search = function (geojson) {\n var features = rbush.prototype.search.call(this, this.toBBox(geojson));\n return featureCollection(features);\n };\n\n /**\n * [collides](https://github.com/mourner/rbush#collisions)\n *\n * @param {BBox|FeatureCollection|Feature} geojson collides with GeoJSON\n * @returns {boolean} true if there are any items intersecting the given GeoJSON, otherwise false.\n * @example\n * var poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\n *\n * tree.collides(poly);\n */\n tree.collides = function (geojson) {\n return rbush.prototype.collides.call(this, this.toBBox(geojson));\n };\n\n /**\n * [all](https://github.com/mourner/rbush#search)\n *\n * @returns {FeatureCollection} all the features in RBush\n * @example\n * tree.all()\n */\n tree.all = function () {\n var features = rbush.prototype.all.call(this);\n return featureCollection(features);\n };\n\n /**\n * [toJSON](https://github.com/mourner/rbush#export-and-import)\n *\n * @returns {any} export data as JSON object\n * @example\n * var exported = tree.toJSON()\n */\n tree.toJSON = function () {\n return rbush.prototype.toJSON.call(this);\n };\n\n /**\n * [fromJSON](https://github.com/mourner/rbush#export-and-import)\n *\n * @param {any} json import previously exported data\n * @returns {RBush} GeoJSON RBush\n * @example\n * var exported = {\n * \"children\": [\n * {\n * \"type\": \"Feature\",\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * },\n * \"properties\": {},\n * \"bbox\": [110, 50, 110, 50]\n * }\n * ],\n * \"height\": 1,\n * \"leaf\": true,\n * \"minX\": 110,\n * \"minY\": 50,\n * \"maxX\": 110,\n * \"maxY\": 50\n * }\n * tree.fromJSON(exported)\n */\n tree.fromJSON = function (json) {\n return rbush.prototype.fromJSON.call(this, json);\n };\n\n /**\n * Converts GeoJSON to {minX, minY, maxX, maxY} schema\n *\n * @private\n * @param {BBox|FeatureCollection|Feature} geojson feature(s) to retrieve BBox from\n * @returns {Object} converted to {minX, minY, maxX, maxY}\n */\n tree.toBBox = function (geojson) {\n var bbox;\n if (geojson.bbox) bbox = geojson.bbox;\n else if (Array.isArray(geojson) && geojson.length === 4) bbox = geojson;\n else if (Array.isArray(geojson) && geojson.length === 6) bbox = [geojson[0], geojson[1], geojson[3], geojson[4]];\n else if (geojson.type === 'Feature') bbox = turfBBox(geojson);\n else if (geojson.type === 'FeatureCollection') bbox = turfBBox(geojson);\n else throw new Error('invalid geojson')\n\n return {\n minX: bbox[0],\n minY: bbox[1],\n maxX: bbox[2],\n maxY: bbox[3]\n };\n };\n return tree;\n}\n\nmodule.exports = geojsonRbush;\nmodule.exports.default = geojsonRbush;\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/geojson-rbush/index.js?"); + +/***/ }), + +/***/ "./node_modules/mgrs/mgrs.js": +/*!***********************************!*\ + !*** ./node_modules/mgrs/mgrs.js ***! + \***********************************/ +/*! exports provided: default, forward, inverse, toPoint */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toPoint\", function() { return toPoint; });\n\n\n\n/**\n * UTM zones are grouped, and assigned to one of a group of 6\n * sets.\n *\n * {int} @private\n */\nvar NUM_100K_SETS = 6;\n\n/**\n * The column letters (for easting) of the lower left value, per\n * set.\n *\n * {string} @private\n */\nvar SET_ORIGIN_COLUMN_LETTERS = 'AJSAJS';\n\n/**\n * The row letters (for northing) of the lower left value, per\n * set.\n *\n * {string} @private\n */\nvar SET_ORIGIN_ROW_LETTERS = 'AFAFAF';\n\nvar A = 65; // A\nvar I = 73; // I\nvar O = 79; // O\nvar V = 86; // V\nvar Z = 90; // Z\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n forward: forward,\n inverse: inverse,\n toPoint: toPoint\n});\n/**\n * Conversion of lat/lon to MGRS.\n *\n * @param {object} ll Object literal with lat and lon properties on a\n * WGS84 ellipsoid.\n * @param {int} accuracy Accuracy in digits (5 for 1 m, 4 for 10 m, 3 for\n * 100 m, 2 for 1000 m or 1 for 10000 m). Optional, default is 5.\n * @return {string} the MGRS string for the given location and accuracy.\n */\nfunction forward(ll, accuracy) {\n accuracy = accuracy || 5; // default accuracy 1m\n return encode(LLtoUTM({\n lat: ll[1],\n lon: ll[0]\n }), accuracy);\n};\n\n/**\n * Conversion of MGRS to lat/lon.\n *\n * @param {string} mgrs MGRS string.\n * @return {array} An array with left (longitude), bottom (latitude), right\n * (longitude) and top (latitude) values in WGS84, representing the\n * bounding box for the provided MGRS reference.\n */\nfunction inverse(mgrs) {\n var bbox = UTMtoLL(decode(mgrs.toUpperCase()));\n if (bbox.lat && bbox.lon) {\n return [bbox.lon, bbox.lat, bbox.lon, bbox.lat];\n }\n return [bbox.left, bbox.bottom, bbox.right, bbox.top];\n};\n\nfunction toPoint(mgrs) {\n var bbox = UTMtoLL(decode(mgrs.toUpperCase()));\n if (bbox.lat && bbox.lon) {\n return [bbox.lon, bbox.lat];\n }\n return [(bbox.left + bbox.right) / 2, (bbox.top + bbox.bottom) / 2];\n};\n/**\n * Conversion from degrees to radians.\n *\n * @private\n * @param {number} deg the angle in degrees.\n * @return {number} the angle in radians.\n */\nfunction degToRad(deg) {\n return (deg * (Math.PI / 180.0));\n}\n\n/**\n * Conversion from radians to degrees.\n *\n * @private\n * @param {number} rad the angle in radians.\n * @return {number} the angle in degrees.\n */\nfunction radToDeg(rad) {\n return (180.0 * (rad / Math.PI));\n}\n\n/**\n * Converts a set of Longitude and Latitude co-ordinates to UTM\n * using the WGS84 ellipsoid.\n *\n * @private\n * @param {object} ll Object literal with lat and lon properties\n * representing the WGS84 coordinate to be converted.\n * @return {object} Object literal containing the UTM value with easting,\n * northing, zoneNumber and zoneLetter properties, and an optional\n * accuracy property in digits. Returns null if the conversion failed.\n */\nfunction LLtoUTM(ll) {\n var Lat = ll.lat;\n var Long = ll.lon;\n var a = 6378137.0; //ellip.radius;\n var eccSquared = 0.00669438; //ellip.eccsq;\n var k0 = 0.9996;\n var LongOrigin;\n var eccPrimeSquared;\n var N, T, C, A, M;\n var LatRad = degToRad(Lat);\n var LongRad = degToRad(Long);\n var LongOriginRad;\n var ZoneNumber;\n // (int)\n ZoneNumber = Math.floor((Long + 180) / 6) + 1;\n\n //Make sure the longitude 180.00 is in Zone 60\n if (Long === 180) {\n ZoneNumber = 60;\n }\n\n // Special zone for Norway\n if (Lat >= 56.0 && Lat < 64.0 && Long >= 3.0 && Long < 12.0) {\n ZoneNumber = 32;\n }\n\n // Special zones for Svalbard\n if (Lat >= 72.0 && Lat < 84.0) {\n if (Long >= 0.0 && Long < 9.0) {\n ZoneNumber = 31;\n }\n else if (Long >= 9.0 && Long < 21.0) {\n ZoneNumber = 33;\n }\n else if (Long >= 21.0 && Long < 33.0) {\n ZoneNumber = 35;\n }\n else if (Long >= 33.0 && Long < 42.0) {\n ZoneNumber = 37;\n }\n }\n\n LongOrigin = (ZoneNumber - 1) * 6 - 180 + 3; //+3 puts origin\n // in middle of\n // zone\n LongOriginRad = degToRad(LongOrigin);\n\n eccPrimeSquared = (eccSquared) / (1 - eccSquared);\n\n N = a / Math.sqrt(1 - eccSquared * Math.sin(LatRad) * Math.sin(LatRad));\n T = Math.tan(LatRad) * Math.tan(LatRad);\n C = eccPrimeSquared * Math.cos(LatRad) * Math.cos(LatRad);\n A = Math.cos(LatRad) * (LongRad - LongOriginRad);\n\n M = a * ((1 - eccSquared / 4 - 3 * eccSquared * eccSquared / 64 - 5 * eccSquared * eccSquared * eccSquared / 256) * LatRad - (3 * eccSquared / 8 + 3 * eccSquared * eccSquared / 32 + 45 * eccSquared * eccSquared * eccSquared / 1024) * Math.sin(2 * LatRad) + (15 * eccSquared * eccSquared / 256 + 45 * eccSquared * eccSquared * eccSquared / 1024) * Math.sin(4 * LatRad) - (35 * eccSquared * eccSquared * eccSquared / 3072) * Math.sin(6 * LatRad));\n\n var UTMEasting = (k0 * N * (A + (1 - T + C) * A * A * A / 6.0 + (5 - 18 * T + T * T + 72 * C - 58 * eccPrimeSquared) * A * A * A * A * A / 120.0) + 500000.0);\n\n var UTMNorthing = (k0 * (M + N * Math.tan(LatRad) * (A * A / 2 + (5 - T + 9 * C + 4 * C * C) * A * A * A * A / 24.0 + (61 - 58 * T + T * T + 600 * C - 330 * eccPrimeSquared) * A * A * A * A * A * A / 720.0)));\n if (Lat < 0.0) {\n UTMNorthing += 10000000.0; //10000000 meter offset for\n // southern hemisphere\n }\n\n return {\n northing: Math.round(UTMNorthing),\n easting: Math.round(UTMEasting),\n zoneNumber: ZoneNumber,\n zoneLetter: getLetterDesignator(Lat)\n };\n}\n\n/**\n * Converts UTM coords to lat/long, using the WGS84 ellipsoid. This is a convenience\n * class where the Zone can be specified as a single string eg.\"60N\" which\n * is then broken down into the ZoneNumber and ZoneLetter.\n *\n * @private\n * @param {object} utm An object literal with northing, easting, zoneNumber\n * and zoneLetter properties. If an optional accuracy property is\n * provided (in meters), a bounding box will be returned instead of\n * latitude and longitude.\n * @return {object} An object literal containing either lat and lon values\n * (if no accuracy was provided), or top, right, bottom and left values\n * for the bounding box calculated according to the provided accuracy.\n * Returns null if the conversion failed.\n */\nfunction UTMtoLL(utm) {\n\n var UTMNorthing = utm.northing;\n var UTMEasting = utm.easting;\n var zoneLetter = utm.zoneLetter;\n var zoneNumber = utm.zoneNumber;\n // check the ZoneNummber is valid\n if (zoneNumber < 0 || zoneNumber > 60) {\n return null;\n }\n\n var k0 = 0.9996;\n var a = 6378137.0; //ellip.radius;\n var eccSquared = 0.00669438; //ellip.eccsq;\n var eccPrimeSquared;\n var e1 = (1 - Math.sqrt(1 - eccSquared)) / (1 + Math.sqrt(1 - eccSquared));\n var N1, T1, C1, R1, D, M;\n var LongOrigin;\n var mu, phi1Rad;\n\n // remove 500,000 meter offset for longitude\n var x = UTMEasting - 500000.0;\n var y = UTMNorthing;\n\n // We must know somehow if we are in the Northern or Southern\n // hemisphere, this is the only time we use the letter So even\n // if the Zone letter isn't exactly correct it should indicate\n // the hemisphere correctly\n if (zoneLetter < 'N') {\n y -= 10000000.0; // remove 10,000,000 meter offset used\n // for southern hemisphere\n }\n\n // There are 60 zones with zone 1 being at West -180 to -174\n LongOrigin = (zoneNumber - 1) * 6 - 180 + 3; // +3 puts origin\n // in middle of\n // zone\n\n eccPrimeSquared = (eccSquared) / (1 - eccSquared);\n\n M = y / k0;\n mu = M / (a * (1 - eccSquared / 4 - 3 * eccSquared * eccSquared / 64 - 5 * eccSquared * eccSquared * eccSquared / 256));\n\n phi1Rad = mu + (3 * e1 / 2 - 27 * e1 * e1 * e1 / 32) * Math.sin(2 * mu) + (21 * e1 * e1 / 16 - 55 * e1 * e1 * e1 * e1 / 32) * Math.sin(4 * mu) + (151 * e1 * e1 * e1 / 96) * Math.sin(6 * mu);\n // double phi1 = ProjMath.radToDeg(phi1Rad);\n\n N1 = a / Math.sqrt(1 - eccSquared * Math.sin(phi1Rad) * Math.sin(phi1Rad));\n T1 = Math.tan(phi1Rad) * Math.tan(phi1Rad);\n C1 = eccPrimeSquared * Math.cos(phi1Rad) * Math.cos(phi1Rad);\n R1 = a * (1 - eccSquared) / Math.pow(1 - eccSquared * Math.sin(phi1Rad) * Math.sin(phi1Rad), 1.5);\n D = x / (N1 * k0);\n\n var lat = phi1Rad - (N1 * Math.tan(phi1Rad) / R1) * (D * D / 2 - (5 + 3 * T1 + 10 * C1 - 4 * C1 * C1 - 9 * eccPrimeSquared) * D * D * D * D / 24 + (61 + 90 * T1 + 298 * C1 + 45 * T1 * T1 - 252 * eccPrimeSquared - 3 * C1 * C1) * D * D * D * D * D * D / 720);\n lat = radToDeg(lat);\n\n var lon = (D - (1 + 2 * T1 + C1) * D * D * D / 6 + (5 - 2 * C1 + 28 * T1 - 3 * C1 * C1 + 8 * eccPrimeSquared + 24 * T1 * T1) * D * D * D * D * D / 120) / Math.cos(phi1Rad);\n lon = LongOrigin + radToDeg(lon);\n\n var result;\n if (utm.accuracy) {\n var topRight = UTMtoLL({\n northing: utm.northing + utm.accuracy,\n easting: utm.easting + utm.accuracy,\n zoneLetter: utm.zoneLetter,\n zoneNumber: utm.zoneNumber\n });\n result = {\n top: topRight.lat,\n right: topRight.lon,\n bottom: lat,\n left: lon\n };\n }\n else {\n result = {\n lat: lat,\n lon: lon\n };\n }\n return result;\n}\n\n/**\n * Calculates the MGRS letter designator for the given latitude.\n *\n * @private\n * @param {number} lat The latitude in WGS84 to get the letter designator\n * for.\n * @return {char} The letter designator.\n */\nfunction getLetterDesignator(lat) {\n //This is here as an error flag to show that the Latitude is\n //outside MGRS limits\n var LetterDesignator = 'Z';\n\n if ((84 >= lat) && (lat >= 72)) {\n LetterDesignator = 'X';\n }\n else if ((72 > lat) && (lat >= 64)) {\n LetterDesignator = 'W';\n }\n else if ((64 > lat) && (lat >= 56)) {\n LetterDesignator = 'V';\n }\n else if ((56 > lat) && (lat >= 48)) {\n LetterDesignator = 'U';\n }\n else if ((48 > lat) && (lat >= 40)) {\n LetterDesignator = 'T';\n }\n else if ((40 > lat) && (lat >= 32)) {\n LetterDesignator = 'S';\n }\n else if ((32 > lat) && (lat >= 24)) {\n LetterDesignator = 'R';\n }\n else if ((24 > lat) && (lat >= 16)) {\n LetterDesignator = 'Q';\n }\n else if ((16 > lat) && (lat >= 8)) {\n LetterDesignator = 'P';\n }\n else if ((8 > lat) && (lat >= 0)) {\n LetterDesignator = 'N';\n }\n else if ((0 > lat) && (lat >= -8)) {\n LetterDesignator = 'M';\n }\n else if ((-8 > lat) && (lat >= -16)) {\n LetterDesignator = 'L';\n }\n else if ((-16 > lat) && (lat >= -24)) {\n LetterDesignator = 'K';\n }\n else if ((-24 > lat) && (lat >= -32)) {\n LetterDesignator = 'J';\n }\n else if ((-32 > lat) && (lat >= -40)) {\n LetterDesignator = 'H';\n }\n else if ((-40 > lat) && (lat >= -48)) {\n LetterDesignator = 'G';\n }\n else if ((-48 > lat) && (lat >= -56)) {\n LetterDesignator = 'F';\n }\n else if ((-56 > lat) && (lat >= -64)) {\n LetterDesignator = 'E';\n }\n else if ((-64 > lat) && (lat >= -72)) {\n LetterDesignator = 'D';\n }\n else if ((-72 > lat) && (lat >= -80)) {\n LetterDesignator = 'C';\n }\n return LetterDesignator;\n}\n\n/**\n * Encodes a UTM location as MGRS string.\n *\n * @private\n * @param {object} utm An object literal with easting, northing,\n * zoneLetter, zoneNumber\n * @param {number} accuracy Accuracy in digits (1-5).\n * @return {string} MGRS string for the given UTM location.\n */\nfunction encode(utm, accuracy) {\n // prepend with leading zeroes\n var seasting = \"00000\" + utm.easting,\n snorthing = \"00000\" + utm.northing;\n\n return utm.zoneNumber + utm.zoneLetter + get100kID(utm.easting, utm.northing, utm.zoneNumber) + seasting.substr(seasting.length - 5, accuracy) + snorthing.substr(snorthing.length - 5, accuracy);\n}\n\n/**\n * Get the two letter 100k designator for a given UTM easting,\n * northing and zone number value.\n *\n * @private\n * @param {number} easting\n * @param {number} northing\n * @param {number} zoneNumber\n * @return the two letter 100k designator for the given UTM location.\n */\nfunction get100kID(easting, northing, zoneNumber) {\n var setParm = get100kSetForZone(zoneNumber);\n var setColumn = Math.floor(easting / 100000);\n var setRow = Math.floor(northing / 100000) % 20;\n return getLetter100kID(setColumn, setRow, setParm);\n}\n\n/**\n * Given a UTM zone number, figure out the MGRS 100K set it is in.\n *\n * @private\n * @param {number} i An UTM zone number.\n * @return {number} the 100k set the UTM zone is in.\n */\nfunction get100kSetForZone(i) {\n var setParm = i % NUM_100K_SETS;\n if (setParm === 0) {\n setParm = NUM_100K_SETS;\n }\n\n return setParm;\n}\n\n/**\n * Get the two-letter MGRS 100k designator given information\n * translated from the UTM northing, easting and zone number.\n *\n * @private\n * @param {number} column the column index as it relates to the MGRS\n * 100k set spreadsheet, created from the UTM easting.\n * Values are 1-8.\n * @param {number} row the row index as it relates to the MGRS 100k set\n * spreadsheet, created from the UTM northing value. Values\n * are from 0-19.\n * @param {number} parm the set block, as it relates to the MGRS 100k set\n * spreadsheet, created from the UTM zone. Values are from\n * 1-60.\n * @return two letter MGRS 100k code.\n */\nfunction getLetter100kID(column, row, parm) {\n // colOrigin and rowOrigin are the letters at the origin of the set\n var index = parm - 1;\n var colOrigin = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(index);\n var rowOrigin = SET_ORIGIN_ROW_LETTERS.charCodeAt(index);\n\n // colInt and rowInt are the letters to build to return\n var colInt = colOrigin + column - 1;\n var rowInt = rowOrigin + row;\n var rollover = false;\n\n if (colInt > Z) {\n colInt = colInt - Z + A - 1;\n rollover = true;\n }\n\n if (colInt === I || (colOrigin < I && colInt > I) || ((colInt > I || colOrigin < I) && rollover)) {\n colInt++;\n }\n\n if (colInt === O || (colOrigin < O && colInt > O) || ((colInt > O || colOrigin < O) && rollover)) {\n colInt++;\n\n if (colInt === I) {\n colInt++;\n }\n }\n\n if (colInt > Z) {\n colInt = colInt - Z + A - 1;\n }\n\n if (rowInt > V) {\n rowInt = rowInt - V + A - 1;\n rollover = true;\n }\n else {\n rollover = false;\n }\n\n if (((rowInt === I) || ((rowOrigin < I) && (rowInt > I))) || (((rowInt > I) || (rowOrigin < I)) && rollover)) {\n rowInt++;\n }\n\n if (((rowInt === O) || ((rowOrigin < O) && (rowInt > O))) || (((rowInt > O) || (rowOrigin < O)) && rollover)) {\n rowInt++;\n\n if (rowInt === I) {\n rowInt++;\n }\n }\n\n if (rowInt > V) {\n rowInt = rowInt - V + A - 1;\n }\n\n var twoLetter = String.fromCharCode(colInt) + String.fromCharCode(rowInt);\n return twoLetter;\n}\n\n/**\n * Decode the UTM parameters from a MGRS string.\n *\n * @private\n * @param {string} mgrsString an UPPERCASE coordinate string is expected.\n * @return {object} An object literal with easting, northing, zoneLetter,\n * zoneNumber and accuracy (in meters) properties.\n */\nfunction decode(mgrsString) {\n\n if (mgrsString && mgrsString.length === 0) {\n throw (\"MGRSPoint coverting from nothing\");\n }\n\n var length = mgrsString.length;\n\n var hunK = null;\n var sb = \"\";\n var testChar;\n var i = 0;\n\n // get Zone number\n while (!(/[A-Z]/).test(testChar = mgrsString.charAt(i))) {\n if (i >= 2) {\n throw (\"MGRSPoint bad conversion from: \" + mgrsString);\n }\n sb += testChar;\n i++;\n }\n\n var zoneNumber = parseInt(sb, 10);\n\n if (i === 0 || i + 3 > length) {\n // A good MGRS string has to be 4-5 digits long,\n // ##AAA/#AAA at least.\n throw (\"MGRSPoint bad conversion from: \" + mgrsString);\n }\n\n var zoneLetter = mgrsString.charAt(i++);\n\n // Should we check the zone letter here? Why not.\n if (zoneLetter <= 'A' || zoneLetter === 'B' || zoneLetter === 'Y' || zoneLetter >= 'Z' || zoneLetter === 'I' || zoneLetter === 'O') {\n throw (\"MGRSPoint zone letter \" + zoneLetter + \" not handled: \" + mgrsString);\n }\n\n hunK = mgrsString.substring(i, i += 2);\n\n var set = get100kSetForZone(zoneNumber);\n\n var east100k = getEastingFromChar(hunK.charAt(0), set);\n var north100k = getNorthingFromChar(hunK.charAt(1), set);\n\n // We have a bug where the northing may be 2000000 too low.\n // How\n // do we know when to roll over?\n\n while (north100k < getMinNorthing(zoneLetter)) {\n north100k += 2000000;\n }\n\n // calculate the char index for easting/northing separator\n var remainder = length - i;\n\n if (remainder % 2 !== 0) {\n throw (\"MGRSPoint has to have an even number \\nof digits after the zone letter and two 100km letters - front \\nhalf for easting meters, second half for \\nnorthing meters\" + mgrsString);\n }\n\n var sep = remainder / 2;\n\n var sepEasting = 0.0;\n var sepNorthing = 0.0;\n var accuracyBonus, sepEastingString, sepNorthingString, easting, northing;\n if (sep > 0) {\n accuracyBonus = 100000.0 / Math.pow(10, sep);\n sepEastingString = mgrsString.substring(i, i + sep);\n sepEasting = parseFloat(sepEastingString) * accuracyBonus;\n sepNorthingString = mgrsString.substring(i + sep);\n sepNorthing = parseFloat(sepNorthingString) * accuracyBonus;\n }\n\n easting = sepEasting + east100k;\n northing = sepNorthing + north100k;\n\n return {\n easting: easting,\n northing: northing,\n zoneLetter: zoneLetter,\n zoneNumber: zoneNumber,\n accuracy: accuracyBonus\n };\n}\n\n/**\n * Given the first letter from a two-letter MGRS 100k zone, and given the\n * MGRS table set for the zone number, figure out the easting value that\n * should be added to the other, secondary easting value.\n *\n * @private\n * @param {char} e The first letter from a two-letter MGRS 100´k zone.\n * @param {number} set The MGRS table set for the zone number.\n * @return {number} The easting value for the given letter and set.\n */\nfunction getEastingFromChar(e, set) {\n // colOrigin is the letter at the origin of the set for the\n // column\n var curCol = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(set - 1);\n var eastingValue = 100000.0;\n var rewindMarker = false;\n\n while (curCol !== e.charCodeAt(0)) {\n curCol++;\n if (curCol === I) {\n curCol++;\n }\n if (curCol === O) {\n curCol++;\n }\n if (curCol > Z) {\n if (rewindMarker) {\n throw (\"Bad character: \" + e);\n }\n curCol = A;\n rewindMarker = true;\n }\n eastingValue += 100000.0;\n }\n\n return eastingValue;\n}\n\n/**\n * Given the second letter from a two-letter MGRS 100k zone, and given the\n * MGRS table set for the zone number, figure out the northing value that\n * should be added to the other, secondary northing value. You have to\n * remember that Northings are determined from the equator, and the vertical\n * cycle of letters mean a 2000000 additional northing meters. This happens\n * approx. every 18 degrees of latitude. This method does *NOT* count any\n * additional northings. You have to figure out how many 2000000 meters need\n * to be added for the zone letter of the MGRS coordinate.\n *\n * @private\n * @param {char} n Second letter of the MGRS 100k zone\n * @param {number} set The MGRS table set number, which is dependent on the\n * UTM zone number.\n * @return {number} The northing value for the given letter and set.\n */\nfunction getNorthingFromChar(n, set) {\n\n if (n > 'V') {\n throw (\"MGRSPoint given invalid Northing \" + n);\n }\n\n // rowOrigin is the letter at the origin of the set for the\n // column\n var curRow = SET_ORIGIN_ROW_LETTERS.charCodeAt(set - 1);\n var northingValue = 0.0;\n var rewindMarker = false;\n\n while (curRow !== n.charCodeAt(0)) {\n curRow++;\n if (curRow === I) {\n curRow++;\n }\n if (curRow === O) {\n curRow++;\n }\n // fixing a bug making whole application hang in this loop\n // when 'n' is a wrong character\n if (curRow > V) {\n if (rewindMarker) { // making sure that this loop ends\n throw (\"Bad character: \" + n);\n }\n curRow = A;\n rewindMarker = true;\n }\n northingValue += 100000.0;\n }\n\n return northingValue;\n}\n\n/**\n * The function getMinNorthing returns the minimum northing value of a MGRS\n * zone.\n *\n * Ported from Geotrans' c Lattitude_Band_Value structure table.\n *\n * @private\n * @param {char} zoneLetter The MGRS zone to get the min northing for.\n * @return {number}\n */\nfunction getMinNorthing(zoneLetter) {\n var northing;\n switch (zoneLetter) {\n case 'C':\n northing = 1100000.0;\n break;\n case 'D':\n northing = 2000000.0;\n break;\n case 'E':\n northing = 2800000.0;\n break;\n case 'F':\n northing = 3700000.0;\n break;\n case 'G':\n northing = 4600000.0;\n break;\n case 'H':\n northing = 5500000.0;\n break;\n case 'J':\n northing = 6400000.0;\n break;\n case 'K':\n northing = 7300000.0;\n break;\n case 'L':\n northing = 8200000.0;\n break;\n case 'M':\n northing = 9100000.0;\n break;\n case 'N':\n northing = 0.0;\n break;\n case 'P':\n northing = 800000.0;\n break;\n case 'Q':\n northing = 1700000.0;\n break;\n case 'R':\n northing = 2600000.0;\n break;\n case 'S':\n northing = 3500000.0;\n break;\n case 'T':\n northing = 4400000.0;\n break;\n case 'U':\n northing = 5300000.0;\n break;\n case 'V':\n northing = 6200000.0;\n break;\n case 'W':\n northing = 7000000.0;\n break;\n case 'X':\n northing = 7900000.0;\n break;\n default:\n northing = -1.0;\n }\n if (northing >= 0.0) {\n return northing;\n }\n else {\n throw (\"Invalid zone letter: \" + zoneLetter);\n }\n\n}\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/mgrs/mgrs.js?"); + +/***/ }), + +/***/ "./node_modules/path-browserify/index.js": +/*!***********************************************!*\ + !*** ./node_modules/path-browserify/index.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,\n// backported and transplited with Babel, with backwards-compat fixes\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function (path) {\n if (typeof path !== 'string') path = path + '';\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) {\n // return '//';\n // Backwards-compat fix:\n return '/';\n }\n return path.slice(0, end);\n};\n\nfunction basename(path) {\n if (typeof path !== 'string') path = path + '';\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n}\n\n// Uses a mixed approach for backwards-compatibility, as ext behavior changed\n// in new Node.js versions, so only basename() above is backported here\nexports.basename = function (path, ext) {\n var f = basename(path);\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\nexports.extname = function (path) {\n if (typeof path !== 'string') path = path + '';\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack://LithoSphere/./node_modules/path-browserify/index.js?"); + +/***/ }), + +/***/ "./node_modules/process/browser.js": +/*!*****************************************!*\ + !*** ./node_modules/process/browser.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/process/browser.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/Point.js": +/*!*****************************************!*\ + !*** ./node_modules/proj4/lib/Point.js ***! + \*****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var mgrs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mgrs */ \"./node_modules/mgrs/mgrs.js\");\n\n\nfunction Point(x, y, z) {\n if (!(this instanceof Point)) {\n return new Point(x, y, z);\n }\n if (Array.isArray(x)) {\n this.x = x[0];\n this.y = x[1];\n this.z = x[2] || 0.0;\n } else if(typeof x === 'object') {\n this.x = x.x;\n this.y = x.y;\n this.z = x.z || 0.0;\n } else if (typeof x === 'string' && typeof y === 'undefined') {\n var coords = x.split(',');\n this.x = parseFloat(coords[0], 10);\n this.y = parseFloat(coords[1], 10);\n this.z = parseFloat(coords[2], 10) || 0.0;\n } else {\n this.x = x;\n this.y = y;\n this.z = z || 0.0;\n }\n console.warn('proj4.Point will be removed in version 3, use proj4.toPoint');\n}\n\nPoint.fromMGRS = function(mgrsStr) {\n return new Point(Object(mgrs__WEBPACK_IMPORTED_MODULE_0__[\"toPoint\"])(mgrsStr));\n};\nPoint.prototype.toMGRS = function(accuracy) {\n return Object(mgrs__WEBPACK_IMPORTED_MODULE_0__[\"forward\"])([this.x, this.y], accuracy);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Point);\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/Point.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/Proj.js": +/*!****************************************!*\ + !*** ./node_modules/proj4/lib/Proj.js ***! + \****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _parseCode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./parseCode */ \"./node_modules/proj4/lib/parseCode.js\");\n/* harmony import */ var _extend__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./extend */ \"./node_modules/proj4/lib/extend.js\");\n/* harmony import */ var _projections__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./projections */ \"./node_modules/proj4/lib/projections.js\");\n/* harmony import */ var _deriveConstants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./deriveConstants */ \"./node_modules/proj4/lib/deriveConstants.js\");\n/* harmony import */ var _constants_Datum__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constants/Datum */ \"./node_modules/proj4/lib/constants/Datum.js\");\n/* harmony import */ var _datum__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./datum */ \"./node_modules/proj4/lib/datum.js\");\n/* harmony import */ var _match__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./match */ \"./node_modules/proj4/lib/match.js\");\n/* harmony import */ var _nadgrid__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./nadgrid */ \"./node_modules/proj4/lib/nadgrid.js\");\n\n\n\n\n\n\n\n\n\nfunction Projection(srsCode,callback) {\n if (!(this instanceof Projection)) {\n return new Projection(srsCode);\n }\n callback = callback || function(error){\n if(error){\n throw error;\n }\n };\n var json = Object(_parseCode__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(srsCode);\n if(typeof json !== 'object'){\n callback(srsCode);\n return;\n }\n var ourProj = Projection.projections.get(json.projName);\n if(!ourProj){\n callback(srsCode);\n return;\n }\n if (json.datumCode && json.datumCode !== 'none') {\n var datumDef = Object(_match__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_constants_Datum__WEBPACK_IMPORTED_MODULE_4__[\"default\"], json.datumCode);\n if (datumDef) {\n json.datum_params = datumDef.towgs84 ? datumDef.towgs84.split(',') : null;\n json.ellps = datumDef.ellipse;\n json.datumName = datumDef.datumName ? datumDef.datumName : json.datumCode;\n }\n }\n json.k0 = json.k0 || 1.0;\n json.axis = json.axis || 'enu';\n json.ellps = json.ellps || 'wgs84';\n var sphere_ = Object(_deriveConstants__WEBPACK_IMPORTED_MODULE_3__[\"sphere\"])(json.a, json.b, json.rf, json.ellps, json.sphere);\n var ecc = Object(_deriveConstants__WEBPACK_IMPORTED_MODULE_3__[\"eccentricity\"])(sphere_.a, sphere_.b, sphere_.rf, json.R_A);\n var nadgrids = Object(_nadgrid__WEBPACK_IMPORTED_MODULE_7__[\"getNadgrids\"])(json.nadgrids);\n var datumObj = json.datum || Object(_datum__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(json.datumCode, json.datum_params, sphere_.a, sphere_.b, ecc.es, ecc.ep2,\n nadgrids);\n\n Object(_extend__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, json); // transfer everything over from the projection because we don't know what we'll need\n Object(_extend__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, ourProj); // transfer all the methods from the projection\n\n // copy the 4 things over we calulated in deriveConstants.sphere\n this.a = sphere_.a;\n this.b = sphere_.b;\n this.rf = sphere_.rf;\n this.sphere = sphere_.sphere;\n\n // copy the 3 things we calculated in deriveConstants.eccentricity\n this.es = ecc.es;\n this.e = ecc.e;\n this.ep2 = ecc.ep2;\n\n // add in the datum object\n this.datum = datumObj;\n\n // init the projection\n this.init();\n\n // legecy callback from back in the day when it went to spatialreference.org\n callback(null, this);\n\n}\nProjection.projections = _projections__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\nProjection.projections.start();\n/* harmony default export */ __webpack_exports__[\"default\"] = (Projection);\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/Proj.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/adjust_axis.js": +/*!***********************************************!*\ + !*** ./node_modules/proj4/lib/adjust_axis.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(crs, denorm, point) {\n var xin = point.x,\n yin = point.y,\n zin = point.z || 0.0;\n var v, t, i;\n var out = {};\n for (i = 0; i < 3; i++) {\n if (denorm && i === 2 && point.z === undefined) {\n continue;\n }\n if (i === 0) {\n v = xin;\n if (\"ew\".indexOf(crs.axis[i]) !== -1) {\n t = 'x';\n } else {\n t = 'y';\n }\n\n }\n else if (i === 1) {\n v = yin;\n if (\"ns\".indexOf(crs.axis[i]) !== -1) {\n t = 'y';\n } else {\n t = 'x';\n }\n }\n else {\n v = zin;\n t = 'z';\n }\n switch (crs.axis[i]) {\n case 'e':\n out[t] = v;\n break;\n case 'w':\n out[t] = -v;\n break;\n case 'n':\n out[t] = v;\n break;\n case 's':\n out[t] = -v;\n break;\n case 'u':\n if (point[t] !== undefined) {\n out.z = v;\n }\n break;\n case 'd':\n if (point[t] !== undefined) {\n out.z = -v;\n }\n break;\n default:\n //console.log(\"ERROR: unknow axis (\"+crs.axis[i]+\") - check definition of \"+crs.projName);\n return null;\n }\n }\n return out;\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/adjust_axis.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/checkSanity.js": +/*!***********************************************!*\ + !*** ./node_modules/proj4/lib/checkSanity.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (point) {\n checkCoord(point.x);\n checkCoord(point.y);\n});\nfunction checkCoord(num) {\n if (typeof Number.isFinite === 'function') {\n if (Number.isFinite(num)) {\n return;\n }\n throw new TypeError('coordinates must be finite numbers');\n }\n if (typeof num !== 'number' || num !== num || !isFinite(num)) {\n throw new TypeError('coordinates must be finite numbers');\n }\n}\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/checkSanity.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/adjust_lat.js": +/*!*****************************************************!*\ + !*** ./node_modules/proj4/lib/common/adjust_lat.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n/* harmony import */ var _sign__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sign */ \"./node_modules/proj4/lib/common/sign.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n return (Math.abs(x) < _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"]) ? x : (x - (Object(_sign__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(x) * Math.PI));\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/adjust_lat.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/adjust_lon.js": +/*!*****************************************************!*\ + !*** ./node_modules/proj4/lib/common/adjust_lon.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n/* harmony import */ var _sign__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sign */ \"./node_modules/proj4/lib/common/sign.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n return (Math.abs(x) <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"]) ? x : (x - (Object(_sign__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(x) * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"TWO_PI\"]));\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/adjust_lon.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/adjust_zone.js": +/*!******************************************************!*\ + !*** ./node_modules/proj4/lib/common/adjust_zone.js ***! + \******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _adjust_lon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(zone, lon) {\n if (zone === undefined) {\n zone = Math.floor((Object(_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(lon) + Math.PI) * 30 / Math.PI) + 1;\n\n if (zone < 0) {\n return 0;\n } else if (zone > 60) {\n return 60;\n }\n }\n return zone;\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/adjust_zone.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/asinhy.js": +/*!*************************************************!*\ + !*** ./node_modules/proj4/lib/common/asinhy.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _hypot__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hypot */ \"./node_modules/proj4/lib/common/hypot.js\");\n/* harmony import */ var _log1py__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./log1py */ \"./node_modules/proj4/lib/common/log1py.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n var y = Math.abs(x);\n y = Object(_log1py__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(y * (1 + y / (Object(_hypot__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(1, y) + 1)));\n\n return x < 0 ? -y : y;\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/asinhy.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/asinz.js": +/*!************************************************!*\ + !*** ./node_modules/proj4/lib/common/asinz.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n if (Math.abs(x) > 1) {\n x = (x > 1) ? 1 : -1;\n }\n return Math.asin(x);\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/asinz.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/clens.js": +/*!************************************************!*\ + !*** ./node_modules/proj4/lib/common/clens.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(pp, arg_r) {\n var r = 2 * Math.cos(arg_r);\n var i = pp.length - 1;\n var hr1 = pp[i];\n var hr2 = 0;\n var hr;\n\n while (--i >= 0) {\n hr = -hr2 + r * hr1 + pp[i];\n hr2 = hr1;\n hr1 = hr;\n }\n\n return Math.sin(arg_r) * hr;\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/clens.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/clens_cmplx.js": +/*!******************************************************!*\ + !*** ./node_modules/proj4/lib/common/clens_cmplx.js ***! + \******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sinh__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sinh */ \"./node_modules/proj4/lib/common/sinh.js\");\n/* harmony import */ var _cosh__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cosh */ \"./node_modules/proj4/lib/common/cosh.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(pp, arg_r, arg_i) {\n var sin_arg_r = Math.sin(arg_r);\n var cos_arg_r = Math.cos(arg_r);\n var sinh_arg_i = Object(_sinh__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arg_i);\n var cosh_arg_i = Object(_cosh__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arg_i);\n var r = 2 * cos_arg_r * cosh_arg_i;\n var i = -2 * sin_arg_r * sinh_arg_i;\n var j = pp.length - 1;\n var hr = pp[j];\n var hi1 = 0;\n var hr1 = 0;\n var hi = 0;\n var hr2;\n var hi2;\n\n while (--j >= 0) {\n hr2 = hr1;\n hi2 = hi1;\n hr1 = hr;\n hi1 = hi;\n hr = -hr2 + r * hr1 - i * hi1 + pp[j];\n hi = -hi2 + i * hr1 + r * hi1;\n }\n\n r = sin_arg_r * cosh_arg_i;\n i = cos_arg_r * sinh_arg_i;\n\n return [r * hr - i * hi, r * hi + i * hr];\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/clens_cmplx.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/cosh.js": +/*!***********************************************!*\ + !*** ./node_modules/proj4/lib/common/cosh.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n var r = Math.exp(x);\n r = (r + 1 / r) / 2;\n return r;\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/cosh.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/e0fn.js": +/*!***********************************************!*\ + !*** ./node_modules/proj4/lib/common/e0fn.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n return (1 - 0.25 * x * (1 + x / 16 * (3 + 1.25 * x)));\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/e0fn.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/e1fn.js": +/*!***********************************************!*\ + !*** ./node_modules/proj4/lib/common/e1fn.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n return (0.375 * x * (1 + 0.25 * x * (1 + 0.46875 * x)));\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/e1fn.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/e2fn.js": +/*!***********************************************!*\ + !*** ./node_modules/proj4/lib/common/e2fn.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n return (0.05859375 * x * x * (1 + 0.75 * x));\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/e2fn.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/e3fn.js": +/*!***********************************************!*\ + !*** ./node_modules/proj4/lib/common/e3fn.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n return (x * x * x * (35 / 3072));\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/e3fn.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/gN.js": +/*!*********************************************!*\ + !*** ./node_modules/proj4/lib/common/gN.js ***! + \*********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, e, sinphi) {\n var temp = e * sinphi;\n return a / Math.sqrt(1 - temp * temp);\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/gN.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/gatg.js": +/*!***********************************************!*\ + !*** ./node_modules/proj4/lib/common/gatg.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(pp, B) {\n var cos_2B = 2 * Math.cos(2 * B);\n var i = pp.length - 1;\n var h1 = pp[i];\n var h2 = 0;\n var h;\n\n while (--i >= 0) {\n h = -h2 + cos_2B * h1 + pp[i];\n h2 = h1;\n h1 = h;\n }\n\n return (B + h * Math.sin(2 * B));\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/gatg.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/hypot.js": +/*!************************************************!*\ + !*** ./node_modules/proj4/lib/common/hypot.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y) {\n x = Math.abs(x);\n y = Math.abs(y);\n var a = Math.max(x, y);\n var b = Math.min(x, y) / (a ? a : 1);\n\n return a * Math.sqrt(1 + Math.pow(b, 2));\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/hypot.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/imlfn.js": +/*!************************************************!*\ + !*** ./node_modules/proj4/lib/common/imlfn.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(ml, e0, e1, e2, e3) {\n var phi;\n var dphi;\n\n phi = ml / e0;\n for (var i = 0; i < 15; i++) {\n dphi = (ml - (e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi))) / (e0 - 2 * e1 * Math.cos(2 * phi) + 4 * e2 * Math.cos(4 * phi) - 6 * e3 * Math.cos(6 * phi));\n phi += dphi;\n if (Math.abs(dphi) <= 0.0000000001) {\n return phi;\n }\n }\n\n //..reportError(\"IMLFN-CONV:Latitude failed to converge after 15 iterations\");\n return NaN;\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/imlfn.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/iqsfnz.js": +/*!*************************************************!*\ + !*** ./node_modules/proj4/lib/common/iqsfnz.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(eccent, q) {\n var temp = 1 - (1 - eccent * eccent) / (2 * eccent) * Math.log((1 - eccent) / (1 + eccent));\n if (Math.abs(Math.abs(q) - temp) < 1.0E-6) {\n if (q < 0) {\n return (-1 * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"]);\n }\n else {\n return _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n }\n }\n //var phi = 0.5* q/(1-eccent*eccent);\n var phi = Math.asin(0.5 * q);\n var dphi;\n var sin_phi;\n var cos_phi;\n var con;\n for (var i = 0; i < 30; i++) {\n sin_phi = Math.sin(phi);\n cos_phi = Math.cos(phi);\n con = eccent * sin_phi;\n dphi = Math.pow(1 - con * con, 2) / (2 * cos_phi) * (q / (1 - eccent * eccent) - sin_phi / (1 - con * con) + 0.5 / eccent * Math.log((1 - con) / (1 + con)));\n phi += dphi;\n if (Math.abs(dphi) <= 0.0000000001) {\n return phi;\n }\n }\n\n //console.log(\"IQSFN-CONV:Latitude failed to converge after 30 iterations\");\n return NaN;\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/iqsfnz.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/log1py.js": +/*!*************************************************!*\ + !*** ./node_modules/proj4/lib/common/log1py.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n var y = 1 + x;\n var z = y - 1;\n\n return z === 0 ? x : x * Math.log(y) / z;\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/log1py.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/mlfn.js": +/*!***********************************************!*\ + !*** ./node_modules/proj4/lib/common/mlfn.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(e0, e1, e2, e3, phi) {\n return (e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi));\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/mlfn.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/msfnz.js": +/*!************************************************!*\ + !*** ./node_modules/proj4/lib/common/msfnz.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(eccent, sinphi, cosphi) {\n var con = eccent * sinphi;\n return cosphi / (Math.sqrt(1 - con * con));\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/msfnz.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/phi2z.js": +/*!************************************************!*\ + !*** ./node_modules/proj4/lib/common/phi2z.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(eccent, ts) {\n var eccnth = 0.5 * eccent;\n var con, dphi;\n var phi = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] - 2 * Math.atan(ts);\n for (var i = 0; i <= 15; i++) {\n con = eccent * Math.sin(phi);\n dphi = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] - 2 * Math.atan(ts * (Math.pow(((1 - con) / (1 + con)), eccnth))) - phi;\n phi += dphi;\n if (Math.abs(dphi) <= 0.0000000001) {\n return phi;\n }\n }\n //console.log(\"phi2z has NoConvergence\");\n return -9999;\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/phi2z.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/pj_enfn.js": +/*!**************************************************!*\ + !*** ./node_modules/proj4/lib/common/pj_enfn.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nvar C00 = 1;\nvar C02 = 0.25;\nvar C04 = 0.046875;\nvar C06 = 0.01953125;\nvar C08 = 0.01068115234375;\nvar C22 = 0.75;\nvar C44 = 0.46875;\nvar C46 = 0.01302083333333333333;\nvar C48 = 0.00712076822916666666;\nvar C66 = 0.36458333333333333333;\nvar C68 = 0.00569661458333333333;\nvar C88 = 0.3076171875;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(es) {\n var en = [];\n en[0] = C00 - es * (C02 + es * (C04 + es * (C06 + es * C08)));\n en[1] = es * (C22 - es * (C04 + es * (C06 + es * C08)));\n var t = es * es;\n en[2] = t * (C44 - es * (C46 + es * C48));\n t *= es;\n en[3] = t * (C66 - es * C68);\n en[4] = t * es * C88;\n return en;\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/pj_enfn.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/pj_inv_mlfn.js": +/*!******************************************************!*\ + !*** ./node_modules/proj4/lib/common/pj_inv_mlfn.js ***! + \******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _pj_mlfn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pj_mlfn */ \"./node_modules/proj4/lib/common/pj_mlfn.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\n\nvar MAX_ITER = 20;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(arg, es, en) {\n var k = 1 / (1 - es);\n var phi = arg;\n for (var i = MAX_ITER; i; --i) { /* rarely goes over 2 iterations */\n var s = Math.sin(phi);\n var t = 1 - es * s * s;\n //t = this.pj_mlfn(phi, s, Math.cos(phi), en) - arg;\n //phi -= t * (t * Math.sqrt(t)) * k;\n t = (Object(_pj_mlfn__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(phi, s, Math.cos(phi), en) - arg) * (t * Math.sqrt(t)) * k;\n phi -= t;\n if (Math.abs(t) < _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"]) {\n return phi;\n }\n }\n //..reportError(\"cass:pj_inv_mlfn: Convergence error\");\n return phi;\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/pj_inv_mlfn.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/pj_mlfn.js": +/*!**************************************************!*\ + !*** ./node_modules/proj4/lib/common/pj_mlfn.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(phi, sphi, cphi, en) {\n cphi *= sphi;\n sphi *= sphi;\n return (en[0] * phi - cphi * (en[1] + sphi * (en[2] + sphi * (en[3] + sphi * en[4]))));\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/pj_mlfn.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/qsfnz.js": +/*!************************************************!*\ + !*** ./node_modules/proj4/lib/common/qsfnz.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(eccent, sinphi) {\n var con;\n if (eccent > 1.0e-7) {\n con = eccent * sinphi;\n return ((1 - eccent * eccent) * (sinphi / (1 - con * con) - (0.5 / eccent) * Math.log((1 - con) / (1 + con))));\n }\n else {\n return (2 * sinphi);\n }\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/qsfnz.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/sign.js": +/*!***********************************************!*\ + !*** ./node_modules/proj4/lib/common/sign.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n return x<0 ? -1 : 1;\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/sign.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/sinh.js": +/*!***********************************************!*\ + !*** ./node_modules/proj4/lib/common/sinh.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n var r = Math.exp(x);\n r = (r - 1 / r) / 2;\n return r;\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/sinh.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/srat.js": +/*!***********************************************!*\ + !*** ./node_modules/proj4/lib/common/srat.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(esinp, exp) {\n return (Math.pow((1 - esinp) / (1 + esinp), exp));\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/srat.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/toPoint.js": +/*!**************************************************!*\ + !*** ./node_modules/proj4/lib/common/toPoint.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (array){\n var out = {\n x: array[0],\n y: array[1]\n };\n if (array.length>2) {\n out.z = array[2];\n }\n if (array.length>3) {\n out.m = array[3];\n }\n return out;\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/toPoint.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/common/tsfnz.js": +/*!************************************************!*\ + !*** ./node_modules/proj4/lib/common/tsfnz.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(eccent, phi, sinphi) {\n var con = eccent * sinphi;\n var com = 0.5 * eccent;\n con = Math.pow(((1 - con) / (1 + con)), com);\n return (Math.tan(0.5 * (_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] - phi)) / con);\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/common/tsfnz.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/constants/Datum.js": +/*!***************************************************!*\ + !*** ./node_modules/proj4/lib/constants/Datum.js ***! + \***************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return exports; });\nvar exports = {};\n\nexports.wgs84 = {\n towgs84: \"0,0,0\",\n ellipse: \"WGS84\",\n datumName: \"WGS84\"\n};\n\nexports.ch1903 = {\n towgs84: \"674.374,15.056,405.346\",\n ellipse: \"bessel\",\n datumName: \"swiss\"\n};\n\nexports.ggrs87 = {\n towgs84: \"-199.87,74.79,246.62\",\n ellipse: \"GRS80\",\n datumName: \"Greek_Geodetic_Reference_System_1987\"\n};\n\nexports.nad83 = {\n towgs84: \"0,0,0\",\n ellipse: \"GRS80\",\n datumName: \"North_American_Datum_1983\"\n};\n\nexports.nad27 = {\n nadgrids: \"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat\",\n ellipse: \"clrk66\",\n datumName: \"North_American_Datum_1927\"\n};\n\nexports.potsdam = {\n towgs84: \"606.0,23.0,413.0\",\n ellipse: \"bessel\",\n datumName: \"Potsdam Rauenberg 1950 DHDN\"\n};\n\nexports.carthage = {\n towgs84: \"-263.0,6.0,431.0\",\n ellipse: \"clark80\",\n datumName: \"Carthage 1934 Tunisia\"\n};\n\nexports.hermannskogel = {\n towgs84: \"653.0,-212.0,449.0\",\n ellipse: \"bessel\",\n datumName: \"Hermannskogel\"\n};\n\nexports.osni52 = {\n towgs84: \"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15\",\n ellipse: \"airy\",\n datumName: \"Irish National\"\n};\n\nexports.ire65 = {\n towgs84: \"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15\",\n ellipse: \"mod_airy\",\n datumName: \"Ireland 1965\"\n};\n\nexports.rassadiran = {\n towgs84: \"-133.63,-157.5,-158.62\",\n ellipse: \"intl\",\n datumName: \"Rassadiran\"\n};\n\nexports.nzgd49 = {\n towgs84: \"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993\",\n ellipse: \"intl\",\n datumName: \"New Zealand Geodetic Datum 1949\"\n};\n\nexports.osgb36 = {\n towgs84: \"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894\",\n ellipse: \"airy\",\n datumName: \"Airy 1830\"\n};\n\nexports.s_jtsk = {\n towgs84: \"589,76,480\",\n ellipse: 'bessel',\n datumName: 'S-JTSK (Ferro)'\n};\n\nexports.beduaram = {\n towgs84: '-106,-87,188',\n ellipse: 'clrk80',\n datumName: 'Beduaram'\n};\n\nexports.gunung_segara = {\n towgs84: '-403,684,41',\n ellipse: 'bessel',\n datumName: 'Gunung Segara Jakarta'\n};\n\nexports.rnb72 = {\n towgs84: \"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1\",\n ellipse: \"intl\",\n datumName: \"Reseau National Belge 1972\"\n};\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/constants/Datum.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/constants/Ellipsoid.js": +/*!*******************************************************!*\ + !*** ./node_modules/proj4/lib/constants/Ellipsoid.js ***! + \*******************************************************/ +/*! exports provided: default, WGS84 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return exports; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"WGS84\", function() { return WGS84; });\nvar exports = {};\n\nexports.MERIT = {\n a: 6378137.0,\n rf: 298.257,\n ellipseName: \"MERIT 1983\"\n};\n\nexports.SGS85 = {\n a: 6378136.0,\n rf: 298.257,\n ellipseName: \"Soviet Geodetic System 85\"\n};\n\nexports.GRS80 = {\n a: 6378137.0,\n rf: 298.257222101,\n ellipseName: \"GRS 1980(IUGG, 1980)\"\n};\n\nexports.IAU76 = {\n a: 6378140.0,\n rf: 298.257,\n ellipseName: \"IAU 1976\"\n};\n\nexports.airy = {\n a: 6377563.396,\n b: 6356256.910,\n ellipseName: \"Airy 1830\"\n};\n\nexports.APL4 = {\n a: 6378137,\n rf: 298.25,\n ellipseName: \"Appl. Physics. 1965\"\n};\n\nexports.NWL9D = {\n a: 6378145.0,\n rf: 298.25,\n ellipseName: \"Naval Weapons Lab., 1965\"\n};\n\nexports.mod_airy = {\n a: 6377340.189,\n b: 6356034.446,\n ellipseName: \"Modified Airy\"\n};\n\nexports.andrae = {\n a: 6377104.43,\n rf: 300.0,\n ellipseName: \"Andrae 1876 (Den., Iclnd.)\"\n};\n\nexports.aust_SA = {\n a: 6378160.0,\n rf: 298.25,\n ellipseName: \"Australian Natl & S. Amer. 1969\"\n};\n\nexports.GRS67 = {\n a: 6378160.0,\n rf: 298.2471674270,\n ellipseName: \"GRS 67(IUGG 1967)\"\n};\n\nexports.bessel = {\n a: 6377397.155,\n rf: 299.1528128,\n ellipseName: \"Bessel 1841\"\n};\n\nexports.bess_nam = {\n a: 6377483.865,\n rf: 299.1528128,\n ellipseName: \"Bessel 1841 (Namibia)\"\n};\n\nexports.clrk66 = {\n a: 6378206.4,\n b: 6356583.8,\n ellipseName: \"Clarke 1866\"\n};\n\nexports.clrk80 = {\n a: 6378249.145,\n rf: 293.4663,\n ellipseName: \"Clarke 1880 mod.\"\n};\n\nexports.clrk58 = {\n a: 6378293.645208759,\n rf: 294.2606763692654,\n ellipseName: \"Clarke 1858\"\n};\n\nexports.CPM = {\n a: 6375738.7,\n rf: 334.29,\n ellipseName: \"Comm. des Poids et Mesures 1799\"\n};\n\nexports.delmbr = {\n a: 6376428.0,\n rf: 311.5,\n ellipseName: \"Delambre 1810 (Belgium)\"\n};\n\nexports.engelis = {\n a: 6378136.05,\n rf: 298.2566,\n ellipseName: \"Engelis 1985\"\n};\n\nexports.evrst30 = {\n a: 6377276.345,\n rf: 300.8017,\n ellipseName: \"Everest 1830\"\n};\n\nexports.evrst48 = {\n a: 6377304.063,\n rf: 300.8017,\n ellipseName: \"Everest 1948\"\n};\n\nexports.evrst56 = {\n a: 6377301.243,\n rf: 300.8017,\n ellipseName: \"Everest 1956\"\n};\n\nexports.evrst69 = {\n a: 6377295.664,\n rf: 300.8017,\n ellipseName: \"Everest 1969\"\n};\n\nexports.evrstSS = {\n a: 6377298.556,\n rf: 300.8017,\n ellipseName: \"Everest (Sabah & Sarawak)\"\n};\n\nexports.fschr60 = {\n a: 6378166.0,\n rf: 298.3,\n ellipseName: \"Fischer (Mercury Datum) 1960\"\n};\n\nexports.fschr60m = {\n a: 6378155.0,\n rf: 298.3,\n ellipseName: \"Fischer 1960\"\n};\n\nexports.fschr68 = {\n a: 6378150.0,\n rf: 298.3,\n ellipseName: \"Fischer 1968\"\n};\n\nexports.helmert = {\n a: 6378200.0,\n rf: 298.3,\n ellipseName: \"Helmert 1906\"\n};\n\nexports.hough = {\n a: 6378270.0,\n rf: 297.0,\n ellipseName: \"Hough\"\n};\n\nexports.intl = {\n a: 6378388.0,\n rf: 297.0,\n ellipseName: \"International 1909 (Hayford)\"\n};\n\nexports.kaula = {\n a: 6378163.0,\n rf: 298.24,\n ellipseName: \"Kaula 1961\"\n};\n\nexports.lerch = {\n a: 6378139.0,\n rf: 298.257,\n ellipseName: \"Lerch 1979\"\n};\n\nexports.mprts = {\n a: 6397300.0,\n rf: 191.0,\n ellipseName: \"Maupertius 1738\"\n};\n\nexports.new_intl = {\n a: 6378157.5,\n b: 6356772.2,\n ellipseName: \"New International 1967\"\n};\n\nexports.plessis = {\n a: 6376523.0,\n rf: 6355863.0,\n ellipseName: \"Plessis 1817 (France)\"\n};\n\nexports.krass = {\n a: 6378245.0,\n rf: 298.3,\n ellipseName: \"Krassovsky, 1942\"\n};\n\nexports.SEasia = {\n a: 6378155.0,\n b: 6356773.3205,\n ellipseName: \"Southeast Asia\"\n};\n\nexports.walbeck = {\n a: 6376896.0,\n b: 6355834.8467,\n ellipseName: \"Walbeck\"\n};\n\nexports.WGS60 = {\n a: 6378165.0,\n rf: 298.3,\n ellipseName: \"WGS 60\"\n};\n\nexports.WGS66 = {\n a: 6378145.0,\n rf: 298.25,\n ellipseName: \"WGS 66\"\n};\n\nexports.WGS7 = {\n a: 6378135.0,\n rf: 298.26,\n ellipseName: \"WGS 72\"\n};\n\nvar WGS84 = exports.WGS84 = {\n a: 6378137.0,\n rf: 298.257223563,\n ellipseName: \"WGS 84\"\n};\n\nexports.sphere = {\n a: 6370997.0,\n b: 6370997.0,\n ellipseName: \"Normal Sphere (r=6370997)\"\n};\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/constants/Ellipsoid.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/constants/PrimeMeridian.js": +/*!***********************************************************!*\ + !*** ./node_modules/proj4/lib/constants/PrimeMeridian.js ***! + \***********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return exports; });\nvar exports = {};\n\n\nexports.greenwich = 0.0; //\"0dE\",\nexports.lisbon = -9.131906111111; //\"9d07'54.862\\\"W\",\nexports.paris = 2.337229166667; //\"2d20'14.025\\\"E\",\nexports.bogota = -74.080916666667; //\"74d04'51.3\\\"W\",\nexports.madrid = -3.687938888889; //\"3d41'16.58\\\"W\",\nexports.rome = 12.452333333333; //\"12d27'8.4\\\"E\",\nexports.bern = 7.439583333333; //\"7d26'22.5\\\"E\",\nexports.jakarta = 106.807719444444; //\"106d48'27.79\\\"E\",\nexports.ferro = -17.666666666667; //\"17d40'W\",\nexports.brussels = 4.367975; //\"4d22'4.71\\\"E\",\nexports.stockholm = 18.058277777778; //\"18d3'29.8\\\"E\",\nexports.athens = 23.7163375; //\"23d42'58.815\\\"E\",\nexports.oslo = 10.722916666667; //\"10d43'22.5\\\"E\"\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/constants/PrimeMeridian.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/constants/units.js": +/*!***************************************************!*\ + !*** ./node_modules/proj4/lib/constants/units.js ***! + \***************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n ft: {to_meter: 0.3048},\n 'us-ft': {to_meter: 1200 / 3937}\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/constants/units.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/constants/values.js": +/*!****************************************************!*\ + !*** ./node_modules/proj4/lib/constants/values.js ***! + \****************************************************/ +/*! exports provided: PJD_3PARAM, PJD_7PARAM, PJD_GRIDSHIFT, PJD_WGS84, PJD_NODATUM, SRS_WGS84_SEMIMAJOR, SRS_WGS84_SEMIMINOR, SRS_WGS84_ESQUARED, SEC_TO_RAD, HALF_PI, SIXTH, RA4, RA6, EPSLN, D2R, R2D, FORTPI, TWO_PI, SPI */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PJD_3PARAM\", function() { return PJD_3PARAM; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PJD_7PARAM\", function() { return PJD_7PARAM; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PJD_GRIDSHIFT\", function() { return PJD_GRIDSHIFT; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PJD_WGS84\", function() { return PJD_WGS84; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PJD_NODATUM\", function() { return PJD_NODATUM; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SRS_WGS84_SEMIMAJOR\", function() { return SRS_WGS84_SEMIMAJOR; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SRS_WGS84_SEMIMINOR\", function() { return SRS_WGS84_SEMIMINOR; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SRS_WGS84_ESQUARED\", function() { return SRS_WGS84_ESQUARED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SEC_TO_RAD\", function() { return SEC_TO_RAD; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"HALF_PI\", function() { return HALF_PI; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SIXTH\", function() { return SIXTH; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RA4\", function() { return RA4; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RA6\", function() { return RA6; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EPSLN\", function() { return EPSLN; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"D2R\", function() { return D2R; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"R2D\", function() { return R2D; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"FORTPI\", function() { return FORTPI; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TWO_PI\", function() { return TWO_PI; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SPI\", function() { return SPI; });\nvar PJD_3PARAM = 1;\nvar PJD_7PARAM = 2;\nvar PJD_GRIDSHIFT = 3;\nvar PJD_WGS84 = 4; // WGS84 or equivalent\nvar PJD_NODATUM = 5; // WGS84 or equivalent\nvar SRS_WGS84_SEMIMAJOR = 6378137.0; // only used in grid shift transforms\nvar SRS_WGS84_SEMIMINOR = 6356752.314; // only used in grid shift transforms\nvar SRS_WGS84_ESQUARED = 0.0066943799901413165; // only used in grid shift transforms\nvar SEC_TO_RAD = 4.84813681109535993589914102357e-6;\nvar HALF_PI = Math.PI/2;\n// ellipoid pj_set_ell.c\nvar SIXTH = 0.1666666666666666667;\n/* 1/6 */\nvar RA4 = 0.04722222222222222222;\n/* 17/360 */\nvar RA6 = 0.02215608465608465608;\nvar EPSLN = 1.0e-10;\n// you'd think you could use Number.EPSILON above but that makes\n// Mollweide get into an infinate loop.\n\nvar D2R = 0.01745329251994329577;\nvar R2D = 57.29577951308232088;\nvar FORTPI = Math.PI/4;\nvar TWO_PI = Math.PI * 2;\n// SPI is slightly greater than Math.PI, so values that exceed the -180..180\n// degree range by a tiny amount don't get wrapped. This prevents points that\n// have drifted from their original location along the 180th meridian (due to\n// floating point error) from changing their sign.\nvar SPI = 3.14159265359;\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/constants/values.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/core.js": +/*!****************************************!*\ + !*** ./node_modules/proj4/lib/core.js ***! + \****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Proj__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Proj */ \"./node_modules/proj4/lib/Proj.js\");\n/* harmony import */ var _transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transform */ \"./node_modules/proj4/lib/transform.js\");\n\n\nvar wgs84 = Object(_Proj__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('WGS84');\n\nfunction transformer(from, to, coords) {\n var transformedArray, out, keys;\n if (Array.isArray(coords)) {\n transformedArray = Object(_transform__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(from, to, coords) || {x: NaN, y: NaN};\n if (coords.length > 2) {\n if ((typeof from.name !== 'undefined' && from.name === 'geocent') || (typeof to.name !== 'undefined' && to.name === 'geocent')) {\n if (typeof transformedArray.z === 'number') {\n return [transformedArray.x, transformedArray.y, transformedArray.z].concat(coords.splice(3));\n } else {\n return [transformedArray.x, transformedArray.y, coords[2]].concat(coords.splice(3));\n }\n } else {\n return [transformedArray.x, transformedArray.y].concat(coords.splice(2));\n }\n } else {\n return [transformedArray.x, transformedArray.y];\n }\n } else {\n out = Object(_transform__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(from, to, coords);\n keys = Object.keys(coords);\n if (keys.length === 2) {\n return out;\n }\n keys.forEach(function (key) {\n if ((typeof from.name !== 'undefined' && from.name === 'geocent') || (typeof to.name !== 'undefined' && to.name === 'geocent')) {\n if (key === 'x' || key === 'y' || key === 'z') {\n return;\n }\n } else {\n if (key === 'x' || key === 'y') {\n return;\n }\n }\n out[key] = coords[key];\n });\n return out;\n }\n}\n\nfunction checkProj(item) {\n if (item instanceof _Proj__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n return item;\n }\n if (item.oProj) {\n return item.oProj;\n }\n return Object(_Proj__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(item);\n}\n\nfunction proj4(fromProj, toProj, coord) {\n fromProj = checkProj(fromProj);\n var single = false;\n var obj;\n if (typeof toProj === 'undefined') {\n toProj = fromProj;\n fromProj = wgs84;\n single = true;\n } else if (typeof toProj.x !== 'undefined' || Array.isArray(toProj)) {\n coord = toProj;\n toProj = fromProj;\n fromProj = wgs84;\n single = true;\n }\n toProj = checkProj(toProj);\n if (coord) {\n return transformer(fromProj, toProj, coord);\n } else {\n obj = {\n forward: function (coords) {\n return transformer(fromProj, toProj, coords);\n },\n inverse: function (coords) {\n return transformer(toProj, fromProj, coords);\n }\n };\n if (single) {\n obj.oProj = toProj;\n }\n return obj;\n }\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (proj4);\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/core.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/datum.js": +/*!*****************************************!*\ + !*** ./node_modules/proj4/lib/datum.js ***! + \*****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\nfunction datum(datumCode, datum_params, a, b, es, ep2, nadgrids) {\n var out = {};\n\n if (datumCode === undefined || datumCode === 'none') {\n out.datum_type = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_NODATUM\"];\n } else {\n out.datum_type = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_WGS84\"];\n }\n\n if (datum_params) {\n out.datum_params = datum_params.map(parseFloat);\n if (out.datum_params[0] !== 0 || out.datum_params[1] !== 0 || out.datum_params[2] !== 0) {\n out.datum_type = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_3PARAM\"];\n }\n if (out.datum_params.length > 3) {\n if (out.datum_params[3] !== 0 || out.datum_params[4] !== 0 || out.datum_params[5] !== 0 || out.datum_params[6] !== 0) {\n out.datum_type = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_7PARAM\"];\n out.datum_params[3] *= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SEC_TO_RAD\"];\n out.datum_params[4] *= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SEC_TO_RAD\"];\n out.datum_params[5] *= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SEC_TO_RAD\"];\n out.datum_params[6] = (out.datum_params[6] / 1000000.0) + 1.0;\n }\n }\n }\n\n if (nadgrids) {\n out.datum_type = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_GRIDSHIFT\"];\n out.grids = nadgrids;\n }\n out.a = a; //datum object also uses these values\n out.b = b;\n out.es = es;\n out.ep2 = ep2;\n return out;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (datum);\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/datum.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/datumUtils.js": +/*!**********************************************!*\ + !*** ./node_modules/proj4/lib/datumUtils.js ***! + \**********************************************/ +/*! exports provided: compareDatums, geodeticToGeocentric, geocentricToGeodetic, geocentricToWgs84, geocentricFromWgs84 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"compareDatums\", function() { return compareDatums; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"geodeticToGeocentric\", function() { return geodeticToGeocentric; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"geocentricToGeodetic\", function() { return geocentricToGeodetic; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"geocentricToWgs84\", function() { return geocentricToWgs84; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"geocentricFromWgs84\", function() { return geocentricFromWgs84; });\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\nfunction compareDatums(source, dest) {\n if (source.datum_type !== dest.datum_type) {\n return false; // false, datums are not equal\n } else if (source.a !== dest.a || Math.abs(source.es - dest.es) > 0.000000000050) {\n // the tolerance for es is to ensure that GRS80 and WGS84\n // are considered identical\n return false;\n } else if (source.datum_type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_3PARAM\"]) {\n return (source.datum_params[0] === dest.datum_params[0] && source.datum_params[1] === dest.datum_params[1] && source.datum_params[2] === dest.datum_params[2]);\n } else if (source.datum_type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_7PARAM\"]) {\n return (source.datum_params[0] === dest.datum_params[0] && source.datum_params[1] === dest.datum_params[1] && source.datum_params[2] === dest.datum_params[2] && source.datum_params[3] === dest.datum_params[3] && source.datum_params[4] === dest.datum_params[4] && source.datum_params[5] === dest.datum_params[5] && source.datum_params[6] === dest.datum_params[6]);\n } else {\n return true; // datums are equal\n }\n} // cs_compare_datums()\n\n/*\n * The function Convert_Geodetic_To_Geocentric converts geodetic coordinates\n * (latitude, longitude, and height) to geocentric coordinates (X, Y, Z),\n * according to the current ellipsoid parameters.\n *\n * Latitude : Geodetic latitude in radians (input)\n * Longitude : Geodetic longitude in radians (input)\n * Height : Geodetic height, in meters (input)\n * X : Calculated Geocentric X coordinate, in meters (output)\n * Y : Calculated Geocentric Y coordinate, in meters (output)\n * Z : Calculated Geocentric Z coordinate, in meters (output)\n *\n */\nfunction geodeticToGeocentric(p, es, a) {\n var Longitude = p.x;\n var Latitude = p.y;\n var Height = p.z ? p.z : 0; //Z value not always supplied\n\n var Rn; /* Earth radius at location */\n var Sin_Lat; /* Math.sin(Latitude) */\n var Sin2_Lat; /* Square of Math.sin(Latitude) */\n var Cos_Lat; /* Math.cos(Latitude) */\n\n /*\n ** Don't blow up if Latitude is just a little out of the value\n ** range as it may just be a rounding issue. Also removed longitude\n ** test, it should be wrapped by Math.cos() and Math.sin(). NFW for PROJ.4, Sep/2001.\n */\n if (Latitude < -_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] && Latitude > -1.001 * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"]) {\n Latitude = -_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n } else if (Latitude > _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] && Latitude < 1.001 * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"]) {\n Latitude = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n } else if (Latitude < -_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"]) {\n /* Latitude out of range */\n //..reportError('geocent:lat out of range:' + Latitude);\n return { x: -Infinity, y: -Infinity, z: p.z };\n } else if (Latitude > _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"]) {\n /* Latitude out of range */\n return { x: Infinity, y: Infinity, z: p.z };\n }\n\n if (Longitude > Math.PI) {\n Longitude -= (2 * Math.PI);\n }\n Sin_Lat = Math.sin(Latitude);\n Cos_Lat = Math.cos(Latitude);\n Sin2_Lat = Sin_Lat * Sin_Lat;\n Rn = a / (Math.sqrt(1.0e0 - es * Sin2_Lat));\n return {\n x: (Rn + Height) * Cos_Lat * Math.cos(Longitude),\n y: (Rn + Height) * Cos_Lat * Math.sin(Longitude),\n z: ((Rn * (1 - es)) + Height) * Sin_Lat\n };\n} // cs_geodetic_to_geocentric()\n\nfunction geocentricToGeodetic(p, es, a, b) {\n /* local defintions and variables */\n /* end-criterium of loop, accuracy of sin(Latitude) */\n var genau = 1e-12;\n var genau2 = (genau * genau);\n var maxiter = 30;\n\n var P; /* distance between semi-minor axis and location */\n var RR; /* distance between center and location */\n var CT; /* sin of geocentric latitude */\n var ST; /* cos of geocentric latitude */\n var RX;\n var RK;\n var RN; /* Earth radius at location */\n var CPHI0; /* cos of start or old geodetic latitude in iterations */\n var SPHI0; /* sin of start or old geodetic latitude in iterations */\n var CPHI; /* cos of searched geodetic latitude */\n var SPHI; /* sin of searched geodetic latitude */\n var SDPHI; /* end-criterium: addition-theorem of sin(Latitude(iter)-Latitude(iter-1)) */\n var iter; /* # of continous iteration, max. 30 is always enough (s.a.) */\n\n var X = p.x;\n var Y = p.y;\n var Z = p.z ? p.z : 0.0; //Z value not always supplied\n var Longitude;\n var Latitude;\n var Height;\n\n P = Math.sqrt(X * X + Y * Y);\n RR = Math.sqrt(X * X + Y * Y + Z * Z);\n\n /* special cases for latitude and longitude */\n if (P / a < genau) {\n\n /* special case, if P=0. (X=0., Y=0.) */\n Longitude = 0.0;\n\n /* if (X,Y,Z)=(0.,0.,0.) then Height becomes semi-minor axis\n * of ellipsoid (=center of mass), Latitude becomes PI/2 */\n if (RR / a < genau) {\n Latitude = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n Height = -b;\n return {\n x: p.x,\n y: p.y,\n z: p.z\n };\n }\n } else {\n /* ellipsoidal (geodetic) longitude\n * interval: -PI < Longitude <= +PI */\n Longitude = Math.atan2(Y, X);\n }\n\n /* --------------------------------------------------------------\n * Following iterative algorithm was developped by\n * \"Institut for Erdmessung\", University of Hannover, July 1988.\n * Internet: www.ife.uni-hannover.de\n * Iterative computation of CPHI,SPHI and Height.\n * Iteration of CPHI and SPHI to 10**-12 radian resp.\n * 2*10**-7 arcsec.\n * --------------------------------------------------------------\n */\n CT = Z / RR;\n ST = P / RR;\n RX = 1.0 / Math.sqrt(1.0 - es * (2.0 - es) * ST * ST);\n CPHI0 = ST * (1.0 - es) * RX;\n SPHI0 = CT * RX;\n iter = 0;\n\n /* loop to find sin(Latitude) resp. Latitude\n * until |sin(Latitude(iter)-Latitude(iter-1))| < genau */\n do {\n iter++;\n RN = a / Math.sqrt(1.0 - es * SPHI0 * SPHI0);\n\n /* ellipsoidal (geodetic) height */\n Height = P * CPHI0 + Z * SPHI0 - RN * (1.0 - es * SPHI0 * SPHI0);\n\n RK = es * RN / (RN + Height);\n RX = 1.0 / Math.sqrt(1.0 - RK * (2.0 - RK) * ST * ST);\n CPHI = ST * (1.0 - RK) * RX;\n SPHI = CT * RX;\n SDPHI = SPHI * CPHI0 - CPHI * SPHI0;\n CPHI0 = CPHI;\n SPHI0 = SPHI;\n }\n while (SDPHI * SDPHI > genau2 && iter < maxiter);\n\n /* ellipsoidal (geodetic) latitude */\n Latitude = Math.atan(SPHI / Math.abs(CPHI));\n return {\n x: Longitude,\n y: Latitude,\n z: Height\n };\n} // cs_geocentric_to_geodetic()\n\n/****************************************************************/\n// pj_geocentic_to_wgs84( p )\n// p = point to transform in geocentric coordinates (x,y,z)\n\n\n/** point object, nothing fancy, just allows values to be\n passed back and forth by reference rather than by value.\n Other point classes may be used as long as they have\n x and y properties, which will get modified in the transform method.\n*/\nfunction geocentricToWgs84(p, datum_type, datum_params) {\n\n if (datum_type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_3PARAM\"]) {\n // if( x[io] === HUGE_VAL )\n // continue;\n return {\n x: p.x + datum_params[0],\n y: p.y + datum_params[1],\n z: p.z + datum_params[2],\n };\n } else if (datum_type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_7PARAM\"]) {\n var Dx_BF = datum_params[0];\n var Dy_BF = datum_params[1];\n var Dz_BF = datum_params[2];\n var Rx_BF = datum_params[3];\n var Ry_BF = datum_params[4];\n var Rz_BF = datum_params[5];\n var M_BF = datum_params[6];\n // if( x[io] === HUGE_VAL )\n // continue;\n return {\n x: M_BF * (p.x - Rz_BF * p.y + Ry_BF * p.z) + Dx_BF,\n y: M_BF * (Rz_BF * p.x + p.y - Rx_BF * p.z) + Dy_BF,\n z: M_BF * (-Ry_BF * p.x + Rx_BF * p.y + p.z) + Dz_BF\n };\n }\n} // cs_geocentric_to_wgs84\n\n/****************************************************************/\n// pj_geocentic_from_wgs84()\n// coordinate system definition,\n// point to transform in geocentric coordinates (x,y,z)\nfunction geocentricFromWgs84(p, datum_type, datum_params) {\n\n if (datum_type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_3PARAM\"]) {\n //if( x[io] === HUGE_VAL )\n // continue;\n return {\n x: p.x - datum_params[0],\n y: p.y - datum_params[1],\n z: p.z - datum_params[2],\n };\n\n } else if (datum_type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_7PARAM\"]) {\n var Dx_BF = datum_params[0];\n var Dy_BF = datum_params[1];\n var Dz_BF = datum_params[2];\n var Rx_BF = datum_params[3];\n var Ry_BF = datum_params[4];\n var Rz_BF = datum_params[5];\n var M_BF = datum_params[6];\n var x_tmp = (p.x - Dx_BF) / M_BF;\n var y_tmp = (p.y - Dy_BF) / M_BF;\n var z_tmp = (p.z - Dz_BF) / M_BF;\n //if( x[io] === HUGE_VAL )\n // continue;\n\n return {\n x: x_tmp + Rz_BF * y_tmp - Ry_BF * z_tmp,\n y: -Rz_BF * x_tmp + y_tmp + Rx_BF * z_tmp,\n z: Ry_BF * x_tmp - Rx_BF * y_tmp + z_tmp\n };\n } //cs_geocentric_from_wgs84()\n}\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/datumUtils.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/datum_transform.js": +/*!***************************************************!*\ + !*** ./node_modules/proj4/lib/datum_transform.js ***! + \***************************************************/ +/*! exports provided: default, applyGridShift */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyGridShift\", function() { return applyGridShift; });\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n/* harmony import */ var _datumUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./datumUtils */ \"./node_modules/proj4/lib/datumUtils.js\");\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n\n\n\n\nfunction checkParams(type) {\n return (type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_3PARAM\"] || type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_7PARAM\"]);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(source, dest, point) {\n // Short cut if the datums are identical.\n if (Object(_datumUtils__WEBPACK_IMPORTED_MODULE_1__[\"compareDatums\"])(source, dest)) {\n return point; // in this case, zero is sucess,\n // whereas cs_compare_datums returns 1 to indicate TRUE\n // confusing, should fix this\n }\n\n // Explicitly skip datum transform by setting 'datum=none' as parameter for either source or dest\n if (source.datum_type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_NODATUM\"] || dest.datum_type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_NODATUM\"]) {\n return point;\n }\n\n // If this datum requires grid shifts, then apply it to geodetic coordinates.\n var source_a = source.a;\n var source_es = source.es;\n if (source.datum_type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_GRIDSHIFT\"]) {\n var gridShiftCode = applyGridShift(source, false, point);\n if (gridShiftCode !== 0) {\n return undefined;\n }\n source_a = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SRS_WGS84_SEMIMAJOR\"];\n source_es = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SRS_WGS84_ESQUARED\"];\n }\n\n var dest_a = dest.a;\n var dest_b = dest.b;\n var dest_es = dest.es;\n if (dest.datum_type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_GRIDSHIFT\"]) {\n dest_a = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SRS_WGS84_SEMIMAJOR\"];\n dest_b = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SRS_WGS84_SEMIMINOR\"];\n dest_es = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SRS_WGS84_ESQUARED\"];\n }\n\n // Do we need to go through geocentric coordinates?\n if (source_es === dest_es && source_a === dest_a && !checkParams(source.datum_type) && !checkParams(dest.datum_type)) {\n return point;\n }\n\n // Convert to geocentric coordinates.\n point = Object(_datumUtils__WEBPACK_IMPORTED_MODULE_1__[\"geodeticToGeocentric\"])(point, source_es, source_a);\n // Convert between datums\n if (checkParams(source.datum_type)) {\n point = Object(_datumUtils__WEBPACK_IMPORTED_MODULE_1__[\"geocentricToWgs84\"])(point, source.datum_type, source.datum_params);\n }\n if (checkParams(dest.datum_type)) {\n point = Object(_datumUtils__WEBPACK_IMPORTED_MODULE_1__[\"geocentricFromWgs84\"])(point, dest.datum_type, dest.datum_params);\n }\n point = Object(_datumUtils__WEBPACK_IMPORTED_MODULE_1__[\"geocentricToGeodetic\"])(point, dest_es, dest_a, dest_b);\n\n if (dest.datum_type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_GRIDSHIFT\"]) {\n var destGridShiftResult = applyGridShift(dest, true, point);\n if (destGridShiftResult !== 0) {\n return undefined;\n }\n }\n\n return point;\n});\n\nfunction applyGridShift(source, inverse, point) {\n if (source.grids === null || source.grids.length === 0) {\n console.log('Grid shift grids not found');\n return -1;\n }\n var input = {x: -point.x, y: point.y};\n var output = {x: Number.NaN, y: Number.NaN};\n var onlyMandatoryGrids = false;\n var attemptedGrids = [];\n for (var i = 0; i < source.grids.length; i++) {\n var grid = source.grids[i];\n attemptedGrids.push(grid.name);\n if (grid.isNull) {\n output = input;\n break;\n }\n onlyMandatoryGrids = grid.mandatory;\n if (grid.grid === null) {\n if (grid.mandatory) {\n console.log(\"Unable to find mandatory grid '\" + grid.name + \"'\");\n return -1;\n }\n continue;\n }\n var subgrid = grid.grid.subgrids[0];\n // skip tables that don't match our point at all\n var epsilon = (Math.abs(subgrid.del[1]) + Math.abs(subgrid.del[0])) / 10000.0;\n var minX = subgrid.ll[0] - epsilon;\n var minY = subgrid.ll[1] - epsilon;\n var maxX = subgrid.ll[0] + (subgrid.lim[0] - 1) * subgrid.del[0] + epsilon;\n var maxY = subgrid.ll[1] + (subgrid.lim[1] - 1) * subgrid.del[1] + epsilon;\n if (minY > input.y || minX > input.x || maxY < input.y || maxX < input.x ) {\n continue;\n }\n output = applySubgridShift(input, inverse, subgrid);\n if (!isNaN(output.x)) {\n break;\n }\n }\n if (isNaN(output.x)) {\n console.log(\"Failed to find a grid shift table for location '\"+\n -input.x * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"R2D\"] + \" \" + input.y * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"R2D\"] + \" tried: '\" + attemptedGrids + \"'\");\n return -1;\n }\n point.x = -output.x;\n point.y = output.y;\n return 0;\n}\n\nfunction applySubgridShift(pin, inverse, ct) {\n var val = {x: Number.NaN, y: Number.NaN};\n if (isNaN(pin.x)) { return val; }\n var tb = {x: pin.x, y: pin.y};\n tb.x -= ct.ll[0];\n tb.y -= ct.ll[1];\n tb.x = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(tb.x - Math.PI) + Math.PI;\n var t = nadInterpolate(tb, ct);\n if (inverse) {\n if (isNaN(t.x)) {\n return val;\n }\n t.x = tb.x - t.x;\n t.y = tb.y - t.y;\n var i = 9, tol = 1e-12;\n var dif, del;\n do {\n del = nadInterpolate(t, ct);\n if (isNaN(del.x)) {\n console.log(\"Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.\");\n break;\n }\n dif = {x: tb.x - (del.x + t.x), y: tb.y - (del.y + t.y)};\n t.x += dif.x;\n t.y += dif.y;\n } while (i-- && Math.abs(dif.x) > tol && Math.abs(dif.y) > tol);\n if (i < 0) {\n console.log(\"Inverse grid shift iterator failed to converge.\");\n return val;\n }\n val.x = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(t.x + ct.ll[0]);\n val.y = t.y + ct.ll[1];\n } else {\n if (!isNaN(t.x)) {\n val.x = pin.x + t.x;\n val.y = pin.y + t.y;\n }\n }\n return val;\n}\n\nfunction nadInterpolate(pin, ct) {\n var t = {x: pin.x / ct.del[0], y: pin.y / ct.del[1]};\n var indx = {x: Math.floor(t.x), y: Math.floor(t.y)};\n var frct = {x: t.x - 1.0 * indx.x, y: t.y - 1.0 * indx.y};\n var val= {x: Number.NaN, y: Number.NaN};\n var inx;\n if (indx.x < 0 || indx.x >= ct.lim[0]) {\n return val;\n }\n if (indx.y < 0 || indx.y >= ct.lim[1]) {\n return val;\n }\n inx = (indx.y * ct.lim[0]) + indx.x;\n var f00 = {x: ct.cvs[inx][0], y: ct.cvs[inx][1]};\n inx++;\n var f10= {x: ct.cvs[inx][0], y: ct.cvs[inx][1]};\n inx += ct.lim[0];\n var f11 = {x: ct.cvs[inx][0], y: ct.cvs[inx][1]};\n inx--;\n var f01 = {x: ct.cvs[inx][0], y: ct.cvs[inx][1]};\n var m11 = frct.x * frct.y, m10 = frct.x * (1.0 - frct.y),\n m00 = (1.0 - frct.x) * (1.0 - frct.y), m01 = (1.0 - frct.x) * frct.y;\n val.x = (m00 * f00.x + m10 * f10.x + m01 * f01.x + m11 * f11.x);\n val.y = (m00 * f00.y + m10 * f10.y + m01 * f01.y + m11 * f11.y);\n return val;\n}\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/datum_transform.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/defs.js": +/*!****************************************!*\ + !*** ./node_modules/proj4/lib/defs.js ***! + \****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./global */ \"./node_modules/proj4/lib/global.js\");\n/* harmony import */ var _projString__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./projString */ \"./node_modules/proj4/lib/projString.js\");\n/* harmony import */ var wkt_parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! wkt-parser */ \"./node_modules/wkt-parser/index.js\");\n\n\n\n\nfunction defs(name) {\n /*global console*/\n var that = this;\n if (arguments.length === 2) {\n var def = arguments[1];\n if (typeof def === 'string') {\n if (def.charAt(0) === '+') {\n defs[name] = Object(_projString__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arguments[1]);\n }\n else {\n defs[name] = Object(wkt_parser__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(arguments[1]);\n }\n } else {\n defs[name] = def;\n }\n }\n else if (arguments.length === 1) {\n if (Array.isArray(name)) {\n return name.map(function(v) {\n if (Array.isArray(v)) {\n defs.apply(that, v);\n }\n else {\n defs(v);\n }\n });\n }\n else if (typeof name === 'string') {\n if (name in defs) {\n return defs[name];\n }\n }\n else if ('EPSG' in name) {\n defs['EPSG:' + name.EPSG] = name;\n }\n else if ('ESRI' in name) {\n defs['ESRI:' + name.ESRI] = name;\n }\n else if ('IAU2000' in name) {\n defs['IAU2000:' + name.IAU2000] = name;\n }\n else {\n console.log(name);\n }\n return;\n }\n\n\n}\nObject(_global__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(defs);\n/* harmony default export */ __webpack_exports__[\"default\"] = (defs);\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/defs.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/deriveConstants.js": +/*!***************************************************!*\ + !*** ./node_modules/proj4/lib/deriveConstants.js ***! + \***************************************************/ +/*! exports provided: eccentricity, sphere */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"eccentricity\", function() { return eccentricity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sphere\", function() { return sphere; });\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n/* harmony import */ var _constants_Ellipsoid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants/Ellipsoid */ \"./node_modules/proj4/lib/constants/Ellipsoid.js\");\n/* harmony import */ var _match__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./match */ \"./node_modules/proj4/lib/match.js\");\n\n\n\n\nfunction eccentricity(a, b, rf, R_A) {\n var a2 = a * a; // used in geocentric\n var b2 = b * b; // used in geocentric\n var es = (a2 - b2) / a2; // e ^ 2\n var e = 0;\n if (R_A) {\n a *= 1 - es * (_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SIXTH\"] + es * (_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"RA4\"] + es * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"RA6\"]));\n a2 = a * a;\n es = 0;\n } else {\n e = Math.sqrt(es); // eccentricity\n }\n var ep2 = (a2 - b2) / b2; // used in geocentric\n return {\n es: es,\n e: e,\n ep2: ep2\n };\n}\nfunction sphere(a, b, rf, ellps, sphere) {\n if (!a) { // do we have an ellipsoid?\n var ellipse = Object(_match__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_constants_Ellipsoid__WEBPACK_IMPORTED_MODULE_1__[\"default\"], ellps);\n if (!ellipse) {\n ellipse = _constants_Ellipsoid__WEBPACK_IMPORTED_MODULE_1__[\"WGS84\"];\n }\n a = ellipse.a;\n b = ellipse.b;\n rf = ellipse.rf;\n }\n\n if (rf && !b) {\n b = (1.0 - 1.0 / rf) * a;\n }\n if (rf === 0 || Math.abs(a - b) < _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n sphere = true;\n b = a;\n }\n return {\n a: a,\n b: b,\n rf: rf,\n sphere: sphere\n };\n}\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/deriveConstants.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/extend.js": +/*!******************************************!*\ + !*** ./node_modules/proj4/lib/extend.js ***! + \******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(destination, source) {\n destination = destination || {};\n var value, property;\n if (!source) {\n return destination;\n }\n for (property in source) {\n value = source[property];\n if (value !== undefined) {\n destination[property] = value;\n }\n }\n return destination;\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/extend.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/global.js": +/*!******************************************!*\ + !*** ./node_modules/proj4/lib/global.js ***! + \******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(defs) {\n defs('EPSG:4326', \"+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees\");\n defs('EPSG:4269', \"+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees\");\n defs('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\");\n\n defs.WGS84 = defs['EPSG:4326'];\n defs['EPSG:3785'] = defs['EPSG:3857']; // maintain backward compat, official code is 3857\n defs.GOOGLE = defs['EPSG:3857'];\n defs['EPSG:900913'] = defs['EPSG:3857'];\n defs['EPSG:102113'] = defs['EPSG:3857'];\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/global.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/index.js": +/*!*****************************************!*\ + !*** ./node_modules/proj4/lib/index.js ***! + \*****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core */ \"./node_modules/proj4/lib/core.js\");\n/* harmony import */ var _Proj__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Proj */ \"./node_modules/proj4/lib/Proj.js\");\n/* harmony import */ var _Point__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Point */ \"./node_modules/proj4/lib/Point.js\");\n/* harmony import */ var _common_toPoint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./common/toPoint */ \"./node_modules/proj4/lib/common/toPoint.js\");\n/* harmony import */ var _defs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defs */ \"./node_modules/proj4/lib/defs.js\");\n/* harmony import */ var _nadgrid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nadgrid */ \"./node_modules/proj4/lib/nadgrid.js\");\n/* harmony import */ var _transform__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./transform */ \"./node_modules/proj4/lib/transform.js\");\n/* harmony import */ var mgrs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! mgrs */ \"./node_modules/mgrs/mgrs.js\");\n/* harmony import */ var _projs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../projs */ \"./node_modules/proj4/projs.js\");\n\n\n\n\n\n\n\n\n\n\n_core__WEBPACK_IMPORTED_MODULE_0__[\"default\"].defaultDatum = 'WGS84'; //default datum\n_core__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Proj = _Proj__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n_core__WEBPACK_IMPORTED_MODULE_0__[\"default\"].WGS84 = new _core__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Proj('WGS84');\n_core__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Point = _Point__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n_core__WEBPACK_IMPORTED_MODULE_0__[\"default\"].toPoint = _common_toPoint__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n_core__WEBPACK_IMPORTED_MODULE_0__[\"default\"].defs = _defs__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n_core__WEBPACK_IMPORTED_MODULE_0__[\"default\"].nadgrid = _nadgrid__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\n_core__WEBPACK_IMPORTED_MODULE_0__[\"default\"].transform = _transform__WEBPACK_IMPORTED_MODULE_6__[\"default\"];\n_core__WEBPACK_IMPORTED_MODULE_0__[\"default\"].mgrs = mgrs__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n_core__WEBPACK_IMPORTED_MODULE_0__[\"default\"].version = '__VERSION__';\nObject(_projs__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_core__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (_core__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/index.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/match.js": +/*!*****************************************!*\ + !*** ./node_modules/proj4/lib/match.js ***! + \*****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return match; });\nvar ignoredChar = /[\\s_\\-\\/\\(\\)]/g;\nfunction match(obj, key) {\n if (obj[key]) {\n return obj[key];\n }\n var keys = Object.keys(obj);\n var lkey = key.toLowerCase().replace(ignoredChar, '');\n var i = -1;\n var testkey, processedKey;\n while (++i < keys.length) {\n testkey = keys[i];\n processedKey = testkey.toLowerCase().replace(ignoredChar, '');\n if (processedKey === lkey) {\n return obj[testkey];\n }\n }\n}\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/match.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/nadgrid.js": +/*!*******************************************!*\ + !*** ./node_modules/proj4/lib/nadgrid.js ***! + \*******************************************/ +/*! exports provided: default, getNadgrids */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return nadgrid; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getNadgrids\", function() { return getNadgrids; });\n/**\n * Resources for details of NTv2 file formats:\n * - https://web.archive.org/web/20140127204822if_/http://www.mgs.gov.on.ca:80/stdprodconsume/groups/content/@mgs/@iandit/documents/resourcelist/stel02_047447.pdf\n * - http://mimaka.com/help/gs/html/004_NTV2%20Data%20Format.htm\n */\n\nvar loadedNadgrids = {};\n\n/**\n * Load a binary NTv2 file (.gsb) to a key that can be used in a proj string like +nadgrids=. Pass the NTv2 file\n * as an ArrayBuffer.\n */\nfunction nadgrid(key, data) {\n var view = new DataView(data);\n var isLittleEndian = detectLittleEndian(view);\n var header = readHeader(view, isLittleEndian);\n if (header.nSubgrids > 1) {\n console.log('Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored');\n }\n var subgrids = readSubgrids(view, header, isLittleEndian);\n var nadgrid = {header: header, subgrids: subgrids};\n loadedNadgrids[key] = nadgrid;\n return nadgrid;\n}\n\n/**\n * Given a proj4 value for nadgrids, return an array of loaded grids\n */\nfunction getNadgrids(nadgrids) {\n // Format details: http://proj.maptools.org/gen_parms.html\n if (nadgrids === undefined) { return null; }\n var grids = nadgrids.split(',');\n return grids.map(parseNadgridString);\n}\n\nfunction parseNadgridString(value) {\n if (value.length === 0) {\n return null;\n }\n var optional = value[0] === '@';\n if (optional) {\n value = value.slice(1);\n }\n if (value === 'null') {\n return {name: 'null', mandatory: !optional, grid: null, isNull: true};\n }\n return {\n name: value,\n mandatory: !optional,\n grid: loadedNadgrids[value] || null,\n isNull: false\n };\n}\n\nfunction secondsToRadians(seconds) {\n return (seconds / 3600) * Math.PI / 180;\n}\n\nfunction detectLittleEndian(view) {\n var nFields = view.getInt32(8, false);\n if (nFields === 11) {\n return false;\n }\n nFields = view.getInt32(8, true);\n if (nFields !== 11) {\n console.warn('Failed to detect nadgrid endian-ness, defaulting to little-endian');\n }\n return true;\n}\n\nfunction readHeader(view, isLittleEndian) {\n return {\n nFields: view.getInt32(8, isLittleEndian),\n nSubgridFields: view.getInt32(24, isLittleEndian),\n nSubgrids: view.getInt32(40, isLittleEndian),\n shiftType: decodeString(view, 56, 56 + 8).trim(),\n fromSemiMajorAxis: view.getFloat64(120, isLittleEndian),\n fromSemiMinorAxis: view.getFloat64(136, isLittleEndian),\n toSemiMajorAxis: view.getFloat64(152, isLittleEndian),\n toSemiMinorAxis: view.getFloat64(168, isLittleEndian),\n };\n}\n\nfunction decodeString(view, start, end) {\n return String.fromCharCode.apply(null, new Uint8Array(view.buffer.slice(start, end)));\n}\n\nfunction readSubgrids(view, header, isLittleEndian) {\n var gridOffset = 176;\n var grids = [];\n for (var i = 0; i < header.nSubgrids; i++) {\n var subHeader = readGridHeader(view, gridOffset, isLittleEndian);\n var nodes = readGridNodes(view, gridOffset, subHeader, isLittleEndian);\n var lngColumnCount = Math.round(\n 1 + (subHeader.upperLongitude - subHeader.lowerLongitude) / subHeader.longitudeInterval);\n var latColumnCount = Math.round(\n 1 + (subHeader.upperLatitude - subHeader.lowerLatitude) / subHeader.latitudeInterval);\n // Proj4 operates on radians whereas the coordinates are in seconds in the grid\n grids.push({\n ll: [secondsToRadians(subHeader.lowerLongitude), secondsToRadians(subHeader.lowerLatitude)],\n del: [secondsToRadians(subHeader.longitudeInterval), secondsToRadians(subHeader.latitudeInterval)],\n lim: [lngColumnCount, latColumnCount],\n count: subHeader.gridNodeCount,\n cvs: mapNodes(nodes)\n });\n }\n return grids;\n}\n\nfunction mapNodes(nodes) {\n return nodes.map(function (r) {return [secondsToRadians(r.longitudeShift), secondsToRadians(r.latitudeShift)];});\n}\n\nfunction readGridHeader(view, offset, isLittleEndian) {\n return {\n name: decodeString(view, offset + 8, offset + 16).trim(),\n parent: decodeString(view, offset + 24, offset + 24 + 8).trim(),\n lowerLatitude: view.getFloat64(offset + 72, isLittleEndian),\n upperLatitude: view.getFloat64(offset + 88, isLittleEndian),\n lowerLongitude: view.getFloat64(offset + 104, isLittleEndian),\n upperLongitude: view.getFloat64(offset + 120, isLittleEndian),\n latitudeInterval: view.getFloat64(offset + 136, isLittleEndian),\n longitudeInterval: view.getFloat64(offset + 152, isLittleEndian),\n gridNodeCount: view.getInt32(offset + 168, isLittleEndian)\n };\n}\n\nfunction readGridNodes(view, offset, gridHeader, isLittleEndian) {\n var nodesOffset = offset + 176;\n var gridRecordLength = 16;\n var gridShiftRecords = [];\n for (var i = 0; i < gridHeader.gridNodeCount; i++) {\n var record = {\n latitudeShift: view.getFloat32(nodesOffset + i * gridRecordLength, isLittleEndian),\n longitudeShift: view.getFloat32(nodesOffset + i * gridRecordLength + 4, isLittleEndian),\n latitudeAccuracy: view.getFloat32(nodesOffset + i * gridRecordLength + 8, isLittleEndian),\n longitudeAccuracy: view.getFloat32(nodesOffset + i * gridRecordLength + 12, isLittleEndian),\n };\n gridShiftRecords.push(record);\n }\n return gridShiftRecords;\n}\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/nadgrid.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/parseCode.js": +/*!*********************************************!*\ + !*** ./node_modules/proj4/lib/parseCode.js ***! + \*********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defs */ \"./node_modules/proj4/lib/defs.js\");\n/* harmony import */ var wkt_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! wkt-parser */ \"./node_modules/wkt-parser/index.js\");\n/* harmony import */ var _projString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./projString */ \"./node_modules/proj4/lib/projString.js\");\n/* harmony import */ var _match__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./match */ \"./node_modules/proj4/lib/match.js\");\n\n\n\n\nfunction testObj(code){\n return typeof code === 'string';\n}\nfunction testDef(code){\n return code in _defs__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n}\nvar codeWords = ['PROJECTEDCRS', 'PROJCRS', 'GEOGCS','GEOCCS','PROJCS','LOCAL_CS', 'GEODCRS', 'GEODETICCRS', 'GEODETICDATUM', 'ENGCRS', 'ENGINEERINGCRS'];\nfunction testWKT(code){\n return codeWords.some(function (word) {\n return code.indexOf(word) > -1;\n });\n}\nvar codes = ['3857', '900913', '3785', '102113'];\nfunction checkMercator(item) {\n var auth = Object(_match__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(item, 'authority');\n if (!auth) {\n return;\n }\n var code = Object(_match__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(auth, 'epsg');\n return code && codes.indexOf(code) > -1;\n}\nfunction checkProjStr(item) {\n var ext = Object(_match__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(item, 'extension');\n if (!ext) {\n return;\n }\n return Object(_match__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(ext, 'proj4');\n}\nfunction testProj(code){\n return code[0] === '+';\n}\nfunction parse(code){\n if (testObj(code)) {\n //check to see if this is a WKT string\n if (testDef(code)) {\n return _defs__WEBPACK_IMPORTED_MODULE_0__[\"default\"][code];\n }\n if (testWKT(code)) {\n var out = Object(wkt_parser__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(code);\n // test of spetial case, due to this being a very common and often malformed\n if (checkMercator(out)) {\n return _defs__WEBPACK_IMPORTED_MODULE_0__[\"default\"]['EPSG:3857'];\n }\n var maybeProjStr = checkProjStr(out);\n if (maybeProjStr) {\n return Object(_projString__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(maybeProjStr);\n }\n return out;\n }\n if (testProj(code)) {\n return Object(_projString__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(code);\n }\n }else{\n return code;\n }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (parse);\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/parseCode.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projString.js": +/*!**********************************************!*\ + !*** ./node_modules/proj4/lib/projString.js ***! + \**********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n/* harmony import */ var _constants_PrimeMeridian__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants/PrimeMeridian */ \"./node_modules/proj4/lib/constants/PrimeMeridian.js\");\n/* harmony import */ var _constants_units__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants/units */ \"./node_modules/proj4/lib/constants/units.js\");\n/* harmony import */ var _match__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./match */ \"./node_modules/proj4/lib/match.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(defData) {\n var self = {};\n var paramObj = defData.split('+').map(function(v) {\n return v.trim();\n }).filter(function(a) {\n return a;\n }).reduce(function(p, a) {\n var split = a.split('=');\n split.push(true);\n p[split[0].toLowerCase()] = split[1];\n return p;\n }, {});\n var paramName, paramVal, paramOutname;\n var params = {\n proj: 'projName',\n datum: 'datumCode',\n rf: function(v) {\n self.rf = parseFloat(v);\n },\n lat_0: function(v) {\n self.lat0 = v * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"D2R\"];\n },\n lat_1: function(v) {\n self.lat1 = v * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"D2R\"];\n },\n lat_2: function(v) {\n self.lat2 = v * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"D2R\"];\n },\n lat_ts: function(v) {\n self.lat_ts = v * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"D2R\"];\n },\n lon_0: function(v) {\n self.long0 = v * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"D2R\"];\n },\n lon_1: function(v) {\n self.long1 = v * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"D2R\"];\n },\n lon_2: function(v) {\n self.long2 = v * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"D2R\"];\n },\n alpha: function(v) {\n self.alpha = parseFloat(v) * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"D2R\"];\n },\n lonc: function(v) {\n self.longc = v * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"D2R\"];\n },\n x_0: function(v) {\n self.x0 = parseFloat(v);\n },\n y_0: function(v) {\n self.y0 = parseFloat(v);\n },\n k_0: function(v) {\n self.k0 = parseFloat(v);\n },\n k: function(v) {\n self.k0 = parseFloat(v);\n },\n a: function(v) {\n self.a = parseFloat(v);\n },\n b: function(v) {\n self.b = parseFloat(v);\n },\n r_a: function() {\n self.R_A = true;\n },\n zone: function(v) {\n self.zone = parseInt(v, 10);\n },\n south: function() {\n self.utmSouth = true;\n },\n towgs84: function(v) {\n self.datum_params = v.split(\",\").map(function(a) {\n return parseFloat(a);\n });\n },\n to_meter: function(v) {\n self.to_meter = parseFloat(v);\n },\n units: function(v) {\n self.units = v;\n var unit = Object(_match__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_constants_units__WEBPACK_IMPORTED_MODULE_2__[\"default\"], v);\n if (unit) {\n self.to_meter = unit.to_meter;\n }\n },\n from_greenwich: function(v) {\n self.from_greenwich = v * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"D2R\"];\n },\n pm: function(v) {\n var pm = Object(_match__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_constants_PrimeMeridian__WEBPACK_IMPORTED_MODULE_1__[\"default\"], v);\n self.from_greenwich = (pm ? pm : parseFloat(v)) * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"D2R\"];\n },\n nadgrids: function(v) {\n if (v === '@null') {\n self.datumCode = 'none';\n }\n else {\n self.nadgrids = v;\n }\n },\n axis: function(v) {\n var legalAxis = \"ewnsud\";\n if (v.length === 3 && legalAxis.indexOf(v.substr(0, 1)) !== -1 && legalAxis.indexOf(v.substr(1, 1)) !== -1 && legalAxis.indexOf(v.substr(2, 1)) !== -1) {\n self.axis = v;\n }\n },\n approx: function() {\n self.approx = true;\n }\n };\n for (paramName in paramObj) {\n paramVal = paramObj[paramName];\n if (paramName in params) {\n paramOutname = params[paramName];\n if (typeof paramOutname === 'function') {\n paramOutname(paramVal);\n }\n else {\n self[paramOutname] = paramVal;\n }\n }\n else {\n self[paramName] = paramVal;\n }\n }\n if(typeof self.datumCode === 'string' && self.datumCode !== \"WGS84\"){\n self.datumCode = self.datumCode.toLowerCase();\n }\n return self;\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projString.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections.js": +/*!***********************************************!*\ + !*** ./node_modules/proj4/lib/projections.js ***! + \***********************************************/ +/*! exports provided: add, get, start, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"add\", function() { return add; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"get\", function() { return get; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"start\", function() { return start; });\n/* harmony import */ var _projections_merc__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./projections/merc */ \"./node_modules/proj4/lib/projections/merc.js\");\n/* harmony import */ var _projections_longlat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./projections/longlat */ \"./node_modules/proj4/lib/projections/longlat.js\");\n\n\nvar projs = [_projections_merc__WEBPACK_IMPORTED_MODULE_0__[\"default\"], _projections_longlat__WEBPACK_IMPORTED_MODULE_1__[\"default\"]];\nvar names = {};\nvar projStore = [];\n\nfunction add(proj, i) {\n var len = projStore.length;\n if (!proj.names) {\n console.log(i);\n return true;\n }\n projStore[len] = proj;\n proj.names.forEach(function(n) {\n names[n.toLowerCase()] = len;\n });\n return this;\n}\n\n\n\nfunction get(name) {\n if (!name) {\n return false;\n }\n var n = name.toLowerCase();\n if (typeof names[n] !== 'undefined' && projStore[names[n]]) {\n return projStore[names[n]];\n }\n}\n\nfunction start() {\n projs.forEach(add);\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n start: start,\n add: add,\n get: get\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/aea.js": +/*!***************************************************!*\ + !*** ./node_modules/proj4/lib/projections/aea.js ***! + \***************************************************/ +/*! exports provided: init, forward, inverse, phi1z, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"phi1z\", function() { return phi1z; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_msfnz__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/msfnz */ \"./node_modules/proj4/lib/common/msfnz.js\");\n/* harmony import */ var _common_qsfnz__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/qsfnz */ \"./node_modules/proj4/lib/common/qsfnz.js\");\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _common_asinz__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/asinz */ \"./node_modules/proj4/lib/common/asinz.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\n\n\n\n\nfunction init() {\n\n if (Math.abs(this.lat1 + this.lat2) < _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"EPSLN\"]) {\n return;\n }\n this.temp = this.b / this.a;\n this.es = 1 - Math.pow(this.temp, 2);\n this.e3 = Math.sqrt(this.es);\n\n this.sin_po = Math.sin(this.lat1);\n this.cos_po = Math.cos(this.lat1);\n this.t1 = this.sin_po;\n this.con = this.sin_po;\n this.ms1 = Object(_common_msfnz__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.e3, this.sin_po, this.cos_po);\n this.qs1 = Object(_common_qsfnz__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.e3, this.sin_po, this.cos_po);\n\n this.sin_po = Math.sin(this.lat2);\n this.cos_po = Math.cos(this.lat2);\n this.t2 = this.sin_po;\n this.ms2 = Object(_common_msfnz__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.e3, this.sin_po, this.cos_po);\n this.qs2 = Object(_common_qsfnz__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.e3, this.sin_po, this.cos_po);\n\n this.sin_po = Math.sin(this.lat0);\n this.cos_po = Math.cos(this.lat0);\n this.t3 = this.sin_po;\n this.qs0 = Object(_common_qsfnz__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.e3, this.sin_po, this.cos_po);\n\n if (Math.abs(this.lat1 - this.lat2) > _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"EPSLN\"]) {\n this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1);\n }\n else {\n this.ns0 = this.con;\n }\n this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1;\n this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0;\n}\n\n/* Albers Conical Equal Area forward equations--mapping lat,long to x,y\n -------------------------------------------------------------------*/\nfunction forward(p) {\n\n var lon = p.x;\n var lat = p.y;\n\n this.sin_phi = Math.sin(lat);\n this.cos_phi = Math.cos(lat);\n\n var qs = Object(_common_qsfnz__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.e3, this.sin_phi, this.cos_phi);\n var rh1 = this.a * Math.sqrt(this.c - this.ns0 * qs) / this.ns0;\n var theta = this.ns0 * Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lon - this.long0);\n var x = rh1 * Math.sin(theta) + this.x0;\n var y = this.rh - rh1 * Math.cos(theta) + this.y0;\n\n p.x = x;\n p.y = y;\n return p;\n}\n\nfunction inverse(p) {\n var rh1, qs, con, theta, lon, lat;\n\n p.x -= this.x0;\n p.y = this.rh - p.y + this.y0;\n if (this.ns0 >= 0) {\n rh1 = Math.sqrt(p.x * p.x + p.y * p.y);\n con = 1;\n }\n else {\n rh1 = -Math.sqrt(p.x * p.x + p.y * p.y);\n con = -1;\n }\n theta = 0;\n if (rh1 !== 0) {\n theta = Math.atan2(con * p.x, con * p.y);\n }\n con = rh1 * this.ns0 / this.a;\n if (this.sphere) {\n lat = Math.asin((this.c - con * con) / (2 * this.ns0));\n }\n else {\n qs = (this.c - con * con) / this.ns0;\n lat = this.phi1z(this.e3, qs);\n }\n\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(theta / this.ns0 + this.long0);\n p.x = lon;\n p.y = lat;\n return p;\n}\n\n/* Function to compute phi1, the latitude for the inverse of the\n Albers Conical Equal-Area projection.\n-------------------------------------------*/\nfunction phi1z(eccent, qs) {\n var sinphi, cosphi, con, com, dphi;\n var phi = Object(_common_asinz__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(0.5 * qs);\n if (eccent < _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"EPSLN\"]) {\n return phi;\n }\n\n var eccnts = eccent * eccent;\n for (var i = 1; i <= 25; i++) {\n sinphi = Math.sin(phi);\n cosphi = Math.cos(phi);\n con = eccent * sinphi;\n com = 1 - con * con;\n dphi = 0.5 * com * com / cosphi * (qs / (1 - eccnts) - sinphi / com + 0.5 / eccent * Math.log((1 - con) / (1 + con)));\n phi = phi + dphi;\n if (Math.abs(dphi) <= 1e-7) {\n return phi;\n }\n }\n return null;\n}\n\nvar names = [\"Albers_Conic_Equal_Area\", \"Albers\", \"aea\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names,\n phi1z: phi1z\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/aea.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/aeqd.js": +/*!****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/aeqd.js ***! + \****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n/* harmony import */ var _common_mlfn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/mlfn */ \"./node_modules/proj4/lib/common/mlfn.js\");\n/* harmony import */ var _common_e0fn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/e0fn */ \"./node_modules/proj4/lib/common/e0fn.js\");\n/* harmony import */ var _common_e1fn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/e1fn */ \"./node_modules/proj4/lib/common/e1fn.js\");\n/* harmony import */ var _common_e2fn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/e2fn */ \"./node_modules/proj4/lib/common/e2fn.js\");\n/* harmony import */ var _common_e3fn__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/e3fn */ \"./node_modules/proj4/lib/common/e3fn.js\");\n/* harmony import */ var _common_gN__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/gN */ \"./node_modules/proj4/lib/common/gN.js\");\n/* harmony import */ var _common_asinz__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/asinz */ \"./node_modules/proj4/lib/common/asinz.js\");\n/* harmony import */ var _common_imlfn__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../common/imlfn */ \"./node_modules/proj4/lib/common/imlfn.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction init() {\n this.sin_p12 = Math.sin(this.lat0);\n this.cos_p12 = Math.cos(this.lat0);\n}\n\nfunction forward(p) {\n var lon = p.x;\n var lat = p.y;\n var sinphi = Math.sin(p.y);\n var cosphi = Math.cos(p.y);\n var dlon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(lon - this.long0);\n var e0, e1, e2, e3, Mlp, Ml, tanphi, Nl1, Nl, psi, Az, G, H, GH, Hs, c, kp, cos_c, s, s2, s3, s4, s5;\n if (this.sphere) {\n if (Math.abs(this.sin_p12 - 1) <= _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"]) {\n //North Pole case\n p.x = this.x0 + this.a * (_constants_values__WEBPACK_IMPORTED_MODULE_1__[\"HALF_PI\"] - lat) * Math.sin(dlon);\n p.y = this.y0 - this.a * (_constants_values__WEBPACK_IMPORTED_MODULE_1__[\"HALF_PI\"] - lat) * Math.cos(dlon);\n return p;\n }\n else if (Math.abs(this.sin_p12 + 1) <= _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"]) {\n //South Pole case\n p.x = this.x0 + this.a * (_constants_values__WEBPACK_IMPORTED_MODULE_1__[\"HALF_PI\"] + lat) * Math.sin(dlon);\n p.y = this.y0 + this.a * (_constants_values__WEBPACK_IMPORTED_MODULE_1__[\"HALF_PI\"] + lat) * Math.cos(dlon);\n return p;\n }\n else {\n //default case\n cos_c = this.sin_p12 * sinphi + this.cos_p12 * cosphi * Math.cos(dlon);\n c = Math.acos(cos_c);\n kp = c ? c / Math.sin(c) : 1;\n p.x = this.x0 + this.a * kp * cosphi * Math.sin(dlon);\n p.y = this.y0 + this.a * kp * (this.cos_p12 * sinphi - this.sin_p12 * cosphi * Math.cos(dlon));\n return p;\n }\n }\n else {\n e0 = Object(_common_e0fn__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this.es);\n e1 = Object(_common_e1fn__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.es);\n e2 = Object(_common_e2fn__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this.es);\n e3 = Object(_common_e3fn__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(this.es);\n if (Math.abs(this.sin_p12 - 1) <= _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"]) {\n //North Pole case\n Mlp = this.a * Object(_common_mlfn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(e0, e1, e2, e3, _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"HALF_PI\"]);\n Ml = this.a * Object(_common_mlfn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(e0, e1, e2, e3, lat);\n p.x = this.x0 + (Mlp - Ml) * Math.sin(dlon);\n p.y = this.y0 - (Mlp - Ml) * Math.cos(dlon);\n return p;\n }\n else if (Math.abs(this.sin_p12 + 1) <= _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"]) {\n //South Pole case\n Mlp = this.a * Object(_common_mlfn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(e0, e1, e2, e3, _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"HALF_PI\"]);\n Ml = this.a * Object(_common_mlfn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(e0, e1, e2, e3, lat);\n p.x = this.x0 + (Mlp + Ml) * Math.sin(dlon);\n p.y = this.y0 + (Mlp + Ml) * Math.cos(dlon);\n return p;\n }\n else {\n //Default case\n tanphi = sinphi / cosphi;\n Nl1 = Object(_common_gN__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(this.a, this.e, this.sin_p12);\n Nl = Object(_common_gN__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(this.a, this.e, sinphi);\n psi = Math.atan((1 - this.es) * tanphi + this.es * Nl1 * this.sin_p12 / (Nl * cosphi));\n Az = Math.atan2(Math.sin(dlon), this.cos_p12 * Math.tan(psi) - this.sin_p12 * Math.cos(dlon));\n if (Az === 0) {\n s = Math.asin(this.cos_p12 * Math.sin(psi) - this.sin_p12 * Math.cos(psi));\n }\n else if (Math.abs(Math.abs(Az) - Math.PI) <= _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"]) {\n s = -Math.asin(this.cos_p12 * Math.sin(psi) - this.sin_p12 * Math.cos(psi));\n }\n else {\n s = Math.asin(Math.sin(dlon) * Math.cos(psi) / Math.sin(Az));\n }\n G = this.e * this.sin_p12 / Math.sqrt(1 - this.es);\n H = this.e * this.cos_p12 * Math.cos(Az) / Math.sqrt(1 - this.es);\n GH = G * H;\n Hs = H * H;\n s2 = s * s;\n s3 = s2 * s;\n s4 = s3 * s;\n s5 = s4 * s;\n c = Nl1 * s * (1 - s2 * Hs * (1 - Hs) / 6 + s3 / 8 * GH * (1 - 2 * Hs) + s4 / 120 * (Hs * (4 - 7 * Hs) - 3 * G * G * (1 - 7 * Hs)) - s5 / 48 * GH);\n p.x = this.x0 + c * Math.sin(Az);\n p.y = this.y0 + c * Math.cos(Az);\n return p;\n }\n }\n\n\n}\n\nfunction inverse(p) {\n p.x -= this.x0;\n p.y -= this.y0;\n var rh, z, sinz, cosz, lon, lat, con, e0, e1, e2, e3, Mlp, M, N1, psi, Az, cosAz, tmp, A, B, D, Ee, F, sinpsi;\n if (this.sphere) {\n rh = Math.sqrt(p.x * p.x + p.y * p.y);\n if (rh > (2 * _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"HALF_PI\"] * this.a)) {\n return;\n }\n z = rh / this.a;\n\n sinz = Math.sin(z);\n cosz = Math.cos(z);\n\n lon = this.long0;\n if (Math.abs(rh) <= _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"]) {\n lat = this.lat0;\n }\n else {\n lat = Object(_common_asinz__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(cosz * this.sin_p12 + (p.y * sinz * this.cos_p12) / rh);\n con = Math.abs(this.lat0) - _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"HALF_PI\"];\n if (Math.abs(con) <= _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"]) {\n if (this.lat0 >= 0) {\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 + Math.atan2(p.x, - p.y));\n }\n else {\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 - Math.atan2(-p.x, p.y));\n }\n }\n else {\n /*con = cosz - this.sin_p12 * Math.sin(lat);\n if ((Math.abs(con) < EPSLN) && (Math.abs(p.x) < EPSLN)) {\n //no-op, just keep the lon value as is\n } else {\n var temp = Math.atan2((p.x * sinz * this.cos_p12), (con * rh));\n lon = adjust_lon(this.long0 + Math.atan2((p.x * sinz * this.cos_p12), (con * rh)));\n }*/\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 + Math.atan2(p.x * sinz, rh * this.cos_p12 * cosz - p.y * this.sin_p12 * sinz));\n }\n }\n\n p.x = lon;\n p.y = lat;\n return p;\n }\n else {\n e0 = Object(_common_e0fn__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this.es);\n e1 = Object(_common_e1fn__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.es);\n e2 = Object(_common_e2fn__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this.es);\n e3 = Object(_common_e3fn__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(this.es);\n if (Math.abs(this.sin_p12 - 1) <= _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"]) {\n //North pole case\n Mlp = this.a * Object(_common_mlfn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(e0, e1, e2, e3, _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"HALF_PI\"]);\n rh = Math.sqrt(p.x * p.x + p.y * p.y);\n M = Mlp - rh;\n lat = Object(_common_imlfn__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(M / this.a, e0, e1, e2, e3);\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 + Math.atan2(p.x, - 1 * p.y));\n p.x = lon;\n p.y = lat;\n return p;\n }\n else if (Math.abs(this.sin_p12 + 1) <= _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"]) {\n //South pole case\n Mlp = this.a * Object(_common_mlfn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(e0, e1, e2, e3, _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"HALF_PI\"]);\n rh = Math.sqrt(p.x * p.x + p.y * p.y);\n M = rh - Mlp;\n\n lat = Object(_common_imlfn__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(M / this.a, e0, e1, e2, e3);\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 + Math.atan2(p.x, p.y));\n p.x = lon;\n p.y = lat;\n return p;\n }\n else {\n //default case\n rh = Math.sqrt(p.x * p.x + p.y * p.y);\n Az = Math.atan2(p.x, p.y);\n N1 = Object(_common_gN__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(this.a, this.e, this.sin_p12);\n cosAz = Math.cos(Az);\n tmp = this.e * this.cos_p12 * cosAz;\n A = -tmp * tmp / (1 - this.es);\n B = 3 * this.es * (1 - A) * this.sin_p12 * this.cos_p12 * cosAz / (1 - this.es);\n D = rh / N1;\n Ee = D - A * (1 + A) * Math.pow(D, 3) / 6 - B * (1 + 3 * A) * Math.pow(D, 4) / 24;\n F = 1 - A * Ee * Ee / 2 - D * Ee * Ee * Ee / 6;\n psi = Math.asin(this.sin_p12 * Math.cos(Ee) + this.cos_p12 * Math.sin(Ee) * cosAz);\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 + Math.asin(Math.sin(Az) * Math.sin(Ee) / Math.cos(psi)));\n sinpsi = Math.sin(psi);\n lat = Math.atan2((sinpsi - this.es * F * this.sin_p12) * Math.tan(psi), sinpsi * (1 - this.es));\n p.x = lon;\n p.y = lat;\n return p;\n }\n }\n\n}\n\nvar names = [\"Azimuthal_Equidistant\", \"aeqd\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/aeqd.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/cass.js": +/*!****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/cass.js ***! + \****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_mlfn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/mlfn */ \"./node_modules/proj4/lib/common/mlfn.js\");\n/* harmony import */ var _common_e0fn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/e0fn */ \"./node_modules/proj4/lib/common/e0fn.js\");\n/* harmony import */ var _common_e1fn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/e1fn */ \"./node_modules/proj4/lib/common/e1fn.js\");\n/* harmony import */ var _common_e2fn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/e2fn */ \"./node_modules/proj4/lib/common/e2fn.js\");\n/* harmony import */ var _common_e3fn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/e3fn */ \"./node_modules/proj4/lib/common/e3fn.js\");\n/* harmony import */ var _common_gN__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/gN */ \"./node_modules/proj4/lib/common/gN.js\");\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _common_adjust_lat__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/adjust_lat */ \"./node_modules/proj4/lib/common/adjust_lat.js\");\n/* harmony import */ var _common_imlfn__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/imlfn */ \"./node_modules/proj4/lib/common/imlfn.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\n\n\n\n\n\n\n\n\n\nfunction init() {\n if (!this.sphere) {\n this.e0 = Object(_common_e0fn__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.es);\n this.e1 = Object(_common_e1fn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.es);\n this.e2 = Object(_common_e2fn__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this.es);\n this.e3 = Object(_common_e3fn__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.es);\n this.ml0 = this.a * Object(_common_mlfn__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.e0, this.e1, this.e2, this.e3, this.lat0);\n }\n}\n\n/* Cassini forward equations--mapping lat,long to x,y\n -----------------------------------------------------------------------*/\nfunction forward(p) {\n\n /* Forward equations\n -----------------*/\n var x, y;\n var lam = p.x;\n var phi = p.y;\n lam = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(lam - this.long0);\n\n if (this.sphere) {\n x = this.a * Math.asin(Math.cos(phi) * Math.sin(lam));\n y = this.a * (Math.atan2(Math.tan(phi), Math.cos(lam)) - this.lat0);\n }\n else {\n //ellipsoid\n var sinphi = Math.sin(phi);\n var cosphi = Math.cos(phi);\n var nl = Object(_common_gN__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this.a, this.e, sinphi);\n var tl = Math.tan(phi) * Math.tan(phi);\n var al = lam * Math.cos(phi);\n var asq = al * al;\n var cl = this.es * cosphi * cosphi / (1 - this.es);\n var ml = this.a * Object(_common_mlfn__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.e0, this.e1, this.e2, this.e3, phi);\n\n x = nl * al * (1 - asq * tl * (1 / 6 - (8 - tl + 8 * cl) * asq / 120));\n y = ml - this.ml0 + nl * sinphi / cosphi * asq * (0.5 + (5 - tl + 6 * cl) * asq / 24);\n\n\n }\n\n p.x = x + this.x0;\n p.y = y + this.y0;\n return p;\n}\n\n/* Inverse equations\n -----------------*/\nfunction inverse(p) {\n p.x -= this.x0;\n p.y -= this.y0;\n var x = p.x / this.a;\n var y = p.y / this.a;\n var phi, lam;\n\n if (this.sphere) {\n var dd = y + this.lat0;\n phi = Math.asin(Math.sin(dd) * Math.cos(x));\n lam = Math.atan2(Math.tan(x), Math.cos(dd));\n }\n else {\n /* ellipsoid */\n var ml1 = this.ml0 / this.a + y;\n var phi1 = Object(_common_imlfn__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(ml1, this.e0, this.e1, this.e2, this.e3);\n if (Math.abs(Math.abs(phi1) - _constants_values__WEBPACK_IMPORTED_MODULE_9__[\"HALF_PI\"]) <= _constants_values__WEBPACK_IMPORTED_MODULE_9__[\"EPSLN\"]) {\n p.x = this.long0;\n p.y = _constants_values__WEBPACK_IMPORTED_MODULE_9__[\"HALF_PI\"];\n if (y < 0) {\n p.y *= -1;\n }\n return p;\n }\n var nl1 = Object(_common_gN__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this.a, this.e, Math.sin(phi1));\n\n var rl1 = nl1 * nl1 * nl1 / this.a / this.a * (1 - this.es);\n var tl1 = Math.pow(Math.tan(phi1), 2);\n var dl = x * this.a / nl1;\n var dsq = dl * dl;\n phi = phi1 - nl1 * Math.tan(phi1) / rl1 * dl * dl * (0.5 - (1 + 3 * tl1) * dl * dl / 24);\n lam = dl * (1 - dsq * (tl1 / 3 + (1 + 3 * tl1) * tl1 * dsq / 15)) / Math.cos(phi1);\n\n }\n\n p.x = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(lam + this.long0);\n p.y = Object(_common_adjust_lat__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(phi);\n return p;\n\n}\n\nvar names = [\"Cassini\", \"Cassini_Soldner\", \"cass\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/cass.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/cea.js": +/*!***************************************************!*\ + !*** ./node_modules/proj4/lib/projections/cea.js ***! + \***************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _common_qsfnz__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/qsfnz */ \"./node_modules/proj4/lib/common/qsfnz.js\");\n/* harmony import */ var _common_msfnz__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/msfnz */ \"./node_modules/proj4/lib/common/msfnz.js\");\n/* harmony import */ var _common_iqsfnz__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/iqsfnz */ \"./node_modules/proj4/lib/common/iqsfnz.js\");\n\n\n\n\n\n/*\n reference:\n \"Cartographic Projection Procedures for the UNIX Environment-\n A User's Manual\" by Gerald I. Evenden,\n USGS Open File Report 90-284and Release 4 Interim Reports (2003)\n*/\nfunction init() {\n //no-op\n if (!this.sphere) {\n this.k0 = Object(_common_msfnz__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts));\n }\n}\n\n/* Cylindrical Equal Area forward equations--mapping lat,long to x,y\n ------------------------------------------------------------*/\nfunction forward(p) {\n var lon = p.x;\n var lat = p.y;\n var x, y;\n /* Forward equations\n -----------------*/\n var dlon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(lon - this.long0);\n if (this.sphere) {\n x = this.x0 + this.a * dlon * Math.cos(this.lat_ts);\n y = this.y0 + this.a * Math.sin(lat) / Math.cos(this.lat_ts);\n }\n else {\n var qs = Object(_common_qsfnz__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.e, Math.sin(lat));\n x = this.x0 + this.a * this.k0 * dlon;\n y = this.y0 + this.a * qs * 0.5 / this.k0;\n }\n\n p.x = x;\n p.y = y;\n return p;\n}\n\n/* Cylindrical Equal Area inverse equations--mapping x,y to lat/long\n ------------------------------------------------------------*/\nfunction inverse(p) {\n p.x -= this.x0;\n p.y -= this.y0;\n var lon, lat;\n\n if (this.sphere) {\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 + (p.x / this.a) / Math.cos(this.lat_ts));\n lat = Math.asin((p.y / this.a) * Math.cos(this.lat_ts));\n }\n else {\n lat = Object(_common_iqsfnz__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this.e, 2 * p.y * this.k0 / this.a);\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 + p.x / (this.a * this.k0));\n }\n\n p.x = lon;\n p.y = lat;\n return p;\n}\n\nvar names = [\"cea\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/cea.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/eqc.js": +/*!***************************************************!*\ + !*** ./node_modules/proj4/lib/projections/eqc.js ***! + \***************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _common_adjust_lat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/adjust_lat */ \"./node_modules/proj4/lib/common/adjust_lat.js\");\n\n\n\nfunction init() {\n\n this.x0 = this.x0 || 0;\n this.y0 = this.y0 || 0;\n this.lat0 = this.lat0 || 0;\n this.long0 = this.long0 || 0;\n this.lat_ts = this.lat_ts || 0;\n this.title = this.title || \"Equidistant Cylindrical (Plate Carre)\";\n\n this.rc = Math.cos(this.lat_ts);\n}\n\n// forward equations--mapping lat,long to x,y\n// -----------------------------------------------------------------\nfunction forward(p) {\n\n var lon = p.x;\n var lat = p.y;\n\n var dlon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(lon - this.long0);\n var dlat = Object(_common_adjust_lat__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(lat - this.lat0);\n p.x = this.x0 + (this.a * dlon * this.rc);\n p.y = this.y0 + (this.a * dlat);\n return p;\n}\n\n// inverse equations--mapping x,y to lat/long\n// -----------------------------------------------------------------\nfunction inverse(p) {\n\n var x = p.x;\n var y = p.y;\n\n p.x = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 + ((x - this.x0) / (this.a * this.rc)));\n p.y = Object(_common_adjust_lat__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.lat0 + ((y - this.y0) / (this.a)));\n return p;\n}\n\nvar names = [\"Equirectangular\", \"Equidistant_Cylindrical\", \"eqc\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/eqc.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/eqdc.js": +/*!****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/eqdc.js ***! + \****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_e0fn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/e0fn */ \"./node_modules/proj4/lib/common/e0fn.js\");\n/* harmony import */ var _common_e1fn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/e1fn */ \"./node_modules/proj4/lib/common/e1fn.js\");\n/* harmony import */ var _common_e2fn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/e2fn */ \"./node_modules/proj4/lib/common/e2fn.js\");\n/* harmony import */ var _common_e3fn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/e3fn */ \"./node_modules/proj4/lib/common/e3fn.js\");\n/* harmony import */ var _common_msfnz__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/msfnz */ \"./node_modules/proj4/lib/common/msfnz.js\");\n/* harmony import */ var _common_mlfn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/mlfn */ \"./node_modules/proj4/lib/common/mlfn.js\");\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _common_adjust_lat__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/adjust_lat */ \"./node_modules/proj4/lib/common/adjust_lat.js\");\n/* harmony import */ var _common_imlfn__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/imlfn */ \"./node_modules/proj4/lib/common/imlfn.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\n\n\n\n\n\n\n\n\n\nfunction init() {\n\n /* Place parameters in static storage for common use\n -------------------------------------------------*/\n // Standard Parallels cannot be equal and on opposite sides of the equator\n if (Math.abs(this.lat1 + this.lat2) < _constants_values__WEBPACK_IMPORTED_MODULE_9__[\"EPSLN\"]) {\n return;\n }\n this.lat2 = this.lat2 || this.lat1;\n this.temp = this.b / this.a;\n this.es = 1 - Math.pow(this.temp, 2);\n this.e = Math.sqrt(this.es);\n this.e0 = Object(_common_e0fn__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.es);\n this.e1 = Object(_common_e1fn__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.es);\n this.e2 = Object(_common_e2fn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.es);\n this.e3 = Object(_common_e3fn__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this.es);\n\n this.sinphi = Math.sin(this.lat1);\n this.cosphi = Math.cos(this.lat1);\n\n this.ms1 = Object(_common_msfnz__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.e, this.sinphi, this.cosphi);\n this.ml1 = Object(_common_mlfn__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this.e0, this.e1, this.e2, this.e3, this.lat1);\n\n if (Math.abs(this.lat1 - this.lat2) < _constants_values__WEBPACK_IMPORTED_MODULE_9__[\"EPSLN\"]) {\n this.ns = this.sinphi;\n }\n else {\n this.sinphi = Math.sin(this.lat2);\n this.cosphi = Math.cos(this.lat2);\n this.ms2 = Object(_common_msfnz__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.e, this.sinphi, this.cosphi);\n this.ml2 = Object(_common_mlfn__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this.e0, this.e1, this.e2, this.e3, this.lat2);\n this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1);\n }\n this.g = this.ml1 + this.ms1 / this.ns;\n this.ml0 = Object(_common_mlfn__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this.e0, this.e1, this.e2, this.e3, this.lat0);\n this.rh = this.a * (this.g - this.ml0);\n}\n\n/* Equidistant Conic forward equations--mapping lat,long to x,y\n -----------------------------------------------------------*/\nfunction forward(p) {\n var lon = p.x;\n var lat = p.y;\n var rh1;\n\n /* Forward equations\n -----------------*/\n if (this.sphere) {\n rh1 = this.a * (this.g - lat);\n }\n else {\n var ml = Object(_common_mlfn__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this.e0, this.e1, this.e2, this.e3, lat);\n rh1 = this.a * (this.g - ml);\n }\n var theta = this.ns * Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(lon - this.long0);\n var x = this.x0 + rh1 * Math.sin(theta);\n var y = this.y0 + this.rh - rh1 * Math.cos(theta);\n p.x = x;\n p.y = y;\n return p;\n}\n\n/* Inverse equations\n -----------------*/\nfunction inverse(p) {\n p.x -= this.x0;\n p.y = this.rh - p.y + this.y0;\n var con, rh1, lat, lon;\n if (this.ns >= 0) {\n rh1 = Math.sqrt(p.x * p.x + p.y * p.y);\n con = 1;\n }\n else {\n rh1 = -Math.sqrt(p.x * p.x + p.y * p.y);\n con = -1;\n }\n var theta = 0;\n if (rh1 !== 0) {\n theta = Math.atan2(con * p.x, con * p.y);\n }\n\n if (this.sphere) {\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(this.long0 + theta / this.ns);\n lat = Object(_common_adjust_lat__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(this.g - rh1 / this.a);\n p.x = lon;\n p.y = lat;\n return p;\n }\n else {\n var ml = this.g - rh1 / this.a;\n lat = Object(_common_imlfn__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(ml, this.e0, this.e1, this.e2, this.e3);\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(this.long0 + theta / this.ns);\n p.x = lon;\n p.y = lat;\n return p;\n }\n\n}\n\nvar names = [\"Equidistant_Conic\", \"eqdc\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/eqdc.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/etmerc.js": +/*!******************************************************!*\ + !*** ./node_modules/proj4/lib/projections/etmerc.js ***! + \******************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _projections_tmerc__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../projections/tmerc */ \"./node_modules/proj4/lib/projections/tmerc.js\");\n/* harmony import */ var _common_sinh__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/sinh */ \"./node_modules/proj4/lib/common/sinh.js\");\n/* harmony import */ var _common_hypot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/hypot */ \"./node_modules/proj4/lib/common/hypot.js\");\n/* harmony import */ var _common_asinhy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/asinhy */ \"./node_modules/proj4/lib/common/asinhy.js\");\n/* harmony import */ var _common_gatg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/gatg */ \"./node_modules/proj4/lib/common/gatg.js\");\n/* harmony import */ var _common_clens__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/clens */ \"./node_modules/proj4/lib/common/clens.js\");\n/* harmony import */ var _common_clens_cmplx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/clens_cmplx */ \"./node_modules/proj4/lib/common/clens_cmplx.js\");\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n// Heavily based on this etmerc projection implementation\n// https://github.com/mbloch/mapshaper-proj/blob/master/src/projections/etmerc.js\n\n\n\n\n\n\n\n\n\n\nfunction init() {\n if (!this.approx && (isNaN(this.es) || this.es <= 0)) {\n throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION[\"Fast_Transverse_Mercator\"] in the WKT.');\n }\n if (this.approx) {\n // When '+approx' is set, use tmerc instead\n _projections_tmerc__WEBPACK_IMPORTED_MODULE_0__[\"default\"].init.apply(this);\n this.forward = _projections_tmerc__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forward;\n this.inverse = _projections_tmerc__WEBPACK_IMPORTED_MODULE_0__[\"default\"].inverse;\n }\n\n this.x0 = this.x0 !== undefined ? this.x0 : 0;\n this.y0 = this.y0 !== undefined ? this.y0 : 0;\n this.long0 = this.long0 !== undefined ? this.long0 : 0;\n this.lat0 = this.lat0 !== undefined ? this.lat0 : 0;\n\n this.cgb = [];\n this.cbg = [];\n this.utg = [];\n this.gtu = [];\n\n var f = this.es / (1 + Math.sqrt(1 - this.es));\n var n = f / (2 - f);\n var np = n;\n\n this.cgb[0] = n * (2 + n * (-2 / 3 + n * (-2 + n * (116 / 45 + n * (26 / 45 + n * (-2854 / 675 ))))));\n this.cbg[0] = n * (-2 + n * ( 2 / 3 + n * ( 4 / 3 + n * (-82 / 45 + n * (32 / 45 + n * (4642 / 4725))))));\n\n np = np * n;\n this.cgb[1] = np * (7 / 3 + n * (-8 / 5 + n * (-227 / 45 + n * (2704 / 315 + n * (2323 / 945)))));\n this.cbg[1] = np * (5 / 3 + n * (-16 / 15 + n * ( -13 / 9 + n * (904 / 315 + n * (-1522 / 945)))));\n\n np = np * n;\n this.cgb[2] = np * (56 / 15 + n * (-136 / 35 + n * (-1262 / 105 + n * (73814 / 2835))));\n this.cbg[2] = np * (-26 / 15 + n * (34 / 21 + n * (8 / 5 + n * (-12686 / 2835))));\n\n np = np * n;\n this.cgb[3] = np * (4279 / 630 + n * (-332 / 35 + n * (-399572 / 14175)));\n this.cbg[3] = np * (1237 / 630 + n * (-12 / 5 + n * ( -24832 / 14175)));\n\n np = np * n;\n this.cgb[4] = np * (4174 / 315 + n * (-144838 / 6237));\n this.cbg[4] = np * (-734 / 315 + n * (109598 / 31185));\n\n np = np * n;\n this.cgb[5] = np * (601676 / 22275);\n this.cbg[5] = np * (444337 / 155925);\n\n np = Math.pow(n, 2);\n this.Qn = this.k0 / (1 + n) * (1 + np * (1 / 4 + np * (1 / 64 + np / 256)));\n\n this.utg[0] = n * (-0.5 + n * ( 2 / 3 + n * (-37 / 96 + n * ( 1 / 360 + n * (81 / 512 + n * (-96199 / 604800))))));\n this.gtu[0] = n * (0.5 + n * (-2 / 3 + n * (5 / 16 + n * (41 / 180 + n * (-127 / 288 + n * (7891 / 37800))))));\n\n this.utg[1] = np * (-1 / 48 + n * (-1 / 15 + n * (437 / 1440 + n * (-46 / 105 + n * (1118711 / 3870720)))));\n this.gtu[1] = np * (13 / 48 + n * (-3 / 5 + n * (557 / 1440 + n * (281 / 630 + n * (-1983433 / 1935360)))));\n\n np = np * n;\n this.utg[2] = np * (-17 / 480 + n * (37 / 840 + n * (209 / 4480 + n * (-5569 / 90720 ))));\n this.gtu[2] = np * (61 / 240 + n * (-103 / 140 + n * (15061 / 26880 + n * (167603 / 181440))));\n\n np = np * n;\n this.utg[3] = np * (-4397 / 161280 + n * (11 / 504 + n * (830251 / 7257600)));\n this.gtu[3] = np * (49561 / 161280 + n * (-179 / 168 + n * (6601661 / 7257600)));\n\n np = np * n;\n this.utg[4] = np * (-4583 / 161280 + n * (108847 / 3991680));\n this.gtu[4] = np * (34729 / 80640 + n * (-3418889 / 1995840));\n\n np = np * n;\n this.utg[5] = np * (-20648693 / 638668800);\n this.gtu[5] = np * (212378941 / 319334400);\n\n var Z = Object(_common_gatg__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.cbg, this.lat0);\n this.Zb = -this.Qn * (Z + Object(_common_clens__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this.gtu, 2 * Z));\n}\n\nfunction forward(p) {\n var Ce = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(p.x - this.long0);\n var Cn = p.y;\n\n Cn = Object(_common_gatg__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.cbg, Cn);\n var sin_Cn = Math.sin(Cn);\n var cos_Cn = Math.cos(Cn);\n var sin_Ce = Math.sin(Ce);\n var cos_Ce = Math.cos(Ce);\n\n Cn = Math.atan2(sin_Cn, cos_Ce * cos_Cn);\n Ce = Math.atan2(sin_Ce * cos_Cn, Object(_common_hypot__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(sin_Cn, cos_Cn * cos_Ce));\n Ce = Object(_common_asinhy__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Math.tan(Ce));\n\n var tmp = Object(_common_clens_cmplx__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(this.gtu, 2 * Cn, 2 * Ce);\n\n Cn = Cn + tmp[0];\n Ce = Ce + tmp[1];\n\n var x;\n var y;\n\n if (Math.abs(Ce) <= 2.623395162778) {\n x = this.a * (this.Qn * Ce) + this.x0;\n y = this.a * (this.Qn * Cn + this.Zb) + this.y0;\n }\n else {\n x = Infinity;\n y = Infinity;\n }\n\n p.x = x;\n p.y = y;\n\n return p;\n}\n\nfunction inverse(p) {\n var Ce = (p.x - this.x0) * (1 / this.a);\n var Cn = (p.y - this.y0) * (1 / this.a);\n\n Cn = (Cn - this.Zb) / this.Qn;\n Ce = Ce / this.Qn;\n\n var lon;\n var lat;\n\n if (Math.abs(Ce) <= 2.623395162778) {\n var tmp = Object(_common_clens_cmplx__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(this.utg, 2 * Cn, 2 * Ce);\n\n Cn = Cn + tmp[0];\n Ce = Ce + tmp[1];\n Ce = Math.atan(Object(_common_sinh__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Ce));\n\n var sin_Cn = Math.sin(Cn);\n var cos_Cn = Math.cos(Cn);\n var sin_Ce = Math.sin(Ce);\n var cos_Ce = Math.cos(Ce);\n\n Cn = Math.atan2(sin_Cn * cos_Ce, Object(_common_hypot__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(sin_Ce, cos_Ce * cos_Cn));\n Ce = Math.atan2(sin_Ce, cos_Ce * cos_Cn);\n\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(Ce + this.long0);\n lat = Object(_common_gatg__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.cgb, Cn);\n }\n else {\n lon = Infinity;\n lat = Infinity;\n }\n\n p.x = lon;\n p.y = lat;\n\n return p;\n}\n\nvar names = [\"Extended_Transverse_Mercator\", \"Extended Transverse Mercator\", \"etmerc\", \"Transverse_Mercator\", \"Transverse Mercator\", \"tmerc\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/etmerc.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/gauss.js": +/*!*****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/gauss.js ***! + \*****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_srat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/srat */ \"./node_modules/proj4/lib/common/srat.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\nvar MAX_ITER = 20;\n\n\nfunction init() {\n var sphi = Math.sin(this.lat0);\n var cphi = Math.cos(this.lat0);\n cphi *= cphi;\n this.rc = Math.sqrt(1 - this.es) / (1 - this.es * sphi * sphi);\n this.C = Math.sqrt(1 + this.es * cphi * cphi / (1 - this.es));\n this.phic0 = Math.asin(sphi / this.C);\n this.ratexp = 0.5 * this.C * this.e;\n this.K = Math.tan(0.5 * this.phic0 + _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"FORTPI\"]) / (Math.pow(Math.tan(0.5 * this.lat0 + _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"FORTPI\"]), this.C) * Object(_common_srat__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.e * sphi, this.ratexp));\n}\n\nfunction forward(p) {\n var lon = p.x;\n var lat = p.y;\n\n p.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * lat + _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"FORTPI\"]), this.C) * Object(_common_srat__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.e * Math.sin(lat), this.ratexp)) - _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"HALF_PI\"];\n p.x = this.C * lon;\n return p;\n}\n\nfunction inverse(p) {\n var DEL_TOL = 1e-14;\n var lon = p.x / this.C;\n var lat = p.y;\n var num = Math.pow(Math.tan(0.5 * lat + _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"FORTPI\"]) / this.K, 1 / this.C);\n for (var i = MAX_ITER; i > 0; --i) {\n lat = 2 * Math.atan(num * Object(_common_srat__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.e * Math.sin(p.y), - 0.5 * this.e)) - _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"HALF_PI\"];\n if (Math.abs(lat - p.y) < DEL_TOL) {\n break;\n }\n p.y = lat;\n }\n /* convergence failed */\n if (!i) {\n return null;\n }\n p.x = lon;\n p.y = lat;\n return p;\n}\n\nvar names = [\"gauss\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/gauss.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/geocent.js": +/*!*******************************************************!*\ + !*** ./node_modules/proj4/lib/projections/geocent.js ***! + \*******************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _datumUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../datumUtils */ \"./node_modules/proj4/lib/datumUtils.js\");\n\n\nfunction init() {\n this.name = 'geocent';\n\n}\n\nfunction forward(p) {\n var point = Object(_datumUtils__WEBPACK_IMPORTED_MODULE_0__[\"geodeticToGeocentric\"])(p, this.es, this.a);\n return point;\n}\n\nfunction inverse(p) {\n var point = Object(_datumUtils__WEBPACK_IMPORTED_MODULE_0__[\"geocentricToGeodetic\"])(p, this.es, this.a, this.b);\n return point;\n}\n\nvar names = [\"Geocentric\", 'geocentric', \"geocent\", \"Geocent\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/geocent.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/gnom.js": +/*!****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/gnom.js ***! + \****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _common_asinz__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/asinz */ \"./node_modules/proj4/lib/common/asinz.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\n\n\n/*\n reference:\n Wolfram Mathworld \"Gnomonic Projection\"\n http://mathworld.wolfram.com/GnomonicProjection.html\n Accessed: 12th November 2009\n */\nfunction init() {\n\n /* Place parameters in static storage for common use\n -------------------------------------------------*/\n this.sin_p14 = Math.sin(this.lat0);\n this.cos_p14 = Math.cos(this.lat0);\n // Approximation for projecting points to the horizon (infinity)\n this.infinity_dist = 1000 * this.a;\n this.rc = 1;\n}\n\n/* Gnomonic forward equations--mapping lat,long to x,y\n ---------------------------------------------------*/\nfunction forward(p) {\n var sinphi, cosphi; /* sin and cos value */\n var dlon; /* delta longitude value */\n var coslon; /* cos of longitude */\n var ksp; /* scale factor */\n var g;\n var x, y;\n var lon = p.x;\n var lat = p.y;\n /* Forward equations\n -----------------*/\n dlon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(lon - this.long0);\n\n sinphi = Math.sin(lat);\n cosphi = Math.cos(lat);\n\n coslon = Math.cos(dlon);\n g = this.sin_p14 * sinphi + this.cos_p14 * cosphi * coslon;\n ksp = 1;\n if ((g > 0) || (Math.abs(g) <= _constants_values__WEBPACK_IMPORTED_MODULE_2__[\"EPSLN\"])) {\n x = this.x0 + this.a * ksp * cosphi * Math.sin(dlon) / g;\n y = this.y0 + this.a * ksp * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon) / g;\n }\n else {\n\n // Point is in the opposing hemisphere and is unprojectable\n // We still need to return a reasonable point, so we project\n // to infinity, on a bearing\n // equivalent to the northern hemisphere equivalent\n // This is a reasonable approximation for short shapes and lines that\n // straddle the horizon.\n\n x = this.x0 + this.infinity_dist * cosphi * Math.sin(dlon);\n y = this.y0 + this.infinity_dist * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon);\n\n }\n p.x = x;\n p.y = y;\n return p;\n}\n\nfunction inverse(p) {\n var rh; /* Rho */\n var sinc, cosc;\n var c;\n var lon, lat;\n\n /* Inverse equations\n -----------------*/\n p.x = (p.x - this.x0) / this.a;\n p.y = (p.y - this.y0) / this.a;\n\n p.x /= this.k0;\n p.y /= this.k0;\n\n if ((rh = Math.sqrt(p.x * p.x + p.y * p.y))) {\n c = Math.atan2(rh, this.rc);\n sinc = Math.sin(c);\n cosc = Math.cos(c);\n\n lat = Object(_common_asinz__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(cosc * this.sin_p14 + (p.y * sinc * this.cos_p14) / rh);\n lon = Math.atan2(p.x * sinc, rh * this.cos_p14 * cosc - p.y * this.sin_p14 * sinc);\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 + lon);\n }\n else {\n lat = this.phic0;\n lon = 0;\n }\n\n p.x = lon;\n p.y = lat;\n return p;\n}\n\nvar names = [\"gnom\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/gnom.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/krovak.js": +/*!******************************************************!*\ + !*** ./node_modules/proj4/lib/projections/krovak.js ***! + \******************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n\n\nfunction init() {\n this.a = 6377397.155;\n this.es = 0.006674372230614;\n this.e = Math.sqrt(this.es);\n if (!this.lat0) {\n this.lat0 = 0.863937979737193;\n }\n if (!this.long0) {\n this.long0 = 0.7417649320975901 - 0.308341501185665;\n }\n /* if scale not set default to 0.9999 */\n if (!this.k0) {\n this.k0 = 0.9999;\n }\n this.s45 = 0.785398163397448; /* 45 */\n this.s90 = 2 * this.s45;\n this.fi0 = this.lat0;\n this.e2 = this.es;\n this.e = Math.sqrt(this.e2);\n this.alfa = Math.sqrt(1 + (this.e2 * Math.pow(Math.cos(this.fi0), 4)) / (1 - this.e2));\n this.uq = 1.04216856380474;\n this.u0 = Math.asin(Math.sin(this.fi0) / this.alfa);\n this.g = Math.pow((1 + this.e * Math.sin(this.fi0)) / (1 - this.e * Math.sin(this.fi0)), this.alfa * this.e / 2);\n this.k = Math.tan(this.u0 / 2 + this.s45) / Math.pow(Math.tan(this.fi0 / 2 + this.s45), this.alfa) * this.g;\n this.k1 = this.k0;\n this.n0 = this.a * Math.sqrt(1 - this.e2) / (1 - this.e2 * Math.pow(Math.sin(this.fi0), 2));\n this.s0 = 1.37008346281555;\n this.n = Math.sin(this.s0);\n this.ro0 = this.k1 * this.n0 / Math.tan(this.s0);\n this.ad = this.s90 - this.uq;\n}\n\n/* ellipsoid */\n/* calculate xy from lat/lon */\n/* Constants, identical to inverse transform function */\nfunction forward(p) {\n var gfi, u, deltav, s, d, eps, ro;\n var lon = p.x;\n var lat = p.y;\n var delta_lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(lon - this.long0);\n /* Transformation */\n gfi = Math.pow(((1 + this.e * Math.sin(lat)) / (1 - this.e * Math.sin(lat))), (this.alfa * this.e / 2));\n u = 2 * (Math.atan(this.k * Math.pow(Math.tan(lat / 2 + this.s45), this.alfa) / gfi) - this.s45);\n deltav = -delta_lon * this.alfa;\n s = Math.asin(Math.cos(this.ad) * Math.sin(u) + Math.sin(this.ad) * Math.cos(u) * Math.cos(deltav));\n d = Math.asin(Math.cos(u) * Math.sin(deltav) / Math.cos(s));\n eps = this.n * d;\n ro = this.ro0 * Math.pow(Math.tan(this.s0 / 2 + this.s45), this.n) / Math.pow(Math.tan(s / 2 + this.s45), this.n);\n p.y = ro * Math.cos(eps) / 1;\n p.x = ro * Math.sin(eps) / 1;\n\n if (!this.czech) {\n p.y *= -1;\n p.x *= -1;\n }\n return (p);\n}\n\n/* calculate lat/lon from xy */\nfunction inverse(p) {\n var u, deltav, s, d, eps, ro, fi1;\n var ok;\n\n /* Transformation */\n /* revert y, x*/\n var tmp = p.x;\n p.x = p.y;\n p.y = tmp;\n if (!this.czech) {\n p.y *= -1;\n p.x *= -1;\n }\n ro = Math.sqrt(p.x * p.x + p.y * p.y);\n eps = Math.atan2(p.y, p.x);\n d = eps / Math.sin(this.s0);\n s = 2 * (Math.atan(Math.pow(this.ro0 / ro, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45);\n u = Math.asin(Math.cos(this.ad) * Math.sin(s) - Math.sin(this.ad) * Math.cos(s) * Math.cos(d));\n deltav = Math.asin(Math.cos(s) * Math.sin(d) / Math.cos(u));\n p.x = this.long0 - deltav / this.alfa;\n fi1 = u;\n ok = 0;\n var iter = 0;\n do {\n p.y = 2 * (Math.atan(Math.pow(this.k, - 1 / this.alfa) * Math.pow(Math.tan(u / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(fi1)) / (1 - this.e * Math.sin(fi1)), this.e / 2)) - this.s45);\n if (Math.abs(fi1 - p.y) < 0.0000000001) {\n ok = 1;\n }\n fi1 = p.y;\n iter += 1;\n } while (ok === 0 && iter < 15);\n if (iter >= 15) {\n return null;\n }\n\n return (p);\n}\n\nvar names = [\"Krovak\", \"krovak\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/krovak.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/laea.js": +/*!****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/laea.js ***! + \****************************************************/ +/*! exports provided: S_POLE, N_POLE, EQUIT, OBLIQ, init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"S_POLE\", function() { return S_POLE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"N_POLE\", function() { return N_POLE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EQUIT\", function() { return EQUIT; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"OBLIQ\", function() { return OBLIQ; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n/* harmony import */ var _common_qsfnz__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/qsfnz */ \"./node_modules/proj4/lib/common/qsfnz.js\");\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n\n\n\n\n\n\n/*\n reference\n \"New Equal-Area Map Projections for Noncircular Regions\", John P. Snyder,\n The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355.\n */\n\nvar S_POLE = 1;\n\nvar N_POLE = 2;\nvar EQUIT = 3;\nvar OBLIQ = 4;\n\n/* Initialize the Lambert Azimuthal Equal Area projection\n ------------------------------------------------------*/\nfunction init() {\n var t = Math.abs(this.lat0);\n if (Math.abs(t - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"]) < _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE;\n }\n else if (Math.abs(t) < _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n this.mode = this.EQUIT;\n }\n else {\n this.mode = this.OBLIQ;\n }\n if (this.es > 0) {\n var sinphi;\n\n this.qp = Object(_common_qsfnz__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.e, 1);\n this.mmf = 0.5 / (1 - this.es);\n this.apa = authset(this.es);\n switch (this.mode) {\n case this.N_POLE:\n this.dd = 1;\n break;\n case this.S_POLE:\n this.dd = 1;\n break;\n case this.EQUIT:\n this.rq = Math.sqrt(0.5 * this.qp);\n this.dd = 1 / this.rq;\n this.xmf = 1;\n this.ymf = 0.5 * this.qp;\n break;\n case this.OBLIQ:\n this.rq = Math.sqrt(0.5 * this.qp);\n sinphi = Math.sin(this.lat0);\n this.sinb1 = Object(_common_qsfnz__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.e, sinphi) / this.qp;\n this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1);\n this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * sinphi * sinphi) * this.rq * this.cosb1);\n this.ymf = (this.xmf = this.rq) / this.dd;\n this.xmf *= this.dd;\n break;\n }\n }\n else {\n if (this.mode === this.OBLIQ) {\n this.sinph0 = Math.sin(this.lat0);\n this.cosph0 = Math.cos(this.lat0);\n }\n }\n}\n\n/* Lambert Azimuthal Equal Area forward equations--mapping lat,long to x,y\n -----------------------------------------------------------------------*/\nfunction forward(p) {\n\n /* Forward equations\n -----------------*/\n var x, y, coslam, sinlam, sinphi, q, sinb, cosb, b, cosphi;\n var lam = p.x;\n var phi = p.y;\n\n lam = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lam - this.long0);\n if (this.sphere) {\n sinphi = Math.sin(phi);\n cosphi = Math.cos(phi);\n coslam = Math.cos(lam);\n if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {\n y = (this.mode === this.EQUIT) ? 1 + cosphi * coslam : 1 + this.sinph0 * sinphi + this.cosph0 * cosphi * coslam;\n if (y <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n return null;\n }\n y = Math.sqrt(2 / y);\n x = y * cosphi * Math.sin(lam);\n y *= (this.mode === this.EQUIT) ? sinphi : this.cosph0 * sinphi - this.sinph0 * cosphi * coslam;\n }\n else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {\n if (this.mode === this.N_POLE) {\n coslam = -coslam;\n }\n if (Math.abs(phi + this.lat0) < _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n return null;\n }\n y = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"] - phi * 0.5;\n y = 2 * ((this.mode === this.S_POLE) ? Math.cos(y) : Math.sin(y));\n x = y * Math.sin(lam);\n y *= coslam;\n }\n }\n else {\n sinb = 0;\n cosb = 0;\n b = 0;\n coslam = Math.cos(lam);\n sinlam = Math.sin(lam);\n sinphi = Math.sin(phi);\n q = Object(_common_qsfnz__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.e, sinphi);\n if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {\n sinb = q / this.qp;\n cosb = Math.sqrt(1 - sinb * sinb);\n }\n switch (this.mode) {\n case this.OBLIQ:\n b = 1 + this.sinb1 * sinb + this.cosb1 * cosb * coslam;\n break;\n case this.EQUIT:\n b = 1 + cosb * coslam;\n break;\n case this.N_POLE:\n b = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] + phi;\n q = this.qp - q;\n break;\n case this.S_POLE:\n b = phi - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n q = this.qp + q;\n break;\n }\n if (Math.abs(b) < _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n return null;\n }\n switch (this.mode) {\n case this.OBLIQ:\n case this.EQUIT:\n b = Math.sqrt(2 / b);\n if (this.mode === this.OBLIQ) {\n y = this.ymf * b * (this.cosb1 * sinb - this.sinb1 * cosb * coslam);\n }\n else {\n y = (b = Math.sqrt(2 / (1 + cosb * coslam))) * sinb * this.ymf;\n }\n x = this.xmf * b * cosb * sinlam;\n break;\n case this.N_POLE:\n case this.S_POLE:\n if (q >= 0) {\n x = (b = Math.sqrt(q)) * sinlam;\n y = coslam * ((this.mode === this.S_POLE) ? b : -b);\n }\n else {\n x = y = 0;\n }\n break;\n }\n }\n\n p.x = this.a * x + this.x0;\n p.y = this.a * y + this.y0;\n return p;\n}\n\n/* Inverse equations\n -----------------*/\nfunction inverse(p) {\n p.x -= this.x0;\n p.y -= this.y0;\n var x = p.x / this.a;\n var y = p.y / this.a;\n var lam, phi, cCe, sCe, q, rho, ab;\n if (this.sphere) {\n var cosz = 0,\n rh, sinz = 0;\n\n rh = Math.sqrt(x * x + y * y);\n phi = rh * 0.5;\n if (phi > 1) {\n return null;\n }\n phi = 2 * Math.asin(phi);\n if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {\n sinz = Math.sin(phi);\n cosz = Math.cos(phi);\n }\n switch (this.mode) {\n case this.EQUIT:\n phi = (Math.abs(rh) <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) ? 0 : Math.asin(y * sinz / rh);\n x *= sinz;\n y = cosz * rh;\n break;\n case this.OBLIQ:\n phi = (Math.abs(rh) <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) ? this.lat0 : Math.asin(cosz * this.sinph0 + y * sinz * this.cosph0 / rh);\n x *= sinz * this.cosph0;\n y = (cosz - Math.sin(phi) * this.sinph0) * rh;\n break;\n case this.N_POLE:\n y = -y;\n phi = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] - phi;\n break;\n case this.S_POLE:\n phi -= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n break;\n }\n lam = (y === 0 && (this.mode === this.EQUIT || this.mode === this.OBLIQ)) ? 0 : Math.atan2(x, y);\n }\n else {\n ab = 0;\n if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {\n x /= this.dd;\n y *= this.dd;\n rho = Math.sqrt(x * x + y * y);\n if (rho < _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n p.x = this.long0;\n p.y = this.lat0;\n return p;\n }\n sCe = 2 * Math.asin(0.5 * rho / this.rq);\n cCe = Math.cos(sCe);\n x *= (sCe = Math.sin(sCe));\n if (this.mode === this.OBLIQ) {\n ab = cCe * this.sinb1 + y * sCe * this.cosb1 / rho;\n q = this.qp * ab;\n y = rho * this.cosb1 * cCe - y * this.sinb1 * sCe;\n }\n else {\n ab = y * sCe / rho;\n q = this.qp * ab;\n y = rho * cCe;\n }\n }\n else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {\n if (this.mode === this.N_POLE) {\n y = -y;\n }\n q = (x * x + y * y);\n if (!q) {\n p.x = this.long0;\n p.y = this.lat0;\n return p;\n }\n ab = 1 - q / this.qp;\n if (this.mode === this.S_POLE) {\n ab = -ab;\n }\n }\n lam = Math.atan2(x, y);\n phi = authlat(Math.asin(ab), this.apa);\n }\n\n p.x = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.long0 + lam);\n p.y = phi;\n return p;\n}\n\n/* determine latitude from authalic latitude */\nvar P00 = 0.33333333333333333333;\n\nvar P01 = 0.17222222222222222222;\nvar P02 = 0.10257936507936507936;\nvar P10 = 0.06388888888888888888;\nvar P11 = 0.06640211640211640211;\nvar P20 = 0.01641501294219154443;\n\nfunction authset(es) {\n var t;\n var APA = [];\n APA[0] = es * P00;\n t = es * es;\n APA[0] += t * P01;\n APA[1] = t * P10;\n t *= es;\n APA[0] += t * P02;\n APA[1] += t * P11;\n APA[2] = t * P20;\n return APA;\n}\n\nfunction authlat(beta, APA) {\n var t = beta + beta;\n return (beta + APA[0] * Math.sin(t) + APA[1] * Math.sin(t + t) + APA[2] * Math.sin(t + t + t));\n}\n\nvar names = [\"Lambert Azimuthal Equal Area\", \"Lambert_Azimuthal_Equal_Area\", \"laea\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names,\n S_POLE: S_POLE,\n N_POLE: N_POLE,\n EQUIT: EQUIT,\n OBLIQ: OBLIQ\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/laea.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/lcc.js": +/*!***************************************************!*\ + !*** ./node_modules/proj4/lib/projections/lcc.js ***! + \***************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_msfnz__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/msfnz */ \"./node_modules/proj4/lib/common/msfnz.js\");\n/* harmony import */ var _common_tsfnz__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/tsfnz */ \"./node_modules/proj4/lib/common/tsfnz.js\");\n/* harmony import */ var _common_sign__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/sign */ \"./node_modules/proj4/lib/common/sign.js\");\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _common_phi2z__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/phi2z */ \"./node_modules/proj4/lib/common/phi2z.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\n\n\n\n\nfunction init() {\n\n // array of: r_maj,r_min,lat1,lat2,c_lon,c_lat,false_east,false_north\n //double c_lat; /* center latitude */\n //double c_lon; /* center longitude */\n //double lat1; /* first standard parallel */\n //double lat2; /* second standard parallel */\n //double r_maj; /* major axis */\n //double r_min; /* minor axis */\n //double false_east; /* x offset in meters */\n //double false_north; /* y offset in meters */\n\n if (!this.lat2) {\n this.lat2 = this.lat1;\n } //if lat2 is not defined\n if (!this.k0) {\n this.k0 = 1;\n }\n this.x0 = this.x0 || 0;\n this.y0 = this.y0 || 0;\n // Standard Parallels cannot be equal and on opposite sides of the equator\n if (Math.abs(this.lat1 + this.lat2) < _constants_values__WEBPACK_IMPORTED_MODULE_5__[\"EPSLN\"]) {\n return;\n }\n\n var temp = this.b / this.a;\n this.e = Math.sqrt(1 - temp * temp);\n\n var sin1 = Math.sin(this.lat1);\n var cos1 = Math.cos(this.lat1);\n var ms1 = Object(_common_msfnz__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.e, sin1, cos1);\n var ts1 = Object(_common_tsfnz__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.e, this.lat1, sin1);\n\n var sin2 = Math.sin(this.lat2);\n var cos2 = Math.cos(this.lat2);\n var ms2 = Object(_common_msfnz__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.e, sin2, cos2);\n var ts2 = Object(_common_tsfnz__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.e, this.lat2, sin2);\n\n var ts0 = Object(_common_tsfnz__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.e, this.lat0, Math.sin(this.lat0));\n\n if (Math.abs(this.lat1 - this.lat2) > _constants_values__WEBPACK_IMPORTED_MODULE_5__[\"EPSLN\"]) {\n this.ns = Math.log(ms1 / ms2) / Math.log(ts1 / ts2);\n }\n else {\n this.ns = sin1;\n }\n if (isNaN(this.ns)) {\n this.ns = sin1;\n }\n this.f0 = ms1 / (this.ns * Math.pow(ts1, this.ns));\n this.rh = this.a * this.f0 * Math.pow(ts0, this.ns);\n if (!this.title) {\n this.title = \"Lambert Conformal Conic\";\n }\n}\n\n// Lambert Conformal conic forward equations--mapping lat,long to x,y\n// -----------------------------------------------------------------\nfunction forward(p) {\n\n var lon = p.x;\n var lat = p.y;\n\n // singular cases :\n if (Math.abs(2 * Math.abs(lat) - Math.PI) <= _constants_values__WEBPACK_IMPORTED_MODULE_5__[\"EPSLN\"]) {\n lat = Object(_common_sign__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lat) * (_constants_values__WEBPACK_IMPORTED_MODULE_5__[\"HALF_PI\"] - 2 * _constants_values__WEBPACK_IMPORTED_MODULE_5__[\"EPSLN\"]);\n }\n\n var con = Math.abs(Math.abs(lat) - _constants_values__WEBPACK_IMPORTED_MODULE_5__[\"HALF_PI\"]);\n var ts, rh1;\n if (con > _constants_values__WEBPACK_IMPORTED_MODULE_5__[\"EPSLN\"]) {\n ts = Object(_common_tsfnz__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.e, lat, Math.sin(lat));\n rh1 = this.a * this.f0 * Math.pow(ts, this.ns);\n }\n else {\n con = lat * this.ns;\n if (con <= 0) {\n return null;\n }\n rh1 = 0;\n }\n var theta = this.ns * Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(lon - this.long0);\n p.x = this.k0 * (rh1 * Math.sin(theta)) + this.x0;\n p.y = this.k0 * (this.rh - rh1 * Math.cos(theta)) + this.y0;\n\n return p;\n}\n\n// Lambert Conformal Conic inverse equations--mapping x,y to lat/long\n// -----------------------------------------------------------------\nfunction inverse(p) {\n\n var rh1, con, ts;\n var lat, lon;\n var x = (p.x - this.x0) / this.k0;\n var y = (this.rh - (p.y - this.y0) / this.k0);\n if (this.ns > 0) {\n rh1 = Math.sqrt(x * x + y * y);\n con = 1;\n }\n else {\n rh1 = -Math.sqrt(x * x + y * y);\n con = -1;\n }\n var theta = 0;\n if (rh1 !== 0) {\n theta = Math.atan2((con * x), (con * y));\n }\n if ((rh1 !== 0) || (this.ns > 0)) {\n con = 1 / this.ns;\n ts = Math.pow((rh1 / (this.a * this.f0)), con);\n lat = Object(_common_phi2z__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.e, ts);\n if (lat === -9999) {\n return null;\n }\n }\n else {\n lat = -_constants_values__WEBPACK_IMPORTED_MODULE_5__[\"HALF_PI\"];\n }\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(theta / this.ns + this.long0);\n\n p.x = lon;\n p.y = lat;\n return p;\n}\n\nvar names = [\"Lambert Tangential Conformal Conic Projection\", \"Lambert_Conformal_Conic\", \"Lambert_Conformal_Conic_2SP\", \"lcc\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/lcc.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/longlat.js": +/*!*******************************************************!*\ + !*** ./node_modules/proj4/lib/projections/longlat.js ***! + \*******************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return identity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return identity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\nfunction init() {\n //no-op for longlat\n}\n\nfunction identity(pt) {\n return pt;\n}\n\n\nvar names = [\"longlat\", \"identity\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: identity,\n inverse: identity,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/longlat.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/merc.js": +/*!****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/merc.js ***! + \****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_msfnz__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/msfnz */ \"./node_modules/proj4/lib/common/msfnz.js\");\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _common_tsfnz__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/tsfnz */ \"./node_modules/proj4/lib/common/tsfnz.js\");\n/* harmony import */ var _common_phi2z__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/phi2z */ \"./node_modules/proj4/lib/common/phi2z.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\n\n\n\n\nfunction init() {\n var con = this.b / this.a;\n this.es = 1 - con * con;\n if(!('x0' in this)){\n this.x0 = 0;\n }\n if(!('y0' in this)){\n this.y0 = 0;\n }\n this.e = Math.sqrt(this.es);\n if (this.lat_ts) {\n if (this.sphere) {\n this.k0 = Math.cos(this.lat_ts);\n }\n else {\n this.k0 = Object(_common_msfnz__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts));\n }\n }\n else {\n if (!this.k0) {\n if (this.k) {\n this.k0 = this.k;\n }\n else {\n this.k0 = 1;\n }\n }\n }\n}\n\n/* Mercator forward equations--mapping lat,long to x,y\n --------------------------------------------------*/\n\nfunction forward(p) {\n var lon = p.x;\n var lat = p.y;\n // convert to radians\n if (lat * _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"R2D\"] > 90 && lat * _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"R2D\"] < -90 && lon * _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"R2D\"] > 180 && lon * _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"R2D\"] < -180) {\n return null;\n }\n\n var x, y;\n if (Math.abs(Math.abs(lat) - _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"HALF_PI\"]) <= _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"EPSLN\"]) {\n return null;\n }\n else {\n if (this.sphere) {\n x = this.x0 + this.a * this.k0 * Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(lon - this.long0);\n y = this.y0 + this.a * this.k0 * Math.log(Math.tan(_constants_values__WEBPACK_IMPORTED_MODULE_4__[\"FORTPI\"] + 0.5 * lat));\n }\n else {\n var sinphi = Math.sin(lat);\n var ts = Object(_common_tsfnz__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.e, lat, sinphi);\n x = this.x0 + this.a * this.k0 * Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(lon - this.long0);\n y = this.y0 - this.a * this.k0 * Math.log(ts);\n }\n p.x = x;\n p.y = y;\n return p;\n }\n}\n\n/* Mercator inverse equations--mapping x,y to lat/long\n --------------------------------------------------*/\nfunction inverse(p) {\n\n var x = p.x - this.x0;\n var y = p.y - this.y0;\n var lon, lat;\n\n if (this.sphere) {\n lat = _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"HALF_PI\"] - 2 * Math.atan(Math.exp(-y / (this.a * this.k0)));\n }\n else {\n var ts = Math.exp(-y / (this.a * this.k0));\n lat = Object(_common_phi2z__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this.e, ts);\n if (lat === -9999) {\n return null;\n }\n }\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.long0 + x / (this.a * this.k0));\n\n p.x = lon;\n p.y = lat;\n return p;\n}\n\nvar names = [\"Mercator\", \"Popular Visualisation Pseudo Mercator\", \"Mercator_1SP\", \"Mercator_Auxiliary_Sphere\", \"merc\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/merc.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/mill.js": +/*!****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/mill.js ***! + \****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n\n\n/*\n reference\n \"New Equal-Area Map Projections for Noncircular Regions\", John P. Snyder,\n The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355.\n */\n\n\n/* Initialize the Miller Cylindrical projection\n -------------------------------------------*/\nfunction init() {\n //no-op\n}\n\n/* Miller Cylindrical forward equations--mapping lat,long to x,y\n ------------------------------------------------------------*/\nfunction forward(p) {\n var lon = p.x;\n var lat = p.y;\n /* Forward equations\n -----------------*/\n var dlon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(lon - this.long0);\n var x = this.x0 + this.a * dlon;\n var y = this.y0 + this.a * Math.log(Math.tan((Math.PI / 4) + (lat / 2.5))) * 1.25;\n\n p.x = x;\n p.y = y;\n return p;\n}\n\n/* Miller Cylindrical inverse equations--mapping x,y to lat/long\n ------------------------------------------------------------*/\nfunction inverse(p) {\n p.x -= this.x0;\n p.y -= this.y0;\n\n var lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 + p.x / this.a);\n var lat = 2.5 * (Math.atan(Math.exp(0.8 * p.y / this.a)) - Math.PI / 4);\n\n p.x = lon;\n p.y = lat;\n return p;\n}\n\nvar names = [\"Miller_Cylindrical\", \"mill\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/mill.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/moll.js": +/*!****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/moll.js ***! + \****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\nfunction init() {}\n\n/* Mollweide forward equations--mapping lat,long to x,y\n ----------------------------------------------------*/\nfunction forward(p) {\n\n /* Forward equations\n -----------------*/\n var lon = p.x;\n var lat = p.y;\n\n var delta_lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(lon - this.long0);\n var theta = lat;\n var con = Math.PI * Math.sin(lat);\n\n /* Iterate using the Newton-Raphson method to find theta\n -----------------------------------------------------*/\n while (true) {\n var delta_theta = -(theta + Math.sin(theta) - con) / (1 + Math.cos(theta));\n theta += delta_theta;\n if (Math.abs(delta_theta) < _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"]) {\n break;\n }\n }\n theta /= 2;\n\n /* If the latitude is 90 deg, force the x coordinate to be \"0 + false easting\"\n this is done here because of precision problems with \"cos(theta)\"\n --------------------------------------------------------------------------*/\n if (Math.PI / 2 - Math.abs(lat) < _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"]) {\n delta_lon = 0;\n }\n var x = 0.900316316158 * this.a * delta_lon * Math.cos(theta) + this.x0;\n var y = 1.4142135623731 * this.a * Math.sin(theta) + this.y0;\n\n p.x = x;\n p.y = y;\n return p;\n}\n\nfunction inverse(p) {\n var theta;\n var arg;\n\n /* Inverse equations\n -----------------*/\n p.x -= this.x0;\n p.y -= this.y0;\n arg = p.y / (1.4142135623731 * this.a);\n\n /* Because of division by zero problems, 'arg' can not be 1. Therefore\n a number very close to one is used instead.\n -------------------------------------------------------------------*/\n if (Math.abs(arg) > 0.999999999999) {\n arg = 0.999999999999;\n }\n theta = Math.asin(arg);\n var lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 + (p.x / (0.900316316158 * this.a * Math.cos(theta))));\n if (lon < (-Math.PI)) {\n lon = -Math.PI;\n }\n if (lon > Math.PI) {\n lon = Math.PI;\n }\n arg = (2 * theta + Math.sin(2 * theta)) / Math.PI;\n if (Math.abs(arg) > 1) {\n arg = 1;\n }\n var lat = Math.asin(arg);\n\n p.x = lon;\n p.y = lat;\n return p;\n}\n\nvar names = [\"Mollweide\", \"moll\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/moll.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/nzmg.js": +/*!****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/nzmg.js ***! + \****************************************************/ +/*! exports provided: iterations, init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"iterations\", function() { return iterations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\n/*\n reference\n Department of Land and Survey Technical Circular 1973/32\n http://www.linz.govt.nz/docs/miscellaneous/nz-map-definition.pdf\n OSG Technical Report 4.1\n http://www.linz.govt.nz/docs/miscellaneous/nzmg.pdf\n */\n\n/**\n * iterations: Number of iterations to refine inverse transform.\n * 0 -> km accuracy\n * 1 -> m accuracy -- suitable for most mapping applications\n * 2 -> mm accuracy\n */\nvar iterations = 1;\n\nfunction init() {\n this.A = [];\n this.A[1] = 0.6399175073;\n this.A[2] = -0.1358797613;\n this.A[3] = 0.063294409;\n this.A[4] = -0.02526853;\n this.A[5] = 0.0117879;\n this.A[6] = -0.0055161;\n this.A[7] = 0.0026906;\n this.A[8] = -0.001333;\n this.A[9] = 0.00067;\n this.A[10] = -0.00034;\n\n this.B_re = [];\n this.B_im = [];\n this.B_re[1] = 0.7557853228;\n this.B_im[1] = 0;\n this.B_re[2] = 0.249204646;\n this.B_im[2] = 0.003371507;\n this.B_re[3] = -0.001541739;\n this.B_im[3] = 0.041058560;\n this.B_re[4] = -0.10162907;\n this.B_im[4] = 0.01727609;\n this.B_re[5] = -0.26623489;\n this.B_im[5] = -0.36249218;\n this.B_re[6] = -0.6870983;\n this.B_im[6] = -1.1651967;\n\n this.C_re = [];\n this.C_im = [];\n this.C_re[1] = 1.3231270439;\n this.C_im[1] = 0;\n this.C_re[2] = -0.577245789;\n this.C_im[2] = -0.007809598;\n this.C_re[3] = 0.508307513;\n this.C_im[3] = -0.112208952;\n this.C_re[4] = -0.15094762;\n this.C_im[4] = 0.18200602;\n this.C_re[5] = 1.01418179;\n this.C_im[5] = 1.64497696;\n this.C_re[6] = 1.9660549;\n this.C_im[6] = 2.5127645;\n\n this.D = [];\n this.D[1] = 1.5627014243;\n this.D[2] = 0.5185406398;\n this.D[3] = -0.03333098;\n this.D[4] = -0.1052906;\n this.D[5] = -0.0368594;\n this.D[6] = 0.007317;\n this.D[7] = 0.01220;\n this.D[8] = 0.00394;\n this.D[9] = -0.0013;\n}\n\n/**\n New Zealand Map Grid Forward - long/lat to x/y\n long/lat in radians\n */\nfunction forward(p) {\n var n;\n var lon = p.x;\n var lat = p.y;\n\n var delta_lat = lat - this.lat0;\n var delta_lon = lon - this.long0;\n\n // 1. Calculate d_phi and d_psi ... // and d_lambda\n // For this algorithm, delta_latitude is in seconds of arc x 10-5, so we need to scale to those units. Longitude is radians.\n var d_phi = delta_lat / _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SEC_TO_RAD\"] * 1E-5;\n var d_lambda = delta_lon;\n var d_phi_n = 1; // d_phi^0\n\n var d_psi = 0;\n for (n = 1; n <= 10; n++) {\n d_phi_n = d_phi_n * d_phi;\n d_psi = d_psi + this.A[n] * d_phi_n;\n }\n\n // 2. Calculate theta\n var th_re = d_psi;\n var th_im = d_lambda;\n\n // 3. Calculate z\n var th_n_re = 1;\n var th_n_im = 0; // theta^0\n var th_n_re1;\n var th_n_im1;\n\n var z_re = 0;\n var z_im = 0;\n for (n = 1; n <= 6; n++) {\n th_n_re1 = th_n_re * th_re - th_n_im * th_im;\n th_n_im1 = th_n_im * th_re + th_n_re * th_im;\n th_n_re = th_n_re1;\n th_n_im = th_n_im1;\n z_re = z_re + this.B_re[n] * th_n_re - this.B_im[n] * th_n_im;\n z_im = z_im + this.B_im[n] * th_n_re + this.B_re[n] * th_n_im;\n }\n\n // 4. Calculate easting and northing\n p.x = (z_im * this.a) + this.x0;\n p.y = (z_re * this.a) + this.y0;\n\n return p;\n}\n\n/**\n New Zealand Map Grid Inverse - x/y to long/lat\n */\nfunction inverse(p) {\n var n;\n var x = p.x;\n var y = p.y;\n\n var delta_x = x - this.x0;\n var delta_y = y - this.y0;\n\n // 1. Calculate z\n var z_re = delta_y / this.a;\n var z_im = delta_x / this.a;\n\n // 2a. Calculate theta - first approximation gives km accuracy\n var z_n_re = 1;\n var z_n_im = 0; // z^0\n var z_n_re1;\n var z_n_im1;\n\n var th_re = 0;\n var th_im = 0;\n for (n = 1; n <= 6; n++) {\n z_n_re1 = z_n_re * z_re - z_n_im * z_im;\n z_n_im1 = z_n_im * z_re + z_n_re * z_im;\n z_n_re = z_n_re1;\n z_n_im = z_n_im1;\n th_re = th_re + this.C_re[n] * z_n_re - this.C_im[n] * z_n_im;\n th_im = th_im + this.C_im[n] * z_n_re + this.C_re[n] * z_n_im;\n }\n\n // 2b. Iterate to refine the accuracy of the calculation\n // 0 iterations gives km accuracy\n // 1 iteration gives m accuracy -- good enough for most mapping applications\n // 2 iterations bives mm accuracy\n for (var i = 0; i < this.iterations; i++) {\n var th_n_re = th_re;\n var th_n_im = th_im;\n var th_n_re1;\n var th_n_im1;\n\n var num_re = z_re;\n var num_im = z_im;\n for (n = 2; n <= 6; n++) {\n th_n_re1 = th_n_re * th_re - th_n_im * th_im;\n th_n_im1 = th_n_im * th_re + th_n_re * th_im;\n th_n_re = th_n_re1;\n th_n_im = th_n_im1;\n num_re = num_re + (n - 1) * (this.B_re[n] * th_n_re - this.B_im[n] * th_n_im);\n num_im = num_im + (n - 1) * (this.B_im[n] * th_n_re + this.B_re[n] * th_n_im);\n }\n\n th_n_re = 1;\n th_n_im = 0;\n var den_re = this.B_re[1];\n var den_im = this.B_im[1];\n for (n = 2; n <= 6; n++) {\n th_n_re1 = th_n_re * th_re - th_n_im * th_im;\n th_n_im1 = th_n_im * th_re + th_n_re * th_im;\n th_n_re = th_n_re1;\n th_n_im = th_n_im1;\n den_re = den_re + n * (this.B_re[n] * th_n_re - this.B_im[n] * th_n_im);\n den_im = den_im + n * (this.B_im[n] * th_n_re + this.B_re[n] * th_n_im);\n }\n\n // Complex division\n var den2 = den_re * den_re + den_im * den_im;\n th_re = (num_re * den_re + num_im * den_im) / den2;\n th_im = (num_im * den_re - num_re * den_im) / den2;\n }\n\n // 3. Calculate d_phi ... // and d_lambda\n var d_psi = th_re;\n var d_lambda = th_im;\n var d_psi_n = 1; // d_psi^0\n\n var d_phi = 0;\n for (n = 1; n <= 9; n++) {\n d_psi_n = d_psi_n * d_psi;\n d_phi = d_phi + this.D[n] * d_psi_n;\n }\n\n // 4. Calculate latitude and longitude\n // d_phi is calcuated in second of arc * 10^-5, so we need to scale back to radians. d_lambda is in radians.\n var lat = this.lat0 + (d_phi * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SEC_TO_RAD\"] * 1E5);\n var lon = this.long0 + d_lambda;\n\n p.x = lon;\n p.y = lat;\n\n return p;\n}\n\nvar names = [\"New_Zealand_Map_Grid\", \"nzmg\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/nzmg.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/omerc.js": +/*!*****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/omerc.js ***! + \*****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_tsfnz__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/tsfnz */ \"./node_modules/proj4/lib/common/tsfnz.js\");\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _common_phi2z__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/phi2z */ \"./node_modules/proj4/lib/common/phi2z.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\n\n\n\n/* Initialize the Oblique Mercator projection\n ------------------------------------------*/\nfunction init() {\n this.no_off = this.no_off || false;\n this.no_rot = this.no_rot || false;\n\n if (isNaN(this.k0)) {\n this.k0 = 1;\n }\n var sinlat = Math.sin(this.lat0);\n var coslat = Math.cos(this.lat0);\n var con = this.e * sinlat;\n\n this.bl = Math.sqrt(1 + this.es / (1 - this.es) * Math.pow(coslat, 4));\n this.al = this.a * this.bl * this.k0 * Math.sqrt(1 - this.es) / (1 - con * con);\n var t0 = Object(_common_tsfnz__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.e, this.lat0, sinlat);\n var dl = this.bl / coslat * Math.sqrt((1 - this.es) / (1 - con * con));\n if (dl * dl < 1) {\n dl = 1;\n }\n var fl;\n var gl;\n if (!isNaN(this.longc)) {\n //Central point and azimuth method\n\n if (this.lat0 >= 0) {\n fl = dl + Math.sqrt(dl * dl - 1);\n }\n else {\n fl = dl - Math.sqrt(dl * dl - 1);\n }\n this.el = fl * Math.pow(t0, this.bl);\n gl = 0.5 * (fl - 1 / fl);\n this.gamma0 = Math.asin(Math.sin(this.alpha) / dl);\n this.long0 = this.longc - Math.asin(gl * Math.tan(this.gamma0)) / this.bl;\n\n }\n else {\n //2 points method\n var t1 = Object(_common_tsfnz__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.e, this.lat1, Math.sin(this.lat1));\n var t2 = Object(_common_tsfnz__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.e, this.lat2, Math.sin(this.lat2));\n if (this.lat0 >= 0) {\n this.el = (dl + Math.sqrt(dl * dl - 1)) * Math.pow(t0, this.bl);\n }\n else {\n this.el = (dl - Math.sqrt(dl * dl - 1)) * Math.pow(t0, this.bl);\n }\n var hl = Math.pow(t1, this.bl);\n var ll = Math.pow(t2, this.bl);\n fl = this.el / hl;\n gl = 0.5 * (fl - 1 / fl);\n var jl = (this.el * this.el - ll * hl) / (this.el * this.el + ll * hl);\n var pl = (ll - hl) / (ll + hl);\n var dlon12 = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.long1 - this.long2);\n this.long0 = 0.5 * (this.long1 + this.long2) - Math.atan(jl * Math.tan(0.5 * this.bl * (dlon12)) / pl) / this.bl;\n this.long0 = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.long0);\n var dlon10 = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.long1 - this.long0);\n this.gamma0 = Math.atan(Math.sin(this.bl * (dlon10)) / gl);\n this.alpha = Math.asin(dl * Math.sin(this.gamma0));\n }\n\n if (this.no_off) {\n this.uc = 0;\n }\n else {\n if (this.lat0 >= 0) {\n this.uc = this.al / this.bl * Math.atan2(Math.sqrt(dl * dl - 1), Math.cos(this.alpha));\n }\n else {\n this.uc = -1 * this.al / this.bl * Math.atan2(Math.sqrt(dl * dl - 1), Math.cos(this.alpha));\n }\n }\n\n}\n\n/* Oblique Mercator forward equations--mapping lat,long to x,y\n ----------------------------------------------------------*/\nfunction forward(p) {\n var lon = p.x;\n var lat = p.y;\n var dlon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(lon - this.long0);\n var us, vs;\n var con;\n if (Math.abs(Math.abs(lat) - _constants_values__WEBPACK_IMPORTED_MODULE_3__[\"HALF_PI\"]) <= _constants_values__WEBPACK_IMPORTED_MODULE_3__[\"EPSLN\"]) {\n if (lat > 0) {\n con = -1;\n }\n else {\n con = 1;\n }\n vs = this.al / this.bl * Math.log(Math.tan(_constants_values__WEBPACK_IMPORTED_MODULE_3__[\"FORTPI\"] + con * this.gamma0 * 0.5));\n us = -1 * con * _constants_values__WEBPACK_IMPORTED_MODULE_3__[\"HALF_PI\"] * this.al / this.bl;\n }\n else {\n var t = Object(_common_tsfnz__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.e, lat, Math.sin(lat));\n var ql = this.el / Math.pow(t, this.bl);\n var sl = 0.5 * (ql - 1 / ql);\n var tl = 0.5 * (ql + 1 / ql);\n var vl = Math.sin(this.bl * (dlon));\n var ul = (sl * Math.sin(this.gamma0) - vl * Math.cos(this.gamma0)) / tl;\n if (Math.abs(Math.abs(ul) - 1) <= _constants_values__WEBPACK_IMPORTED_MODULE_3__[\"EPSLN\"]) {\n vs = Number.POSITIVE_INFINITY;\n }\n else {\n vs = 0.5 * this.al * Math.log((1 - ul) / (1 + ul)) / this.bl;\n }\n if (Math.abs(Math.cos(this.bl * (dlon))) <= _constants_values__WEBPACK_IMPORTED_MODULE_3__[\"EPSLN\"]) {\n us = this.al * this.bl * (dlon);\n }\n else {\n us = this.al * Math.atan2(sl * Math.cos(this.gamma0) + vl * Math.sin(this.gamma0), Math.cos(this.bl * dlon)) / this.bl;\n }\n }\n\n if (this.no_rot) {\n p.x = this.x0 + us;\n p.y = this.y0 + vs;\n }\n else {\n\n us -= this.uc;\n p.x = this.x0 + vs * Math.cos(this.alpha) + us * Math.sin(this.alpha);\n p.y = this.y0 + us * Math.cos(this.alpha) - vs * Math.sin(this.alpha);\n }\n return p;\n}\n\nfunction inverse(p) {\n var us, vs;\n if (this.no_rot) {\n vs = p.y - this.y0;\n us = p.x - this.x0;\n }\n else {\n vs = (p.x - this.x0) * Math.cos(this.alpha) - (p.y - this.y0) * Math.sin(this.alpha);\n us = (p.y - this.y0) * Math.cos(this.alpha) + (p.x - this.x0) * Math.sin(this.alpha);\n us += this.uc;\n }\n var qp = Math.exp(-1 * this.bl * vs / this.al);\n var sp = 0.5 * (qp - 1 / qp);\n var tp = 0.5 * (qp + 1 / qp);\n var vp = Math.sin(this.bl * us / this.al);\n var up = (vp * Math.cos(this.gamma0) + sp * Math.sin(this.gamma0)) / tp;\n var ts = Math.pow(this.el / Math.sqrt((1 + up) / (1 - up)), 1 / this.bl);\n if (Math.abs(up - 1) < _constants_values__WEBPACK_IMPORTED_MODULE_3__[\"EPSLN\"]) {\n p.x = this.long0;\n p.y = _constants_values__WEBPACK_IMPORTED_MODULE_3__[\"HALF_PI\"];\n }\n else if (Math.abs(up + 1) < _constants_values__WEBPACK_IMPORTED_MODULE_3__[\"EPSLN\"]) {\n p.x = this.long0;\n p.y = -1 * _constants_values__WEBPACK_IMPORTED_MODULE_3__[\"HALF_PI\"];\n }\n else {\n p.y = Object(_common_phi2z__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.e, ts);\n p.x = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.long0 - Math.atan2(sp * Math.cos(this.gamma0) - vp * Math.sin(this.gamma0), Math.cos(this.bl * us / this.al)) / this.bl);\n }\n return p;\n}\n\nvar names = [\"Hotine_Oblique_Mercator\", \"Hotine Oblique Mercator\", \"Hotine_Oblique_Mercator_Azimuth_Natural_Origin\", \"Hotine_Oblique_Mercator_Azimuth_Center\", \"omerc\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/omerc.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/ortho.js": +/*!*****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/ortho.js ***! + \*****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _common_asinz__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/asinz */ \"./node_modules/proj4/lib/common/asinz.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\n\n\nfunction init() {\n //double temp; /* temporary variable */\n\n /* Place parameters in static storage for common use\n -------------------------------------------------*/\n this.sin_p14 = Math.sin(this.lat0);\n this.cos_p14 = Math.cos(this.lat0);\n}\n\n/* Orthographic forward equations--mapping lat,long to x,y\n ---------------------------------------------------*/\nfunction forward(p) {\n var sinphi, cosphi; /* sin and cos value */\n var dlon; /* delta longitude value */\n var coslon; /* cos of longitude */\n var ksp; /* scale factor */\n var g, x, y;\n var lon = p.x;\n var lat = p.y;\n /* Forward equations\n -----------------*/\n dlon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(lon - this.long0);\n\n sinphi = Math.sin(lat);\n cosphi = Math.cos(lat);\n\n coslon = Math.cos(dlon);\n g = this.sin_p14 * sinphi + this.cos_p14 * cosphi * coslon;\n ksp = 1;\n if ((g > 0) || (Math.abs(g) <= _constants_values__WEBPACK_IMPORTED_MODULE_2__[\"EPSLN\"])) {\n x = this.a * ksp * cosphi * Math.sin(dlon);\n y = this.y0 + this.a * ksp * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon);\n }\n p.x = x;\n p.y = y;\n return p;\n}\n\nfunction inverse(p) {\n var rh; /* height above ellipsoid */\n var z; /* angle */\n var sinz, cosz; /* sin of z and cos of z */\n var con;\n var lon, lat;\n /* Inverse equations\n -----------------*/\n p.x -= this.x0;\n p.y -= this.y0;\n rh = Math.sqrt(p.x * p.x + p.y * p.y);\n z = Object(_common_asinz__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(rh / this.a);\n\n sinz = Math.sin(z);\n cosz = Math.cos(z);\n\n lon = this.long0;\n if (Math.abs(rh) <= _constants_values__WEBPACK_IMPORTED_MODULE_2__[\"EPSLN\"]) {\n lat = this.lat0;\n p.x = lon;\n p.y = lat;\n return p;\n }\n lat = Object(_common_asinz__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(cosz * this.sin_p14 + (p.y * sinz * this.cos_p14) / rh);\n con = Math.abs(this.lat0) - _constants_values__WEBPACK_IMPORTED_MODULE_2__[\"HALF_PI\"];\n if (Math.abs(con) <= _constants_values__WEBPACK_IMPORTED_MODULE_2__[\"EPSLN\"]) {\n if (this.lat0 >= 0) {\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 + Math.atan2(p.x, - p.y));\n }\n else {\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 - Math.atan2(-p.x, p.y));\n }\n p.x = lon;\n p.y = lat;\n return p;\n }\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 + Math.atan2((p.x * sinz), rh * this.cos_p14 * cosz - p.y * this.sin_p14 * sinz));\n p.x = lon;\n p.y = lat;\n return p;\n}\n\nvar names = [\"ortho\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/ortho.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/poly.js": +/*!****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/poly.js ***! + \****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_e0fn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/e0fn */ \"./node_modules/proj4/lib/common/e0fn.js\");\n/* harmony import */ var _common_e1fn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/e1fn */ \"./node_modules/proj4/lib/common/e1fn.js\");\n/* harmony import */ var _common_e2fn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/e2fn */ \"./node_modules/proj4/lib/common/e2fn.js\");\n/* harmony import */ var _common_e3fn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/e3fn */ \"./node_modules/proj4/lib/common/e3fn.js\");\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _common_adjust_lat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/adjust_lat */ \"./node_modules/proj4/lib/common/adjust_lat.js\");\n/* harmony import */ var _common_mlfn__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/mlfn */ \"./node_modules/proj4/lib/common/mlfn.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n/* harmony import */ var _common_gN__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/gN */ \"./node_modules/proj4/lib/common/gN.js\");\n\n\n\n\n\n\n\n\n\n\nvar MAX_ITER = 20;\n\nfunction init() {\n /* Place parameters in static storage for common use\n -------------------------------------------------*/\n this.temp = this.b / this.a;\n this.es = 1 - Math.pow(this.temp, 2); // devait etre dans tmerc.js mais n y est pas donc je commente sinon retour de valeurs nulles\n this.e = Math.sqrt(this.es);\n this.e0 = Object(_common_e0fn__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.es);\n this.e1 = Object(_common_e1fn__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.es);\n this.e2 = Object(_common_e2fn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.es);\n this.e3 = Object(_common_e3fn__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this.es);\n this.ml0 = this.a * Object(_common_mlfn__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(this.e0, this.e1, this.e2, this.e3, this.lat0); //si que des zeros le calcul ne se fait pas\n}\n\n/* Polyconic forward equations--mapping lat,long to x,y\n ---------------------------------------------------*/\nfunction forward(p) {\n var lon = p.x;\n var lat = p.y;\n var x, y, el;\n var dlon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(lon - this.long0);\n el = dlon * Math.sin(lat);\n if (this.sphere) {\n if (Math.abs(lat) <= _constants_values__WEBPACK_IMPORTED_MODULE_7__[\"EPSLN\"]) {\n x = this.a * dlon;\n y = -1 * this.a * this.lat0;\n }\n else {\n x = this.a * Math.sin(el) / Math.tan(lat);\n y = this.a * (Object(_common_adjust_lat__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(lat - this.lat0) + (1 - Math.cos(el)) / Math.tan(lat));\n }\n }\n else {\n if (Math.abs(lat) <= _constants_values__WEBPACK_IMPORTED_MODULE_7__[\"EPSLN\"]) {\n x = this.a * dlon;\n y = -1 * this.ml0;\n }\n else {\n var nl = Object(_common_gN__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(this.a, this.e, Math.sin(lat)) / Math.tan(lat);\n x = nl * Math.sin(el);\n y = this.a * Object(_common_mlfn__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(this.e0, this.e1, this.e2, this.e3, lat) - this.ml0 + nl * (1 - Math.cos(el));\n }\n\n }\n p.x = x + this.x0;\n p.y = y + this.y0;\n return p;\n}\n\n/* Inverse equations\n -----------------*/\nfunction inverse(p) {\n var lon, lat, x, y, i;\n var al, bl;\n var phi, dphi;\n x = p.x - this.x0;\n y = p.y - this.y0;\n\n if (this.sphere) {\n if (Math.abs(y + this.a * this.lat0) <= _constants_values__WEBPACK_IMPORTED_MODULE_7__[\"EPSLN\"]) {\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x / this.a + this.long0);\n lat = 0;\n }\n else {\n al = this.lat0 + y / this.a;\n bl = x * x / this.a / this.a + al * al;\n phi = al;\n var tanphi;\n for (i = MAX_ITER; i; --i) {\n tanphi = Math.tan(phi);\n dphi = -1 * (al * (phi * tanphi + 1) - phi - 0.5 * (phi * phi + bl) * tanphi) / ((phi - al) / tanphi - 1);\n phi += dphi;\n if (Math.abs(dphi) <= _constants_values__WEBPACK_IMPORTED_MODULE_7__[\"EPSLN\"]) {\n lat = phi;\n break;\n }\n }\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.long0 + (Math.asin(x * Math.tan(phi) / this.a)) / Math.sin(lat));\n }\n }\n else {\n if (Math.abs(y + this.ml0) <= _constants_values__WEBPACK_IMPORTED_MODULE_7__[\"EPSLN\"]) {\n lat = 0;\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.long0 + x / this.a);\n }\n else {\n\n al = (this.ml0 + y) / this.a;\n bl = x * x / this.a / this.a + al * al;\n phi = al;\n var cl, mln, mlnp, ma;\n var con;\n for (i = MAX_ITER; i; --i) {\n con = this.e * Math.sin(phi);\n cl = Math.sqrt(1 - con * con) * Math.tan(phi);\n mln = this.a * Object(_common_mlfn__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(this.e0, this.e1, this.e2, this.e3, phi);\n mlnp = this.e0 - 2 * this.e1 * Math.cos(2 * phi) + 4 * this.e2 * Math.cos(4 * phi) - 6 * this.e3 * Math.cos(6 * phi);\n ma = mln / this.a;\n dphi = (al * (cl * ma + 1) - ma - 0.5 * cl * (ma * ma + bl)) / (this.es * Math.sin(2 * phi) * (ma * ma + bl - 2 * al * ma) / (4 * cl) + (al - ma) * (cl * mlnp - 2 / Math.sin(2 * phi)) - mlnp);\n phi -= dphi;\n if (Math.abs(dphi) <= _constants_values__WEBPACK_IMPORTED_MODULE_7__[\"EPSLN\"]) {\n lat = phi;\n break;\n }\n }\n\n //lat=phi4z(this.e,this.e0,this.e1,this.e2,this.e3,al,bl,0,0);\n cl = Math.sqrt(1 - this.es * Math.pow(Math.sin(lat), 2)) * Math.tan(lat);\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.long0 + Math.asin(x * cl / this.a) / Math.sin(lat));\n }\n }\n\n p.x = lon;\n p.y = lat;\n return p;\n}\n\nvar names = [\"Polyconic\", \"poly\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/poly.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/qsc.js": +/*!***************************************************!*\ + !*** ./node_modules/proj4/lib/projections/qsc.js ***! + \***************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n// QSC projection rewritten from the original PROJ4\n// https://github.com/OSGeo/proj.4/blob/master/src/PJ_qsc.c\n\n\n\n/* constants */\nvar FACE_ENUM = {\n FRONT: 1,\n RIGHT: 2,\n BACK: 3,\n LEFT: 4,\n TOP: 5,\n BOTTOM: 6\n};\n\nvar AREA_ENUM = {\n AREA_0: 1,\n AREA_1: 2,\n AREA_2: 3,\n AREA_3: 4\n};\n\nfunction init() {\n\n this.x0 = this.x0 || 0;\n this.y0 = this.y0 || 0;\n this.lat0 = this.lat0 || 0;\n this.long0 = this.long0 || 0;\n this.lat_ts = this.lat_ts || 0;\n this.title = this.title || \"Quadrilateralized Spherical Cube\";\n\n /* Determine the cube face from the center of projection. */\n if (this.lat0 >= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"] / 2.0) {\n this.face = FACE_ENUM.TOP;\n } else if (this.lat0 <= -(_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"] / 2.0)) {\n this.face = FACE_ENUM.BOTTOM;\n } else if (Math.abs(this.long0) <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"]) {\n this.face = FACE_ENUM.FRONT;\n } else if (Math.abs(this.long0) <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"]) {\n this.face = this.long0 > 0.0 ? FACE_ENUM.RIGHT : FACE_ENUM.LEFT;\n } else {\n this.face = FACE_ENUM.BACK;\n }\n\n /* Fill in useful values for the ellipsoid <-> sphere shift\n * described in [LK12]. */\n if (this.es !== 0) {\n this.one_minus_f = 1 - (this.a - this.b) / this.a;\n this.one_minus_f_squared = this.one_minus_f * this.one_minus_f;\n }\n}\n\n// QSC forward equations--mapping lat,long to x,y\n// -----------------------------------------------------------------\nfunction forward(p) {\n var xy = {x: 0, y: 0};\n var lat, lon;\n var theta, phi;\n var t, mu;\n /* nu; */\n var area = {value: 0};\n\n // move lon according to projection's lon\n p.x -= this.long0;\n\n /* Convert the geodetic latitude to a geocentric latitude.\n * This corresponds to the shift from the ellipsoid to the sphere\n * described in [LK12]. */\n if (this.es !== 0) {//if (P->es != 0) {\n lat = Math.atan(this.one_minus_f_squared * Math.tan(p.y));\n } else {\n lat = p.y;\n }\n\n /* Convert the input lat, lon into theta, phi as used by QSC.\n * This depends on the cube face and the area on it.\n * For the top and bottom face, we can compute theta and phi\n * directly from phi, lam. For the other faces, we must use\n * unit sphere cartesian coordinates as an intermediate step. */\n lon = p.x; //lon = lp.lam;\n if (this.face === FACE_ENUM.TOP) {\n phi = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] - lat;\n if (lon >= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"] && lon <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"]) {\n area.value = AREA_ENUM.AREA_0;\n theta = lon - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n } else if (lon > _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"] || lon <= -(_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"])) {\n area.value = AREA_ENUM.AREA_1;\n theta = (lon > 0.0 ? lon - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"] : lon + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"]);\n } else if (lon > -(_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"]) && lon <= -_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"]) {\n area.value = AREA_ENUM.AREA_2;\n theta = lon + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n } else {\n area.value = AREA_ENUM.AREA_3;\n theta = lon;\n }\n } else if (this.face === FACE_ENUM.BOTTOM) {\n phi = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] + lat;\n if (lon >= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"] && lon <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"]) {\n area.value = AREA_ENUM.AREA_0;\n theta = -lon + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n } else if (lon < _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"] && lon >= -_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"]) {\n area.value = AREA_ENUM.AREA_1;\n theta = -lon;\n } else if (lon < -_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"] && lon >= -(_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"])) {\n area.value = AREA_ENUM.AREA_2;\n theta = -lon - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n } else {\n area.value = AREA_ENUM.AREA_3;\n theta = (lon > 0.0 ? -lon + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"] : -lon - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"]);\n }\n } else {\n var q, r, s;\n var sinlat, coslat;\n var sinlon, coslon;\n\n if (this.face === FACE_ENUM.RIGHT) {\n lon = qsc_shift_lon_origin(lon, +_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"]);\n } else if (this.face === FACE_ENUM.BACK) {\n lon = qsc_shift_lon_origin(lon, +_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"]);\n } else if (this.face === FACE_ENUM.LEFT) {\n lon = qsc_shift_lon_origin(lon, -_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"]);\n }\n sinlat = Math.sin(lat);\n coslat = Math.cos(lat);\n sinlon = Math.sin(lon);\n coslon = Math.cos(lon);\n q = coslat * coslon;\n r = coslat * sinlon;\n s = sinlat;\n\n if (this.face === FACE_ENUM.FRONT) {\n phi = Math.acos(q);\n theta = qsc_fwd_equat_face_theta(phi, s, r, area);\n } else if (this.face === FACE_ENUM.RIGHT) {\n phi = Math.acos(r);\n theta = qsc_fwd_equat_face_theta(phi, s, -q, area);\n } else if (this.face === FACE_ENUM.BACK) {\n phi = Math.acos(-q);\n theta = qsc_fwd_equat_face_theta(phi, s, -r, area);\n } else if (this.face === FACE_ENUM.LEFT) {\n phi = Math.acos(-r);\n theta = qsc_fwd_equat_face_theta(phi, s, q, area);\n } else {\n /* Impossible */\n phi = theta = 0;\n area.value = AREA_ENUM.AREA_0;\n }\n }\n\n /* Compute mu and nu for the area of definition.\n * For mu, see Eq. (3-21) in [OL76], but note the typos:\n * compare with Eq. (3-14). For nu, see Eq. (3-38). */\n mu = Math.atan((12 / _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"]) * (theta + Math.acos(Math.sin(theta) * Math.cos(_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"])) - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"]));\n t = Math.sqrt((1 - Math.cos(phi)) / (Math.cos(mu) * Math.cos(mu)) / (1 - Math.cos(Math.atan(1 / Math.cos(theta)))));\n\n /* Apply the result to the real area. */\n if (area.value === AREA_ENUM.AREA_1) {\n mu += _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n } else if (area.value === AREA_ENUM.AREA_2) {\n mu += _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"];\n } else if (area.value === AREA_ENUM.AREA_3) {\n mu += 1.5 * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"];\n }\n\n /* Now compute x, y from mu and nu */\n xy.x = t * Math.cos(mu);\n xy.y = t * Math.sin(mu);\n xy.x = xy.x * this.a + this.x0;\n xy.y = xy.y * this.a + this.y0;\n\n p.x = xy.x;\n p.y = xy.y;\n return p;\n}\n\n// QSC inverse equations--mapping x,y to lat/long\n// -----------------------------------------------------------------\nfunction inverse(p) {\n var lp = {lam: 0, phi: 0};\n var mu, nu, cosmu, tannu;\n var tantheta, theta, cosphi, phi;\n var t;\n var area = {value: 0};\n\n /* de-offset */\n p.x = (p.x - this.x0) / this.a;\n p.y = (p.y - this.y0) / this.a;\n\n /* Convert the input x, y to the mu and nu angles as used by QSC.\n * This depends on the area of the cube face. */\n nu = Math.atan(Math.sqrt(p.x * p.x + p.y * p.y));\n mu = Math.atan2(p.y, p.x);\n if (p.x >= 0.0 && p.x >= Math.abs(p.y)) {\n area.value = AREA_ENUM.AREA_0;\n } else if (p.y >= 0.0 && p.y >= Math.abs(p.x)) {\n area.value = AREA_ENUM.AREA_1;\n mu -= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n } else if (p.x < 0.0 && -p.x >= Math.abs(p.y)) {\n area.value = AREA_ENUM.AREA_2;\n mu = (mu < 0.0 ? mu + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"] : mu - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"]);\n } else {\n area.value = AREA_ENUM.AREA_3;\n mu += _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n }\n\n /* Compute phi and theta for the area of definition.\n * The inverse projection is not described in the original paper, but some\n * good hints can be found here (as of 2011-12-14):\n * http://fits.gsfc.nasa.gov/fitsbits/saf.93/saf.9302\n * (search for \"Message-Id: <9302181759.AA25477 at fits.cv.nrao.edu>\") */\n t = (_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"] / 12) * Math.tan(mu);\n tantheta = Math.sin(t) / (Math.cos(t) - (1 / Math.sqrt(2)));\n theta = Math.atan(tantheta);\n cosmu = Math.cos(mu);\n tannu = Math.tan(nu);\n cosphi = 1 - cosmu * cosmu * tannu * tannu * (1 - Math.cos(Math.atan(1 / Math.cos(theta))));\n if (cosphi < -1) {\n cosphi = -1;\n } else if (cosphi > +1) {\n cosphi = +1;\n }\n\n /* Apply the result to the real area on the cube face.\n * For the top and bottom face, we can compute phi and lam directly.\n * For the other faces, we must use unit sphere cartesian coordinates\n * as an intermediate step. */\n if (this.face === FACE_ENUM.TOP) {\n phi = Math.acos(cosphi);\n lp.phi = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] - phi;\n if (area.value === AREA_ENUM.AREA_0) {\n lp.lam = theta + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n } else if (area.value === AREA_ENUM.AREA_1) {\n lp.lam = (theta < 0.0 ? theta + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"] : theta - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"]);\n } else if (area.value === AREA_ENUM.AREA_2) {\n lp.lam = theta - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n } else /* area.value == AREA_ENUM.AREA_3 */ {\n lp.lam = theta;\n }\n } else if (this.face === FACE_ENUM.BOTTOM) {\n phi = Math.acos(cosphi);\n lp.phi = phi - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n if (area.value === AREA_ENUM.AREA_0) {\n lp.lam = -theta + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n } else if (area.value === AREA_ENUM.AREA_1) {\n lp.lam = -theta;\n } else if (area.value === AREA_ENUM.AREA_2) {\n lp.lam = -theta - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n } else /* area.value == AREA_ENUM.AREA_3 */ {\n lp.lam = (theta < 0.0 ? -theta - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"] : -theta + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"]);\n }\n } else {\n /* Compute phi and lam via cartesian unit sphere coordinates. */\n var q, r, s;\n q = cosphi;\n t = q * q;\n if (t >= 1) {\n s = 0;\n } else {\n s = Math.sqrt(1 - t) * Math.sin(theta);\n }\n t += s * s;\n if (t >= 1) {\n r = 0;\n } else {\n r = Math.sqrt(1 - t);\n }\n /* Rotate q,r,s into the correct area. */\n if (area.value === AREA_ENUM.AREA_1) {\n t = r;\n r = -s;\n s = t;\n } else if (area.value === AREA_ENUM.AREA_2) {\n r = -r;\n s = -s;\n } else if (area.value === AREA_ENUM.AREA_3) {\n t = r;\n r = s;\n s = -t;\n }\n /* Rotate q,r,s into the correct cube face. */\n if (this.face === FACE_ENUM.RIGHT) {\n t = q;\n q = -r;\n r = t;\n } else if (this.face === FACE_ENUM.BACK) {\n q = -q;\n r = -r;\n } else if (this.face === FACE_ENUM.LEFT) {\n t = q;\n q = r;\n r = -t;\n }\n /* Now compute phi and lam from the unit sphere coordinates. */\n lp.phi = Math.acos(-s) - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n lp.lam = Math.atan2(r, q);\n if (this.face === FACE_ENUM.RIGHT) {\n lp.lam = qsc_shift_lon_origin(lp.lam, -_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"]);\n } else if (this.face === FACE_ENUM.BACK) {\n lp.lam = qsc_shift_lon_origin(lp.lam, -_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"]);\n } else if (this.face === FACE_ENUM.LEFT) {\n lp.lam = qsc_shift_lon_origin(lp.lam, +_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"]);\n }\n }\n\n /* Apply the shift from the sphere to the ellipsoid as described\n * in [LK12]. */\n if (this.es !== 0) {\n var invert_sign;\n var tanphi, xa;\n invert_sign = (lp.phi < 0 ? 1 : 0);\n tanphi = Math.tan(lp.phi);\n xa = this.b / Math.sqrt(tanphi * tanphi + this.one_minus_f_squared);\n lp.phi = Math.atan(Math.sqrt(this.a * this.a - xa * xa) / (this.one_minus_f * xa));\n if (invert_sign) {\n lp.phi = -lp.phi;\n }\n }\n\n lp.lam += this.long0;\n p.x = lp.lam;\n p.y = lp.phi;\n return p;\n}\n\n/* Helper function for forward projection: compute the theta angle\n * and determine the area number. */\nfunction qsc_fwd_equat_face_theta(phi, y, x, area) {\n var theta;\n if (phi < _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n area.value = AREA_ENUM.AREA_0;\n theta = 0.0;\n } else {\n theta = Math.atan2(y, x);\n if (Math.abs(theta) <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"]) {\n area.value = AREA_ENUM.AREA_0;\n } else if (theta > _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"] && theta <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"]) {\n area.value = AREA_ENUM.AREA_1;\n theta -= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n } else if (theta > _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"] || theta <= -(_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"FORTPI\"])) {\n area.value = AREA_ENUM.AREA_2;\n theta = (theta >= 0.0 ? theta - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"] : theta + _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"]);\n } else {\n area.value = AREA_ENUM.AREA_3;\n theta += _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n }\n }\n return theta;\n}\n\n/* Helper function: shift the longitude. */\nfunction qsc_shift_lon_origin(lon, offset) {\n var slon = lon + offset;\n if (slon < -_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"]) {\n slon += _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"TWO_PI\"];\n } else if (slon > +_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"SPI\"]) {\n slon -= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"TWO_PI\"];\n }\n return slon;\n}\n\nvar names = [\"Quadrilateralized Spherical Cube\", \"Quadrilateralized_Spherical_Cube\", \"qsc\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/qsc.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/robin.js": +/*!*****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/robin.js ***! + \*****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n// Robinson projection\n// Based on https://github.com/OSGeo/proj.4/blob/master/src/PJ_robin.c\n// Polynomial coeficients from http://article.gmane.org/gmane.comp.gis.proj-4.devel/6039\n\n\n\n\nvar COEFS_X = [\n [1.0000, 2.2199e-17, -7.15515e-05, 3.1103e-06],\n [0.9986, -0.000482243, -2.4897e-05, -1.3309e-06],\n [0.9954, -0.00083103, -4.48605e-05, -9.86701e-07],\n [0.9900, -0.00135364, -5.9661e-05, 3.6777e-06],\n [0.9822, -0.00167442, -4.49547e-06, -5.72411e-06],\n [0.9730, -0.00214868, -9.03571e-05, 1.8736e-08],\n [0.9600, -0.00305085, -9.00761e-05, 1.64917e-06],\n [0.9427, -0.00382792, -6.53386e-05, -2.6154e-06],\n [0.9216, -0.00467746, -0.00010457, 4.81243e-06],\n [0.8962, -0.00536223, -3.23831e-05, -5.43432e-06],\n [0.8679, -0.00609363, -0.000113898, 3.32484e-06],\n [0.8350, -0.00698325, -6.40253e-05, 9.34959e-07],\n [0.7986, -0.00755338, -5.00009e-05, 9.35324e-07],\n [0.7597, -0.00798324, -3.5971e-05, -2.27626e-06],\n [0.7186, -0.00851367, -7.01149e-05, -8.6303e-06],\n [0.6732, -0.00986209, -0.000199569, 1.91974e-05],\n [0.6213, -0.010418, 8.83923e-05, 6.24051e-06],\n [0.5722, -0.00906601, 0.000182, 6.24051e-06],\n [0.5322, -0.00677797, 0.000275608, 6.24051e-06]\n];\n\nvar COEFS_Y = [\n [-5.20417e-18, 0.0124, 1.21431e-18, -8.45284e-11],\n [0.0620, 0.0124, -1.26793e-09, 4.22642e-10],\n [0.1240, 0.0124, 5.07171e-09, -1.60604e-09],\n [0.1860, 0.0123999, -1.90189e-08, 6.00152e-09],\n [0.2480, 0.0124002, 7.10039e-08, -2.24e-08],\n [0.3100, 0.0123992, -2.64997e-07, 8.35986e-08],\n [0.3720, 0.0124029, 9.88983e-07, -3.11994e-07],\n [0.4340, 0.0123893, -3.69093e-06, -4.35621e-07],\n [0.4958, 0.0123198, -1.02252e-05, -3.45523e-07],\n [0.5571, 0.0121916, -1.54081e-05, -5.82288e-07],\n [0.6176, 0.0119938, -2.41424e-05, -5.25327e-07],\n [0.6769, 0.011713, -3.20223e-05, -5.16405e-07],\n [0.7346, 0.0113541, -3.97684e-05, -6.09052e-07],\n [0.7903, 0.0109107, -4.89042e-05, -1.04739e-06],\n [0.8435, 0.0103431, -6.4615e-05, -1.40374e-09],\n [0.8936, 0.00969686, -6.4636e-05, -8.547e-06],\n [0.9394, 0.00840947, -0.000192841, -4.2106e-06],\n [0.9761, 0.00616527, -0.000256, -4.2106e-06],\n [1.0000, 0.00328947, -0.000319159, -4.2106e-06]\n];\n\nvar FXC = 0.8487;\nvar FYC = 1.3523;\nvar C1 = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"R2D\"]/5; // rad to 5-degree interval\nvar RC1 = 1/C1;\nvar NODES = 18;\n\nvar poly3_val = function(coefs, x) {\n return coefs[0] + x * (coefs[1] + x * (coefs[2] + x * coefs[3]));\n};\n\nvar poly3_der = function(coefs, x) {\n return coefs[1] + x * (2 * coefs[2] + x * 3 * coefs[3]);\n};\n\nfunction newton_rapshon(f_df, start, max_err, iters) {\n var x = start;\n for (; iters; --iters) {\n var upd = f_df(x);\n x -= upd;\n if (Math.abs(upd) < max_err) {\n break;\n }\n }\n return x;\n}\n\nfunction init() {\n this.x0 = this.x0 || 0;\n this.y0 = this.y0 || 0;\n this.long0 = this.long0 || 0;\n this.es = 0;\n this.title = this.title || \"Robinson\";\n}\n\nfunction forward(ll) {\n var lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(ll.x - this.long0);\n\n var dphi = Math.abs(ll.y);\n var i = Math.floor(dphi * C1);\n if (i < 0) {\n i = 0;\n } else if (i >= NODES) {\n i = NODES - 1;\n }\n dphi = _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"R2D\"] * (dphi - RC1 * i);\n var xy = {\n x: poly3_val(COEFS_X[i], dphi) * lon,\n y: poly3_val(COEFS_Y[i], dphi)\n };\n if (ll.y < 0) {\n xy.y = -xy.y;\n }\n\n xy.x = xy.x * this.a * FXC + this.x0;\n xy.y = xy.y * this.a * FYC + this.y0;\n return xy;\n}\n\nfunction inverse(xy) {\n var ll = {\n x: (xy.x - this.x0) / (this.a * FXC),\n y: Math.abs(xy.y - this.y0) / (this.a * FYC)\n };\n\n if (ll.y >= 1) { // pathologic case\n ll.x /= COEFS_X[NODES][0];\n ll.y = xy.y < 0 ? -_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] : _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n } else {\n // find table interval\n var i = Math.floor(ll.y * NODES);\n if (i < 0) {\n i = 0;\n } else if (i >= NODES) {\n i = NODES - 1;\n }\n for (;;) {\n if (COEFS_Y[i][0] > ll.y) {\n --i;\n } else if (COEFS_Y[i+1][0] <= ll.y) {\n ++i;\n } else {\n break;\n }\n }\n // linear interpolation in 5 degree interval\n var coefs = COEFS_Y[i];\n var t = 5 * (ll.y - coefs[0]) / (COEFS_Y[i+1][0] - coefs[0]);\n // find t so that poly3_val(coefs, t) = ll.y\n t = newton_rapshon(function(x) {\n return (poly3_val(coefs, x) - ll.y) / poly3_der(coefs, x);\n }, t, _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"], 100);\n\n ll.x /= poly3_val(COEFS_X[i], t);\n ll.y = (5 * i + t) * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"D2R\"];\n if (xy.y < 0) {\n ll.y = -ll.y;\n }\n }\n\n ll.x = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(ll.x + this.long0);\n return ll;\n}\n\nvar names = [\"Robinson\", \"robin\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/robin.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/sinu.js": +/*!****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/sinu.js ***! + \****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _common_adjust_lat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/adjust_lat */ \"./node_modules/proj4/lib/common/adjust_lat.js\");\n/* harmony import */ var _common_pj_enfn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/pj_enfn */ \"./node_modules/proj4/lib/common/pj_enfn.js\");\n/* harmony import */ var _common_pj_mlfn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/pj_mlfn */ \"./node_modules/proj4/lib/common/pj_mlfn.js\");\n/* harmony import */ var _common_pj_inv_mlfn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/pj_inv_mlfn */ \"./node_modules/proj4/lib/common/pj_inv_mlfn.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n/* harmony import */ var _common_asinz__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/asinz */ \"./node_modules/proj4/lib/common/asinz.js\");\n\n\n\nvar MAX_ITER = 20;\n\n\n\n\n\n\n\nfunction init() {\n /* Place parameters in static storage for common use\n -------------------------------------------------*/\n\n\n if (!this.sphere) {\n this.en = Object(_common_pj_enfn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.es);\n }\n else {\n this.n = 1;\n this.m = 0;\n this.es = 0;\n this.C_y = Math.sqrt((this.m + 1) / this.n);\n this.C_x = this.C_y / (this.m + 1);\n }\n\n}\n\n/* Sinusoidal forward equations--mapping lat,long to x,y\n -----------------------------------------------------*/\nfunction forward(p) {\n var x, y;\n var lon = p.x;\n var lat = p.y;\n /* Forward equations\n -----------------*/\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(lon - this.long0);\n\n if (this.sphere) {\n if (!this.m) {\n lat = this.n !== 1 ? Math.asin(this.n * Math.sin(lat)) : lat;\n }\n else {\n var k = this.n * Math.sin(lat);\n for (var i = MAX_ITER; i; --i) {\n var V = (this.m * lat + Math.sin(lat) - k) / (this.m + Math.cos(lat));\n lat -= V;\n if (Math.abs(V) < _constants_values__WEBPACK_IMPORTED_MODULE_5__[\"EPSLN\"]) {\n break;\n }\n }\n }\n x = this.a * this.C_x * lon * (this.m + Math.cos(lat));\n y = this.a * this.C_y * lat;\n\n }\n else {\n\n var s = Math.sin(lat);\n var c = Math.cos(lat);\n y = this.a * Object(_common_pj_mlfn__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(lat, s, c, this.en);\n x = this.a * lon * c / Math.sqrt(1 - this.es * s * s);\n }\n\n p.x = x;\n p.y = y;\n return p;\n}\n\nfunction inverse(p) {\n var lat, temp, lon, s;\n\n p.x -= this.x0;\n lon = p.x / this.a;\n p.y -= this.y0;\n lat = p.y / this.a;\n\n if (this.sphere) {\n lat /= this.C_y;\n lon = lon / (this.C_x * (this.m + Math.cos(lat)));\n if (this.m) {\n lat = Object(_common_asinz__WEBPACK_IMPORTED_MODULE_6__[\"default\"])((this.m * lat + Math.sin(lat)) / this.n);\n }\n else if (this.n !== 1) {\n lat = Object(_common_asinz__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(Math.sin(lat) / this.n);\n }\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(lon + this.long0);\n lat = Object(_common_adjust_lat__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(lat);\n }\n else {\n lat = Object(_common_pj_inv_mlfn__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(p.y / this.a, this.es, this.en);\n s = Math.abs(lat);\n if (s < _constants_values__WEBPACK_IMPORTED_MODULE_5__[\"HALF_PI\"]) {\n s = Math.sin(lat);\n temp = this.long0 + p.x * Math.sqrt(1 - this.es * s * s) / (this.a * Math.cos(lat));\n //temp = this.long0 + p.x / (this.a * Math.cos(lat));\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(temp);\n }\n else if ((s - _constants_values__WEBPACK_IMPORTED_MODULE_5__[\"EPSLN\"]) < _constants_values__WEBPACK_IMPORTED_MODULE_5__[\"HALF_PI\"]) {\n lon = this.long0;\n }\n }\n p.x = lon;\n p.y = lat;\n return p;\n}\n\nvar names = [\"Sinusoidal\", \"sinu\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/sinu.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/somerc.js": +/*!******************************************************!*\ + !*** ./node_modules/proj4/lib/projections/somerc.js ***! + \******************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/*\n references:\n Formules et constantes pour le Calcul pour la\n projection cylindrique conforme à axe oblique et pour la transformation entre\n des systèmes de référence.\n http://www.swisstopo.admin.ch/internet/swisstopo/fr/home/topics/survey/sys/refsys/switzerland.parsysrelated1.31216.downloadList.77004.DownloadFile.tmp/swissprojectionfr.pdf\n */\n\nfunction init() {\n var phy0 = this.lat0;\n this.lambda0 = this.long0;\n var sinPhy0 = Math.sin(phy0);\n var semiMajorAxis = this.a;\n var invF = this.rf;\n var flattening = 1 / invF;\n var e2 = 2 * flattening - Math.pow(flattening, 2);\n var e = this.e = Math.sqrt(e2);\n this.R = this.k0 * semiMajorAxis * Math.sqrt(1 - e2) / (1 - e2 * Math.pow(sinPhy0, 2));\n this.alpha = Math.sqrt(1 + e2 / (1 - e2) * Math.pow(Math.cos(phy0), 4));\n this.b0 = Math.asin(sinPhy0 / this.alpha);\n var k1 = Math.log(Math.tan(Math.PI / 4 + this.b0 / 2));\n var k2 = Math.log(Math.tan(Math.PI / 4 + phy0 / 2));\n var k3 = Math.log((1 + e * sinPhy0) / (1 - e * sinPhy0));\n this.K = k1 - this.alpha * k2 + this.alpha * e / 2 * k3;\n}\n\nfunction forward(p) {\n var Sa1 = Math.log(Math.tan(Math.PI / 4 - p.y / 2));\n var Sa2 = this.e / 2 * Math.log((1 + this.e * Math.sin(p.y)) / (1 - this.e * Math.sin(p.y)));\n var S = -this.alpha * (Sa1 + Sa2) + this.K;\n\n // spheric latitude\n var b = 2 * (Math.atan(Math.exp(S)) - Math.PI / 4);\n\n // spheric longitude\n var I = this.alpha * (p.x - this.lambda0);\n\n // psoeudo equatorial rotation\n var rotI = Math.atan(Math.sin(I) / (Math.sin(this.b0) * Math.tan(b) + Math.cos(this.b0) * Math.cos(I)));\n\n var rotB = Math.asin(Math.cos(this.b0) * Math.sin(b) - Math.sin(this.b0) * Math.cos(b) * Math.cos(I));\n\n p.y = this.R / 2 * Math.log((1 + Math.sin(rotB)) / (1 - Math.sin(rotB))) + this.y0;\n p.x = this.R * rotI + this.x0;\n return p;\n}\n\nfunction inverse(p) {\n var Y = p.x - this.x0;\n var X = p.y - this.y0;\n\n var rotI = Y / this.R;\n var rotB = 2 * (Math.atan(Math.exp(X / this.R)) - Math.PI / 4);\n\n var b = Math.asin(Math.cos(this.b0) * Math.sin(rotB) + Math.sin(this.b0) * Math.cos(rotB) * Math.cos(rotI));\n var I = Math.atan(Math.sin(rotI) / (Math.cos(this.b0) * Math.cos(rotI) - Math.sin(this.b0) * Math.tan(rotB)));\n\n var lambda = this.lambda0 + I / this.alpha;\n\n var S = 0;\n var phy = b;\n var prevPhy = -1000;\n var iteration = 0;\n while (Math.abs(phy - prevPhy) > 0.0000001) {\n if (++iteration > 20) {\n //...reportError(\"omercFwdInfinity\");\n return;\n }\n //S = Math.log(Math.tan(Math.PI / 4 + phy / 2));\n S = 1 / this.alpha * (Math.log(Math.tan(Math.PI / 4 + b / 2)) - this.K) + this.e * Math.log(Math.tan(Math.PI / 4 + Math.asin(this.e * Math.sin(phy)) / 2));\n prevPhy = phy;\n phy = 2 * Math.atan(Math.exp(S)) - Math.PI / 2;\n }\n\n p.x = lambda;\n p.y = phy;\n return p;\n}\n\nvar names = [\"somerc\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/somerc.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/stere.js": +/*!*****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/stere.js ***! + \*****************************************************/ +/*! exports provided: ssfn_, init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ssfn_\", function() { return ssfn_; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n/* harmony import */ var _common_sign__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/sign */ \"./node_modules/proj4/lib/common/sign.js\");\n/* harmony import */ var _common_msfnz__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/msfnz */ \"./node_modules/proj4/lib/common/msfnz.js\");\n/* harmony import */ var _common_tsfnz__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/tsfnz */ \"./node_modules/proj4/lib/common/tsfnz.js\");\n/* harmony import */ var _common_phi2z__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/phi2z */ \"./node_modules/proj4/lib/common/phi2z.js\");\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n\n\n\n\n\n\n\n\nfunction ssfn_(phit, sinphi, eccen) {\n sinphi *= eccen;\n return (Math.tan(0.5 * (_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] + phit)) * Math.pow((1 - sinphi) / (1 + sinphi), 0.5 * eccen));\n}\n\nfunction init() {\n this.coslat0 = Math.cos(this.lat0);\n this.sinlat0 = Math.sin(this.lat0);\n if (this.sphere) {\n if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n this.k0 = 0.5 * (1 + Object(_common_sign__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.lat0) * Math.sin(this.lat_ts));\n }\n }\n else {\n if (Math.abs(this.coslat0) <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n if (this.lat0 > 0) {\n //North pole\n //trace('stere:north pole');\n this.con = 1;\n }\n else {\n //South pole\n //trace('stere:south pole');\n this.con = -1;\n }\n }\n this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e));\n if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n this.k0 = 0.5 * this.cons * Object(_common_msfnz__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / Object(_common_tsfnz__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts));\n }\n this.ms1 = Object(_common_msfnz__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.e, this.sinlat0, this.coslat0);\n this.X0 = 2 * Math.atan(this.ssfn_(this.lat0, this.sinlat0, this.e)) - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n this.cosX0 = Math.cos(this.X0);\n this.sinX0 = Math.sin(this.X0);\n }\n}\n\n// Stereographic forward equations--mapping lat,long to x,y\nfunction forward(p) {\n var lon = p.x;\n var lat = p.y;\n var sinlat = Math.sin(lat);\n var coslat = Math.cos(lat);\n var A, X, sinX, cosX, ts, rh;\n var dlon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(lon - this.long0);\n\n if (Math.abs(Math.abs(lon - this.long0) - Math.PI) <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"] && Math.abs(lat + this.lat0) <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n //case of the origine point\n //trace('stere:this is the origin point');\n p.x = NaN;\n p.y = NaN;\n return p;\n }\n if (this.sphere) {\n //trace('stere:sphere case');\n A = 2 * this.k0 / (1 + this.sinlat0 * sinlat + this.coslat0 * coslat * Math.cos(dlon));\n p.x = this.a * A * coslat * Math.sin(dlon) + this.x0;\n p.y = this.a * A * (this.coslat0 * sinlat - this.sinlat0 * coslat * Math.cos(dlon)) + this.y0;\n return p;\n }\n else {\n X = 2 * Math.atan(this.ssfn_(lat, sinlat, this.e)) - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"];\n cosX = Math.cos(X);\n sinX = Math.sin(X);\n if (Math.abs(this.coslat0) <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n ts = Object(_common_tsfnz__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this.e, lat * this.con, this.con * sinlat);\n rh = 2 * this.a * this.k0 * ts / this.cons;\n p.x = this.x0 + rh * Math.sin(lon - this.long0);\n p.y = this.y0 - this.con * rh * Math.cos(lon - this.long0);\n //trace(p.toString());\n return p;\n }\n else if (Math.abs(this.sinlat0) < _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n //Eq\n //trace('stere:equateur');\n A = 2 * this.a * this.k0 / (1 + cosX * Math.cos(dlon));\n p.y = A * sinX;\n }\n else {\n //other case\n //trace('stere:normal case');\n A = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * sinX + this.cosX0 * cosX * Math.cos(dlon)));\n p.y = A * (this.cosX0 * sinX - this.sinX0 * cosX * Math.cos(dlon)) + this.y0;\n }\n p.x = A * cosX * Math.sin(dlon) + this.x0;\n }\n //trace(p.toString());\n return p;\n}\n\n//* Stereographic inverse equations--mapping x,y to lat/long\nfunction inverse(p) {\n p.x -= this.x0;\n p.y -= this.y0;\n var lon, lat, ts, ce, Chi;\n var rh = Math.sqrt(p.x * p.x + p.y * p.y);\n if (this.sphere) {\n var c = 2 * Math.atan(rh / (2 * this.a * this.k0));\n lon = this.long0;\n lat = this.lat0;\n if (rh <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n p.x = lon;\n p.y = lat;\n return p;\n }\n lat = Math.asin(Math.cos(c) * this.sinlat0 + p.y * Math.sin(c) * this.coslat0 / rh);\n if (Math.abs(this.coslat0) < _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n if (this.lat0 > 0) {\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this.long0 + Math.atan2(p.x, - 1 * p.y));\n }\n else {\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this.long0 + Math.atan2(p.x, p.y));\n }\n }\n else {\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this.long0 + Math.atan2(p.x * Math.sin(c), rh * this.coslat0 * Math.cos(c) - p.y * this.sinlat0 * Math.sin(c)));\n }\n p.x = lon;\n p.y = lat;\n return p;\n }\n else {\n if (Math.abs(this.coslat0) <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n if (rh <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n lat = this.lat0;\n lon = this.long0;\n p.x = lon;\n p.y = lat;\n //trace(p.toString());\n return p;\n }\n p.x *= this.con;\n p.y *= this.con;\n ts = rh * this.cons / (2 * this.a * this.k0);\n lat = this.con * Object(_common_phi2z__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.e, ts);\n lon = this.con * Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this.con * this.long0 + Math.atan2(p.x, - 1 * p.y));\n }\n else {\n ce = 2 * Math.atan(rh * this.cosX0 / (2 * this.a * this.k0 * this.ms1));\n lon = this.long0;\n if (rh <= _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n Chi = this.X0;\n }\n else {\n Chi = Math.asin(Math.cos(ce) * this.sinX0 + p.y * Math.sin(ce) * this.cosX0 / rh);\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this.long0 + Math.atan2(p.x * Math.sin(ce), rh * this.cosX0 * Math.cos(ce) - p.y * this.sinX0 * Math.sin(ce)));\n }\n lat = -1 * Object(_common_phi2z__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.e, Math.tan(0.5 * (_constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"] + Chi)));\n }\n }\n p.x = lon;\n p.y = lat;\n\n //trace(p.toString());\n return p;\n\n}\n\nvar names = [\"stere\", \"Stereographic_South_Pole\", \"Polar Stereographic (variant B)\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names,\n ssfn_: ssfn_\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/stere.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/sterea.js": +/*!******************************************************!*\ + !*** ./node_modules/proj4/lib/projections/sterea.js ***! + \******************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _gauss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./gauss */ \"./node_modules/proj4/lib/projections/gauss.js\");\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n\n\n\nfunction init() {\n _gauss__WEBPACK_IMPORTED_MODULE_0__[\"default\"].init.apply(this);\n if (!this.rc) {\n return;\n }\n this.sinc0 = Math.sin(this.phic0);\n this.cosc0 = Math.cos(this.phic0);\n this.R2 = 2 * this.rc;\n if (!this.title) {\n this.title = \"Oblique Stereographic Alternative\";\n }\n}\n\nfunction forward(p) {\n var sinc, cosc, cosl, k;\n p.x = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(p.x - this.long0);\n _gauss__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forward.apply(this, [p]);\n sinc = Math.sin(p.y);\n cosc = Math.cos(p.y);\n cosl = Math.cos(p.x);\n k = this.k0 * this.R2 / (1 + this.sinc0 * sinc + this.cosc0 * cosc * cosl);\n p.x = k * cosc * Math.sin(p.x);\n p.y = k * (this.cosc0 * sinc - this.sinc0 * cosc * cosl);\n p.x = this.a * p.x + this.x0;\n p.y = this.a * p.y + this.y0;\n return p;\n}\n\nfunction inverse(p) {\n var sinc, cosc, lon, lat, rho;\n p.x = (p.x - this.x0) / this.a;\n p.y = (p.y - this.y0) / this.a;\n\n p.x /= this.k0;\n p.y /= this.k0;\n if ((rho = Math.sqrt(p.x * p.x + p.y * p.y))) {\n var c = 2 * Math.atan2(rho, this.R2);\n sinc = Math.sin(c);\n cosc = Math.cos(c);\n lat = Math.asin(cosc * this.sinc0 + p.y * sinc * this.cosc0 / rho);\n lon = Math.atan2(p.x * sinc, rho * this.cosc0 * cosc - p.y * this.sinc0 * sinc);\n }\n else {\n lat = this.phic0;\n lon = 0;\n }\n\n p.x = lon;\n p.y = lat;\n _gauss__WEBPACK_IMPORTED_MODULE_0__[\"default\"].inverse.apply(this, [p]);\n p.x = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(p.x + this.long0);\n return p;\n}\n\nvar names = [\"Stereographic_North_Pole\", \"Oblique_Stereographic\", \"Polar_Stereographic\", \"sterea\",\"Oblique Stereographic Alternative\",\"Double_Stereographic\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/sterea.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/tmerc.js": +/*!*****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/tmerc.js ***! + \*****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_pj_enfn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/pj_enfn */ \"./node_modules/proj4/lib/common/pj_enfn.js\");\n/* harmony import */ var _common_pj_mlfn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/pj_mlfn */ \"./node_modules/proj4/lib/common/pj_mlfn.js\");\n/* harmony import */ var _common_pj_inv_mlfn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/pj_inv_mlfn */ \"./node_modules/proj4/lib/common/pj_inv_mlfn.js\");\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n/* harmony import */ var _common_sign__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/sign */ \"./node_modules/proj4/lib/common/sign.js\");\n// Heavily based on this tmerc projection implementation\n// https://github.com/mbloch/mapshaper-proj/blob/master/src/projections/tmerc.js\n\n\n\n\n\n\n\n\n\nfunction init() {\n this.x0 = this.x0 !== undefined ? this.x0 : 0;\n this.y0 = this.y0 !== undefined ? this.y0 : 0;\n this.long0 = this.long0 !== undefined ? this.long0 : 0;\n this.lat0 = this.lat0 !== undefined ? this.lat0 : 0;\n\n if (this.es) {\n this.en = Object(_common_pj_enfn__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.es);\n this.ml0 = Object(_common_pj_mlfn__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en);\n }\n}\n\n/**\n Transverse Mercator Forward - long/lat to x/y\n long/lat in radians\n */\nfunction forward(p) {\n var lon = p.x;\n var lat = p.y;\n\n var delta_lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(lon - this.long0);\n var con;\n var x, y;\n var sin_phi = Math.sin(lat);\n var cos_phi = Math.cos(lat);\n\n if (!this.es) {\n var b = cos_phi * Math.sin(delta_lon);\n\n if ((Math.abs(Math.abs(b) - 1)) < _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"EPSLN\"]) {\n return (93);\n }\n else {\n x = 0.5 * this.a * this.k0 * Math.log((1 + b) / (1 - b)) + this.x0;\n y = cos_phi * Math.cos(delta_lon) / Math.sqrt(1 - Math.pow(b, 2));\n b = Math.abs(y);\n\n if (b >= 1) {\n if ((b - 1) > _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"EPSLN\"]) {\n return (93);\n }\n else {\n y = 0;\n }\n }\n else {\n y = Math.acos(y);\n }\n\n if (lat < 0) {\n y = -y;\n }\n\n y = this.a * this.k0 * (y - this.lat0) + this.y0;\n }\n }\n else {\n var al = cos_phi * delta_lon;\n var als = Math.pow(al, 2);\n var c = this.ep2 * Math.pow(cos_phi, 2);\n var cs = Math.pow(c, 2);\n var tq = Math.abs(cos_phi) > _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"EPSLN\"] ? Math.tan(lat) : 0;\n var t = Math.pow(tq, 2);\n var ts = Math.pow(t, 2);\n con = 1 - this.es * Math.pow(sin_phi, 2);\n al = al / Math.sqrt(con);\n var ml = Object(_common_pj_mlfn__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(lat, sin_phi, cos_phi, this.en);\n\n x = this.a * (this.k0 * al * (1 +\n als / 6 * (1 - t + c +\n als / 20 * (5 - 18 * t + ts + 14 * c - 58 * t * c +\n als / 42 * (61 + 179 * ts - ts * t - 479 * t))))) +\n this.x0;\n\n y = this.a * (this.k0 * (ml - this.ml0 +\n sin_phi * delta_lon * al / 2 * (1 +\n als / 12 * (5 - t + 9 * c + 4 * cs +\n als / 30 * (61 + ts - 58 * t + 270 * c - 330 * t * c +\n als / 56 * (1385 + 543 * ts - ts * t - 3111 * t)))))) +\n this.y0;\n }\n\n p.x = x;\n p.y = y;\n\n return p;\n}\n\n/**\n Transverse Mercator Inverse - x/y to long/lat\n */\nfunction inverse(p) {\n var con, phi;\n var lat, lon;\n var x = (p.x - this.x0) * (1 / this.a);\n var y = (p.y - this.y0) * (1 / this.a);\n\n if (!this.es) {\n var f = Math.exp(x / this.k0);\n var g = 0.5 * (f - 1 / f);\n var temp = this.lat0 + y / this.k0;\n var h = Math.cos(temp);\n con = Math.sqrt((1 - Math.pow(h, 2)) / (1 + Math.pow(g, 2)));\n lat = Math.asin(con);\n\n if (y < 0) {\n lat = -lat;\n }\n\n if ((g === 0) && (h === 0)) {\n lon = 0;\n }\n else {\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Math.atan2(g, h) + this.long0);\n }\n }\n else { // ellipsoidal form\n con = this.ml0 + y / this.k0;\n phi = Object(_common_pj_inv_mlfn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(con, this.es, this.en);\n\n if (Math.abs(phi) < _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"HALF_PI\"]) {\n var sin_phi = Math.sin(phi);\n var cos_phi = Math.cos(phi);\n var tan_phi = Math.abs(cos_phi) > _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"EPSLN\"] ? Math.tan(phi) : 0;\n var c = this.ep2 * Math.pow(cos_phi, 2);\n var cs = Math.pow(c, 2);\n var t = Math.pow(tan_phi, 2);\n var ts = Math.pow(t, 2);\n con = 1 - this.es * Math.pow(sin_phi, 2);\n var d = x * Math.sqrt(con) / this.k0;\n var ds = Math.pow(d, 2);\n con = con * tan_phi;\n\n lat = phi - (con * ds / (1 - this.es)) * 0.5 * (1 -\n ds / 12 * (5 + 3 * t - 9 * c * t + c - 4 * cs -\n ds / 30 * (61 + 90 * t - 252 * c * t + 45 * ts + 46 * c -\n ds / 56 * (1385 + 3633 * t + 4095 * ts + 1574 * ts * t))));\n\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this.long0 + (d * (1 -\n ds / 6 * (1 + 2 * t + c -\n ds / 20 * (5 + 28 * t + 24 * ts + 8 * c * t + 6 * c -\n ds / 42 * (61 + 662 * t + 1320 * ts + 720 * ts * t)))) / cos_phi));\n }\n else {\n lat = _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"HALF_PI\"] * Object(_common_sign__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(y);\n lon = 0;\n }\n }\n\n p.x = lon;\n p.y = lat;\n\n return p;\n}\n\nvar names = [\"Fast_Transverse_Mercator\", \"Fast Transverse Mercator\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/tmerc.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/tpers.js": +/*!*****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/tpers.js ***! + \*****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n/* harmony import */ var _common_hypot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/hypot */ \"./node_modules/proj4/lib/common/hypot.js\");\n\nvar mode = {\n N_POLE: 0,\n S_POLE: 1,\n EQUIT: 2,\n OBLIQ: 3\n};\n\n\n\n\nvar params = {\n h: { def: 100000, num: true }, // default is Karman line, no default in PROJ.7\n azi: { def: 0, num: true, degrees: true }, // default is North\n tilt: { def: 0, num: true, degrees: true }, // default is Nadir\n long0: { def: 0, num: true }, // default is Greenwich, conversion to rad is automatic\n lat0: { def: 0, num: true } // default is Equator, conversion to rad is automatic\n};\n\nfunction init() {\n Object.keys(params).forEach(function (p) {\n if (typeof this[p] === \"undefined\") {\n this[p] = params[p].def;\n } else if (params[p].num && isNaN(this[p])) {\n throw new Error(\"Invalid parameter value, must be numeric \" + p + \" = \" + this[p]);\n } else if (params[p].num) {\n this[p] = parseFloat(this[p]);\n }\n if (params[p].degrees) {\n this[p] = this[p] * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"D2R\"];\n }\n }.bind(this));\n\n if (Math.abs((Math.abs(this.lat0) - _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"HALF_PI\"])) < _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n this.mode = this.lat0 < 0 ? mode.S_POLE : mode.N_POLE;\n } else if (Math.abs(this.lat0) < _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n this.mode = mode.EQUIT;\n } else {\n this.mode = mode.OBLIQ;\n this.sinph0 = Math.sin(this.lat0);\n this.cosph0 = Math.cos(this.lat0);\n }\n\n this.pn1 = this.h / this.a; // Normalize relative to the Earth's radius\n\n if (this.pn1 <= 0 || this.pn1 > 1e10) {\n throw new Error(\"Invalid height\");\n }\n \n this.p = 1 + this.pn1;\n this.rp = 1 / this.p;\n this.h1 = 1 / this.pn1;\n this.pfact = (this.p + 1) * this.h1;\n this.es = 0;\n\n var omega = this.tilt;\n var gamma = this.azi;\n this.cg = Math.cos(gamma);\n this.sg = Math.sin(gamma);\n this.cw = Math.cos(omega);\n this.sw = Math.sin(omega);\n}\n\nfunction forward(p) {\n p.x -= this.long0;\n var sinphi = Math.sin(p.y);\n var cosphi = Math.cos(p.y);\n var coslam = Math.cos(p.x);\n var x, y;\n switch (this.mode) {\n case mode.OBLIQ:\n y = this.sinph0 * sinphi + this.cosph0 * cosphi * coslam;\n break;\n case mode.EQUIT:\n y = cosphi * coslam;\n break;\n case mode.S_POLE:\n y = -sinphi;\n break;\n case mode.N_POLE:\n y = sinphi;\n break;\n }\n y = this.pn1 / (this.p - y);\n x = y * cosphi * Math.sin(p.x);\n\n switch (this.mode) {\n case mode.OBLIQ:\n y *= this.cosph0 * sinphi - this.sinph0 * cosphi * coslam;\n break;\n case mode.EQUIT:\n y *= sinphi;\n break;\n case mode.N_POLE:\n y *= -(cosphi * coslam);\n break;\n case mode.S_POLE:\n y *= cosphi * coslam;\n break;\n }\n\n // Tilt \n var yt, ba;\n yt = y * this.cg + x * this.sg;\n ba = 1 / (yt * this.sw * this.h1 + this.cw);\n x = (x * this.cg - y * this.sg) * this.cw * ba;\n y = yt * ba;\n\n p.x = x * this.a;\n p.y = y * this.a;\n return p;\n}\n\nfunction inverse(p) {\n p.x /= this.a;\n p.y /= this.a;\n var r = { x: p.x, y: p.y };\n\n // Un-Tilt\n var bm, bq, yt;\n yt = 1 / (this.pn1 - p.y * this.sw);\n bm = this.pn1 * p.x * yt;\n bq = this.pn1 * p.y * this.cw * yt;\n p.x = bm * this.cg + bq * this.sg;\n p.y = bq * this.cg - bm * this.sg;\n\n var rh = Object(_common_hypot__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(p.x, p.y);\n if (Math.abs(rh) < _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"EPSLN\"]) {\n r.x = 0;\n r.y = p.y;\n } else {\n var cosz, sinz;\n sinz = 1 - rh * rh * this.pfact;\n sinz = (this.p - Math.sqrt(sinz)) / (this.pn1 / rh + rh / this.pn1);\n cosz = Math.sqrt(1 - sinz * sinz);\n switch (this.mode) {\n case mode.OBLIQ:\n r.y = Math.asin(cosz * this.sinph0 + p.y * sinz * this.cosph0 / rh);\n p.y = (cosz - this.sinph0 * Math.sin(r.y)) * rh;\n p.x *= sinz * this.cosph0;\n break;\n case mode.EQUIT:\n r.y = Math.asin(p.y * sinz / rh);\n p.y = cosz * rh;\n p.x *= sinz;\n break;\n case mode.N_POLE:\n r.y = Math.asin(cosz);\n p.y = -p.y;\n break;\n case mode.S_POLE:\n r.y = -Math.asin(cosz);\n break;\n }\n r.x = Math.atan2(p.x, p.y);\n }\n\n p.x = r.x + this.long0;\n p.y = r.y;\n return p;\n}\n\nvar names = [\"Tilted_Perspective\", \"tpers\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/tpers.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/utm.js": +/*!***************************************************!*\ + !*** ./node_modules/proj4/lib/projections/utm.js ***! + \***************************************************/ +/*! exports provided: dependsOn, init, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dependsOn\", function() { return dependsOn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_adjust_zone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/adjust_zone */ \"./node_modules/proj4/lib/common/adjust_zone.js\");\n/* harmony import */ var _etmerc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./etmerc */ \"./node_modules/proj4/lib/projections/etmerc.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n\n\nvar dependsOn = 'etmerc';\n\n\n\nfunction init() {\n var zone = Object(_common_adjust_zone__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.zone, this.long0);\n if (zone === undefined) {\n throw new Error('unknown utm zone');\n }\n this.lat0 = 0;\n this.long0 = ((6 * Math.abs(zone)) - 183) * _constants_values__WEBPACK_IMPORTED_MODULE_2__[\"D2R\"];\n this.x0 = 500000;\n this.y0 = this.utmSouth ? 10000000 : 0;\n this.k0 = 0.9996;\n\n _etmerc__WEBPACK_IMPORTED_MODULE_1__[\"default\"].init.apply(this);\n this.forward = _etmerc__WEBPACK_IMPORTED_MODULE_1__[\"default\"].forward;\n this.inverse = _etmerc__WEBPACK_IMPORTED_MODULE_1__[\"default\"].inverse;\n}\n\nvar names = [\"Universal Transverse Mercator System\", \"utm\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n names: names,\n dependsOn: dependsOn\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/utm.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/projections/vandg.js": +/*!*****************************************************!*\ + !*** ./node_modules/proj4/lib/projections/vandg.js ***! + \*****************************************************/ +/*! exports provided: init, forward, inverse, names, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forward\", function() { return forward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"names\", function() { return names; });\n/* harmony import */ var _common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/adjust_lon */ \"./node_modules/proj4/lib/common/adjust_lon.js\");\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n/* harmony import */ var _common_asinz__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/asinz */ \"./node_modules/proj4/lib/common/asinz.js\");\n\n\n\n\n\n\n/* Initialize the Van Der Grinten projection\n ----------------------------------------*/\nfunction init() {\n //this.R = 6370997; //Radius of earth\n this.R = this.a;\n}\n\nfunction forward(p) {\n\n var lon = p.x;\n var lat = p.y;\n\n /* Forward equations\n -----------------*/\n var dlon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(lon - this.long0);\n var x, y;\n\n if (Math.abs(lat) <= _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"]) {\n x = this.x0 + this.R * dlon;\n y = this.y0;\n }\n var theta = Object(_common_asinz__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(2 * Math.abs(lat / Math.PI));\n if ((Math.abs(dlon) <= _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"]) || (Math.abs(Math.abs(lat) - _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"HALF_PI\"]) <= _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"])) {\n x = this.x0;\n if (lat >= 0) {\n y = this.y0 + Math.PI * this.R * Math.tan(0.5 * theta);\n }\n else {\n y = this.y0 + Math.PI * this.R * -Math.tan(0.5 * theta);\n }\n // return(OK);\n }\n var al = 0.5 * Math.abs((Math.PI / dlon) - (dlon / Math.PI));\n var asq = al * al;\n var sinth = Math.sin(theta);\n var costh = Math.cos(theta);\n\n var g = costh / (sinth + costh - 1);\n var gsq = g * g;\n var m = g * (2 / sinth - 1);\n var msq = m * m;\n var con = Math.PI * this.R * (al * (g - msq) + Math.sqrt(asq * (g - msq) * (g - msq) - (msq + asq) * (gsq - msq))) / (msq + asq);\n if (dlon < 0) {\n con = -con;\n }\n x = this.x0 + con;\n //con = Math.abs(con / (Math.PI * this.R));\n var q = asq + g;\n con = Math.PI * this.R * (m * q - al * Math.sqrt((msq + asq) * (asq + 1) - q * q)) / (msq + asq);\n if (lat >= 0) {\n //y = this.y0 + Math.PI * this.R * Math.sqrt(1 - con * con - 2 * al * con);\n y = this.y0 + con;\n }\n else {\n //y = this.y0 - Math.PI * this.R * Math.sqrt(1 - con * con - 2 * al * con);\n y = this.y0 - con;\n }\n p.x = x;\n p.y = y;\n return p;\n}\n\n/* Van Der Grinten inverse equations--mapping x,y to lat/long\n ---------------------------------------------------------*/\nfunction inverse(p) {\n var lon, lat;\n var xx, yy, xys, c1, c2, c3;\n var a1;\n var m1;\n var con;\n var th1;\n var d;\n\n /* inverse equations\n -----------------*/\n p.x -= this.x0;\n p.y -= this.y0;\n con = Math.PI * this.R;\n xx = p.x / con;\n yy = p.y / con;\n xys = xx * xx + yy * yy;\n c1 = -Math.abs(yy) * (1 + xys);\n c2 = c1 - 2 * yy * yy + xx * xx;\n c3 = -2 * c1 + 1 + 2 * yy * yy + xys * xys;\n d = yy * yy / c3 + (2 * c2 * c2 * c2 / c3 / c3 / c3 - 9 * c1 * c2 / c3 / c3) / 27;\n a1 = (c1 - c2 * c2 / 3 / c3) / c3;\n m1 = 2 * Math.sqrt(-a1 / 3);\n con = ((3 * d) / a1) / m1;\n if (Math.abs(con) > 1) {\n if (con >= 0) {\n con = 1;\n }\n else {\n con = -1;\n }\n }\n th1 = Math.acos(con) / 3;\n if (p.y >= 0) {\n lat = (-m1 * Math.cos(th1 + Math.PI / 3) - c2 / 3 / c3) * Math.PI;\n }\n else {\n lat = -(-m1 * Math.cos(th1 + Math.PI / 3) - c2 / 3 / c3) * Math.PI;\n }\n\n if (Math.abs(xx) < _constants_values__WEBPACK_IMPORTED_MODULE_1__[\"EPSLN\"]) {\n lon = this.long0;\n }\n else {\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.long0 + Math.PI * (xys - 1 + Math.sqrt(1 + 2 * (xx * xx - yy * yy) + xys * xys)) / 2 / xx);\n }\n\n p.x = lon;\n p.y = lat;\n return p;\n}\n\nvar names = [\"Van_der_Grinten_I\", \"VanDerGrinten\", \"vandg\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n init: init,\n forward: forward,\n inverse: inverse,\n names: names\n});\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/projections/vandg.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/lib/transform.js": +/*!*********************************************!*\ + !*** ./node_modules/proj4/lib/transform.js ***! + \*********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return transform; });\n/* harmony import */ var _constants_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants/values */ \"./node_modules/proj4/lib/constants/values.js\");\n/* harmony import */ var _datum_transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./datum_transform */ \"./node_modules/proj4/lib/datum_transform.js\");\n/* harmony import */ var _adjust_axis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./adjust_axis */ \"./node_modules/proj4/lib/adjust_axis.js\");\n/* harmony import */ var _Proj__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Proj */ \"./node_modules/proj4/lib/Proj.js\");\n/* harmony import */ var _common_toPoint__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./common/toPoint */ \"./node_modules/proj4/lib/common/toPoint.js\");\n/* harmony import */ var _checkSanity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./checkSanity */ \"./node_modules/proj4/lib/checkSanity.js\");\n\n\n\n\n\n\n\nfunction checkNotWGS(source, dest) {\n return ((source.datum.datum_type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_3PARAM\"] || source.datum.datum_type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_7PARAM\"]) && dest.datumCode !== 'WGS84') || ((dest.datum.datum_type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_3PARAM\"] || dest.datum.datum_type === _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"PJD_7PARAM\"]) && source.datumCode !== 'WGS84');\n}\n\nfunction transform(source, dest, point) {\n var wgs84;\n if (Array.isArray(point)) {\n point = Object(_common_toPoint__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(point);\n }\n Object(_checkSanity__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(point);\n // Workaround for datum shifts towgs84, if either source or destination projection is not wgs84\n if (source.datum && dest.datum && checkNotWGS(source, dest)) {\n wgs84 = new _Proj__WEBPACK_IMPORTED_MODULE_3__[\"default\"]('WGS84');\n point = transform(source, wgs84, point);\n source = wgs84;\n }\n // DGR, 2010/11/12\n if (source.axis !== 'enu') {\n point = Object(_adjust_axis__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(source, false, point);\n }\n // Transform source points to long/lat, if they aren't already.\n if (source.projName === 'longlat') {\n point = {\n x: point.x * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"D2R\"],\n y: point.y * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"D2R\"],\n z: point.z || 0\n };\n } else {\n if (source.to_meter) {\n point = {\n x: point.x * source.to_meter,\n y: point.y * source.to_meter,\n z: point.z || 0\n };\n }\n point = source.inverse(point); // Convert Cartesian to longlat\n if (!point) {\n return;\n }\n }\n // Adjust for the prime meridian if necessary\n if (source.from_greenwich) {\n point.x += source.from_greenwich;\n }\n\n // Convert datums if needed, and if possible.\n point = Object(_datum_transform__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(source.datum, dest.datum, point);\n if (!point) {\n return;\n }\n\n // Adjust for the prime meridian if necessary\n if (dest.from_greenwich) {\n point = {\n x: point.x - dest.from_greenwich,\n y: point.y,\n z: point.z || 0\n };\n }\n\n if (dest.projName === 'longlat') {\n // convert radians to decimal degrees\n point = {\n x: point.x * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"R2D\"],\n y: point.y * _constants_values__WEBPACK_IMPORTED_MODULE_0__[\"R2D\"],\n z: point.z || 0\n };\n } else { // else project\n point = dest.forward(point);\n if (dest.to_meter) {\n point = {\n x: point.x / dest.to_meter,\n y: point.y / dest.to_meter,\n z: point.z || 0\n };\n }\n }\n\n // DGR, 2010/11/12\n if (dest.axis !== 'enu') {\n return Object(_adjust_axis__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(dest, true, point);\n }\n\n return point;\n}\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/lib/transform.js?"); + +/***/ }), + +/***/ "./node_modules/proj4/projs.js": +/*!*************************************!*\ + !*** ./node_modules/proj4/projs.js ***! + \*************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _lib_projections_tmerc__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/projections/tmerc */ \"./node_modules/proj4/lib/projections/tmerc.js\");\n/* harmony import */ var _lib_projections_etmerc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/projections/etmerc */ \"./node_modules/proj4/lib/projections/etmerc.js\");\n/* harmony import */ var _lib_projections_utm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/projections/utm */ \"./node_modules/proj4/lib/projections/utm.js\");\n/* harmony import */ var _lib_projections_sterea__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/projections/sterea */ \"./node_modules/proj4/lib/projections/sterea.js\");\n/* harmony import */ var _lib_projections_stere__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/projections/stere */ \"./node_modules/proj4/lib/projections/stere.js\");\n/* harmony import */ var _lib_projections_somerc__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/projections/somerc */ \"./node_modules/proj4/lib/projections/somerc.js\");\n/* harmony import */ var _lib_projections_omerc__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lib/projections/omerc */ \"./node_modules/proj4/lib/projections/omerc.js\");\n/* harmony import */ var _lib_projections_lcc__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./lib/projections/lcc */ \"./node_modules/proj4/lib/projections/lcc.js\");\n/* harmony import */ var _lib_projections_krovak__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./lib/projections/krovak */ \"./node_modules/proj4/lib/projections/krovak.js\");\n/* harmony import */ var _lib_projections_cass__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./lib/projections/cass */ \"./node_modules/proj4/lib/projections/cass.js\");\n/* harmony import */ var _lib_projections_laea__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./lib/projections/laea */ \"./node_modules/proj4/lib/projections/laea.js\");\n/* harmony import */ var _lib_projections_aea__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./lib/projections/aea */ \"./node_modules/proj4/lib/projections/aea.js\");\n/* harmony import */ var _lib_projections_gnom__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./lib/projections/gnom */ \"./node_modules/proj4/lib/projections/gnom.js\");\n/* harmony import */ var _lib_projections_cea__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./lib/projections/cea */ \"./node_modules/proj4/lib/projections/cea.js\");\n/* harmony import */ var _lib_projections_eqc__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./lib/projections/eqc */ \"./node_modules/proj4/lib/projections/eqc.js\");\n/* harmony import */ var _lib_projections_poly__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./lib/projections/poly */ \"./node_modules/proj4/lib/projections/poly.js\");\n/* harmony import */ var _lib_projections_nzmg__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./lib/projections/nzmg */ \"./node_modules/proj4/lib/projections/nzmg.js\");\n/* harmony import */ var _lib_projections_mill__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./lib/projections/mill */ \"./node_modules/proj4/lib/projections/mill.js\");\n/* harmony import */ var _lib_projections_sinu__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./lib/projections/sinu */ \"./node_modules/proj4/lib/projections/sinu.js\");\n/* harmony import */ var _lib_projections_moll__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./lib/projections/moll */ \"./node_modules/proj4/lib/projections/moll.js\");\n/* harmony import */ var _lib_projections_eqdc__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./lib/projections/eqdc */ \"./node_modules/proj4/lib/projections/eqdc.js\");\n/* harmony import */ var _lib_projections_vandg__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./lib/projections/vandg */ \"./node_modules/proj4/lib/projections/vandg.js\");\n/* harmony import */ var _lib_projections_aeqd__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./lib/projections/aeqd */ \"./node_modules/proj4/lib/projections/aeqd.js\");\n/* harmony import */ var _lib_projections_ortho__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./lib/projections/ortho */ \"./node_modules/proj4/lib/projections/ortho.js\");\n/* harmony import */ var _lib_projections_qsc__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./lib/projections/qsc */ \"./node_modules/proj4/lib/projections/qsc.js\");\n/* harmony import */ var _lib_projections_robin__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./lib/projections/robin */ \"./node_modules/proj4/lib/projections/robin.js\");\n/* harmony import */ var _lib_projections_geocent__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./lib/projections/geocent */ \"./node_modules/proj4/lib/projections/geocent.js\");\n/* harmony import */ var _lib_projections_tpers__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./lib/projections/tpers */ \"./node_modules/proj4/lib/projections/tpers.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(proj4){\n proj4.Proj.projections.add(_lib_projections_tmerc__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_etmerc__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_utm__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_sterea__WEBPACK_IMPORTED_MODULE_3__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_stere__WEBPACK_IMPORTED_MODULE_4__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_somerc__WEBPACK_IMPORTED_MODULE_5__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_omerc__WEBPACK_IMPORTED_MODULE_6__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_lcc__WEBPACK_IMPORTED_MODULE_7__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_krovak__WEBPACK_IMPORTED_MODULE_8__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_cass__WEBPACK_IMPORTED_MODULE_9__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_laea__WEBPACK_IMPORTED_MODULE_10__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_aea__WEBPACK_IMPORTED_MODULE_11__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_gnom__WEBPACK_IMPORTED_MODULE_12__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_cea__WEBPACK_IMPORTED_MODULE_13__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_eqc__WEBPACK_IMPORTED_MODULE_14__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_poly__WEBPACK_IMPORTED_MODULE_15__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_nzmg__WEBPACK_IMPORTED_MODULE_16__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_mill__WEBPACK_IMPORTED_MODULE_17__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_sinu__WEBPACK_IMPORTED_MODULE_18__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_moll__WEBPACK_IMPORTED_MODULE_19__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_eqdc__WEBPACK_IMPORTED_MODULE_20__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_vandg__WEBPACK_IMPORTED_MODULE_21__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_aeqd__WEBPACK_IMPORTED_MODULE_22__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_ortho__WEBPACK_IMPORTED_MODULE_23__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_qsc__WEBPACK_IMPORTED_MODULE_24__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_robin__WEBPACK_IMPORTED_MODULE_25__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_geocent__WEBPACK_IMPORTED_MODULE_26__[\"default\"]);\n proj4.Proj.projections.add(_lib_projections_tpers__WEBPACK_IMPORTED_MODULE_27__[\"default\"]);\n});\n\n//# sourceURL=webpack://LithoSphere/./node_modules/proj4/projs.js?"); + +/***/ }), + +/***/ "./node_modules/quickselect/quickselect.js": +/*!*************************************************!*\ + !*** ./node_modules/quickselect/quickselect.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("(function (global, factory) {\n\t true ? module.exports = factory() :\n\tundefined;\n}(this, (function () { 'use strict';\n\nfunction quickselect(arr, k, left, right, compare) {\n quickselectStep(arr, k, left || 0, right || (arr.length - 1), compare || defaultCompare);\n}\n\nfunction quickselectStep(arr, k, left, right, compare) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n quickselectStep(arr, k, newLeft, newRight, compare);\n }\n\n var t = arr[k];\n var i = left;\n var j = right;\n\n swap(arr, left, k);\n if (compare(arr[right], t) > 0) swap(arr, left, right);\n\n while (i < j) {\n swap(arr, i, j);\n i++;\n j--;\n while (compare(arr[i], t) < 0) i++;\n while (compare(arr[j], t) > 0) j--;\n }\n\n if (compare(arr[left], t) === 0) swap(arr, left, j);\n else {\n j++;\n swap(arr, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nfunction defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nreturn quickselect;\n\n})));\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/quickselect/quickselect.js?"); + +/***/ }), + +/***/ "./node_modules/rbush/index.js": +/*!*************************************!*\ + !*** ./node_modules/rbush/index.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = rbush;\nmodule.exports.default = rbush;\n\nvar quickselect = __webpack_require__(/*! quickselect */ \"./node_modules/quickselect/quickselect.js\");\n\nfunction rbush(maxEntries, format) {\n if (!(this instanceof rbush)) return new rbush(maxEntries, format);\n\n // max entries in a node is 9 by default; min node fill is 40% for best performance\n this._maxEntries = Math.max(4, maxEntries || 9);\n this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));\n\n if (format) {\n this._initFormat(format);\n }\n\n this.clear();\n}\n\nrbush.prototype = {\n\n all: function () {\n return this._all(this.data, []);\n },\n\n search: function (bbox) {\n\n var node = this.data,\n result = [],\n toBBox = this.toBBox;\n\n if (!intersects(bbox, node)) return result;\n\n var nodesToSearch = [],\n i, len, child, childBBox;\n\n while (node) {\n for (i = 0, len = node.children.length; i < len; i++) {\n\n child = node.children[i];\n childBBox = node.leaf ? toBBox(child) : child;\n\n if (intersects(bbox, childBBox)) {\n if (node.leaf) result.push(child);\n else if (contains(bbox, childBBox)) this._all(child, result);\n else nodesToSearch.push(child);\n }\n }\n node = nodesToSearch.pop();\n }\n\n return result;\n },\n\n collides: function (bbox) {\n\n var node = this.data,\n toBBox = this.toBBox;\n\n if (!intersects(bbox, node)) return false;\n\n var nodesToSearch = [],\n i, len, child, childBBox;\n\n while (node) {\n for (i = 0, len = node.children.length; i < len; i++) {\n\n child = node.children[i];\n childBBox = node.leaf ? toBBox(child) : child;\n\n if (intersects(bbox, childBBox)) {\n if (node.leaf || contains(bbox, childBBox)) return true;\n nodesToSearch.push(child);\n }\n }\n node = nodesToSearch.pop();\n }\n\n return false;\n },\n\n load: function (data) {\n if (!(data && data.length)) return this;\n\n if (data.length < this._minEntries) {\n for (var i = 0, len = data.length; i < len; i++) {\n this.insert(data[i]);\n }\n return this;\n }\n\n // recursively build the tree with the given data from scratch using OMT algorithm\n var node = this._build(data.slice(), 0, data.length - 1, 0);\n\n if (!this.data.children.length) {\n // save as is if tree is empty\n this.data = node;\n\n } else if (this.data.height === node.height) {\n // split root if trees have the same height\n this._splitRoot(this.data, node);\n\n } else {\n if (this.data.height < node.height) {\n // swap trees if inserted one is bigger\n var tmpNode = this.data;\n this.data = node;\n node = tmpNode;\n }\n\n // insert the small tree into the large tree at appropriate level\n this._insert(node, this.data.height - node.height - 1, true);\n }\n\n return this;\n },\n\n insert: function (item) {\n if (item) this._insert(item, this.data.height - 1);\n return this;\n },\n\n clear: function () {\n this.data = createNode([]);\n return this;\n },\n\n remove: function (item, equalsFn) {\n if (!item) return this;\n\n var node = this.data,\n bbox = this.toBBox(item),\n path = [],\n indexes = [],\n i, parent, index, goingUp;\n\n // depth-first iterative tree traversal\n while (node || path.length) {\n\n if (!node) { // go up\n node = path.pop();\n parent = path[path.length - 1];\n i = indexes.pop();\n goingUp = true;\n }\n\n if (node.leaf) { // check current node\n index = findItem(item, node.children, equalsFn);\n\n if (index !== -1) {\n // item found, remove the item and condense tree upwards\n node.children.splice(index, 1);\n path.push(node);\n this._condense(path);\n return this;\n }\n }\n\n if (!goingUp && !node.leaf && contains(node, bbox)) { // go down\n path.push(node);\n indexes.push(i);\n i = 0;\n parent = node;\n node = node.children[0];\n\n } else if (parent) { // go right\n i++;\n node = parent.children[i];\n goingUp = false;\n\n } else node = null; // nothing found\n }\n\n return this;\n },\n\n toBBox: function (item) { return item; },\n\n compareMinX: compareNodeMinX,\n compareMinY: compareNodeMinY,\n\n toJSON: function () { return this.data; },\n\n fromJSON: function (data) {\n this.data = data;\n return this;\n },\n\n _all: function (node, result) {\n var nodesToSearch = [];\n while (node) {\n if (node.leaf) result.push.apply(result, node.children);\n else nodesToSearch.push.apply(nodesToSearch, node.children);\n\n node = nodesToSearch.pop();\n }\n return result;\n },\n\n _build: function (items, left, right, height) {\n\n var N = right - left + 1,\n M = this._maxEntries,\n node;\n\n if (N <= M) {\n // reached leaf level; return leaf\n node = createNode(items.slice(left, right + 1));\n calcBBox(node, this.toBBox);\n return node;\n }\n\n if (!height) {\n // target height of the bulk-loaded tree\n height = Math.ceil(Math.log(N) / Math.log(M));\n\n // target number of root entries to maximize storage utilization\n M = Math.ceil(N / Math.pow(M, height - 1));\n }\n\n node = createNode([]);\n node.leaf = false;\n node.height = height;\n\n // split the items into M mostly square tiles\n\n var N2 = Math.ceil(N / M),\n N1 = N2 * Math.ceil(Math.sqrt(M)),\n i, j, right2, right3;\n\n multiSelect(items, left, right, N1, this.compareMinX);\n\n for (i = left; i <= right; i += N1) {\n\n right2 = Math.min(i + N1 - 1, right);\n\n multiSelect(items, i, right2, N2, this.compareMinY);\n\n for (j = i; j <= right2; j += N2) {\n\n right3 = Math.min(j + N2 - 1, right2);\n\n // pack each entry recursively\n node.children.push(this._build(items, j, right3, height - 1));\n }\n }\n\n calcBBox(node, this.toBBox);\n\n return node;\n },\n\n _chooseSubtree: function (bbox, node, level, path) {\n\n var i, len, child, targetNode, area, enlargement, minArea, minEnlargement;\n\n while (true) {\n path.push(node);\n\n if (node.leaf || path.length - 1 === level) break;\n\n minArea = minEnlargement = Infinity;\n\n for (i = 0, len = node.children.length; i < len; i++) {\n child = node.children[i];\n area = bboxArea(child);\n enlargement = enlargedArea(bbox, child) - area;\n\n // choose entry with the least area enlargement\n if (enlargement < minEnlargement) {\n minEnlargement = enlargement;\n minArea = area < minArea ? area : minArea;\n targetNode = child;\n\n } else if (enlargement === minEnlargement) {\n // otherwise choose one with the smallest area\n if (area < minArea) {\n minArea = area;\n targetNode = child;\n }\n }\n }\n\n node = targetNode || node.children[0];\n }\n\n return node;\n },\n\n _insert: function (item, level, isNode) {\n\n var toBBox = this.toBBox,\n bbox = isNode ? item : toBBox(item),\n insertPath = [];\n\n // find the best node for accommodating the item, saving all nodes along the path too\n var node = this._chooseSubtree(bbox, this.data, level, insertPath);\n\n // put the item into the node\n node.children.push(item);\n extend(node, bbox);\n\n // split on node overflow; propagate upwards if necessary\n while (level >= 0) {\n if (insertPath[level].children.length > this._maxEntries) {\n this._split(insertPath, level);\n level--;\n } else break;\n }\n\n // adjust bboxes along the insertion path\n this._adjustParentBBoxes(bbox, insertPath, level);\n },\n\n // split overflowed node into two\n _split: function (insertPath, level) {\n\n var node = insertPath[level],\n M = node.children.length,\n m = this._minEntries;\n\n this._chooseSplitAxis(node, m, M);\n\n var splitIndex = this._chooseSplitIndex(node, m, M);\n\n var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\n newNode.height = node.height;\n newNode.leaf = node.leaf;\n\n calcBBox(node, this.toBBox);\n calcBBox(newNode, this.toBBox);\n\n if (level) insertPath[level - 1].children.push(newNode);\n else this._splitRoot(node, newNode);\n },\n\n _splitRoot: function (node, newNode) {\n // split root node\n this.data = createNode([node, newNode]);\n this.data.height = node.height + 1;\n this.data.leaf = false;\n calcBBox(this.data, this.toBBox);\n },\n\n _chooseSplitIndex: function (node, m, M) {\n\n var i, bbox1, bbox2, overlap, area, minOverlap, minArea, index;\n\n minOverlap = minArea = Infinity;\n\n for (i = m; i <= M - m; i++) {\n bbox1 = distBBox(node, 0, i, this.toBBox);\n bbox2 = distBBox(node, i, M, this.toBBox);\n\n overlap = intersectionArea(bbox1, bbox2);\n area = bboxArea(bbox1) + bboxArea(bbox2);\n\n // choose distribution with minimum overlap\n if (overlap < minOverlap) {\n minOverlap = overlap;\n index = i;\n\n minArea = area < minArea ? area : minArea;\n\n } else if (overlap === minOverlap) {\n // otherwise choose distribution with minimum area\n if (area < minArea) {\n minArea = area;\n index = i;\n }\n }\n }\n\n return index;\n },\n\n // sorts node children by the best axis for split\n _chooseSplitAxis: function (node, m, M) {\n\n var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX,\n compareMinY = node.leaf ? this.compareMinY : compareNodeMinY,\n xMargin = this._allDistMargin(node, m, M, compareMinX),\n yMargin = this._allDistMargin(node, m, M, compareMinY);\n\n // if total distributions margin value is minimal for x, sort by minX,\n // otherwise it's already sorted by minY\n if (xMargin < yMargin) node.children.sort(compareMinX);\n },\n\n // total margin of all possible split distributions where each node is at least m full\n _allDistMargin: function (node, m, M, compare) {\n\n node.children.sort(compare);\n\n var toBBox = this.toBBox,\n leftBBox = distBBox(node, 0, m, toBBox),\n rightBBox = distBBox(node, M - m, M, toBBox),\n margin = bboxMargin(leftBBox) + bboxMargin(rightBBox),\n i, child;\n\n for (i = m; i < M - m; i++) {\n child = node.children[i];\n extend(leftBBox, node.leaf ? toBBox(child) : child);\n margin += bboxMargin(leftBBox);\n }\n\n for (i = M - m - 1; i >= m; i--) {\n child = node.children[i];\n extend(rightBBox, node.leaf ? toBBox(child) : child);\n margin += bboxMargin(rightBBox);\n }\n\n return margin;\n },\n\n _adjustParentBBoxes: function (bbox, path, level) {\n // adjust bboxes along the given tree path\n for (var i = level; i >= 0; i--) {\n extend(path[i], bbox);\n }\n },\n\n _condense: function (path) {\n // go through the path, removing empty nodes and updating bboxes\n for (var i = path.length - 1, siblings; i >= 0; i--) {\n if (path[i].children.length === 0) {\n if (i > 0) {\n siblings = path[i - 1].children;\n siblings.splice(siblings.indexOf(path[i]), 1);\n\n } else this.clear();\n\n } else calcBBox(path[i], this.toBBox);\n }\n },\n\n _initFormat: function (format) {\n // data format (minX, minY, maxX, maxY accessors)\n\n // uses eval-type function compilation instead of just accepting a toBBox function\n // because the algorithms are very sensitive to sorting functions performance,\n // so they should be dead simple and without inner calls\n\n var compareArr = ['return a', ' - b', ';'];\n\n this.compareMinX = new Function('a', 'b', compareArr.join(format[0]));\n this.compareMinY = new Function('a', 'b', compareArr.join(format[1]));\n\n this.toBBox = new Function('a',\n 'return {minX: a' + format[0] +\n ', minY: a' + format[1] +\n ', maxX: a' + format[2] +\n ', maxY: a' + format[3] + '};');\n }\n};\n\nfunction findItem(item, items, equalsFn) {\n if (!equalsFn) return items.indexOf(item);\n\n for (var i = 0; i < items.length; i++) {\n if (equalsFn(item, items[i])) return i;\n }\n return -1;\n}\n\n// calculate node's bbox from bboxes of its children\nfunction calcBBox(node, toBBox) {\n distBBox(node, 0, node.children.length, toBBox, node);\n}\n\n// min bounding rectangle of node children from k to p-1\nfunction distBBox(node, k, p, toBBox, destNode) {\n if (!destNode) destNode = createNode(null);\n destNode.minX = Infinity;\n destNode.minY = Infinity;\n destNode.maxX = -Infinity;\n destNode.maxY = -Infinity;\n\n for (var i = k, child; i < p; i++) {\n child = node.children[i];\n extend(destNode, node.leaf ? toBBox(child) : child);\n }\n\n return destNode;\n}\n\nfunction extend(a, b) {\n a.minX = Math.min(a.minX, b.minX);\n a.minY = Math.min(a.minY, b.minY);\n a.maxX = Math.max(a.maxX, b.maxX);\n a.maxY = Math.max(a.maxY, b.maxY);\n return a;\n}\n\nfunction compareNodeMinX(a, b) { return a.minX - b.minX; }\nfunction compareNodeMinY(a, b) { return a.minY - b.minY; }\n\nfunction bboxArea(a) { return (a.maxX - a.minX) * (a.maxY - a.minY); }\nfunction bboxMargin(a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }\n\nfunction enlargedArea(a, b) {\n return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *\n (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\n}\n\nfunction intersectionArea(a, b) {\n var minX = Math.max(a.minX, b.minX),\n minY = Math.max(a.minY, b.minY),\n maxX = Math.min(a.maxX, b.maxX),\n maxY = Math.min(a.maxY, b.maxY);\n\n return Math.max(0, maxX - minX) *\n Math.max(0, maxY - minY);\n}\n\nfunction contains(a, b) {\n return a.minX <= b.minX &&\n a.minY <= b.minY &&\n b.maxX <= a.maxX &&\n b.maxY <= a.maxY;\n}\n\nfunction intersects(a, b) {\n return b.minX <= a.maxX &&\n b.minY <= a.maxY &&\n b.maxX >= a.minX &&\n b.maxY >= a.minY;\n}\n\nfunction createNode(children) {\n return {\n children: children,\n height: 1,\n leaf: true,\n minX: Infinity,\n minY: Infinity,\n maxX: -Infinity,\n maxY: -Infinity\n };\n}\n\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\n// combines selection algorithm with binary divide & conquer approach\n\nfunction multiSelect(arr, left, right, n, compare) {\n var stack = [left, right],\n mid;\n\n while (stack.length) {\n right = stack.pop();\n left = stack.pop();\n\n if (right - left <= n) continue;\n\n mid = left + Math.ceil((right - left) / n / 2) * n;\n quickselect(arr, mid, left, right, compare);\n\n stack.push(left, mid, mid, right);\n }\n}\n\n\n//# sourceURL=webpack://LithoSphere/./node_modules/rbush/index.js?"); + +/***/ }), + +/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": +/*!****************************************************************************!*\ + !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDom.length; i++) {\n if (stylesInDom[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var index = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3]\n };\n\n if (index !== -1) {\n stylesInDom[index].references++;\n stylesInDom[index].updater(obj);\n } else {\n stylesInDom.push({\n identifier: identifier,\n updater: addStyle(obj, options),\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n var attributes = options.attributes || {};\n\n if (typeof attributes.nonce === 'undefined') {\n var nonce = true ? __webpack_require__.nc : undefined;\n\n if (nonce) {\n attributes.nonce = nonce;\n }\n }\n\n Object.keys(attributes).forEach(function (key) {\n style.setAttribute(key, attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.media ? \"@media \".concat(obj.media, \" {\").concat(obj.css, \"}\") : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n } else {\n style.removeAttribute('media');\n }\n\n if (sourceMap && typeof btoa !== 'undefined') {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of \",r),i=[e.slice(v,r-1)],r+=8):-1==p.indexOf(t)&&(r++,i=c());else r++;return{tagName:t,attributes:n,children:i}}function y(){var t=e[r],n=++r;return r=e.indexOf(t,n),e.slice(n,r)}var v,g=null;if(void 0!==t.attrValue)for(t.attrName=t.attrName||\"id\",g=[];-1!==(void 0,v=new RegExp(\"\\\\s\"+t.attrName+\"\\\\s*=['\\\"]\"+t.attrValue+\"['\\\"]\").exec(e),r=v?v.index:-1);)-1!==(r=e.lastIndexOf(\"<\",r))&&g.push(b()),e=e.substr(r),r=0;else g=t.parseNode?b():c();return t.filter&&(g=n.filter(g,t.filter)),t.setPos&&(g.pos=r),g}n.simplify=function(e){var t={};if(!e.length)return\"\";if(1===e.length&&\"string\"==typeof e[0])return e[0];for(var r in e.forEach((function(e){if(\"object\"==typeof e){t[e.tagName]||(t[e.tagName]=[]);var r=n.simplify(e.children||[]);t[e.tagName].push(r),e.attributes&&(r._attributes=e.attributes)}})),t)1==t[r].length&&(t[r]=t[r][0]);return t},n.filter=function(e,t){var r=[];return e.forEach((function(e){if(\"object\"==typeof e&&t(e)&&r.push(e),e.children){var i=n.filter(e.children,t);r=r.concat(i)}})),r},n.stringify=function(e){var t=\"\";function r(e){if(e)for(var r=0;r\",r(e.children),t+=\"\"}return r(e),t},n.toContentString=function(e){if(Array.isArray(e)){var t=\"\";return e.forEach((function(e){t=(t+=\" \"+n.toContentString(e)).trim()})),t}return\"object\"==typeof e?n.toContentString(e.children):\" \"+e},n.getElementById=function(e,t,r){var i=n(e,{attrValue:t});return r?n.simplify(i):i[0]},n.getElementsByClassName=function(e,t,r){const i=n(e,{attrName:\"class\",attrValue:\"[a-zA-Z0-9-s ]*\"+t+\"[a-zA-Z0-9-s ]*\"});return r?n.simplify(i):i},n.parseStream=function(t,r){if(\"string\"==typeof r&&(r=r.length+2),\"string\"==typeof t){var i=e(\"fs\");t=i.createReadStream(t,{start:r}),r=0}var o=r,a=\"\";return t.on(\"data\",(function(e){a+=e;for(var r=0;;){if(!(o=a.indexOf(\"<\",o)+1))return void(o=r);if(\"/\"!==a[o+1]){var i=n(a,{pos:o-1,parseNode:!0,setPos:!0});if((o=i.pos)>a.length-1||oo.length-1||i>24)/500+a,u=a-(e[i+2]<<24>>24)/200,l=void 0,f=void 0,c=void 0;f=-.9689*(s=.95047*(s*s*s>.008856?s*s*s:(s-16/116)/7.787))+1.8758*(a=1*(a*a*a>.008856?a*a*a:(a-16/116)/7.787))+.0415*(u=1.08883*(u*u*u>.008856?u*u*u:(u-16/116)/7.787)),c=.0557*s+-.204*a+1.057*u,l=(l=3.2406*s+-1.5372*a+-.4986*u)>.0031308?1.055*Math.pow(l,1/2.4)-.055:12.92*l,f=f>.0031308?1.055*Math.pow(f,1/2.4)-.055:12.92*f,c=c>.0031308?1.055*Math.pow(c,1/2.4)-.055:12.92*c,n[o]=255*Math.max(0,Math.min(1,l)),n[o+1]=255*Math.max(0,Math.min(1,f)),n[o+2]=255*Math.max(0,Math.min(1,c))}return n}},{}],IKSA:[function(e,t,r){\"use strict\";function n(e,t){var r=e.length-t,n=0;do{for(var i=t;i>0;i--)e[n+t]+=e[n],n++;r-=t}while(r>0)}function i(e,t,r){for(var n=0,i=e.length,o=i/r;i>t;){for(var a=t;a>0;--a)e[n+t]+=e[n],++n;i-=t}for(var s=e.slice(),u=0;u=e.byteLength);++c){var h=void 0;if(2===t){switch(a[0]){case 8:h=new Uint8Array(e,c*f*r*l,f*r*l);break;case 16:h=new Uint16Array(e,c*f*r*l,f*r*l/2);break;case 32:h=new Uint32Array(e,c*f*r*l,f*r*l/4);break;default:throw new Error(\"Predictor 2 not allowed with \".concat(a[0],\" bits per sample.\"))}n(h,f)}else 3===t&&i(h=new Uint8Array(e,c*f*r*l,f*r*l),f,l)}return e}},{}],FJDe:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=u(e(\"@babel/runtime/regenerator\")),i=u(e(\"@babel/runtime/helpers/asyncToGenerator\")),o=u(e(\"@babel/runtime/helpers/classCallCheck\")),a=u(e(\"@babel/runtime/helpers/createClass\")),s=e(\"../predictor\");function u(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(){(0,o.default)(this,e)}return(0,a.default)(e,[{key:\"decode\",value:function(){var e=(0,i.default)(n.default.mark((function e(t,r){var i,o,a,u,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.decodeBlock(r);case 2:if(i=e.sent,1===(o=t.Predictor||1)){e.next=9;break}return a=!t.StripOffsets,u=a?t.TileWidth:t.ImageWidth,l=a?t.TileLength:t.RowsPerStrip||t.ImageLength,e.abrupt(\"return\",(0,s.applyPredictor)(i,o,u,l,t.BitsPerSample,t.PlanarConfiguration));case 9:return e.abrupt(\"return\",i);case 10:case\"end\":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()}]),e}();r.default=l},{\"@babel/runtime/regenerator\":\"PMvg\",\"@babel/runtime/helpers/asyncToGenerator\":\"agGE\",\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\",\"../predictor\":\"IKSA\"}],V9bQ:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=u(e(\"@babel/runtime/helpers/classCallCheck\")),i=u(e(\"@babel/runtime/helpers/createClass\")),o=u(e(\"@babel/runtime/helpers/inherits\")),a=u(e(\"@babel/runtime/helpers/possibleConstructorReturn\")),s=u(e(\"@babel/runtime/helpers/getPrototypeOf\"));function u(e){return e&&e.__esModule?e:{default:e}}function l(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,s.default)(e);if(t){var i=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,a.default)(this,r)}}var f=function(e){(0,o.default)(r,e);var t=l(r);function r(){return(0,n.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r,[{key:\"decodeBlock\",value:function(e){return e}}]),r}(u(e(\"./basedecoder\")).default);r.default=f},{\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\",\"@babel/runtime/helpers/inherits\":\"d4H2\",\"@babel/runtime/helpers/possibleConstructorReturn\":\"pxk2\",\"@babel/runtime/helpers/getPrototypeOf\":\"UJE0\",\"./basedecoder\":\"FJDe\"}],tcId:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=l(e(\"@babel/runtime/helpers/classCallCheck\")),i=l(e(\"@babel/runtime/helpers/createClass\")),o=l(e(\"@babel/runtime/helpers/inherits\")),a=l(e(\"@babel/runtime/helpers/possibleConstructorReturn\")),s=l(e(\"@babel/runtime/helpers/getPrototypeOf\")),u=l(e(\"./basedecoder\"));function l(e){return e&&e.__esModule?e:{default:e}}function f(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,s.default)(e);if(t){var i=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,a.default)(this,r)}}function c(e,t){for(var r=t.length-1;r>=0;r--)e.push(t[r]);return e}function h(e){for(var t=new Uint16Array(4093),r=new Uint8Array(4093),n=0;n<=257;n++)t[n]=4096,r[n]=n;var i=258,o=9,a=0;function s(){i=258,o=9}function u(e){var t=function(e,t,r){var n=t%8,i=Math.floor(t/8),o=8-n,a=t+r-8*(i+1),s=8*(i+2)-(t+r),u=8*(i+2)-t;if(s=Math.max(0,s),i>=e.length)return console.warn(\"ran off the end of the buffer before finding EOI_CODE (end on input code)\"),257;var l=e[i]&Math.pow(2,8-n)-1,f=l<<=r-o;if(i+1>>s;f+=c<<=Math.max(0,r-u)}if(a>8&&i+2>>h}return f}(e,a,o);return a+=o,t}function l(e,n){return r[i]=n,t[i]=e,++i-1}function f(e){for(var n=[],i=e;4096!==i;i=t[i])n.push(r[i]);return n}var h=[];s();for(var d,p=new Uint8Array(e),b=u(p);257!==b;){if(256===b){for(s(),b=u(p);256===b;)b=u(p);if(257===b)break;if(b>256)throw new Error(\"corrupted code at scanline \".concat(b));c(h,f(b)),d=b}else if(b=Math.pow(2,o)&&(12===o?d=void 0:o++),b=u(p)}return new Uint8Array(h)}var d=function(e){(0,o.default)(r,e);var t=f(r);function r(){return(0,n.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r,[{key:\"decodeBlock\",value:function(e){return h(e).buffer}}]),r}(u.default);r.default=d},{\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\",\"@babel/runtime/helpers/inherits\":\"d4H2\",\"@babel/runtime/helpers/possibleConstructorReturn\":\"pxk2\",\"@babel/runtime/helpers/getPrototypeOf\":\"UJE0\",\"./basedecoder\":\"FJDe\"}],J7kk:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=f(e(\"@babel/runtime/helpers/inherits\")),i=f(e(\"@babel/runtime/helpers/possibleConstructorReturn\")),o=f(e(\"@babel/runtime/helpers/getPrototypeOf\")),a=f(e(\"@babel/runtime/helpers/classCallCheck\")),s=f(e(\"@babel/runtime/helpers/createClass\")),u=f(e(\"@babel/runtime/helpers/typeof\")),l=f(e(\"./basedecoder\"));function f(e){return e&&e.__esModule?e:{default:e}}function c(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,o.default)(e);if(t){var a=(0,o.default)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,i.default)(this,r)}}var h=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),d=4017,p=799,b=3406,y=2276,v=1567,g=3784,m=5793,w=2896;function _(e,t){for(var r=0,n=[],i=16;i>0&&!e[i-1];)--i;n.push({children:[],index:0});for(var o,a=n[0],s=0;s0;)a=n.pop();for(a.index++,n.push(a);n.length<=s;)n.push(o={children:[],index:0}),a.children[a.index]=o.children,a=o;r++}s+10)return b>>--y&1;if(255===(b=e[p++])){var t=e[p++];if(t)throw new Error(\"unexpected marker: \".concat((b<<8|t).toString(16)))}return y=7,b>>>7}function g(e){for(var t,r=e;null!==(t=v());){if(\"number\"==typeof(r=r[t]))return r;if(\"object\"!==(0,u.default)(r))throw new Error(\"invalid huffman sequence\")}return null}function m(e){for(var t=e,r=0;t>0;){var n=v();if(null===n)return;r=r<<1|n,--t}return r}function w(e){var t=m(e);return t>=1<0)k--;else for(var r=o,n=a;r<=n;){var i=g(e.huffmanTableAC),s=15&i,u=i>>4;if(0===s){if(u<15){k=m(u)+(1<>4,0===c)i<15?(k=m(i)+(1<>4;if(0===a){if(s<15)break;i+=16}else t[h[i+=s]]=w(a),i++}};var A,I,D=0;I=1===M?n[0].blocksPerLine*n[0].blocksPerColumn:f*r.mcusPerColumn;for(var L=i||I;D=65488&&A<=65495))break;p+=2}return p-d}function x(e,t){var r=[],n=t.blocksPerLine,i=t.blocksPerColumn,o=n<<3,a=new Int32Array(64),s=new Uint8Array(64);function u(e,r,n){var i,o,a,s,u,l,f,c,h,_,k=t.quantizationTable,x=n;for(_=0;_<64;_++)x[_]=e[_]*k[_];for(_=0;_<8;++_){var S=8*_;0!==x[1+S]||0!==x[2+S]||0!==x[3+S]||0!==x[4+S]||0!==x[5+S]||0!==x[6+S]||0!==x[7+S]?(i=m*x[0+S]+128>>8,o=m*x[4+S]+128>>8,a=x[2+S],s=x[6+S],u=w*(x[1+S]-x[7+S])+128>>8,c=w*(x[1+S]+x[7+S])+128>>8,l=x[3+S]<<4,f=x[5+S]<<4,h=i-o+1>>1,i=i+o+1>>1,o=h,h=a*g+s*v+128>>8,a=a*v-s*g+128>>8,s=h,h=u-f+1>>1,u=u+f+1>>1,f=h,h=c+l+1>>1,l=c-l+1>>1,c=h,h=i-s+1>>1,i=i+s+1>>1,s=h,h=o-a+1>>1,o=o+a+1>>1,a=h,h=u*y+c*b+2048>>12,u=u*b-c*y+2048>>12,c=h,h=l*p+f*d+2048>>12,l=l*d-f*p+2048>>12,f=h,x[0+S]=i+c,x[7+S]=i-c,x[1+S]=o+f,x[6+S]=o-f,x[2+S]=a+l,x[5+S]=a-l,x[3+S]=s+u,x[4+S]=s-u):(h=m*x[0+S]+512>>10,x[0+S]=h,x[1+S]=h,x[2+S]=h,x[3+S]=h,x[4+S]=h,x[5+S]=h,x[6+S]=h,x[7+S]=h)}for(_=0;_<8;++_){var O=_;0!==x[8+O]||0!==x[16+O]||0!==x[24+O]||0!==x[32+O]||0!==x[40+O]||0!==x[48+O]||0!==x[56+O]?(i=m*x[0+O]+2048>>12,o=m*x[32+O]+2048>>12,a=x[16+O],s=x[48+O],u=w*(x[8+O]-x[56+O])+2048>>12,c=w*(x[8+O]+x[56+O])+2048>>12,l=x[24+O],f=x[40+O],h=i-o+1>>1,i=i+o+1>>1,o=h,h=a*g+s*v+2048>>12,a=a*v-s*g+2048>>12,s=h,h=u-f+1>>1,u=u+f+1>>1,f=h,h=c+l+1>>1,l=c-l+1>>1,c=h,h=i-s+1>>1,i=i+s+1>>1,s=h,h=o-a+1>>1,o=o+a+1>>1,a=h,h=u*y+c*b+2048>>12,u=u*b-c*y+2048>>12,c=h,h=l*p+f*d+2048>>12,l=l*d-f*p+2048>>12,f=h,x[0+O]=i+c,x[56+O]=i-c,x[8+O]=o+f,x[48+O]=o-f,x[16+O]=a+l,x[40+O]=a-l,x[24+O]=s+u,x[32+O]=s-u):(h=m*n[_+0]+8192>>14,x[0+O]=h,x[8+O]=h,x[16+O]=h,x[24+O]=h,x[32+O]=h,x[40+O]=h,x[48+O]=h,x[56+O]=h)}for(_=0;_<64;++_){var T=128+(x[_]+8>>4);r[_]=T<0?0:T>255?255:T}}for(var l=0;l>4==0)for(var c=0;c<64;c++)f[h[c]]=e[t++];else{if(l>>4!=1)throw new Error(\"DQT: invalid table spec\");for(var d=0;d<64;d++)f[h[d]]=r()}this.quantizationTables[15&l]=f}break;case 65472:case 65473:case 65474:r();for(var p={extended:65473===a,progressive:65474===a,precision:e[t++],scanLines:r(),samplesPerLine:r(),components:{},componentsOrder:[]},b=e[t++],y=void 0,v=0;v>4,m=15&e[t+1],w=e[t+2];p.componentsOrder.push(y),p.components[y]={h:g,v:m,quantizationIdx:w},t+=3}n(p),this.frames.push(p);break;case 65476:for(var x=r(),S=2;S>4==0?this.huffmanTablesDC[15&O]=_(T,P):this.huffmanTablesAC[15&O]=_(T,P)}break;case 65501:r(),this.resetInterval=r();break;case 65498:r();for(var R=e[t++],M=[],A=this.frames[0],I=0;I>4],D.huffmanTableAC=this.huffmanTablesAC[15&L],M.push(D)}var N=e[t++],F=e[t++],U=e[t++],B=k(e,t,A,M,this.resetInterval,N,F,U>>4,15&U);t+=B;break;case 65535:255!==e[t]&&t--;break;default:if(255===e[t-3]&&e[t-2]>=192&&e[t-2]<=254){t-=3;break}throw new Error(\"unknown JPEG marker \".concat(a.toString(16)))}a=r()}}},{key:\"getResult\",value:function(){var e=this.frames;if(0===this.frames.length)throw new Error(\"no frames were decoded\");this.frames.length>1&&console.warn(\"more than one frame is not supported\");for(var t=0;t>>16&65535|0,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}},{}],X4kj:[function(e,t,r){\"use strict\";var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,i){var o=n,a=i+r;e^=-1;for(var s=i;s>>8^o[255&(e^t[s])];return-1^e}},{}],LP5M:[function(e,t,r){\"use strict\";t.exports=function(e,t){var r,n,i,o,a,s,u,l,f,c,h,d,p,b,y,v,g,m,w,_,k,x,S,O,T;r=e.state,n=e.next_in,O=e.input,i=n+(e.avail_in-5),o=e.next_out,T=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),u=r.dmax,l=r.wsize,f=r.whave,c=r.wnext,h=r.window,d=r.hold,p=r.bits,b=r.lencode,y=r.distcode,v=(1<>>=w=m>>>24,p-=w,0==(w=m>>>16&255))T[o++]=65535&m;else{if(!(16&w)){if(0==(64&w)){m=b[(65535&m)+(d&(1<>>=w,p-=w),p<15&&(d+=O[n++]<>>=w=m>>>24,p-=w,!(16&(w=m>>>16&255))){if(0==(64&w)){m=y[(65535&m)+(d&(1<u){e.msg=\"invalid distance too far back\",r.mode=30;break e}if(d>>>=w,p-=w,k>(w=o-a)){if((w=k-w)>f&&r.sane){e.msg=\"invalid distance too far back\",r.mode=30;break e}if(x=0,S=h,0===c){if(x+=l-w,w<_){_-=w;do{T[o++]=h[x++]}while(--w);x=o-k,S=T}}else if(c2;)T[o++]=S[x++],T[o++]=S[x++],T[o++]=S[x++],_-=3;_&&(T[o++]=S[x++],_>1&&(T[o++]=S[x++]))}else{x=o-k;do{T[o++]=T[x++],T[o++]=T[x++],T[o++]=T[x++],_-=3}while(_>2);_&&(T[o++]=T[x++],_>1&&(T[o++]=T[x++]))}break}}break}}while(n>3,d&=(1<<(p-=_<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=n=1&&0===L[E];E--);if(C>E&&(C=E),0===E)return f[c++]=20971520,f[c++]=20971520,d.bits=1,0;for(T=1;T0&&(0===e||1!==E))return-1;for(N[1]=0,S=1;S852||2===e&&M>592)return 1;for(;;){w=S-j,h[O]m?(_=F[U+h[O]],k=I[D+h[O]]):(_=96,k=0),p=1<>j)+(b-=p)]=w<<24|_<<16|k|0}while(0!==b);for(p=1<>=1;if(0!==p?(A&=p-1,A+=p):A=0,O++,0==--L[S]){if(S===E)break;S=t[r+h[O]]}if(S>C&&(A&v)!==y){for(0===j&&(j=C),g+=T,R=1<<(P=S-j);P+j852||2===e&&M>592)return 1;f[y=A&v]=C<<24|P<<16|g-c|0}}return 0!==A&&(f[g+A]=S-j<<24|64<<16|0),d.bits=C,0}},{\"../utils/common\":\"tbG5\"}],GIDK:[function(e,t,r){\"use strict\";var n=e(\"../utils/common\"),i=e(\"./adler32\"),o=e(\"./crc32\"),a=e(\"./inffast\"),s=e(\"./inftrees\"),u=-2,l=12,f=30;function c(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=\"\",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):u}function p(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,d(e)):u}function b(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?u:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,p(e))):u}function y(e,t){var r,n;return e?(n=new h,e.state=n,n.window=null,0!==(r=b(e,t))&&(e.state=null),r):u}var v,g,m=!0;function w(e){if(m){var t;for(v=new n.Buf32(512),g=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,v,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,g,0,e.work,{bits:5}),m=!1}e.lencode=v,e.lenbits=9,e.distcode=g,e.distbits=5}function _(e,t,r,i){var o,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,t,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=o(r.check,F,2,0),g=0,m=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&g)<<8)+(g>>8))%31){e.msg=\"incorrect header check\",r.mode=f;break}if(8!=(15&g)){e.msg=\"unknown compression method\",r.mode=f;break}if(m-=4,A=8+(15&(g>>>=4)),0===r.wbits)r.wbits=A;else if(A>r.wbits){e.msg=\"invalid window size\",r.mode=f;break}r.dmax=1<>8&1),512&r.flags&&(F[0]=255&g,F[1]=g>>>8&255,r.check=o(r.check,F,2,0)),g=0,m=0,r.mode=3;case 3:for(;m<32;){if(0===y)break e;y--,g+=h[p++]<>>8&255,F[2]=g>>>16&255,F[3]=g>>>24&255,r.check=o(r.check,F,4,0)),g=0,m=0,r.mode=4;case 4:for(;m<16;){if(0===y)break e;y--,g+=h[p++]<>8),512&r.flags&&(F[0]=255&g,F[1]=g>>>8&255,r.check=o(r.check,F,2,0)),g=0,m=0,r.mode=5;case 5:if(1024&r.flags){for(;m<16;){if(0===y)break e;y--,g+=h[p++]<>>8&255,r.check=o(r.check,F,2,0)),g=0,m=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((S=r.length)>y&&(S=y),S&&(r.head&&(A=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,h,p,S,A)),512&r.flags&&(r.check=o(r.check,h,S,p)),y-=S,p+=S,r.length-=S),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===y)break e;S=0;do{A=h[p+S++],r.head&&A&&r.length<65536&&(r.head.name+=String.fromCharCode(A))}while(A&&S>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=l;break;case 10:for(;m<32;){if(0===y)break e;y--,g+=h[p++]<>>=7&m,m-=7&m,r.mode=27;break}for(;m<3;){if(0===y)break e;y--,g+=h[p++]<>>=1)){case 0:r.mode=14;break;case 1:if(w(r),r.mode=20,6===t){g>>>=2,m-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg=\"invalid block type\",r.mode=f}g>>>=2,m-=2;break;case 14:for(g>>>=7&m,m-=7&m;m<32;){if(0===y)break e;y--,g+=h[p++]<>>16^65535)){e.msg=\"invalid stored block lengths\",r.mode=f;break}if(r.length=65535&g,g=0,m=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(S=r.length){if(S>y&&(S=y),S>v&&(S=v),0===S)break e;n.arraySet(d,h,p,S,b),y-=S,p+=S,v-=S,b+=S,r.length-=S;break}r.mode=l;break;case 17:for(;m<14;){if(0===y)break e;y--,g+=h[p++]<>>=5,m-=5,r.ndist=1+(31&g),g>>>=5,m-=5,r.ncode=4+(15&g),g>>>=4,m-=4,r.nlen>286||r.ndist>30){e.msg=\"too many length or distance symbols\",r.mode=f;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,m-=3}for(;r.have<19;)r.lens[U[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,D={bits:r.lenbits},I=s(0,r.lens,0,19,r.lencode,0,r.work,D),r.lenbits=D.bits,I){e.msg=\"invalid code lengths set\",r.mode=f;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,P=65535&N,!((E=N>>>24)<=m);){if(0===y)break e;y--,g+=h[p++]<>>=E,m-=E,r.lens[r.have++]=P;else{if(16===P){for(L=E+2;m>>=E,m-=E,0===r.have){e.msg=\"invalid bit length repeat\",r.mode=f;break}A=r.lens[r.have-1],S=3+(3&g),g>>>=2,m-=2}else if(17===P){for(L=E+3;m>>=E)),g>>>=3,m-=3}else{for(L=E+7;m>>=E)),g>>>=7,m-=7}if(r.have+S>r.nlen+r.ndist){e.msg=\"invalid bit length repeat\",r.mode=f;break}for(;S--;)r.lens[r.have++]=A}}if(r.mode===f)break;if(0===r.lens[256]){e.msg=\"invalid code -- missing end-of-block\",r.mode=f;break}if(r.lenbits=9,D={bits:r.lenbits},I=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,D),r.lenbits=D.bits,I){e.msg=\"invalid literal/lengths set\",r.mode=f;break}if(r.distbits=6,r.distcode=r.distdyn,D={bits:r.distbits},I=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,D),r.distbits=D.bits,I){e.msg=\"invalid distances set\",r.mode=f;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(y>=6&&v>=258){e.next_out=b,e.avail_out=v,e.next_in=p,e.avail_in=y,r.hold=g,r.bits=m,a(e,x),b=e.next_out,d=e.output,v=e.avail_out,p=e.next_in,h=e.input,y=e.avail_in,g=r.hold,m=r.bits,r.mode===l&&(r.back=-1);break}for(r.back=0;C=(N=r.lencode[g&(1<>>16&255,P=65535&N,!((E=N>>>24)<=m);){if(0===y)break e;y--,g+=h[p++]<>j)])>>>16&255,P=65535&N,!(j+(E=N>>>24)<=m);){if(0===y)break e;y--,g+=h[p++]<>>=j,m-=j,r.back+=j}if(g>>>=E,m-=E,r.back+=E,r.length=P,0===C){r.mode=26;break}if(32&C){r.back=-1,r.mode=l;break}if(64&C){e.msg=\"invalid literal/length code\",r.mode=f;break}r.extra=15&C,r.mode=22;case 22:if(r.extra){for(L=r.extra;m>>=r.extra,m-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;C=(N=r.distcode[g&(1<>>16&255,P=65535&N,!((E=N>>>24)<=m);){if(0===y)break e;y--,g+=h[p++]<>j)])>>>16&255,P=65535&N,!(j+(E=N>>>24)<=m);){if(0===y)break e;y--,g+=h[p++]<>>=j,m-=j,r.back+=j}if(g>>>=E,m-=E,r.back+=E,64&C){e.msg=\"invalid distance code\",r.mode=f;break}r.offset=P,r.extra=15&C,r.mode=24;case 24:if(r.extra){for(L=r.extra;m>>=r.extra,m-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg=\"invalid distance too far back\",r.mode=f;break}r.mode=25;case 25:if(0===v)break e;if(S=x-v,r.offset>S){if((S=r.offset-S)>r.whave&&r.sane){e.msg=\"invalid distance too far back\",r.mode=f;break}S>r.wnext?(S-=r.wnext,O=r.wsize-S):O=r.wnext-S,S>r.length&&(S=r.length),T=r.window}else T=d,O=b-r.offset,S=r.length;S>v&&(S=v),v-=S,r.length-=S;do{d[b++]=T[O++]}while(--S);0===r.length&&(r.mode=21);break;case 26:if(0===v)break e;d[b++]=r.length,v--,r.mode=21;break;case 27:if(r.wrap){for(;m<32;){if(0===y)break e;y--,g|=h[p++]<=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function u(e,t){if(t<65534&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r=\"\",a=0;a>>6,t[a++]=128|63&r):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t},r.buf2binstring=function(e){return u(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r4)l[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r1?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return u(l,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}},{\"./common\":\"tbG5\"}],xUUw:[function(e,t,r){\"use strict\";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],gMAY:[function(e,t,r){\"use strict\";t.exports={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"}},{}],bdtv:[function(e,t,r){\"use strict\";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0}},{}],WIli:[function(e,t,r){\"use strict\";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=\"\",this.comment=\"\",this.hcrc=0,this.done=!1}},{}],faQk:[function(e,t,r){\"use strict\";var n=e(\"./zlib/inflate\"),i=e(\"./utils/common\"),o=e(\"./utils/strings\"),a=e(\"./zlib/constants\"),s=e(\"./zlib/messages\"),u=e(\"./zlib/zstream\"),l=e(\"./zlib/gzheader\"),f=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:\"\"},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==a.Z_OK)throw new Error(s[r]);if(this.header=new l,n.inflateGetHeader(this.strm,this.header),t.dictionary&&(\"string\"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):\"[object ArrayBuffer]\"===f.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(s[r])}function h(e,t){var r=new c(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}c.prototype.push=function(e,t){var r,s,u,l,c,h=this.strm,d=this.options.chunkSize,p=this.options.dictionary,b=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,\"string\"==typeof e?h.input=o.binstring2buf(e):\"[object ArrayBuffer]\"===f.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(d),h.next_out=0,h.avail_out=d),(r=n.inflate(h,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===a.Z_BUF_ERROR&&!0===b&&(r=a.Z_OK,b=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&r!==a.Z_STREAM_END&&(0!==h.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||(\"string\"===this.options.to?(u=o.utf8border(h.output,h.next_out),l=h.next_out-u,c=o.buf2string(h.output,u),h.next_out=l,h.avail_out=d-l,l&&i.arraySet(h.output,h.output,u,l,0),this.onData(c)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(b=!0)}while((h.avail_in>0||0===h.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),h.avail_out=0,!0)},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){e===a.Z_OK&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=c,r.inflate=h,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},r.ungzip=h},{\"./zlib/inflate\":\"GIDK\",\"./utils/common\":\"tbG5\",\"./utils/strings\":\"Q3ZD\",\"./zlib/constants\":\"xUUw\",\"./zlib/messages\":\"gMAY\",\"./zlib/zstream\":\"bdtv\",\"./zlib/gzheader\":\"WIli\"}],JAiC:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=l(e(\"@babel/runtime/helpers/classCallCheck\")),i=l(e(\"@babel/runtime/helpers/createClass\")),o=l(e(\"@babel/runtime/helpers/inherits\")),a=l(e(\"@babel/runtime/helpers/possibleConstructorReturn\")),s=l(e(\"@babel/runtime/helpers/getPrototypeOf\")),u=e(\"pako/lib/inflate\");function l(e){return e&&e.__esModule?e:{default:e}}function f(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,s.default)(e);if(t){var i=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,a.default)(this,r)}}var c=function(e){(0,o.default)(r,e);var t=f(r);function r(){return(0,n.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r,[{key:\"decodeBlock\",value:function(e){return(0,u.inflate)(new Uint8Array(e)).buffer}}]),r}(l(e(\"./basedecoder\")).default);r.default=c},{\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\",\"@babel/runtime/helpers/inherits\":\"d4H2\",\"@babel/runtime/helpers/possibleConstructorReturn\":\"pxk2\",\"@babel/runtime/helpers/getPrototypeOf\":\"UJE0\",\"pako/lib/inflate\":\"faQk\",\"./basedecoder\":\"FJDe\"}],OcPz:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=u(e(\"@babel/runtime/helpers/classCallCheck\")),i=u(e(\"@babel/runtime/helpers/createClass\")),o=u(e(\"@babel/runtime/helpers/inherits\")),a=u(e(\"@babel/runtime/helpers/possibleConstructorReturn\")),s=u(e(\"@babel/runtime/helpers/getPrototypeOf\"));function u(e){return e&&e.__esModule?e:{default:e}}function l(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,s.default)(e);if(t){var i=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,a.default)(this,r)}}var f=function(e){(0,o.default)(r,e);var t=l(r);function r(){return(0,n.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r,[{key:\"decodeBlock\",value:function(e){for(var t=new DataView(e),r=[],n=0;n3&&void 0!==arguments[3]?arguments[3]:1;return new(Object.getPrototypeOf(e).constructor)(t*r*n)}function i(e,t,r,i,o){var a=t/i,s=r/o;return e.map((function(e){for(var u=n(e,i,o),l=0;l5&&void 0!==arguments[5]?arguments[5]:\"nearest\";switch(s.toLowerCase()){case\"nearest\":return i(e,t,r,n,o);case\"bilinear\":case\"linear\":return a(e,t,r,n,o);default:throw new Error(\"Unsupported resampling method: '\".concat(s,\"'\"))}},r.resampleNearestInterleaved=s,r.resampleBilinearInterleaved=u,r.resampleInterleaved=function(e,t,r,n,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:\"nearest\";switch(a.toLowerCase()){case\"nearest\":return s(e,t,r,n,i,o);case\"bilinear\":case\"linear\":return u(e,t,r,n,i,o);default:throw new Error(\"Unsupported resampling method: '\".concat(a,\"'\"))}}},{}],eOWo:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=p(e(\"@babel/runtime/helpers/slicedToArray\")),i=p(e(\"@babel/runtime/regenerator\")),o=p(e(\"@babel/runtime/helpers/asyncToGenerator\")),a=p(e(\"@babel/runtime/helpers/classCallCheck\")),s=p(e(\"@babel/runtime/helpers/createClass\")),u=e(\"@petamoriken/float16\"),l=p(e(\"txml\")),f=e(\"./globals\"),c=e(\"./rgb\"),h=e(\"./compression\"),d=e(\"./resample\");function p(e){return e&&e.__esModule?e:{default:e}}function b(e,t,r){for(var n=0,i=t;i>8-i-_&f;else if(_+i<=16)l[m]=s.getUint16(w)>>16-i-_&f;else if(_+i<=24){var k=s.getUint16(w)<<8|s.getUint8(w+2);l[m]=k>>24-i-_&f}else l[m]=s.getUint32(w)>>32-i-_&f}}return l.buffer}var m=function(){function e(t,r,n,i,o,s){(0,a.default)(this,e),this.fileDirectory=t,this.geoKeys=r,this.dataView=n,this.littleEndian=i,this.tiles=o?{}:null,this.isTiled=!t.StripOffsets;var u=t.PlanarConfiguration;if(this.planarConfiguration=void 0===u?1:u,1!==this.planarConfiguration&&2!==this.planarConfiguration)throw new Error(\"Invalid planar configuration.\");this.source=s}return(0,s.default)(e,[{key:\"getFileDirectory\",value:function(){return this.fileDirectory}},{key:\"getGeoKeys\",value:function(){return this.geoKeys}},{key:\"getWidth\",value:function(){return this.fileDirectory.ImageWidth}},{key:\"getHeight\",value:function(){return this.fileDirectory.ImageLength}},{key:\"getSamplesPerPixel\",value:function(){return void 0!==this.fileDirectory.SamplesPerPixel?this.fileDirectory.SamplesPerPixel:1}},{key:\"getTileWidth\",value:function(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()}},{key:\"getTileHeight\",value:function(){return this.isTiled?this.fileDirectory.TileLength:void 0!==this.fileDirectory.RowsPerStrip?Math.min(this.fileDirectory.RowsPerStrip,this.getHeight()):this.getHeight()}},{key:\"getBlockWidth\",value:function(){return this.getTileWidth()}},{key:\"getBlockHeight\",value:function(e){return this.isTiled||(e+1)*this.getTileHeight()<=this.getHeight()?this.getTileHeight():this.getHeight()-e*this.getTileHeight()}},{key:\"getBytesPerPixel\",value:function(){for(var e=0,t=0;t=this.fileDirectory.BitsPerSample.length)throw new RangeError(\"Sample index \".concat(e,\" is out of range.\"));return Math.ceil(this.fileDirectory.BitsPerSample[e]/8)}},{key:\"getReaderForSample\",value:function(e){var t=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1,r=this.fileDirectory.BitsPerSample[e];switch(t){case 1:if(r<=8)return DataView.prototype.getUint8;if(r<=16)return DataView.prototype.getUint16;if(r<=32)return DataView.prototype.getUint32;break;case 2:if(r<=8)return DataView.prototype.getInt8;if(r<=16)return DataView.prototype.getInt16;if(r<=32)return DataView.prototype.getInt32;break;case 3:switch(r){case 16:return function(e,t){return(0,u.getFloat16)(this,e,t)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error(\"Unsupported data format/bitsPerSample\")}},{key:\"getSampleFormat\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1}},{key:\"getBitsPerSample\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.fileDirectory.BitsPerSample[e]}},{key:\"getArrayForSample\",value:function(e,t){return y(this.getSampleFormat(e),this.getBitsPerSample(e),t)}},{key:\"getTileOrStrip\",value:function(){var e=(0,o.default)(i.default.mark((function e(t,r,n,a,s){var u,l,f,c,h,d,p,b,y=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=Math.ceil(this.getWidth()/this.getTileWidth()),l=Math.ceil(this.getHeight()/this.getTileHeight()),c=this.tiles,1===this.planarConfiguration?f=r*u+t:2===this.planarConfiguration&&(f=n*u*l+r*u+t),this.isTiled?(h=this.fileDirectory.TileOffsets[f],d=this.fileDirectory.TileByteCounts[f]):(h=this.fileDirectory.StripOffsets[f],d=this.fileDirectory.StripByteCounts[f]),e.next=7,this.source.fetch([{offset:h,length:d}],s);case 7:return p=e.sent[0],null!==c&&c[f]?b=c[f]:(b=(0,o.default)(i.default.mark((function e(){var t,n,o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.decode(y.fileDirectory,p);case 2:return t=e.sent,n=y.getSampleFormat(),o=y.getBitsPerSample(),v(n,o)&&(t=g(t,n,y.planarConfiguration,y.getSamplesPerPixel(),o,y.getTileWidth(),y.getBlockHeight(r))),e.abrupt(\"return\",t);case 7:case\"end\":return e.stop()}}),e)})))(),null!==c&&(c[f]=b)),e.t0=t,e.t1=r,e.t2=n,e.next=14,b;case 14:return e.t3=e.sent,e.abrupt(\"return\",{x:e.t0,y:e.t1,sample:e.t2,data:e.t3});case 16:case\"end\":return e.stop()}}),e,this)})));return function(t,r,n,i,o){return e.apply(this,arguments)}}()},{key:\"_readRaster\",value:function(){var e=(0,o.default)(i.default.mark((function e(t,r,n,o,a,s,u,l,f){var c,h,p,y,v,g,m,w,_,k,x,S,O,T,E,C,P,j,R=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(c=this.getTileWidth(),h=this.getTileHeight(),p=Math.max(Math.floor(t[0]/c),0),y=Math.min(Math.ceil(t[2]/c),Math.ceil(this.getWidth()/this.getTileWidth())),v=Math.max(Math.floor(t[1]/h),0),g=Math.min(Math.ceil(t[3]/h),Math.ceil(this.getHeight()/this.getTileHeight())),m=t[2]-t[0],w=this.getBytesPerPixel(),_=[],k=[],x=0;x0&&void 0!==j[0]?j[0]:{},r=t.window,n=t.samples,o=void 0===n?[]:n,a=t.interleave,s=t.pool,u=void 0===s?null:s,l=t.width,f=t.height,c=t.resampleMethod,d=t.fillValue,p=t.signal,!((b=r||[0,0,this.getWidth(),this.getHeight()])[0]>b[2]||b[1]>b[3])){e.next=4;break}throw new Error(\"Invalid subsets\");case 4:if(v=b[2]-b[0],g=b[3]-b[1],m=v*g,w=this.getSamplesPerPixel(),o&&o.length){e.next=12;break}for(_=0;_=w)){e.next=16;break}return e.abrupt(\"return\",Promise.reject(new RangeError(\"Invalid sample index '\".concat(o[k],\"'.\"))));case 16:++k,e.next=13;break;case 19:if(a)S=this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,O=Math.max.apply(null,this.fileDirectory.BitsPerSample),x=y(S,O,m*o.length),d&&x.fill(d);else for(x=[],T=0;T0&&void 0!==S[0]?S[0]:{},r=t.window,n=t.pool,o=void 0===n?null:n,a=t.width,s=t.height,u=t.resampleMethod,l=t.enableAlpha,h=void 0!==l&&l,d=t.signal,!((p=r||[0,0,this.getWidth(),this.getHeight()])[0]>p[2]||p[1]>p[3])){e.next=4;break}throw new Error(\"Invalid subsets\");case 4:if((b=this.fileDirectory.PhotometricInterpretation)!==f.photometricInterpretations.RGB){e.next=9;break}if(y=[0,1,2],this.fileDirectory.ExtraSamples!==f.ExtraSamplesValues.Unspecified&&h)for(y=[],v=0;v0&&void 0!==arguments[0]?arguments[0]:null,t={};if(!this.fileDirectory.GDAL_METADATA)return null;var r=this.fileDirectory.GDAL_METADATA,n=(0,l.default)(r.substring(0,r.length-1));if(!n[0].tagName)throw new Error(\"Failed to parse GDAL metadata XML.\");var i=n[0];if(\"GDALMetadata\"!==i.tagName)throw new Error(\"Unexpected GDAL metadata XML tag.\");var o=i.children.filter((function(e){return\"Item\"===e.tagName}));null!==e&&(o=o.filter((function(t){return Number(t.attributes.sample)===e})));for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null,t=this.fileDirectory.ModelPixelScale,r=this.fileDirectory.ModelTransformation;if(t)return[t[0],-t[1],t[2]];if(r)return[r[0],r[5],r[10]];if(e){var i=e.getResolution(),o=(0,n.default)(i,3),a=o[0],s=o[1],u=o[2];return[a*e.getWidth()/this.getWidth(),s*e.getHeight()/this.getHeight(),u*e.getWidth()/this.getWidth()]}throw new Error(\"The image does not have an affine transformation.\")}},{key:\"pixelIsArea\",value:function(){return 1===this.geoKeys.GTRasterTypeGeoKey}},{key:\"getBoundingBox\",value:function(){var e=this.getOrigin(),t=this.getResolution(),r=e[0],n=e[1],i=r+t[0]*this.getWidth(),o=n+t[1]*this.getHeight();return[Math.min(r,i),Math.min(n,o),Math.max(r,i),Math.max(n,o)]}}]),e}();r.default=m},{\"@babel/runtime/helpers/slicedToArray\":\"HETk\",\"@babel/runtime/regenerator\":\"PMvg\",\"@babel/runtime/helpers/asyncToGenerator\":\"agGE\",\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\",\"@petamoriken/float16\":\"Stm8\",txml:\"JO74\",\"./globals\":\"j27V\",\"./rgb\":\"fpBl\",\"./compression\":\"FGCZ\",\"./resample\":\"OQju\"}],dqpX:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=a(e(\"@babel/runtime/helpers/classCallCheck\")),i=a(e(\"@babel/runtime/helpers/createClass\")),o=e(\"@petamoriken/float16\");function a(e){return e&&e.__esModule?e:{default:e}}var s=function(){function e(t){(0,n.default)(this,e),this._dataView=new DataView(t)}return(0,i.default)(e,[{key:\"getUint64\",value:function(e,t){var r,n=this.getUint32(e,t),i=this.getUint32(e+4,t);if(t){if(r=n+Math.pow(2,32)*i,!Number.isSafeInteger(r))throw new Error(\"\".concat(r,\" exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues\"));return r}if(r=Math.pow(2,32)*n+i,!Number.isSafeInteger(r))throw new Error(\"\".concat(r,\" exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues\"));return r}},{key:\"getInt64\",value:function(e,t){for(var r=0,n=(128&this._dataView.getUint8(e+(t?7:0)))>0,i=!0,o=0;o<8;o++){var a=this._dataView.getUint8(e+(t?o:7-o));n&&(i?0!==a&&(a=255&~(a-1),i=!1):a=255&~a),r+=a*Math.pow(256,o)}return n&&(r=-r),r}},{key:\"getUint8\",value:function(e,t){return this._dataView.getUint8(e,t)}},{key:\"getInt8\",value:function(e,t){return this._dataView.getInt8(e,t)}},{key:\"getUint16\",value:function(e,t){return this._dataView.getUint16(e,t)}},{key:\"getInt16\",value:function(e,t){return this._dataView.getInt16(e,t)}},{key:\"getUint32\",value:function(e,t){return this._dataView.getUint32(e,t)}},{key:\"getInt32\",value:function(e,t){return this._dataView.getInt32(e,t)}},{key:\"getFloat16\",value:function(e,t){return(0,o.getFloat16)(this._dataView,t)}},{key:\"getFloat32\",value:function(e,t){return this._dataView.getFloat32(e,t)}},{key:\"getFloat64\",value:function(e,t){return this._dataView.getFloat64(e,t)}},{key:\"buffer\",get:function(){return this._dataView.buffer}}]),e}();r.default=s},{\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\",\"@petamoriken/float16\":\"Stm8\"}],dGLV:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=o(e(\"@babel/runtime/helpers/classCallCheck\")),i=o(e(\"@babel/runtime/helpers/createClass\"));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(){function e(t,r,i,o){(0,n.default)(this,e),this._dataView=new DataView(t),this._sliceOffset=r,this._littleEndian=i,this._bigTiff=o}return(0,i.default)(e,[{key:\"covers\",value:function(e,t){return this.sliceOffset<=e&&this.sliceTop>=e+t}},{key:\"readUint8\",value:function(e){return this._dataView.getUint8(e-this._sliceOffset,this._littleEndian)}},{key:\"readInt8\",value:function(e){return this._dataView.getInt8(e-this._sliceOffset,this._littleEndian)}},{key:\"readUint16\",value:function(e){return this._dataView.getUint16(e-this._sliceOffset,this._littleEndian)}},{key:\"readInt16\",value:function(e){return this._dataView.getInt16(e-this._sliceOffset,this._littleEndian)}},{key:\"readUint32\",value:function(e){return this._dataView.getUint32(e-this._sliceOffset,this._littleEndian)}},{key:\"readInt32\",value:function(e){return this._dataView.getInt32(e-this._sliceOffset,this._littleEndian)}},{key:\"readFloat32\",value:function(e){return this._dataView.getFloat32(e-this._sliceOffset,this._littleEndian)}},{key:\"readFloat64\",value:function(e){return this._dataView.getFloat64(e-this._sliceOffset,this._littleEndian)}},{key:\"readUint64\",value:function(e){var t,r=this.readUint32(e),n=this.readUint32(e+4);if(this._littleEndian){if(t=r+Math.pow(2,32)*n,!Number.isSafeInteger(t))throw new Error(\"\".concat(t,\" exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues\"));return t}if(t=Math.pow(2,32)*r+n,!Number.isSafeInteger(t))throw new Error(\"\".concat(t,\" exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues\"));return t}},{key:\"readInt64\",value:function(e){for(var t=0,r=(128&this._dataView.getUint8(e+(this._littleEndian?7:0)))>0,n=!0,i=0;i<8;i++){var o=this._dataView.getUint8(e+(this._littleEndian?i:7-i));r&&(n?0!==o&&(o=255&~(o-1),n=!1):o=255&~o),t+=o*Math.pow(256,i)}return r&&(t=-t),t}},{key:\"readOffset\",value:function(e){return this._bigTiff?this.readUint64(e):this.readUint32(e)}},{key:\"sliceOffset\",get:function(){return this._sliceOffset}},{key:\"sliceTop\",get:function(){return this._sliceOffset+this.buffer.byteLength}},{key:\"littleEndian\",get:function(){return this._littleEndian}},{key:\"bigTiff\",get:function(){return this._bigTiff}},{key:\"buffer\",get:function(){return this._dataView.buffer}}]),e}();r.default=a},{\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\"}],z2GM:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.extendSerializer=function(e,t){const r=e.deserialize.bind(e),n=e.serialize.bind(e);return{deserialize:e=>t.deserialize(e,r),serialize:e=>t.serialize(e,n)}},r.DefaultSerializer=void 0;const n=e=>Object.assign(Error(e.message),{name:e.name,stack:e.stack}),i=e=>({__error_marker:\"$$error\",message:e.message,name:e.name,stack:e.stack}),o={deserialize:e=>(e=>e&&\"object\"==typeof e&&\"__error_marker\"in e&&\"$$error\"===e.__error_marker)(e)?n(e):e,serialize:e=>e instanceof Error?i(e):e};r.DefaultSerializer=o},{}],kdjL:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.registerSerializer=function(e){i=(0,n.extendSerializer)(i,e)},r.deserialize=function(e){return i.deserialize(e)},r.serialize=function(e){return i.serialize(e)};var n=e(\"./serializers\");let i=n.DefaultSerializer},{\"./serializers\":\"z2GM\"}],LQHy:[function(e,t,r){\"use strict\";let n;function i(e){return(\"\"+e).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\\/\\/.+)?\\/[^/]+(?:\\?.*)?$/,\"$1\")+\"/\"}Object.defineProperty(r,\"__esModule\",{value:!0}),r.getBaseURL=i,r.getBundleURL=function(){return n||(n=function(){try{throw new Error}catch(e){const t=(\"\"+e.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\\/\\/[^)\\n]+/g);if(t)return i(t[0])}return\"/\"}()),n}},{}],XK2w:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.selectWorkerImplementation=function(){return\"undefined\"==typeof Worker?class{constructor(){throw Error(\"No web worker implementation available. You might have tried to spawn a worker within a worker in a browser that doesn't support workers in workers.\")}}:class extends Worker{constructor(e,t){\"string\"==typeof e&&t&&t._baseURL?e=new URL(e,t._baseURL):\"string\"==typeof e&&!o(e)&&(0,n.getBundleURL)().match(/^file:\\/\\//i)&&(e=new URL(e,(0,n.getBundleURL)().replace(/\\/[^\\/]+$/,\"/\")),e=a(`importScripts(${JSON.stringify(e)});`)),\"string\"==typeof e&&o(e)&&(e=a(`importScripts(${JSON.stringify(e)});`)),super(e,t)}}},r.defaultPoolSize=void 0;var n=e(\"./get-bundle-url.browser\");const i=\"undefined\"!=typeof navigator&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:4;r.defaultPoolSize=i;const o=e=>/^(file|https?:)?\\/\\//i.test(e);function a(e){const t=new Blob([e],{type:\"application/javascript\"});return URL.createObjectURL(t)}},{\"./get-bundle-url.browser\":\"LQHy\"}],IAgR:[function(e,t,r){var n=1e3,i=60*n,o=60*i,a=24*o;function s(e){if(!((e=String(e)).length>100)){var t=/^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||\"ms\").toLowerCase()){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return 315576e5*r;case\"weeks\":case\"week\":case\"w\":return 6048e5*r;case\"days\":case\"day\":case\"d\":return r*a;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*o;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*i;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*n;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}}}function u(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+\"d\":t>=o?Math.round(e/o)+\"h\":t>=i?Math.round(e/i)+\"m\":t>=n?Math.round(e/n)+\"s\":e+\"ms\"}function l(e){var t=Math.abs(e);return t>=a?f(e,t,a,\"day\"):t>=o?f(e,t,o,\"hour\"):t>=i?f(e,t,i,\"minute\"):t>=n?f(e,t,n,\"second\"):e+\" ms\"}function f(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+\" \"+n+(i?\"s\":\"\")}t.exports=function(e,t){t=t||{};var r=typeof e;if(\"string\"===r&&e.length>0)return s(e);if(\"number\"===r&&isFinite(e))return t.long?l(e):u(e);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(e))}},{}],Kest:[function(e,t,r){t.exports=function(t){function r(e){let t=0;for(let r=0;r{if(\"%%\"===t)return t;s++;const o=n.formatters[i];if(\"function\"==typeof o){const n=e[s];t=o.call(r,n),e.splice(s,1),s--}return t})),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return a.namespace=e,a.enabled=n.enabled(e),a.useColors=n.useColors(),a.color=r(e),a.destroy=i,a.extend=o,\"function\"==typeof n.init&&n.init(a),n.instances.push(a),a}function i(){const e=n.instances.indexOf(this);return-1!==e&&(n.instances.splice(e,1),!0)}function o(e,t){const r=n(this.namespace+(void 0===t?\":\":t)+e);return r.log=this.log,r}function a(e){return e.toString().substring(2,e.toString().length-2).replace(/\\.\\*\\?$/,\"*\")}return n.debug=n,n.default=n,n.coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){const e=[...n.names.map(a),...n.skips.map(a).map((e=>\"-\"+e))].join(\",\");return n.enable(\"\"),e},n.enable=function(e){let t;n.save(e),n.names=[],n.skips=[];const r=(\"string\"==typeof e?e:\"\").split(/[\\s,]+/),i=r.length;for(t=0;t{n[e]=t[e]})),n.instances=[],n.names=[],n.skips=[],n.formatters={},n.selectColor=r,n.enable(n.load()),n}},{ms:\"IAgR\"}],jcLW:[function(e,t,r){e(\"process\");var n=e(\"process\");r.log=function(...e){return\"object\"==typeof console&&console.log&&console.log(...e)},r.formatArgs=function(e){if(e[0]=(this.useColors?\"%c\":\"\")+this.namespace+(this.useColors?\" %c\":\" \")+e[0]+(this.useColors?\"%c \":\" \")+\"+\"+t.exports.humanize(this.diff),!this.useColors)return;const r=\"color: \"+this.color;e.splice(1,0,r,\"color: inherit\");let n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{\"%%\"!==e&&(n++,\"%c\"===e&&(i=n))})),e.splice(i,0,r)},r.save=function(e){try{e?r.storage.setItem(\"debug\",e):r.storage.removeItem(\"debug\")}catch(e){}},r.load=function(){let e;try{e=r.storage.getItem(\"debug\")}catch(e){}return!e&&void 0!==n&&\"env\"in n&&(e=void 0),e},r.useColors=function(){return!(\"undefined\"==typeof window||!window.process||\"renderer\"!==window.process.type&&!window.process.__nwjs)||(\"undefined\"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))&&(\"undefined\"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||\"undefined\"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/))},r.storage=function(){try{return localStorage}catch(e){}}(),r.colors=[\"#0000CC\",\"#0000FF\",\"#0033CC\",\"#0033FF\",\"#0066CC\",\"#0066FF\",\"#0099CC\",\"#0099FF\",\"#00CC00\",\"#00CC33\",\"#00CC66\",\"#00CC99\",\"#00CCCC\",\"#00CCFF\",\"#3300CC\",\"#3300FF\",\"#3333CC\",\"#3333FF\",\"#3366CC\",\"#3366FF\",\"#3399CC\",\"#3399FF\",\"#33CC00\",\"#33CC33\",\"#33CC66\",\"#33CC99\",\"#33CCCC\",\"#33CCFF\",\"#6600CC\",\"#6600FF\",\"#6633CC\",\"#6633FF\",\"#66CC00\",\"#66CC33\",\"#9900CC\",\"#9900FF\",\"#9933CC\",\"#9933FF\",\"#99CC00\",\"#99CC33\",\"#CC0000\",\"#CC0033\",\"#CC0066\",\"#CC0099\",\"#CC00CC\",\"#CC00FF\",\"#CC3300\",\"#CC3333\",\"#CC3366\",\"#CC3399\",\"#CC33CC\",\"#CC33FF\",\"#CC6600\",\"#CC6633\",\"#CC9900\",\"#CC9933\",\"#CCCC00\",\"#CCCC33\",\"#FF0000\",\"#FF0033\",\"#FF0066\",\"#FF0099\",\"#FF00CC\",\"#FF00FF\",\"#FF3300\",\"#FF3333\",\"#FF3366\",\"#FF3399\",\"#FF33CC\",\"#FF33FF\",\"#FF6600\",\"#FF6633\",\"#FF9900\",\"#FF9933\",\"#FFCC00\",\"#FFCC33\"],t.exports=e(\"./common\")(r);const{formatters:i}=t.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return\"[UnexpectedJSONParseError]: \"+e.message}}},{\"./common\":\"Kest\",process:\"pBGv\"}],sfrJ:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.AsyncSerialScheduler=void 0;r.AsyncSerialScheduler=class{constructor(e){this._baseObserver=e,this._pendingPromises=new Set}complete(){Promise.all(this._pendingPromises).then((()=>this._baseObserver.complete())).catch((e=>this._baseObserver.error(e)))}error(e){this._baseObserver.error(e)}schedule(e){const t=Promise.all(this._pendingPromises),r=[],n=e=>r.push(e),i=Promise.resolve().then((()=>function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new r((function(t){t(e.value)})).then(a,s)}u((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){yield t,yield e(n),this._pendingPromises.delete(i);for(const e of r)this._baseObserver.next(e)})))).catch((e=>{this._pendingPromises.delete(i),this._baseObserver.error(e)}));this._pendingPromises.add(i)}}},{}],lj3f:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.registerObservableSymbol=function(){n()&&!i(\"observable\")&&(Symbol.observable=Symbol(\"observable\"))},r.getSymbol=r.hasSymbol=r.hasSymbols=void 0;const n=()=>\"function\"==typeof Symbol;r.hasSymbols=n;const i=e=>n()&&Boolean(Symbol[e]);r.hasSymbol=i;r.getSymbol=e=>i(e)?Symbol[e]:\"@@\"+e,i(\"asyncIterator\")||(Symbol.asyncIterator=Symbol.asyncIterator||Symbol.for(\"Symbol.asyncIterator\"))},{}],B9l3:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=r.Observable=r.SubscriptionObserver=r.Subscription=void 0;var n=e(\"./_symbols\");const i=(0,n.getSymbol)(\"iterator\"),o=(0,n.getSymbol)(\"observable\"),a=(0,n.getSymbol)(\"species\");function s(e,t){const r=e[t];if(null!=r){if(\"function\"!=typeof r)throw new TypeError(r+\" is not a function\");return r}}function u(e){let t=e.constructor;return void 0!==t&&null===(t=t[a])&&(t=void 0),void 0!==t?t:v}function l(e){l.log?l.log(e):setTimeout((()=>{throw e}),0)}function f(e){Promise.resolve().then((()=>{try{e()}catch(e){l(e)}}))}function c(e){const t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if(\"function\"==typeof t)t();else{const e=s(t,\"unsubscribe\");e&&e.call(t)}}catch(e){l(e)}}function h(e){e._observer=void 0,e._queue=void 0,e._state=\"closed\"}function d(e,t,r){e._state=\"running\";const n=e._observer;try{const i=n?s(n,t):void 0;switch(t){case\"next\":i&&i.call(n,r);break;case\"error\":if(h(e),!i)throw r;i.call(n,r);break;case\"complete\":h(e),i&&i.call(n)}}catch(e){l(e)}\"closed\"===e._state?c(e):\"running\"===e._state&&(e._state=\"ready\")}function p(e,t,r){if(\"closed\"!==e._state)return\"buffering\"===e._state?(e._queue=e._queue||[],void e._queue.push({type:t,value:r})):\"ready\"!==e._state?(e._state=\"buffering\",e._queue=[{type:t,value:r}],void f((()=>function(e){const t=e._queue;if(t){e._queue=void 0,e._state=\"ready\";for(const r of t)if(d(e,r.type,r.value),\"closed\"===e._state)break}}(e)))):void d(e,t,r)}class b{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state=\"initializing\";const r=new y(this);try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}\"initializing\"===this._state&&(this._state=\"ready\")}get closed(){return\"closed\"===this._state}unsubscribe(){\"closed\"!==this._state&&(h(this),c(this))}}r.Subscription=b;class y{constructor(e){this._subscription=e}get closed(){return\"closed\"===this._subscription._state}next(e){p(this._subscription,\"next\",e)}error(e){p(this._subscription,\"error\",e)}complete(){p(this._subscription,\"complete\")}}r.SubscriptionObserver=y;class v{constructor(e){if(!(this instanceof v))throw new TypeError(\"Observable cannot be called as a function\");if(\"function\"!=typeof e)throw new TypeError(\"Observable initializer must be a function\");this._subscriber=e}subscribe(e,t,r){return\"object\"==typeof e&&null!==e||(e={next:e,error:t,complete:r}),new b(e,this._subscriber)}pipe(e,...t){let r=this;for(const n of[e,...t])r=n(r);return r}tap(e,t,r){const n=\"object\"!=typeof e||null===e?{next:e,error:t,complete:r}:e;return new v((e=>this.subscribe({next(t){n.next&&n.next(t),e.next(t)},error(t){n.error&&n.error(t),e.error(t)},complete(){n.complete&&n.complete(),e.complete()},start(e){n.start&&n.start(e)}})))}forEach(e){return new Promise(((t,r)=>{if(\"function\"!=typeof e)return void r(new TypeError(e+\" is not a function\"));function n(){i.unsubscribe(),t()}const i=this.subscribe({next(t){try{e(t,n)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t})}))}map(e){if(\"function\"!=typeof e)throw new TypeError(e+\" is not a function\");return new(u(this))((t=>this.subscribe({next(r){let n=r;try{n=e(r)}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}})))}filter(e){if(\"function\"!=typeof e)throw new TypeError(e+\" is not a function\");return new(u(this))((t=>this.subscribe({next(r){try{if(!e(r))return}catch(e){return t.error(e)}t.next(r)},error(e){t.error(e)},complete(){t.complete()}})))}reduce(e,t){if(\"function\"!=typeof e)throw new TypeError(e+\" is not a function\");const r=u(this),n=arguments.length>1;let i=!1,o=t;return new r((t=>this.subscribe({next(r){const a=!i;if(i=!0,!a||n)try{o=e(o,r)}catch(e){return t.error(e)}else o=r},error(e){t.error(e)},complete(){if(!i&&!n)return t.error(new TypeError(\"Cannot reduce an empty sequence\"));t.next(o),t.complete()}})))}concat(...e){const t=u(this);return new t((r=>{let n,i=0;return function o(a){n=a.subscribe({next(e){r.next(e)},error(e){r.error(e)},complete(){i===e.length?(n=void 0,r.complete()):o(t.from(e[i++]))}})}(this),()=>{n&&(n.unsubscribe(),n=void 0)}}))}flatMap(e){if(\"function\"!=typeof e)throw new TypeError(e+\" is not a function\");const t=u(this);return new t((r=>{const n=[],i=this.subscribe({next(i){let a;if(e)try{a=e(i)}catch(e){return r.error(e)}else a=i;const s=t.from(a).subscribe({next(e){r.next(e)},error(e){r.error(e)},complete(){const e=n.indexOf(s);e>=0&&n.splice(e,1),o()}});n.push(s)},error(e){r.error(e)},complete(){o()}});function o(){i.closed&&0===n.length&&r.complete()}return()=>{n.forEach((e=>e.unsubscribe())),i.unsubscribe()}}))}[o](){return this}static from(e){const t=\"function\"==typeof this?this:v;if(null==e)throw new TypeError(e+\" is not an object\");const r=s(e,o);if(r){const n=r.call(e);if(Object(n)!==n)throw new TypeError(n+\" is not an object\");return function(e){return e instanceof v}(n)&&n.constructor===t?n:new t((e=>n.subscribe(e)))}if((0,n.hasSymbol)(\"iterator\")){const r=s(e,i);if(r)return new t((t=>{f((()=>{if(!t.closed){for(const n of r.call(e))if(t.next(n),t.closed)return;t.complete()}}))}))}if(Array.isArray(e))return new t((t=>{f((()=>{if(!t.closed){for(const r of e)if(t.next(r),t.closed)return;t.complete()}}))}));throw new TypeError(e+\" is not observable\")}static of(...e){return new(\"function\"==typeof this?this:v)((t=>{f((()=>{if(!t.closed){for(const r of e)if(t.next(r),t.closed)return;t.complete()}}))}))}static get[a](){return this}}r.Observable=v,(0,n.hasSymbols)()&&Object.defineProperty(v,Symbol(\"extensions\"),{value:{symbol:o,hostReportError:l},configurable:!0});var g=v;r.default=g},{\"./_symbols\":\"lj3f\"}],QC75:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=function(e){\"function\"==typeof e?e():e&&\"function\"==typeof e.unsubscribe&&e.unsubscribe()};r.default=n},{}],apmd:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=e(\"./_scheduler\"),i=a(e(\"./observable\")),o=a(e(\"./unsubscribe\"));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){return t=>new i.default((r=>{const i=new n.AsyncSerialScheduler(r),a=t.subscribe({complete(){i.complete()},error(e){i.error(e)},next(t){i.schedule((r=>function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new r((function(t){t(e.value)})).then(a,s)}u((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){(yield e(t))&&r(t)}))))}});return()=>(0,o.default)(a)}))};r.default=s},{\"./_scheduler\":\"sfrJ\",\"./observable\":\"B9l3\",\"./unsubscribe\":\"QC75\"}],FgiE:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.isAsyncIterator=function(e){return e&&(0,n.hasSymbol)(\"asyncIterator\")&&e[Symbol.asyncIterator]},r.isIterator=function(e){return e&&(0,n.hasSymbol)(\"iterator\")&&e[Symbol.iterator]};var n=e(\"./_symbols\")},{\"./_symbols\":\"lj3f\"}],ltny:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=e(\"./_scheduler\"),i=e(\"./_util\"),o=s(e(\"./observable\")),a=s(e(\"./unsubscribe\"));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){return t=>new o.default((r=>{const o=new n.AsyncSerialScheduler(r),s=t.subscribe({complete(){o.complete()},error(e){o.error(e)},next(t){o.schedule((r=>function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new r((function(t){t(e.value)})).then(a,s)}u((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){var n,o;const a=yield e(t);if((0,i.isIterator)(a)||(0,i.isAsyncIterator)(a))try{for(var s,u=function(e){if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=\"function\"==typeof __values?__values(e):e[Symbol.iterator](),t={},n(\"next\"),n(\"throw\"),n(\"return\"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}(a);!(s=yield u.next()).done;){const e=s.value;r(e)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=u.return)&&(yield o.call(u))}finally{if(n)throw n.error}}else a.map((e=>r(e)))}))))}});return()=>(0,a.default)(s)}))};r.default=u},{\"./_scheduler\":\"sfrJ\",\"./_util\":\"FgiE\",\"./observable\":\"B9l3\",\"./unsubscribe\":\"QC75\"}],jAhG:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=function(e){return new n.Observable((t=>{let r=0;const n=setInterval((()=>{t.next(r++)}),e);return()=>clearInterval(n)}))};var n=e(\"./observable\")},{\"./observable\":\"B9l3\"}],aP59:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=e(\"./_scheduler\"),i=a(e(\"./observable\")),o=a(e(\"./unsubscribe\"));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){return t=>new i.default((r=>{const i=new n.AsyncSerialScheduler(r),a=t.subscribe({complete(){i.complete()},error(e){i.error(e)},next(t){i.schedule((r=>function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new r((function(t){t(e.value)})).then(a,s)}u((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){const n=yield e(t);r(n)}))))}});return()=>(0,o.default)(a)}))};r.default=s},{\"./_scheduler\":\"sfrJ\",\"./observable\":\"B9l3\",\"./unsubscribe\":\"QC75\"}],Rg1v:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=e(\"./observable\"),i=function(e){return e&&e.__esModule?e:{default:e}}(e(\"./unsubscribe\"));var o=function(...e){return 0===e.length?n.Observable.from([]):new n.Observable((t=>{let r=0;const n=e.map((n=>n.subscribe({error(e){t.error(e),o()},next(e){t.next(e)},complete(){++r===e.length&&(t.complete(),o())}}))),o=()=>{n.forEach((e=>(0,i.default)(e)))};return o}))};r.default=o},{\"./observable\":\"B9l3\",\"./unsubscribe\":\"QC75\"}],wtHd:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e(\"./observable\"));class i extends n.default{constructor(){super((e=>(this._observers.add(e),()=>this._observers.delete(e)))),this._observers=new Set}next(e){for(const t of this._observers)t.next(e)}error(e){for(const t of this._observers)t.error(e)}complete(){for(const e of this._observers)e.complete()}}var o=i;r.default=o},{\"./observable\":\"B9l3\"}],NgdC:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=a(e(\"./observable\")),i=a(e(\"./subject\")),o=a(e(\"./unsubscribe\"));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){const t=new i.default;let r,a=0;return new n.default((n=>{r||(r=e.subscribe(t));const i=t.subscribe(n);return a++,()=>{a--,i.unsubscribe(),0===a&&((0,o.default)(r),r=void 0)}}))};r.default=s},{\"./observable\":\"B9l3\",\"./subject\":\"wtHd\",\"./unsubscribe\":\"QC75\"}],b7o0:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=e(\"./_scheduler\"),i=a(e(\"./observable\")),o=a(e(\"./unsubscribe\"));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t){return r=>new i.default((i=>{let a,s=0;const u=new n.AsyncSerialScheduler(i),l=r.subscribe({complete(){u.complete()},error(e){u.error(e)},next(r){u.schedule((n=>function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new r((function(t){t(e.value)})).then(a,s)}u((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){const i=0===s?void 0===t?r:t:a;a=yield e(i,r,s++),n(a)}))))}});return()=>(0,o.default)(l)}))};r.default=s},{\"./_scheduler\":\"sfrJ\",\"./observable\":\"B9l3\",\"./unsubscribe\":\"QC75\"}],cyO3:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),Object.defineProperty(r,\"filter\",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(r,\"flatMap\",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(r,\"interval\",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(r,\"map\",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(r,\"merge\",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(r,\"multicast\",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(r,\"Observable\",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(r,\"scan\",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(r,\"Subject\",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(r,\"unsubscribe\",{enumerable:!0,get:function(){return h.default}});var n=d(e(\"./filter\")),i=d(e(\"./flatMap\")),o=d(e(\"./interval\")),a=d(e(\"./map\")),s=d(e(\"./merge\")),u=d(e(\"./multicast\")),l=d(e(\"./observable\")),f=d(e(\"./scan\")),c=d(e(\"./subject\")),h=d(e(\"./unsubscribe\"));function d(e){return e&&e.__esModule?e:{default:e}}},{\"./filter\":\"apmd\",\"./flatMap\":\"ltny\",\"./interval\":\"jAhG\",\"./map\":\"aP59\",\"./merge\":\"Rg1v\",\"./multicast\":\"NgdC\",\"./observable\":\"B9l3\",\"./scan\":\"b7o0\",\"./subject\":\"wtHd\",\"./unsubscribe\":\"QC75\"}],vpgy:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.allSettled=function(e){return Promise.all(e.map((e=>{const t=e=>({status:\"fulfilled\",value:e}),r=e=>({status:\"rejected\",reason:e}),n=Promise.resolve(e);try{return n.then(t,r)}catch(e){return Promise.reject(e)}})))}},{}],UYCO:[function(e,t,r){\"use strict\";var n;Object.defineProperty(r,\"__esModule\",{value:!0}),r.PoolEventType=void 0,r.PoolEventType=n,function(e){e.initialized=\"initialized\",e.taskCanceled=\"taskCanceled\",e.taskCompleted=\"taskCompleted\",e.taskFailed=\"taskFailed\",e.taskQueued=\"taskQueued\",e.taskQueueDrained=\"taskQueueDrained\",e.taskStart=\"taskStart\",e.terminated=\"terminated\"}(n||(r.PoolEventType=n={}))},{}],fmdM:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.$worker=r.$transferable=r.$terminate=r.$events=r.$errors=void 0;const n=Symbol(\"thread.errors\");r.$errors=n;const i=Symbol(\"thread.events\");r.$events=i;const o=Symbol(\"thread.terminate\");r.$terminate=o;const a=Symbol(\"thread.transferable\");r.$transferable=a;const s=Symbol(\"thread.worker\");r.$worker=s},{}],LBuu:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.Thread=void 0;var n=e(\"../symbols\");function i(e){throw Error(e)}const o={errors:e=>e[n.$errors]||i(\"Error observable not found. Make sure to pass a thread instance as returned by the spawn() promise.\"),events:e=>e[n.$events]||i(\"Events observable not found. Make sure to pass a thread instance as returned by the spawn() promise.\"),terminate:e=>e[n.$terminate]()};r.Thread=o},{\"../symbols\":\"fmdM\"}],EB3M:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),Object.defineProperty(r,\"PoolEventType\",{enumerable:!0,get:function(){return s.PoolEventType}}),Object.defineProperty(r,\"Thread\",{enumerable:!0,get:function(){return u.Thread}}),r.Pool=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e(\"debug\")),i=e(\"observable-fns\"),o=e(\"../ponyfills\"),a=e(\"./implementation\"),s=e(\"./pool-types\"),u=e(\"./thread\");var l=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};let f=1;class c{constructor(e,t){this.eventSubject=new i.Subject,this.initErrors=[],this.isClosing=!1,this.nextTaskID=1,this.taskQueue=[];const r=\"number\"==typeof t?{size:t}:t||{},{size:o=a.defaultPoolSize}=r;this.debug=(0,n.default)(\"threads:pool:\"+function(e){return e.replace(/\\W/g,\" \").trim().replace(/\\s+/g,\"-\")}(r.name||String(f++))),this.options=r,this.workers=function(e,t){return function(e){const t=[];for(let r=0;r({init:e(),runningTasks:[]})))}(e,o),this.eventObservable=(0,i.multicast)(i.Observable.from(this.eventSubject)),Promise.all(this.workers.map((e=>e.init))).then((()=>this.eventSubject.next({type:s.PoolEventType.initialized,size:this.workers.length})),(e=>{this.debug(\"Error while initializing pool worker:\",e),this.eventSubject.error(e),this.initErrors.push(e)}))}findIdlingWorker(){const{concurrency:e=1}=this.options;return this.workers.find((t=>t.runningTasks.lengthl(this,void 0,void 0,(function*(){yield function(e){return new Promise((t=>setTimeout(t,e)))}(0);try{yield this.runPoolTask(e,t)}finally{e.runningTasks=e.runningTasks.filter((e=>e!==r)),this.isClosing||this.scheduleWork()}})))();e.runningTasks.push(r)}))}scheduleWork(){this.debug(\"Attempt de-queueing a task in order to run it...\");const e=this.findIdlingWorker();if(!e)return;const t=this.taskQueue.shift();if(!t)return this.debug(\"Task queue is empty\"),void this.eventSubject.next({type:s.PoolEventType.taskQueueDrained});this.run(e,t)}taskCompletion(e){return new Promise(((t,r)=>{const n=this.events().subscribe((i=>{i.type===s.PoolEventType.taskCompleted&&i.taskID===e?(n.unsubscribe(),t(i.returnValue)):i.type===s.PoolEventType.taskFailed&&i.taskID===e?(n.unsubscribe(),r(i.error)):i.type===s.PoolEventType.terminated&&(n.unsubscribe(),r(Error(\"Pool has been terminated before task was run.\")))}))}))}settled(e=!1){return l(this,void 0,void 0,(function*(){const t=()=>function(e,t){return e.reduce(((e,r)=>[...e,...t(r)]),[])}(this.workers,(e=>e.runningTasks)),r=[],n=this.eventObservable.subscribe((e=>{e.type===s.PoolEventType.taskFailed&&r.push(e.error)}));return this.initErrors.length>0?Promise.reject(this.initErrors[0]):e&&0===this.taskQueue.length?(yield(0,o.allSettled)(t()),r):(yield new Promise(((e,t)=>{const r=this.eventObservable.subscribe({next(t){t.type===s.PoolEventType.taskQueueDrained&&(r.unsubscribe(),e())},error:t})})),yield(0,o.allSettled)(t()),n.unsubscribe(),r)}))}completed(e=!1){return l(this,void 0,void 0,(function*(){const t=this.settled(e),r=new Promise(((e,r)=>{const n=this.eventObservable.subscribe({next(i){i.type===s.PoolEventType.taskQueueDrained?(n.unsubscribe(),e(t)):i.type===s.PoolEventType.taskFailed&&(n.unsubscribe(),r(i.error))},error:r})})),n=yield Promise.race([t,r]);if(n.length>0)throw n[0]}))}events(){return this.eventObservable}queue(e){const{maxQueuedJobs:t=1/0}=this.options;if(this.isClosing)throw Error(\"Cannot schedule pool tasks after terminate() has been called.\");if(this.initErrors.length>0)throw this.initErrors[0];const r=()=>this.taskCompletion(i.id);let n;const i={id:this.nextTaskID++,run:e,cancel:()=>{-1!==this.taskQueue.indexOf(i)&&(this.taskQueue=this.taskQueue.filter((e=>e!==i)),this.eventSubject.next({type:s.PoolEventType.taskCanceled,taskID:i.id}))},get then(){if(!n){const e=r();n=e.then.bind(e)}return n}};if(this.taskQueue.length>=t)throw Error(\"Maximum number of pool tasks queued. Refusing to queue another one.\\nThis usually happens for one of two reasons: We are either at peak workload right now or some tasks just won't finish, thus blocking the pool.\");return this.debug(`Queueing task #${i.id}...`),this.taskQueue.push(i),this.eventSubject.next({type:s.PoolEventType.taskQueued,taskID:i.id}),this.scheduleWork(),i}terminate(e){return l(this,void 0,void 0,(function*(){this.isClosing=!0,e||(yield this.completed(!0)),this.eventSubject.next({type:s.PoolEventType.terminated,remainingQueue:[...this.taskQueue]}),this.eventSubject.complete(),yield Promise.all(this.workers.map((e=>l(this,void 0,void 0,(function*(){return u.Thread.terminate(yield e.init)})))))}))}}function h(e,t){return new c(e,t)}c.EventType=s.PoolEventType,h.EventType=s.PoolEventType;const d=h;r.Pool=d},{debug:\"jcLW\",\"observable-fns\":\"cyO3\",\"../ponyfills\":\"vpgy\",\"./implementation\":\"XK2w\",\"./pool-types\":\"UYCO\",\"./thread\":\"LBuu\"}],PRGP:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.createPromiseWithResolver=function(){let e,t=!1,r=n;return[new Promise((n=>{t?n(e):r=n})),n=>{t=!0,e=n,r()}]};const n=()=>{}},{}],ZLGT:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.WorkerEventType=void 0;var n;e(\"../symbols\");r.WorkerEventType=n,function(e){e.internalError=\"internalError\",e.message=\"message\",e.termination=\"termination\"}(n||(r.WorkerEventType=n={}))},{\"../symbols\":\"fmdM\"}],zXl4:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.ObservablePromise=void 0;var n=e(\"observable-fns\");const i=()=>{},o=e=>e,a=e=>Promise.resolve().then(e);function s(e){throw e}class u extends n.Observable{constructor(e){super((t=>{const r=this,n=Object.assign(Object.assign({},t),{complete(){t.complete(),r.onCompletion()},error(e){t.error(e),r.onError(e)},next(e){t.next(e),r.onNext(e)}});try{return this.initHasRun=!0,e(n)}catch(e){n.error(e)}})),this.initHasRun=!1,this.fulfillmentCallbacks=[],this.rejectionCallbacks=[],this.firstValueSet=!1,this.state=\"pending\"}onNext(e){this.firstValueSet||(this.firstValue=e,this.firstValueSet=!0)}onError(e){this.state=\"rejected\",this.rejection=e;for(const t of this.rejectionCallbacks)a((()=>t(e)))}onCompletion(){this.state=\"fulfilled\";for(const e of this.fulfillmentCallbacks)a((()=>e(this.firstValue)))}then(e,t){const r=e||o,n=t||s;let i=!1;return new Promise(((e,t)=>{const o=r=>{if(!i){i=!0;try{e(n(r))}catch(e){t(e)}}};return this.initHasRun||this.subscribe({error:o}),\"fulfilled\"===this.state?e(r(this.firstValue)):\"rejected\"===this.state?(i=!0,e(n(this.rejection))):(this.fulfillmentCallbacks.push((t=>{try{e(r(t))}catch(e){o(e)}})),void this.rejectionCallbacks.push(o))}))}catch(e){return this.then(void 0,e)}finally(e){const t=e||i;return this.then((e=>(t(),e)),(()=>t()))}static from(e){return function(e){return e&&\"function\"==typeof e.then}(e)?new u((t=>{e.then((e=>{t.next(e),t.complete()}),(e=>{t.error(e)}))})):super.from(e)}}r.ObservablePromise=u},{\"observable-fns\":\"cyO3\"}],qW1u:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.isTransferDescriptor=function(e){return e&&\"object\"==typeof e&&e[n.$transferable]},r.Transfer=function(e,t){if(!t){if(!function(e){return!(!e||\"object\"!=typeof e)}(e))throw Error();t=[e]}return{[n.$transferable]:!0,send:e,transferables:t}};var n=e(\"./symbols\")},{\"./symbols\":\"fmdM\"}],fUdt:[function(e,t,r){\"use strict\";var n,i;Object.defineProperty(r,\"__esModule\",{value:!0}),r.WorkerMessageType=r.MasterMessageType=void 0,r.MasterMessageType=n,function(e){e.run=\"run\"}(n||(r.MasterMessageType=n={})),r.WorkerMessageType=i,function(e){e.error=\"error\",e.init=\"init\",e.result=\"result\",e.running=\"running\",e.uncaughtError=\"uncaughtError\"}(i||(r.WorkerMessageType=i={}))},{}],iMbm:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.createProxyFunction=v,r.createProxyModule=function(e,t){const r={};for(const n of t)r[n]=v(e,n);return r};var n=function(e){return e&&e.__esModule?e:{default:e}}(e(\"debug\")),i=e(\"observable-fns\"),o=e(\"../common\"),a=e(\"../observable-promise\"),s=e(\"../transferable\"),u=e(\"../types/messages\");const l=(0,n.default)(\"threads:master:messages\");let f=1;const c=e=>Array.from(new Set(e)),h=e=>e&&e.type===u.WorkerMessageType.error,d=e=>e&&e.type===u.WorkerMessageType.result,p=e=>e&&e.type===u.WorkerMessageType.running;function b(e,t){return new i.Observable((r=>{let n;const i=a=>{if(l(\"Message from worker:\",a.data),a.data&&a.data.uid===t)if(p(a.data))n=a.data.resultType;else if(d(a.data))\"promise\"===n?(void 0!==a.data.payload&&r.next((0,o.deserialize)(a.data.payload)),r.complete(),e.removeEventListener(\"message\",i)):(a.data.payload&&r.next((0,o.deserialize)(a.data.payload)),a.data.complete&&(r.complete(),e.removeEventListener(\"message\",i)));else if(h(a.data)){const t=(0,o.deserialize)(a.data.error);r.error(t),e.removeEventListener(\"message\",i)}};return e.addEventListener(\"message\",i),()=>e.removeEventListener(\"message\",i)}))}function y(e){if(0===e.length)return{args:[],transferables:[]};const t=[],r=[];for(const n of e)(0,s.isTransferDescriptor)(n)?(t.push((0,o.serialize)(n.send)),r.push(...n.transferables)):t.push((0,o.serialize)(n));return{args:t,transferables:0===r.length?r:c(r)}}function v(e,t){return(...r)=>{const n=f++,{args:o,transferables:s}=y(r),c={type:u.MasterMessageType.run,uid:n,method:t,args:o};l(\"Sending command to run function to worker:\",c);try{e.postMessage(c,s)}catch(e){return a.ObservablePromise.from(Promise.reject(e))}return a.ObservablePromise.from((0,i.multicast)(b(e,n)))}}},{debug:\"jcLW\",\"observable-fns\":\"cyO3\",\"../common\":\"kdjL\",\"../observable-promise\":\"zXl4\",\"../transferable\":\"qW1u\",\"../types/messages\":\"fUdt\"}],a83E:[function(e,t,r){e(\"process\"),e(\"process\");Object.defineProperty(r,\"__esModule\",{value:!0}),r.spawn=function(e,t){return f(this,void 0,void 0,(function*(){h(\"Initializing new thread\");const r=(yield function(e,t,r){return f(this,void 0,void 0,(function*(){let n;const i=new Promise(((e,i)=>{n=setTimeout((()=>i(Error(r))),t)})),o=yield Promise.race([e,i]);return clearTimeout(n),o}))}(p(e),t&&t.timeout?t.timeout:1e4,\"Timeout: Did not receive an init message from worker after 10000ms. Make sure the worker calls expose().\")).exposed,{termination:n,terminate:i}=y(e),o=b(e,n);if(\"function\"===r.type)return v((0,l.createProxyFunction)(e),e,o,i);if(\"module\"===r.type)return v((0,l.createProxyModule)(e,r.methods),e,o,i);{const e=r.type;throw Error(\"Worker init message states unexpected type of expose(): \"+e)}}))};var n=function(e){return e&&e.__esModule?e:{default:e}}(e(\"debug\")),i=e(\"observable-fns\"),o=e(\"../common\"),a=e(\"../promise\"),s=e(\"../symbols\"),u=e(\"../types/master\"),l=e(\"./invocation-proxy\");var f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const c=(0,n.default)(\"threads:master:messages\"),h=(0,n.default)(\"threads:master:spawn\"),d=(0,n.default)(\"threads:master:thread-utils\");function p(e){return new Promise(((t,r)=>{const n=i=>{c(\"Message from worker before finishing initialization:\",i.data),(e=>e&&\"init\"===e.type)(i.data)?(e.removeEventListener(\"message\",n),t(i.data)):(e=>e&&\"uncaughtError\"===e.type)(i.data)&&(e.removeEventListener(\"message\",n),r((0,o.deserialize)(i.data.error)))};e.addEventListener(\"message\",n)}))}function b(e,t){return new i.Observable((r=>{const n=e=>{const t={type:u.WorkerEventType.message,data:e.data};r.next(t)},i=e=>{d(\"Unhandled promise rejection event in thread:\",e);const t={type:u.WorkerEventType.internalError,error:Error(e.reason)};r.next(t)};e.addEventListener(\"message\",n),e.addEventListener(\"unhandledrejection\",i),t.then((()=>{const t={type:u.WorkerEventType.termination};e.removeEventListener(\"message\",n),e.removeEventListener(\"unhandledrejection\",i),r.next(t),r.complete()}))}))}function y(e){const[t,r]=(0,a.createPromiseWithResolver)();return{terminate:()=>f(this,void 0,void 0,(function*(){d(\"Terminating worker\"),yield e.terminate(),r()})),termination:t}}function v(e,t,r,n){const i=r.filter((e=>e.type===u.WorkerEventType.internalError)).map((e=>e.error));return Object.assign(e,{[s.$errors]:i,[s.$events]:r,[s.$terminate]:n,[s.$worker]:t})}},{debug:\"jcLW\",\"observable-fns\":\"cyO3\",\"../common\":\"kdjL\",\"../promise\":\"PRGP\",\"../symbols\":\"fmdM\",\"../types/master\":\"ZLGT\",\"./invocation-proxy\":\"iMbm\",process:\"pBGv\"}],HfK0:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),Object.defineProperty(r,\"Pool\",{enumerable:!0,get:function(){return i.Pool}}),Object.defineProperty(r,\"spawn\",{enumerable:!0,get:function(){return o.spawn}}),Object.defineProperty(r,\"Thread\",{enumerable:!0,get:function(){return a.Thread}}),r.Worker=void 0;var n=e(\"./implementation\"),i=e(\"./pool\"),o=e(\"./spawn\"),a=e(\"./thread\");const s=(0,n.selectWorkerImplementation)();r.Worker=s},{\"./implementation\":\"XK2w\",\"./pool\":\"EB3M\",\"./spawn\":\"a83E\",\"./thread\":\"LBuu\"}],JZ8d:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=function(e){var t,r=e.Symbol;return\"function\"==typeof r?r.observable?t=r.observable:(t=r(\"observable\"),r.observable=t):t=\"@@observable\",t}},{}],LkZ7:[function(e,t,r){var n=arguments[3];Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var i,o=a(e(\"./ponyfill.js\"));function a(e){return e&&e.__esModule?e:{default:e}}i=\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:void 0!==n?n:void 0!==t?t:Function(\"return this\")();var s=(0,o.default)(i),u=s;r.default=u},{\"./ponyfill.js\":\"JZ8d\"}],UALh:[function(e,t,r){\"use strict\";const n=e(\"symbol-observable\").default;t.exports=e=>Boolean(e&&e[n]&&e===e[n]())},{\"symbol-observable\":\"LkZ7\"}],AZa4:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n={isWorkerRuntime:function(){return!(\"undefined\"==typeof self||!self.postMessage)},postMessageToMaster:function(e,t){self.postMessage(e,t)},subscribeToMasterMessages:function(e){const t=t=>{e(t.data)};return self.addEventListener(\"message\",t),()=>{self.removeEventListener(\"message\",t)}}};r.default=n},{}],l5pR:[function(e,t,r){e(\"process\");var n=e(\"process\");Object.defineProperty(r,\"__esModule\",{value:!0}),r.expose=function(e){if(!u.default.isWorkerRuntime())throw Error(\"expose() called in the master thread.\");if(f)throw Error(\"expose() called more than once. This is not possible. Pass an object to expose() if you want to expose multiple functions.\");if(f=!0,\"function\"==typeof e)u.default.subscribeToMasterMessages((t=>{c(t)&&!t.method&&g(t.uid,e,t.args.map(o.deserialize))})),function(){const e={type:s.WorkerMessageType.init,exposed:{type:\"function\"}};u.default.postMessageToMaster(e)}();else{if(\"object\"!=typeof e||!e)throw Error(\"Invalid argument passed to expose(). Expected a function or an object, got: \"+e);u.default.subscribeToMasterMessages((t=>{c(t)&&t.method&&g(t.uid,e[t.method],t.args.map(o.deserialize))})),function(e){const t={type:s.WorkerMessageType.init,exposed:{type:\"module\",methods:e}};u.default.postMessageToMaster(t)}(Object.keys(e).filter((t=>\"function\"==typeof e[t])))}},Object.defineProperty(r,\"registerSerializer\",{enumerable:!0,get:function(){return o.registerSerializer}}),Object.defineProperty(r,\"Transfer\",{enumerable:!0,get:function(){return a.Transfer}});var i=l(e(\"is-observable\")),o=e(\"../common\"),a=e(\"../transferable\"),s=e(\"../types/messages\"),u=l(e(\"./implementation\"));function l(e){return e&&e.__esModule?e:{default:e}}let f=!1;const c=e=>e&&e.type===s.MasterMessageType.run,h=e=>(0,i.default)(e)||function(e){return e&&\"object\"==typeof e&&\"function\"==typeof e.subscribe}(e);function d(e){return(0,a.isTransferDescriptor)(e)?{payload:e.send,transferables:e.transferables}:{payload:e,transferables:void 0}}function p(e,t){const{payload:r,transferables:n}=d(t),i={type:s.WorkerMessageType.error,uid:e,error:(0,o.serialize)(r)};u.default.postMessageToMaster(i,n)}function b(e,t,r){const{payload:n,transferables:i}=d(r),o={type:s.WorkerMessageType.result,uid:e,complete:!!t||void 0,payload:n};u.default.postMessageToMaster(o,i)}function y(e,t){const r={type:s.WorkerMessageType.running,uid:e,resultType:t};u.default.postMessageToMaster(r)}function v(e){try{const t={type:s.WorkerMessageType.uncaughtError,error:(0,o.serialize)(e)};u.default.postMessageToMaster(t)}catch(t){console.error(\"Not reporting uncaught error back to master thread as it occured while reporting an uncaught error already.\\nLatest error:\",t,\"\\nOriginal error:\",e)}}function g(e,t,r){return function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){let n;try{n=t(...r)}catch(t){return p(e,t)}const i=h(n)?\"observable\":\"promise\";if(y(e,i),h(n))n.subscribe((t=>b(e,!1,(0,o.serialize)(t))),(t=>p(e,(0,o.serialize)(t))),(()=>b(e,!0)));else try{const t=yield n;b(e,!0,(0,o.serialize)(t))}catch(t){p(e,(0,o.serialize)(t))}}))}\"undefined\"!=typeof self&&\"function\"==typeof self.addEventListener&&u.default.isWorkerRuntime()&&(self.addEventListener(\"error\",(e=>{setTimeout((()=>v(e.error||e)),250)})),self.addEventListener(\"unhandledrejection\",(e=>{const t=e.reason;t&&\"string\"==typeof t.message&&setTimeout((()=>v(t)),250)}))),void 0!==n&&\"function\"==typeof n.on&&u.default.isWorkerRuntime()&&(n.on(\"uncaughtException\",(e=>{setTimeout((()=>v(e)),250)})),n.on(\"unhandledRejection\",(e=>{e&&\"string\"==typeof e.message&&setTimeout((()=>v(e)),250)})))},{\"is-observable\":\"UALh\",\"../common\":\"kdjL\",\"../transferable\":\"qW1u\",\"../types/messages\":\"fUdt\",\"./implementation\":\"AZa4\",process:\"pBGv\"}],CqwR:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n={registerSerializer:!0,expose:!0,DefaultSerializer:!0,Transfer:!0};Object.defineProperty(r,\"registerSerializer\",{enumerable:!0,get:function(){return i.registerSerializer}}),Object.defineProperty(r,\"expose\",{enumerable:!0,get:function(){return a.expose}}),Object.defineProperty(r,\"DefaultSerializer\",{enumerable:!0,get:function(){return s.DefaultSerializer}}),Object.defineProperty(r,\"Transfer\",{enumerable:!0,get:function(){return u.Transfer}});var i=e(\"./common\"),o=e(\"./master/index\");Object.keys(o).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=e(\"./worker/index\"),s=e(\"./serializers\"),u=e(\"./transferable\")},{\"./common\":\"kdjL\",\"./master/index\":\"HfK0\",\"./worker/index\":\"l5pR\",\"./serializers\":\"z2GM\",\"./transferable\":\"qW1u\"}],dHPO:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=void 0;var n=u(e(\"@babel/runtime/regenerator\")),i=u(e(\"@babel/runtime/helpers/asyncToGenerator\")),o=u(e(\"@babel/runtime/helpers/classCallCheck\")),a=u(e(\"@babel/runtime/helpers/createClass\")),s=e(\"threads\");function u(e){return e&&e.__esModule?e:{default:e}}var l=\"undefined\"!=typeof navigator?navigator.hardwareConcurrency:null,f=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new s.Worker(\"decoder.worker.1936c0d9.js\");(0,o.default)(this,e),this.pool=(0,s.Pool)((function(){return(0,s.spawn)(r)}),t)}return(0,a.default)(e,[{key:\"decode\",value:function(){var e=(0,i.default)(n.default.mark((function e(t,r){var o=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(\"return\",new Promise((function(e,a){o.pool.queue(function(){var o=(0,i.default)(n.default.mark((function i(o){var u;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,o(t,(0,s.Transfer)(r));case 3:u=n.sent,e(u),n.next=10;break;case 7:n.prev=7,n.t0=n.catch(0),a(n.t0);case 10:case\"end\":return n.stop()}}),i,null,[[0,7]])})));return function(e){return o.apply(this,arguments)}}())})));case 1:case\"end\":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()},{key:\"destroy\",value:function(){this.pool.terminate(!0)}}]),e}();r.default=f},{\"@babel/runtime/regenerator\":\"PMvg\",\"@babel/runtime/helpers/asyncToGenerator\":\"agGE\",\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\",threads:\"CqwR\",\"./decoder.worker.js\":[[\"decoder.worker.1936c0d9.js\",\"LHx9\"],\"decoder.worker.1936c0d9.js.map\",\"LHx9\"]}],t2zx:[function(e,t,r){t.exports=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},{}],U8F3:[function(e,t,r){var n=e(\"./objectWithoutPropertiesLoose\");t.exports=function(e,t){if(null==e)return{};var r,i,o=n(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}},{\"./objectWithoutPropertiesLoose\":\"t2zx\"}],OMTj:[function(e,t,r){t.exports=function(e){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},{}],kQhN:[function(e,t,r){var n=e(\"./arrayWithHoles\"),i=e(\"./iterableToArray\"),o=e(\"./unsupportedIterableToArray\"),a=e(\"./nonIterableRest\");t.exports=function(e){return n(e)||i(e)||o(e)||a()}},{\"./arrayWithHoles\":\"OUZ9\",\"./iterableToArray\":\"OMTj\",\"./unsupportedIterableToArray\":\"UyFj\",\"./nonIterableRest\":\"Rom6\"}],ZJpj:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.parseContentType=function(e){var t=e.split(\";\").map((function(e){return e.trim()})),r=(0,n.default)(t);return{type:r[0],params:f(r.slice(1).map((function(e){return e.split(\"=\")})))}},r.parseContentRange=h,r.parseByteRanges=function(e,t){for(var r=null,n=new TextDecoder(\"ascii\"),i=[],o=\"--\".concat(t),a=\"\".concat(o,\"--\"),s=0;s<10;++s)n.decode(new Uint8Array(e,s,o.length))===o&&(r=s);if(null===r)throw new Error(\"Could not find initial boundary\");for(;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}function s(e,t){if(e){if(\"string\"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==o[1]?o[1]:void 0,e.next=3,Promise.all(t.map((function(e){return i.fetchSlice(e,r)})));case 3:return e.abrupt(\"return\",e.sent);case 4:case\"end\":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:\"fetchSlice\",value:function(){var e=(0,i.default)(n.default.mark((function e(t){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error(\"fetching of slice \".concat(t,\" not possible, not implemented\"));case 1:case\"end\":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:\"close\",value:function(){var e=(0,i.default)(n.default.mark((function e(){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case\"end\":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:\"fileSize\",get:function(){return null}}]),e}();r.BaseSource=u},{\"@babel/runtime/regenerator\":\"PMvg\",\"@babel/runtime/helpers/asyncToGenerator\":\"agGE\",\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\"}],eMzk:[function(e,t,r){\"use strict\";t.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},{}],sfWH:[function(e,t,r){\"use strict\";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&\"function\"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r1)r=t;else{if(!this.head)throw new TypeError(\"Reduce of empty list with no initial value\");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError(\"Reduce of empty list with no initial value\");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(tthis.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&ithis.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,o=this.head;null!==o&&nthis[s])return k(this,this[b].get(e)),!1;var o=this[b].get(e).value;return this[h]&&(this[d]||this[h](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[u]+=i-o.length,o.length=i,this.get(e),_(this),!0}var a=new x(e,t,i,n,r);return a.length>this[s]?(this[h]&&this[h](e,t),!1):(this[u]+=a.length,this[p].unshift(a),this[b].set(e,this[p].head),_(this),!0)}},{key:\"has\",value:function(e){if(!this[b].has(e))return!1;var t=this[b].get(e).value;return!w(this,t)}},{key:\"get\",value:function(e){return m(this,e,!0)}},{key:\"peek\",value:function(e){return m(this,e,!1)}},{key:\"pop\",value:function(){var e=this[p].tail;return e?(k(this,e),e.value):null}},{key:\"del\",value:function(e){k(this,this[b].get(e))}},{key:\"load\",value:function(e){this.reset();for(var t=Date.now(),r=e.length-1;r>=0;r--){var n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{var o=i-t;o>0&&this.set(n.k,n.v,o)}}}},{key:\"prune\",value:function(){var e=this;this[b].forEach((function(t,r){return m(e,r,!1)}))}},{key:\"max\",set:function(e){if(\"number\"!=typeof e||e<0)throw new TypeError(\"max must be a non-negative number\");this[s]=e||1/0,_(this)},get:function(){return this[s]}},{key:\"allowStale\",set:function(e){this[f]=!!e},get:function(){return this[f]}},{key:\"maxAge\",set:function(e){if(\"number\"!=typeof e)throw new TypeError(\"maxAge must be a non-negative number\");this[c]=e,_(this)},get:function(){return this[c]}},{key:\"lengthCalculator\",set:function(e){var t=this;\"function\"!=typeof e&&(e=v),e!==this[l]&&(this[l]=e,this[u]=0,this[p].forEach((function(e){e.length=t[l](e.value,e.key),t[u]+=e.length}))),_(this)},get:function(){return this[l]}},{key:\"length\",get:function(){return this[u]}},{key:\"itemCount\",get:function(){return this[p].length}}]),e}(),m=function(e,t,r){var n=e[b].get(t);if(n){var i=n.value;if(w(e,i)){if(k(e,n),!e[f])return}else r&&(e[y]&&(n.value.now=Date.now()),e[p].unshiftNode(n));return i.value}},w=function(e,t){if(!t||!t.maxAge&&!e[c])return!1;var r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},_=function(e){if(e[u]>e[s])for(var t=e[p].tail;e[u]>e[s]&&null!==t;){var r=t.prev;k(e,t),t=r}},k=function(e,t){if(t){var r=t.value;e[h]&&e[h](r.key,r.value),e[u]-=r.length,e[b].delete(r.key),e[p].removeNode(t)}},x=function e(t,r,i,o,a){n(this,e),this.key=t,this.value=r,this.length=i,this.now=o,this.maxAge=a||0},S=function(e,t,r,n){var i=r.value;w(e,i)&&(k(e,r),e[f]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};t.exports=g},{yallist:\"sfWH\"}],FOZT:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.assign=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},r.chunk=function(e,t){for(var r=[],n=e.length,i=0;i=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]?arguments[2]:null;(0,l.default)(this,e),this.offset=t,this.length=r,this.data=n}return(0,f.default)(e,[{key:\"top\",get:function(){return this.offset+this.length}}]),e}(),m=function e(t,r,n){(0,l.default)(this,e),this.offset=t,this.length=r,this.blockIds=n},w=function(e){(0,a.default)(r,e);var t=v(r);function r(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.blockSize,a=void 0===o?65536:o,s=i.cacheSize,u=void 0===s?100:s;return(0,l.default)(this,r),(n=t.call(this)).source=e,n.blockSize=a,n.blockCache=new c.default({max:u}),n.blockRequests=new Map,n.blockIdsToFetch=new Set,n}return(0,f.default)(r,[{key:\"fetch\",value:function(){var e=(0,o.default)(n.default.mark((function e(t,r){var o,a,s,u,l,f,c,h,p,y,v,g,m,w,_,k,x,S,O,T,E,C,P,j,R,M,A,I,D,L,N,F,U,B,G,z,H,W;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=new Map,a=new Map,s=new Set,u=b(t);try{for(u.s();!(l=u.n()).done;)for(f=l.value,c=f.offset,h=f.length,p=c+h,null!==(y=this.fileSize)&&(p=Math.min(p,y)),v=Math.floor(c/this.blockSize)*this.blockSize,g=v;g0)){e.next=65;break}this.fetchBlocks(r),I=b(T),e.prev=44,I.s();case 46:if((D=I.n()).done){e.next=54;break}if(L=D.value,N=this.blockRequests.get(L)){e.next=51;break}throw new Error(\"Block \".concat(L,\" is not in the block requests\"));case 51:a.set(L,N);case 52:e.next=46;break;case 54:e.next=59;break;case 56:e.prev=56,e.t1=e.catch(44),I.e(e.t1);case 59:return e.prev=59,I.f(),e.finish(59);case 62:return e.next=64,Promise.allSettled(Array.from(a.values()));case 64:O=e.sent;case 65:if(!O.some((function(e){return\"rejected\"===e.status}))){e.next=69;break}if(!r||!r.aborted){e.next=68;break}throw new d.AbortError(\"Request was aborted\");case 68:throw new d.AggregateError(O.filter((function(e){return\"rejected\"===e.status})).map((function(e){return e.reason})),\"Request failed\");case 69:F=O.map((function(e){return e.value})),U=new Map((0,d.zip)(Array.from(a.keys()),F)),B=b(o);try{for(B.s();!(G=B.n()).done;)z=(0,i.default)(G.value,2),H=z[0],W=z[1],U.set(H,W)}catch(e){B.e(e)}finally{B.f()}return e.abrupt(\"return\",this.readSliceData(t,U));case 74:case\"end\":return e.stop()}}),e,this,[[9,28,31,34],[44,56,59,62]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:\"fetchBlocks\",value:function(e){var t=this;this.blockIdsToFetch.size>0&&function(){for(var r=t.groupBlocks(t.blockIdsToFetch),i=t.source.fetch(r,e),a=function(a){var s,u=b(r[a].blockIds);try{var l=function(){var r=s.value,u=(0,o.default)(n.default.mark((function o(){var s,u,l,f,c,h;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,i;case 3:return n.t0=a,s=n.sent[n.t0],u=r*t.blockSize,l=u-s.offset,f=Math.min(l+t.blockSize,s.data.byteLength),c=s.data.slice(l,f),h=new g(u,c.byteLength,c),t.blockCache.set(r,h),n.abrupt(\"return\",h);case 14:throw n.prev=14,n.t1=n.catch(0),\"AbortError\"===n.t1.name&&(n.t1.signal=e),n.t1;case 18:return n.prev=18,t.blockRequests.delete(r),n.finish(18);case 21:case\"end\":return n.stop()}}),o,null,[[0,14,18,21]])})))();t.blockRequests.set(r,u)};for(u.s();!(s=u.n()).done;)l()}catch(e){u.e(e)}finally{u.f()}},s=0;s0&&(d=c),l=f.top-n<0?f.length-h:n-f.offset-h;var p=new Uint8Array(f.data,h,l);s.set(p,d)}return a}))}},{key:\"fileSize\",get:function(){return this.source.fileSize}}]),r}(h.BaseSource);r.BlockedSource=w},{\"@babel/runtime/regenerator\":\"PMvg\",\"@babel/runtime/helpers/slicedToArray\":\"HETk\",\"@babel/runtime/helpers/asyncToGenerator\":\"agGE\",\"@babel/runtime/helpers/inherits\":\"d4H2\",\"@babel/runtime/helpers/possibleConstructorReturn\":\"pxk2\",\"@babel/runtime/helpers/getPrototypeOf\":\"UJE0\",\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\",\"lru-cache\":\"tpff\",\"./basesource\":\"LzCD\",\"../utils\":\"FOZT\"}],uL1U:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.BaseClient=r.BaseResponse=void 0;var n=s(e(\"@babel/runtime/regenerator\")),i=s(e(\"@babel/runtime/helpers/asyncToGenerator\")),o=s(e(\"@babel/runtime/helpers/classCallCheck\")),a=s(e(\"@babel/runtime/helpers/createClass\"));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(){(0,o.default)(this,e)}return(0,a.default)(e,[{key:\"getHeader\",value:function(e){throw new Error(\"not implemented\")}},{key:\"getData\",value:function(){var e=(0,i.default)(n.default.mark((function e(){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error(\"not implemented\");case 1:case\"end\":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:\"ok\",get:function(){return this.status>=200&&this.status<=299}},{key:\"status\",get:function(){throw new Error(\"not implemented\")}}]),e}();r.BaseResponse=u;var l=function(){function e(t){(0,o.default)(this,e),this.url=t}return(0,a.default)(e,[{key:\"request\",value:function(){var e=(0,i.default)(n.default.mark((function e(){var t,r=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw(t=r.length>0&&void 0!==r[0]?r[0]:{}).headers,t.credentials,t.signal,new Error(\"request is not implemented\");case 2:case\"end\":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}]),e}();r.BaseClient=l},{\"@babel/runtime/regenerator\":\"PMvg\",\"@babel/runtime/helpers/asyncToGenerator\":\"agGE\",\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\"}],Un5s:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.FetchClient=void 0;var n=c(e(\"@babel/runtime/regenerator\")),i=c(e(\"@babel/runtime/helpers/asyncToGenerator\")),o=c(e(\"@babel/runtime/helpers/classCallCheck\")),a=c(e(\"@babel/runtime/helpers/createClass\")),s=c(e(\"@babel/runtime/helpers/inherits\")),u=c(e(\"@babel/runtime/helpers/possibleConstructorReturn\")),l=c(e(\"@babel/runtime/helpers/getPrototypeOf\")),f=e(\"./base\");function c(e){return e&&e.__esModule?e:{default:e}}function h(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,l.default)(e);if(t){var i=(0,l.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,u.default)(this,r)}}var d=function(e){(0,s.default)(r,e);var t=h(r);function r(e){var n;return(0,o.default)(this,r),(n=t.call(this)).response=e,n}return(0,a.default)(r,[{key:\"getHeader\",value:function(e){return this.response.headers.get(e)}},{key:\"getData\",value:function(){var e=(0,i.default)(n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.response.arrayBuffer){e.next=6;break}return e.next=3,this.response.arrayBuffer();case 3:e.t0=e.sent,e.next=9;break;case 6:return e.next=8,this.response.buffer();case 8:e.t0=e.sent.buffer;case 9:return t=e.t0,e.abrupt(\"return\",t);case 11:case\"end\":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:\"status\",get:function(){return this.response.status}}]),r}(f.BaseResponse),p=function(e){(0,s.default)(r,e);var t=h(r);function r(e,n){var i;return(0,o.default)(this,r),(i=t.call(this,e)).credentials=n,i}return(0,a.default)(r,[{key:\"request\",value:function(){var e=(0,i.default)(n.default.mark((function e(){var t,r,i,o,a,s=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},r=t.headers,i=t.credentials,o=t.signal,e.next=3,fetch(this.url,{headers:r,credentials:i,signal:o});case 3:return a=e.sent,e.abrupt(\"return\",new d(a));case 5:case\"end\":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),r}(f.BaseClient);r.FetchClient=p},{\"@babel/runtime/regenerator\":\"PMvg\",\"@babel/runtime/helpers/asyncToGenerator\":\"agGE\",\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\",\"@babel/runtime/helpers/inherits\":\"d4H2\",\"@babel/runtime/helpers/possibleConstructorReturn\":\"pxk2\",\"@babel/runtime/helpers/getPrototypeOf\":\"UJE0\",\"./base\":\"uL1U\"}],hvgd:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.XHRClient=void 0;var n=d(e(\"@babel/runtime/helpers/slicedToArray\")),i=d(e(\"@babel/runtime/regenerator\")),o=d(e(\"@babel/runtime/helpers/asyncToGenerator\")),a=d(e(\"@babel/runtime/helpers/classCallCheck\")),s=d(e(\"@babel/runtime/helpers/createClass\")),u=d(e(\"@babel/runtime/helpers/inherits\")),l=d(e(\"@babel/runtime/helpers/possibleConstructorReturn\")),f=d(e(\"@babel/runtime/helpers/getPrototypeOf\")),c=e(\"./base\"),h=e(\"../../utils\");function d(e){return e&&e.__esModule?e:{default:e}}function p(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,l.default)(this,r)}}var b=function(e){(0,u.default)(r,e);var t=p(r);function r(e,n){var i;return(0,a.default)(this,r),(i=t.call(this)).xhr=e,i.data=n,i}return(0,s.default)(r,[{key:\"getHeader\",value:function(e){return this.xhr.getResponseHeader(e)}},{key:\"getData\",value:function(){var e=(0,o.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(\"return\",this.data);case 1:case\"end\":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:\"status\",get:function(){return this.xhr.status}}]),r}(c.BaseResponse),y=function(e){(0,u.default)(r,e);var t=p(r);function r(){return(0,a.default)(this,r),t.apply(this,arguments)}return(0,s.default)(r,[{key:\"constructRequest\",value:function(e,t){var r=this;return new Promise((function(i,o){var a=new XMLHttpRequest;a.open(\"GET\",r.url),a.responseType=\"arraybuffer\";for(var s=0,u=Object.entries(e);s0&&void 0!==a[0]?a[0]:{},r=t.headers,n=t.signal,e.next=3,this.constructRequest(r,n);case 3:return o=e.sent,e.abrupt(\"return\",o);case 5:case\"end\":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),r}(c.BaseClient);r.XHRClient=y},{\"@babel/runtime/helpers/slicedToArray\":\"HETk\",\"@babel/runtime/regenerator\":\"PMvg\",\"@babel/runtime/helpers/asyncToGenerator\":\"agGE\",\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\",\"@babel/runtime/helpers/inherits\":\"d4H2\",\"@babel/runtime/helpers/possibleConstructorReturn\":\"pxk2\",\"@babel/runtime/helpers/getPrototypeOf\":\"UJE0\",\"./base\":\"uL1U\",\"../../utils\":\"FOZT\"}],p5a1:[function(e,t,r){var n,i=arguments[3];r.fetch=l(i.fetch)&&l(i.ReadableStream),r.writableStream=l(i.WritableStream),r.abortController=l(i.AbortController),r.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(e){}function o(){if(void 0!==n)return n;if(i.XMLHttpRequest){n=new i.XMLHttpRequest;try{n.open(\"GET\",i.XDomainRequest?\"/\":\"https://example.com\")}catch(e){n=null}}else n=null;return n}function a(e){var t=o();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var s=void 0!==i.ArrayBuffer,u=s&&l(i.ArrayBuffer.prototype.slice);function l(e){return\"function\"==typeof e}r.arraybuffer=r.fetch||s&&a(\"arraybuffer\"),r.msstream=!r.fetch&&u&&a(\"ms-stream\"),r.mozchunkedarraybuffer=!r.fetch&&s&&a(\"moz-chunked-arraybuffer\"),r.overrideMimeType=r.fetch||!!o()&&l(o().overrideMimeType),r.vbArray=l(i.VBArray),n=null},{}],Yj0v:[function(e,t,r){e(\"process\");var n=e(\"process\");void 0===n||!n.version||0===n.version.indexOf(\"v0.\")||0===n.version.indexOf(\"v1.\")&&0!==n.version.indexOf(\"v1.8.\")?t.exports={nextTick:function(e,t,r,i){if(\"function\"!=typeof e)throw new TypeError('\"callback\" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return n.nextTick(e);case 2:return n.nextTick((function(){e.call(null,t)}));case 3:return n.nextTick((function(){e.call(null,t,r)}));case 4:return n.nextTick((function(){e.call(null,t,r,i)}));default:for(o=new Array(s-1),a=0;a0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return\"\";for(var t=this.head,r=\"\"+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t=n.allocUnsafe(e>>>0),r=this.head,i=0;r;)o(r.data,t,i),i+=r.data.length,r=r.next;return t},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+\" \"+e})},{\"safe-buffer\":\"Nqn4\",util:\"rDCW\"}],lCUh:[function(e,t,r){\"use strict\";var n=e(\"process-nextick-args\");function i(e,t){e.emit(\"error\",t)}t.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{\"process-nextick-args\":\"Yj0v\"}],jPmE:[function(e,t,r){e(\"process\"),e(\"process\");var n=arguments[3],i=e(\"process-nextick-args\");function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}t.exports=m;var a,s=i.nextTick;m.WritableState=g;var u=Object.create(e(\"core-util-is\"));u.inherits=e(\"inherits\");var l={deprecate:e(\"util-deprecate\")},f=e(\"./internal/streams/stream\"),c=e(\"safe-buffer\").Buffer,h=n.Uint8Array||function(){};function d(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof h}var b,y=e(\"./internal/streams/destroy\");function v(){}function g(t,r){a=a||e(\"./_stream_duplex\"),t=t||{};var n=r instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,s=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){E(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function m(t){if(a=a||e(\"./_stream_duplex\"),!(b.call(m,this)||this instanceof a))return new m(t);this._writableState=new g(t,this),this.writable=!0,t&&(\"function\"==typeof t.write&&(this._write=t.write),\"function\"==typeof t.writev&&(this._writev=t.writev),\"function\"==typeof t.destroy&&(this._destroy=t.destroy),\"function\"==typeof t.final&&(this._final=t.final)),f.call(this)}function w(e,t){var r=new Error(\"write after end\");e.emit(\"error\",r),i.nextTick(t,r)}function _(e,t,r,n){var o=!0,a=!1;return null===r?a=new TypeError(\"May not write null values to stream\"):\"string\"==typeof r||void 0===r||t.objectMode||(a=new TypeError(\"Invalid non-string/buffer chunk\")),a&&(e.emit(\"error\",a),i.nextTick(n,a),o=!1),o}function k(e,t,r){return e.objectMode||!1===e.decodeStrings||\"string\"!=typeof t||(t=c.from(t,r)),t}function x(e,t,r,n,i,o){if(!r){var a=k(t,n,i);n!==a&&(r=!0,i=\"buffer\",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length-1))throw new TypeError(\"Unknown encoding: \"+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(m.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),m.prototype._write=function(e,t,r){r(new Error(\"_write() is not implemented\"))},m.prototype._writev=null,m.prototype.end=function(e,t,r){var n=this._writableState;\"function\"==typeof e?(r=e,e=null,t=null):\"function\"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||D(this,n,r)},Object.defineProperty(m.prototype,\"destroyed\",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),m.prototype.destroy=y.destroy,m.prototype._undestroy=y.undestroy,m.prototype._destroy=function(e,t){this.end(),t(e)}},{\"process-nextick-args\":\"Yj0v\",\"core-util-is\":\"Q14w\",inherits:\"Bm0n\",\"util-deprecate\":\"yM1o\",\"./internal/streams/stream\":\"ExO1\",\"safe-buffer\":\"Nqn4\",\"./internal/streams/destroy\":\"lCUh\",\"./_stream_duplex\":\"Jcj8\",process:\"pBGv\"}],Jcj8:[function(e,t,r){\"use strict\";var n=e(\"process-nextick-args\"),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=c;var o=Object.create(e(\"core-util-is\"));o.inherits=e(\"inherits\");var a=e(\"./_stream_readable\"),s=e(\"./_stream_writable\");o.inherits(c,a);for(var u=i(s.prototype),l=0;l>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,\"�\";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,\"�\";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,\"�\"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString(\"utf16le\",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(\"utf16le\",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(\"utf16le\",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString(\"base64\",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(\"base64\",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):\"\";return this.lastNeed?t+this.lastChar.toString(\"base64\",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):\"\"}r.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return\"\";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString(\"utf8\",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString(\"utf8\",t,n)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{\"safe-buffer\":\"Nqn4\"}],YrHu:[function(e,t,r){e(\"process\");var n=arguments[3],i=e(\"process\"),o=e(\"process-nextick-args\");t.exports=x;var a,s=e(\"isarray\");x.ReadableState=k;e(\"events\").EventEmitter;var u=function(e,t){return e.listeners(t).length},l=e(\"./internal/streams/stream\"),f=e(\"safe-buffer\").Buffer,c=n.Uint8Array||function(){};function h(e){return f.from(e)}function d(e){return f.isBuffer(e)||e instanceof c}var p=Object.create(e(\"core-util-is\"));p.inherits=e(\"inherits\");var b=e(\"util\"),y=void 0;y=b&&b.debuglog?b.debuglog(\"stream\"):function(){};var v,g=e(\"./internal/streams/BufferList\"),m=e(\"./internal/streams/destroy\");p.inherits(x,l);var w=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function _(e,t,r){if(\"function\"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}function k(t,r){t=t||{};var n=r instanceof(a=a||e(\"./_stream_duplex\"));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(v||(v=e(\"string_decoder/\").StringDecoder),this.decoder=new v(t.encoding),this.encoding=t.encoding)}function x(t){if(a=a||e(\"./_stream_duplex\"),!(this instanceof x))return new x(t);this._readableState=new k(t,this),this.readable=!0,t&&(\"function\"==typeof t.read&&(this._read=t.read),\"function\"==typeof t.destroy&&(this._destroy=t.destroy)),l.call(this)}function S(e,t,r,n,i){var o,a=e._readableState;return null===t?(a.reading=!1,R(e,a)):(i||(o=T(a,t)),o?e.emit(\"error\",o):a.objectMode||t&&t.length>0?(\"string\"==typeof t||a.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=h(t)),n?a.endEmitted?e.emit(\"error\",new Error(\"stream.unshift() after end event\")):O(e,a,t,!0):a.ended?e.emit(\"error\",new Error(\"stream.push() after EOF\")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?O(e,a,t,!1):I(e,a)):O(e,a,t,!1))):n||(a.reading=!1)),E(a)}function O(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit(\"data\",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&M(e)),I(e,t)}function T(e,t){var r;return d(t)||\"string\"==typeof t||void 0===t||e.objectMode||(r=new TypeError(\"Invalid non-string/buffer chunk\")),r}function E(e){return!e.ended&&(e.needReadable||e.length=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=P(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function R(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,M(e)}}function M(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(y(\"emitReadable\",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(A,e):A(e))}function A(e){y(\"emit readable\"),e.emit(\"readable\"),B(e)}function I(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(D,e,t))}function D(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(\"\"):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=z(e,t.buffer,t.decoder),r);var r}function z(e,t,r){var n;return eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0==(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}function W(e,t){var r=f.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0==(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}function q(e){var t=e._readableState;if(t.length>0)throw new Error('\"endReadable()\" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(K,t,e))}function K(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit(\"end\"))}function V(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return y(\"read: emitReadable\",t.length,t.ended),0===t.length&&t.ended?q(this):M(this),null;if(0===(e=j(e,t))&&t.ended)return 0===t.length&&q(this),null;var n,i=t.needReadable;return y(\"need readable\",i),(0===t.length||t.length-e0?G(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&q(this)),null!==n&&this.emit(\"data\",n),n},x.prototype._read=function(e){this.emit(\"error\",new Error(\"_read() is not implemented\"))},x.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,y(\"pipe count=%d opts=%j\",n.pipesCount,t);var a=t&&!1===t.end||e===i.stdout||e===i.stderr?v:s;function s(){y(\"onend\"),e.end()}n.endEmitted?o.nextTick(a):r.once(\"end\",a),e.on(\"unpipe\",(function t(i,o){y(\"onunpipe\"),i===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,y(\"cleanup\"),e.removeListener(\"close\",p),e.removeListener(\"finish\",b),e.removeListener(\"drain\",l),e.removeListener(\"error\",d),e.removeListener(\"unpipe\",t),r.removeListener(\"end\",s),r.removeListener(\"end\",v),r.removeListener(\"data\",h),f=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}));var l=L(r);e.on(\"drain\",l);var f=!1,c=!1;function h(t){y(\"ondata\"),c=!1,!1!==e.write(t)||c||((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==V(n.pipes,e))&&!f&&(y(\"false write response, pause\",r._readableState.awaitDrain),r._readableState.awaitDrain++,c=!0),r.pause())}function d(t){y(\"onerror\",t),v(),e.removeListener(\"error\",d),0===u(e,\"error\")&&e.emit(\"error\",t)}function p(){e.removeListener(\"finish\",b),v()}function b(){y(\"onfinish\"),e.removeListener(\"close\",p),v()}function v(){y(\"unpipe\"),r.unpipe(e)}return r.on(\"data\",h),_(e,\"error\",d),e.once(\"close\",p),e.once(\"finish\",b),e.emit(\"pipe\",r),n.flowing||(y(\"pipe resume\"),r.resume()),e},x.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(\"unpipe\",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;oe._pos){var n=r.substr(e._pos);if(\"x-user-defined\"===e._charset){for(var a=new i(n.length),s=0;se._pos&&(e.push(new i(new Uint8Array(u.result.slice(e._pos)))),e._pos=u.result.byteLength)},u.onload=function(){e.push(null)},u.readAsArrayBuffer(r)}e._xhr.readyState===l.DONE&&\"ms-stream\"!==e._mode&&e.push(null)}},{\"./capability\":\"p5a1\",inherits:\"Bm0n\",\"readable-stream\":\"JaqQ\",process:\"pBGv\",buffer:\"dskh\"}],AH4k:[function(e,t,r){var n=e(\"buffer\").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if(\"function\"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(n.isBuffer(e)){for(var t=new Uint8Array(e.length),r=e.length,i=0;i= 0x80 (not a basic code point)\",\"invalid-input\":\"Invalid input\"},y=Math.floor,v=String.fromCharCode;function g(e){throw new RangeError(b[e])}function m(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function w(e,t){var r=e.split(\"@\"),n=\"\";return r.length>1&&(n=r[0]+\"@\",e=r[1]),n+m((e=e.replace(p,\".\")).split(\".\"),t).join(\".\")}function _(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=v((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+v(e)})).join(\"\")}function x(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function S(e,t,r){var n=0;for(e=r?y(e/700):e>>1,e+=y(e/t);e>455;n+=c)e=y(e/35);return y(n+36*e/(e+38))}function O(e){var t,r,n,i,o,a,s,u,l,h,d,p=[],b=e.length,v=0,m=128,w=72;for((r=e.lastIndexOf(\"-\"))<0&&(r=0),n=0;n=128&&g(\"not-basic\"),p.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=b&&g(\"invalid-input\"),((u=(d=e.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:c)>=c||u>y((f-v)/a))&&g(\"overflow\"),v+=u*a,!(u<(l=s<=w?1:s>=w+26?26:s-w));s+=c)a>y(f/(h=c-l))&&g(\"overflow\"),a*=h;w=S(v-o,t=p.length+1,0==o),y(v/t)>f-m&&g(\"overflow\"),m+=y(v/t),v%=t,p.splice(v++,0,m)}return k(p)}function T(e){var t,r,n,i,o,a,s,u,l,h,d,p,b,m,w,k=[];for(p=(e=_(e)).length,t=128,r=0,o=72,a=0;a=t&&dy((f-r)/(b=n+1))&&g(\"overflow\"),r+=(s-t)*b,t=s,a=0;af&&g(\"overflow\"),d==t){for(u=r,l=c;!(u<(h=l<=o?1:l>=o+26?26:l-o));l+=c)w=u-h,m=c-h,k.push(v(x(h+w%m,0))),u=y(w/m);k.push(v(x(u,0))),o=S(r,b,n==i),r=0,++n}++r,++t}return k.join(\"\")}if(u={version:\"1.4.1\",ucs2:{decode:_,encode:k},decode:O,encode:T,toASCII:function(e){return w(e,(function(e){return d.test(e)?\"xn--\"+T(e):e}))},toUnicode:function(e){return w(e,(function(e){return h.test(e)?O(e.slice(4).toLowerCase()):e}))}},\"function\"==typeof n&&\"object\"==typeof n.amd&&n.amd)n(\"punycode\",(function(){return u}));else if(o&&a)if(t.exports==o)a.exports=u;else for(l in u)u.hasOwnProperty(l)&&(o[l]=u[l]);else e.punycode=u}(this)},{}],YsIc:[function(e,t,r){\"use strict\";t.exports={isString:function(e){return\"string\"==typeof e},isObject:function(e){return\"object\"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],J6GP:[function(e,t,r){\"use strict\";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,o){t=t||\"&\",r=r||\"=\";var a={};if(\"string\"!=typeof e||0===e.length)return a;var s=/\\+/g;e=e.split(t);var u=1e3;o&&\"number\"==typeof o.maxKeys&&(u=o.maxKeys);var l=e.length;u>0&&l>u&&(l=u);for(var f=0;f=0?(c=b.substr(0,y),h=b.substr(y+1)):(c=b,h=\"\"),d=decodeURIComponent(c),p=decodeURIComponent(h),n(a,d)?i(a[d])?a[d].push(p):a[d]=[a[d],p]:a[d]=p}return a};var i=Array.isArray||function(e){return\"[object Array]\"===Object.prototype.toString.call(e)}},{}],bvhO:[function(e,t,r){\"use strict\";var n=function(e){switch(typeof e){case\"string\":return e;case\"boolean\":return e?\"true\":\"false\";case\"number\":return isFinite(e)?e:\"\";default:return\"\"}};t.exports=function(e,t,r,s){return t=t||\"&\",r=r||\"=\",null===e&&(e=void 0),\"object\"==typeof e?o(a(e),(function(a){var s=encodeURIComponent(n(a))+r;return i(e[a])?o(e[a],(function(e){return s+encodeURIComponent(n(e))})).join(t):s+encodeURIComponent(n(e[a]))})).join(t):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(e)):\"\"};var i=Array.isArray||function(e){return\"[object Array]\"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n\",'\"',\"`\",\" \",\"\\r\",\"\\n\",\"\\t\"]),f=[\"'\"].concat(l),c=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(f),h=[\"/\",\"?\",\"#\"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,\"javascript:\":!0},y={javascript:!0,\"javascript:\":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},g=e(\"querystring\");function m(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError(\"Parameter 'url' must be a string, not \"+typeof e);var o=e.indexOf(\"?\"),s=-1!==o&&o127?A+=\"x\":A+=M[I];if(!A.match(d)){var L=j.slice(0,E),N=j.slice(E+1),F=M.match(p);F&&(L.push(F[1]),N.unshift(F[2])),N.length&&(m=\"/\"+N.join(\".\")+m),this.hostname=L.join(\".\");break}}}this.hostname.length>255?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=n.toASCII(this.hostname));var U=this.port?\":\"+this.port:\"\",B=this.hostname||\"\";this.host=B+U,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),\"/\"!==m[0]&&(m=\"/\"+m))}if(!b[k])for(E=0,R=f.length;E0)&&r.host.split(\"@\"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift())),r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.href=r.format(),r;if(!x.length)return r.pathname=null,r.search?r.path=\"/\"+r.search:r.path=null,r.href=r.format(),r;for(var O=x.slice(-1)[0],T=(r.host||e.host||x.length>1)&&(\".\"===O||\"..\"===O)||\"\"===O,E=0,C=x.length;C>=0;C--)\".\"===(O=x[C])?x.splice(C,1):\"..\"===O?(x.splice(C,1),E++):E&&(x.splice(C,1),E--);if(!_&&!k)for(;E--;E)x.unshift(\"..\");!_||\"\"===x[0]||x[0]&&\"/\"===x[0].charAt(0)||x.unshift(\"\"),T&&\"/\"!==x.join(\"/\").substr(-1)&&x.push(\"\");var P,j=\"\"===x[0]||x[0]&&\"/\"===x[0].charAt(0);return S&&(r.hostname=r.host=j?\"\":x.length?x.shift():\"\",(P=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift())),(_=_||r.host&&x.length)&&!j&&x.unshift(\"\"),x.length?r.pathname=x.join(\"/\"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(\":\"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{punycode:\"oWqx\",\"./util\":\"YsIc\",querystring:\"fk5h\"}],KKrj:[function(e,t,r){var n=arguments[3],i=e(\"./lib/request\"),o=e(\"./lib/response\"),a=e(\"xtend\"),s=e(\"builtin-status-codes\"),u=e(\"url\"),l=r;l.request=function(e,t){e=\"string\"==typeof e?u.parse(e):a(e);var r=-1===n.location.protocol.search(/^https?:$/)?\"http:\":\"\",o=e.protocol||r,s=e.hostname||e.host,l=e.port,f=e.path||\"/\";s&&-1!==s.indexOf(\":\")&&(s=\"[\"+s+\"]\"),e.url=(s?o+\"//\"+s:\"\")+(l?\":\"+l:\"\")+f,e.method=(e.method||\"GET\").toUpperCase(),e.headers=e.headers||{};var c=new i(e);return t&&c.on(\"response\",t),c},l.get=function(e,t){var r=l.request(e,t);return r.end(),r},l.ClientRequest=i,l.IncomingMessage=o.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=s,l.METHODS=[\"CHECKOUT\",\"CONNECT\",\"COPY\",\"DELETE\",\"GET\",\"HEAD\",\"LOCK\",\"M-SEARCH\",\"MERGE\",\"MKACTIVITY\",\"MKCOL\",\"MOVE\",\"NOTIFY\",\"OPTIONS\",\"PATCH\",\"POST\",\"PROPFIND\",\"PROPPATCH\",\"PURGE\",\"PUT\",\"REPORT\",\"SEARCH\",\"SUBSCRIBE\",\"TRACE\",\"UNLOCK\",\"UNSUBSCRIBE\"]},{\"./lib/request\":\"yL7F\",\"./lib/response\":\"UxIR\",xtend:\"K5Tb\",\"builtin-status-codes\":\"OpTI\",url:\"Mej7\"}],wVMl:[function(e,t,r){var n=e(\"http\"),i=e(\"url\"),o=t.exports;for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a]);function s(e){if(\"string\"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol=\"https:\"),\"https:\"!==e.protocol)throw new Error('Protocol \"'+e.protocol+'\" not supported. Expected \"https:\"');return e}o.request=function(e,t){return e=s(e),n.request.call(this,e,t)},o.get=function(e,t){return e=s(e),n.get.call(this,e,t)}},{http:\"KKrj\",url:\"Mej7\"}],SHlS:[function(e,t,r){e(\"buffer\").Buffer;var n=e(\"buffer\").Buffer;Object.defineProperty(r,\"__esModule\",{value:!0}),r.HttpClient=void 0;var i=v(e(\"@babel/runtime/helpers/defineProperty\")),o=v(e(\"@babel/runtime/regenerator\")),a=v(e(\"@babel/runtime/helpers/asyncToGenerator\")),s=v(e(\"@babel/runtime/helpers/classCallCheck\")),u=v(e(\"@babel/runtime/helpers/createClass\")),l=v(e(\"@babel/runtime/helpers/inherits\")),f=v(e(\"@babel/runtime/helpers/possibleConstructorReturn\")),c=v(e(\"@babel/runtime/helpers/getPrototypeOf\")),h=v(e(\"http\")),d=v(e(\"https\")),p=v(e(\"url\")),b=e(\"./base\"),y=e(\"../../utils\");function v(e){return e&&e.__esModule?e:{default:e}}function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t0&&void 0!==a[0]?a[0]:{},r=t.headers,n=t.signal,e.next=3,this.constructRequest(r,n);case 3:return i=e.sent,e.abrupt(\"return\",i);case 5:case\"end\":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),r}(b.BaseClient);r.HttpClient=k},{\"@babel/runtime/helpers/defineProperty\":\"IxO8\",\"@babel/runtime/regenerator\":\"PMvg\",\"@babel/runtime/helpers/asyncToGenerator\":\"agGE\",\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\",\"@babel/runtime/helpers/inherits\":\"d4H2\",\"@babel/runtime/helpers/possibleConstructorReturn\":\"pxk2\",\"@babel/runtime/helpers/getPrototypeOf\":\"UJE0\",http:\"KKrj\",https:\"wVMl\",url:\"Mej7\",\"./base\":\"uL1U\",\"../../utils\":\"FOZT\",buffer:\"dskh\"}],itmA:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.makeFetchSource=S,r.makeXHRSource=O,r.makeHttpSource=T,r.makeRemoteSource=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.forceXHR,i=void 0!==r&&r,o=(0,n.default)(t,[\"forceXHR\"]);return\"function\"!=typeof fetch||i?\"undefined\"!=typeof XMLHttpRequest?O(e,o):T(e,o):S(e,o)};var n=g(e(\"@babel/runtime/helpers/objectWithoutProperties\")),i=g(e(\"@babel/runtime/helpers/defineProperty\")),o=g(e(\"@babel/runtime/regenerator\")),a=g(e(\"@babel/runtime/helpers/asyncToGenerator\")),s=g(e(\"@babel/runtime/helpers/classCallCheck\")),u=g(e(\"@babel/runtime/helpers/createClass\")),l=g(e(\"@babel/runtime/helpers/inherits\")),f=g(e(\"@babel/runtime/helpers/possibleConstructorReturn\")),c=g(e(\"@babel/runtime/helpers/getPrototypeOf\")),h=e(\"./httputils\"),d=e(\"./basesource\"),p=e(\"./blockedsource\"),b=e(\"./client/fetch\"),y=e(\"./client/xhr\"),v=e(\"./client/http\");function g(e){return e&&e.__esModule?e:{default:e}}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t=t.length)){e.next=4;break}return e.abrupt(\"return\",this.fetchSlices(t,r));case 4:this.maxRanges>0&&t.length;case 5:return e.next=7,Promise.all(t.map((function(e){return n.fetchSlice(e,r)})));case 7:return e.abrupt(\"return\",e.sent);case 8:case\"end\":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:\"fetchSlices\",value:function(){var e=(0,a.default)(o.default.mark((function e(t,r){var n,i,a,s,u,l,f,c,d,p,b,y,v,g=this;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.request({headers:w(w({},this.headers),{},{Range:\"bytes=\".concat(t.map((function(e){var t=e.offset,r=e.length;return\"\".concat(t,\"-\").concat(t+r)})).join(\",\"))}),signal:r});case 2:if((n=e.sent).ok){e.next=7;break}throw new Error(\"Error fetching data.\");case 7:if(206!==n.status){e.next=32;break}if(i=(0,h.parseContentType)(n.getHeader(\"content-type\")),a=i.type,s=i.params,\"multipart/byteranges\"!==a){e.next=18;break}return e.t0=h.parseByteRanges,e.next=13,n.getData();case 13:return e.t1=e.sent,e.t2=s.boundary,u=(0,e.t0)(e.t1,e.t2),this._fileSize=u[0].fileSize||null,e.abrupt(\"return\",u);case 18:return e.next=20,n.getData();case 20:if(l=e.sent,f=(0,h.parseContentRange)(n.getHeader(\"content-range\")),c=f.start,d=f.end,p=f.total,this._fileSize=p||null,b=[{data:l,offset:c,length:d-c}],!(t.length>1)){e.next=29;break}return e.next=27,Promise.all(t.slice(1).map((function(e){return g.fetchSlice(e,r)})));case 27:return y=e.sent,e.abrupt(\"return\",b.concat(y));case 29:return e.abrupt(\"return\",b);case 32:if(this.allowFullFile){e.next=34;break}throw new Error(\"Server responded with full file\");case 34:return e.next=36,n.getData();case 36:return v=e.sent,this._fileSize=v.byteLength,e.abrupt(\"return\",[{data:v,offset:0,length:v.byteLength}]);case 39:case\"end\":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:\"fetchSlice\",value:function(){var e=(0,a.default)(o.default.mark((function e(t,r){var n,i,a,s,u,l,f;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.offset,i=t.length,e.next=3,this.client.request({headers:w(w({},this.headers),{},{Range:\"bytes=\".concat(n,\"-\").concat(n+i)}),signal:r});case 3:if((a=e.sent).ok){e.next=8;break}throw new Error(\"Error fetching data.\");case 8:if(206!==a.status){e.next=17;break}return e.next=11,a.getData();case 11:return s=e.sent,u=(0,h.parseContentRange)(a.getHeader(\"content-range\")),l=u.total,this._fileSize=l||null,e.abrupt(\"return\",{data:s,offset:n,length:i});case 17:if(this.allowFullFile){e.next=19;break}throw new Error(\"Server responded with full file\");case 19:return e.next=21,a.getData();case 21:return f=e.sent,this._fileSize=f.byteLength,e.abrupt(\"return\",{data:f,offset:0,length:f.byteLength});case 24:case\"end\":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:\"fileSize\",get:function(){return this._fileSize}}]),r}(d.BaseSource);function x(e,t){var r=t.blockSize,n=t.cacheSize;return null===r?e:new p.BlockedSource(e,r,n)}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.headers,i=void 0===r?{}:r,o=t.credentials,a=t.maxRanges,s=void 0===a?0:a,u=t.allowFullFile,l=void 0!==u&&u,f=(0,n.default)(t,[\"headers\",\"credentials\",\"maxRanges\",\"allowFullFile\"]),c=new b.FetchClient(e,o);return x(new k(c,i,s,l),f)}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.headers,i=void 0===r?{}:r,o=t.maxRanges,a=void 0===o?0:o,s=t.allowFullFile,u=void 0!==s&&s,l=(0,n.default)(t,[\"headers\",\"maxRanges\",\"allowFullFile\"]),f=new y.XHRClient(e);return x(new k(f,i,a,u),l)}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.headers,i=void 0===r?{}:r,o=t.maxRanges,a=void 0===o?0:o,s=t.allowFullFile,u=void 0!==s&&s,l=(0,n.default)(t,[\"headers\",\"maxRanges\",\"allowFullFile\"]),f=new v.HttpClient(e);return x(new k(f,i,a,u),l)}},{\"@babel/runtime/helpers/objectWithoutProperties\":\"U8F3\",\"@babel/runtime/helpers/defineProperty\":\"IxO8\",\"@babel/runtime/regenerator\":\"PMvg\",\"@babel/runtime/helpers/asyncToGenerator\":\"agGE\",\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\",\"@babel/runtime/helpers/inherits\":\"d4H2\",\"@babel/runtime/helpers/possibleConstructorReturn\":\"pxk2\",\"@babel/runtime/helpers/getPrototypeOf\":\"UJE0\",\"./httputils\":\"ZJpj\",\"./basesource\":\"LzCD\",\"./blockedsource\":\"xD7g\",\"./client/fetch\":\"Un5s\",\"./client/xhr\":\"hvgd\",\"./client/http\":\"SHlS\"}],wM9h:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.makeBufferSource=function(e){return new h(e)};var n=f(e(\"@babel/runtime/helpers/classCallCheck\")),i=f(e(\"@babel/runtime/helpers/createClass\")),o=f(e(\"@babel/runtime/helpers/inherits\")),a=f(e(\"@babel/runtime/helpers/possibleConstructorReturn\")),s=f(e(\"@babel/runtime/helpers/getPrototypeOf\")),u=e(\"./basesource\"),l=e(\"../utils\");function f(e){return e&&e.__esModule?e:{default:e}}function c(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,s.default)(e);if(t){var i=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,a.default)(this,r)}}var h=function(e){(0,o.default)(r,e);var t=c(r);function r(e){var i;return(0,n.default)(this,r),(i=t.call(this)).arrayBuffer=e,i}return(0,i.default)(r,[{key:\"fetchSlice\",value:function(e,t){if(t&&t.aborted)throw new l.AbortError(\"Request aborted\");return this.arrayBuffer.slice(e.offset,e.offset+e.length)}}]),r}(u.BaseSource)},{\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\",\"@babel/runtime/helpers/inherits\":\"d4H2\",\"@babel/runtime/helpers/possibleConstructorReturn\":\"pxk2\",\"@babel/runtime/helpers/getPrototypeOf\":\"UJE0\",\"./basesource\":\"LzCD\",\"../utils\":\"FOZT\"}],GiEG:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.makeFileReaderSource=function(e){return new h(e)};var n=f(e(\"@babel/runtime/regenerator\")),i=f(e(\"@babel/runtime/helpers/asyncToGenerator\")),o=f(e(\"@babel/runtime/helpers/classCallCheck\")),a=f(e(\"@babel/runtime/helpers/createClass\")),s=f(e(\"@babel/runtime/helpers/inherits\")),u=f(e(\"@babel/runtime/helpers/possibleConstructorReturn\")),l=f(e(\"@babel/runtime/helpers/getPrototypeOf\"));function f(e){return e&&e.__esModule?e:{default:e}}function c(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,l.default)(e);if(t){var i=(0,l.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,u.default)(this,r)}}var h=function(e){(0,s.default)(r,e);var t=c(r);function r(e){var n;return(0,o.default)(this,r),(n=t.call(this)).file=e,n}return(0,a.default)(r,[{key:\"fetchSlice\",value:function(){var e=(0,i.default)(n.default.mark((function e(t,r){var i=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(\"return\",new Promise((function(e,n){var o=i.file.slice(t.offset,t.offset+t.length),a=new FileReader;a.onload=function(t){return e(t.target.result)},a.onerror=n,a.onabort=n,a.readAsArrayBuffer(o),r&&r.addEventListener(\"abort\",(function(){return a.abort()}))})));case 1:case\"end\":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}]),r}(e(\"./basesource\").BaseSource)},{\"@babel/runtime/regenerator\":\"PMvg\",\"@babel/runtime/helpers/asyncToGenerator\":\"agGE\",\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\",\"@babel/runtime/helpers/inherits\":\"d4H2\",\"@babel/runtime/helpers/possibleConstructorReturn\":\"pxk2\",\"@babel/runtime/helpers/getPrototypeOf\":\"UJE0\",\"./basesource\":\"LzCD\"}],G7Cz:[function(e,t,r){e(\"buffer\").Buffer;var n=e(\"buffer\").Buffer;Object.defineProperty(r,\"__esModule\",{value:!0}),r.makeFileSource=function(e){return new v(e)};var i=h(e(\"@babel/runtime/regenerator\")),o=h(e(\"@babel/runtime/helpers/asyncToGenerator\")),a=h(e(\"@babel/runtime/helpers/classCallCheck\")),s=h(e(\"@babel/runtime/helpers/createClass\")),u=h(e(\"@babel/runtime/helpers/inherits\")),l=h(e(\"@babel/runtime/helpers/possibleConstructorReturn\")),f=h(e(\"@babel/runtime/helpers/getPrototypeOf\")),c=e(\"fs\");function h(e){return e&&e.__esModule?e:{default:e}}function d(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,l.default)(this,r)}}function p(e){return new Promise((function(t,r){(0,c.close)(e,(function(e){e?r(e):t()}))}))}function b(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return new Promise((function(n,i){(0,c.open)(e,t,r,(function(e,t){e?i(e):n(t)}))}))}function y(){for(var e=arguments.length,t=new Array(e),r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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,s=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw o}}}}function a(e,t){if(e){if(\"string\"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r>8&255,e[t+1]=255&r},writeUint:function(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=r>>0&255},writeASCII:function(e,t,r){(0,i.times)(r.length,(function(n){e[t+n]=r.charCodeAt(n)}))},ui8:new Uint8Array(8)};d.fl64=new Float64Array(d.ui8.buffer),d.writeDouble=function(e,t,r){d.fl64[0]=r,(0,i.times)(8,(function(r){e[t+r]=d.ui8[7-r]}))};var p=function(e,t,r,a){var s=r,u=Object.keys(a).filter((function(e){return null!=e&&\"undefined\"!==e}));e.writeUshort(t,s,u.length);var l,f=(s+=2)+12*u.length+4,h=o(u);try{var d=function(){var r=l.value,o=null;\"number\"==typeof r?o=r:\"string\"==typeof r&&(o=parseInt(r,10));var u=n.fieldTagTypes[o],h=c[u];if(null==u||void 0===u||void 0===u)throw new Error(\"unknown type of tag: \".concat(o));var d=a[r];if(void 0===d)throw new Error(\"failed to get value for key \".concat(r));\"ASCII\"===u&&\"string\"==typeof d&&!1===(0,i.endsWith)(d,\"\\0\")&&(d+=\"\\0\");var p=d.length;e.writeUshort(t,s,o),s+=2,e.writeUshort(t,s,h),s+=2,e.writeUint(t,s,p);var b=[-1,1,1,2,4,8,0,0,0,0,0,0,8][h]*p,y=s+=4;b>4&&(e.writeUint(t,s,f),y=f),\"ASCII\"===u?e.writeASCII(t,y,d):\"SHORT\"===u?(0,i.times)(p,(function(r){e.writeUshort(t,y+2*r,d[r])})):\"LONG\"===u?(0,i.times)(p,(function(r){e.writeUint(t,y+4*r,d[r])})):\"RATIONAL\"===u?(0,i.times)(p,(function(r){e.writeUint(t,y+8*r,Math.round(1e4*d[r])),e.writeUint(t,y+8*r+4,1e4)})):\"DOUBLE\"===u&&(0,i.times)(p,(function(r){e.writeDouble(t,y+8*r,d[r])})),b>4&&(f+=b+=1&b),s+=4};for(h.s();!(l=h.n()).done;)d()}catch(e){h.e(e)}finally{h.f()}return[s,f]},b=function(e){var t=new Uint8Array(h),r=4,n=d;t[0]=77,t[1]=77,t[3]=42;var i=8;if(n.writeUint(t,r,i),r+=4,e.forEach((function(r,o){var a=p(n,t,i,r);i=a[1],o0&&void 0!==arguments[0]?arguments[0]:new a;s=e},r.debug=function(){var e;return(e=s).debug.apply(e,arguments)},r.log=function(){var e;return(e=s).log.apply(e,arguments)},r.info=function(){var e;return(e=s).info.apply(e,arguments)},r.warn=function(){var e;return(e=s).warn.apply(e,arguments)},r.error=function(){var e;return(e=s).error.apply(e,arguments)},r.time=function(){var e;return(e=s).time.apply(e,arguments)},r.timeEnd=function(){var e;return(e=s).timeEnd.apply(e,arguments)};var n=o(e(\"@babel/runtime/helpers/classCallCheck\")),i=o(e(\"@babel/runtime/helpers/createClass\"));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(){function e(){(0,n.default)(this,e)}return(0,i.default)(e,[{key:\"log\",value:function(){}},{key:\"debug\",value:function(){}},{key:\"info\",value:function(){}},{key:\"warn\",value:function(){}},{key:\"error\",value:function(){}},{key:\"time\",value:function(){}},{key:\"timeEnd\",value:function(){}}]),e}(),s=new a},{\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"@babel/runtime/helpers/createClass\":\"P8NW\"}],bsJs:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.fromUrl=function(e){return G.apply(this,arguments)},r.fromArrayBuffer=function(e,t){return z.apply(this,arguments)},r.fromFile=function(e,t){return H.apply(this,arguments)},r.fromBlob=function(e,t){return W.apply(this,arguments)},r.fromUrls=function(e){return q.apply(this,arguments)},r.writeArrayBuffer=function(e,t){return K.apply(this,arguments)},Object.defineProperty(r,\"Pool\",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(r,\"getDecoder\",{enumerable:!0,get:function(){return S.getDecoder}}),Object.defineProperty(r,\"setLogger\",{enumerable:!0,get:function(){return O.setLogger}}),r.rgb=r.globals=r.MultiGeoTIFF=r.default=r.GeoTIFF=void 0;var n=C(e(\"@babel/runtime/regenerator\")),i=C(e(\"@babel/runtime/helpers/defineProperty\")),o=C(e(\"@babel/runtime/helpers/slicedToArray\")),a=C(e(\"@babel/runtime/helpers/asyncToGenerator\")),s=C(e(\"@babel/runtime/helpers/createClass\")),u=C(e(\"@babel/runtime/helpers/inherits\")),l=C(e(\"@babel/runtime/helpers/possibleConstructorReturn\")),f=C(e(\"@babel/runtime/helpers/getPrototypeOf\")),c=C(e(\"@babel/runtime/helpers/wrapNativeSuper\")),h=C(e(\"@babel/runtime/helpers/classCallCheck\")),d=C(e(\"./geotiffimage\")),p=C(e(\"./dataview64\")),b=C(e(\"./dataslice\")),y=C(e(\"./pool\")),v=e(\"./source/remote\"),g=e(\"./source/arraybuffer\"),m=e(\"./source/filereader\"),w=e(\"./source/file\"),_=E(e(\"./globals\"));r.globals=_;var k=e(\"./geotiffwriter\"),x=E(e(\"./rgb\"));r.rgb=x;var S=e(\"./compression\"),O=e(\"./logging\");function T(){if(\"function\"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function E(e){if(e&&e.__esModule)return e;if(null===e||\"object\"!=typeof e&&\"function\"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function C(e){return e&&e.__esModule?e:{default:e}}function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t0&&void 0!==H[0]?H[0]:{},r=t.window,i=t.width,a=t.height,s=t.resX,u=t.resY,l=t.bbox,e.next=5,this.getImage();case 5:return f=e.sent,c=f,e.next=9,this.getImageCount();case 9:if(h=e.sent,d=f.getBoundingBox(),!r||!l){e.next=13;break}throw new Error('Both \"bbox\" and \"window\" passed.');case 13:if(!i&&!a){e.next=24;break}if(r&&(p=f.getOrigin(),b=(0,o.default)(p,2),y=b[0],v=b[1],g=f.getResolution(),m=(0,o.default)(g,2),w=m[0],_=m[1],l=[y+r[0]*w,v+r[1]*_,y+r[2]*w,v+r[3]*_]),k=l||d,!i){e.next=20;break}if(!s){e.next=19;break}throw new Error(\"Both width and resX passed\");case 19:s=(k[2]-k[0])/i;case 20:if(!a){e.next=24;break}if(!u){e.next=23;break}throw new Error(\"Both width and resY passed\");case 23:u=(k[3]-k[1])/a;case 24:if(!s&&!u){e.next=48;break}x=[],S=0;case 27:if(!(SM||u&&u>A)){e.next=45;break}return e.abrupt(\"break\",48);case 45:++P,e.next=38;break;case 48:return I=r,l&&(D=f.getOrigin(),L=(0,o.default)(D,2),N=L[0],F=L[1],U=c.getResolution(f),B=(0,o.default)(U,2),G=B[0],z=B[1],I=[Math.round((l[0]-N)/G),Math.round((l[1]-F)/z),Math.round((l[2]-N)/G),Math.round((l[3]-F)/z)],I=[Math.min(I[0],I[2]),Math.min(I[1],I[3]),Math.max(I[0],I[2]),Math.max(I[1],I[3])]),e.abrupt(\"return\",c.readRasters(j(j({},t),{},{window:I})));case 51:case\"end\":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),F=function(e){(0,u.default)(r,e);var t=R(r);function r(e,n,i,o){var a,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return(0,h.default)(this,r),(a=t.call(this)).source=e,a.littleEndian=n,a.bigTiff=i,a.firstIFDOffset=o,a.cache=s.cache||!1,a.ifdRequests=[],a.ghostValues=null,a}return(0,s.default)(r,[{key:\"getSlice\",value:function(){var e=(0,a.default)(n.default.mark((function e(t,r){var i;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this.bigTiff?4048:1024,e.t0=b.default,e.next=4,this.source.fetch([{offset:t,length:void 0!==r?r:i}]);case 4:return e.t1=e.sent[0],e.t2=t,e.t3=this.littleEndian,e.t4=this.bigTiff,e.abrupt(\"return\",new e.t0(e.t1,e.t2,e.t3,e.t4));case 9:case\"end\":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:\"parseFileDirectoryAt\",value:function(){var e=(0,a.default)(n.default.mark((function e(t){var r,i,o,a,s,u,l,f,c,h,d,p,b,y,v,g,m,w,k,x;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.bigTiff?20:12,i=this.bigTiff?8:2,e.next=4,this.getSlice(t);case 4:if(o=e.sent,a=this.bigTiff?o.readUint64(t):o.readUint16(t),s=a*r+(this.bigTiff?16:6),o.covers(t,s)){e.next=11;break}return e.next=10,this.getSlice(t,s);case 10:o=e.sent;case 11:u={},l=t+(this.bigTiff?8:2),f=0;case 14:if(!(f0&&void 0!==i[0]?i[0]:0,e.next=3,this.requestIFD(t);case 3:return r=e.sent,e.abrupt(\"return\",new d.default(r.fileDirectory,r.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source));case 5:case\"end\":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:\"getImageCount\",value:function(){var e=(0,a.default)(n.default.mark((function e(){var t,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0,r=!0;case 2:if(!r){e.next=18;break}return e.prev=3,e.next=6,this.requestIFD(t);case 6:++t,e.next=16;break;case 9:if(e.prev=9,e.t0=e.catch(3),!(e.t0 instanceof L)){e.next=15;break}r=!1,e.next=16;break;case 15:throw e.t0;case 16:e.next=2;break;case 18:return e.abrupt(\"return\",t);case 19:case\"end\":return e.stop()}}),e,this,[[3,9]])})));return function(){return e.apply(this,arguments)}}()},{key:\"getGhostValues\",value:function(){var e=(0,a.default)(n.default.mark((function e(){var t,r,i,a,s,u,l,f,c=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.bigTiff?16:8,!this.ghostValues){e.next=3;break}return e.abrupt(\"return\",this.ghostValues);case 3:return i=(r=\"GDAL_STRUCTURAL_METADATA_SIZE=\").length+100,e.next=7,this.getSlice(t,i);case 7:if(a=e.sent,r!==I(a,_.fieldTypes.ASCII,r.length,t)){e.next=19;break}if(s=I(a,_.fieldTypes.ASCII,i,t),u=s.split(\"\\n\")[0],!((l=Number(u.split(\"=\")[1].split(\" \")[0])+u.length)>i)){e.next=16;break}return e.next=15,this.getSlice(t,l);case 15:a=e.sent;case 16:f=I(a,_.fieldTypes.ASCII,l,t),this.ghostValues={},f.split(\"\\n\").filter((function(e){return e.length>0})).map((function(e){return e.split(\"=\")})).forEach((function(e){var t=(0,o.default)(e,2),r=t[0],n=t[1];c.ghostValues[r]=n}));case 19:return e.abrupt(\"return\",this.ghostValues);case 20:case\"end\":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:\"close\",value:function(){return\"function\"==typeof this.source.close&&this.source.close()}}],[{key:\"fromSource\",value:function(){var e=(0,a.default)(n.default.mark((function e(t,i,o){var a,s,u,l,f,c,h;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.fetch([{offset:0,length:1024}],o);case 2:if(a=e.sent[0],s=new p.default(a),18761!==(u=s.getUint16(0,0))){e.next=9;break}l=!0,e.next=14;break;case 9:if(19789!==u){e.next=13;break}l=!1,e.next=14;break;case 13:throw new TypeError(\"Invalid byte order value.\");case 14:if(42!==(f=s.getUint16(2,l))){e.next=19;break}c=!1,e.next=27;break;case 19:if(43!==f){e.next=26;break}if(c=!0,8===s.getUint16(4,l)){e.next=24;break}throw new Error(\"Unsupported offset byte-size.\");case 24:e.next=27;break;case 26:throw new TypeError(\"Invalid magic number.\");case 27:return h=c?s.getUint64(8,l):s.getUint32(4,l),e.abrupt(\"return\",new r(t,l,c,h,i));case 29:case\"end\":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()}]),r}(N);r.GeoTIFF=F;var U=F;r.default=U;var B=function(e){(0,u.default)(r,e);var t=R(r);function r(e,n){var i;return(0,h.default)(this,r),(i=t.call(this)).mainFile=e,i.overviewFiles=n,i.imageFiles=[e].concat(n),i.fileDirectoriesPerFile=null,i.fileDirectoriesPerFileParsing=null,i.imageCount=null,i}return(0,s.default)(r,[{key:\"parseFileDirectoriesPerFile\",value:function(){var e=(0,a.default)(n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)].concat(this.overviewFiles.map((function(e){return e.parseFileDirectoryAt(e.firstIFDOffset)}))),e.next=3,Promise.all(t);case 3:return this.fileDirectoriesPerFile=e.sent,e.abrupt(\"return\",this.fileDirectoriesPerFile);case 5:case\"end\":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:\"getImage\",value:function(){var e=(0,a.default)(n.default.mark((function e(){var t,r,i,o,a,s,u,l=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=l.length>0&&void 0!==l[0]?l[0]:0,e.next=3,this.getImageCount();case 3:return e.next=5,this.parseFileDirectoriesPerFile();case 5:r=0,i=0,o=0;case 8:if(!(o1&&void 0!==o[1]?o[1]:{},i=o.length>2?o[2]:void 0,e.abrupt(\"return\",F.fromSource((0,v.makeRemoteSource)(t,r),i));case 3:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)}function z(){return(z=(0,a.default)(n.default.mark((function e(t,r){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(\"return\",F.fromSource((0,g.makeBufferSource)(t),r));case 1:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)}function H(){return(H=(0,a.default)(n.default.mark((function e(t,r){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(\"return\",F.fromSource((0,w.makeFileSource)(t),r));case 1:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)}function W(){return(W=(0,a.default)(n.default.mark((function e(t,r){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(\"return\",F.fromSource((0,m.makeFileReaderSource)(t),r));case 1:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)}function q(){return(q=(0,a.default)(n.default.mark((function e(t){var r,i,o,a,s,u=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:[],i=u.length>2&&void 0!==u[2]?u[2]:{},o=u.length>3?u[3]:void 0,e.next=5,F.fromSource((0,v.makeRemoteSource)(t,i),o);case 5:return a=e.sent,e.next=8,Promise.all(r.map((function(e){return F.fromSource((0,v.makeRemoteSource)(e,i))})));case 8:return s=e.sent,e.abrupt(\"return\",new B(a,s));case 10:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)}function K(){return(K=(0,a.default)(n.default.mark((function e(t,r){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(\"return\",(0,k.writeGeotiff)(t,r));case 1:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)}r.MultiGeoTIFF=B},{\"@babel/runtime/regenerator\":\"PMvg\",\"@babel/runtime/helpers/defineProperty\":\"IxO8\",\"@babel/runtime/helpers/slicedToArray\":\"HETk\",\"@babel/runtime/helpers/asyncToGenerator\":\"agGE\",\"@babel/runtime/helpers/createClass\":\"P8NW\",\"@babel/runtime/helpers/inherits\":\"d4H2\",\"@babel/runtime/helpers/possibleConstructorReturn\":\"pxk2\",\"@babel/runtime/helpers/getPrototypeOf\":\"UJE0\",\"@babel/runtime/helpers/wrapNativeSuper\":\"ozpi\",\"@babel/runtime/helpers/classCallCheck\":\"fcMS\",\"./geotiffimage\":\"eOWo\",\"./dataview64\":\"dqpX\",\"./dataslice\":\"dGLV\",\"./pool\":\"dHPO\",\"./source/remote\":\"itmA\",\"./source/arraybuffer\":\"wM9h\",\"./source/filereader\":\"GiEG\",\"./source/file\":\"G7Cz\",\"./globals\":\"j27V\",\"./geotiffwriter\":\"BGyE\",\"./rgb\":\"fpBl\",\"./compression\":\"FGCZ\",\"./logging\":\"dy4f\"}]},{},[\"bsJs\"],\"GeoTIFF\");\n//# sourceMappingURL=/sm/6b05ec3e6aee27214397dcd933f0a1a0def04511045c0ced378787b04765ef87.map\n\n//# sourceURL=webpack://LithoSphere/./src/secondary/geotiff/geotiff.js?"); + +/***/ }), + +/***/ "./src/secondary/loadingScreen.css": +/*!*****************************************!*\ + !*** ./src/secondary/loadingScreen.css ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var api = __webpack_require__(/*! ../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = __webpack_require__(/*! !../../node_modules/css-loader/dist/cjs.js!../../node_modules/postcss-loader/dist/cjs.js??ref--5-2!./loadingScreen.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js?!./src/secondary/loadingScreen.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.i, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};\n\n//# sourceURL=webpack://LithoSphere/./src/secondary/loadingScreen.css?"); + +/***/ }), + +/***/ "./src/secondary/loadingScreen.ts": +/*!****************************************!*\ + !*** ./src/secondary/loadingScreen.ts ***! + \****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _loadingScreen_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./loadingScreen.css */ \"./src/secondary/loadingScreen.css\");\n/* harmony import */ var _loadingScreen_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_loadingScreen_css__WEBPACK_IMPORTED_MODULE_0__);\n\n\nvar Controls = function () {\n function Controls(parent) {\n var _this = this;\n\n this.end = function (name) {\n if (_this.p.options.loadingScreen === false) return;\n\n if (_this.loadingContainer) {\n _this.loadingContainer.style.opacity = '0';\n _this.p._.sceneContainer.style.filter = 'blur(0px) brightness(1)';\n setTimeout(function () {\n _this.loadingContainer.remove();\n\n _this.loadingContainer = null;\n _this.p._.sceneContainer.style.filter = null;\n _this.p._.sceneContainer.style.transition = null;\n }, 500);\n }\n };\n\n this.p = parent;\n if (this.p.options.loadingScreen === false) return;\n this.loadingContainer = document.createElement('div');\n this.loadingContainer.setAttribute('id', '_lithosphere_loadingscreen');\n this.loadingContainer.style.position = 'absolute';\n this.loadingContainer.style.top = '0';\n this.loadingContainer.style.left = '0';\n this.loadingContainer.style.width = '100%';\n this.loadingContainer.style.height = '100%';\n this.loadingContainer.style.background = 'black';\n this.loadingContainer.style.color = 'white';\n this.loadingContainer.style.fontFamily = 'sans-serif';\n this.loadingContainer.style.zIndex = '9001';\n this.loadingContainer.style.opacity = '1';\n this.loadingContainer.style.transition = 'opacity 0.5s ease-in';\n this.loadingContainer.innerHTML = [\"
\", \"
\", \"
\", \"
\", \"
\", \"
\", \"
\", '
'].join('\\n');\n\n this.p._.container.appendChild(this.loadingContainer);\n\n this.p._.sceneContainer.style.filter = 'blur(10px) brightness(0.5)';\n this.p._.sceneContainer.style.transition = 'filter 0.5s ease-in-out';\n }\n\n return Controls;\n}();\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Controls);\n\n//# sourceURL=webpack://LithoSphere/./src/secondary/loadingScreen.ts?"); + +/***/ }), + +/***/ "./src/secondary/sprites.ts": +/*!**********************************!*\ + !*** ./src/secondary/sprites.ts ***! + \**********************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! three */ \"./node_modules/three/build/three.module.js\");\n\nvar Sprites = {\n spriteMaterials: {},\n makeMarkerSprite: function (parameters, id, forceNewMaterial) {\n var sprite = new three__WEBPACK_IMPORTED_MODULE_0__[\"Sprite\"](Sprites.makeMarkerMaterial(parameters, id, forceNewMaterial));\n sprite.style = sprite.style || {};\n sprite.style.radius = parameters.hasOwnProperty('radius') ? parameters['radius'] : 32;\n return sprite;\n },\n makeMarkerMaterial: function (parameters, id, forceNewMaterial) {\n if (parameters === undefined) parameters = {};\n\n if (id && this.spriteMaterials.hasOwnProperty(id + \"_\" + JSON.stringify(parameters)) && forceNewMaterial !== true) {\n return this.spriteMaterials[id + \"_\" + JSON.stringify(parameters)];\n } else {\n var radius = parameters.hasOwnProperty('radius') ? parameters['radius'] : 64;\n radius = Math.max(radius, 64);\n var fillColor = parameters.hasOwnProperty('fillColor') ? parameters['fillColor'] : {\n r: 255,\n g: 255,\n b: 255,\n a: parameters['fillOpacity'] != null ? parameters['fillOpacity'] : 1.0\n };\n var strokeWeight = parameters.hasOwnProperty('weight') ? parameters['weight'] : 4;\n var strokeColor = parameters.hasOwnProperty('color') ? parameters['color'] : {\n r: 0,\n g: 0,\n b: 0,\n a: 1.0\n };\n var canvas = document.createElement('canvas');\n var context = canvas.getContext('2d');\n var width = radius * 2;\n var height = radius * 2;\n canvas.width = width;\n canvas.height = height;\n context.beginPath();\n context.arc(canvas.width / 2, canvas.height / 2, radius - strokeWeight * (radius / 12), 0, 2 * Math.PI, false);\n\n if (typeof fillColor === 'object') {\n context.fillStyle = 'rgba(' + fillColor.r + ',' + fillColor.g + ',' + fillColor.b + ',' + fillColor.a + ')';\n } else {\n context.fillStyle = fillColor;\n }\n\n context.fill();\n context.lineWidth = strokeWeight * Math.ceil(radius / 8);\n\n if (typeof strokeColor === 'object') {\n context.strokeStyle = 'rgba(' + strokeColor.r + ',' + strokeColor.g + ',' + strokeColor.b + ',' + strokeColor.a + ')';\n } else {\n context.strokeStyle = strokeColor;\n }\n\n context.stroke();\n var texture = new three__WEBPACK_IMPORTED_MODULE_0__[\"Texture\"](canvas);\n texture.needsUpdate = true;\n texture.anisotropy = 0;\n texture.magFilter = three__WEBPACK_IMPORTED_MODULE_0__[\"NearestFilter\"];\n texture.minFilter = three__WEBPACK_IMPORTED_MODULE_0__[\"NearestFilter\"];\n texture.wrapT = three__WEBPACK_IMPORTED_MODULE_0__[\"ClampToEdgeWrapping\"];\n var spriteMaterial = new three__WEBPACK_IMPORTED_MODULE_0__[\"SpriteMaterial\"]({\n map: texture,\n transparent: true,\n alphaTest: 0.01\n });\n\n if (id && forceNewMaterial !== true) {\n this.spriteMaterials[id + \"_\" + JSON.stringify(parameters)] = spriteMaterial;\n }\n\n return spriteMaterial;\n }\n },\n makeTextSprite: function (message, parameters) {\n if (parameters === undefined) parameters = {};\n var fontface = parameters.hasOwnProperty('fontface') ? parameters['fontface'] : 'Arial';\n var fontsize = parameters.hasOwnProperty('fontsize') ? parameters['fontsize'] : 18;\n var strokeWeight = parameters.hasOwnProperty('strokeWeight') ? parameters['strokeWeight'] : 4;\n var strokeColor = parameters.hasOwnProperty('strokeColor') ? parameters['strokeColor'] : {\n r: 0,\n g: 0,\n b: 0,\n a: 1.0\n };\n var fontColor = parameters.hasOwnProperty('fontColor') ? parameters['fontColor'] : {\n r: 255,\n g: 255,\n b: 255,\n a: 1.0\n };\n var canvas = document.createElement('canvas');\n var context = canvas.getContext('2d');\n var width = 1024;\n var height = 64;\n canvas.width = width;\n canvas.height = height;\n context.font = 'Bold ' + fontsize + 'px ' + fontface;\n context.strokeStyle = 'rgba(' + strokeColor.r + ',' + strokeColor.g + ',' + strokeColor.b + ',' + strokeColor.a + ')';\n context.lineWidth = strokeWeight;\n context.fillStyle = 'rgba(' + fontColor.r + ',' + fontColor.g + ',' + fontColor.b + ',' + fontColor.a + ')';\n context.textAlign = 'left';\n context.strokeText(message, width / 2 + fontsize, height - fontsize / 1.8);\n context.fillText(message, width / 2 + fontsize, height - fontsize / 1.8);\n var texture = new three__WEBPACK_IMPORTED_MODULE_0__[\"Texture\"](canvas);\n texture.needsUpdate = true;\n var spriteMaterial = new three__WEBPACK_IMPORTED_MODULE_0__[\"SpriteMaterial\"]({\n map: texture\n });\n var sprite = new three__WEBPACK_IMPORTED_MODULE_0__[\"Sprite\"](spriteMaterial);\n sprite.scale.set(64, 4, 1);\n return sprite;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Sprites);\n\n//# sourceURL=webpack://LithoSphere/./src/secondary/sprites.ts?"); + +/***/ }), + +/***/ "./src/utils/index.ts": +/*!****************************!*\ + !*** ./src/utils/index.ts ***! + \****************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! three */ \"./node_modules/three/build/three.module.js\");\n\nvar Utils = {\n getIn: function (obj, keyArray, notSetValue) {\n if (obj == null) return notSetValue != null ? notSetValue : null;\n if (typeof keyArray === 'string') keyArray = keyArray.split('.');\n if (keyArray == null) return notSetValue != null ? notSetValue : null;\n var object = Object.assign({}, obj);\n\n for (var i = 0; i < keyArray.length; i++) {\n if (object.hasOwnProperty(keyArray[i])) object = object[keyArray[i]];else return notSetValue != null ? notSetValue : null;\n }\n\n return object;\n },\n mod: function (n, m) {\n var remain = n % m;\n return Math.floor(remain >= 0 ? remain : remain + m);\n },\n findHighestMaxZoom: function (tileLayers) {\n var highest = 0;\n\n for (var l in tileLayers) {\n if (tileLayers[l].name != 'Vectors As Tiles') if (tileLayers[l].maxZoom > highest) {\n highest = tileLayers[l].maxZoom;\n }\n }\n\n return highest;\n },\n findLowestMinZoom: function (tileLayers) {\n var lowest = Infinity;\n\n for (var l in tileLayers) {\n if (tileLayers[l].path !== '_vectorsastile_') {\n if (tileLayers[l].minZoom < lowest) {\n lowest = tileLayers[l].minZoom;\n }\n }\n }\n\n return lowest;\n },\n isInExtent: function (xyz, bb, projection) {\n var inExtent = true;\n\n if (bb) {\n var tx_ext = xyz.x + 0;\n var ty_ext = xyz.y + 0;\n var projectedLL = projection.tileXYZ2LatLng(tx_ext, ty_ext, xyz.z);\n var tlat_ext = projectedLL.lat;\n var tlon_ext = projectedLL.lng;\n inExtent = tlat_ext < bb[3] && tlat_ext > bb[1] && tlon_ext < bb[2] && tlon_ext > bb[0];\n tx_ext = xyz.x + 1;\n ty_ext = xyz.y + 0;\n projectedLL = projection.tileXYZ2LatLng(tx_ext, ty_ext, xyz.z);\n tlat_ext = projectedLL.lat;\n tlon_ext = projectedLL.lng;\n inExtent = inExtent || tlat_ext < bb[3] && tlat_ext > bb[1] && tlon_ext < bb[2] && tlon_ext > bb[0];\n tx_ext = xyz.x + 1;\n ty_ext = xyz.y + 1;\n projectedLL = projection.tileXYZ2LatLng(tx_ext, ty_ext, xyz.z);\n tlat_ext = projectedLL.lat;\n tlon_ext = projectedLL.lng;\n inExtent = inExtent || tlat_ext < bb[3] && tlat_ext > bb[1] && tlon_ext < bb[2] && tlon_ext > bb[0];\n tx_ext = xyz.x + 0;\n ty_ext = xyz.y + 1;\n projectedLL = projection.tileXYZ2LatLng(tx_ext, ty_ext, xyz.z);\n tlat_ext = projectedLL.lat;\n tlon_ext = projectedLL.lng;\n inExtent = inExtent || tlat_ext < bb[3] && tlat_ext > bb[1] && tlon_ext < bb[2] && tlon_ext > bb[0];\n }\n\n return inExtent;\n },\n isInExtentEN: function (xyz, bb, proj, margin) {\n if (margin === void 0) {\n margin = 0.0000001;\n }\n\n if (!bb) return true;\n var minE = bb[0],\n minN = bb[1],\n maxE = bb[2],\n maxN = bb[3];\n\n var _a = proj.tileXYZ2NwSe(xyz, proj.trueTileResolution, true),\n min = _a.min,\n max = _a.max;\n\n return max.x > minE + margin && min.x < maxE - margin && max.y > minN + margin && min.y < maxN - margin;\n },\n clone: function (obj) {\n var copy;\n if (null == obj || 'object' != typeof obj) return obj;\n\n if (obj instanceof Date) {\n copy = new Date();\n copy.setTime(obj.getTime());\n return copy;\n }\n\n if (obj instanceof Array) {\n copy = [];\n\n for (var i = 0, len = obj.length; i < len; i++) {\n copy[i] = Utils.clone(obj[i]);\n }\n\n return copy;\n }\n\n if (obj instanceof Object) {\n copy = {};\n\n for (var attr in obj) {\n if (obj.hasOwnProperty(attr)) copy[attr] = Utils.clone(obj[attr]);\n }\n\n return copy;\n }\n\n throw new Error(\"Unable to copy obj! Its type isn't supported.\");\n },\n capitalizeFirstLetter: function (string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n },\n getExtension: function (string) {\n return /(?:\\.([^.]+))?$/.exec(string)[1] || '';\n },\n getRadiansPerPixel: function (zoom) {\n return 360 / Math.pow(2, zoom) * (Math.PI / 180) / 256;\n },\n lastTileContains: [],\n tileContains: function (xyz, z, useLast) {\n if (useLast) {\n for (var i = 0; i < Utils.lastTileContains.length; i++) {\n var lastxyz = Utils.lastTileContains[i].call.xyz;\n\n if (lastxyz[0] == xyz[0] && lastxyz[1] == xyz[1] && lastxyz[2] == xyz[2] && Utils.lastTileContains[i].call.z == z) {\n return Utils.lastTileContains[i].result;\n }\n }\n }\n\n var contained = [];\n var zoomRatio = Math.pow(2, z) / Math.pow(2, xyz[2]);\n var max = [(xyz[0] + 1) * zoomRatio - 1, (xyz[1] + 1) * zoomRatio - 1];\n var min = [max[0] - zoomRatio + 1, max[1] - zoomRatio + 1];\n\n for (var x = min[0]; x <= max[0]; x++) {\n for (var y = min[1]; y <= max[1]; y++) {\n contained.push([x, y, z]);\n }\n }\n\n Utils.lastTileContains.unshift({\n call: {\n xyz: xyz,\n z: z\n },\n result: contained\n });\n if (Utils.lastTileContains.length > 3) Utils.lastTileContains.pop();\n return contained;\n },\n tileIsContained: function (xyzContainer, xyzContained, useLast) {\n var contains = this.tileContains(xyzContainer, xyzContained[2], useLast);\n\n for (var i = 0; i < contains.length; i++) {\n if (contains[i][0] == xyzContained[0] && contains[i][1] == xyzContained[1]) return true;\n }\n\n return false;\n },\n arrayAverage: function (array, key) {\n var total = 0;\n\n for (var i = 0; i < array.length; i++) {\n if (key != null) total += array[i][key];else total += array[i];\n }\n\n return total / array.length;\n },\n hexToRGB: function (hex) {\n var shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n hex = hex.replace(shorthandRegex, function (m, r, g, b) {\n return r + r + g + g + b + b;\n });\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16)\n } : null;\n },\n rotatePoint: function (pt, center, angle) {\n var cosAngle = Math.cos(angle);\n var sinAngle = Math.sin(angle);\n var dx = pt.x - center[0];\n var dy = pt.y - center[1];\n return {\n x: center[0] + dx * cosAngle - dy * sinAngle,\n y: center[1] + dx * sinAngle + dy * cosAngle\n };\n },\n rotateAroundArbAxis: function (object, axis, radians, noPremultiply) {\n object.updateWorldMatrix(true);\n var invWorldRot = object.getWorldQuaternion(new three__WEBPACK_IMPORTED_MODULE_0__[\"Quaternion\"]()).invert();\n axis.applyQuaternion(invWorldRot);\n var deltaLocalRot = new three__WEBPACK_IMPORTED_MODULE_0__[\"Quaternion\"]();\n deltaLocalRot.setFromAxisAngle(axis, radians);\n object.quaternion.multiply(deltaLocalRot);\n },\n getParamString: function (params, baseUrl, isUppercase) {\n var str = [];\n var urlParams = new URLSearchParams(baseUrl.toUpperCase());\n\n for (var o in params) {\n if (!urlParams.has(o.toUpperCase())) str.push(encodeURIComponent(isUppercase ? o.toUpperCase() : o) + '=' + encodeURIComponent(params[o]));\n }\n\n return (baseUrl && baseUrl.indexOf('?') !== -1 ? '&' : '?') + str.join('&');\n },\n isArray: function (object) {\n return Object.prototype.toString.call(object) === '[object Array]';\n },\n setChildrenMaterialOpacity: function (model, opacity, recurse) {\n model.children.forEach(function (mesh) {\n if (mesh.material) {\n mesh.material.transparent = true;\n mesh.material.opacity = opacity;\n }\n\n if (typeof recurse === 'function' && mesh.children && mesh.children.length > 0) {\n recurse(mesh);\n }\n });\n },\n setAllMaterialOpacity: function (model, opacity) {\n if (model.material) {\n model.material.transparent = true;\n model.material.opacity = opacity;\n }\n\n Utils.setChildrenMaterialOpacity(model, opacity, function (mesh) {\n Utils.setAllMaterialOpacity(mesh, opacity);\n });\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Utils);\n\n//# sourceURL=webpack://LithoSphere/./src/utils/index.ts?"); + +/***/ }), + +/***/ "./src/utils/paths.ts": +/*!****************************!*\ + !*** ./src/utils/paths.ts ***! + \****************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ */ \"./src/utils/index.ts\");\nvar __assign = undefined && undefined.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\n\nvar Paths = {\n buildPath: function (format, basePath, tD, projection, tileResolution, trueTileResolution, options, asObject) {\n format = format || 'tms';\n var path;\n var xyz = {\n x: tD.x,\n y: tD.y,\n z: tD.z\n };\n\n switch (format) {\n case 'wmts':\n path = basePath;\n path = path.replace('{z}', xyz.z);\n path = path.replace('{x}', xyz.x);\n path = path.replace('{y}', xyz.y);\n break;\n\n case 'wms':\n path = Paths.wmsExtension.buildPath(basePath, xyz, projection, tileResolution, trueTileResolution, options);\n break;\n\n default:\n path = basePath;\n path = path.replace('{z}', xyz.z);\n path = path.replace('{x}', xyz.x);\n xyz.y = projection.invertY(xyz.y, xyz.z);\n path = path.replace('{y}', xyz.y);\n }\n\n if (asObject) return {\n path: path,\n xyz: xyz\n };\n return path;\n },\n wmsExtension: {\n defaultWmsParams: {\n SERVICE: 'WMS',\n REQUEST: 'GetMap',\n FORMAT: 'image/png',\n TRANSPARENT: true,\n VERSION: '1.1.1',\n WIDTH: null,\n HEIGHT: null\n },\n extensionOptions: {\n crsCode: 'EPSG:4326',\n uppercase: true\n },\n buildPath: function (basePath, xyz, projection, tileResolution, trueTileResolution, options) {\n var wmsParams = __assign({}, Paths.wmsExtension.defaultWmsParams);\n\n options = options || {};\n if (options.wmsParams) for (var i in options.wmsParams) {\n if (!(i in Paths.wmsExtension.extensionOptions)) {\n wmsParams[i] = options.wmsParams[i];\n }\n }\n wmsParams.VERSION = options.wmsVersion || wmsParams.VERSION;\n\n if (options.correctSeams === true) {\n tileResolution--;\n wmsParams.WIDTH = wmsParams.HEIGHT = tileResolution + 2;\n } else wmsParams.WIDTH = wmsParams.HEIGHT = tileResolution;\n\n var crsCode = projection.tileMapResource.crsCode || Paths.wmsExtension.extensionOptions.crsCode;\n wmsParams[parseFloat(wmsParams.VERSION) >= 1.3 ? 'CRS' : 'SRS'] = crsCode;\n var bounds = projection.tileXYZ2NwSe(xyz, trueTileResolution, true, options.correctSeams === true ? (tileResolution + 1) / tileResolution : null);\n var bbox = (parseFloat(wmsParams.VERSION) >= 1.3 && crsCode === 'EPSG:4326' ? [bounds.min.y, bounds.min.x, bounds.max.y, bounds.max.x] : [bounds.min.x, bounds.min.y, bounds.max.x, bounds.max.y]).join(',');\n return basePath + ___WEBPACK_IMPORTED_MODULE_0__[\"default\"].getParamString(wmsParams, basePath, Paths.wmsExtension.extensionOptions.uppercase) + (Paths.wmsExtension.extensionOptions.uppercase ? '&BBOX=' : '&bbox=') + bbox;\n }\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Paths);\n\n//# sourceURL=webpack://LithoSphere/./src/utils/paths.ts?"); + +/***/ }) + +/******/ }); +}); \ No newline at end of file diff --git a/dist/src/lithosphere.d.ts b/dist/src/lithosphere.d.ts index bfa8611..821bb45 100644 --- a/dist/src/lithosphere.d.ts +++ b/dist/src/lithosphere.d.ts @@ -11,7 +11,6 @@ interface Private { rendererWrapper: any; renderer: any; cameras: any; - cameraPositionTarget: number[]; tiledWorld: TiledWorld; events: Events; maxZoom: number; @@ -82,6 +81,8 @@ export default class LithoSphere { firstPerson: any; orbit: any; }; + _setInitialCameraPositionTarget: () => void; + setCameraPositionTarget: (position?: XYZ, target?: XYZ) => void; getContainer: () => HTMLElement; invalidateSize: () => void; } diff --git a/docs/favicon.ico b/docs/favicon.ico new file mode 100644 index 0000000..4aab080 Binary files /dev/null and b/docs/favicon.ico differ diff --git a/docs/pages/Constructor/constructor.markdown b/docs/pages/Constructor/constructor.markdown index e7fe02d..2b49e08 100644 --- a/docs/pages/Constructor/constructor.markdown +++ b/docs/pages/Constructor/constructor.markdown @@ -30,7 +30,8 @@ new LithoSphere(containerId, options) | Parameter | Type | Default | Description | | :----------------------: | :--------: | :--------------------------------------------------------------------------------: | :------------------------------------------------------------------------------: | -| **initialView** | _object_ | See [initialView]({{ site.baseurl }}/constructor#optionsinitialview) below | Sets the initial coordinate view of the scene | +| **initialView** | _object_ | See [initialView]({{ site.baseurl }}/constructor#optionsinitialview) below | Sets the initial longitude, latitude, zoom coordinate view of the scene | +| **initialCamera** | _object_ | See [initialCamera]({{ site.baseurl }}/constructor#optionsinitialcamera) below | Sets the initial world-space camera coordinates and look-at | | **majorRadius** | _integer_ | 6371000 | Major planetary radius in meters | | **minorRadius** | _integer_ | majorRadius | Minor planetary radius in meters | | **loadingScreen** | _boolean_ | true | If true, shows a loading screen until all lithosphere content first loads | @@ -74,6 +75,34 @@ The latitude, longitude, and zoom LithoSphere first starts at. } ``` +### options.initialCamera + +Sets the orbit camera's initial position and target. Useful in deeplinks and when a non-top-down camera angle is desired. Note that the camera's look-at target is always along the y-axis. + +| Parameter | Type | Default | Description | +| :------------------------: | :---: | :-----: | :------------------------------: | +| **initialCamera.position** | _XYZ_ | null | Sets the initial camera position | +| **initialCamera.target** | _XYZ_ | null | Sets the initial camera target | + +#### Example + +```javascript +{ + initialCamera: { + position: { + x: 1570.8134791640523, + y: 3125.497317531146, + z: 123.76226561404211, + }, + target: { + x: 0, + y: 4412.141683964059, + z: 0, + }, + }, +} +``` + ### options.demFallback If a tile layer has a `demPath` set and one of its tile dem request fails for whatever reason (such as a 404) or does not have a `demPath` set, it will try to get the corresponding DEM tile specified in `demFallback`. diff --git a/package.json b/package.json index 916a565..c5b6bde 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lithosphere", - "version": "1.4.0", + "version": "1.4.1", "description": "LithoSphere is a GIS JavaScript library for building 3D tile-based globes in the web browser.", "author": "Tariq Soliman", "license": "Apache-2.0", diff --git a/public/dist/lithosphere.js b/public/dist/lithosphere.js index c6831d9..7df2376 100644 --- a/public/dist/lithosphere.js +++ b/public/dist/lithosphere.js @@ -2139,7 +2139,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var thre /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core */ \"./src/core/index.ts\");\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ \"./node_modules/three/build/three.module.js\");\n/* harmony import */ var _layers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./layers */ \"./src/layers/index.ts\");\n/* harmony import */ var _controls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./controls */ \"./src/controls/index.ts\");\n/* harmony import */ var _secondary_loadingScreen__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./secondary/loadingScreen */ \"./src/secondary/loadingScreen.ts\");\nvar __assign = undefined && undefined.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\n\n\n\n\n\n\nvar LithoSphere = function () {\n function LithoSphere(containerId, options) {\n var _this = this;\n\n this._animate = function () {\n window.requestAnimationFrame(_this._animate);\n\n _this._render();\n };\n\n this._onFirstLoad = function () {\n _this._.firstLoad = true;\n\n _this._.events._rotateGlobe({\n pageX: 0,\n pageY: 0\n }, {\n x: 0.0001,\n y: 0.0001\n });\n\n _this._.rendererWrapper.updateSize();\n\n setTimeout(function () {\n _this.setCenter(_this.options.initialView, false, true);\n\n _this._.events._onZoom();\n\n _this._.loadingScreen.end();\n }, 100);\n };\n\n this.setCenter = function (latLngZoom, ignoreZoom, accountForHeight) {\n if (!_this._.wasInitialized) return false;\n var rotLat = (90 - (latLngZoom.lat || 0)) * (Math.PI / 180);\n var rotLng = (latLngZoom.lng || 0) * (Math.PI / 180);\n\n _this.planet.rotation.set(rotLat, rotLng, 0);\n\n _this._.events._matchPlanetsLODToPlanet();\n\n if (latLngZoom.zoom != null && ignoreZoom != true) {\n _this.zoom = latLngZoom.zoom;\n\n var center = _this.getCenter(true);\n\n _this._.cameras.orbit.camera.position.y = -(40000000 / _this.projection.radiusScale / Math.pow(2, _this.zoom));\n if (accountForHeight) _this._.cameras.orbit.camera.position.y -= center.height;\n _this._.cameras.firstPerson.controls.getObject().position.y = -(40000000 / _this.projection.radiusScale / Math.pow(2, _this.zoom));\n if (accountForHeight) _this._.cameras.firstPerson.controls.getObject().position.y -= center.height;\n }\n\n _this._.events._refreshFrontGroupRotation();\n\n return true;\n };\n\n this.getCenterXYZ = function (raycasted) {\n if (raycasted) {\n _this._.raycaster.set(new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, _this.planetCenter.y, 0), new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, 1, 0));\n\n var planeArr = [];\n\n for (var i = 0; i < _this._.tiledWorld.tilesDrawn.length; i++) {\n if (!_this._.tiledWorld.tilesDrawn[i].isLODTile) planeArr.push(_this._.tiledWorld.tilesDrawn[i].t);\n }\n\n var intersects = _this._.raycaster.intersectObjects(planeArr);\n\n if (intersects.length > 0) {\n intersects[0].point.y += _this.planetCenter.y;\n return intersects[0].point;\n }\n\n return new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, 0, 0);\n } else {\n var centerPoint = {\n x: _this.planetCenter.x,\n y: _this.planetCenter.y,\n z: _this.planetCenter.z\n };\n centerPoint = _this.projection.rotatePoint3D(centerPoint, {\n x: -_this.planet.rotation.x,\n y: 0,\n z: 0\n });\n centerPoint = _this.projection.rotatePoint3D(centerPoint, {\n x: 0,\n y: -_this.planet.rotation.y,\n z: 0\n });\n centerPoint = _this.projection.rotatePoint3D(centerPoint, {\n x: 0,\n y: 0,\n z: -_this.planet.rotation.z\n });\n return new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](centerPoint.x, centerPoint.y, centerPoint.z);\n }\n };\n\n this.getCenter = function (raycasted) {\n var centerXYZ = _this.getCenterXYZ(raycasted);\n\n if (raycasted) {\n var center = JSON.parse(JSON.stringify(centerXYZ));\n center = _this.projection.rotatePoint3D(center, {\n x: -_this.planet.rotation.x,\n y: 0,\n z: 0\n });\n center = _this.projection.rotatePoint3D(center, {\n x: 0,\n y: -_this.planet.rotation.y,\n z: 0\n });\n center = _this.projection.rotatePoint3D(center, {\n x: 0,\n y: 0,\n z: -_this.planet.rotation.z\n });\n center = _this.projection.vector3ToLatLng(center);\n center.height = centerXYZ.length() * _this.projection.radiusScale - _this.projection.radii.major;\n return center;\n }\n\n return _this.projection.vector3ToLatLng(centerXYZ);\n };\n\n this.getCenterElevation = function () {\n return _this.getCenterXYZ(true).length() * _this.projection.radiusScale - _this.projection.radii.major;\n };\n\n this.getCenterElevationRaw = function () {\n var elev = _this.getCenterXYZ(true).length();\n\n if (elev <= 0.1 && elev >= -0.1) return;\n return elev;\n };\n\n this.getElevationAtLngLat = function (lng, lat) {\n var v = _this.projection.lonLatToVector3(lng, lat, 100000 * _this.options.exaggeration);\n\n var tempObj = new three__WEBPACK_IMPORTED_MODULE_1__[\"Object3D\"]();\n tempObj.position.set(0, -_this.planetCenter.y, 0);\n tempObj.rotation.set(_this.planet.rotation.x, _this.planet.rotation.y, _this.planet.rotation.z);\n var geometry = new three__WEBPACK_IMPORTED_MODULE_1__[\"SphereBufferGeometry\"](200, 32, 32);\n var material = new three__WEBPACK_IMPORTED_MODULE_1__[\"MeshBasicMaterial\"]({\n color: 0xffff00\n });\n var tempObj2 = new three__WEBPACK_IMPORTED_MODULE_1__[\"Mesh\"](geometry, material);\n tempObj2.position.set(v.x, v.y, v.z);\n tempObj.add(tempObj2);\n tempObj.updateMatrixWorld();\n var vector = new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"]();\n vector.setFromMatrixPosition(tempObj2.matrixWorld);\n\n _this._.raycaster.set(vector, new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, -_this.planetCenter.y, 0).normalize());\n\n var planeArr = [];\n\n for (var i = 0; i < _this._.tiledWorld.tilesDrawn.length; i++) {\n if (!_this._.tiledWorld.tilesDrawn[i].isLODTile) planeArr.push(_this._.tiledWorld.tilesDrawn[i].t);\n }\n\n var intersects = _this._.raycaster.intersectObjects(planeArr);\n\n if (intersects.length > 0) {\n intersects[intersects.length - 1].point.y += _this.planetCenter.y;\n return intersects[intersects.length - 1].point.length() * _this.projection.radiusScale - _this.projection.radii.major;\n }\n\n return 0;\n };\n\n this.getCenterTile = function () {\n var centerll = _this.getCenter();\n\n return _this.projection.latLngZ2TileXYZ(centerll.lat, centerll.lng, _this.zoom);\n };\n\n this.getCameras = function () {\n return {\n camera: _this._.cameras.camera,\n isFirstPerson: _this._.cameras.isFirstPerson,\n firstPerson: _this._.cameras.firstPerson,\n orbit: _this._.cameras.orbit\n };\n };\n\n this.getContainer = function () {\n return _this._.container;\n };\n\n this.invalidateSize = function () {\n if (_this._.wasInitialized) {\n _this._.renderer.setSize(_this._.sceneContainer.offsetWidth, _this._.sceneContainer.offsetHeight);\n\n _this._.cameras.updateSize();\n }\n };\n\n var sceneContainer = document.getElementById(containerId).appendChild(document.createElement('div'));\n sceneContainer.id = '_lithosphere_scene';\n sceneContainer.style.width = '100%';\n sceneContainer.style.height = '100%';\n this._ = {\n containerId: containerId,\n container: document.getElementById(containerId),\n sceneContainer: sceneContainer,\n wasInitialized: false,\n rendererWrapper: null,\n renderer: null,\n cameras: null,\n cameraPositionTarget: null,\n tiledWorld: null,\n events: null,\n maxZoom: 0,\n minNativeZoom: 0,\n loader: new three__WEBPACK_IMPORTED_MODULE_1__[\"TextureLoader\"](),\n raycaster: new three__WEBPACK_IMPORTED_MODULE_1__[\"Raycaster\"](),\n updateEveryNthRender: 1,\n counters: {\n update: 0,\n frame: 0\n },\n lastCameraWasFirst: false,\n firstUpdate: true,\n firstLoad: false,\n loadingScreen: null,\n renderOnlyWhenOpen: true,\n zCutOff: 3,\n firstViewOverride: null,\n mouseIsInScene: false,\n marsRadius: 3396190\n };\n this._.container.style.position = 'relative';\n this.scene = new three__WEBPACK_IMPORTED_MODULE_1__[\"Scene\"]();\n this.scenesLOD = [new three__WEBPACK_IMPORTED_MODULE_1__[\"Scene\"](), new three__WEBPACK_IMPORTED_MODULE_1__[\"Scene\"](), new three__WEBPACK_IMPORTED_MODULE_1__[\"Scene\"]()];\n this.sceneBack = new three__WEBPACK_IMPORTED_MODULE_1__[\"Scene\"]();\n this.sceneFront = new three__WEBPACK_IMPORTED_MODULE_1__[\"Scene\"]();\n this.planet = new three__WEBPACK_IMPORTED_MODULE_1__[\"Object3D\"]();\n this.planetsLOD = [new three__WEBPACK_IMPORTED_MODULE_1__[\"Object3D\"](), new three__WEBPACK_IMPORTED_MODULE_1__[\"Object3D\"](), new three__WEBPACK_IMPORTED_MODULE_1__[\"Object3D\"]()];\n this.frontGroup = new three__WEBPACK_IMPORTED_MODULE_1__[\"Object3D\"]();\n var defaultOptions = {\n loadingScreen: true,\n tileMapResource: null,\n customParsers: {},\n radiusOfTiles: 4,\n useLOD: true,\n LOD: [{\n radiusOfTiles: 4,\n zoomsUp: 3\n }, {\n radiusOfTiles: 2,\n zoomsUp: 7\n }, {\n radiusOfTiles: 2,\n zoomsUp: 11\n }],\n tileResolution: 32,\n trueTileResolution: 256,\n showAxes: false,\n wireframeMode: false,\n exaggeration: 1,\n renderOnlyWhenOpen: true,\n targetYOffset: 0,\n highlightColor: 'yellow',\n activeColor: 'red'\n };\n options = options || {};\n this.options = __assign(__assign({}, defaultOptions), options);\n\n this._init();\n }\n\n LithoSphere.prototype._init = function () {\n this._.rendererWrapper = new _core__WEBPACK_IMPORTED_MODULE_0__[\"Renderer\"](this._.sceneContainer);\n this._.renderer = this._.rendererWrapper.renderer;\n\n if (this._.renderer) {\n this._.wasInitialized = true;\n } else return false;\n\n this.projection = new _core__WEBPACK_IMPORTED_MODULE_0__[\"Projection\"](this.options.majorRadius, this.options.minorRadius, this.options.tileMapResource, this.options.trueTileResolution);\n this._.cameras = new _core__WEBPACK_IMPORTED_MODULE_0__[\"Cameras\"](this._.container, this._.sceneContainer, this.scene, this.projection);\n this.layers = new _layers__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this);\n this.addLayer = this.layers.addLayer;\n this.removeLayer = this.layers.removeLayer;\n this.toggleLayer = this.layers.toggleLayer;\n this.setLayerOpacity = this.layers.setLayerOpacity;\n this.setLayerFilterEffect = this.layers.setLayerFilterEffect;\n this.setLayerSpecificOptions = this.layers.setLayerSpecificOptions;\n this.getLayerByName = this.layers.getLayerByName;\n this.hasLayer = this.layers.hasLayer;\n this._.tiledWorld = new _core__WEBPACK_IMPORTED_MODULE_0__[\"TiledWorld\"](this);\n this.zoom = 10;\n this.trueZoom = this.zoom;\n this.mouse = {\n lat: null,\n lng: null,\n elev: null\n };\n this.planetCenter = new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, -(this.projection.radii.major / this.projection.radiusScale), 0);\n this.planet.position.set(this.planetCenter.x, -this.planetCenter.y, this.planetCenter.z);\n this.scene.add(this.planet);\n this.scenesLOD[0].add(this.planetsLOD[0]);\n this.scenesLOD[1].add(this.planetsLOD[1]);\n this.scenesLOD[2].add(this.planetsLOD[2]);\n this.frontGroup.position.set(this.planetCenter.x, -this.planetCenter.y, this.planetCenter.z);\n this.sceneFront.add(this.frontGroup);\n this.scene.add(new three__WEBPACK_IMPORTED_MODULE_1__[\"AmbientLight\"](0xfefefe));\n\n if (this.options.starsphere) {\n var starsphereGeometry = new three__WEBPACK_IMPORTED_MODULE_1__[\"SphereBufferGeometry\"](this.planetCenter.y * 1000, 64, 64);\n var starsphereMaterial = new three__WEBPACK_IMPORTED_MODULE_1__[\"MeshBasicMaterial\"]({\n color: this.options.starsphere.color || 0xaaaaaa\n });\n if (this.options.starsphere.url) starsphereMaterial.map = this._.loader.load(this.options.starsphere.url);\n starsphereMaterial.opacity = 1;\n this.starsphere = new three__WEBPACK_IMPORTED_MODULE_1__[\"Mesh\"](starsphereGeometry, starsphereMaterial);\n this.sceneBack.add(this.starsphere);\n }\n\n if (this.options.atmosphere) {\n this.atmosphere = new three__WEBPACK_IMPORTED_MODULE_1__[\"Mesh\"](new three__WEBPACK_IMPORTED_MODULE_1__[\"SphereBufferGeometry\"](this.planetCenter.y * 1.5, 128, 128), _core__WEBPACK_IMPORTED_MODULE_0__[\"Shaders\"].atmosphere(this.options.atmosphere.color));\n this.sceneBack.add(this.atmosphere);\n }\n\n if (this.options.showAxes === true) {\n var materialx = new three__WEBPACK_IMPORTED_MODULE_1__[\"LineBasicMaterial\"]({\n color: 0xff0000\n });\n var geometryx = new three__WEBPACK_IMPORTED_MODULE_1__[\"BufferGeometry\"]().setFromPoints([new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0 * 2, 0, 0), new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](this.planetCenter.y * 2, 0, 0)]);\n var linex = new three__WEBPACK_IMPORTED_MODULE_1__[\"Line\"](geometryx, materialx);\n this.scene.add(linex);\n var materialy = new three__WEBPACK_IMPORTED_MODULE_1__[\"LineBasicMaterial\"]({\n color: 0x00ff00\n });\n var geometryy = new three__WEBPACK_IMPORTED_MODULE_1__[\"BufferGeometry\"]().setFromPoints([new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, 0, 0), new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, this.planetCenter.y * 2, 0)]);\n var liney = new three__WEBPACK_IMPORTED_MODULE_1__[\"Line\"](geometryy, materialy);\n this.scene.add(liney);\n var materialz = new three__WEBPACK_IMPORTED_MODULE_1__[\"LineBasicMaterial\"]({\n color: 0x0000ff\n });\n var geometryz = new three__WEBPACK_IMPORTED_MODULE_1__[\"BufferGeometry\"]().setFromPoints([new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, 0, 0), new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, 0, this.planetCenter.y * 2)]);\n var linez = new three__WEBPACK_IMPORTED_MODULE_1__[\"Line\"](geometryz, materialz);\n this.scene.add(linez);\n }\n\n this.controls = new _controls__WEBPACK_IMPORTED_MODULE_3__[\"default\"](this);\n this.addControl = this.controls.addControl;\n this.removeControl = this.controls.removeControl;\n\n if (this.options.renderOnlyWhenOpen === false) {\n this._.renderOnlyWhenOpen = false;\n }\n\n this._.loadingScreen = new _secondary_loadingScreen__WEBPACK_IMPORTED_MODULE_4__[\"default\"](this);\n this._.events = new _core__WEBPACK_IMPORTED_MODULE_0__[\"Events\"](this);\n this.setCenter(this.options.initialView);\n\n this._animate();\n\n return true;\n };\n\n LithoSphere.prototype._render = function () {\n this._.renderer.clear();\n\n if (this._.renderOnlyWhenOpen) {\n var containerRect = this._.container.getBoundingClientRect();\n\n if (containerRect.width <= 0 || containerRect.height <= 0) return;\n }\n\n this._.counters.update = (this._.counters.update + 1) % this._.updateEveryNthRender;\n if (this._.counters.update === 0) this._update();\n if (!this._.cameras.isFirstPerson) this._.cameras.orbit.controls.update();\n this.layers.tile3d.forEach(function (tile3d) {\n tile3d.renderer.update();\n });\n\n this._.renderer.render(this.sceneBack, this._.cameras.camera);\n\n this._.renderer.clearDepth();\n\n this._.renderer.render(this.scenesLOD[2], this._.cameras.camera);\n\n this._.renderer.clearDepth();\n\n this._.renderer.render(this.scenesLOD[1], this._.cameras.camera);\n\n this._.renderer.clearDepth();\n\n this._.renderer.render(this.scenesLOD[0], this._.cameras.camera);\n\n this._.renderer.clearDepth();\n\n this._.renderer.render(this.scene, this._.cameras.camera);\n\n this._.renderer.clearDepth();\n\n this._.renderer.render(this.sceneFront, this._.cameras.camera);\n };\n\n LithoSphere.prototype._update = function () {\n if (!this._.wasInitialized) return;\n\n if (this._.renderOnlyWhenOpen) {\n var containerRect = this._.container.getBoundingClientRect();\n\n if (containerRect.width <= 0 || containerRect.height <= 0) return;\n }\n\n this._.counters.frame = (this._.counters.frame + 1) % 4;\n this.scene.rotation.x = 0;\n this.scene.position.y = 0;\n\n if (!this._.firstUpdate) {\n this._.tiledWorld.refreshTiles();\n }\n\n this._.events._checkDesiredZoom();\n\n this.controls._onUpdateEvent();\n\n if (this._.cameras.isFirstPerson) {\n this._.lastCameraWasFirst = true;\n this._.cameras.firstPerson.controls.getObject().position.y = this._.cameras.orbit.controls.target.y - this._.cameras.firstPerson.height / this.projection.radiusScale;\n\n var v2 = this._.cameras.update();\n\n this._.events._rotateGlobe(v2);\n\n this._.events._onMouseMove();\n\n this.controls._onFirstPersonUpdate();\n } else if (this._.lastCameraWasFirst) {\n this._.lastCameraWasFirst = false;\n\n this.controls._onOrbitalUpdate();\n }\n\n if (this._.firstUpdate) {\n if (this._.firstViewOverride != null) this.setCenter(this._.firstViewOverride);else this.setCenter(this.options.initialView, true);\n var o = this._.cameras.orbit;\n var cam = o.camera;\n var con = o.controls;\n var pos = cam.position;\n var tar = con.target;\n this._.cameraPositionTarget = [pos.x, pos.y, pos.z, tar.x, tar.y, tar.z];\n this._.firstUpdate = false;\n }\n };\n\n return LithoSphere;\n}();\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (LithoSphere);\n\n//# sourceURL=webpack://LithoSphere/./src/lithosphere.ts?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core */ \"./src/core/index.ts\");\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ \"./node_modules/three/build/three.module.js\");\n/* harmony import */ var _layers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./layers */ \"./src/layers/index.ts\");\n/* harmony import */ var _controls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./controls */ \"./src/controls/index.ts\");\n/* harmony import */ var _secondary_loadingScreen__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./secondary/loadingScreen */ \"./src/secondary/loadingScreen.ts\");\nvar __assign = undefined && undefined.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\n\n\n\n\n\n\nvar LithoSphere = function () {\n function LithoSphere(containerId, options) {\n var _this = this;\n\n this._animate = function () {\n window.requestAnimationFrame(_this._animate);\n\n _this._render();\n };\n\n this._onFirstLoad = function () {\n _this._.firstLoad = true;\n\n _this._.events._rotateGlobe({\n pageX: 0,\n pageY: 0\n }, {\n x: 0.0001,\n y: 0.0001\n });\n\n _this._.rendererWrapper.updateSize();\n\n setTimeout(function () {\n _this.setCenter(_this.options.initialView, false, true);\n\n _this._setInitialCameraPositionTarget();\n\n _this._.events._onZoom();\n\n _this._.loadingScreen.end();\n }, 100);\n };\n\n this.setCenter = function (latLngZoom, ignoreZoom, accountForHeight) {\n if (!_this._.wasInitialized) return false;\n var rotLat = (90 - (latLngZoom.lat || 0)) * (Math.PI / 180);\n var rotLng = (latLngZoom.lng || 0) * (Math.PI / 180);\n\n _this.planet.rotation.set(rotLat, rotLng, 0);\n\n _this._.events._matchPlanetsLODToPlanet();\n\n if (latLngZoom.zoom != null && ignoreZoom != true) {\n _this.zoom = latLngZoom.zoom;\n\n var center = _this.getCenter(true);\n\n _this._.cameras.orbit.camera.position.y = -(40000000 / _this.projection.radiusScale / Math.pow(2, _this.zoom));\n if (accountForHeight) _this._.cameras.orbit.camera.position.y -= center.height;\n _this._.cameras.firstPerson.controls.getObject().position.y = -(40000000 / _this.projection.radiusScale / Math.pow(2, _this.zoom));\n if (accountForHeight) _this._.cameras.firstPerson.controls.getObject().position.y -= center.height;\n }\n\n _this._.events._refreshFrontGroupRotation();\n\n return true;\n };\n\n this.getCenterXYZ = function (raycasted) {\n if (raycasted) {\n _this._.raycaster.set(new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, _this.planetCenter.y, 0), new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, 1, 0));\n\n var planeArr = [];\n\n for (var i = 0; i < _this._.tiledWorld.tilesDrawn.length; i++) {\n if (!_this._.tiledWorld.tilesDrawn[i].isLODTile) planeArr.push(_this._.tiledWorld.tilesDrawn[i].t);\n }\n\n var intersects = _this._.raycaster.intersectObjects(planeArr);\n\n if (intersects.length > 0) {\n intersects[0].point.y += _this.planetCenter.y;\n return intersects[0].point;\n }\n\n return new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, 0, 0);\n } else {\n var centerPoint = {\n x: _this.planetCenter.x,\n y: _this.planetCenter.y,\n z: _this.planetCenter.z\n };\n centerPoint = _this.projection.rotatePoint3D(centerPoint, {\n x: -_this.planet.rotation.x,\n y: 0,\n z: 0\n });\n centerPoint = _this.projection.rotatePoint3D(centerPoint, {\n x: 0,\n y: -_this.planet.rotation.y,\n z: 0\n });\n centerPoint = _this.projection.rotatePoint3D(centerPoint, {\n x: 0,\n y: 0,\n z: -_this.planet.rotation.z\n });\n return new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](centerPoint.x, centerPoint.y, centerPoint.z);\n }\n };\n\n this.getCenter = function (raycasted) {\n var centerXYZ = _this.getCenterXYZ(raycasted);\n\n if (raycasted) {\n var center = JSON.parse(JSON.stringify(centerXYZ));\n center = _this.projection.rotatePoint3D(center, {\n x: -_this.planet.rotation.x,\n y: 0,\n z: 0\n });\n center = _this.projection.rotatePoint3D(center, {\n x: 0,\n y: -_this.planet.rotation.y,\n z: 0\n });\n center = _this.projection.rotatePoint3D(center, {\n x: 0,\n y: 0,\n z: -_this.planet.rotation.z\n });\n center = _this.projection.vector3ToLatLng(center);\n center.height = centerXYZ.length() * _this.projection.radiusScale - _this.projection.radii.major;\n return center;\n }\n\n return _this.projection.vector3ToLatLng(centerXYZ);\n };\n\n this.getCenterElevation = function () {\n return _this.getCenterXYZ(true).length() * _this.projection.radiusScale - _this.projection.radii.major;\n };\n\n this.getCenterElevationRaw = function () {\n var elev = _this.getCenterXYZ(true).length();\n\n if (elev <= 0.1 && elev >= -0.1) return;\n return elev;\n };\n\n this.getElevationAtLngLat = function (lng, lat) {\n var v = _this.projection.lonLatToVector3(lng, lat, 100000 * _this.options.exaggeration);\n\n var tempObj = new three__WEBPACK_IMPORTED_MODULE_1__[\"Object3D\"]();\n tempObj.position.set(0, -_this.planetCenter.y, 0);\n tempObj.rotation.set(_this.planet.rotation.x, _this.planet.rotation.y, _this.planet.rotation.z);\n var geometry = new three__WEBPACK_IMPORTED_MODULE_1__[\"SphereBufferGeometry\"](200, 32, 32);\n var material = new three__WEBPACK_IMPORTED_MODULE_1__[\"MeshBasicMaterial\"]({\n color: 0xffff00\n });\n var tempObj2 = new three__WEBPACK_IMPORTED_MODULE_1__[\"Mesh\"](geometry, material);\n tempObj2.position.set(v.x, v.y, v.z);\n tempObj.add(tempObj2);\n tempObj.updateMatrixWorld();\n var vector = new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"]();\n vector.setFromMatrixPosition(tempObj2.matrixWorld);\n\n _this._.raycaster.set(vector, new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, -_this.planetCenter.y, 0).normalize());\n\n var planeArr = [];\n\n for (var i = 0; i < _this._.tiledWorld.tilesDrawn.length; i++) {\n if (!_this._.tiledWorld.tilesDrawn[i].isLODTile) planeArr.push(_this._.tiledWorld.tilesDrawn[i].t);\n }\n\n var intersects = _this._.raycaster.intersectObjects(planeArr);\n\n if (intersects.length > 0) {\n intersects[intersects.length - 1].point.y += _this.planetCenter.y;\n return intersects[intersects.length - 1].point.length() * _this.projection.radiusScale - _this.projection.radii.major;\n }\n\n return 0;\n };\n\n this.getCenterTile = function () {\n var centerll = _this.getCenter();\n\n return _this.projection.latLngZ2TileXYZ(centerll.lat, centerll.lng, _this.zoom);\n };\n\n this.getCameras = function () {\n return {\n camera: _this._.cameras.camera,\n isFirstPerson: _this._.cameras.isFirstPerson,\n firstPerson: _this._.cameras.firstPerson,\n orbit: _this._.cameras.orbit\n };\n };\n\n this._setInitialCameraPositionTarget = function () {\n var o = _this._.cameras.orbit;\n var cam = o.camera;\n var con = o.controls;\n var pos = cam.position;\n var tar = con.target;\n var position = {\n x: pos.x,\n y: pos.y,\n z: pos.z\n };\n var target = {\n x: tar.x,\n y: tar.y,\n z: tar.z\n };\n\n if (_this.options.initialCamera) {\n var iC = _this.options.initialCamera;\n\n if (iC.position) {\n position = {\n x: iC.position.x || position.x,\n y: iC.position.y || position.y,\n z: iC.position.z || position.z\n };\n }\n\n if (iC.target) {\n target = {\n x: iC.target.x || target.x,\n y: iC.target.y || target.y,\n z: iC.target.z || target.z\n };\n }\n\n _this.setCameraPositionTarget(position, target);\n }\n };\n\n this.setCameraPositionTarget = function (position, target) {\n if (position) {\n _this._.cameras.orbit.camera.position.set(position.x || 9, position.y || 0, position.z || 0);\n }\n\n if (target) {\n _this._.cameras.orbit.controls.target.x = target.x || 0;\n _this._.cameras.orbit.controls.target.y = target.y || 0;\n _this._.cameras.orbit.controls.target.z = target.z || 0;\n }\n\n _this._.cameras.orbit.controls.update();\n };\n\n this.getContainer = function () {\n return _this._.container;\n };\n\n this.invalidateSize = function () {\n if (_this._.wasInitialized) {\n _this._.renderer.setSize(_this._.sceneContainer.offsetWidth, _this._.sceneContainer.offsetHeight);\n\n _this._.cameras.updateSize();\n }\n };\n\n var sceneContainer = document.getElementById(containerId).appendChild(document.createElement('div'));\n sceneContainer.id = '_lithosphere_scene';\n sceneContainer.style.width = '100%';\n sceneContainer.style.height = '100%';\n this._ = {\n containerId: containerId,\n container: document.getElementById(containerId),\n sceneContainer: sceneContainer,\n wasInitialized: false,\n rendererWrapper: null,\n renderer: null,\n cameras: null,\n tiledWorld: null,\n events: null,\n maxZoom: 0,\n minNativeZoom: 0,\n loader: new three__WEBPACK_IMPORTED_MODULE_1__[\"TextureLoader\"](),\n raycaster: new three__WEBPACK_IMPORTED_MODULE_1__[\"Raycaster\"](),\n updateEveryNthRender: 1,\n counters: {\n update: 0,\n frame: 0\n },\n lastCameraWasFirst: false,\n firstUpdate: true,\n firstLoad: false,\n loadingScreen: null,\n renderOnlyWhenOpen: true,\n zCutOff: 3,\n firstViewOverride: null,\n mouseIsInScene: false,\n marsRadius: 3396190\n };\n this._.container.style.position = 'relative';\n this.scene = new three__WEBPACK_IMPORTED_MODULE_1__[\"Scene\"]();\n this.scenesLOD = [new three__WEBPACK_IMPORTED_MODULE_1__[\"Scene\"](), new three__WEBPACK_IMPORTED_MODULE_1__[\"Scene\"](), new three__WEBPACK_IMPORTED_MODULE_1__[\"Scene\"]()];\n this.sceneBack = new three__WEBPACK_IMPORTED_MODULE_1__[\"Scene\"]();\n this.sceneFront = new three__WEBPACK_IMPORTED_MODULE_1__[\"Scene\"]();\n this.planet = new three__WEBPACK_IMPORTED_MODULE_1__[\"Object3D\"]();\n this.planetsLOD = [new three__WEBPACK_IMPORTED_MODULE_1__[\"Object3D\"](), new three__WEBPACK_IMPORTED_MODULE_1__[\"Object3D\"](), new three__WEBPACK_IMPORTED_MODULE_1__[\"Object3D\"]()];\n this.frontGroup = new three__WEBPACK_IMPORTED_MODULE_1__[\"Object3D\"]();\n var defaultOptions = {\n loadingScreen: true,\n tileMapResource: null,\n customParsers: {},\n radiusOfTiles: 4,\n useLOD: true,\n LOD: [{\n radiusOfTiles: 4,\n zoomsUp: 3\n }, {\n radiusOfTiles: 2,\n zoomsUp: 7\n }, {\n radiusOfTiles: 2,\n zoomsUp: 11\n }],\n tileResolution: 32,\n trueTileResolution: 256,\n showAxes: false,\n wireframeMode: false,\n exaggeration: 1,\n renderOnlyWhenOpen: true,\n targetYOffset: 0,\n highlightColor: 'yellow',\n activeColor: 'red'\n };\n options = options || {};\n this.options = __assign(__assign({}, defaultOptions), options);\n\n this._init();\n }\n\n LithoSphere.prototype._init = function () {\n this._.rendererWrapper = new _core__WEBPACK_IMPORTED_MODULE_0__[\"Renderer\"](this._.sceneContainer);\n this._.renderer = this._.rendererWrapper.renderer;\n\n if (this._.renderer) {\n this._.wasInitialized = true;\n } else return false;\n\n this.projection = new _core__WEBPACK_IMPORTED_MODULE_0__[\"Projection\"](this.options.majorRadius, this.options.minorRadius, this.options.tileMapResource, this.options.trueTileResolution);\n this._.cameras = new _core__WEBPACK_IMPORTED_MODULE_0__[\"Cameras\"](this._.container, this._.sceneContainer, this.scene, this.projection);\n this.layers = new _layers__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this);\n this.addLayer = this.layers.addLayer;\n this.removeLayer = this.layers.removeLayer;\n this.toggleLayer = this.layers.toggleLayer;\n this.setLayerOpacity = this.layers.setLayerOpacity;\n this.setLayerFilterEffect = this.layers.setLayerFilterEffect;\n this.setLayerSpecificOptions = this.layers.setLayerSpecificOptions;\n this.getLayerByName = this.layers.getLayerByName;\n this.hasLayer = this.layers.hasLayer;\n this._.tiledWorld = new _core__WEBPACK_IMPORTED_MODULE_0__[\"TiledWorld\"](this);\n this.zoom = 10;\n this.trueZoom = this.zoom;\n this.mouse = {\n lat: null,\n lng: null,\n elev: null\n };\n this.planetCenter = new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, -(this.projection.radii.major / this.projection.radiusScale), 0);\n this.planet.position.set(this.planetCenter.x, -this.planetCenter.y, this.planetCenter.z);\n this.scene.add(this.planet);\n this.scenesLOD[0].add(this.planetsLOD[0]);\n this.scenesLOD[1].add(this.planetsLOD[1]);\n this.scenesLOD[2].add(this.planetsLOD[2]);\n this.frontGroup.position.set(this.planetCenter.x, -this.planetCenter.y, this.planetCenter.z);\n this.sceneFront.add(this.frontGroup);\n this.scene.add(new three__WEBPACK_IMPORTED_MODULE_1__[\"AmbientLight\"](0xfefefe));\n\n if (this.options.starsphere) {\n var starsphereGeometry = new three__WEBPACK_IMPORTED_MODULE_1__[\"SphereBufferGeometry\"](this.planetCenter.y * 1000, 64, 64);\n var starsphereMaterial = new three__WEBPACK_IMPORTED_MODULE_1__[\"MeshBasicMaterial\"]({\n color: this.options.starsphere.color || 0xaaaaaa\n });\n if (this.options.starsphere.url) starsphereMaterial.map = this._.loader.load(this.options.starsphere.url);\n starsphereMaterial.opacity = 1;\n this.starsphere = new three__WEBPACK_IMPORTED_MODULE_1__[\"Mesh\"](starsphereGeometry, starsphereMaterial);\n this.sceneBack.add(this.starsphere);\n }\n\n if (this.options.atmosphere) {\n this.atmosphere = new three__WEBPACK_IMPORTED_MODULE_1__[\"Mesh\"](new three__WEBPACK_IMPORTED_MODULE_1__[\"SphereBufferGeometry\"](this.planetCenter.y * 1.5, 128, 128), _core__WEBPACK_IMPORTED_MODULE_0__[\"Shaders\"].atmosphere(this.options.atmosphere.color));\n this.sceneBack.add(this.atmosphere);\n }\n\n if (this.options.showAxes === true) {\n var materialx = new three__WEBPACK_IMPORTED_MODULE_1__[\"LineBasicMaterial\"]({\n color: 0xff0000\n });\n var geometryx = new three__WEBPACK_IMPORTED_MODULE_1__[\"BufferGeometry\"]().setFromPoints([new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0 * 2, 0, 0), new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](this.planetCenter.y * 2, 0, 0)]);\n var linex = new three__WEBPACK_IMPORTED_MODULE_1__[\"Line\"](geometryx, materialx);\n this.scene.add(linex);\n var materialy = new three__WEBPACK_IMPORTED_MODULE_1__[\"LineBasicMaterial\"]({\n color: 0x00ff00\n });\n var geometryy = new three__WEBPACK_IMPORTED_MODULE_1__[\"BufferGeometry\"]().setFromPoints([new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, 0, 0), new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, this.planetCenter.y * 2, 0)]);\n var liney = new three__WEBPACK_IMPORTED_MODULE_1__[\"Line\"](geometryy, materialy);\n this.scene.add(liney);\n var materialz = new three__WEBPACK_IMPORTED_MODULE_1__[\"LineBasicMaterial\"]({\n color: 0x0000ff\n });\n var geometryz = new three__WEBPACK_IMPORTED_MODULE_1__[\"BufferGeometry\"]().setFromPoints([new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, 0, 0), new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"](0, 0, this.planetCenter.y * 2)]);\n var linez = new three__WEBPACK_IMPORTED_MODULE_1__[\"Line\"](geometryz, materialz);\n this.scene.add(linez);\n }\n\n this.controls = new _controls__WEBPACK_IMPORTED_MODULE_3__[\"default\"](this);\n this.addControl = this.controls.addControl;\n this.removeControl = this.controls.removeControl;\n\n if (this.options.renderOnlyWhenOpen === false) {\n this._.renderOnlyWhenOpen = false;\n }\n\n this._.loadingScreen = new _secondary_loadingScreen__WEBPACK_IMPORTED_MODULE_4__[\"default\"](this);\n this._.events = new _core__WEBPACK_IMPORTED_MODULE_0__[\"Events\"](this);\n this.setCenter(this.options.initialView);\n\n this._setInitialCameraPositionTarget();\n\n this._animate();\n\n return true;\n };\n\n LithoSphere.prototype._render = function () {\n this._.renderer.clear();\n\n if (this._.renderOnlyWhenOpen) {\n var containerRect = this._.container.getBoundingClientRect();\n\n if (containerRect.width <= 0 || containerRect.height <= 0) return;\n }\n\n this._.counters.update = (this._.counters.update + 1) % this._.updateEveryNthRender;\n if (this._.counters.update === 0) this._update();\n if (!this._.cameras.isFirstPerson) this._.cameras.orbit.controls.update();\n this.layers.tile3d.forEach(function (tile3d) {\n tile3d.renderer.update();\n });\n\n this._.renderer.render(this.sceneBack, this._.cameras.camera);\n\n this._.renderer.clearDepth();\n\n this._.renderer.render(this.scenesLOD[2], this._.cameras.camera);\n\n this._.renderer.clearDepth();\n\n this._.renderer.render(this.scenesLOD[1], this._.cameras.camera);\n\n this._.renderer.clearDepth();\n\n this._.renderer.render(this.scenesLOD[0], this._.cameras.camera);\n\n this._.renderer.clearDepth();\n\n this._.renderer.render(this.scene, this._.cameras.camera);\n\n this._.renderer.clearDepth();\n\n this._.renderer.render(this.sceneFront, this._.cameras.camera);\n };\n\n LithoSphere.prototype._update = function () {\n if (!this._.wasInitialized) return;\n\n if (this._.renderOnlyWhenOpen) {\n var containerRect = this._.container.getBoundingClientRect();\n\n if (containerRect.width <= 0 || containerRect.height <= 0) return;\n }\n\n this._.counters.frame = (this._.counters.frame + 1) % 4;\n this.scene.rotation.x = 0;\n this.scene.position.y = 0;\n\n if (!this._.firstUpdate) {\n this._.tiledWorld.refreshTiles();\n }\n\n this._.events._checkDesiredZoom();\n\n this.controls._onUpdateEvent();\n\n if (this._.cameras.isFirstPerson) {\n this._.lastCameraWasFirst = true;\n this._.cameras.firstPerson.controls.getObject().position.y = this._.cameras.orbit.controls.target.y - this._.cameras.firstPerson.height / this.projection.radiusScale;\n\n var v2 = this._.cameras.update();\n\n this._.events._rotateGlobe(v2);\n\n this._.events._onMouseMove();\n\n this.controls._onFirstPersonUpdate();\n } else if (this._.lastCameraWasFirst) {\n this._.lastCameraWasFirst = false;\n\n this.controls._onOrbitalUpdate();\n }\n\n if (this._.firstUpdate) {\n if (this._.firstViewOverride != null) this.setCenter(this._.firstViewOverride);else this.setCenter(this.options.initialView, true);\n\n this._setInitialCameraPositionTarget();\n\n this._.firstUpdate = false;\n }\n };\n\n return LithoSphere;\n}();\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (LithoSphere);\n\n//# sourceURL=webpack://LithoSphere/./src/lithosphere.ts?"); /***/ }), diff --git a/public/examples/example.html b/public/examples/example.html index 6598ba0..2eadbe0 100644 --- a/public/examples/example.html +++ b/public/examples/example.html @@ -35,11 +35,30 @@