@loaders.gl/json 3.0.13 → 3.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/parser/json-parser.ts"],"names":["JSONParser","constructor","reset","_initializeParser","result","undefined","previousStates","currentState","Object","freeze","container","key","jsonpath","JSONPath","write","chunk","parser","close","_pushOrSet","value","push","_openArray","newContainer","isArray","_closeArray","pop","_openObject","_closeObject","_parser","ClarinetParser","onready","length","onopenobject","name","onkey","set","oncloseobject","onopenarray","onclosearray","onvalue","onerror","error","onend"],"mappings":";;;;;;;;;;;AAEA;;AACA;;AAIe,MAAMA,UAAN,CAAiB;AAI9BC,EAAAA,WAAW,GAAG;AAAA;AAAA;AACZ,SAAKC,KAAL;;AACA,SAAKC,iBAAL;AACD;;AAEDD,EAAAA,KAAK,GAAS;AACZ,SAAKE,MAAL,GAAcC,SAAd;AACA,SAAKC,cAAL,GAAsB,EAAtB;AACA,SAAKC,YAAL,GAAoBC,MAAM,CAACC,MAAP,CAAc;AAACC,MAAAA,SAAS,EAAE,EAAZ;AAAgBC,MAAAA,GAAG,EAAE;AAArB,KAAd,CAApB;AACA,SAAKC,QAAL,GAAgB,IAAIC,iBAAJ,EAAhB;AACD;;AAEDC,EAAAA,KAAK,CAACC,KAAD,EAAc;AACjB,SAAKC,MAAL,CAAYF,KAAZ,CAAkBC,KAAlB;AACD;;AAEDE,EAAAA,KAAK,GAAS;AACZ,SAAKD,MAAL,CAAYC,KAAZ;AACD;;AAIDC,EAAAA,UAAU,CAACC,KAAD,EAAc;AACtB,UAAM;AAACT,MAAAA,SAAD;AAAYC,MAAAA;AAAZ,QAAmB,KAAKJ,YAA9B;;AACA,QAAII,GAAG,KAAK,IAAZ,EAAkB;AAChBD,MAAAA,SAAS,CAACC,GAAD,CAAT,GAAiBQ,KAAjB;AACA,WAAKZ,YAAL,CAAkBI,GAAlB,GAAwB,IAAxB;AACD,KAHD,MAGO;AACLD,MAAAA,SAAS,CAACU,IAAV,CAAeD,KAAf;AACD;AACF;;AAEDE,EAAAA,UAAU,CAACC,YAAY,GAAG,EAAhB,EAA0B;AAClC,SAAKV,QAAL,CAAcQ,IAAd,CAAmB,IAAnB;;AACA,SAAKF,UAAL,CAAgBI,YAAhB;;AACA,SAAKhB,cAAL,CAAoBc,IAApB,CAAyB,KAAKb,YAA9B;AACA,SAAKA,YAAL,GAAoB;AAACG,MAAAA,SAAS,EAAEY,YAAZ;AAA0BC,MAAAA,OAAO,EAAE,IAAnC;AAAyCZ,MAAAA,GAAG,EAAE;AAA9C,KAApB;AACD;;AAEDa,EAAAA,WAAW,GAAS;AAClB,SAAKZ,QAAL,CAAca,GAAd;AACA,SAAKlB,YAAL,GAAoB,KAAKD,cAAL,CAAoBmB,GAApB,EAApB;AACD;;AAEDC,EAAAA,WAAW,CAACJ,YAAY,GAAG,EAAhB,EAA0B;AACnC,SAAKV,QAAL,CAAcQ,IAAd,CAAmB,IAAnB;;AACA,SAAKF,UAAL,CAAgBI,YAAhB;;AACA,SAAKhB,cAAL,CAAoBc,IAApB,CAAyB,KAAKb,YAA9B;AACA,SAAKA,YAAL,GAAoB;AAACG,MAAAA,SAAS,EAAEY,YAAZ;AAA0BC,MAAAA,OAAO,EAAE,KAAnC;AAA0CZ,MAAAA,GAAG,EAAE;AAA/C,KAApB;AACD;;AAEDgB,EAAAA,YAAY,GAAS;AACnB,SAAKf,QAAL,CAAca,GAAd;AACA,SAAKlB,YAAL,GAAoB,KAAKD,cAAL,CAAoBmB,GAApB,EAApB;AACD;;AAEDtB,EAAAA,iBAAiB,GAAS;AACxB,SAAKyB,OAAL,GAAe,IAAIC,iBAAJ,CAAmB;AAChCC,MAAAA,OAAO,EAAE,MAAM;AACb,aAAKlB,QAAL,GAAgB,IAAIC,iBAAJ,EAAhB;AACA,aAAKP,cAAL,CAAoByB,MAApB,GAA6B,CAA7B;AACA,aAAKxB,YAAL,CAAkBG,SAAlB,CAA4BqB,MAA5B,GAAqC,CAArC;AACD,OAL+B;AAOhCC,MAAAA,YAAY,EAAGC,IAAD,IAAU;AACtB,aAAKP,WAAL,CAAiB,EAAjB;;AACA,YAAI,OAAOO,IAAP,KAAgB,WAApB,EAAiC;AAC/B,eAAKjB,MAAL,CAAYkB,KAAZ,CAAkBD,IAAlB;AACD;AACF,OAZ+B;AAchCC,MAAAA,KAAK,EAAGD,IAAD,IAAU;AACf,aAAKrB,QAAL,CAAcuB,GAAd,CAAkBF,IAAlB;AACA,aAAK1B,YAAL,CAAkBI,GAAlB,GAAwBsB,IAAxB;AACD,OAjB+B;AAmBhCG,MAAAA,aAAa,EAAE,MAAM;AACnB,aAAKT,YAAL;AACD,OArB+B;AAuBhCU,MAAAA,WAAW,EAAE,MAAM;AACjB,aAAKhB,UAAL;AACD,OAzB+B;AA2BhCiB,MAAAA,YAAY,EAAE,MAAM;AAClB,aAAKd,WAAL;AACD,OA7B+B;AA+BhCe,MAAAA,OAAO,EAAGpB,KAAD,IAAW;AAClB,aAAKD,UAAL,CAAgBC,KAAhB;AACD,OAjC+B;AAmChCqB,MAAAA,OAAO,EAAGC,KAAD,IAAW;AAClB,cAAMA,KAAN;AACD,OArC+B;AAuChCC,MAAAA,KAAK,EAAE,MAAM;AACX,aAAKtC,MAAL,GAAc,KAAKG,YAAL,CAAkBG,SAAlB,CAA4Be,GAA5B,EAAd;AACD;AAzC+B,KAAnB,CAAf;AA2CD;;AAEmB,MAANT,MAAM,GAAmB;AACrC,WAAO,KAAKY,OAAZ;AACD;;AA5G6B","sourcesContent":["// @ts-nocheck\n\nimport ClarinetParser from '../clarinet/clarinet';\nimport JSONPath from '../jsonpath/jsonpath';\n\n// JSONParser builds a JSON object using the events emitted by the Clarinet parser\n\nexport default class JSONParser {\n jsonpath: JSONPath;\n _parser?: ClarinetParser;\n\n constructor() {\n this.reset();\n this._initializeParser();\n }\n\n reset(): void {\n this.result = undefined;\n this.previousStates = [];\n this.currentState = Object.freeze({container: [], key: null});\n this.jsonpath = new JSONPath();\n }\n\n write(chunk): void {\n this.parser.write(chunk);\n }\n\n close(): void {\n this.parser.close();\n }\n\n // PRIVATE METHODS\n\n _pushOrSet(value): void {\n const {container, key} = this.currentState;\n if (key !== null) {\n container[key] = value;\n this.currentState.key = null;\n } else {\n container.push(value);\n }\n }\n\n _openArray(newContainer = []): void {\n this.jsonpath.push(null);\n this._pushOrSet(newContainer);\n this.previousStates.push(this.currentState);\n this.currentState = {container: newContainer, isArray: true, key: null};\n }\n\n _closeArray(): void {\n this.jsonpath.pop();\n this.currentState = this.previousStates.pop();\n }\n\n _openObject(newContainer = {}): void {\n this.jsonpath.push(null);\n this._pushOrSet(newContainer);\n this.previousStates.push(this.currentState);\n this.currentState = {container: newContainer, isArray: false, key: null};\n }\n\n _closeObject(): void {\n this.jsonpath.pop();\n this.currentState = this.previousStates.pop();\n }\n\n _initializeParser(): void {\n this._parser = new ClarinetParser({\n onready: () => {\n this.jsonpath = new JSONPath();\n this.previousStates.length = 0;\n this.currentState.container.length = 0;\n },\n\n onopenobject: (name) => {\n this._openObject({});\n if (typeof name !== 'undefined') {\n this.parser.onkey(name);\n }\n },\n\n onkey: (name) => {\n this.jsonpath.set(name);\n this.currentState.key = name;\n },\n\n oncloseobject: () => {\n this._closeObject();\n },\n\n onopenarray: () => {\n this._openArray();\n },\n\n onclosearray: () => {\n this._closeArray();\n },\n\n onvalue: (value) => {\n this._pushOrSet(value);\n },\n\n onerror: (error) => {\n throw error;\n },\n\n onend: () => {\n this.result = this.currentState.container.pop();\n }\n });\n }\n\n protected get parser(): ClarinetParser {\n return this._parser as ClarinetParser;\n }\n}\n"],"file":"json-parser.js"}
1
+ {"version":3,"sources":["../../../../src/lib/parser/json-parser.ts"],"names":["JSONParser","reset","_initializeParser","result","undefined","previousStates","currentState","Object","freeze","container","key","jsonpath","JSONPath","chunk","parser","write","close","value","push","newContainer","_pushOrSet","isArray","pop","_parser","ClarinetParser","onready","length","onopenobject","name","_openObject","onkey","set","oncloseobject","_closeObject","onopenarray","_openArray","onclosearray","_closeArray","onvalue","onerror","error","onend"],"mappings":";;;;;;;;;;;;;;;AAEA;;AACA;;IAIqBA,U;AAInB,wBAAc;AAAA;AAAA;AAAA;AACZ,SAAKC,KAAL;;AACA,SAAKC,iBAAL;AACD;;;;WAED,iBAAc;AACZ,WAAKC,MAAL,GAAcC,SAAd;AACA,WAAKC,cAAL,GAAsB,EAAtB;AACA,WAAKC,YAAL,GAAoBC,MAAM,CAACC,MAAP,CAAc;AAACC,QAAAA,SAAS,EAAE,EAAZ;AAAgBC,QAAAA,GAAG,EAAE;AAArB,OAAd,CAApB;AACA,WAAKC,QAAL,GAAgB,IAAIC,iBAAJ,EAAhB;AACD;;;WAED,eAAMC,KAAN,EAAmB;AACjB,WAAKC,MAAL,CAAYC,KAAZ,CAAkBF,KAAlB;AACD;;;WAED,iBAAc;AACZ,WAAKC,MAAL,CAAYE,KAAZ;AACD;;;WAID,oBAAWC,KAAX,EAAwB;AACtB,+BAAyB,KAAKX,YAA9B;AAAA,UAAOG,SAAP,sBAAOA,SAAP;AAAA,UAAkBC,GAAlB,sBAAkBA,GAAlB;;AACA,UAAIA,GAAG,KAAK,IAAZ,EAAkB;AAChBD,QAAAA,SAAS,CAACC,GAAD,CAAT,GAAiBO,KAAjB;AACA,aAAKX,YAAL,CAAkBI,GAAlB,GAAwB,IAAxB;AACD,OAHD,MAGO;AACLD,QAAAA,SAAS,CAACS,IAAV,CAAeD,KAAf;AACD;AACF;;;WAED,sBAAoC;AAAA,UAAzBE,YAAyB,uEAAV,EAAU;AAClC,WAAKR,QAAL,CAAcO,IAAd,CAAmB,IAAnB;;AACA,WAAKE,UAAL,CAAgBD,YAAhB;;AACA,WAAKd,cAAL,CAAoBa,IAApB,CAAyB,KAAKZ,YAA9B;AACA,WAAKA,YAAL,GAAoB;AAACG,QAAAA,SAAS,EAAEU,YAAZ;AAA0BE,QAAAA,OAAO,EAAE,IAAnC;AAAyCX,QAAAA,GAAG,EAAE;AAA9C,OAApB;AACD;;;WAED,uBAAoB;AAClB,WAAKC,QAAL,CAAcW,GAAd;AACA,WAAKhB,YAAL,GAAoB,KAAKD,cAAL,CAAoBiB,GAApB,EAApB;AACD;;;WAED,uBAAqC;AAAA,UAAzBH,YAAyB,uEAAV,EAAU;AACnC,WAAKR,QAAL,CAAcO,IAAd,CAAmB,IAAnB;;AACA,WAAKE,UAAL,CAAgBD,YAAhB;;AACA,WAAKd,cAAL,CAAoBa,IAApB,CAAyB,KAAKZ,YAA9B;AACA,WAAKA,YAAL,GAAoB;AAACG,QAAAA,SAAS,EAAEU,YAAZ;AAA0BE,QAAAA,OAAO,EAAE,KAAnC;AAA0CX,QAAAA,GAAG,EAAE;AAA/C,OAApB;AACD;;;WAED,wBAAqB;AACnB,WAAKC,QAAL,CAAcW,GAAd;AACA,WAAKhB,YAAL,GAAoB,KAAKD,cAAL,CAAoBiB,GAApB,EAApB;AACD;;;WAED,6BAA0B;AAAA;;AACxB,WAAKC,OAAL,GAAe,IAAIC,iBAAJ,CAAmB;AAChCC,QAAAA,OAAO,EAAE,mBAAM;AACb,UAAA,KAAI,CAACd,QAAL,GAAgB,IAAIC,iBAAJ,EAAhB;AACA,UAAA,KAAI,CAACP,cAAL,CAAoBqB,MAApB,GAA6B,CAA7B;AACA,UAAA,KAAI,CAACpB,YAAL,CAAkBG,SAAlB,CAA4BiB,MAA5B,GAAqC,CAArC;AACD,SAL+B;AAOhCC,QAAAA,YAAY,EAAE,sBAACC,IAAD,EAAU;AACtB,UAAA,KAAI,CAACC,WAAL,CAAiB,EAAjB;;AACA,cAAI,OAAOD,IAAP,KAAgB,WAApB,EAAiC;AAC/B,YAAA,KAAI,CAACd,MAAL,CAAYgB,KAAZ,CAAkBF,IAAlB;AACD;AACF,SAZ+B;AAchCE,QAAAA,KAAK,EAAE,eAACF,IAAD,EAAU;AACf,UAAA,KAAI,CAACjB,QAAL,CAAcoB,GAAd,CAAkBH,IAAlB;;AACA,UAAA,KAAI,CAACtB,YAAL,CAAkBI,GAAlB,GAAwBkB,IAAxB;AACD,SAjB+B;AAmBhCI,QAAAA,aAAa,EAAE,yBAAM;AACnB,UAAA,KAAI,CAACC,YAAL;AACD,SArB+B;AAuBhCC,QAAAA,WAAW,EAAE,uBAAM;AACjB,UAAA,KAAI,CAACC,UAAL;AACD,SAzB+B;AA2BhCC,QAAAA,YAAY,EAAE,wBAAM;AAClB,UAAA,KAAI,CAACC,WAAL;AACD,SA7B+B;AA+BhCC,QAAAA,OAAO,EAAE,iBAACrB,KAAD,EAAW;AAClB,UAAA,KAAI,CAACG,UAAL,CAAgBH,KAAhB;AACD,SAjC+B;AAmChCsB,QAAAA,OAAO,EAAE,iBAACC,KAAD,EAAW;AAClB,gBAAMA,KAAN;AACD,SArC+B;AAuChCC,QAAAA,KAAK,EAAE,iBAAM;AACX,UAAA,KAAI,CAACtC,MAAL,GAAc,KAAI,CAACG,YAAL,CAAkBG,SAAlB,CAA4Ba,GAA5B,EAAd;AACD;AAzC+B,OAAnB,CAAf;AA2CD;;;SAED,eAAuC;AACrC,aAAO,KAAKC,OAAZ;AACD","sourcesContent":["// @ts-nocheck\n\nimport ClarinetParser from '../clarinet/clarinet';\nimport JSONPath from '../jsonpath/jsonpath';\n\n// JSONParser builds a JSON object using the events emitted by the Clarinet parser\n\nexport default class JSONParser {\n jsonpath: JSONPath;\n _parser?: ClarinetParser;\n\n constructor() {\n this.reset();\n this._initializeParser();\n }\n\n reset(): void {\n this.result = undefined;\n this.previousStates = [];\n this.currentState = Object.freeze({container: [], key: null});\n this.jsonpath = new JSONPath();\n }\n\n write(chunk): void {\n this.parser.write(chunk);\n }\n\n close(): void {\n this.parser.close();\n }\n\n // PRIVATE METHODS\n\n _pushOrSet(value): void {\n const {container, key} = this.currentState;\n if (key !== null) {\n container[key] = value;\n this.currentState.key = null;\n } else {\n container.push(value);\n }\n }\n\n _openArray(newContainer = []): void {\n this.jsonpath.push(null);\n this._pushOrSet(newContainer);\n this.previousStates.push(this.currentState);\n this.currentState = {container: newContainer, isArray: true, key: null};\n }\n\n _closeArray(): void {\n this.jsonpath.pop();\n this.currentState = this.previousStates.pop();\n }\n\n _openObject(newContainer = {}): void {\n this.jsonpath.push(null);\n this._pushOrSet(newContainer);\n this.previousStates.push(this.currentState);\n this.currentState = {container: newContainer, isArray: false, key: null};\n }\n\n _closeObject(): void {\n this.jsonpath.pop();\n this.currentState = this.previousStates.pop();\n }\n\n _initializeParser(): void {\n this._parser = new ClarinetParser({\n onready: () => {\n this.jsonpath = new JSONPath();\n this.previousStates.length = 0;\n this.currentState.container.length = 0;\n },\n\n onopenobject: (name) => {\n this._openObject({});\n if (typeof name !== 'undefined') {\n this.parser.onkey(name);\n }\n },\n\n onkey: (name) => {\n this.jsonpath.set(name);\n this.currentState.key = name;\n },\n\n oncloseobject: () => {\n this._closeObject();\n },\n\n onopenarray: () => {\n this._openArray();\n },\n\n onclosearray: () => {\n this._closeArray();\n },\n\n onvalue: (value) => {\n this._pushOrSet(value);\n },\n\n onerror: (error) => {\n throw error;\n },\n\n onend: () => {\n this.result = this.currentState.container.pop();\n }\n });\n }\n\n protected get parser(): ClarinetParser {\n return this._parser as ClarinetParser;\n }\n}\n"],"file":"json-parser.js"}
@@ -7,101 +7,161 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
 
10
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
+
12
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
+
14
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
+
16
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
17
+
18
+ var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
19
+
20
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
21
+
22
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
23
+
24
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
25
+
10
26
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
27
 
12
28
  var _jsonParser = _interopRequireDefault(require("./json-parser"));
13
29
 
14
30
  var _jsonpath = _interopRequireDefault(require("../jsonpath/jsonpath"));
15
31
 
16
- class StreamingJSONParser extends _jsonParser.default {
17
- constructor(options = {}) {
18
- super();
19
- (0, _defineProperty2.default)(this, "jsonPaths", void 0);
20
- (0, _defineProperty2.default)(this, "streamingJsonPath", null);
21
- (0, _defineProperty2.default)(this, "streamingArray", null);
22
- (0, _defineProperty2.default)(this, "topLevelObject", null);
23
- const jsonpaths = options.jsonpaths || [];
24
- this.jsonPaths = jsonpaths.map(jsonpath => new _jsonpath.default(jsonpath));
25
-
26
- this._extendParser();
27
- }
32
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
28
33
 
29
- write(chunk) {
30
- super.write(chunk);
31
- let array = [];
34
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
32
35
 
33
- if (this.streamingArray) {
34
- array = [...this.streamingArray];
35
- this.streamingArray.length = 0;
36
- }
36
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
37
37
 
38
- return array;
39
- }
38
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
40
39
 
41
- getPartialResult() {
42
- return this.topLevelObject;
43
- }
40
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
44
41
 
45
- getStreamingJsonPath() {
46
- return this.streamingJsonPath;
47
- }
42
+ var StreamingJSONParser = function (_JSONParser) {
43
+ (0, _inherits2.default)(StreamingJSONParser, _JSONParser);
48
44
 
49
- getStreamingJsonPathAsString() {
50
- return this.streamingJsonPath && this.streamingJsonPath.toString();
51
- }
45
+ var _super = _createSuper(StreamingJSONParser);
46
+
47
+ function StreamingJSONParser() {
48
+ var _this;
52
49
 
53
- getJsonPath() {
54
- return this.jsonpath;
50
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
51
+ (0, _classCallCheck2.default)(this, StreamingJSONParser);
52
+ _this = _super.call(this);
53
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "jsonPaths", void 0);
54
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "streamingJsonPath", null);
55
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "streamingArray", null);
56
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "topLevelObject", null);
57
+ var jsonpaths = options.jsonpaths || [];
58
+ _this.jsonPaths = jsonpaths.map(function (jsonpath) {
59
+ return new _jsonpath.default(jsonpath);
60
+ });
61
+
62
+ _this._extendParser();
63
+
64
+ return _this;
55
65
  }
56
66
 
57
- _matchJSONPath() {
58
- const currentPath = this.getJsonPath();
67
+ (0, _createClass2.default)(StreamingJSONParser, [{
68
+ key: "write",
69
+ value: function write(chunk) {
70
+ (0, _get2.default)((0, _getPrototypeOf2.default)(StreamingJSONParser.prototype), "write", this).call(this, chunk);
71
+ var array = [];
72
+
73
+ if (this.streamingArray) {
74
+ array = (0, _toConsumableArray2.default)(this.streamingArray);
75
+ this.streamingArray.length = 0;
76
+ }
59
77
 
60
- if (this.jsonPaths.length === 0) {
61
- return true;
78
+ return array;
62
79
  }
80
+ }, {
81
+ key: "getPartialResult",
82
+ value: function getPartialResult() {
83
+ return this.topLevelObject;
84
+ }
85
+ }, {
86
+ key: "getStreamingJsonPath",
87
+ value: function getStreamingJsonPath() {
88
+ return this.streamingJsonPath;
89
+ }
90
+ }, {
91
+ key: "getStreamingJsonPathAsString",
92
+ value: function getStreamingJsonPathAsString() {
93
+ return this.streamingJsonPath && this.streamingJsonPath.toString();
94
+ }
95
+ }, {
96
+ key: "getJsonPath",
97
+ value: function getJsonPath() {
98
+ return this.jsonpath;
99
+ }
100
+ }, {
101
+ key: "_matchJSONPath",
102
+ value: function _matchJSONPath() {
103
+ var currentPath = this.getJsonPath();
63
104
 
64
- for (const jsonPath of this.jsonPaths) {
65
- if (jsonPath.equals(currentPath)) {
105
+ if (this.jsonPaths.length === 0) {
66
106
  return true;
67
107
  }
68
- }
69
108
 
70
- return false;
71
- }
72
-
73
- _extendParser() {
74
- this.parser.onopenarray = () => {
75
- if (!this.streamingArray) {
76
- if (this._matchJSONPath()) {
77
- this.streamingJsonPath = this.getJsonPath().clone();
78
- this.streamingArray = [];
109
+ var _iterator = _createForOfIteratorHelper(this.jsonPaths),
110
+ _step;
79
111
 
80
- this._openArray(this.streamingArray);
112
+ try {
113
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
114
+ var jsonPath = _step.value;
81
115
 
82
- return;
116
+ if (jsonPath.equals(currentPath)) {
117
+ return true;
118
+ }
83
119
  }
120
+ } catch (err) {
121
+ _iterator.e(err);
122
+ } finally {
123
+ _iterator.f();
84
124
  }
85
125
 
86
- this._openArray();
87
- };
126
+ return false;
127
+ }
128
+ }, {
129
+ key: "_extendParser",
130
+ value: function _extendParser() {
131
+ var _this2 = this;
88
132
 
89
- this.parser.onopenobject = name => {
90
- if (!this.topLevelObject) {
91
- this.topLevelObject = {};
133
+ this.parser.onopenarray = function () {
134
+ if (!_this2.streamingArray) {
135
+ if (_this2._matchJSONPath()) {
136
+ _this2.streamingJsonPath = _this2.getJsonPath().clone();
137
+ _this2.streamingArray = [];
92
138
 
93
- this._openObject(this.topLevelObject);
94
- } else {
95
- this._openObject({});
96
- }
139
+ _this2._openArray(_this2.streamingArray);
97
140
 
98
- if (typeof name !== 'undefined') {
99
- this.parser.onkey(name);
100
- }
101
- };
102
- }
141
+ return;
142
+ }
143
+ }
144
+
145
+ _this2._openArray();
146
+ };
147
+
148
+ this.parser.onopenobject = function (name) {
149
+ if (!_this2.topLevelObject) {
150
+ _this2.topLevelObject = {};
103
151
 
104
- }
152
+ _this2._openObject(_this2.topLevelObject);
153
+ } else {
154
+ _this2._openObject({});
155
+ }
156
+
157
+ if (typeof name !== 'undefined') {
158
+ _this2.parser.onkey(name);
159
+ }
160
+ };
161
+ }
162
+ }]);
163
+ return StreamingJSONParser;
164
+ }(_jsonParser.default);
105
165
 
106
166
  exports.default = StreamingJSONParser;
107
167
  //# sourceMappingURL=streaming-json-parser.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/parser/streaming-json-parser.ts"],"names":["StreamingJSONParser","JSONParser","constructor","options","jsonpaths","jsonPaths","map","jsonpath","JSONPath","_extendParser","write","chunk","array","streamingArray","length","getPartialResult","topLevelObject","getStreamingJsonPath","streamingJsonPath","getStreamingJsonPathAsString","toString","getJsonPath","_matchJSONPath","currentPath","jsonPath","equals","parser","onopenarray","clone","_openArray","onopenobject","name","_openObject","onkey"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAMe,MAAMA,mBAAN,SAAkCC,mBAAlC,CAA6C;AAM1DC,EAAAA,WAAW,CAACC,OAA6B,GAAG,EAAjC,EAAqC;AAC9C;AAD8C;AAAA,6DAJH,IAIG;AAAA,0DAHT,IAGS;AAAA,0DAFR,IAEQ;AAE9C,UAAMC,SAAS,GAAGD,OAAO,CAACC,SAAR,IAAqB,EAAvC;AACA,SAAKC,SAAL,GAAiBD,SAAS,CAACE,GAAV,CAAeC,QAAD,IAAc,IAAIC,iBAAJ,CAAaD,QAAb,CAA5B,CAAjB;;AACA,SAAKE,aAAL;AACD;;AASDC,EAAAA,KAAK,CAACC,KAAD,EAAQ;AACX,UAAMD,KAAN,CAAYC,KAAZ;AACA,QAAIC,KAAY,GAAG,EAAnB;;AACA,QAAI,KAAKC,cAAT,EAAyB;AACvBD,MAAAA,KAAK,GAAG,CAAC,GAAG,KAAKC,cAAT,CAAR;AACA,WAAKA,cAAL,CAAoBC,MAApB,GAA6B,CAA7B;AACD;;AACD,WAAOF,KAAP;AACD;;AAODG,EAAAA,gBAAgB,GAAG;AACjB,WAAO,KAAKC,cAAZ;AACD;;AAEDC,EAAAA,oBAAoB,GAAG;AACrB,WAAO,KAAKC,iBAAZ;AACD;;AAEDC,EAAAA,4BAA4B,GAAG;AAC7B,WAAO,KAAKD,iBAAL,IAA0B,KAAKA,iBAAL,CAAuBE,QAAvB,EAAjC;AACD;;AAEDC,EAAAA,WAAW,GAAG;AACZ,WAAO,KAAKd,QAAZ;AACD;;AAODe,EAAAA,cAAc,GAAG;AACf,UAAMC,WAAW,GAAG,KAAKF,WAAL,EAApB;;AAKA,QAAI,KAAKhB,SAAL,CAAeS,MAAf,KAA0B,CAA9B,EAAiC;AAC/B,aAAO,IAAP;AACD;;AAED,SAAK,MAAMU,QAAX,IAAuB,KAAKnB,SAA5B,EAAuC;AACrC,UAAImB,QAAQ,CAACC,MAAT,CAAgBF,WAAhB,CAAJ,EAAkC;AAChC,eAAO,IAAP;AACD;AACF;;AAED,WAAO,KAAP;AACD;;AAEDd,EAAAA,aAAa,GAAG;AAEd,SAAKiB,MAAL,CAAYC,WAAZ,GAA0B,MAAM;AAC9B,UAAI,CAAC,KAAKd,cAAV,EAA0B;AACxB,YAAI,KAAKS,cAAL,EAAJ,EAA2B;AAEzB,eAAKJ,iBAAL,GAAyB,KAAKG,WAAL,GAAmBO,KAAnB,EAAzB;AACA,eAAKf,cAAL,GAAsB,EAAtB;;AACA,eAAKgB,UAAL,CAAgB,KAAKhB,cAArB;;AACA;AACD;AACF;;AAED,WAAKgB,UAAL;AACD,KAZD;;AAeA,SAAKH,MAAL,CAAYI,YAAZ,GAA4BC,IAAD,IAAU;AACnC,UAAI,CAAC,KAAKf,cAAV,EAA0B;AACxB,aAAKA,cAAL,GAAsB,EAAtB;;AACA,aAAKgB,WAAL,CAAiB,KAAKhB,cAAtB;AACD,OAHD,MAGO;AACL,aAAKgB,WAAL,CAAiB,EAAjB;AACD;;AACD,UAAI,OAAOD,IAAP,KAAgB,WAApB,EAAiC;AAC/B,aAAKL,MAAL,CAAYO,KAAZ,CAAkBF,IAAlB;AACD;AACF,KAVD;AAWD;;AAvGyD","sourcesContent":["import {default as JSONParser} from './json-parser';\nimport JSONPath from '../jsonpath/jsonpath';\n\n/**\n * The `StreamingJSONParser` looks for the first array in the JSON structure.\n * and emits an array of chunks\n */\nexport default class StreamingJSONParser extends JSONParser {\n private jsonPaths: JSONPath[];\n private streamingJsonPath: JSONPath | null = null;\n private streamingArray: any[] | null = null;\n private topLevelObject: object | null = null;\n\n constructor(options: {[key: string]: any} = {}) {\n super();\n const jsonpaths = options.jsonpaths || [];\n this.jsonPaths = jsonpaths.map((jsonpath) => new JSONPath(jsonpath));\n this._extendParser();\n }\n\n /**\n * write REDEFINITION\n * - super.write() chunk to parser\n * - get the contents (so far) of \"topmost-level\" array as batch of rows\n * - clear top-level array\n * - return the batch of rows\\\n */\n write(chunk) {\n super.write(chunk);\n let array: any[] = [];\n if (this.streamingArray) {\n array = [...this.streamingArray];\n this.streamingArray.length = 0;\n }\n return array;\n }\n\n /**\n * Returns a partially formed result object\n * Useful for returning the \"wrapper\" object when array is not top level\n * e.g. GeoJSON\n */\n getPartialResult() {\n return this.topLevelObject;\n }\n\n getStreamingJsonPath() {\n return this.streamingJsonPath;\n }\n\n getStreamingJsonPathAsString() {\n return this.streamingJsonPath && this.streamingJsonPath.toString();\n }\n\n getJsonPath() {\n return this.jsonpath;\n }\n\n // PRIVATE METHODS\n\n /**\n * Checks is this.getJsonPath matches the jsonpaths provided in options\n */\n _matchJSONPath() {\n const currentPath = this.getJsonPath();\n // console.debug(`Testing JSONPath`, currentPath);\n\n // Backwards compatibility, match any array\n // TODO implement using wildcard once that is supported\n if (this.jsonPaths.length === 0) {\n return true;\n }\n\n for (const jsonPath of this.jsonPaths) {\n if (jsonPath.equals(currentPath)) {\n return true;\n }\n }\n\n return false;\n }\n\n _extendParser() {\n // Redefine onopenarray to locate and inject value for top-level array\n this.parser.onopenarray = () => {\n if (!this.streamingArray) {\n if (this._matchJSONPath()) {\n // @ts-ignore\n this.streamingJsonPath = this.getJsonPath().clone();\n this.streamingArray = [];\n this._openArray(this.streamingArray as []);\n return;\n }\n }\n\n this._openArray();\n };\n\n // Redefine onopenarray to inject value for top-level object\n this.parser.onopenobject = (name) => {\n if (!this.topLevelObject) {\n this.topLevelObject = {};\n this._openObject(this.topLevelObject);\n } else {\n this._openObject({});\n }\n if (typeof name !== 'undefined') {\n this.parser.onkey(name);\n }\n };\n }\n}\n"],"file":"streaming-json-parser.js"}
1
+ {"version":3,"sources":["../../../../src/lib/parser/streaming-json-parser.ts"],"names":["StreamingJSONParser","options","jsonpaths","jsonPaths","map","jsonpath","JSONPath","_extendParser","chunk","array","streamingArray","length","topLevelObject","streamingJsonPath","toString","currentPath","getJsonPath","jsonPath","equals","parser","onopenarray","_matchJSONPath","clone","_openArray","onopenobject","name","_openObject","onkey","JSONParser"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;;;;;;;;;;;IAMqBA,mB;;;;;AAMnB,iCAAgD;AAAA;;AAAA,QAApCC,OAAoC,uEAAJ,EAAI;AAAA;AAC9C;AAD8C;AAAA,oGAJH,IAIG;AAAA,iGAHT,IAGS;AAAA,iGAFR,IAEQ;AAE9C,QAAMC,SAAS,GAAGD,OAAO,CAACC,SAAR,IAAqB,EAAvC;AACA,UAAKC,SAAL,GAAiBD,SAAS,CAACE,GAAV,CAAc,UAACC,QAAD;AAAA,aAAc,IAAIC,iBAAJ,CAAaD,QAAb,CAAd;AAAA,KAAd,CAAjB;;AACA,UAAKE,aAAL;;AAJ8C;AAK/C;;;;WASD,eAAMC,KAAN,EAAa;AACX,iHAAYA,KAAZ;AACA,UAAIC,KAAY,GAAG,EAAnB;;AACA,UAAI,KAAKC,cAAT,EAAyB;AACvBD,QAAAA,KAAK,oCAAO,KAAKC,cAAZ,CAAL;AACA,aAAKA,cAAL,CAAoBC,MAApB,GAA6B,CAA7B;AACD;;AACD,aAAOF,KAAP;AACD;;;WAOD,4BAAmB;AACjB,aAAO,KAAKG,cAAZ;AACD;;;WAED,gCAAuB;AACrB,aAAO,KAAKC,iBAAZ;AACD;;;WAED,wCAA+B;AAC7B,aAAO,KAAKA,iBAAL,IAA0B,KAAKA,iBAAL,CAAuBC,QAAvB,EAAjC;AACD;;;WAED,uBAAc;AACZ,aAAO,KAAKT,QAAZ;AACD;;;WAOD,0BAAiB;AACf,UAAMU,WAAW,GAAG,KAAKC,WAAL,EAApB;;AAKA,UAAI,KAAKb,SAAL,CAAeQ,MAAf,KAA0B,CAA9B,EAAiC;AAC/B,eAAO,IAAP;AACD;;AARc,iDAUQ,KAAKR,SAVb;AAAA;;AAAA;AAUf,4DAAuC;AAAA,cAA5Bc,QAA4B;;AACrC,cAAIA,QAAQ,CAACC,MAAT,CAAgBH,WAAhB,CAAJ,EAAkC;AAChC,mBAAO,IAAP;AACD;AACF;AAdc;AAAA;AAAA;AAAA;AAAA;;AAgBf,aAAO,KAAP;AACD;;;WAED,yBAAgB;AAAA;;AAEd,WAAKI,MAAL,CAAYC,WAAZ,GAA0B,YAAM;AAC9B,YAAI,CAAC,MAAI,CAACV,cAAV,EAA0B;AACxB,cAAI,MAAI,CAACW,cAAL,EAAJ,EAA2B;AAEzB,YAAA,MAAI,CAACR,iBAAL,GAAyB,MAAI,CAACG,WAAL,GAAmBM,KAAnB,EAAzB;AACA,YAAA,MAAI,CAACZ,cAAL,GAAsB,EAAtB;;AACA,YAAA,MAAI,CAACa,UAAL,CAAgB,MAAI,CAACb,cAArB;;AACA;AACD;AACF;;AAED,QAAA,MAAI,CAACa,UAAL;AACD,OAZD;;AAeA,WAAKJ,MAAL,CAAYK,YAAZ,GAA2B,UAACC,IAAD,EAAU;AACnC,YAAI,CAAC,MAAI,CAACb,cAAV,EAA0B;AACxB,UAAA,MAAI,CAACA,cAAL,GAAsB,EAAtB;;AACA,UAAA,MAAI,CAACc,WAAL,CAAiB,MAAI,CAACd,cAAtB;AACD,SAHD,MAGO;AACL,UAAA,MAAI,CAACc,WAAL,CAAiB,EAAjB;AACD;;AACD,YAAI,OAAOD,IAAP,KAAgB,WAApB,EAAiC;AAC/B,UAAA,MAAI,CAACN,MAAL,CAAYQ,KAAZ,CAAkBF,IAAlB;AACD;AACF,OAVD;AAWD;;;EAvG8CG,mB","sourcesContent":["import {default as JSONParser} from './json-parser';\nimport JSONPath from '../jsonpath/jsonpath';\n\n/**\n * The `StreamingJSONParser` looks for the first array in the JSON structure.\n * and emits an array of chunks\n */\nexport default class StreamingJSONParser extends JSONParser {\n private jsonPaths: JSONPath[];\n private streamingJsonPath: JSONPath | null = null;\n private streamingArray: any[] | null = null;\n private topLevelObject: object | null = null;\n\n constructor(options: {[key: string]: any} = {}) {\n super();\n const jsonpaths = options.jsonpaths || [];\n this.jsonPaths = jsonpaths.map((jsonpath) => new JSONPath(jsonpath));\n this._extendParser();\n }\n\n /**\n * write REDEFINITION\n * - super.write() chunk to parser\n * - get the contents (so far) of \"topmost-level\" array as batch of rows\n * - clear top-level array\n * - return the batch of rows\\\n */\n write(chunk) {\n super.write(chunk);\n let array: any[] = [];\n if (this.streamingArray) {\n array = [...this.streamingArray];\n this.streamingArray.length = 0;\n }\n return array;\n }\n\n /**\n * Returns a partially formed result object\n * Useful for returning the \"wrapper\" object when array is not top level\n * e.g. GeoJSON\n */\n getPartialResult() {\n return this.topLevelObject;\n }\n\n getStreamingJsonPath() {\n return this.streamingJsonPath;\n }\n\n getStreamingJsonPathAsString() {\n return this.streamingJsonPath && this.streamingJsonPath.toString();\n }\n\n getJsonPath() {\n return this.jsonpath;\n }\n\n // PRIVATE METHODS\n\n /**\n * Checks is this.getJsonPath matches the jsonpaths provided in options\n */\n _matchJSONPath() {\n const currentPath = this.getJsonPath();\n // console.debug(`Testing JSONPath`, currentPath);\n\n // Backwards compatibility, match any array\n // TODO implement using wildcard once that is supported\n if (this.jsonPaths.length === 0) {\n return true;\n }\n\n for (const jsonPath of this.jsonPaths) {\n if (jsonPath.equals(currentPath)) {\n return true;\n }\n }\n\n return false;\n }\n\n _extendParser() {\n // Redefine onopenarray to locate and inject value for top-level array\n this.parser.onopenarray = () => {\n if (!this.streamingArray) {\n if (this._matchJSONPath()) {\n // @ts-ignore\n this.streamingJsonPath = this.getJsonPath().clone();\n this.streamingArray = [];\n this._openArray(this.streamingArray as []);\n return;\n }\n }\n\n this._openArray();\n };\n\n // Redefine onopenarray to inject value for top-level object\n this.parser.onopenobject = (name) => {\n if (!this.topLevelObject) {\n this.topLevelObject = {};\n this._openObject(this.topLevelObject);\n } else {\n this._openObject({});\n }\n if (typeof name !== 'undefined') {\n this.parser.onkey(name);\n }\n };\n }\n}\n"],"file":"streaming-json-parser.js"}
@@ -1,7 +1,7 @@
1
1
  import { geojsonToBinary } from '@loaders.gl/gis';
2
2
  import parseJSONSync from './lib/parse-json';
3
3
  import parseJSONInBatches from './lib/parse-json-in-batches';
4
- const VERSION = typeof "3.0.13" !== 'undefined' ? "3.0.13" : 'latest';
4
+ const VERSION = typeof "3.0.14" !== 'undefined' ? "3.0.14" : 'latest';
5
5
  const DEFAULT_GEOJSON_LOADER_OPTIONS = {
6
6
  geojson: {
7
7
  shape: 'object-row-table'
@@ -1,6 +1,6 @@
1
1
  import parseJSONSync from './lib/parse-json';
2
2
  import parseJSONInBatches from './lib/parse-json-in-batches';
3
- const VERSION = typeof "3.0.13" !== 'undefined' ? "3.0.13" : 'latest';
3
+ const VERSION = typeof "3.0.14" !== 'undefined' ? "3.0.14" : 'latest';
4
4
  const DEFAULT_JSON_LOADER_OPTIONS = {
5
5
  json: {
6
6
  shape: 'row-table',
@@ -1,2 +1,2 @@
1
- !function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=30)}([function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){t.exports=r(20)},function(t,e,r){var n=r(12);t.exports=function(t){return new n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(22),o=r(23),i=r(14),s=r(24);t.exports=function(t){return n(t)||o(t)||i(t)||s()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(21);t.exports=function(t){return function(){return new n(t.apply(this,arguments))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){var e;if("undefined"!=typeof Symbol&&(Symbol.asyncIterator&&(e=t[Symbol.asyncIterator]),null==e&&Symbol.iterator&&(e=t[Symbol.iterator])),null==e&&(e=t["@@asyncIterator"]),null==e&&(e=t["@@iterator"]),null==e)throw new TypeError("Object is not async iterable");return e.call(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=r=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),r(e)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(t,e,r,n,o,i,s){try{var a=t[i](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var s=t.apply(e,n);function a(t){r(s,o,i,a,u,"next",t)}function u(t){r(s,o,i,a,u,"throw",t)}a(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,r(e)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){this.wrapped=t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(13);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(25),o=r(26),i=r(14),s=r(27);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||s()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(28);function o(e,r,i){return"undefined"!=typeof Reflect&&Reflect.get?(t.exports=o=Reflect.get,t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=o=function(t,e,r){var o=n(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(r):i.value}},t.exports.default=t.exports,t.exports.__esModule=!0),o(e,r,i||e)}t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(29);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(9).default,o=r(8);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?o(t):e},t.exports.default=t.exports,t.exports.__esModule=!0},,function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function a(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),s=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===l)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,s),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function f(){}function p(){}var d={};d[o]=function(){return this};var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(d=v);var g=p.prototype=h.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,i){function s(){return new e((function(n,s){!function n(o,i,s,a){var u=c(t[o],t,i);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,a)}))}a(u.arg)}(o,i,n,s)}))}return n=n?n.then(s,s):s()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=g.constructor=p,p.constructor=f,f.displayName=a(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(m.prototype),m.prototype[i]=function(){return this},t.AsyncIterator=m,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var s=new m(u(e,r,n,o),i);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(g),a(g,s,"Generator"),g[o]=function(){return this},g.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,r){var n=r(12);function o(t){var e,r;function o(e,r){try{var s=t[e](r),a=s.value,u=a instanceof n;Promise.resolve(u?a.wrapped:a).then((function(t){u?o("return"===e?"return":"next",t):i(s.done?"return":"normal",t)}),(function(t){o("throw",t)}))}catch(t){i("throw",t)}}function i(t,n){switch(t){case"return":e.resolve({value:n,done:!0});break;case"throw":e.reject(n);break;default:e.resolve({value:n,done:!1})}(e=e.next)?o(e.key,e.arg):r=null}this._invoke=function(t,n){return new Promise((function(i,s){var a={key:t,arg:n,resolve:i,reject:s,next:null};r?r=r.next=a:(e=r=a,o(t,n))}))},"function"!=typeof t.return&&(this.return=void 0)}o.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},o.prototype.next=function(t){return this._invoke("next",t)},o.prototype.throw=function(t){return this._invoke("throw",t)},o.prototype.return=function(t){return this._invoke("return",t)},t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(13);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null!=r){var n,o,i=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);s=!0);}catch(t){a=!0,o=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(11);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=n(t)););return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,r(e,n)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){"use strict";r.r(e);var n=r(0),o=r.n(n),i=r(10),s=r.n(i),a=r(1),u=r.n(a),c=r(3),l=r.n(c),h=r(4),f=r.n(h),p=r(9),d=r.n(p);function y(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}var v=new Map,g=function(){function t(){l()(this,t)}return f()(t,null,[{key:"onmessage",set:function(t){self.onmessage=function(e){if(b(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}}},{key:"addEventListener",value:function(t){var e=v.get(t);e||(e=function(e){if(b(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}),self.addEventListener("message",e)}},{key:"removeEventListener",value:function(t){var e=v.get(t);v.delete(t),self.removeEventListener("message",e)}},{key:"postMessage",value:function(t,e){if(self){var r={source:"loaders.gl",type:t,payload:e},n=function t(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,o=n||new Set;if(e){if(y(e))o.add(e);else if(y(e.buffer))o.add(e.buffer);else if(ArrayBuffer.isView(e));else if(r&&"object"===d()(e))for(var i in e)t(e[i],r,o)}else;return void 0===n?Array.from(o):[]}(e);self.postMessage(r,n)}}}]),t}();function b(t){var e=t.type,r=t.data;return"message"===e&&r&&"string"==typeof r.source&&r.source.startsWith("loaders.gl")}function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var x=0;function O(t,e){return new Promise((function(r,n){var o=x++;g.addEventListener((function t(e,i){if(i.id===o)switch(e){case"done":g.removeEventListener(t),r(i.result);break;case"error":g.removeEventListener(t),n(i.error)}}));var i={id:o,input:t,options:e};g.postMessage("process",i)}))}function j(t){return _.apply(this,arguments)}function _(){return(_=s()(u.a.mark((function t(e){var r,n,o,i,s,a,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.loader,n=e.arrayBuffer,o=e.options,i=e.context,!r.parseSync&&!r.parse){t.next=6;break}s=n,a=r.parseSync||r.parse,t.next=13;break;case 6:if(!r.parseTextSync){t.next=12;break}c=new TextDecoder,s=c.decode(n),a=r.parseTextSync,t.next=13;break;case 12:throw new Error("Could not load data with ".concat(r.name," loader"));case 13:return o=w(w({},o),{},{modules:r&&r.options&&r.options.modules||{},worker:!1}),t.next=16,a(s,w({},o),i,r);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var k=r(2),A=r.n(k),P=r(6),E=r.n(P),S=r(7),L=r.n(S),C=r(5),I=r.n(C);function N(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function R(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?N(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function M(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return B(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return B(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function U(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=T(t);return F(t,r,{coordLength:e.coordLength||r.coordLength,numericPropKeys:e.numericPropKeys||r.numericPropKeys,PositionDataType:e.PositionDataType||Float32Array})}function T(t){var e,r,n=0,o=0,i=0,s=0,a=0,u=0,c=0,l=0,h=0,f=new Set,p={},d=M(t);try{for(d.s();!(e=d.n()).done;){var y=e.value,v=y.geometry;switch(v.type){case"Point":o++,n++,f.add(v.coordinates.length);break;case"MultiPoint":o++,n+=v.coordinates.length;var g,b=M(v.coordinates);try{for(b.s();!(g=b.n()).done;){var m=g.value;f.add(m.length)}}catch(t){b.e(t)}finally{b.f()}break;case"LineString":a++,i+=v.coordinates.length,s++;var w,x=M(v.coordinates);try{for(x.s();!(w=x.n()).done;){var O=w.value;f.add(O.length)}}catch(t){x.e(t)}finally{x.f()}break;case"MultiLineString":a++;var j,_=M(v.coordinates);try{for(_.s();!(j=_.n()).done;){var k=j.value;i+=k.length,s++;var A,P=M(k);try{for(P.s();!(A=P.n()).done;){var E=A.value;f.add(E.length)}}catch(t){P.e(t)}finally{P.f()}}}catch(t){_.e(t)}finally{_.f()}break;case"Polygon":h++,c++,l+=v.coordinates.length,u+=X(v.coordinates).length;var S,L=M(X(v.coordinates));try{for(L.s();!(S=L.n()).done;){var C=S.value;f.add(C.length)}}catch(t){L.e(t)}finally{L.f()}break;case"MultiPolygon":h++;var N,R=M(v.coordinates);try{for(R.s();!(N=R.n()).done;){var B=N.value;c++,l+=B.length,u+=X(B).length;var U,T=M(X(B));try{for(T.s();!(U=T.n()).done;){var F=U.value;f.add(F.length)}}catch(t){T.e(t)}finally{T.f()}}}catch(t){R.e(t)}finally{R.f()}break;default:throw new Error("Unsupported geometry type: ".concat(v.type))}if(y.properties)for(var D in y.properties){var J=y.properties[D];p[D]=p[D]||void 0===p[D]?(r=J,Number.isFinite(r)):p[D]}}}catch(t){d.e(t)}finally{d.f()}return{coordLength:f.size>0?Math.max.apply(Math,I()(f)):2,pointPositionsCount:n,pointFeaturesCount:o,linePositionsCount:i,linePathsCount:s,lineFeaturesCount:a,polygonPositionsCount:u,polygonObjectsCount:c,polygonRingsCount:l,polygonFeaturesCount:h,numericPropKeys:Object.keys(p).filter((function(t){return p[t]}))}}function F(t,e,r){for(var n=e.pointPositionsCount,o=e.pointFeaturesCount,i=e.linePositionsCount,s=e.linePathsCount,a=e.lineFeaturesCount,u=e.polygonPositionsCount,c=e.polygonObjectsCount,l=e.polygonRingsCount,h=e.polygonFeaturesCount,f=r.coordLength,p=r.numericPropKeys,d=r.PositionDataType,y=void 0===d?Float32Array:d,v=t.length>65535?Uint32Array:Uint16Array,g={positions:new y(n*f),globalFeatureIds:new v(n),featureIds:o>65535?new Uint32Array(n):new Uint16Array(n),numericProps:{},properties:Array(),fields:Array()},b={positions:new y(i*f),pathIndices:i>65535?new Uint32Array(s+1):new Uint16Array(s+1),globalFeatureIds:new v(i),featureIds:a>65535?new Uint32Array(i):new Uint16Array(i),numericProps:{},properties:Array(),fields:Array()},m={positions:new y(u*f),polygonIndices:u>65535?new Uint32Array(c+1):new Uint16Array(c+1),primitivePolygonIndices:u>65535?new Uint32Array(l+1):new Uint16Array(l+1),globalFeatureIds:new v(u),featureIds:h>65535?new Uint32Array(u):new Uint16Array(u),numericProps:{},properties:Array(),fields:Array()},w=0,x=[g,b,m];w<x.length;w++){var O,j=x[w],_=M(p||[]);try{for(_.s();!(O=_.n()).done;){var k=O.value;j.numericProps[k]=new Float32Array(j.positions.length/f)}}catch(t){_.e(t)}finally{_.f()}}b.pathIndices[s]=i,m.polygonIndices[c]=u,m.primitivePolygonIndices[l]=u;var A,P={pointPosition:0,pointFeature:0,linePosition:0,linePath:0,lineFeature:0,polygonPosition:0,polygonObject:0,polygonRing:0,polygonFeature:0,feature:0},E=M(t);try{for(E.s();!(A=E.n()).done;){var S=A.value,L=S.geometry,C=S.properties||{};switch(L.type){case"Point":D(L.coordinates,g,P,f,C),g.properties.push($(C,p)),P.pointFeature++;break;case"MultiPoint":J(L.coordinates,g,P,f,C),g.properties.push($(C,p)),P.pointFeature++;break;case"LineString":z(L.coordinates,b,P,f,C),b.properties.push($(C,p)),P.lineFeature++;break;case"MultiLineString":G(L.coordinates,b,P,f,C),b.properties.push($(C,p)),P.lineFeature++;break;case"Polygon":Y(L.coordinates,m,P,f,C),m.properties.push($(C,p)),P.polygonFeature++;break;case"MultiPolygon":V(L.coordinates,m,P,f,C),m.properties.push($(C,p)),P.polygonFeature++;break;default:throw new Error("Invalid geometry type")}P.feature++}}catch(t){E.e(t)}finally{E.f()}return function(t,e,r,n){var o={points:R(R({},t),{},{positions:{value:t.positions,size:n},globalFeatureIds:{value:t.globalFeatureIds,size:1},featureIds:{value:t.featureIds,size:1},type:"Point"}),lines:R(R({},e),{},{pathIndices:{value:e.pathIndices,size:1},positions:{value:e.positions,size:n},globalFeatureIds:{value:e.globalFeatureIds,size:1},featureIds:{value:e.featureIds,size:1},type:"LineString"}),polygons:R(R({},r),{},{polygonIndices:{value:r.polygonIndices,size:1},primitivePolygonIndices:{value:r.primitivePolygonIndices,size:1},positions:{value:r.positions,size:n},globalFeatureIds:{value:r.globalFeatureIds,size:1},featureIds:{value:r.featureIds,size:1},type:"Polygon"})};for(var i in o)for(var s in o[i].numericProps)o[i].numericProps[s]={value:o[i].numericProps[s],size:1};return o}(g,b,m,f)}function D(t,e,r,n,o){e.positions.set(t,r.pointPosition*n),e.globalFeatureIds[r.pointPosition]=r.feature,e.featureIds[r.pointPosition]=r.pointFeature,K(e,o,r.pointPosition,1),r.pointPosition++}function J(t,e,r,n,o){var i,s=M(t);try{for(s.s();!(i=s.n()).done;){D(i.value,e,r,n,o)}}catch(t){s.e(t)}finally{s.f()}}function z(t,e,r,n,o){e.pathIndices[r.linePath]=r.linePosition,r.linePath++,q(e.positions,t,r.linePosition,n);var i=t.length;K(e,o,r.linePosition,i),e.globalFeatureIds.set(new Uint32Array(i).fill(r.feature),r.linePosition),e.featureIds.set(new Uint32Array(i).fill(r.lineFeature),r.linePosition),r.linePosition+=i}function G(t,e,r,n,o){var i,s=M(t);try{for(s.s();!(i=s.n()).done;){z(i.value,e,r,n,o)}}catch(t){s.e(t)}finally{s.f()}}function Y(t,e,r,n,o){e.polygonIndices[r.polygonObject]=r.polygonPosition,r.polygonObject++;var i,s=M(t);try{for(s.s();!(i=s.n()).done;){var a=i.value;e.primitivePolygonIndices[r.polygonRing]=r.polygonPosition,r.polygonRing++,q(e.positions,a,r.polygonPosition,n);var u=a.length;K(e,o,r.polygonPosition,u),e.globalFeatureIds.set(new Uint32Array(u).fill(r.feature),r.polygonPosition),e.featureIds.set(new Uint32Array(u).fill(r.polygonFeature),r.polygonPosition),r.polygonPosition+=u}}catch(t){s.e(t)}finally{s.f()}}function V(t,e,r,n,o){var i,s=M(t);try{for(s.s();!(i=s.n()).done;){Y(i.value,e,r,n,o)}}catch(t){s.e(t)}finally{s.f()}}function K(t,e,r,n){for(var o in t.numericProps)o in e&&t.numericProps[o].set(new Array(n).fill(e[o]),r)}function $(t,e){var r={};for(var n in t)e.includes(n)||(r[n]=t[n]);return r}function q(t,e,r,n){var o,i=r*n,s=M(e);try{for(s.s();!(o=s.n()).done;){var a=o.value;t.set(a,i),i+=n}}catch(t){s.e(t)}finally{s.f()}}function X(t){var e;return(e=[]).concat.apply(e,I()(t))}function H(t,e){try{var r,n=JSON.parse(t);return null!==(r=e.json)&&void 0!==r&&r.table&&function t(e){if(Array.isArray(e))return e;if(e&&"object"===d()(e))for(var r=0,n=Object.values(e);r<n.length;r++){var o=n[r],i=t(o);if(i)return i}return null}(n)||n}catch(t){throw new Error("JSONLoader: failed to parse JSON")}}var W=function(){function t(e,r){if(l()(this,t),o()(this,"schema",void 0),o()(this,"options",void 0),o()(this,"length",0),o()(this,"rows",null),o()(this,"cursor",0),o()(this,"_headers",[]),this.options=r,this.schema=e,!Array.isArray(e))for(var n in this._headers=[],e)this._headers[e[n].index]=e[n].name}return f()(t,[{key:"rowCount",value:function(){return this.length}},{key:"addArrayRow",value:function(t,e){Number.isFinite(e)&&(this.cursor=e),this.rows=this.rows||new Array(100),this.rows[this.length]=t,this.length++}},{key:"addObjectRow",value:function(t,e){Number.isFinite(e)&&(this.cursor=e),this.rows=this.rows||new Array(100),this.rows[this.length]=t,this.length++}},{key:"getBatch",value:function(){var t=this.rows;return t?(t=t.slice(0,this.length),this.rows=null,{shape:this.options.shape,batchType:"data",data:t,length:this.length,schema:this.schema,cursor:this.cursor}):null}}]),t}();var Q=function(){function t(e,r){if(l()(this,t),o()(this,"schema",void 0),o()(this,"options",void 0),o()(this,"length",0),o()(this,"objectRows",null),o()(this,"arrayRows",null),o()(this,"cursor",0),o()(this,"_headers",[]),this.options=r,this.schema=e,!Array.isArray(e))for(var n in this._headers=[],e)this._headers[e[n].index]=e[n].name}return f()(t,[{key:"rowCount",value:function(){return this.length}},{key:"addArrayRow",value:function(t,e){switch(Number.isFinite(e)&&(this.cursor=e),this.options.shape){case"object-row-table":var r=function(t,e){if(!t)throw new Error("null row");if(!e)throw new Error("no headers");for(var r={},n=0;n<e.length;n++)r[e[n]]=t[n];return r}(t,this._headers);this.addObjectRow(r,e);break;case"array-row-table":this.arrayRows=this.arrayRows||new Array(100),this.arrayRows[this.length]=t,this.length++}}},{key:"addObjectRow",value:function(t,e){switch(Number.isFinite(e)&&(this.cursor=e),this.options.shape){case"array-row-table":var r=function(t,e){if(!t)throw new Error("null row");if(!e)throw new Error("no headers");for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]=t[e[n]];return r}(t,this._headers);this.addArrayRow(r,e);break;case"object-row-table":this.objectRows=this.objectRows||new Array(100),this.objectRows[this.length]=t,this.length++}}},{key:"getBatch",value:function(){var t=this.arrayRows||this.objectRows;return t?(t=t.slice(0,this.length),this.arrayRows=null,this.objectRows=null,{shape:this.options.shape,batchType:"data",data:t,length:this.length,schema:this.schema,cursor:this.cursor}):null}}]),t}(),Z=r(15),tt=r.n(Z),et=function(){function t(e,r){l()(this,t),o()(this,"schema",void 0),o()(this,"length",0),o()(this,"allocated",0),o()(this,"columns",{}),this.schema=e,this._reallocateColumns()}return f()(t,[{key:"rowCount",value:function(){return this.length}},{key:"addArrayRow",value:function(t){this._reallocateColumns();var e=0;for(var r in this.columns)this.columns[r][this.length]=t[e++];this.length++}},{key:"addObjectRow",value:function(t){for(var e in this._reallocateColumns(),t)this.columns[e][this.length]=t[e];this.length++}},{key:"getBatch",value:function(){this._pruneColumns();var t=Array.isArray(this.schema)?this.columns:{};if(!Array.isArray(this.schema))for(var e in this.schema){var r=this.schema[e];t[r.name]=this.columns[r.index]}return this.columns={},{shape:"columnar-table",batchType:"data",data:t,schema:this.schema,length:this.length}}},{key:"_reallocateColumns",value:function(){if(!(this.length<this.allocated))for(var t in this.allocated=this.allocated>0?this.allocated*=2:100,this.columns={},this.schema){var e=this.schema[t],r=e.type||Float32Array,n=this.columns[e.index];if(n&&ArrayBuffer.isView(n)){var o=new r(this.allocated);o.set(n),this.columns[e.index]=o}else n?(n.length=this.allocated,this.columns[e.index]=n):this.columns[e.index]=new r(this.allocated)}}},{key:"_pruneColumns",value:function(){for(var t=0,e=Object.entries(this.columns);t<e.length;t++){var r=tt()(e[t],2),n=r[0],o=r[1];this.columns[n]=o.slice(0,this.length)}}}]),t}();function rt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function nt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?rt(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var ot={shape:"array-row-table",batchSize:"auto",batchDebounceMs:0,limit:0,_limitMB:0},it=function(){function t(e,r){l()(this,t),o()(this,"schema",void 0),o()(this,"options",void 0),o()(this,"aggregator",null),o()(this,"batchCount",0),o()(this,"bytesUsed",0),o()(this,"isChunkComplete",!1),o()(this,"lastBatchEmittedMs",Date.now()),o()(this,"totalLength",0),o()(this,"totalBytes",0),o()(this,"rowBytes",0),this.schema=e,this.options=nt(nt({},ot),r)}return f()(t,[{key:"limitReached",value:function(){var t,e;return!!(Boolean(null===(t=this.options)||void 0===t?void 0:t.limit)&&this.totalLength>=this.options.limit)||!!(Boolean(null===(e=this.options)||void 0===e?void 0:e._limitMB)&&this.totalBytes/1e6>=this.options._limitMB)}},{key:"addRow",value:function(t){this.limitReached()||(this.totalLength++,this.rowBytes=this.rowBytes||this._estimateRowMB(t),this.totalBytes+=this.rowBytes,Array.isArray(t)?this.addArrayRow(t):this.addObjectRow(t))}},{key:"addArrayRow",value:function(t){if(!this.aggregator){var e=this._getTableBatchType();this.aggregator=new e(this.schema,this.options)}this.aggregator.addArrayRow(t)}},{key:"addObjectRow",value:function(t){if(!this.aggregator){var e=this._getTableBatchType();this.aggregator=new e(this.schema,this.options)}this.aggregator.addObjectRow(t)}},{key:"chunkComplete",value:function(t){t instanceof ArrayBuffer&&(this.bytesUsed+=t.byteLength),"string"==typeof t&&(this.bytesUsed+=t.length),this.isChunkComplete=!0}},{key:"getFullBatch",value:function(t){return this._isFull()?this._getBatch(t):null}},{key:"getFinalBatch",value:function(t){return this._getBatch(t)}},{key:"_estimateRowMB",value:function(t){return Array.isArray(t)?8*t.length:8*Object.keys(t).length}},{key:"_isFull",value:function(){if(!this.aggregator||0===this.aggregator.rowCount())return!1;if("auto"===this.options.batchSize){if(!this.isChunkComplete)return!1}else if(this.options.batchSize>this.aggregator.rowCount())return!1;return!(this.options.batchDebounceMs>Date.now()-this.lastBatchEmittedMs)&&(this.isChunkComplete=!1,this.lastBatchEmittedMs=Date.now(),!0)}},{key:"_getBatch",value:function(t){if(!this.aggregator)return null;null!=t&&t.bytesUsed&&(this.bytesUsed=t.bytesUsed);var e=this.aggregator.getBatch();return e.count=this.batchCount,e.bytesUsed=this.bytesUsed,Object.assign(e,t),this.batchCount++,this.aggregator=null,e}},{key:"_getTableBatchType",value:function(){switch(this.options.shape){case"row-table":return W;case"array-row-table":case"object-row-table":return Q;case"columnar-table":return et;case"arrow-table":if(!t.ArrowBatch)throw new Error("TableBatchBuilder");return t.ArrowBatch;default:throw new Error("TableBatchBuilder")}}}]),t}();function st(t){return at.apply(this,arguments)}function at(){return(at=E()(u.a.mark((function t(e){var r,n,o,i,s,a,c,l,h,f=arguments;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=f.length>1&&void 0!==f[1]?f[1]:{},n=new TextDecoder(void 0,r),o=!0,i=!1,t.prev=4,a=L()(e);case 6:return t.next=8,A()(a.next());case 8:return c=t.sent,o=c.done,t.next=12,A()(c.value);case 12:if(l=t.sent,o){t.next=20;break}return h=l,t.next=17,"string"==typeof h?h:n.decode(h,{stream:!0});case 17:o=!0,t.next=6;break;case 20:t.next=26;break;case 22:t.prev=22,t.t0=t.catch(4),i=!0,s=t.t0;case 26:if(t.prev=26,t.prev=27,o||null==a.return){t.next=31;break}return t.next=31,A()(a.return());case 31:if(t.prev=31,!i){t.next=34;break}throw s;case 34:return t.finish(31);case 35:return t.finish(26);case 36:case"end":return t.stop()}}),t,null,[[4,22,26,36],[27,,31,35]])})))).apply(this,arguments)}o()(it,"ArrowBatch",void 0);var ut=r(8),ct=r.n(ut),lt=r(16),ht=r.n(lt),ft=r(17),pt=r.n(ft),dt=r(18),yt=r.n(dt),vt=r(11),gt=r.n(vt),bt=Number.MAX_SAFE_INTEGER,mt="debug"==={}.CDEBUG,wt={textNode:void 0,numberNode:""},xt=0,Ot={BEGIN:xt++,VALUE:xt++,OPEN_OBJECT:xt++,CLOSE_OBJECT:xt++,OPEN_ARRAY:xt++,CLOSE_ARRAY:xt++,TEXT_ESCAPE:xt++,STRING:xt++,BACKSLASH:xt++,END:xt++,OPEN_KEY:xt++,CLOSE_KEY:xt++,TRUE:xt++,TRUE2:xt++,TRUE3:xt++,FALSE:xt++,FALSE2:xt++,FALSE3:xt++,FALSE4:xt++,NULL:xt++,NULL2:xt++,NULL3:xt++,NUMBER_DECIMAL_POINT:xt++,NUMBER_DIGIT:xt++};for(var jt in Ot)Ot[Ot[jt]]=jt;xt=Ot;var _t=9,kt=10,At=13,Pt=32,Et=34,St=43,Lt=44,Ct=45,It=46,Nt=48,Rt=57,Mt=58,Bt=69,Ut=91,Tt=92,Ft=93,Dt=97,Jt=98,zt=101,Gt=102,Yt=108,Vt=110,Kt=114,$t=115,qt=116,Xt=117,Ht=123,Wt=125;var Qt=/[\\"\n]/g,Zt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l()(this,t),this._initialize(e)}return f()(t,[{key:"_initialize",value:function(t){this._clearBuffers(this),this.bufferCheckPosition=bt,this.q="",this.c="",this.p="",this.options=t||{},this.closed=!1,this.closedRoot=!1,this.sawRoot=!1,this.tag=null,this.error=null,this.state=xt.BEGIN,this.stack=new Array,this.position=this.column=0,this.line=1,this.slashed=!1,this.unicodeI=0,this.unicodeS=null,this.depth=0,"onready"in t&&(this.onready=t.onready),"onopenobject"in t&&(this.onopenobject=t.onopenobject),"onkey"in t&&(this.onkey=t.onkey),"oncloseobject"in t&&(this.oncloseobject=t.oncloseobject),"onopenarray"in t&&(this.onopenarray=t.onopenarray),"onclosearray"in t&&(this.onclosearray=t.onclosearray),"onvalue"in t&&(this.onvalue=t.onvalue),"onerror"in t&&(this.onerror=t.onerror),"onend"in t&&(this.onend=t.onend),"onchunkparsed"in t&&(this.onchunkparsed=t.onchunkparsed),te(this,"onready")}},{key:"_clearBuffers",value:function(){for(var t in wt)this[t]=wt[t]}},{key:"end",value:function(){return this.state===xt.VALUE&&0===this.depth||oe(this,"Unexpected end"),re(this),this.c="",this.closed=!0,te(this,"onend"),this._initialize(this.options),this}},{key:"resume",value:function(){return this.error=null,this}},{key:"close",value:function(){return this.write(null)}},{key:"write",value:function(t){if(this.error)throw this.error;if(this.closed)return oe(this,"Cannot write after close. Assign an onready handler.");if(null===t)return this.end();var e=0,r=t.charCodeAt(0),n=this.p;for(mt&&console.log("write -> ["+t+"]");r&&(n=r,this.c=r=t.charCodeAt(e++),n!==r?this.p=n:n=this.p,r);)switch(mt&&console.log(e,r,Ot[this.state]),this.position++,r===kt?(this.line++,this.column=0):this.column++,this.state){case xt.BEGIN:r===Ht?this.state=xt.OPEN_OBJECT:r===Ut?this.state=xt.OPEN_ARRAY:ie(r)||oe(this,"Non-whitespace before {[.");continue;case xt.OPEN_KEY:case xt.OPEN_OBJECT:if(ie(r))continue;if(this.state===xt.OPEN_KEY)this.stack.push(xt.CLOSE_KEY);else{if(r===Wt){te(this,"onopenobject"),this.depth++,te(this,"oncloseobject"),this.depth--,this.state=this.stack.pop()||xt.VALUE;continue}this.stack.push(xt.CLOSE_OBJECT)}r===Et?this.state=xt.STRING:oe(this,'Malformed object key should start with "');continue;case xt.CLOSE_KEY:case xt.CLOSE_OBJECT:if(ie(r))continue;this.state,xt.CLOSE_KEY;r===Mt?(this.state===xt.CLOSE_OBJECT?(this.stack.push(xt.CLOSE_OBJECT),re(this,"onopenobject"),this.depth++):re(this,"onkey"),this.state=xt.VALUE):r===Wt?(ee(this,"oncloseobject"),this.depth--,this.state=this.stack.pop()||xt.VALUE):r===Lt?(this.state===xt.CLOSE_OBJECT&&this.stack.push(xt.CLOSE_OBJECT),re(this),this.state=xt.OPEN_KEY):oe(this,"Bad object");continue;case xt.OPEN_ARRAY:case xt.VALUE:if(ie(r))continue;if(this.state===xt.OPEN_ARRAY){if(te(this,"onopenarray"),this.depth++,this.state=xt.VALUE,r===Ft){te(this,"onclosearray"),this.depth--,this.state=this.stack.pop()||xt.VALUE;continue}this.stack.push(xt.CLOSE_ARRAY)}r===Et?this.state=xt.STRING:r===Ht?this.state=xt.OPEN_OBJECT:r===Ut?this.state=xt.OPEN_ARRAY:r===qt?this.state=xt.TRUE:r===Gt?this.state=xt.FALSE:r===Vt?this.state=xt.NULL:r===Ct?this.numberNode+="-":Nt<=r&&r<=Rt?(this.numberNode+=String.fromCharCode(r),this.state=xt.NUMBER_DIGIT):oe(this,"Bad value");continue;case xt.CLOSE_ARRAY:if(r===Lt)this.stack.push(xt.CLOSE_ARRAY),re(this,"onvalue"),this.state=xt.VALUE;else if(r===Ft)ee(this,"onclosearray"),this.depth--,this.state=this.stack.pop()||xt.VALUE;else{if(ie(r))continue;oe(this,"Bad array")}continue;case xt.STRING:void 0===this.textNode&&(this.textNode="");var o=e-1,i=this.slashed,s=this.unicodeI;t:for(;;){for(mt&&console.log(e,r,Ot[this.state],i);s>0;)if(this.unicodeS+=String.fromCharCode(r),r=t.charCodeAt(e++),this.position++,4===s?(this.textNode+=String.fromCharCode(parseInt(this.unicodeS,16)),s=0,o=e-1):s++,!r)break t;if(r===Et&&!i){this.state=this.stack.pop()||xt.VALUE,this.textNode+=t.substring(o,e-1),this.position+=e-1-o;break}if(r===Tt&&!i&&(i=!0,this.textNode+=t.substring(o,e-1),this.position+=e-1-o,r=t.charCodeAt(e++),this.position++,!r))break;if(i){if(i=!1,r===Vt?this.textNode+="\n":r===Kt?this.textNode+="\r":r===qt?this.textNode+="\t":r===Gt?this.textNode+="\f":r===Jt?this.textNode+="\b":r===Xt?(s=1,this.unicodeS=""):this.textNode+=String.fromCharCode(r),r=t.charCodeAt(e++),this.position++,o=e-1,r)continue;break}Qt.lastIndex=e;var a=Qt.exec(t);if(null===a){e=t.length+1,this.textNode+=t.substring(o,e-1),this.position+=e-1-o;break}if(e=a.index+1,!(r=t.charCodeAt(a.index))){this.textNode+=t.substring(o,e-1),this.position+=e-1-o;break}}this.slashed=i,this.unicodeI=s;continue;case xt.TRUE:r===Kt?this.state=xt.TRUE2:oe(this,"Invalid true started with t"+r);continue;case xt.TRUE2:r===Xt?this.state=xt.TRUE3:oe(this,"Invalid true started with tr"+r);continue;case xt.TRUE3:r===zt?(te(this,"onvalue",!0),this.state=this.stack.pop()||xt.VALUE):oe(this,"Invalid true started with tru"+r);continue;case xt.FALSE:r===Dt?this.state=xt.FALSE2:oe(this,"Invalid false started with f"+r);continue;case xt.FALSE2:r===Yt?this.state=xt.FALSE3:oe(this,"Invalid false started with fa"+r);continue;case xt.FALSE3:r===$t?this.state=xt.FALSE4:oe(this,"Invalid false started with fal"+r);continue;case xt.FALSE4:r===zt?(te(this,"onvalue",!1),this.state=this.stack.pop()||xt.VALUE):oe(this,"Invalid false started with fals"+r);continue;case xt.NULL:r===Xt?this.state=xt.NULL2:oe(this,"Invalid null started with n"+r);continue;case xt.NULL2:r===Yt?this.state=xt.NULL3:oe(this,"Invalid null started with nu"+r);continue;case xt.NULL3:r===Yt?(te(this,"onvalue",null),this.state=this.stack.pop()||xt.VALUE):oe(this,"Invalid null started with nul"+r);continue;case xt.NUMBER_DECIMAL_POINT:r===It?(this.numberNode+=".",this.state=xt.NUMBER_DIGIT):oe(this,"Leading zero not followed by .");continue;case xt.NUMBER_DIGIT:Nt<=r&&r<=Rt?this.numberNode+=String.fromCharCode(r):r===It?(-1!==this.numberNode.indexOf(".")&&oe(this,"Invalid number has two dots"),this.numberNode+="."):r===zt||r===Bt?(-1===this.numberNode.indexOf("e")&&-1===this.numberNode.indexOf("E")||oe(this,"Invalid number has two exponential"),this.numberNode+="e"):r===St||r===Ct?(n!==zt&&n!==Bt&&oe(this,"Invalid symbol in number"),this.numberNode+=String.fromCharCode(r)):(ne(this),e--,this.state=this.stack.pop()||xt.VALUE);continue;default:oe(this,"Unknown state: "+this.state)}return this.position>=this.bufferCheckPosition&&function(t){var e=Math.max(bt,10),r=0;for(var n in wt){var o=void 0===t[n]?0:t[n].length;if(o>e)switch(n){case"text":closeText(t);break;default:oe(t,"Max buffer length exceeded: "+n)}r=Math.max(r,o)}t.bufferCheckPosition=bt-r+t.position}(this),te(this,"onchunkparsed"),this}}]),t}();function te(t,e,r){mt&&console.log("-- emit",e,r),t[e]&&t[e](r,t)}function ee(t,e,r){re(t),te(t,e,r)}function re(t,e){t.textNode=function(t,e){if(void 0===e)return e;t.trim&&(e=e.trim());t.normalize&&(e=e.replace(/\s+/g," "));return e}(t.options,t.textNode),void 0!==t.textNode&&te(t,e||"onvalue",t.textNode),t.textNode=void 0}function ne(t){t.numberNode&&te(t,"onvalue",parseFloat(t.numberNode)),t.numberNode=""}function oe(t,e){return re(t),e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c,e=new Error(e),t.error=e,te(t,"onerror",e),t}function ie(t){return t===At||t===kt||t===Pt||t===_t}function se(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return ae(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ae(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function ae(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ue=function(){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(l()(this,t),o()(this,"path",void 0),this.path=["$"],r instanceof t)this.path=I()(r.path);else if(Array.isArray(r))(e=this.path).push.apply(e,I()(r));else if("string"==typeof r&&(this.path=r.split("."),"$"!==this.path[0]))throw new Error("JSONPaths must start with $")}return f()(t,[{key:"clone",value:function(){return new t(this)}},{key:"toString",value:function(){return this.path.join(".")}},{key:"push",value:function(t){this.path.push(t)}},{key:"pop",value:function(){return this.path.pop()}},{key:"set",value:function(t){this.path[this.path.length-1]=t}},{key:"equals",value:function(t){if(!this||!t||this.path.length!==t.path.length)return!1;for(var e=0;e<this.path.length;++e)if(this.path[e]!==t.path[e])return!1;return!0}},{key:"setFieldAtPath",value:function(t,e){var r=I()(this.path);r.shift();var n,o=r.pop(),i=se(r);try{for(i.s();!(n=i.n()).done;){t=t[n.value]}}catch(t){i.e(t)}finally{i.f()}t[o]=e}},{key:"getFieldAtPath",value:function(t){var e=I()(this.path);e.shift();var r,n=e.pop(),o=se(e);try{for(o.s();!(r=o.n()).done;){t=t[r.value]}}catch(t){o.e(t)}finally{o.f()}return t[n]}}]),t}();function ce(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return le(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return le(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function le(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function he(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=gt()(t);if(e){var o=gt()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return yt()(this,r)}}var fe=function(t){pt()(r,t);var e=he(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l()(this,r),t=e.call(this),o()(ct()(t),"jsonPaths",void 0),o()(ct()(t),"streamingJsonPath",null),o()(ct()(t),"streamingArray",null),o()(ct()(t),"topLevelObject",null);var i=n.jsonpaths||[];return t.jsonPaths=i.map((function(t){return new ue(t)})),t._extendParser(),t}return f()(r,[{key:"write",value:function(t){ht()(gt()(r.prototype),"write",this).call(this,t);var e=[];return this.streamingArray&&(e=I()(this.streamingArray),this.streamingArray.length=0),e}},{key:"getPartialResult",value:function(){return this.topLevelObject}},{key:"getStreamingJsonPath",value:function(){return this.streamingJsonPath}},{key:"getStreamingJsonPathAsString",value:function(){return this.streamingJsonPath&&this.streamingJsonPath.toString()}},{key:"getJsonPath",value:function(){return this.jsonpath}},{key:"_matchJSONPath",value:function(){var t=this.getJsonPath();if(0===this.jsonPaths.length)return!0;var e,r=ce(this.jsonPaths);try{for(r.s();!(e=r.n()).done;){if(e.value.equals(t))return!0}}catch(t){r.e(t)}finally{r.f()}return!1}},{key:"_extendParser",value:function(){var t=this;this.parser.onopenarray=function(){if(!t.streamingArray&&t._matchJSONPath())return t.streamingJsonPath=t.getJsonPath().clone(),t.streamingArray=[],void t._openArray(t.streamingArray);t._openArray()},this.parser.onopenobject=function(e){t.topLevelObject?t._openObject({}):(t.topLevelObject={},t._openObject(t.topLevelObject)),void 0!==e&&t.parser.onkey(e)}}}]),r}(function(){function t(){l()(this,t),o()(this,"jsonpath",void 0),o()(this,"_parser",void 0),this.reset(),this._initializeParser()}return f()(t,[{key:"reset",value:function(){this.result=void 0,this.previousStates=[],this.currentState=Object.freeze({container:[],key:null}),this.jsonpath=new ue}},{key:"write",value:function(t){this.parser.write(t)}},{key:"close",value:function(){this.parser.close()}},{key:"_pushOrSet",value:function(t){var e=this.currentState,r=e.container,n=e.key;null!==n?(r[n]=t,this.currentState.key=null):r.push(t)}},{key:"_openArray",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.jsonpath.push(null),this._pushOrSet(t),this.previousStates.push(this.currentState),this.currentState={container:t,isArray:!0,key:null}}},{key:"_closeArray",value:function(){this.jsonpath.pop(),this.currentState=this.previousStates.pop()}},{key:"_openObject",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.jsonpath.push(null),this._pushOrSet(t),this.previousStates.push(this.currentState),this.currentState={container:t,isArray:!1,key:null}}},{key:"_closeObject",value:function(){this.jsonpath.pop(),this.currentState=this.previousStates.pop()}},{key:"_initializeParser",value:function(){var t=this;this._parser=new Zt({onready:function(){t.jsonpath=new ue,t.previousStates.length=0,t.currentState.container.length=0},onopenobject:function(e){t._openObject({}),void 0!==e&&t.parser.onkey(e)},onkey:function(e){t.jsonpath.set(e),t.currentState.key=e},oncloseobject:function(){t._closeObject()},onopenarray:function(){t._openArray()},onclosearray:function(){t._closeArray()},onvalue:function(e){t._pushOrSet(e)},onerror:function(t){throw t},onend:function(){t.result=t.currentState.container.pop()}})}},{key:"parser",get:function(){return this._parser}}]),t}());function pe(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return de(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return de(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function de(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ye(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ve(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ye(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ye(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ge(){return(ge=E()(u.a.mark((function t(e,r){var n,o,i,s,a,c,l,h,f,p,d,y,v,g,b,m,w,x,O,j,_,k,P,E,S,C,I;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=st(e),i=r.metadata,s=r.json||{},a=s.jsonpaths,c=!0,null,l=(null==r||null===(n=r.json)||void 0===n?void 0:n.shape)||"row-table",h=new it(null,ve(ve({},r),{},{shape:l})),f=new fe({jsonpaths:a}),p=!0,d=!1,t.prev=10,v=L()(o);case 12:return t.next=14,A()(v.next());case 14:return g=t.sent,p=g.done,t.next=18,A()(g.value);case 18:if(b=t.sent,p){t.next=57;break}if(m=b,w=f.write(m),x=w.length>0&&f.getStreamingJsonPathAsString(),!(w.length>0&&c)){t.next=29;break}if(!i){t.next=28;break}return O={shape:l,batchType:"partial-result",data:[],length:0,bytesUsed:0,container:f.getPartialResult(),jsonpath:x},t.next=28,O;case 28:c=!1;case 29:j=pe(w),t.prev=30,j.s();case 32:if((_=j.n()).done){t.next=41;break}if(k=_.value,h.addRow(k),!(P=h.getFullBatch({jsonpath:x}))){t.next=39;break}return t.next=39,P;case 39:t.next=32;break;case 41:t.next=46;break;case 43:t.prev=43,t.t0=t.catch(30),j.e(t.t0);case 46:return t.prev=46,j.f(),t.finish(46);case 49:if(h.chunkComplete(m),!(E=h.getFullBatch({jsonpath:x}))){t.next=54;break}return t.next=54,E;case 54:p=!0,t.next=12;break;case 57:t.next=63;break;case 59:t.prev=59,t.t1=t.catch(10),d=!0,y=t.t1;case 63:if(t.prev=63,t.prev=64,p||null==v.return){t.next=68;break}return t.next=68,A()(v.return());case 68:if(t.prev=68,!d){t.next=71;break}throw y;case 71:return t.finish(68);case 72:return t.finish(63);case 73:if(S=f.getStreamingJsonPathAsString(),!(C=h.getFinalBatch({jsonpath:S}))){t.next=78;break}return t.next=78,C;case 78:if(!i){t.next=82;break}return I={shape:l,batchType:"final-result",container:f.getPartialResult(),jsonpath:f.getStreamingJsonPathAsString(),data:[],length:0},t.next=82,I;case 82:case"end":return t.stop()}}),t,null,[[10,59,63,73],[30,43,46,49],[64,,68,72]])})))).apply(this,arguments)}function be(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function me(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?be(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var we,xe={geojson:{shape:"object-row-table"},json:{jsonpaths:["$","$.features"]},gis:{format:"geojson"}},Oe=me(me({},{name:"GeoJSON",id:"geojson",module:"geojson",version:"3.0.13",worker:!0,extensions:["geojson"],mimeTypes:["application/geo+json"],category:"geometry",text:!0,options:xe}),{},{parse:function(t,e){return je.apply(this,arguments)},parseTextSync:_e,parseInBatches:function(t,e){(e=me(me({},xe),e)).json=me(me({},xe.geojson),e.geojson);var r=function(t,e){return ge.apply(this,arguments)}(t,e);switch(e.gis.format){case"binary":return function(t){return ke.apply(this,arguments)}(r);default:return r}}});function je(){return(je=s()(u.a.mark((function t(e,r){return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",_e((new TextDecoder).decode(e),r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function _e(t,e){(e=me(me({},xe),e)).json=me(me({},xe.geojson),e.geojson),e.gis=e.gis||{};var r=H(t,e);switch(e.gis.format){case"binary":return U(r);default:return r}}function ke(){return(ke=E()(u.a.mark((function t(e){var r,n,o,i,s,a,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=!0,n=!1,t.prev=2,i=L()(e);case 4:return t.next=6,A()(i.next());case 6:return s=t.sent,r=s.done,t.next=10,A()(s.value);case 10:if(a=t.sent,r){t.next=19;break}return(c=a).data=U(c.data),t.next=16,c;case 16:r=!0,t.next=4;break;case 19:t.next=25;break;case 21:t.prev=21,t.t0=t.catch(2),n=!0,o=t.t0;case 25:if(t.prev=25,t.prev=26,r||null==i.return){t.next=30;break}return t.next=30,A()(i.return());case 30:if(t.prev=30,!n){t.next=33;break}throw o;case 33:return t.finish(30);case 34:return t.finish(25);case 35:case"end":return t.stop()}}),t,null,[[2,21,25,35],[26,,30,34]])})))).apply(this,arguments)}we=Oe,"undefined"!=typeof self&&(g.onmessage=function(){var t=s()(u.a.mark((function t(e,r){var n,o,i,s,a;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="process"===t.t0?3:16;break;case 3:return t.prev=3,n=r.input,o=r.options,i=void 0===o?{}:o,t.next=7,j({loader:we,arrayBuffer:n,options:i,context:{parse:O}});case 7:s=t.sent,g.postMessage("done",{result:s}),t.next=15;break;case 11:t.prev=11,t.t1=t.catch(3),a=t.t1 instanceof Error?t.t1.message:"",g.postMessage("error",{error:a});case 15:return t.abrupt("break",16);case 16:case"end":return t.stop()}}),t,null,[[3,11]])})));return function(e,r){return t.apply(this,arguments)}}())}]);
1
+ !function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=30)}([function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){t.exports=r(20)},function(t,e,r){var n=r(12);t.exports=function(t){return new n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(22),o=r(23),i=r(14),s=r(24);t.exports=function(t){return n(t)||o(t)||i(t)||s()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(21);t.exports=function(t){return function(){return new n(t.apply(this,arguments))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){var e;if("undefined"!=typeof Symbol&&(Symbol.asyncIterator&&(e=t[Symbol.asyncIterator]),null==e&&Symbol.iterator&&(e=t[Symbol.iterator])),null==e&&(e=t["@@asyncIterator"]),null==e&&(e=t["@@iterator"]),null==e)throw new TypeError("Object is not async iterable");return e.call(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=r=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),r(e)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(t,e,r,n,o,i,s){try{var a=t[i](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var s=t.apply(e,n);function a(t){r(s,o,i,a,u,"next",t)}function u(t){r(s,o,i,a,u,"throw",t)}a(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,r(e)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){this.wrapped=t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(13);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(25),o=r(26),i=r(14),s=r(27);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||s()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(28);function o(e,r,i){return"undefined"!=typeof Reflect&&Reflect.get?(t.exports=o=Reflect.get,t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=o=function(t,e,r){var o=n(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(r):i.value}},t.exports.default=t.exports,t.exports.__esModule=!0),o(e,r,i||e)}t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(29);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(9).default,o=r(8);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?o(t):e},t.exports.default=t.exports,t.exports.__esModule=!0},,function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function a(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),s=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===l)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,s),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function f(){}function p(){}var d={};d[o]=function(){return this};var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(d=v);var g=p.prototype=h.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,i){function s(){return new e((function(n,s){!function n(o,i,s,a){var u=c(t[o],t,i);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,a)}))}a(u.arg)}(o,i,n,s)}))}return n=n?n.then(s,s):s()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=g.constructor=p,p.constructor=f,f.displayName=a(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(m.prototype),m.prototype[i]=function(){return this},t.AsyncIterator=m,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var s=new m(u(e,r,n,o),i);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(g),a(g,s,"Generator"),g[o]=function(){return this},g.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,r){var n=r(12);function o(t){var e,r;function o(e,r){try{var s=t[e](r),a=s.value,u=a instanceof n;Promise.resolve(u?a.wrapped:a).then((function(t){u?o("return"===e?"return":"next",t):i(s.done?"return":"normal",t)}),(function(t){o("throw",t)}))}catch(t){i("throw",t)}}function i(t,n){switch(t){case"return":e.resolve({value:n,done:!0});break;case"throw":e.reject(n);break;default:e.resolve({value:n,done:!1})}(e=e.next)?o(e.key,e.arg):r=null}this._invoke=function(t,n){return new Promise((function(i,s){var a={key:t,arg:n,resolve:i,reject:s,next:null};r?r=r.next=a:(e=r=a,o(t,n))}))},"function"!=typeof t.return&&(this.return=void 0)}o.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},o.prototype.next=function(t){return this._invoke("next",t)},o.prototype.throw=function(t){return this._invoke("throw",t)},o.prototype.return=function(t){return this._invoke("return",t)},t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(13);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null!=r){var n,o,i=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);s=!0);}catch(t){a=!0,o=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(11);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=n(t)););return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,r(e,n)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){"use strict";r.r(e);var n=r(0),o=r.n(n),i=r(10),s=r.n(i),a=r(1),u=r.n(a),c=r(3),l=r.n(c),h=r(4),f=r.n(h),p=r(9),d=r.n(p);function y(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}var v=new Map,g=function(){function t(){l()(this,t)}return f()(t,null,[{key:"onmessage",set:function(t){self.onmessage=function(e){if(b(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}}},{key:"addEventListener",value:function(t){var e=v.get(t);e||(e=function(e){if(b(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}),self.addEventListener("message",e)}},{key:"removeEventListener",value:function(t){var e=v.get(t);v.delete(t),self.removeEventListener("message",e)}},{key:"postMessage",value:function(t,e){if(self){var r={source:"loaders.gl",type:t,payload:e},n=function t(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,o=n||new Set;if(e){if(y(e))o.add(e);else if(y(e.buffer))o.add(e.buffer);else if(ArrayBuffer.isView(e));else if(r&&"object"===d()(e))for(var i in e)t(e[i],r,o)}else;return void 0===n?Array.from(o):[]}(e);self.postMessage(r,n)}}}]),t}();function b(t){var e=t.type,r=t.data;return"message"===e&&r&&"string"==typeof r.source&&r.source.startsWith("loaders.gl")}function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var x=0;function O(t,e){return new Promise((function(r,n){var o=x++;g.addEventListener((function t(e,i){if(i.id===o)switch(e){case"done":g.removeEventListener(t),r(i.result);break;case"error":g.removeEventListener(t),n(i.error)}}));var i={id:o,input:t,options:e};g.postMessage("process",i)}))}function j(t){return _.apply(this,arguments)}function _(){return(_=s()(u.a.mark((function t(e){var r,n,o,i,s,a,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.loader,n=e.arrayBuffer,o=e.options,i=e.context,!r.parseSync&&!r.parse){t.next=6;break}s=n,a=r.parseSync||r.parse,t.next=13;break;case 6:if(!r.parseTextSync){t.next=12;break}c=new TextDecoder,s=c.decode(n),a=r.parseTextSync,t.next=13;break;case 12:throw new Error("Could not load data with ".concat(r.name," loader"));case 13:return o=w(w({},o),{},{modules:r&&r.options&&r.options.modules||{},worker:!1}),t.next=16,a(s,w({},o),i,r);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var k=r(2),A=r.n(k),P=r(6),E=r.n(P),S=r(7),L=r.n(S),C=r(5),I=r.n(C);function N(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function R(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?N(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function M(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return B(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return B(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function U(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=T(t);return F(t,r,{coordLength:e.coordLength||r.coordLength,numericPropKeys:e.numericPropKeys||r.numericPropKeys,PositionDataType:e.PositionDataType||Float32Array})}function T(t){var e,r,n=0,o=0,i=0,s=0,a=0,u=0,c=0,l=0,h=0,f=new Set,p={},d=M(t);try{for(d.s();!(e=d.n()).done;){var y=e.value,v=y.geometry;switch(v.type){case"Point":o++,n++,f.add(v.coordinates.length);break;case"MultiPoint":o++,n+=v.coordinates.length;var g,b=M(v.coordinates);try{for(b.s();!(g=b.n()).done;){var m=g.value;f.add(m.length)}}catch(t){b.e(t)}finally{b.f()}break;case"LineString":a++,i+=v.coordinates.length,s++;var w,x=M(v.coordinates);try{for(x.s();!(w=x.n()).done;){var O=w.value;f.add(O.length)}}catch(t){x.e(t)}finally{x.f()}break;case"MultiLineString":a++;var j,_=M(v.coordinates);try{for(_.s();!(j=_.n()).done;){var k=j.value;i+=k.length,s++;var A,P=M(k);try{for(P.s();!(A=P.n()).done;){var E=A.value;f.add(E.length)}}catch(t){P.e(t)}finally{P.f()}}}catch(t){_.e(t)}finally{_.f()}break;case"Polygon":h++,c++,l+=v.coordinates.length,u+=X(v.coordinates).length;var S,L=M(X(v.coordinates));try{for(L.s();!(S=L.n()).done;){var C=S.value;f.add(C.length)}}catch(t){L.e(t)}finally{L.f()}break;case"MultiPolygon":h++;var N,R=M(v.coordinates);try{for(R.s();!(N=R.n()).done;){var B=N.value;c++,l+=B.length,u+=X(B).length;var U,T=M(X(B));try{for(T.s();!(U=T.n()).done;){var F=U.value;f.add(F.length)}}catch(t){T.e(t)}finally{T.f()}}}catch(t){R.e(t)}finally{R.f()}break;default:throw new Error("Unsupported geometry type: ".concat(v.type))}if(y.properties)for(var D in y.properties){var J=y.properties[D];p[D]=p[D]||void 0===p[D]?(r=J,Number.isFinite(r)):p[D]}}}catch(t){d.e(t)}finally{d.f()}return{coordLength:f.size>0?Math.max.apply(Math,I()(f)):2,pointPositionsCount:n,pointFeaturesCount:o,linePositionsCount:i,linePathsCount:s,lineFeaturesCount:a,polygonPositionsCount:u,polygonObjectsCount:c,polygonRingsCount:l,polygonFeaturesCount:h,numericPropKeys:Object.keys(p).filter((function(t){return p[t]}))}}function F(t,e,r){for(var n=e.pointPositionsCount,o=e.pointFeaturesCount,i=e.linePositionsCount,s=e.linePathsCount,a=e.lineFeaturesCount,u=e.polygonPositionsCount,c=e.polygonObjectsCount,l=e.polygonRingsCount,h=e.polygonFeaturesCount,f=r.coordLength,p=r.numericPropKeys,d=r.PositionDataType,y=void 0===d?Float32Array:d,v=t.length>65535?Uint32Array:Uint16Array,g={positions:new y(n*f),globalFeatureIds:new v(n),featureIds:o>65535?new Uint32Array(n):new Uint16Array(n),numericProps:{},properties:Array(),fields:Array()},b={positions:new y(i*f),pathIndices:i>65535?new Uint32Array(s+1):new Uint16Array(s+1),globalFeatureIds:new v(i),featureIds:a>65535?new Uint32Array(i):new Uint16Array(i),numericProps:{},properties:Array(),fields:Array()},m={positions:new y(u*f),polygonIndices:u>65535?new Uint32Array(c+1):new Uint16Array(c+1),primitivePolygonIndices:u>65535?new Uint32Array(l+1):new Uint16Array(l+1),globalFeatureIds:new v(u),featureIds:h>65535?new Uint32Array(u):new Uint16Array(u),numericProps:{},properties:Array(),fields:Array()},w=0,x=[g,b,m];w<x.length;w++){var O,j=x[w],_=M(p||[]);try{for(_.s();!(O=_.n()).done;){var k=O.value;j.numericProps[k]=new Float32Array(j.positions.length/f)}}catch(t){_.e(t)}finally{_.f()}}b.pathIndices[s]=i,m.polygonIndices[c]=u,m.primitivePolygonIndices[l]=u;var A,P={pointPosition:0,pointFeature:0,linePosition:0,linePath:0,lineFeature:0,polygonPosition:0,polygonObject:0,polygonRing:0,polygonFeature:0,feature:0},E=M(t);try{for(E.s();!(A=E.n()).done;){var S=A.value,L=S.geometry,C=S.properties||{};switch(L.type){case"Point":D(L.coordinates,g,P,f,C),g.properties.push($(C,p)),P.pointFeature++;break;case"MultiPoint":J(L.coordinates,g,P,f,C),g.properties.push($(C,p)),P.pointFeature++;break;case"LineString":z(L.coordinates,b,P,f,C),b.properties.push($(C,p)),P.lineFeature++;break;case"MultiLineString":G(L.coordinates,b,P,f,C),b.properties.push($(C,p)),P.lineFeature++;break;case"Polygon":Y(L.coordinates,m,P,f,C),m.properties.push($(C,p)),P.polygonFeature++;break;case"MultiPolygon":V(L.coordinates,m,P,f,C),m.properties.push($(C,p)),P.polygonFeature++;break;default:throw new Error("Invalid geometry type")}P.feature++}}catch(t){E.e(t)}finally{E.f()}return function(t,e,r,n){var o={points:R(R({},t),{},{positions:{value:t.positions,size:n},globalFeatureIds:{value:t.globalFeatureIds,size:1},featureIds:{value:t.featureIds,size:1},type:"Point"}),lines:R(R({},e),{},{pathIndices:{value:e.pathIndices,size:1},positions:{value:e.positions,size:n},globalFeatureIds:{value:e.globalFeatureIds,size:1},featureIds:{value:e.featureIds,size:1},type:"LineString"}),polygons:R(R({},r),{},{polygonIndices:{value:r.polygonIndices,size:1},primitivePolygonIndices:{value:r.primitivePolygonIndices,size:1},positions:{value:r.positions,size:n},globalFeatureIds:{value:r.globalFeatureIds,size:1},featureIds:{value:r.featureIds,size:1},type:"Polygon"})};for(var i in o)for(var s in o[i].numericProps)o[i].numericProps[s]={value:o[i].numericProps[s],size:1};return o}(g,b,m,f)}function D(t,e,r,n,o){e.positions.set(t,r.pointPosition*n),e.globalFeatureIds[r.pointPosition]=r.feature,e.featureIds[r.pointPosition]=r.pointFeature,K(e,o,r.pointPosition,1),r.pointPosition++}function J(t,e,r,n,o){var i,s=M(t);try{for(s.s();!(i=s.n()).done;){D(i.value,e,r,n,o)}}catch(t){s.e(t)}finally{s.f()}}function z(t,e,r,n,o){e.pathIndices[r.linePath]=r.linePosition,r.linePath++,q(e.positions,t,r.linePosition,n);var i=t.length;K(e,o,r.linePosition,i),e.globalFeatureIds.set(new Uint32Array(i).fill(r.feature),r.linePosition),e.featureIds.set(new Uint32Array(i).fill(r.lineFeature),r.linePosition),r.linePosition+=i}function G(t,e,r,n,o){var i,s=M(t);try{for(s.s();!(i=s.n()).done;){z(i.value,e,r,n,o)}}catch(t){s.e(t)}finally{s.f()}}function Y(t,e,r,n,o){e.polygonIndices[r.polygonObject]=r.polygonPosition,r.polygonObject++;var i,s=M(t);try{for(s.s();!(i=s.n()).done;){var a=i.value;e.primitivePolygonIndices[r.polygonRing]=r.polygonPosition,r.polygonRing++,q(e.positions,a,r.polygonPosition,n);var u=a.length;K(e,o,r.polygonPosition,u),e.globalFeatureIds.set(new Uint32Array(u).fill(r.feature),r.polygonPosition),e.featureIds.set(new Uint32Array(u).fill(r.polygonFeature),r.polygonPosition),r.polygonPosition+=u}}catch(t){s.e(t)}finally{s.f()}}function V(t,e,r,n,o){var i,s=M(t);try{for(s.s();!(i=s.n()).done;){Y(i.value,e,r,n,o)}}catch(t){s.e(t)}finally{s.f()}}function K(t,e,r,n){for(var o in t.numericProps)o in e&&t.numericProps[o].set(new Array(n).fill(e[o]),r)}function $(t,e){var r={};for(var n in t)e.includes(n)||(r[n]=t[n]);return r}function q(t,e,r,n){var o,i=r*n,s=M(e);try{for(s.s();!(o=s.n()).done;){var a=o.value;t.set(a,i),i+=n}}catch(t){s.e(t)}finally{s.f()}}function X(t){var e;return(e=[]).concat.apply(e,I()(t))}function H(t,e){try{var r,n=JSON.parse(t);return null!==(r=e.json)&&void 0!==r&&r.table&&function t(e){if(Array.isArray(e))return e;if(e&&"object"===d()(e))for(var r=0,n=Object.values(e);r<n.length;r++){var o=n[r],i=t(o);if(i)return i}return null}(n)||n}catch(t){throw new Error("JSONLoader: failed to parse JSON")}}var W=function(){function t(e,r){if(l()(this,t),o()(this,"schema",void 0),o()(this,"options",void 0),o()(this,"length",0),o()(this,"rows",null),o()(this,"cursor",0),o()(this,"_headers",[]),this.options=r,this.schema=e,!Array.isArray(e))for(var n in this._headers=[],e)this._headers[e[n].index]=e[n].name}return f()(t,[{key:"rowCount",value:function(){return this.length}},{key:"addArrayRow",value:function(t,e){Number.isFinite(e)&&(this.cursor=e),this.rows=this.rows||new Array(100),this.rows[this.length]=t,this.length++}},{key:"addObjectRow",value:function(t,e){Number.isFinite(e)&&(this.cursor=e),this.rows=this.rows||new Array(100),this.rows[this.length]=t,this.length++}},{key:"getBatch",value:function(){var t=this.rows;return t?(t=t.slice(0,this.length),this.rows=null,{shape:this.options.shape,batchType:"data",data:t,length:this.length,schema:this.schema,cursor:this.cursor}):null}}]),t}();var Q=function(){function t(e,r){if(l()(this,t),o()(this,"schema",void 0),o()(this,"options",void 0),o()(this,"length",0),o()(this,"objectRows",null),o()(this,"arrayRows",null),o()(this,"cursor",0),o()(this,"_headers",[]),this.options=r,this.schema=e,!Array.isArray(e))for(var n in this._headers=[],e)this._headers[e[n].index]=e[n].name}return f()(t,[{key:"rowCount",value:function(){return this.length}},{key:"addArrayRow",value:function(t,e){switch(Number.isFinite(e)&&(this.cursor=e),this.options.shape){case"object-row-table":var r=function(t,e){if(!t)throw new Error("null row");if(!e)throw new Error("no headers");for(var r={},n=0;n<e.length;n++)r[e[n]]=t[n];return r}(t,this._headers);this.addObjectRow(r,e);break;case"array-row-table":this.arrayRows=this.arrayRows||new Array(100),this.arrayRows[this.length]=t,this.length++}}},{key:"addObjectRow",value:function(t,e){switch(Number.isFinite(e)&&(this.cursor=e),this.options.shape){case"array-row-table":var r=function(t,e){if(!t)throw new Error("null row");if(!e)throw new Error("no headers");for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]=t[e[n]];return r}(t,this._headers);this.addArrayRow(r,e);break;case"object-row-table":this.objectRows=this.objectRows||new Array(100),this.objectRows[this.length]=t,this.length++}}},{key:"getBatch",value:function(){var t=this.arrayRows||this.objectRows;return t?(t=t.slice(0,this.length),this.arrayRows=null,this.objectRows=null,{shape:this.options.shape,batchType:"data",data:t,length:this.length,schema:this.schema,cursor:this.cursor}):null}}]),t}(),Z=r(15),tt=r.n(Z),et=function(){function t(e,r){l()(this,t),o()(this,"schema",void 0),o()(this,"length",0),o()(this,"allocated",0),o()(this,"columns",{}),this.schema=e,this._reallocateColumns()}return f()(t,[{key:"rowCount",value:function(){return this.length}},{key:"addArrayRow",value:function(t){this._reallocateColumns();var e=0;for(var r in this.columns)this.columns[r][this.length]=t[e++];this.length++}},{key:"addObjectRow",value:function(t){for(var e in this._reallocateColumns(),t)this.columns[e][this.length]=t[e];this.length++}},{key:"getBatch",value:function(){this._pruneColumns();var t=Array.isArray(this.schema)?this.columns:{};if(!Array.isArray(this.schema))for(var e in this.schema){var r=this.schema[e];t[r.name]=this.columns[r.index]}return this.columns={},{shape:"columnar-table",batchType:"data",data:t,schema:this.schema,length:this.length}}},{key:"_reallocateColumns",value:function(){if(!(this.length<this.allocated))for(var t in this.allocated=this.allocated>0?this.allocated*=2:100,this.columns={},this.schema){var e=this.schema[t],r=e.type||Float32Array,n=this.columns[e.index];if(n&&ArrayBuffer.isView(n)){var o=new r(this.allocated);o.set(n),this.columns[e.index]=o}else n?(n.length=this.allocated,this.columns[e.index]=n):this.columns[e.index]=new r(this.allocated)}}},{key:"_pruneColumns",value:function(){for(var t=0,e=Object.entries(this.columns);t<e.length;t++){var r=tt()(e[t],2),n=r[0],o=r[1];this.columns[n]=o.slice(0,this.length)}}}]),t}();function rt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function nt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?rt(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var ot={shape:"array-row-table",batchSize:"auto",batchDebounceMs:0,limit:0,_limitMB:0},it=function(){function t(e,r){l()(this,t),o()(this,"schema",void 0),o()(this,"options",void 0),o()(this,"aggregator",null),o()(this,"batchCount",0),o()(this,"bytesUsed",0),o()(this,"isChunkComplete",!1),o()(this,"lastBatchEmittedMs",Date.now()),o()(this,"totalLength",0),o()(this,"totalBytes",0),o()(this,"rowBytes",0),this.schema=e,this.options=nt(nt({},ot),r)}return f()(t,[{key:"limitReached",value:function(){var t,e;return!!(Boolean(null===(t=this.options)||void 0===t?void 0:t.limit)&&this.totalLength>=this.options.limit)||!!(Boolean(null===(e=this.options)||void 0===e?void 0:e._limitMB)&&this.totalBytes/1e6>=this.options._limitMB)}},{key:"addRow",value:function(t){this.limitReached()||(this.totalLength++,this.rowBytes=this.rowBytes||this._estimateRowMB(t),this.totalBytes+=this.rowBytes,Array.isArray(t)?this.addArrayRow(t):this.addObjectRow(t))}},{key:"addArrayRow",value:function(t){if(!this.aggregator){var e=this._getTableBatchType();this.aggregator=new e(this.schema,this.options)}this.aggregator.addArrayRow(t)}},{key:"addObjectRow",value:function(t){if(!this.aggregator){var e=this._getTableBatchType();this.aggregator=new e(this.schema,this.options)}this.aggregator.addObjectRow(t)}},{key:"chunkComplete",value:function(t){t instanceof ArrayBuffer&&(this.bytesUsed+=t.byteLength),"string"==typeof t&&(this.bytesUsed+=t.length),this.isChunkComplete=!0}},{key:"getFullBatch",value:function(t){return this._isFull()?this._getBatch(t):null}},{key:"getFinalBatch",value:function(t){return this._getBatch(t)}},{key:"_estimateRowMB",value:function(t){return Array.isArray(t)?8*t.length:8*Object.keys(t).length}},{key:"_isFull",value:function(){if(!this.aggregator||0===this.aggregator.rowCount())return!1;if("auto"===this.options.batchSize){if(!this.isChunkComplete)return!1}else if(this.options.batchSize>this.aggregator.rowCount())return!1;return!(this.options.batchDebounceMs>Date.now()-this.lastBatchEmittedMs)&&(this.isChunkComplete=!1,this.lastBatchEmittedMs=Date.now(),!0)}},{key:"_getBatch",value:function(t){if(!this.aggregator)return null;null!=t&&t.bytesUsed&&(this.bytesUsed=t.bytesUsed);var e=this.aggregator.getBatch();return e.count=this.batchCount,e.bytesUsed=this.bytesUsed,Object.assign(e,t),this.batchCount++,this.aggregator=null,e}},{key:"_getTableBatchType",value:function(){switch(this.options.shape){case"row-table":return W;case"array-row-table":case"object-row-table":return Q;case"columnar-table":return et;case"arrow-table":if(!t.ArrowBatch)throw new Error("TableBatchBuilder");return t.ArrowBatch;default:throw new Error("TableBatchBuilder")}}}]),t}();function st(t){return at.apply(this,arguments)}function at(){return(at=E()(u.a.mark((function t(e){var r,n,o,i,s,a,c,l,h,f=arguments;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=f.length>1&&void 0!==f[1]?f[1]:{},n=new TextDecoder(void 0,r),o=!0,i=!1,t.prev=4,a=L()(e);case 6:return t.next=8,A()(a.next());case 8:return c=t.sent,o=c.done,t.next=12,A()(c.value);case 12:if(l=t.sent,o){t.next=20;break}return h=l,t.next=17,"string"==typeof h?h:n.decode(h,{stream:!0});case 17:o=!0,t.next=6;break;case 20:t.next=26;break;case 22:t.prev=22,t.t0=t.catch(4),i=!0,s=t.t0;case 26:if(t.prev=26,t.prev=27,o||null==a.return){t.next=31;break}return t.next=31,A()(a.return());case 31:if(t.prev=31,!i){t.next=34;break}throw s;case 34:return t.finish(31);case 35:return t.finish(26);case 36:case"end":return t.stop()}}),t,null,[[4,22,26,36],[27,,31,35]])})))).apply(this,arguments)}o()(it,"ArrowBatch",void 0);var ut=r(8),ct=r.n(ut),lt=r(16),ht=r.n(lt),ft=r(17),pt=r.n(ft),dt=r(18),yt=r.n(dt),vt=r(11),gt=r.n(vt),bt=Number.MAX_SAFE_INTEGER,mt="debug"==={}.CDEBUG,wt={textNode:void 0,numberNode:""},xt=0,Ot={BEGIN:xt++,VALUE:xt++,OPEN_OBJECT:xt++,CLOSE_OBJECT:xt++,OPEN_ARRAY:xt++,CLOSE_ARRAY:xt++,TEXT_ESCAPE:xt++,STRING:xt++,BACKSLASH:xt++,END:xt++,OPEN_KEY:xt++,CLOSE_KEY:xt++,TRUE:xt++,TRUE2:xt++,TRUE3:xt++,FALSE:xt++,FALSE2:xt++,FALSE3:xt++,FALSE4:xt++,NULL:xt++,NULL2:xt++,NULL3:xt++,NUMBER_DECIMAL_POINT:xt++,NUMBER_DIGIT:xt++};for(var jt in Ot)Ot[Ot[jt]]=jt;xt=Ot;var _t=9,kt=10,At=13,Pt=32,Et=34,St=43,Lt=44,Ct=45,It=46,Nt=48,Rt=57,Mt=58,Bt=69,Ut=91,Tt=92,Ft=93,Dt=97,Jt=98,zt=101,Gt=102,Yt=108,Vt=110,Kt=114,$t=115,qt=116,Xt=117,Ht=123,Wt=125;var Qt=/[\\"\n]/g,Zt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l()(this,t),this._initialize(e)}return f()(t,[{key:"_initialize",value:function(t){this._clearBuffers(this),this.bufferCheckPosition=bt,this.q="",this.c="",this.p="",this.options=t||{},this.closed=!1,this.closedRoot=!1,this.sawRoot=!1,this.tag=null,this.error=null,this.state=xt.BEGIN,this.stack=new Array,this.position=this.column=0,this.line=1,this.slashed=!1,this.unicodeI=0,this.unicodeS=null,this.depth=0,"onready"in t&&(this.onready=t.onready),"onopenobject"in t&&(this.onopenobject=t.onopenobject),"onkey"in t&&(this.onkey=t.onkey),"oncloseobject"in t&&(this.oncloseobject=t.oncloseobject),"onopenarray"in t&&(this.onopenarray=t.onopenarray),"onclosearray"in t&&(this.onclosearray=t.onclosearray),"onvalue"in t&&(this.onvalue=t.onvalue),"onerror"in t&&(this.onerror=t.onerror),"onend"in t&&(this.onend=t.onend),"onchunkparsed"in t&&(this.onchunkparsed=t.onchunkparsed),te(this,"onready")}},{key:"_clearBuffers",value:function(){for(var t in wt)this[t]=wt[t]}},{key:"end",value:function(){return this.state===xt.VALUE&&0===this.depth||oe(this,"Unexpected end"),re(this),this.c="",this.closed=!0,te(this,"onend"),this._initialize(this.options),this}},{key:"resume",value:function(){return this.error=null,this}},{key:"close",value:function(){return this.write(null)}},{key:"write",value:function(t){if(this.error)throw this.error;if(this.closed)return oe(this,"Cannot write after close. Assign an onready handler.");if(null===t)return this.end();var e=0,r=t.charCodeAt(0),n=this.p;for(mt&&console.log("write -> ["+t+"]");r&&(n=r,this.c=r=t.charCodeAt(e++),n!==r?this.p=n:n=this.p,r);)switch(mt&&console.log(e,r,Ot[this.state]),this.position++,r===kt?(this.line++,this.column=0):this.column++,this.state){case xt.BEGIN:r===Ht?this.state=xt.OPEN_OBJECT:r===Ut?this.state=xt.OPEN_ARRAY:ie(r)||oe(this,"Non-whitespace before {[.");continue;case xt.OPEN_KEY:case xt.OPEN_OBJECT:if(ie(r))continue;if(this.state===xt.OPEN_KEY)this.stack.push(xt.CLOSE_KEY);else{if(r===Wt){te(this,"onopenobject"),this.depth++,te(this,"oncloseobject"),this.depth--,this.state=this.stack.pop()||xt.VALUE;continue}this.stack.push(xt.CLOSE_OBJECT)}r===Et?this.state=xt.STRING:oe(this,'Malformed object key should start with "');continue;case xt.CLOSE_KEY:case xt.CLOSE_OBJECT:if(ie(r))continue;this.state,xt.CLOSE_KEY;r===Mt?(this.state===xt.CLOSE_OBJECT?(this.stack.push(xt.CLOSE_OBJECT),re(this,"onopenobject"),this.depth++):re(this,"onkey"),this.state=xt.VALUE):r===Wt?(ee(this,"oncloseobject"),this.depth--,this.state=this.stack.pop()||xt.VALUE):r===Lt?(this.state===xt.CLOSE_OBJECT&&this.stack.push(xt.CLOSE_OBJECT),re(this),this.state=xt.OPEN_KEY):oe(this,"Bad object");continue;case xt.OPEN_ARRAY:case xt.VALUE:if(ie(r))continue;if(this.state===xt.OPEN_ARRAY){if(te(this,"onopenarray"),this.depth++,this.state=xt.VALUE,r===Ft){te(this,"onclosearray"),this.depth--,this.state=this.stack.pop()||xt.VALUE;continue}this.stack.push(xt.CLOSE_ARRAY)}r===Et?this.state=xt.STRING:r===Ht?this.state=xt.OPEN_OBJECT:r===Ut?this.state=xt.OPEN_ARRAY:r===qt?this.state=xt.TRUE:r===Gt?this.state=xt.FALSE:r===Vt?this.state=xt.NULL:r===Ct?this.numberNode+="-":Nt<=r&&r<=Rt?(this.numberNode+=String.fromCharCode(r),this.state=xt.NUMBER_DIGIT):oe(this,"Bad value");continue;case xt.CLOSE_ARRAY:if(r===Lt)this.stack.push(xt.CLOSE_ARRAY),re(this,"onvalue"),this.state=xt.VALUE;else if(r===Ft)ee(this,"onclosearray"),this.depth--,this.state=this.stack.pop()||xt.VALUE;else{if(ie(r))continue;oe(this,"Bad array")}continue;case xt.STRING:void 0===this.textNode&&(this.textNode="");var o=e-1,i=this.slashed,s=this.unicodeI;t:for(;;){for(mt&&console.log(e,r,Ot[this.state],i);s>0;)if(this.unicodeS+=String.fromCharCode(r),r=t.charCodeAt(e++),this.position++,4===s?(this.textNode+=String.fromCharCode(parseInt(this.unicodeS,16)),s=0,o=e-1):s++,!r)break t;if(r===Et&&!i){this.state=this.stack.pop()||xt.VALUE,this.textNode+=t.substring(o,e-1),this.position+=e-1-o;break}if(r===Tt&&!i&&(i=!0,this.textNode+=t.substring(o,e-1),this.position+=e-1-o,r=t.charCodeAt(e++),this.position++,!r))break;if(i){if(i=!1,r===Vt?this.textNode+="\n":r===Kt?this.textNode+="\r":r===qt?this.textNode+="\t":r===Gt?this.textNode+="\f":r===Jt?this.textNode+="\b":r===Xt?(s=1,this.unicodeS=""):this.textNode+=String.fromCharCode(r),r=t.charCodeAt(e++),this.position++,o=e-1,r)continue;break}Qt.lastIndex=e;var a=Qt.exec(t);if(null===a){e=t.length+1,this.textNode+=t.substring(o,e-1),this.position+=e-1-o;break}if(e=a.index+1,!(r=t.charCodeAt(a.index))){this.textNode+=t.substring(o,e-1),this.position+=e-1-o;break}}this.slashed=i,this.unicodeI=s;continue;case xt.TRUE:r===Kt?this.state=xt.TRUE2:oe(this,"Invalid true started with t"+r);continue;case xt.TRUE2:r===Xt?this.state=xt.TRUE3:oe(this,"Invalid true started with tr"+r);continue;case xt.TRUE3:r===zt?(te(this,"onvalue",!0),this.state=this.stack.pop()||xt.VALUE):oe(this,"Invalid true started with tru"+r);continue;case xt.FALSE:r===Dt?this.state=xt.FALSE2:oe(this,"Invalid false started with f"+r);continue;case xt.FALSE2:r===Yt?this.state=xt.FALSE3:oe(this,"Invalid false started with fa"+r);continue;case xt.FALSE3:r===$t?this.state=xt.FALSE4:oe(this,"Invalid false started with fal"+r);continue;case xt.FALSE4:r===zt?(te(this,"onvalue",!1),this.state=this.stack.pop()||xt.VALUE):oe(this,"Invalid false started with fals"+r);continue;case xt.NULL:r===Xt?this.state=xt.NULL2:oe(this,"Invalid null started with n"+r);continue;case xt.NULL2:r===Yt?this.state=xt.NULL3:oe(this,"Invalid null started with nu"+r);continue;case xt.NULL3:r===Yt?(te(this,"onvalue",null),this.state=this.stack.pop()||xt.VALUE):oe(this,"Invalid null started with nul"+r);continue;case xt.NUMBER_DECIMAL_POINT:r===It?(this.numberNode+=".",this.state=xt.NUMBER_DIGIT):oe(this,"Leading zero not followed by .");continue;case xt.NUMBER_DIGIT:Nt<=r&&r<=Rt?this.numberNode+=String.fromCharCode(r):r===It?(-1!==this.numberNode.indexOf(".")&&oe(this,"Invalid number has two dots"),this.numberNode+="."):r===zt||r===Bt?(-1===this.numberNode.indexOf("e")&&-1===this.numberNode.indexOf("E")||oe(this,"Invalid number has two exponential"),this.numberNode+="e"):r===St||r===Ct?(n!==zt&&n!==Bt&&oe(this,"Invalid symbol in number"),this.numberNode+=String.fromCharCode(r)):(ne(this),e--,this.state=this.stack.pop()||xt.VALUE);continue;default:oe(this,"Unknown state: "+this.state)}return this.position>=this.bufferCheckPosition&&function(t){var e=Math.max(bt,10),r=0;for(var n in wt){var o=void 0===t[n]?0:t[n].length;if(o>e)switch(n){case"text":closeText(t);break;default:oe(t,"Max buffer length exceeded: "+n)}r=Math.max(r,o)}t.bufferCheckPosition=bt-r+t.position}(this),te(this,"onchunkparsed"),this}}]),t}();function te(t,e,r){mt&&console.log("-- emit",e,r),t[e]&&t[e](r,t)}function ee(t,e,r){re(t),te(t,e,r)}function re(t,e){t.textNode=function(t,e){if(void 0===e)return e;t.trim&&(e=e.trim());t.normalize&&(e=e.replace(/\s+/g," "));return e}(t.options,t.textNode),void 0!==t.textNode&&te(t,e||"onvalue",t.textNode),t.textNode=void 0}function ne(t){t.numberNode&&te(t,"onvalue",parseFloat(t.numberNode)),t.numberNode=""}function oe(t,e){return re(t),e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c,e=new Error(e),t.error=e,te(t,"onerror",e),t}function ie(t){return t===At||t===kt||t===Pt||t===_t}function se(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return ae(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ae(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function ae(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ue=function(){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(l()(this,t),o()(this,"path",void 0),this.path=["$"],r instanceof t)this.path=I()(r.path);else if(Array.isArray(r))(e=this.path).push.apply(e,I()(r));else if("string"==typeof r&&(this.path=r.split("."),"$"!==this.path[0]))throw new Error("JSONPaths must start with $")}return f()(t,[{key:"clone",value:function(){return new t(this)}},{key:"toString",value:function(){return this.path.join(".")}},{key:"push",value:function(t){this.path.push(t)}},{key:"pop",value:function(){return this.path.pop()}},{key:"set",value:function(t){this.path[this.path.length-1]=t}},{key:"equals",value:function(t){if(!this||!t||this.path.length!==t.path.length)return!1;for(var e=0;e<this.path.length;++e)if(this.path[e]!==t.path[e])return!1;return!0}},{key:"setFieldAtPath",value:function(t,e){var r=I()(this.path);r.shift();var n,o=r.pop(),i=se(r);try{for(i.s();!(n=i.n()).done;){t=t[n.value]}}catch(t){i.e(t)}finally{i.f()}t[o]=e}},{key:"getFieldAtPath",value:function(t){var e=I()(this.path);e.shift();var r,n=e.pop(),o=se(e);try{for(o.s();!(r=o.n()).done;){t=t[r.value]}}catch(t){o.e(t)}finally{o.f()}return t[n]}}]),t}();function ce(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return le(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return le(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function le(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function he(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=gt()(t);if(e){var o=gt()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return yt()(this,r)}}var fe=function(t){pt()(r,t);var e=he(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l()(this,r),t=e.call(this),o()(ct()(t),"jsonPaths",void 0),o()(ct()(t),"streamingJsonPath",null),o()(ct()(t),"streamingArray",null),o()(ct()(t),"topLevelObject",null);var i=n.jsonpaths||[];return t.jsonPaths=i.map((function(t){return new ue(t)})),t._extendParser(),t}return f()(r,[{key:"write",value:function(t){ht()(gt()(r.prototype),"write",this).call(this,t);var e=[];return this.streamingArray&&(e=I()(this.streamingArray),this.streamingArray.length=0),e}},{key:"getPartialResult",value:function(){return this.topLevelObject}},{key:"getStreamingJsonPath",value:function(){return this.streamingJsonPath}},{key:"getStreamingJsonPathAsString",value:function(){return this.streamingJsonPath&&this.streamingJsonPath.toString()}},{key:"getJsonPath",value:function(){return this.jsonpath}},{key:"_matchJSONPath",value:function(){var t=this.getJsonPath();if(0===this.jsonPaths.length)return!0;var e,r=ce(this.jsonPaths);try{for(r.s();!(e=r.n()).done;){if(e.value.equals(t))return!0}}catch(t){r.e(t)}finally{r.f()}return!1}},{key:"_extendParser",value:function(){var t=this;this.parser.onopenarray=function(){if(!t.streamingArray&&t._matchJSONPath())return t.streamingJsonPath=t.getJsonPath().clone(),t.streamingArray=[],void t._openArray(t.streamingArray);t._openArray()},this.parser.onopenobject=function(e){t.topLevelObject?t._openObject({}):(t.topLevelObject={},t._openObject(t.topLevelObject)),void 0!==e&&t.parser.onkey(e)}}}]),r}(function(){function t(){l()(this,t),o()(this,"jsonpath",void 0),o()(this,"_parser",void 0),this.reset(),this._initializeParser()}return f()(t,[{key:"reset",value:function(){this.result=void 0,this.previousStates=[],this.currentState=Object.freeze({container:[],key:null}),this.jsonpath=new ue}},{key:"write",value:function(t){this.parser.write(t)}},{key:"close",value:function(){this.parser.close()}},{key:"_pushOrSet",value:function(t){var e=this.currentState,r=e.container,n=e.key;null!==n?(r[n]=t,this.currentState.key=null):r.push(t)}},{key:"_openArray",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.jsonpath.push(null),this._pushOrSet(t),this.previousStates.push(this.currentState),this.currentState={container:t,isArray:!0,key:null}}},{key:"_closeArray",value:function(){this.jsonpath.pop(),this.currentState=this.previousStates.pop()}},{key:"_openObject",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.jsonpath.push(null),this._pushOrSet(t),this.previousStates.push(this.currentState),this.currentState={container:t,isArray:!1,key:null}}},{key:"_closeObject",value:function(){this.jsonpath.pop(),this.currentState=this.previousStates.pop()}},{key:"_initializeParser",value:function(){var t=this;this._parser=new Zt({onready:function(){t.jsonpath=new ue,t.previousStates.length=0,t.currentState.container.length=0},onopenobject:function(e){t._openObject({}),void 0!==e&&t.parser.onkey(e)},onkey:function(e){t.jsonpath.set(e),t.currentState.key=e},oncloseobject:function(){t._closeObject()},onopenarray:function(){t._openArray()},onclosearray:function(){t._closeArray()},onvalue:function(e){t._pushOrSet(e)},onerror:function(t){throw t},onend:function(){t.result=t.currentState.container.pop()}})}},{key:"parser",get:function(){return this._parser}}]),t}());function pe(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return de(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return de(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function de(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ye(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ve(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ye(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ye(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ge(){return(ge=E()(u.a.mark((function t(e,r){var n,o,i,s,a,c,l,h,f,p,d,y,v,g,b,m,w,x,O,j,_,k,P,E,S,C,I;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=st(e),i=r.metadata,s=r.json||{},a=s.jsonpaths,c=!0,null,l=(null==r||null===(n=r.json)||void 0===n?void 0:n.shape)||"row-table",h=new it(null,ve(ve({},r),{},{shape:l})),f=new fe({jsonpaths:a}),p=!0,d=!1,t.prev=10,v=L()(o);case 12:return t.next=14,A()(v.next());case 14:return g=t.sent,p=g.done,t.next=18,A()(g.value);case 18:if(b=t.sent,p){t.next=57;break}if(m=b,w=f.write(m),x=w.length>0&&f.getStreamingJsonPathAsString(),!(w.length>0&&c)){t.next=29;break}if(!i){t.next=28;break}return O={shape:l,batchType:"partial-result",data:[],length:0,bytesUsed:0,container:f.getPartialResult(),jsonpath:x},t.next=28,O;case 28:c=!1;case 29:j=pe(w),t.prev=30,j.s();case 32:if((_=j.n()).done){t.next=41;break}if(k=_.value,h.addRow(k),!(P=h.getFullBatch({jsonpath:x}))){t.next=39;break}return t.next=39,P;case 39:t.next=32;break;case 41:t.next=46;break;case 43:t.prev=43,t.t0=t.catch(30),j.e(t.t0);case 46:return t.prev=46,j.f(),t.finish(46);case 49:if(h.chunkComplete(m),!(E=h.getFullBatch({jsonpath:x}))){t.next=54;break}return t.next=54,E;case 54:p=!0,t.next=12;break;case 57:t.next=63;break;case 59:t.prev=59,t.t1=t.catch(10),d=!0,y=t.t1;case 63:if(t.prev=63,t.prev=64,p||null==v.return){t.next=68;break}return t.next=68,A()(v.return());case 68:if(t.prev=68,!d){t.next=71;break}throw y;case 71:return t.finish(68);case 72:return t.finish(63);case 73:if(S=f.getStreamingJsonPathAsString(),!(C=h.getFinalBatch({jsonpath:S}))){t.next=78;break}return t.next=78,C;case 78:if(!i){t.next=82;break}return I={shape:l,batchType:"final-result",container:f.getPartialResult(),jsonpath:f.getStreamingJsonPathAsString(),data:[],length:0},t.next=82,I;case 82:case"end":return t.stop()}}),t,null,[[10,59,63,73],[30,43,46,49],[64,,68,72]])})))).apply(this,arguments)}function be(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function me(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?be(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var we,xe={geojson:{shape:"object-row-table"},json:{jsonpaths:["$","$.features"]},gis:{format:"geojson"}},Oe=me(me({},{name:"GeoJSON",id:"geojson",module:"geojson",version:"3.0.14",worker:!0,extensions:["geojson"],mimeTypes:["application/geo+json"],category:"geometry",text:!0,options:xe}),{},{parse:function(t,e){return je.apply(this,arguments)},parseTextSync:_e,parseInBatches:function(t,e){(e=me(me({},xe),e)).json=me(me({},xe.geojson),e.geojson);var r=function(t,e){return ge.apply(this,arguments)}(t,e);switch(e.gis.format){case"binary":return function(t){return ke.apply(this,arguments)}(r);default:return r}}});function je(){return(je=s()(u.a.mark((function t(e,r){return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",_e((new TextDecoder).decode(e),r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function _e(t,e){(e=me(me({},xe),e)).json=me(me({},xe.geojson),e.geojson),e.gis=e.gis||{};var r=H(t,e);switch(e.gis.format){case"binary":return U(r);default:return r}}function ke(){return(ke=E()(u.a.mark((function t(e){var r,n,o,i,s,a,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=!0,n=!1,t.prev=2,i=L()(e);case 4:return t.next=6,A()(i.next());case 6:return s=t.sent,r=s.done,t.next=10,A()(s.value);case 10:if(a=t.sent,r){t.next=19;break}return(c=a).data=U(c.data),t.next=16,c;case 16:r=!0,t.next=4;break;case 19:t.next=25;break;case 21:t.prev=21,t.t0=t.catch(2),n=!0,o=t.t0;case 25:if(t.prev=25,t.prev=26,r||null==i.return){t.next=30;break}return t.next=30,A()(i.return());case 30:if(t.prev=30,!n){t.next=33;break}throw o;case 33:return t.finish(30);case 34:return t.finish(25);case 35:case"end":return t.stop()}}),t,null,[[2,21,25,35],[26,,30,34]])})))).apply(this,arguments)}we=Oe,"undefined"!=typeof self&&(g.onmessage=function(){var t=s()(u.a.mark((function t(e,r){var n,o,i,s,a;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="process"===t.t0?3:16;break;case 3:return t.prev=3,n=r.input,o=r.options,i=void 0===o?{}:o,t.next=7,j({loader:we,arrayBuffer:n,options:i,context:{parse:O}});case 7:s=t.sent,g.postMessage("done",{result:s}),t.next=15;break;case 11:t.prev=11,t.t1=t.catch(3),a=t.t1 instanceof Error?t.t1.message:"",g.postMessage("error",{error:a});case 15:return t.abrupt("break",16);case 16:case"end":return t.stop()}}),t,null,[[3,11]])})));return function(e,r){return t.apply(this,arguments)}}())}]);
2
2
  //# sourceMappingURL=geojson-worker.js.map