@supermapgis/vue-iclient-leaflet 11.2.0 → 11.3.0

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.
Files changed (174) hide show
  1. package/dist/iclient-leaflet-vue.css +23 -9
  2. package/dist/iclient-leaflet-vue.js +21687 -44393
  3. package/dist/iclient-leaflet-vue.min.css +2 -2
  4. package/dist/iclient-leaflet-vue.min.js +39 -293
  5. package/lib/_assets/iconfont/icon-sm-components.css +21 -7
  6. package/lib/_assets/iconfont/icon-sm-components.ttf +0 -0
  7. package/lib/_assets/iconfont/icon-sm-components.woff +0 -0
  8. package/lib/_assets/iconfont/icon-sm-components.woff2 +0 -0
  9. package/lib/_lang/en.js +21 -9
  10. package/lib/_lang/index.js +22 -22
  11. package/lib/_lang/zh.js +21 -9
  12. package/lib/_mixin/AntdRender.js +15 -17
  13. package/lib/_mixin/Card.js +10 -11
  14. package/lib/_mixin/GridLayer.js +4 -4
  15. package/lib/_mixin/Layer.js +4 -4
  16. package/lib/_mixin/Options.js +2 -2
  17. package/lib/_mixin/Popper.js +2 -2
  18. package/lib/_mixin/Theme.js +13 -15
  19. package/lib/_mixin/ThirdService.js +15 -16
  20. package/lib/_mixin/TileLayer.js +4 -4
  21. package/lib/_mixin/Timer.js +8 -9
  22. package/lib/_mixin/VmUpdater.js +10 -11
  23. package/lib/_mixin/map-events.js +8 -9
  24. package/lib/_mixin/map-getter.js +13 -14
  25. package/lib/_types/AddressMatchParameter.js +2 -2
  26. package/lib/_types/GeoJSONParamter.js +2 -2
  27. package/lib/_types/RestDataParameter.js +5 -6
  28. package/lib/_types/RestMapParameter.js +5 -6
  29. package/lib/_types/RestParameter.js +2 -2
  30. package/lib/_types/event/BaseTypes.js +2 -2
  31. package/lib/_types/event/Event.js +4 -4
  32. package/lib/_types/event/Events.js +10 -10
  33. package/lib/_types/event/Pixel.js +2 -2
  34. package/lib/_types/event/Util.js +2 -2
  35. package/lib/_types/iPortalDataParameter.js +3 -2
  36. package/lib/_types/iServerBaseParameter.js +3 -2
  37. package/lib/_types/iServerDataParameter.js +5 -6
  38. package/lib/_types/iServerMapParameter.js +5 -6
  39. package/lib/_types/index.js +18 -18
  40. package/lib/_types/map-event.js +6 -6
  41. package/lib/_utils/EchartsDataService.js +24 -24
  42. package/lib/_utils/RestService.js +1345 -1149
  43. package/lib/_utils/epsg-define.js +45 -34
  44. package/lib/_utils/get-features.js +23 -10
  45. package/lib/_utils/global-event.js +6 -6
  46. package/lib/_utils/iPortalDataService.js +1368 -1147
  47. package/lib/_utils/iServerRestService.js +1527 -1278
  48. package/lib/_utils/props-binder.js +2 -2
  49. package/lib/_utils/statistics.js +8 -17
  50. package/lib/_utils/style/color/colorPalette.js +4 -4
  51. package/lib/_utils/style/color/serialColors.js +8 -8
  52. package/lib/_utils/style/theme/chart.js +1344 -1147
  53. package/lib/_utils/style/theme/set-theme.js +10 -10
  54. package/lib/_utils/style/theme/theme.json +6 -6
  55. package/lib/_utils/util.js +12 -12
  56. package/lib/_utils/vue-types/utils.js +2 -2
  57. package/lib/attribute-panel/style/attribute-panel.css +1 -0
  58. package/lib/attribute-panel/style/css.js +7 -0
  59. package/lib/attribute-panel/style/index.js +7 -0
  60. package/lib/avatar/index.js +25 -25
  61. package/lib/border/index.js +77 -77
  62. package/lib/breadcrumb/index.js +47 -41
  63. package/lib/button/index.js +53 -50
  64. package/lib/card/index.js +47 -41
  65. package/lib/chart/index.js +1441 -1242
  66. package/lib/checkbox/index.js +36 -33
  67. package/lib/collapse/index.js +39 -36
  68. package/lib/collapse-card/index.js +71 -76
  69. package/lib/color-picker/index.js +48 -49
  70. package/lib/date-picker/index.js +107 -95
  71. package/lib/dropdown/index.js +27 -27
  72. package/lib/empty/index.js +27 -27
  73. package/lib/icon/index.js +25 -25
  74. package/lib/identify/index.js +67 -68
  75. package/lib/iframe/index.js +31 -31
  76. package/lib/image/index.js +226 -42
  77. package/lib/image/style/image.css +1 -1
  78. package/lib/index.js +4 -4
  79. package/lib/indicator/index.js +70 -67
  80. package/lib/init.js +8 -8
  81. package/lib/input/index.js +150 -135
  82. package/lib/input-number/index.js +100 -97
  83. package/lib/layout/index.js +72 -60
  84. package/lib/liquid-fill/index.js +73 -73
  85. package/lib/marker/index.js +45 -46
  86. package/lib/menu/index.js +47 -41
  87. package/lib/message/index.js +3 -3
  88. package/lib/message/style/message.css +1 -1
  89. package/lib/modal/index.js +67 -67
  90. package/lib/modal/style/modal.css +1 -1
  91. package/lib/notification/index.js +6 -6
  92. package/lib/notification/style/notification.css +1 -1
  93. package/lib/pagination/index.js +34 -34
  94. package/lib/popup/index.js +47 -48
  95. package/lib/progress/index.js +440 -440
  96. package/lib/radio/index.js +48 -42
  97. package/lib/select/index.js +47 -41
  98. package/lib/slider/index.js +27 -27
  99. package/lib/slideshow/index.js +103 -160
  100. package/lib/spin/index.js +30 -30
  101. package/lib/steps/index.js +35 -32
  102. package/lib/switch/index.js +25 -25
  103. package/lib/table/index.js +50 -44
  104. package/lib/table/style/table.css +1 -1
  105. package/lib/table-popup/index.js +43 -37
  106. package/lib/table-popup/style/table-popup.css +1 -1
  107. package/lib/tabs/index.js +35 -32
  108. package/lib/text/index.js +39 -39
  109. package/lib/tile-layer/index.js +37 -38
  110. package/lib/time-line/index.js +41 -43
  111. package/lib/time-picker/index.js +27 -27
  112. package/lib/time-range/index.js +47 -49
  113. package/lib/time-slider/index.js +67 -69
  114. package/lib/time-text/index.js +31 -31
  115. package/lib/tooltip/index.js +25 -25
  116. package/lib/tooltip/style/tooltip.css +1 -0
  117. package/lib/transfer/index.js +27 -27
  118. package/lib/tree/index.js +48 -42
  119. package/lib/tree-select/index.js +37 -34
  120. package/lib/video-player/index.js +102 -151
  121. package/lib/video-player/style/video-player.css +1 -1
  122. package/lib/web-map/index.js +2339 -106
  123. package/package.json +3 -5
  124. package/src/common/_assets/iconfont/icon-sm-components.css +21 -7
  125. package/src/common/_assets/iconfont/icon-sm-components.ttf +0 -0
  126. package/src/common/_assets/iconfont/icon-sm-components.woff +0 -0
  127. package/src/common/_assets/iconfont/icon-sm-components.woff2 +0 -0
  128. package/src/common/_lang/en.js +19 -8
  129. package/src/common/_lang/zh.js +19 -7
  130. package/src/common/_mixin/Card.ts +1 -1
  131. package/src/common/_types/iPortalDataParameter.js +1 -0
  132. package/src/common/_types/iServerBaseParameter.ts +3 -0
  133. package/src/common/_utils/epsg-define.js +32 -27
  134. package/src/common/_utils/get-features.js +13 -2
  135. package/src/common/_utils/iPortalDataService.js +14 -3
  136. package/src/common/_utils/iServerRestService.js +144 -78
  137. package/src/common/_utils/statistics.js +6 -14
  138. package/src/common/_utils/style/theme/theme.json +6 -6
  139. package/src/common/attribute-panel/AttributePanel.vue +58 -0
  140. package/src/common/attribute-panel/__test__/AttributePanel.spec.js +39 -0
  141. package/src/common/attribute-panel/index.js +9 -0
  142. package/src/common/attribute-panel/style/attribute-panel.scss +35 -0
  143. package/src/common/attribute-panel/style/index.js +4 -0
  144. package/src/common/collapse-card/style/collapse-card.scss +2 -2
  145. package/src/common/iframe/Iframe.vue +1 -1
  146. package/src/common/image/Image.vue +68 -6
  147. package/src/common/image/style/image.scss +32 -0
  148. package/src/common/message/style/message.scss +1 -0
  149. package/src/common/modal/style/modal.scss +36 -0
  150. package/src/common/notification/style/notification.scss +9 -0
  151. package/src/common/slideshow/Slideshow.vue +42 -95
  152. package/src/common/slideshow/Swiper.js +1 -1
  153. package/src/common/table/style/table.scss +36 -0
  154. package/src/common/table-popup/TablePopup.vue +5 -0
  155. package/src/common/tooltip/style/tooltip.scss +3 -0
  156. package/src/common/video-player/VideoPlayer.vue +4 -41
  157. package/src/common/video-player/style/video-player.scss +1 -1
  158. package/src/leaflet/entrys.json +0 -2
  159. package/src/leaflet/package.json +3 -5
  160. package/src/leaflet/web-map/WebMap.vue +4 -4
  161. package/src/leaflet/web-map/WebMapViewModel.ts +64 -17
  162. package/static/libs/iclient-common/iclient-common-webmapv2base.js +2 -0
  163. package/static/libs/iclient-common/iclient-common.js +1 -1
  164. package/static/libs/iclient-leaflet/iclient-leaflet.min.js +5 -1738
  165. package/lib/_assets/iconfont/icon-sm-components.eot +0 -0
  166. package/lib/_assets/iconfont/icon-sm-components.svg +0 -197
  167. package/lib/_mixin/WebMapBase.js +0 -3467
  168. package/lib/_utils/WebMapService.js +0 -1607
  169. package/src/common/_assets/iconfont/icon-sm-components.eot +0 -0
  170. package/src/common/_assets/iconfont/icon-sm-components.svg +0 -197
  171. package/src/common/_utils/WebMapService.ts +0 -1292
  172. package/src/common/web-map/WebMapBase.ts +0 -1178
  173. package/src/common/web-map/config/MunicipalCenter.json +0 -1
  174. package/src/common/web-map/config/ProvinceCenter.json +0 -1
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 501);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 497);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -105,19 +105,20 @@ module.exports = require("@babel/runtime/helpers/interopRequireDefault");
105
105
  // This module is a runtime utility for cleaner component module output and will
106
106
  // be included in the final webpack user bundle.
107
107
 
108
- function normalizeComponent(
108
+ function normalizeComponent (
109
109
  scriptExports,
110
110
  render,
111
111
  staticRenderFns,
112
112
  functionalTemplate,
113
113
  injectStyles,
114
114
  scopeId,
115
- moduleIdentifier /* server only */,
115
+ moduleIdentifier, /* server only */
116
116
  shadowMode /* vue-cli only */
117
117
  ) {
118
118
  // Vue.extend constructor export interop
119
- var options =
120
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
119
+ var options = typeof scriptExports === 'function'
120
+ ? scriptExports.options
121
+ : scriptExports
121
122
 
122
123
  // render functions
123
124
  if (render) {
@@ -137,8 +138,7 @@ function normalizeComponent(
137
138
  }
138
139
 
139
140
  var hook
140
- if (moduleIdentifier) {
141
- // server build
141
+ if (moduleIdentifier) { // server build
142
142
  hook = function (context) {
143
143
  // 2.3 injection
144
144
  context =
@@ -163,12 +163,7 @@ function normalizeComponent(
163
163
  options._ssrRegister = hook
164
164
  } else if (injectStyles) {
165
165
  hook = shadowMode
166
- ? function () {
167
- injectStyles.call(
168
- this,
169
- (options.functional ? this.parent : this).$root.$options.shadowRoot
170
- )
171
- }
166
+ ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
172
167
  : injectStyles
173
168
  }
174
169
 
@@ -177,16 +172,18 @@ function normalizeComponent(
177
172
  // for template-only hot-reload because in that case the render fn doesn't
178
173
  // go through the normalizer
179
174
  options._injectStyles = hook
180
- // register for functional component in vue file
175
+ // register for functioal component in vue file
181
176
  var originalRender = options.render
182
- options.render = function renderWithStyleInjection(h, context) {
177
+ options.render = function renderWithStyleInjection (h, context) {
183
178
  hook.call(context)
184
179
  return originalRender(h, context)
185
180
  }
186
181
  } else {
187
182
  // inject component registration as beforeCreate hook
188
183
  var existing = options.beforeCreate
189
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
184
+ options.beforeCreate = existing
185
+ ? [].concat(existing, hook)
186
+ : [hook]
190
187
  }
191
188
  }
192
189
 
@@ -199,14 +196,14 @@ function normalizeComponent(
199
196
 
200
197
  /***/ }),
201
198
 
202
- /***/ 11:
199
+ /***/ 10:
203
200
  /***/ (function(module, exports) {
204
201
 
205
202
  module.exports = require("vue-property-decorator");
206
203
 
207
204
  /***/ }),
208
205
 
209
- /***/ 12:
206
+ /***/ 11:
210
207
  /***/ (function(module, exports) {
211
208
 
212
209
  module.exports = require("@babel/runtime/helpers/extends");
@@ -252,7 +249,7 @@ Object.defineProperty(exports, "__esModule", {
252
249
  });
253
250
  exports.default = void 0;
254
251
 
255
- var _extends2 = _interopRequireDefault(__webpack_require__(12));
252
+ var _extends2 = _interopRequireDefault(__webpack_require__(11));
256
253
 
257
254
  var _message = _interopRequireDefault(__webpack_require__(17));
258
255
 
@@ -283,40 +280,135 @@ module.exports = require("ant-design-vue/es/message");
283
280
 
284
281
  /***/ }),
285
282
 
283
+ /***/ 18:
284
+ /***/ (function(module, exports, __webpack_require__) {
285
+
286
+ "use strict";
287
+
288
+
289
+ var g; // This works in non-strict mode
290
+
291
+ g = function () {
292
+ return this;
293
+ }();
294
+
295
+ try {
296
+ // This works if eval is allowed (see CSP)
297
+ g = g || new Function("return this")();
298
+ } catch (e) {
299
+ // This works if the window reference is available
300
+ if (typeof window === "object") g = window;
301
+ } // g can still be undefined, but nothing to do about it...
302
+ // We return undefined, instead of nothing here, so it's
303
+ // easier to handle this case. if(!global) { ...}
304
+
305
+
306
+ module.exports = g;
307
+
308
+ /***/ }),
309
+
286
310
  /***/ 19:
311
+ /***/ (function(module, exports, __webpack_require__) {
312
+
313
+ "use strict";
314
+ /* WEBPACK VAR INJECTION */(function(global) {
315
+
316
+ var scope = typeof global !== "undefined" && global || typeof self !== "undefined" && self || window;
317
+ var apply = Function.prototype.apply; // DOM APIs, for completeness
318
+
319
+ exports.setTimeout = function () {
320
+ return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);
321
+ };
322
+
323
+ exports.setInterval = function () {
324
+ return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);
325
+ };
326
+
327
+ exports.clearTimeout = exports.clearInterval = function (timeout) {
328
+ if (timeout) {
329
+ timeout.close();
330
+ }
331
+ };
332
+
333
+ function Timeout(id, clearFn) {
334
+ this._id = id;
335
+ this._clearFn = clearFn;
336
+ }
337
+
338
+ Timeout.prototype.unref = Timeout.prototype.ref = function () {};
339
+
340
+ Timeout.prototype.close = function () {
341
+ this._clearFn.call(scope, this._id);
342
+ }; // Does not start the time, just sets up the members needed.
343
+
344
+
345
+ exports.enroll = function (item, msecs) {
346
+ clearTimeout(item._idleTimeoutId);
347
+ item._idleTimeout = msecs;
348
+ };
349
+
350
+ exports.unenroll = function (item) {
351
+ clearTimeout(item._idleTimeoutId);
352
+ item._idleTimeout = -1;
353
+ };
354
+
355
+ exports._unrefActive = exports.active = function (item) {
356
+ clearTimeout(item._idleTimeoutId);
357
+ var msecs = item._idleTimeout;
358
+
359
+ if (msecs >= 0) {
360
+ item._idleTimeoutId = setTimeout(function onTimeout() {
361
+ if (item._onTimeout) item._onTimeout();
362
+ }, msecs);
363
+ }
364
+ }; // setimmediate attaches itself to the global object
365
+
366
+
367
+ __webpack_require__(20); // On some exotic environments, it's not clear which object `setimmediate` was
368
+ // able to install onto. Search each possibility in the same order as the
369
+ // `setimmediate` library.
370
+
371
+
372
+ exports.setImmediate = typeof self !== "undefined" && self.setImmediate || typeof global !== "undefined" && global.setImmediate || void 0 && (void 0).setImmediate;
373
+ exports.clearImmediate = typeof self !== "undefined" && self.clearImmediate || typeof global !== "undefined" && global.clearImmediate || void 0 && (void 0).clearImmediate;
374
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(18)))
375
+
376
+ /***/ }),
377
+
378
+ /***/ 20:
287
379
  /***/ (function(module, exports) {
288
380
 
289
- module.exports = require("leaflet");
381
+ module.exports = require("setimmediate");
290
382
 
291
383
  /***/ }),
292
384
 
293
- /***/ 22:
385
+ /***/ 21:
294
386
  /***/ (function(module, exports) {
295
387
 
296
- module.exports = require("resize-detector");
388
+ module.exports = require("leaflet");
297
389
 
298
390
  /***/ }),
299
391
 
300
392
  /***/ 23:
301
393
  /***/ (function(module, exports) {
302
394
 
303
- module.exports = require("lodash.debounce");
395
+ module.exports = require("resize-detector");
304
396
 
305
397
  /***/ }),
306
398
 
307
- /***/ 233:
399
+ /***/ 232:
308
400
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
309
401
 
310
402
  "use strict";
311
403
  __webpack_require__.r(__webpack_exports__);
312
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(234);
404
+ /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(233);
313
405
  /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__);
314
406
  /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
315
407
  /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default.a);
316
408
 
317
409
  /***/ }),
318
410
 
319
- /***/ 234:
411
+ /***/ 233:
320
412
  /***/ (function(module, exports, __webpack_require__) {
321
413
 
322
414
  "use strict";
@@ -333,21 +425,21 @@ var _createClass2 = _interopRequireDefault(__webpack_require__(14));
333
425
 
334
426
  var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6));
335
427
 
336
- var _WebMapViewModel = _interopRequireDefault(__webpack_require__(503));
428
+ var _WebMapViewModel = _interopRequireDefault(__webpack_require__(499));
337
429
 
338
- var _VmUpdater = _interopRequireDefault(__webpack_require__(247));
430
+ var _VmUpdater = _interopRequireDefault(__webpack_require__(246));
339
431
 
340
- var _mapEvent = _interopRequireDefault(__webpack_require__(249));
432
+ var _mapEvent = _interopRequireDefault(__webpack_require__(248));
341
433
 
342
- var _vuePropertyDecorator = __webpack_require__(11);
434
+ var _vuePropertyDecorator = __webpack_require__(10);
343
435
 
344
- var _resizeDetector = __webpack_require__(22);
436
+ var _resizeDetector = __webpack_require__(23);
345
437
 
346
- var _lodash = _interopRequireDefault(__webpack_require__(23));
438
+ var _lodash = _interopRequireDefault(__webpack_require__(24));
347
439
 
348
- var _mapEvents = _interopRequireDefault(__webpack_require__(505));
440
+ var _mapEvents = _interopRequireDefault(__webpack_require__(507));
349
441
 
350
- var _Spin = _interopRequireDefault(__webpack_require__(506));
442
+ var _Spin = _interopRequireDefault(__webpack_require__(508));
351
443
 
352
444
  var _index = _interopRequireDefault(__webpack_require__(15));
353
445
 
@@ -360,8 +452,6 @@ var __decorate = void 0 && (void 0).__decorate || function (decorators, target,
360
452
  };
361
453
 
362
454
  var SmWebMap = /*#__PURE__*/function (_Mixins) {
363
- (0, _inheritsLoose2.default)(SmWebMap, _Mixins);
364
-
365
455
  function SmWebMap() {
366
456
  var _this;
367
457
 
@@ -371,6 +461,7 @@ var SmWebMap = /*#__PURE__*/function (_Mixins) {
371
461
  return _this;
372
462
  }
373
463
 
464
+ (0, _inheritsLoose2.default)(SmWebMap, _Mixins);
374
465
  var _proto = SmWebMap.prototype;
375
466
 
376
467
  _proto.mapIdChanged = function mapIdChanged() {
@@ -473,7 +564,7 @@ var SmWebMap = /*#__PURE__*/function (_Mixins) {
473
564
  map: e.map
474
565
  });
475
566
  },
476
- getmapinfofailed: function getmapinfofailed(e) {
567
+ mapcreatefailed: function mapcreatefailed(e) {
477
568
  _this4.getMapFailed({
478
569
  error: e.error
479
570
  });
@@ -482,7 +573,7 @@ var SmWebMap = /*#__PURE__*/function (_Mixins) {
482
573
 
483
574
  _this4.spinning = false;
484
575
  },
485
- getlayerdatasourcefailed: function getlayerdatasourcefailed(e) {
576
+ layercreatefailed: function layercreatefailed(e) {
486
577
  _this4.getLayerDatasourceFailed({
487
578
  error: e.error,
488
579
  layer: e.layer,
@@ -495,8 +586,8 @@ var SmWebMap = /*#__PURE__*/function (_Mixins) {
495
586
  _index.default.error(_this4.$t('webmap.getLayerInfoFailed'));
496
587
  }
497
588
  },
498
- notsupportmvt: function notsupportmvt() {
499
- _index.default.error('暂不支持加载矢量瓦片图层!');
589
+ mvtnotsupport: function mvtnotsupport() {
590
+ _index.default.error(_this4.$t('webmap.mvtNotSupport'));
500
591
 
501
592
  _this4.spinning = false;
502
593
  }
@@ -509,13 +600,12 @@ var SmWebMap = /*#__PURE__*/function (_Mixins) {
509
600
  }
510
601
  };
511
602
 
512
- (0, _createClass2.default)(SmWebMap, [{
603
+ return (0, _createClass2.default)(SmWebMap, [{
513
604
  key: "getMapTarget",
514
605
  get: function get() {
515
606
  return this.target;
516
607
  }
517
608
  }]);
518
- return SmWebMap;
519
609
  }((0, _vuePropertyDecorator.Mixins)(_VmUpdater.default, _mapEvents.default));
520
610
 
521
611
  __decorate([(0, _vuePropertyDecorator.Provide)()], SmWebMap.prototype, "__resizeHandler", void 0);
@@ -572,35 +662,35 @@ var _default = exports.default = SmWebMap;
572
662
 
573
663
  /***/ }),
574
664
 
575
- /***/ 247:
665
+ /***/ 24:
576
666
  /***/ (function(module, exports) {
577
667
 
578
- module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_mixin/VmUpdater.js");
668
+ module.exports = require("lodash.debounce");
579
669
 
580
670
  /***/ }),
581
671
 
582
- /***/ 248:
672
+ /***/ 246:
583
673
  /***/ (function(module, exports) {
584
674
 
585
- module.exports = require("@supermapgis/vue-iclient-leaflet/static/libs/geostats/geostats");
675
+ module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_mixin/VmUpdater.js");
586
676
 
587
677
  /***/ }),
588
678
 
589
- /***/ 249:
679
+ /***/ 247:
590
680
  /***/ (function(module, exports) {
591
681
 
592
- module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_types/map-event.js");
682
+ module.exports = require("@babel/runtime/regenerator");
593
683
 
594
684
  /***/ }),
595
685
 
596
- /***/ 25:
686
+ /***/ 248:
597
687
  /***/ (function(module, exports) {
598
688
 
599
- module.exports = require("@turf/center");
689
+ module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_types/map-event.js");
600
690
 
601
691
  /***/ }),
602
692
 
603
- /***/ 277:
693
+ /***/ 272:
604
694
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
605
695
 
606
696
  "use strict";
@@ -609,8 +699,8 @@ module.exports = require("@turf/center");
609
699
  __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ render; });
610
700
  __webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ staticRenderFns; });
611
701
 
612
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/leaflet/web-map/WebMap.vue?vue&type=template&id=3484f35d&
613
- var render = function () {
702
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/leaflet/web-map/WebMap.vue?vue&type=template&id=0b1ce81f&
703
+ var render = function() {
614
704
  var _vm = this
615
705
  var _h = _vm.$createElement
616
706
  var _c = _vm._self._c || _h
@@ -624,10 +714,10 @@ var render = function () {
624
714
  attrs: {
625
715
  size: "large",
626
716
  tip: _vm.$t("webmap.loadingTip"),
627
- spinning: _vm.spinning,
628
- },
717
+ spinning: _vm.spinning
718
+ }
629
719
  })
630
- : _vm._e(),
720
+ : _vm._e()
631
721
  ],
632
722
  2
633
723
  )
@@ -636,7 +726,7 @@ var staticRenderFns = []
636
726
  render._withStripped = true
637
727
 
638
728
 
639
- // CONCATENATED MODULE: ./src/leaflet/web-map/WebMap.vue?vue&type=template&id=3484f35d&
729
+ // CONCATENATED MODULE: ./src/leaflet/web-map/WebMap.vue?vue&type=template&id=0b1ce81f&
640
730
 
641
731
 
642
732
  /***/ }),
@@ -648,7 +738,7 @@ module.exports = require("@supermapgis/vue-iclient-leaflet/lib/init.js");
648
738
 
649
739
  /***/ }),
650
740
 
651
- /***/ 33:
741
+ /***/ 30:
652
742
  /***/ (function(module, exports, __webpack_require__) {
653
743
 
654
744
  "use strict";
@@ -661,7 +751,7 @@ Object.defineProperty(exports, "__esModule", {
661
751
  });
662
752
  exports.default = void 0;
663
753
 
664
- var _leaflet = _interopRequireDefault(__webpack_require__(19));
754
+ var _leaflet = _interopRequireDefault(__webpack_require__(21));
665
755
 
666
756
  // @property lastId: Number
667
757
  // Last unique ID used by [`stamp()`](#util-stamp)
@@ -793,9 +883,9 @@ _leaflet.default.Map.include({
793
883
  delete _leaflet.default.Icon.Default.prototype._getIconUrl;
794
884
 
795
885
  _leaflet.default.Icon.Default.mergeOptions({
796
- iconRetinaUrl: __webpack_require__(34),
797
- iconUrl: __webpack_require__(35),
798
- shadowUrl: __webpack_require__(36)
886
+ iconRetinaUrl: __webpack_require__(31),
887
+ iconUrl: __webpack_require__(32),
888
+ shadowUrl: __webpack_require__(33)
799
889
  });
800
890
 
801
891
  window.L = _leaflet.default;
@@ -804,42 +894,56 @@ var _default = exports.default = _leaflet.default;
804
894
 
805
895
  /***/ }),
806
896
 
807
- /***/ 34:
897
+ /***/ 31:
808
898
  /***/ (function(module, exports) {
809
899
 
810
900
  module.exports = require("leaflet/dist/images/marker-icon-2x.png");
811
901
 
812
902
  /***/ }),
813
903
 
814
- /***/ 35:
904
+ /***/ 32:
815
905
  /***/ (function(module, exports) {
816
906
 
817
907
  module.exports = require("leaflet/dist/images/marker-icon.png");
818
908
 
819
909
  /***/ }),
820
910
 
821
- /***/ 36:
911
+ /***/ 33:
822
912
  /***/ (function(module, exports) {
823
913
 
824
914
  module.exports = require("leaflet/dist/images/marker-shadow.png");
825
915
 
826
916
  /***/ }),
827
917
 
828
- /***/ 37:
918
+ /***/ 34:
829
919
  /***/ (function(module, exports) {
830
920
 
831
921
  module.exports = require("@supermapgis/vue-iclient-leaflet/static/libs/iclient-leaflet/iclient-leaflet.min.js");
832
922
 
833
923
  /***/ }),
834
924
 
835
- /***/ 43:
925
+ /***/ 39:
836
926
  /***/ (function(module, exports) {
837
927
 
838
- module.exports = require("@babel/runtime/regenerator");
928
+ module.exports = require("@turf/center");
839
929
 
840
930
  /***/ }),
841
931
 
842
- /***/ 501:
932
+ /***/ 42:
933
+ /***/ (function(module, exports) {
934
+
935
+ module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_types/event/Events.js");
936
+
937
+ /***/ }),
938
+
939
+ /***/ 45:
940
+ /***/ (function(module, exports) {
941
+
942
+ module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_utils/epsg-define.js");
943
+
944
+ /***/ }),
945
+
946
+ /***/ 497:
843
947
  /***/ (function(module, exports, __webpack_require__) {
844
948
 
845
949
  "use strict";
@@ -852,7 +956,7 @@ Object.defineProperty(exports, "__esModule", {
852
956
  });
853
957
  exports.default = void 0;
854
958
 
855
- var _WebMap = _interopRequireDefault(__webpack_require__(502));
959
+ var _WebMap = _interopRequireDefault(__webpack_require__(498));
856
960
 
857
961
  var _init = _interopRequireDefault(__webpack_require__(3));
858
962
 
@@ -865,13 +969,13 @@ var _default = exports.default = _WebMap.default;
865
969
 
866
970
  /***/ }),
867
971
 
868
- /***/ 502:
972
+ /***/ 498:
869
973
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
870
974
 
871
975
  "use strict";
872
976
  __webpack_require__.r(__webpack_exports__);
873
- /* harmony import */ var _WebMap_vue_vue_type_template_id_3484f35d___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(277);
874
- /* harmony import */ var _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(233);
977
+ /* harmony import */ var _WebMap_vue_vue_type_template_id_0b1ce81f___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(272);
978
+ /* harmony import */ var _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(232);
875
979
  /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
876
980
  /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
877
981
 
@@ -883,8 +987,8 @@ __webpack_require__.r(__webpack_exports__);
883
987
 
884
988
  var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
885
989
  _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__["default"],
886
- _WebMap_vue_vue_type_template_id_3484f35d___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
887
- _WebMap_vue_vue_type_template_id_3484f35d___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
990
+ _WebMap_vue_vue_type_template_id_0b1ce81f___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
991
+ _WebMap_vue_vue_type_template_id_0b1ce81f___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
888
992
  false,
889
993
  null,
890
994
  null,
@@ -892,11 +996,14 @@ var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_
892
996
 
893
997
  )
894
998
 
999
+ /* hot reload */
1000
+ if (false) { var api; }
1001
+ component.options.__file = "src/leaflet/web-map/WebMap.vue"
895
1002
  /* harmony default export */ __webpack_exports__["default"] = (component.exports);
896
1003
 
897
1004
  /***/ }),
898
1005
 
899
- /***/ 503:
1006
+ /***/ 499:
900
1007
  /***/ (function(module, exports, __webpack_require__) {
901
1008
 
902
1009
  "use strict";
@@ -909,21 +1016,25 @@ Object.defineProperty(exports, "__esModule", {
909
1016
  });
910
1017
  exports.default = void 0;
911
1018
 
912
- var _regenerator = _interopRequireDefault(__webpack_require__(43));
1019
+ var _regenerator = _interopRequireDefault(__webpack_require__(247));
913
1020
 
914
1021
  var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6));
915
1022
 
916
- var _leafletWrapper = _interopRequireDefault(__webpack_require__(33));
1023
+ var _leafletWrapper = _interopRequireDefault(__webpack_require__(30));
1024
+
1025
+ var _Events = __webpack_require__(42);
917
1026
 
918
- __webpack_require__(37);
1027
+ __webpack_require__(34);
919
1028
 
920
- __webpack_require__(248);
1029
+ __webpack_require__(500);
921
1030
 
922
- var _center = _interopRequireDefault(__webpack_require__(25));
1031
+ var _center = _interopRequireDefault(__webpack_require__(39));
923
1032
 
924
- var _WebMapBase2 = _interopRequireDefault(__webpack_require__(504));
1033
+ var _proj = _interopRequireDefault(__webpack_require__(57));
925
1034
 
926
- var _epsgDefine = __webpack_require__(51);
1035
+ var _epsgDefine = __webpack_require__(45);
1036
+
1037
+ var _iclientCommonWebmapv2base = __webpack_require__(501);
927
1038
 
928
1039
  var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
929
1040
  function adopt(value) {
@@ -957,9 +1068,9 @@ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P
957
1068
  });
958
1069
  };
959
1070
 
960
- var WebMapViewModel = exports.default = /*#__PURE__*/function (_WebMapBase) {
961
- (0, _inheritsLoose2.default)(WebMapViewModel, _WebMapBase);
1071
+ var WebMapV2Base = (0, _iclientCommonWebmapv2base.createWebMapV2BaseExtending)(_Events.Events, 'triggerEvent');
962
1072
 
1073
+ var WebMapViewModel = exports.default = /*#__PURE__*/function (_WebMapV2Base) {
963
1074
  function WebMapViewModel(id, options, mapOptions) {
964
1075
  var _this;
965
1076
 
@@ -971,19 +1082,26 @@ var WebMapViewModel = exports.default = /*#__PURE__*/function (_WebMapBase) {
971
1082
  mapOptions = {};
972
1083
  }
973
1084
 
974
- _this = _WebMapBase.call(this, id, options, mapOptions) || this;
1085
+ _this = _WebMapV2Base.call(this, id, Object.assign(Object.assign({}, options), {
1086
+ credentialKey: options.accessKey && 'key' || options.accessToken && 'token',
1087
+ credentialValue: options.accessKey || options.accessToken,
1088
+ proj4: _proj.default
1089
+ }), mapOptions) || this;
975
1090
  _this.layers = {};
1091
+ _this._layers = [];
976
1092
  _this._dataflowPathIdCache = {};
977
1093
  _this._dataflowLabelIdCache = {};
978
1094
  _this._dataflowLineFeatureCache = {};
979
1095
  _this.center = mapOptions.center;
980
1096
  _this.zoom = mapOptions.zoom;
1097
+ _this.eventTypes = ['mapinitialized', 'mapcreatesucceeded', 'mapcreatefailed', 'layercreatefailed', 'baidumapnotsupport', 'projectionnotmatch', 'mapbeforeremove', 'addlayerssucceeded', 'mvtnotsupport'];
981
1098
 
982
1099
  _this._initWebMap();
983
1100
 
984
1101
  return _this;
985
1102
  }
986
1103
 
1104
+ (0, _inheritsLoose2.default)(WebMapViewModel, _WebMapV2Base);
987
1105
  var _proto = WebMapViewModel.prototype;
988
1106
 
989
1107
  _proto.resize = function resize() {
@@ -1113,7 +1231,7 @@ var WebMapViewModel = exports.default = /*#__PURE__*/function (_WebMapBase) {
1113
1231
  break;
1114
1232
 
1115
1233
  case 'MAPBOXSTYLE':
1116
- this.triggerEvent('notsupportmvt', {});
1234
+ this.triggerEvent('mvtnotsupport', {});
1117
1235
  break;
1118
1236
 
1119
1237
  default:
@@ -1142,7 +1260,7 @@ var WebMapViewModel = exports.default = /*#__PURE__*/function (_WebMapBase) {
1142
1260
  if (type === 'SAMPLE_DATA') {
1143
1261
  _this3._addLayerSucceeded();
1144
1262
 
1145
- _this3.triggerEvent('getlayerdatasourcefailed', {
1263
+ _this3.triggerEvent('layercreatefailed', {
1146
1264
  error: 'SAMPLE DATA is not supported',
1147
1265
  layer: layer,
1148
1266
  map: _this3.map
@@ -1353,7 +1471,7 @@ var WebMapViewModel = exports.default = /*#__PURE__*/function (_WebMapBase) {
1353
1471
 
1354
1472
  this._addLayerSucceeded();
1355
1473
 
1356
- this.triggerEvent('getlayerdatasourcefailed', {
1474
+ this.triggerEvent('layercreatefailed', {
1357
1475
  error: _context.t1,
1358
1476
  layer: layerInfo,
1359
1477
  map: this.map
@@ -1729,6 +1847,9 @@ var WebMapViewModel = exports.default = /*#__PURE__*/function (_WebMapBase) {
1729
1847
 
1730
1848
  _proto._createMigrationLayer = function _createMigrationLayer(layerInfo, features) {
1731
1849
  var options = this.getEchartsLayerOptions(layerInfo, features, 'leaflet');
1850
+ options.GLMap = {
1851
+ roam: true
1852
+ };
1732
1853
 
1733
1854
  var layer = _leafletWrapper.default.supermap.echartsLayer(options);
1734
1855
 
@@ -1823,7 +1944,11 @@ var WebMapViewModel = exports.default = /*#__PURE__*/function (_WebMapBase) {
1823
1944
  layerID = layerInfo.layerID,
1824
1945
  name = layerInfo.name,
1825
1946
  index = layerInfo.index;
1826
- sendToMap && (type = 'overlays');
1947
+
1948
+ if (sendToMap && type !== 'overlays') {
1949
+ type = 'overlays';
1950
+ }
1951
+
1827
1952
  type === 'overlays' && layer.setZIndex && layer.setZIndex(index + 1);
1828
1953
 
1829
1954
  if (visible === undefined || visible) {
@@ -2176,20 +2301,20 @@ var WebMapViewModel = exports.default = /*#__PURE__*/function (_WebMapBase) {
2176
2301
  _proto.getTransformCoodinatesCRS = function getTransformCoodinatesCRS(epsgCode) {
2177
2302
  var defName = "EPSG:" + epsgCode;
2178
2303
  var defValue = (0, _epsgDefine.getProjection)(defName);
2179
- return _leafletWrapper.default.Proj.CRS((0, _epsgDefine.toEpsgCode)(defValue), {
2304
+ return _leafletWrapper.default.Proj.CRS(defName, {
2180
2305
  def: defValue
2181
2306
  });
2182
2307
  };
2183
2308
 
2184
2309
  _proto.clean = function clean() {
2310
+ var _a;
2311
+
2185
2312
  if (this.map) {
2186
2313
  this.map.remove();
2187
2314
  this.stopCanvg();
2188
2315
  this.center = null;
2189
2316
  this.zoom = null;
2190
-
2191
- this._dataFlowLayer.off('dataupdated', this._updateDataFlowFeaturesCallback);
2192
-
2317
+ (_a = this._dataFlowLayer) === null || _a === void 0 ? void 0 : _a.off('dataupdated', this._updateDataFlowFeaturesCallback);
2193
2318
  this._unprojectCrs = null;
2194
2319
  }
2195
2320
  };
@@ -2199,35 +2324,2143 @@ var WebMapViewModel = exports.default = /*#__PURE__*/function (_WebMapBase) {
2199
2324
  };
2200
2325
 
2201
2326
  return WebMapViewModel;
2202
- }(_WebMapBase2.default);
2327
+ }(WebMapV2Base);
2203
2328
 
2204
2329
  /***/ }),
2205
2330
 
2206
- /***/ 504:
2331
+ /***/ 500:
2207
2332
  /***/ (function(module, exports) {
2208
2333
 
2209
- module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_mixin/WebMapBase.js");
2334
+ module.exports = require("@supermapgis/vue-iclient-leaflet/static/libs/geostats/geostats");
2210
2335
 
2211
2336
  /***/ }),
2212
2337
 
2213
- /***/ 505:
2214
- /***/ (function(module, exports) {
2338
+ /***/ 501:
2339
+ /***/ (function(module, exports, __webpack_require__) {
2215
2340
 
2216
- module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_mixin/map-events.js");
2341
+ "use strict";
2342
+ /* WEBPACK VAR INJECTION */(function(process, setImmediate, Buffer) {/*! For license information please see iclient-common-webmapv2base.js.LICENSE.txt */!function(t,e){if(true)module.exports=e();else { var n, r; }}(self,function(){return function(){var t={2635:function _(t,e,r){"use strict";var n=r(7031),i=r(2338),o=r(4221);t.exports={XMLParser:i,XMLValidator:n,XMLBuilder:o};},9705:function _(t,e){"use strict";var r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+r+"]["+r+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+n+"$");e.isExist=function(t){return void 0!==t;},e.isEmptyObject=function(t){return 0===Object.keys(t).length;},e.merge=function(t,e,r){if(e)for(var n=Object.keys(e),i=n.length,o=0;o<i;o++)t[n[o]]="strict"===r?[e[n[o]]]:e[n[o]];},e.getValue=function(t){return e.isExist(t)?t:"";},e.isName=function(t){return!(null==i.exec(t));},e.getAllMatches=function(t,e){for(var r=[],n=e.exec(t);n;){var i=[];i.startIndex=e.lastIndex-n[0].length;for(var o=n.length,a=0;a<o;a++)i.push(n[a]);r.push(i),n=e.exec(t);}return r;},e.nameRegexp=n;},7031:function _(t,e,r){"use strict";var n=r(9705),i={allowBooleanAttributes:!1,unpairedTags:[]};function o(t){return" "===t||"\t"===t||"\n"===t||"\r"===t;}function a(t,e){for(var r=e;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{var n=t.substr(r,e-r);if(e>5&&"xml"===n)return y("InvalidXml","XML declaration allowed only at the start of the document.",v(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break;}}return e;}function s(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break;}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){var r=1;for(e+=8;e<t.length;e++)if("<"===t[e])r++;else if(">"===t[e]&&0==--r)break;}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break;}return e;}e.validate=function(t,e){e=Object.assign({},i,e);var r,u=[],l=!1,h=!1;"\uFEFF"===t[0]&&(t=t.substr(1));for(var d=0;d<t.length;d++)if("<"===t[d]&&"?"===t[d+1]){if((d=a(t,d+=2)).err)return d;}else{if("<"!==t[d]){if(o(t[d]))continue;return y("InvalidChar","char '"+t[d]+"' is not expected.",v(t,d));}var m=d;if("!"===t[++d]){d=s(t,d);continue;}var g=!1;"/"===t[d]&&(g=!0,d++);for(var b="";d<t.length&&">"!==t[d]&&" "!==t[d]&&"\t"!==t[d]&&"\n"!==t[d]&&"\r"!==t[d];d++)b+=t[d];if("/"===(b=b.trim())[b.length-1]&&(b=b.substring(0,b.length-1),d--),r=b,!n.isName(r))return y("InvalidTag",0===b.trim().length?"Invalid space after '<'.":"Tag '"+b+"' is an invalid name.",v(t,d));var x=c(t,d);if(!1===x)return y("InvalidAttr","Attributes for '"+b+"' have open quote.",v(t,d));var w=x.value;if(d=x.index,"/"===w[w.length-1]){var S=d-w.length,_=f(w=w.substring(0,w.length-1),e);if(!0!==_)return y(_.err.code,_.err.msg,v(t,S+_.err.line));l=!0;}else if(g){if(!x.tagClosed)return y("InvalidTag","Closing tag '"+b+"' doesn't have proper closing.",v(t,d));if(w.trim().length>0)return y("InvalidTag","Closing tag '"+b+"' can't have attributes or invalid starting.",v(t,m));var M=u.pop();if(b!==M.tagName){var O=v(t,M.tagStartPos);return y("InvalidTag","Expected closing tag '"+M.tagName+"' (opened in line "+O.line+", col "+O.col+") instead of closing tag '"+b+"'.",v(t,m));}0==u.length&&(h=!0);}else{var P=f(w,e);if(!0!==P)return y(P.err.code,P.err.msg,v(t,d-w.length+P.err.line));if(!0===h)return y("InvalidXml","Multiple possible root nodes found.",v(t,d));-1!==e.unpairedTags.indexOf(b)||u.push({tagName:b,tagStartPos:m}),l=!0;}for(d++;d<t.length;d++)if("<"===t[d]){if("!"===t[d+1]){d=s(t,++d);continue;}if("?"!==t[d+1])break;if((d=a(t,++d)).err)return d;}else if("&"===t[d]){var k=p(t,d);if(-1==k)return y("InvalidChar","char '&' is not expected.",v(t,d));d=k;}else if(!0===h&&!o(t[d]))return y("InvalidXml","Extra text at the end",v(t,d));"<"===t[d]&&d--;}return l?1==u.length?y("InvalidTag","Unclosed tag '"+u[0].tagName+"'.",v(t,u[0].tagStartPos)):!(u.length>0)||y("InvalidXml","Invalid '"+JSON.stringify(u.map(function(t){return t.tagName;}),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):y("InvalidXml","Start tag expected.",1);};var u='"',l="'";function c(t,e){for(var r="",n="",i=!1;e<t.length;e++){if(t[e]===u||t[e]===l)""===n?n=t[e]:n!==t[e]||(n="");else if(">"===t[e]&&""===n){i=!0;break;}r+=t[e];}return""===n&&{value:r,index:e,tagClosed:i};}var h=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function f(t,e){for(var r=n.getAllMatches(t,h),i={},o=0;o<r.length;o++){if(0===r[o][1].length)return y("InvalidAttr","Attribute '"+r[o][2]+"' has no space in starting.",m(r[o]));if(void 0!==r[o][3]&&void 0===r[o][4])return y("InvalidAttr","Attribute '"+r[o][2]+"' is without value.",m(r[o]));if(void 0===r[o][3]&&!e.allowBooleanAttributes)return y("InvalidAttr","boolean attribute '"+r[o][2]+"' is not allowed.",m(r[o]));var a=r[o][2];if(!d(a))return y("InvalidAttr","Attribute '"+a+"' is an invalid name.",m(r[o]));if(i.hasOwnProperty(a))return y("InvalidAttr","Attribute '"+a+"' is repeated.",m(r[o]));i[a]=1;}return!0;}function p(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){var r=/\d/;for("x"===t[e]&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(r))break;}return-1;}(t,++e);for(var r=0;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(";"===t[e])break;return-1;}return e;}function y(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}};}function d(t){return n.isName(t);}function v(t,e){var r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1};}function m(t){return t.startIndex+t[1].length;}},4221:function _(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},n(t);}var i=r(5087),o={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function tagValueProcessor(t,e){return e;},attributeValueProcessor:function attributeValueProcessor(t,e){return e;},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function a(t){this.options=Object.assign({},o,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1;}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=l),this.processTextOrObjNode=s,this.options.format?(this.indentate=u,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return"";},this.tagEndChar=">",this.newLine="");}function s(t,e,r){var n=this.j2x(t,r+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,r):this.buildObjectNode(n.val,e,n.attrStr,r);}function u(t){return this.options.indentBy.repeat(t);}function l(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen);}a.prototype.build=function(t){return this.options.preserveOrder?i(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={},r=this.options.arrayNodeName,o=t,a=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(r),(r="symbol"==n(a)?a:a+"")in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,t=e),this.j2x(t,0).val);var e,r,o,a;},a.prototype.j2x=function(t,e){var r="",i="";for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])this.isAttribute(o)&&(i+="");else if(null===t[o])this.isAttribute(o)?i+="":"?"===o[0]?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)i+=this.buildTextValNode(t[o],o,"",e);else if("object"!==n(t[o])){var a=this.isAttribute(o);if(a)r+=this.buildAttrPairStr(a,""+t[o]);else if(o===this.options.textNodeName){var s=this.options.tagValueProcessor(o,""+t[o]);i+=this.replaceEntitiesValue(s);}else i+=this.buildTextValNode(t[o],o,"",e);}else if(Array.isArray(t[o])){for(var u=t[o].length,l="",c=0;c<u;c++){var h=t[o][c];void 0===h||(null===h?"?"===o[0]?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar:"object"===n(h)?this.options.oneListGroup?l+=this.j2x(h,e+1).val:l+=this.processTextOrObjNode(h,o,e):l+=this.buildTextValNode(h,o,"",e));}this.options.oneListGroup&&(l=this.buildObjectNode(l,o,"",e)),i+=l;}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName)for(var f=Object.keys(t[o]),p=f.length,y=0;y<p;y++)r+=this.buildAttrPairStr(f[y],""+t[o][f[y]]);else i+=this.processTextOrObjNode(t[o],o,e);return{attrStr:r,val:i};},a.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"';},a.prototype.buildObjectNode=function(t,e,r,n){if(""===t)return"?"===e[0]?this.indentate(n)+"<"+e+r+"?"+this.tagEndChar:this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar;var i="</"+e+this.tagEndChar,o="";return"?"===e[0]&&(o="?",i=""),!r&&""!==r||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===o.length?this.indentate(n)+"\x3c!--".concat(t,"--\x3e")+this.newLine:this.indentate(n)+"<"+e+r+o+this.tagEndChar+t+this.indentate(n)+i:this.indentate(n)+"<"+e+r+o+">"+t+i;},a.prototype.closeTag=function(t){var e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":"></".concat(t),e;},a.prototype.buildTextValNode=function(t,e,r,n){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(n)+"<![CDATA[".concat(t,"]]>")+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+"\x3c!--".concat(t,"--\x3e")+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;var i=this.options.tagValueProcessor(e,t);return""===(i=this.replaceEntitiesValue(i))?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+i+"</"+e+this.tagEndChar;},a.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(var e=0;e<this.options.entities.length;e++){var r=this.options.entities[e];t=t.replace(r.regex,r.val);}return t;},t.exports=a;},5087:function _(t){function e(t,a,s,u){for(var l="",c=!1,h=0;h<t.length;h++){var f=t[h],p=r(f);if(void 0!==p){var y;if(y=0===s.length?p:"".concat(s,".").concat(p),p!==a.textNodeName){if(p!==a.cdataPropName){if(p!==a.commentPropName){if("?"!==p[0]){var d=u;""!==d&&(d+=a.indentBy);var v=n(f[":@"],a),m=u+"<".concat(p).concat(v),g=e(f[p],a,y,d);-1!==a.unpairedTags.indexOf(p)?a.suppressUnpairedNode?l+=m+">":l+=m+"/>":g&&0!==g.length||!a.suppressEmptyNode?g&&g.endsWith(">")?l+=m+">".concat(g).concat(u,"</").concat(p,">"):(l+=m+">",g&&""!==u&&(g.includes("/>")||g.includes("</"))?l+=u+a.indentBy+g+u:l+=g,l+="</".concat(p,">")):l+=m+"/>",c=!0;}else{var b=n(f[":@"],a),x="?xml"===p?"":u,w=f[p][0][a.textNodeName];w=0!==w.length?" "+w:"",l+=x+"<".concat(p).concat(w).concat(b,"?>"),c=!0;}}else l+=u+"\x3c!--".concat(f[p][0][a.textNodeName],"--\x3e"),c=!0;}else c&&(l+=u),l+="<![CDATA[".concat(f[p][0][a.textNodeName],"]]>"),c=!1;}else{var S=f[p];i(y,a)||(S=o(S=a.tagValueProcessor(p,S),a)),c&&(l+=u),l+=S,c=!1;}}}return l;}function r(t){for(var e=Object.keys(t),r=0;r<e.length;r++){var n=e[r];if(t.hasOwnProperty(n)&&":@"!==n)return n;}}function n(t,e){var r="";if(t&&!e.ignoreAttributes)for(var n in t)if(t.hasOwnProperty(n)){var i=e.attributeValueProcessor(n,t[n]);!0===(i=o(i,e))&&e.suppressBooleanAttributes?r+=" ".concat(n.substr(e.attributeNamePrefix.length)):r+=" ".concat(n.substr(e.attributeNamePrefix.length),'="').concat(i,'"');}return r;}function i(t,e){var r=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(var n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+r)return!0;return!1;}function o(t,e){if(t&&t.length>0&&e.processEntities)for(var r=0;r<e.entities.length;r++){var n=e.entities[r];t=t.replace(n.regex,n.val);}return t;}t.exports=function(t,r){var n="";return r.format&&r.indentBy.length>0&&(n="\n"),e(t,r,"",n);};},6193:function _(t,e,r){function n(t,e){return function(t){if(Array.isArray(t))return t;}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,l=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1;}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){l=!0,i=t;}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return;}finally{if(l)throw i;}}return s;}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(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)?i(t,e):void 0;}}(t,e)||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.");}();}function i(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 o=r(9705);function a(t,e){for(var r="";e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)r+=t[e];if(-1!==(r=r.trim()).indexOf(" "))throw new Error("External entites are not supported");for(var n=t[e++],i="";e<t.length&&t[e]!==n;e++)i+=t[e];return[r,i,e];}function s(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3];}function u(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7];}function l(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8];}function c(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8];}function h(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9];}function f(t){if(o.isName(t))return t;throw new Error("Invalid entity name ".concat(t));}t.exports=function(t,e){var r={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");e+=9;for(var i=1,o=!1,p=!1;e<t.length;e++)if("<"!==t[e]||p){if(">"===t[e]){if(p?"-"===t[e-1]&&"-"===t[e-2]&&(p=!1,i--):i--,0===i)break;}else"["===t[e]?o=!0:t[e];}else{if(o&&u(t,e)){var y=n(a(t,(e+=7)+1),3);entityName=y[0],val=y[1],e=y[2],-1===val.indexOf("&")&&(r[f(entityName)]={regx:RegExp("&".concat(entityName,";"),"g"),val:val});}else if(o&&l(t,e))e+=8;else if(o&&c(t,e))e+=8;else if(o&&h(t,e))e+=9;else{if(!s)throw new Error("Invalid DOCTYPE");p=!0;}i++;}if(0!==i)throw new Error("Unclosed DOCTYPE");return{entities:r,i:e};};},5063:function _(t,e){var r={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function tagValueProcessor(t,e){return e;},attributeValueProcessor:function attributeValueProcessor(t,e){return e;},stopNodes:[],alwaysCreateTextNode:!1,isArray:function isArray(){return!1;},commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function updateTag(t,e,r){return t;}};e.buildOptions=function(t){return Object.assign({},r,t);},e.defaultOptions=r;},9299:function _(t,e,r){"use strict";function n(t,e,r){return(e=s(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t;}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},i(t);}function o(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,s(n.key),n);}}function a(t,e,r){return e&&o(t.prototype,e),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;}function s(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==i(e)?e:e+"";}var u=r(9705),l=r(3365),c=r(6193),h=r(7494),f=a(function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:function val(t,e){return String.fromCharCode(Number.parseInt(e,10));}},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:function val(t,e){return String.fromCharCode(Number.parseInt(e,16));}}},this.addExternalEntities=p,this.parseXml=g,this.parseTextData=y,this.resolveNameSpace=d,this.buildAttributesMap=m,this.isItStopNode=S,this.replaceEntitiesValue=x,this.readStopNodeData=O,this.saveTextToParentTag=w,this.addChild=b;});function p(t){for(var e=Object.keys(t),r=0;r<e.length;r++){var n=e[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:t[n]};}}function y(t,e,r,n,o,a,s){if(void 0!==t&&(this.options.trimValues&&!n&&(t=t.trim()),t.length>0)){s||(t=this.replaceEntitiesValue(t));var u=this.options.tagValueProcessor(e,t,r,o,a);return null==u?t:i(u)!==i(t)||u!==t?u:this.options.trimValues||t.trim()===t?P(t,this.options.parseTagValue,this.options.numberParseOptions):t;}}function d(t){if(this.options.removeNSPrefix){var e=t.split(":"),r="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=r+e[1]);}return t;}var v=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function m(t,e,r){if(!this.options.ignoreAttributes&&"string"==typeof t){for(var n=u.getAllMatches(t,v),o=n.length,a={},s=0;s<o;s++){var l=this.resolveNameSpace(n[s][1]),c=n[s][4],h=this.options.attributeNamePrefix+l;if(l.length)if(this.options.transformAttributeName&&(h=this.options.transformAttributeName(h)),"__proto__"===h&&(h="#__proto__"),void 0!==c){this.options.trimValues&&(c=c.trim()),c=this.replaceEntitiesValue(c);var f=this.options.attributeValueProcessor(l,c,e);null==f?a[h]=c:i(f)!==i(c)||f!==c?a[h]=f:a[h]=P(c,this.options.parseAttributeValue,this.options.numberParseOptions);}else this.options.allowBooleanAttributes&&(a[h]=!0);}if(!Object.keys(a).length)return;if(this.options.attributesGroupName){var p={};return p[this.options.attributesGroupName]=a,p;}return a;}}var g=function g(t){t=t.replace(/\r\n?/g,"\n");for(var e=new l("!xml"),r=e,i="",o="",a=0;a<t.length;a++)if("<"===t[a]){if("/"===t[a+1]){var s=_(t,">",a,"Closing Tag is not closed."),u=t.substring(a+2,s).trim();if(this.options.removeNSPrefix){var h=u.indexOf(":");-1!==h&&(u=u.substr(h+1));}this.options.transformTagName&&(u=this.options.transformTagName(u)),r&&(i=this.saveTextToParentTag(i,r,o));var f=o.substring(o.lastIndexOf(".")+1);if(u&&-1!==this.options.unpairedTags.indexOf(u))throw new Error("Unpaired tag can not be used as closing tag: </".concat(u,">"));var p=0;f&&-1!==this.options.unpairedTags.indexOf(f)?(p=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):p=o.lastIndexOf("."),o=o.substring(0,p),r=this.tagsNodeStack.pop(),i="",a=s;}else if("?"===t[a+1]){var y=M(t,a,!1,"?>");if(!y)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,r,o),this.options.ignoreDeclaration&&"?xml"===y.tagName||this.options.ignorePiTags);else{var d=new l(y.tagName);d.add(this.options.textNodeName,""),y.tagName!==y.tagExp&&y.attrExpPresent&&(d[":@"]=this.buildAttributesMap(y.tagExp,o,y.tagName)),this.addChild(r,d,o);}a=y.closeIndex+1;}else if("!--"===t.substr(a+1,3)){var v=_(t,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){var m=t.substring(a+4,v-2);i=this.saveTextToParentTag(i,r,o),r.add(this.options.commentPropName,[n({},this.options.textNodeName,m)]);}a=v;}else if("!D"===t.substr(a+1,2)){var g=c(t,a);this.docTypeEntities=g.entities,a=g.i;}else if("!["===t.substr(a+1,2)){var b=_(t,"]]>",a,"CDATA is not closed.")-2,x=t.substring(a+9,b);i=this.saveTextToParentTag(i,r,o);var w=this.parseTextData(x,r.tagname,o,!0,!1,!0,!0);null==w&&(w=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[n({},this.options.textNodeName,x)]):r.add(this.options.textNodeName,w),a=b+2;}else{var S=M(t,a,this.options.removeNSPrefix),O=S.tagName,P=S.rawTagName,k=S.tagExp,E=S.attrExpPresent,C=S.closeIndex;this.options.transformTagName&&(O=this.options.transformTagName(O)),r&&i&&"!xml"!==r.tagname&&(i=this.saveTextToParentTag(i,r,o,!1));var T=r;if(T&&-1!==this.options.unpairedTags.indexOf(T.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),O!==e.tagname&&(o+=o?"."+O:O),this.isItStopNode(this.options.stopNodes,o,O)){var A="";if(k.length>0&&k.lastIndexOf("/")===k.length-1)a=S.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(O))a=S.closeIndex;else{var N=this.readStopNodeData(t,P,C+1);if(!N)throw new Error("Unexpected end of ".concat(P));a=N.i,A=N.tagContent;}var j=new l(O);O!==k&&E&&(j[":@"]=this.buildAttributesMap(k,o,O)),A&&(A=this.parseTextData(A,O,o,!0,E,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),j.add(this.options.textNodeName,A),this.addChild(r,j,o);}else{if(k.length>0&&k.lastIndexOf("/")===k.length-1){"/"===O[O.length-1]?(O=O.substr(0,O.length-1),o=o.substr(0,o.length-1),k=O):k=k.substr(0,k.length-1),this.options.transformTagName&&(O=this.options.transformTagName(O));var I=new l(O);O!==k&&E&&(I[":@"]=this.buildAttributesMap(k,o,O)),this.addChild(r,I,o),o=o.substr(0,o.lastIndexOf("."));}else{var R=new l(O);this.tagsNodeStack.push(r),O!==k&&E&&(R[":@"]=this.buildAttributesMap(k,o,O)),this.addChild(r,R,o),r=R;}i="",a=C;}}}else i+=t[a];return e.child;};function b(t,e,r){var n=this.options.updateTag(e.tagname,r,e[":@"]);!1===n||("string"==typeof n?(e.tagname=n,t.addChild(e)):t.addChild(e));}var x=function x(t){if(this.options.processEntities){for(var e in this.docTypeEntities){var r=this.docTypeEntities[e];t=t.replace(r.regx,r.val);}for(var n in this.lastEntities){var i=this.lastEntities[n];t=t.replace(i.regex,i.val);}if(this.options.htmlEntities)for(var o in this.htmlEntities){var a=this.htmlEntities[o];t=t.replace(a.regex,a.val);}t=t.replace(this.ampEntity.regex,this.ampEntity.val);}return t;};function w(t,e,r,n){return t&&(void 0===n&&(n=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,r,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t;}function S(t,e,r){var n="*."+r;for(var i in t){var o=t[i];if(n===o||e===o)return!0;}return!1;}function _(t,e,r,n){var i=t.indexOf(e,r);if(-1===i)throw new Error(n);return i+e.length-1;}function M(t,e,r){var n=function(t,e){for(var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",i="",o=e;o<t.length;o++){var a=t[o];if(r)a===r&&(r="");else if('"'===a||"'"===a)r=a;else if(a===n[0]){if(!n[1])return{data:i,index:o};if(t[o+1]===n[1])return{data:i,index:o};}else"\t"===a&&(a=" ");i+=a;}}(t,e+1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:">");if(n){var i=n.data,o=n.index,a=i.search(/\s/),s=i,u=!0;-1!==a&&(s=i.substring(0,a),i=i.substring(a+1).trimStart());var l=s;if(r){var c=s.indexOf(":");-1!==c&&(u=(s=s.substr(c+1))!==n.data.substr(c+1));}return{tagName:s,tagExp:i,closeIndex:o,attrExpPresent:u,rawTagName:l};}}function O(t,e,r){for(var n=r,i=1;r<t.length;r++)if("<"===t[r])if("/"===t[r+1]){var o=_(t,">",r,"".concat(e," is not closed"));if(t.substring(r+2,o).trim()===e&&0==--i)return{tagContent:t.substring(n,r),i:o};r=o;}else if("?"===t[r+1])r=_(t,"?>",r+1,"StopNode is not closed.");else if("!--"===t.substr(r+1,3))r=_(t,"--\x3e",r+3,"StopNode is not closed.");else if("!["===t.substr(r+1,2))r=_(t,"]]>",r,"StopNode is not closed.")-2;else{var a=M(t,r,">");a&&((a&&a.tagName)===e&&"/"!==a.tagExp[a.tagExp.length-1]&&i++,r=a.closeIndex);}}function P(t,e,r){if(e&&"string"==typeof t){var n=t.trim();return"true"===n||"false"!==n&&h(t,r);}return u.isExist(t)?t:"";}t.exports=f;},2338:function _(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},n(t);}function i(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,o(n.key),n);}}function o(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==n(e)?e:e+"";}var a=r(5063).buildOptions,s=r(9299),u=r(9728).prettify,l=r(7031),c=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.externalEntities={},this.options=a(e);},(e=[{key:"parse",value:function value(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString();}if(e){!0===e&&(e={});var r=l.validate(t,e);if(!0!==r)throw Error("".concat(r.err.msg,":").concat(r.err.line,":").concat(r.err.col));}var n=new s(this.options);n.addExternalEntities(this.externalEntities);var i=n.parseXml(t);return this.options.preserveOrder||void 0===i?i:u(i,this.options);}},{key:"addEntity",value:function value(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e;}}])&&i(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e;}();t.exports=c;},9728:function _(t,e){"use strict";function r(t,e,a){for(var s,u={},l=0;l<t.length;l++){var c,h=t[l],f=n(h);if(c=void 0===a?f:a+"."+f,f===e.textNodeName)void 0===s?s=h[f]:s+=""+h[f];else{if(void 0===f)continue;if(h[f]){var p=r(h[f],e,c),y=o(p,e);h[":@"]?i(p,h[":@"],c,e):1!==Object.keys(p).length||void 0===p[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(p).length&&(e.alwaysCreateTextNode?p[e.textNodeName]="":p=""):p=p[e.textNodeName],void 0!==u[f]&&u.hasOwnProperty(f)?(Array.isArray(u[f])||(u[f]=[u[f]]),u[f].push(p)):e.isArray(f,c,y)?u[f]=[p]:u[f]=p;}}}return"string"==typeof s?s.length>0&&(u[e.textNodeName]=s):void 0!==s&&(u[e.textNodeName]=s),u;}function n(t){for(var e=Object.keys(t),r=0;r<e.length;r++){var n=e[r];if(":@"!==n)return n;}}function i(t,e,r,n){if(e)for(var i=Object.keys(e),o=i.length,a=0;a<o;a++){var s=i[a];n.isArray(s,r+"."+s,!0,!0)?t[s]=[e[s]]:t[s]=e[s];}}function o(t,e){var r=e.textNodeName,n=Object.keys(t).length;return 0===n||!(1!==n||!t[r]&&"boolean"!=typeof t[r]&&0!==t[r]);}e.prettify=function(t,e){return r(t,e);};},3365:function _(t){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},e(t);}function r(t,e,r){return(e=i(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t;}function n(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,i(n.key),n);}}function i(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==e(r)?r:r+"";}var o=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.tagname=e,this.child=[],this[":@"]={};},(e=[{key:"add",value:function value(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push(r({},t,e));}},{key:"addChild",value:function value(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push(r(r({},t.tagname,t.child),":@",t[":@"])):this.child.push(r({},t.tagname,t.child));}}])&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e;}();t.exports=o;},4537:function _(t){!function(e){"use strict";if(e.__disableNativeFetch||!e.fetch){l.prototype.append=function(t,e){t=s(t),e=u(e);var r=this.map[t];r||(r=[],this.map[t]=r),r.push(e);},l.prototype.delete=function(t){delete this.map[s(t)];},l.prototype.get=function(t){var e=this.map[s(t)];return e?e[0]:null;},l.prototype.getAll=function(t){return this.map[s(t)]||[];},l.prototype.has=function(t){return this.map.hasOwnProperty(s(t));},l.prototype.set=function(t,e){this.map[s(t)]=[u(e)];},l.prototype.forEach=function(t,e){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(n){t.call(e,n,r,this);},this);},this);};var r="FileReader"in e&&"Blob"in e&&function(){try{return new Blob(),!0;}catch(t){return!1;}}(),n=("FormData"in e),i=("ArrayBuffer"in e),o=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];y.prototype.clone=function(){return new y(this);},p.call(y.prototype),p.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url});},m.error=function(){var t=new m(null,{status:0,statusText:""});return t.type="error",t;};var a=[301,302,303,307,308];m.redirect=function(t,e){if(-1===a.indexOf(e))throw new RangeError("Invalid status code");return new m(null,{status:e,headers:{location:t}});},e.Headers=l,e.Request=y,e.Response=m,e.fetch=function(t,e){return new Promise(function(n,i){var o;o=y.prototype.isPrototypeOf(t)&&!e?t:new y(t,e);var a=new XMLHttpRequest(),s=!1;function u(){if(4===a.readyState){var t=1223===a.status?204:a.status;if(t<100||t>599){if(s)return;return s=!0,void i(new TypeError("Network request failed"));}var e={status:t,statusText:a.statusText,headers:v(a),url:"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0},r="response"in a?a.response:a.responseText;s||(s=!0,n(new m(r,e)));}}a.onreadystatechange=u,a.onload=u,a.onerror=function(){s||(s=!0,i(new TypeError("Network request failed")));},a.open(o.method,o.url,!0);try{"include"===o.credentials&&("withCredentials"in a?a.withCredentials=!0:console&&console.warn&&console.warn("withCredentials is not supported, you can ignore this warning"));}catch(t){console&&console.warn&&console.warn("set withCredentials error:"+t);}"responseType"in a&&r&&(a.responseType="blob"),o.headers.forEach(function(t,e){a.setRequestHeader(e,t);}),a.send(void 0===o._bodyInit?null:o._bodyInit);});},e.fetch.polyfill=!0,t.exports&&(t.exports=e.fetch);}function s(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase();}function u(t){return"string"!=typeof t&&(t=String(t)),t;}function l(t){this.map={},t instanceof l?t.forEach(function(t,e){this.append(e,t);},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e]);},this);}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0;}function h(t){return new Promise(function(e,r){t.onload=function(){e(t.result);},t.onerror=function(){r(t.error);};});}function f(t){var e=new FileReader();return e.readAsArrayBuffer(t),h(e);}function p(){return this.bodyUsed=!1,this._initBody=function(t,e){if(this._bodyInit=t,"string"==typeof t)this._bodyText=t;else if(r&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t,this._options=e;else if(n&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(t){if(!i||!ArrayBuffer.prototype.isPrototypeOf(t))throw new Error("unsupported BodyInit type");}else this._bodyText="";},r?(this.blob=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]));},this.arrayBuffer=function(){return this.blob().then(f);},this.text=function(){var t,e,r,n,i,o,a,s=c(this);if(s)return s;if(this._bodyBlob)return t=this._bodyBlob,e=this._options,r=new FileReader(),n=e.headers.map["content-type"]?e.headers.map["content-type"].toString():"",i=/charset\=[0-9a-zA-Z\-\_]*;?/,o=t.type.match(i)||n.match(i),a=[t],o&&a.push(o[0].replace(/^charset\=/,"").replace(/;$/,"")),r.readAsText.apply(r,a),h(r);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText);}):this.text=function(){return c(this)||Promise.resolve(this._bodyText);},n&&(this.formData=function(){return this.text().then(d);}),this.json=function(){return this.text().then(JSON.parse);},this;}function y(t,e){var r,n,i=(e=e||{}).body;if(y.prototype.isPrototypeOf(t)){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new l(t.headers)),this.method=t.method,this.mode=t.mode,i||(i=t._bodyInit,t.bodyUsed=!0);}else this.url=t;if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new l(e.headers)),this.method=(n=(r=e.method||this.method||"GET").toUpperCase(),o.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i,e);}function d(t){var e=new FormData();return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i));}}),e;}function v(t){var e=new l();return t.getAllResponseHeaders().trim().split("\n").forEach(function(t){var r=t.trim().split(":"),n=r.shift().trim(),i=r.join(":").trim();e.append(n,i);}),e;}function m(t,e){e||(e={}),this._initBody(t,e),this.type="default",this.status=e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText,this.headers=e.headers instanceof l?e.headers:new l(e.headers),this.url=e.url||"";}}("undefined"!=typeof self?self:this);},9005:function _(t,e){var r,n;r=function r(t,e){"use strict";var r=5e3,n="callback";function i(t){try{delete window[t];}catch(e){window[t]=void 0;}}function o(t){var e=document.getElementById(t);e&&document.getElementsByTagName("head")[0].removeChild(e);}e.exports=function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=t,s=e.timeout||r,u=e.jsonpCallback||n,l=void 0;return new Promise(function(r,n){var c=e.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),h=u+"_"+c;window[c]=function(t){r({ok:!0,json:function json(){return Promise.resolve(t);}}),l&&clearTimeout(l),o(h),i(c);},a+=-1===a.indexOf("?")?"?":"&";var f=document.createElement("script");f.setAttribute("src",""+a+u+"="+c),e.charset&&f.setAttribute("charset",e.charset),f.id=h,document.getElementsByTagName("head")[0].appendChild(f),l=setTimeout(function(){n(new Error("JSONP request to "+t+" timed out")),i(c),o(h),window[c]=function(){i(c);};},s),f.onerror=function(){n(new Error("JSONP request to "+t+" failed")),i(c),o(h),l&&clearTimeout(l);};});};},void 0===(n=r.apply(e,[e,t]))||(t.exports=n);},108:function _(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},n(t);}var i="__lodash_hash_undefined__",o=9007199254740991,a="[object Arguments]",s="[object Function]",u="[object GeneratorFunction]",l=/^\[object .+?Constructor\]$/,c="object"==(void 0===r.g?"undefined":n(r.g))&&r.g&&r.g.Object===Object&&r.g,h="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,f=c||h||Function("return this")();function p(t,e){return!(!t||!t.length)&&function(t,e,r){if(e!=e)return function(t,e,r,n){for(var i=t.length,o=-1;++o<i;)if(e(t[o],o,t))return o;return-1;}(t,v);for(var n=-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1;}(t,e)>-1;}function y(t,e,r){for(var n=-1,i=t?t.length:0;++n<i;)if(r(e,t[n]))return!0;return!1;}function d(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t;}function v(t){return t!=t;}function m(t,e){return t.has(e);}var g,b=Array.prototype,x=Function.prototype,w=Object.prototype,S=f["__core-js_shared__"],_=(g=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",M=x.toString,O=w.hasOwnProperty,P=w.toString,k=RegExp("^"+M.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=f.Symbol,C=w.propertyIsEnumerable,T=b.splice,A=E?E.isConcatSpreadable:void 0,N=Math.max,j=V(f,"Map"),I=V(Object,"create");function R(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1]);}}function L(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1]);}}function F(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1]);}}function D(t){var e=-1,r=t?t.length:0;for(this.__data__=new F();++e<r;)this.add(t[e]);}function B(t,e){for(var r,n,i=t.length;i--;)if((r=t[i][0])===(n=e)||r!=r&&n!=n)return i;return-1;}function G(t,e,r,n,i){var o=-1,a=t.length;for(r||(r=q),i||(i=[]);++o<a;){var s=t[o];e>0&&r(s)?e>1?G(s,e-1,r,n,i):d(i,s):n||(i[i.length]=s);}return i;}function U(t,e){var r,i,o=t.__data__;return("string"==(i=n(r=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map;}function V(t,e){var r=function(t,e){return null==t?void 0:t[e];}(t,e);return function(t){if(!J(t)||_&&_ in t)return!1;var e=Y(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"");}catch(t){}return e;}(t)?k:l;return e.test(function(t){if(null!=t){try{return M.call(t);}catch(t){}try{return t+"";}catch(t){}}return"";}(t));}(r)?r:void 0;}function q(t){return W(t)||function(t){return X(t)&&O.call(t,"callee")&&(!C.call(t,"callee")||P.call(t)==a);}(t)||!!(A&&t&&t[A]);}R.prototype.clear=function(){this.__data__=I?I(null):{};},R.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t];},R.prototype.get=function(t){var e=this.__data__;if(I){var r=e[t];return r===i?void 0:r;}return O.call(e,t)?e[t]:void 0;},R.prototype.has=function(t){var e=this.__data__;return I?void 0!==e[t]:O.call(e,t);},R.prototype.set=function(t,e){return this.__data__[t]=I&&void 0===e?i:e,this;},L.prototype.clear=function(){this.__data__=[];},L.prototype.delete=function(t){var e=this.__data__,r=B(e,t);return!(r<0||(r==e.length-1?e.pop():T.call(e,r,1),0));},L.prototype.get=function(t){var e=this.__data__,r=B(e,t);return r<0?void 0:e[r][1];},L.prototype.has=function(t){return B(this.__data__,t)>-1;},L.prototype.set=function(t,e){var r=this.__data__,n=B(r,t);return n<0?r.push([t,e]):r[n][1]=e,this;},F.prototype.clear=function(){this.__data__={hash:new R(),map:new(j||L)(),string:new R()};},F.prototype.delete=function(t){return U(this,t).delete(t);},F.prototype.get=function(t){return U(this,t).get(t);},F.prototype.has=function(t){return U(this,t).has(t);},F.prototype.set=function(t,e){return U(this,t).set(t,e),this;},D.prototype.add=D.prototype.push=function(t){return this.__data__.set(t,i),this;},D.prototype.has=function(t){return this.__data__.has(t);};var z,H,Q=(z=function z(t,e){return X(t)?function(t,e,r,n){var i,o=-1,a=p,s=!0,u=t.length,l=[],c=e.length;if(!u)return l;r&&(e=function(t,e){for(var r=-1,n=t?t.length:0,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i;}(e,(i=r,function(t){return i(t);}))),n?(a=y,s=!1):e.length>=200&&(a=m,s=!1,e=new D(e));t:for(;++o<u;){var h=t[o],f=r?r(h):h;if(h=n||0!==h?h:0,s&&f==f){for(var d=c;d--;)if(e[d]===f)continue t;l.push(h);}else a(e,f,n)||l.push(h);}return l;}(t,G(e,1,X,!0)):[];},H=N(void 0===H?z.length-1:H,0),function(){for(var t=arguments,e=-1,r=N(t.length-H,0),n=Array(r);++e<r;)n[e]=t[H+e];e=-1;for(var i=Array(H+1);++e<H;)i[e]=t[e];return i[H]=n,function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2]);}return t.apply(e,r);}(z,this,i);}),W=Array.isArray;function X(t){return function(t){return!!t&&"object"==n(t);}(t)&&function(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o;}(t.length)&&!Y(t);}(t);}function Y(t){var e=J(t)?P.call(t):"";return e==s||e==u;}function J(t){var e=n(t);return!!t&&("object"==e||"function"==e);}t.exports=Q;},9158:function _(t){(function(){var e,r,n,i,o,a;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now();}:"undefined"!=typeof process&&null!==process&&process.hrtime?(t.exports=function(){return(e()-o)/1e6;},r=process.hrtime,i=(e=function e(){var t;return 1e9*(t=r())[0]+t[1];})(),a=1e9*process.uptime(),o=i-a):Date.now?(t.exports=function(){return Date.now()-n;},n=Date.now()):(t.exports=function(){return new Date().getTime()-n;},n=new Date().getTime());}).call(this);},3819:function _(t,e,r){var n,i,o;function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},a(t);}o=function o(){"use strict";function t(t){var e=this.constructor;return this.then(function(r){return e.resolve(t()).then(function(){return r;});},function(r){return e.resolve(t()).then(function(){return e.reject(r);});});}function e(t){return new this(function(e,r){if(!t||void 0===t.length)return r(new TypeError(a(t)+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var n=Array.prototype.slice.call(t);if(0===n.length)return e([]);var i=n.length;function o(t,r){if(r&&("object"===a(r)||"function"==typeof r)){var s=r.then;if("function"==typeof s)return void s.call(r,function(e){o(t,e);},function(r){n[t]={status:"rejected",reason:r},0==--i&&e(n);});}n[t]={status:"fulfilled",value:r},0==--i&&e(n);}for(var s=0;s<n.length;s++)o(s,n[s]);});}var n=setTimeout;function i(t){return Boolean(t&&void 0!==t.length);}function o(){}function s(t){if(!(this instanceof s))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(t,this);}function u(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,s._immediateFn(function(){var r=1===t._state?e.onFulfilled:e.onRejected;if(null!==r){var n;try{n=r(t._value);}catch(t){return void c(e.promise,t);}l(e.promise,n);}else(1===t._state?l:c)(e.promise,t._value);})):t._deferreds.push(e);}function l(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===a(e)||"function"==typeof e)){var r=e.then;if(e instanceof s)return t._state=3,t._value=e,void h(t);if("function"==typeof r)return void p((n=r,i=e,function(){n.apply(i,arguments);}),t);}t._state=1,t._value=e,h(t);}catch(e){c(t,e);}var n,i;}function c(t,e){t._state=2,t._value=e,h(t);}function h(t){2===t._state&&0===t._deferreds.length&&s._immediateFn(function(){t._handled||s._unhandledRejectionFn(t._value);});for(var e=0,r=t._deferreds.length;e<r;e++)u(t,t._deferreds[e]);t._deferreds=null;}function f(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r;}function p(t,e){var r=!1;try{t(function(t){r||(r=!0,l(e,t));},function(t){r||(r=!0,c(e,t));});}catch(t){if(r)return;r=!0,c(e,t);}}s.prototype.catch=function(t){return this.then(null,t);},s.prototype.then=function(t,e){var r=new this.constructor(o);return u(this,new f(t,e,r)),r;},s.prototype.finally=t,s.all=function(t){return new s(function(e,r){if(!i(t))return r(new TypeError("Promise.all accepts an array"));var n=Array.prototype.slice.call(t);if(0===n.length)return e([]);var o=n.length;function s(t,i){try{if(i&&("object"===a(i)||"function"==typeof i)){var u=i.then;if("function"==typeof u)return void u.call(i,function(e){s(t,e);},r);}n[t]=i,0==--o&&e(n);}catch(t){r(t);}}for(var u=0;u<n.length;u++)s(u,n[u]);});},s.allSettled=e,s.resolve=function(t){return t&&"object"===a(t)&&t.constructor===s?t:new s(function(e){e(t);});},s.reject=function(t){return new s(function(e,r){r(t);});},s.race=function(t){return new s(function(e,r){if(!i(t))return r(new TypeError("Promise.race accepts an array"));for(var n=0,o=t.length;n<o;n++)s.resolve(t[n]).then(e,r);});},s._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t);}||function(t){n(t,0);},s._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t);};var y=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object");}();"function"!=typeof y.Promise?y.Promise=s:(y.Promise.prototype.finally||(y.Promise.prototype.finally=t),y.Promise.allSettled||(y.Promise.allSettled=e));},"object"===a(e)?o():void 0===(i="function"==typeof(n=o)?n.call(e,r,e,t):n)||(t.exports=i);},7791:function _(t,e,r){for(var n=r(9158),i="undefined"==typeof window?r.g:window,o=["moz","webkit"],a="AnimationFrame",s=i["request"+a],u=i["cancel"+a]||i["cancelRequest"+a],l=0;!s&&l<o.length;l++)s=i[o[l]+"Request"+a],u=i[o[l]+"Cancel"+a]||i[o[l]+"CancelRequest"+a];if(!s||!u){var c=0,h=0,f=[],p=1e3/60;s=function s(t){if(0===f.length){var e=n(),r=Math.max(0,p-(e-c));c=r+e,setTimeout(function(){var t=f.slice(0);f.length=0;for(var e=function e(){if(!t[r].cancelled)try{t[r].callback(c);}catch(t){setTimeout(function(){throw t;},0);}},r=0;r<t.length;r++)e();},Math.round(r));}return f.push({handle:++h,callback:t,cancelled:!1}),h;},u=function u(t){for(var e=0;e<f.length;e++)f[e].handle===t&&(f[e].cancelled=!0);};}t.exports=function(t){return s.call(i,t);},t.exports.cancel=function(){u.apply(i,arguments);},t.exports.polyfill=function(t){t||(t=i),t.requestAnimationFrame=s,t.cancelAnimationFrame=u;};},8476:function _(t){t.exports=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=e[t]||t;for(var r=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function process(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])];}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function process(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])];}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function process(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)];}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function process(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)];}}],n=0;n<r.length;n++){var i=r[n].re,o=r[n].process,a=i.exec(t);if(a){var s=o(a);this.r=s[0],this.g=s[1],this.b=s[2],s.length>3&&(this.alpha=s[3]),this.ok=!0;}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")";},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")";},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==r.length&&(r="0"+r),"#"+t+e+r;},this.getHelpXML=function(){for(var t=new Array(),n=0;n<r.length;n++)for(var i=r[n].example,o=0;o<i.length;o++)t[t.length]=i[o];for(var a in e)t[t.length]=a;var s=document.createElement("ul");for(s.setAttribute("id","rgbcolor-examples"),n=0;n<t.length;n++)try{var u=document.createElement("li"),l=new RGBColor(t[n]),c=document.createElement("div");c.style.cssText="margin: 3px; border: 1px solid black; background:"+l.toHex()+"; color:"+l.toHex(),c.appendChild(document.createTextNode("test"));var h=document.createTextNode(" "+t[n]+" -> "+l.toRGB()+" -> "+l.toHex());u.appendChild(c),u.appendChild(h),s.appendChild(u);}catch(t){}return s;};};},7494:function _(t){var e=/^[-+]?0x[a-fA-F0-9]+$/,r=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);var n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};t.exports=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i=Object.assign({},n,i),!t||"string"!=typeof t)return t;var o=t.trim();if(void 0!==i.skipLike&&i.skipLike.test(o))return t;if(i.hex&&e.test(o))return Number.parseInt(o,16);var a=r.exec(o);if(a){var s=a[1],u=a[2],l=function(t){return t&&-1!==t.indexOf(".")?("."===(t=t.replace(/0+$/,""))?t="0":"."===t[0]?t="0"+t:"."===t[t.length-1]&&(t=t.substr(0,t.length-1)),t):t;}(a[3]),c=a[4]||a[6];if(!i.leadingZeros&&u.length>0&&s&&"."!==o[2])return t;if(!i.leadingZeros&&u.length>0&&!s&&"."!==o[1])return t;var h=Number(o),f=""+h;return-1!==f.search(/[eE]/)||c?i.eNotation?h:t:-1!==o.indexOf(".")?"0"===f&&""===l||f===l||s&&f==="-"+l?h:t:u?l===f||s+l===f?h:t:o===f||o===s+f?h:t;}return t;};},6369:function _(t,e,r){var n,i;function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},o(t);}t=r.nmd(t),function(a,s){"use strict";"object"===o(t)&&t.exports?t.exports=s():void 0===(i="function"==typeof(n=s)?n.call(e,r,e,t):n)||(t.exports=i);}(0,function(t){"use strict";var e=t&&t.IPv6;return{best:function best(t){var e,r,n=t.toLowerCase().split(":"),i=n.length,o=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[i-1]&&""===n[i-2]&&n.pop(),-1!==n[(i=n.length)-1].indexOf(".")&&(o=7),e=0;e<i&&""!==n[e];e++);if(e<o)for(n.splice(e,1,"0000");n.length<o;)n.splice(e,0,"0000");for(var a=0;a<o;a++){r=n[a].split("");for(var s=0;s<3&&"0"===r[0]&&r.length>1;s++)r.splice(0,1);n[a]=r.join("");}var u=-1,l=0,c=0,h=-1,f=!1;for(a=0;a<o;a++)f?"0"===n[a]?c+=1:(f=!1,c>l&&(u=h,l=c)):"0"===n[a]&&(f=!0,h=a,c=1);c>l&&(u=h,l=c),l>1&&n.splice(u,l,""),i=n.length;var p="";for(""===n[0]&&(p=":"),a=0;a<i&&(p+=n[a],a!==i-1);a++)p+=":";return""===n[i-1]&&(p+=":"),p;},noConflict:function noConflict(){return t.IPv6===this&&(t.IPv6=e),this;}};});},7011:function _(t,e,r){var n,i;function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},o(t);}t=r.nmd(t),function(a,s){"use strict";"object"===o(t)&&t.exports?t.exports=s():void 0===(i="function"==typeof(n=s)?n.call(e,r,e,t):n)||(t.exports=i);}(0,function(t){"use strict";var e=t&&t.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function has(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return!1;var i=r.list[t.slice(e+1)];return!!i&&i.indexOf(" "+t.slice(n+1,e)+" ")>=0;},is:function is(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var n=r.list[t.slice(e+1)];return!!n&&n.indexOf(" "+t.slice(0,e)+" ")>=0;},get:function get(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return null;var i=r.list[t.slice(e+1)];return i?i.indexOf(" "+t.slice(n+1,e)+" ")<0?null:t.slice(n+1):null;},noConflict:function noConflict(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this;}};return r;});},9216:function _(t,e,r){var n,i,o;function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},a(t);}t=r.nmd(t),function(s,u){"use strict";"object"===a(t)&&t.exports?t.exports=u(r(2323),r(6369),r(7011)):(i=[r(2323),r(6369),r(7011)],void 0===(o="function"==typeof(n=u)?n.apply(e,i):n)||(t.exports=o));}(0,function(t,e,r,n){"use strict";var i=n&&n.URI;function o(t,e){var r=arguments.length>=1;if(!(this instanceof o))return r?arguments.length>=2?new o(t,e):new o(t):new o();if(void 0===t){if(r)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":"";}if(null===t&&r)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this;}o.version="1.19.11";var s=o.prototype,u=Object.prototype.hasOwnProperty;function l(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1");}function c(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1);}function h(t){return"Array"===c(t);}function f(t,e){var r,n,i={};if("RegExp"===c(e))i=null;else if(h(e))for(r=0,n=e.length;r<n;r++)i[e[r]]=!0;else i[e]=!0;for(r=0,n=t.length;r<n;r++)(i&&void 0!==i[t[r]]||!i&&e.test(t[r]))&&(t.splice(r,1),n--,r--);return t;}function p(t,e){var r,n;if(h(e)){for(r=0,n=e.length;r<n;r++)if(!p(t,e[r]))return!1;return!0;}var i=c(e);for(r=0,n=t.length;r<n;r++)if("RegExp"===i){if("string"==typeof t[r]&&t[r].match(e))return!0;}else if(t[r]===e)return!0;return!1;}function y(t,e){if(!h(t)||!h(e))return!1;if(t.length!==e.length)return!1;t.sort(),e.sort();for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0;}function d(t){return t.replace(/^\/+|\/+$/g,"");}function v(t){return escape(t);}function m(t){return encodeURIComponent(t).replace(/[!'()*]/g,v).replace(/\*/g,"%2A");}o._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:o.preventInvalidHostname,duplicateQueryParameters:o.duplicateQueryParameters,escapeQuerySpace:o.escapeQuerySpace};},o.preventInvalidHostname=!1,o.duplicateQueryParameters=!1,o.escapeQuerySpace=!0,o.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,o.idn_expression=/[^a-z0-9\._-]/i,o.punycode_expression=/(xn--)/i,o.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,o.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,o.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},o.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return o.domAttributes[e];}},o.encode=m,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape;},o.unicode=function(){o.encode=m,o.decode=decodeURIComponent;},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(t,e){var r=o.encode(t+"");return void 0===e&&(e=o.escapeQuerySpace),e?r.replace(/%20/g,"+"):r;},o.decodeQuery=function(t,e){t+="",void 0===e&&(e=o.escapeQuerySpace);try{return o.decode(e?t.replace(/\+/g,"%20"):t);}catch(e){return t;}};var g,b={encode:"encode",decode:"decode"},x=function x(t,e){return function(r){try{return o[e](r+"").replace(o.characters[t][e].expression,function(r){return o.characters[t][e].map[r];});}catch(t){return r;}};};for(g in b)o[g+"PathSegment"]=x("pathname",b[g]),o[g+"UrnPathSegment"]=x("urnpath",b[g]);var w=function w(t,e,r){return function(n){var i;i=r?function(t){return o[e](o[r](t));}:o[e];for(var a=(n+"").split(t),s=0,u=a.length;s<u;s++)a[s]=i(a[s]);return a.join(t);};};function S(t){return function(e,r){return void 0===e?this._parts[t]||"":(this._parts[t]=e||null,this.build(!r),this);};}function _(t,e){return function(r,n){return void 0===r?this._parts[t]||"":(null!==r&&(r+="").charAt(0)===e&&(r=r.substring(1)),this._parts[t]=r,this.build(!n),this);};}o.decodePath=w("/","decodePathSegment"),o.decodeUrnPath=w(":","decodeUrnPathSegment"),o.recodePath=w("/","encodePathSegment","decode"),o.recodeUrnPath=w(":","encodeUrnPathSegment","decode"),o.encodeReserved=x("reserved","encode"),o.parse=function(t,e){var r;return e||(e={preventInvalidHostname:o.preventInvalidHostname}),(r=(t=(t=t.replace(o.leading_whitespace_expression,"")).replace(o.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(e.fragment=t.substring(r+1)||null,t=t.substring(0,r)),(r=t.indexOf("?"))>-1&&(e.query=t.substring(r+1)||null,t=t.substring(0,r)),"//"===(t=(t=t.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(e.protocol=null,t=t.substring(2),t=o.parseAuthority(t,e)):(r=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,r)||null,e.protocol&&!e.protocol.match(o.protocol_expression)?e.protocol=void 0:"//"===t.substring(r+1,r+3).replace(/\\/g,"/")?(t=t.substring(r+3),t=o.parseAuthority(t,e)):(t=t.substring(r+1),e.urn=!0)),e.path=t,e;},o.parseHost=function(t,e){t||(t="");var r,n,i=(t=t.replace(/\\/g,"/")).indexOf("/");if(-1===i&&(i=t.length),"["===t.charAt(0))r=t.indexOf("]"),e.hostname=t.substring(1,r)||null,e.port=t.substring(r+2,i)||null,"/"===e.port&&(e.port=null);else{var a=t.indexOf(":"),s=t.indexOf("/"),u=t.indexOf(":",a+1);-1!==u&&(-1===s||u<s)?(e.hostname=t.substring(0,i)||null,e.port=null):(n=t.substring(0,i).split(":"),e.hostname=n[0]||null,e.port=n[1]||null);}return e.hostname&&"/"!==t.substring(i).charAt(0)&&(i++,t="/"+t),e.preventInvalidHostname&&o.ensureValidHostname(e.hostname,e.protocol),e.port&&o.ensureValidPort(e.port),t.substring(i)||"/";},o.parseAuthority=function(t,e){return t=o.parseUserinfo(t,e),o.parseHost(t,e);},o.parseUserinfo=function(t,e){var r=t;-1!==t.indexOf("\\")&&(t=t.replace(/\\/g,"/"));var n,i=t.indexOf("/"),a=t.lastIndexOf("@",i>-1?i:t.length-1);return a>-1&&(-1===i||a<i)?(n=t.substring(0,a).split(":"),e.username=n[0]?o.decode(n[0]):null,n.shift(),e.password=n[0]?o.decode(n.join(":")):null,t=r.substring(a+1)):(e.username=null,e.password=null),t;},o.parseQuery=function(t,e){if(!t)return{};if(!(t=t.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,i,a={},s=t.split("&"),l=s.length,c=0;c<l;c++)r=s[c].split("="),n=o.decodeQuery(r.shift(),e),i=r.length?o.decodeQuery(r.join("="),e):null,"__proto__"!==n&&(u.call(a,n)?("string"!=typeof a[n]&&null!==a[n]||(a[n]=[a[n]]),a[n].push(i)):a[n]=i);return a;},o.build=function(t){var e="",r=!1;return t.protocol&&(e+=t.protocol+":"),t.urn||!e&&!t.hostname||(e+="//",r=!0),e+=o.buildAuthority(t)||"","string"==typeof t.path&&("/"!==t.path.charAt(0)&&r&&(e+="/"),e+=t.path),"string"==typeof t.query&&t.query&&(e+="?"+t.query),"string"==typeof t.fragment&&t.fragment&&(e+="#"+t.fragment),e;},o.buildHost=function(t){var e="";return t.hostname?(o.ip6_expression.test(t.hostname)?e+="["+t.hostname+"]":e+=t.hostname,t.port&&(e+=":"+t.port),e):"";},o.buildAuthority=function(t){return o.buildUserinfo(t)+o.buildHost(t);},o.buildUserinfo=function(t){var e="";return t.username&&(e+=o.encode(t.username)),t.password&&(e+=":"+o.encode(t.password)),e&&(e+="@"),e;},o.buildQuery=function(t,e,r){var n,i,a,s,l="";for(i in t)if("__proto__"!==i&&u.call(t,i))if(h(t[i]))for(n={},a=0,s=t[i].length;a<s;a++)void 0!==t[i][a]&&void 0===n[t[i][a]+""]&&(l+="&"+o.buildQueryParameter(i,t[i][a],r),!0!==e&&(n[t[i][a]+""]=!0));else void 0!==t[i]&&(l+="&"+o.buildQueryParameter(i,t[i],r));return l.substring(1);},o.buildQueryParameter=function(t,e,r){return o.encodeQuery(t,r)+(null!==e?"="+o.encodeQuery(e,r):"");},o.addQuery=function(t,e,r){if("object"===a(e))for(var n in e)u.call(e,n)&&o.addQuery(t,n,e[n]);else{if("string"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===t[e])return void(t[e]=r);"string"==typeof t[e]&&(t[e]=[t[e]]),h(r)||(r=[r]),t[e]=(t[e]||[]).concat(r);}},o.setQuery=function(t,e,r){if("object"===a(e))for(var n in e)u.call(e,n)&&o.setQuery(t,n,e[n]);else{if("string"!=typeof e)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");t[e]=void 0===r?null:r;}},o.removeQuery=function(t,e,r){var n,i,s;if(h(e))for(n=0,i=e.length;n<i;n++)t[e[n]]=void 0;else if("RegExp"===c(e))for(s in t)e.test(s)&&(t[s]=void 0);else if("object"===a(e))for(s in e)u.call(e,s)&&o.removeQuery(t,s,e[s]);else{if("string"!=typeof e)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===c(r)?!h(t[e])&&r.test(t[e])?t[e]=void 0:t[e]=f(t[e],r):t[e]!==String(r)||h(r)&&1!==r.length?h(t[e])&&(t[e]=f(t[e],r)):t[e]=void 0:t[e]=void 0;}},o.hasQuery=function(t,e,r,n){switch(c(e)){case"String":break;case"RegExp":for(var i in t)if(u.call(t,i)&&e.test(i)&&(void 0===r||o.hasQuery(t,i,r)))return!0;return!1;case"Object":for(var a in e)if(u.call(e,a)&&!o.hasQuery(t,a,e[a]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter");}switch(c(r)){case"Undefined":return e in t;case"Boolean":return r===Boolean(h(t[e])?t[e].length:t[e]);case"Function":return!!r(t[e],e,t);case"Array":return!!h(t[e])&&(n?p:y)(t[e],r);case"RegExp":return h(t[e])?!!n&&p(t[e],r):Boolean(t[e]&&t[e].match(r));case"Number":r=String(r);case"String":return h(t[e])?!!n&&p(t[e],r):t[e]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter");}},o.joinPaths=function(){for(var t=[],e=[],r=0,n=0;n<arguments.length;n++){var i=new o(arguments[n]);t.push(i);for(var a=i.segment(),s=0;s<a.length;s++)"string"==typeof a[s]&&e.push(a[s]),a[s]&&r++;}if(!e.length||!r)return new o("");var u=new o("").segment(e);return""!==t[0].path()&&"/"!==t[0].path().slice(0,1)||u.path("/"+u.path()),u.normalize();},o.commonPath=function(t,e){var r,n=Math.min(t.length,e.length);for(r=0;r<n;r++)if(t.charAt(r)!==e.charAt(r)){r--;break;}return r<1?t.charAt(0)===e.charAt(0)&&"/"===t.charAt(0)?"/":"":("/"===t.charAt(r)&&"/"===e.charAt(r)||(r=t.substring(0,r).lastIndexOf("/")),t.substring(0,r+1));},o.withinString=function(t,e,r){r||(r={});var n=r.start||o.findUri.start,i=r.end||o.findUri.end,a=r.trim||o.findUri.trim,s=r.parens||o.findUri.parens,u=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var l=n.exec(t);if(!l)break;var c=l.index;if(r.ignoreHtml){var h=t.slice(Math.max(c-3,0),c);if(h&&u.test(h))continue;}for(var f=c+t.slice(c).search(i),p=t.slice(c,f),y=-1;;){var d=s.exec(p);if(!d)break;var v=d.index+d[0].length;y=Math.max(y,v);}if(!((p=y>-1?p.slice(0,y)+p.slice(y).replace(a,""):p.replace(a,"")).length<=l[0].length||r.ignore&&r.ignore.test(p))){var m=e(p,c,f=c+p.length,t);void 0!==m?(m=String(m),t=t.slice(0,c)+m+t.slice(f),n.lastIndex=c+m.length):n.lastIndex=f;}}return n.lastIndex=0,t;},o.ensureValidHostname=function(e,r){var n=!!e,i=!1;if(!!r&&(i=p(o.hostProtocols,r)),i&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(e&&e.match(o.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(e).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]');}},o.ensureValidPort=function(t){if(t){var e=Number(t);if(!(/^[0-9]+$/.test(e)&&e>0&&e<65536))throw new TypeError('Port "'+t+'" is not a valid port');}},o.noConflict=function(t){if(t){var e={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(e.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(e.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=n.SecondLevelDomains.noConflict()),e;}return n.URI===this&&(n.URI=i),this;},s.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this;},s.clone=function(){return new o(this);},s.valueOf=s.toString=function(){return this.build(!1)._string;},s.protocol=S("protocol"),s.username=S("username"),s.password=S("password"),s.hostname=S("hostname"),s.port=S("port"),s.query=_("query","?"),s.fragment=_("fragment","#"),s.search=function(t,e){var r=this.query(t,e);return"string"==typeof r&&r.length?"?"+r:r;},s.hash=function(t,e){var r=this.fragment(t,e);return"string"==typeof r&&r.length?"#"+r:r;},s.pathname=function(t,e){if(void 0===t||!0===t){var r=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?o.decodeUrnPath:o.decodePath)(r):r;}return this._parts.urn?this._parts.path=t?o.recodeUrnPath(t):"":this._parts.path=t?o.recodePath(t):"/",this.build(!e),this;},s.path=s.pathname,s.href=function(t,e){var r;if(void 0===t)return this.toString();this._string="",this._parts=o._parts();var n=t instanceof o,i="object"===a(t)&&(t.hostname||t.path||t.pathname);if(t.nodeName&&(t=t[o.getDomAttribute(t)]||"",i=!1),!n&&i&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=o.parse(String(t),this._parts);else{if(!n&&!i)throw new TypeError("invalid input");var s=n?t._parts:t;for(r in s)"query"!==r&&u.call(this._parts,r)&&(this._parts[r]=s[r]);s.query&&this.query(s.query,!1);}return this.build(!e),this;},s.is=function(t){var e=!1,n=!1,i=!1,a=!1,s=!1,u=!1,l=!1,c=!this._parts.urn;switch(this._parts.hostname&&(c=!1,n=o.ip4_expression.test(this._parts.hostname),i=o.ip6_expression.test(this._parts.hostname),s=(a=!(e=n||i))&&r&&r.has(this._parts.hostname),u=a&&o.idn_expression.test(this._parts.hostname),l=a&&o.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return c;case"absolute":return!c;case"domain":case"name":return a;case"sld":return s;case"ip":return e;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return i;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return l;}return null;};var M=s.protocol,O=s.port,P=s.hostname;s.protocol=function(t,e){if(t&&!(t=t.replace(/:(\/\/)?$/,"")).match(o.protocol_expression))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return M.call(this,t,e);},s.scheme=s.protocol,s.port=function(t,e){return this._parts.urn?void 0===t?"":this:(void 0!==t&&(0===t&&(t=null),t&&(":"===(t+="").charAt(0)&&(t=t.substring(1)),o.ensureValidPort(t))),O.call(this,t,e));},s.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==o.parseHost(t,r))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=r.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(t,this._parts.protocol);}return P.call(this,t,e);},s.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():"";}var n=o(t);return this.protocol(n.protocol()).authority(n.authority()).build(!e),this;},s.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildHost(this._parts):"";if("/"!==o.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this;},s.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildAuthority(this._parts):"";if("/"!==o.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this;},s.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=o.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r;}return"@"!==t[t.length-1]&&(t+="@"),o.parseUserinfo(t,this._parts),this.build(!e),this;},s.resource=function(t,e){var r;return void 0===t?this.path()+this.search()+this.hash():(r=o.parse(t),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!e),this);},s.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||"";}var n=this._parts.hostname.length-this.domain().length,i=this._parts.hostname.substring(0,n),a=new RegExp("^"+l(i));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&o.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(a,t),this.build(!e),this;},s.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(e).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||"";}if(!t)throw new TypeError("cannot set domain empty");if(-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(t,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var i=new RegExp(l(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(i,t);}return this.build(!e),this;},s.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(n+1);return!0!==e&&r&&r.list[i.toLowerCase()]&&r.get(this._parts.hostname)||i;}var o;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');o=new RegExp(l(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,t);}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");o=new RegExp(l(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,t);}return this.build(!e),this;},s.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return t?o.decodePath(n):n;}var i=this._parts.path.length-this.filename().length,a=this._parts.path.substring(0,i),s=new RegExp("^"+l(a));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=o.recodePath(t),this._parts.path=this._parts.path.replace(s,t),this.build(!e),this;},s.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return t?o.decodePathSegment(n):n;}var i=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(i=!0);var a=new RegExp(l(this.filename())+"$");return t=o.recodePath(t),this._parts.path=this._parts.path.replace(a,t),i?this.normalizePath(e):this.build(!e),this;},s.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,i=this.filename(),a=i.lastIndexOf(".");return-1===a?"":(r=i.substring(a+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",t?o.decodePathSegment(n):n);}"."===t.charAt(0)&&(t=t.substring(1));var s,u=this.suffix();if(u)s=t?new RegExp(l(u)+"$"):new RegExp(l("."+u)+"$");else{if(!t)return this;this._parts.path+="."+o.recodePath(t);}return s&&(t=o.recodePath(t),this._parts.path=this._parts.path.replace(s,t)),this.build(!e),this;},s.segment=function(t,e,r){var n=this._parts.urn?":":"/",i=this.path(),o="/"===i.substring(0,1),a=i.split(n);if(void 0!==t&&"number"!=typeof t&&(r=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(o&&a.shift(),t<0&&(t=Math.max(a.length+t,0)),void 0===e)return void 0===t?a:a[t];if(null===t||void 0===a[t]){if(h(e)){a=[];for(var s=0,u=e.length;s<u;s++)(e[s].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(d(e[s])));}else(e||"string"==typeof e)&&(e=d(e),""===a[a.length-1]?a[a.length-1]=e:a.push(e));}else e?a[t]=d(e):a.splice(t,1);return o&&a.unshift(""),this.path(a.join(n),r);},s.segmentCoded=function(t,e,r){var n,i,a;if("number"!=typeof t&&(r=e,e=t,t=void 0),void 0===e){if(h(n=this.segment(t,e,r)))for(i=0,a=n.length;i<a;i++)n[i]=o.decode(n[i]);else n=void 0!==n?o.decode(n):void 0;return n;}if(h(e))for(i=0,a=e.length;i<a;i++)e[i]=o.encode(e[i]);else e="string"==typeof e||e instanceof String?o.encode(e):e;return this.segment(t,e,r);};var k=s.query;return s.query=function(t,e){if(!0===t)return o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof t){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=t.call(this,r);return this._parts.query=o.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this;}return void 0!==t&&"string"!=typeof t?(this._parts.query=o.buildQuery(t,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this):k.call(this,t,e);},s.setQuery=function(t,e,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof t||t instanceof String)n[t]=void 0!==e?e:null;else{if("object"!==a(t))throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var i in t)u.call(t,i)&&(n[i]=t[i]);}return this._parts.query=o.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this;},s.addQuery=function(t,e,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.addQuery(n,t,void 0===e?null:e),this._parts.query=o.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this;},s.removeQuery=function(t,e,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.removeQuery(n,t,e),this._parts.query=o.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this;},s.hasQuery=function(t,e,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.hasQuery(n,t,e,r);},s.setSearch=s.setQuery,s.addSearch=s.addQuery,s.removeSearch=s.removeQuery,s.hasSearch=s.hasQuery,s.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build();},s.normalizeProtocol=function(t){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!t)),this;},s.normalizeHostname=function(r){return this._parts.hostname&&(this.is("IDN")&&t?this._parts.hostname=t.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r)),this;},s.normalizePort=function(t){return"string"==typeof this._parts.protocol&&this._parts.port===o.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!t)),this;},s.normalizePath=function(t){var e,r=this._parts.path;if(!r)return this;if(this._parts.urn)return this._parts.path=o.recodeUrnPath(this._parts.path),this.build(!t),this;if("/"===this._parts.path)return this;var n,i,a="";for("/"!==(r=o.recodePath(r)).charAt(0)&&(e=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),e&&(a=r.substring(1).match(/^(\.\.\/)+/)||"")&&(a=a[0]);-1!==(n=r.search(/\/\.\.(\/|$)/));)0!==n?(-1===(i=r.substring(0,n).lastIndexOf("/"))&&(i=n),r=r.substring(0,i)+r.substring(n+3)):r=r.substring(3);return e&&this.is("relative")&&(r=a+r.substring(1)),this._parts.path=r,this.build(!t),this;},s.normalizePathname=s.normalizePath,s.normalizeQuery=function(t){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(o.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!t)),this;},s.normalizeFragment=function(t){return this._parts.fragment||(this._parts.fragment=null,this.build(!t)),this;},s.normalizeSearch=s.normalizeQuery,s.normalizeHash=s.normalizeFragment,s.iso8859=function(){var t=o.encode,e=o.decode;o.encode=escape,o.decode=decodeURIComponent;try{this.normalize();}finally{o.encode=t,o.decode=e;}return this;},s.unicode=function(){var t=o.encode,e=o.decode;o.encode=m,o.decode=unescape;try{this.normalize();}finally{o.encode=t,o.decode=e;}return this;},s.readable=function(){var e=this.clone();e.username("").password("").normalize();var r="";if(e._parts.protocol&&(r+=e._parts.protocol+"://"),e._parts.hostname&&(e.is("punycode")&&t?(r+=t.toUnicode(e._parts.hostname),e._parts.port&&(r+=":"+e._parts.port)):r+=e.host()),e._parts.hostname&&e._parts.path&&"/"!==e._parts.path.charAt(0)&&(r+="/"),r+=e.path(!0),e._parts.query){for(var n="",i=0,a=e._parts.query.split("&"),s=a.length;i<s;i++){var u=(a[i]||"").split("=");n+="&"+o.decodeQuery(u[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==u[1]&&(n+="="+o.decodeQuery(u[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"));}r+="?"+n.substring(1);}return r+o.decodeQuery(e.hash(),!0);},s.absoluteTo=function(t){var e,r,n,i=this.clone(),a=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t instanceof o||(t=new o(t)),i._parts.protocol)return i;if(i._parts.protocol=t._parts.protocol,this._parts.hostname)return i;for(r=0;n=a[r];r++)i._parts[n]=t._parts[n];return i._parts.path?(".."===i._parts.path.substring(-2)&&(i._parts.path+="/"),"/"!==i.path().charAt(0)&&(e=(e=t.directory())||(0===t.path().indexOf("/")?"/":""),i._parts.path=(e?e+"/":"")+i._parts.path,i.normalizePath())):(i._parts.path=t._parts.path,i._parts.query||(i._parts.query=t._parts.query)),i.build(),i;},s.relativeTo=function(t){var e,r,n,i,a,s=this.clone().normalize();if(s._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t=new o(t).normalize(),e=s._parts,r=t._parts,i=s.path(),a=t.path(),"/"!==i.charAt(0))throw new Error("URI is already relative");if("/"!==a.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(e.protocol===r.protocol&&(e.protocol=null),e.username!==r.username||e.password!==r.password)return s.build();if(null!==e.protocol||null!==e.username||null!==e.password)return s.build();if(e.hostname!==r.hostname||e.port!==r.port)return s.build();if(e.hostname=null,e.port=null,i===a)return e.path="",s.build();if(!(n=o.commonPath(i,a)))return s.build();var u=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return e.path=u+e.path.substring(n.length)||"./",s.build();},s.equals=function(t){var e,r,n,i,a,s=this.clone(),l=new o(t),c={};if(s.normalize(),l.normalize(),s.toString()===l.toString())return!0;if(n=s.query(),i=l.query(),s.query(""),l.query(""),s.toString()!==l.toString())return!1;if(n.length!==i.length)return!1;for(a in e=o.parseQuery(n,this._parts.escapeQuerySpace),r=o.parseQuery(i,this._parts.escapeQuerySpace),e)if(u.call(e,a)){if(h(e[a])){if(!y(e[a],r[a]))return!1;}else if(e[a]!==r[a])return!1;c[a]=!0;}for(a in r)if(u.call(r,a)&&!c[a])return!1;return!0;},s.preventInvalidHostname=function(t){return this._parts.preventInvalidHostname=!!t,this;},s.duplicateQueryParameters=function(t){return this._parts.duplicateQueryParameters=!!t,this;},s.escapeQuerySpace=function(t){return this._parts.escapeQuerySpace=!!t,this;},o;});},2323:function _(t,e,r){var n;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},i(t);}t=r.nmd(t),function(o){var a="object"==i(e)&&e&&!e.nodeType&&e,s="object"==i(t)&&t&&!t.nodeType&&t,u="object"==(void 0===r.g?"undefined":i(r.g))&&r.g;u.global!==u&&u.window!==u&&u.self!==u||(o=u);var l,c,h=2147483647,f=36,p=26,y=38,d=700,v=/^xn--/,m=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=f-1,w=Math.floor,S=String.fromCharCode;function _(t){throw new RangeError(b[t]);}function M(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n;}function O(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+M((t=t.replace(g,".")).split("."),e).join(".");}function P(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n;}function k(t){return M(t,function(t){var e="";return t>65535&&(e+=S((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+S(t);}).join("");}function E(t,e){return t+22+75*(t<26)-((0!=e)<<5);}function C(t,e,r){var n=0;for(t=r?w(t/d):t>>1,t+=w(t/e);t>x*p>>1;n+=f)t=w(t/x);return w(n+(x+1)*t/(t+y));}function T(t){var e,r,n,i,o,a,s,u,l,c,y,d=[],v=t.length,m=0,g=128,b=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&_("not-basic"),d.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<v;){for(o=m,a=1,s=f;i>=v&&_("invalid-input"),((u=(y=t.charCodeAt(i++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:f)>=f||u>w((h-m)/a))&&_("overflow"),m+=u*a,!(u<(l=s<=b?1:s>=b+p?p:s-b));s+=f)a>w(h/(c=f-l))&&_("overflow"),a*=c;b=C(m-o,e=d.length+1,0==o),w(m/e)>h-g&&_("overflow"),g+=w(m/e),m%=e,d.splice(m++,0,g);}return k(d);}function A(t){var e,r,n,i,o,a,s,u,l,c,y,d,v,m,g,b=[];for(d=(t=P(t)).length,e=128,r=0,o=72,a=0;a<d;++a)(y=t[a])<128&&b.push(S(y));for(n=i=b.length,i&&b.push("-");n<d;){for(s=h,a=0;a<d;++a)(y=t[a])>=e&&y<s&&(s=y);for(s-e>w((h-r)/(v=n+1))&&_("overflow"),r+=(s-e)*v,e=s,a=0;a<d;++a)if((y=t[a])<e&&++r>h&&_("overflow"),y==e){for(u=r,l=f;!(u<(c=l<=o?1:l>=o+p?p:l-o));l+=f)g=u-c,m=f-c,b.push(S(E(c+g%m,0))),u=w(g/m);b.push(S(E(u,0))),o=C(r,v,n==i),r=0,++n;}++r,++e;}return b.join("");}if(l={version:"1.3.2",ucs2:{decode:P,encode:k},decode:T,encode:A,toASCII:function toASCII(t){return O(t,function(t){return m.test(t)?"xn--"+A(t):t;});},toUnicode:function toUnicode(t){return O(t,function(t){return v.test(t)?T(t.slice(4).toLowerCase()):t;});}},"object"==i(r.amdO)&&r.amdO)void 0===(n=function(){return l;}.call(e,r,e,t))||(t.exports=n);else if(a&&s){if(t.exports==a)s.exports=l;else for(c in l)l.hasOwnProperty(c)&&(a[c]=l[c]);}else o.punycode=l;}(this);},3873:function _(t,e,r){"use strict";var n=r(5164),i=r(6390),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not a function");};},6961:function _(t,e,r){"use strict";var n=r(2930),i=r(6390),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not a constructor");};},857:function _(t,e,r){"use strict";var n=r(6696),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o("Can't set "+i(t)+" as a prototype");};},1954:function _(t,e,r){"use strict";var n=r(1642),i=r(8905),o=r(754).f,a=n("unscopables"),s=Array.prototype;void 0===s[a]&&o(s,a,{configurable:!0,value:i(null)}),t.exports=function(t){s[a][t]=!0;};},6698:function _(t,e,r){"use strict";var n=r(3908).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1);};},9662:function _(t,e,r){"use strict";var n=r(6466),i=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new i("Incorrect invocation");};},5546:function _(t,e,r){"use strict";var n=r(5343),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not an object");};},5282:function _(t,e,r){"use strict";var n=r(1212),i=r(9603),o=r(8765),a=function a(t){return function(e,r,a){var s=n(e),u=o(s);if(0===u)return!t&&-1;var l,c=i(a,u);if(t&&r!=r){for(;u>c;)if((l=s[c++])!=l)return!0;}else for(;u>c;c++)if((t||c in s)&&s[c]===r)return t||c||0;return!t&&-1;};};t.exports={includes:a(!0),indexOf:a(!1)};},8421:function _(t,e,r){"use strict";var n=r(3634);t.exports=function(t,e){var r=[][t];return!!r&&n(function(){r.call(null,e||function(){return 1;},1);});};},69:function _(t,e,r){"use strict";var n=r(3873),i=r(9452),o=r(4384),a=r(8765),s=TypeError,u="Reduce of empty array with no initial value",l=function l(t){return function(e,r,l,c){var h=i(e),f=o(h),p=a(h);if(n(r),0===p&&l<2)throw new s(u);var y=t?p-1:0,d=t?-1:1;if(l<2)for(;;){if(y in f){c=f[y],y+=d;break;}if(y+=d,t?y<0:p<=y)throw new s(u);}for(;t?y>=0:p>y;y+=d)y in f&&(c=r(c,f[y],y,h));return c;};};t.exports={left:l(!1),right:l(!0)};},5905:function _(t,e,r){"use strict";var n=r(7889);t.exports=n([].slice);},8211:function _(t,e,r){"use strict";var n=r(1642)("iterator"),i=!1;try{var o=0,a={next:function next(){return{done:!!o++};},return:function _return(){i=!0;}};a[n]=function(){return this;},Array.from(a,function(){throw 2;});}catch(t){}t.exports=function(t,e){try{if(!e&&!i)return!1;}catch(t){return!1;}var r=!1;try{var o={};o[n]=function(){return{next:function next(){return{done:r=!0};}};},t(o);}catch(t){}return r;};},7953:function _(t,e,r){"use strict";var n=r(7889),i=n({}.toString),o=n("".slice);t.exports=function(t){return o(i(t),8,-1);};},3502:function _(t,e,r){"use strict";var n=r(3361),i=r(5164),o=r(7953),a=r(1642)("toStringTag"),s=Object,u="Arguments"===o(function(){return arguments;}());t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e];}catch(t){}}(e=s(t),a))?r:u?o(e):"Object"===(n=o(e))&&i(e.callee)?"Arguments":n;};},4017:function _(t,e,r){"use strict";var n=r(2770),i=r(6608),o=r(3880),a=r(754);t.exports=function(t,e,r){for(var s=i(e),u=a.f,l=o.f,c=0;c<s.length;c++){var h=s[c];n(t,h)||r&&n(r,h)||u(t,h,l(e,h));}};},6265:function _(t,e,r){"use strict";var n=r(1642)("match");t.exports=function(t){var e=/./;try{"/./"[t](e);}catch(r){try{return e[n]=!1,"/./"[t](e);}catch(t){}}return!1;};},4552:function _(t,e,r){"use strict";var n=r(3634);t.exports=!n(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t())!==t.prototype;});},6944:function _(t){"use strict";t.exports=function(t,e){return{value:t,done:e};};},7592:function _(t,e,r){"use strict";var n=r(4797),i=r(754),o=r(19);t.exports=n?function(t,e,r){return i.f(t,e,o(1,r));}:function(t,e,r){return t[e]=r,t;};},19:function _(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e};};},7557:function _(t,e,r){"use strict";var n=r(6514),i=r(754);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r);};},4197:function _(t,e,r){"use strict";var n=r(5164),i=r(754),o=r(6514),a=r(9998);t.exports=function(t,e,r,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:e;if(n(r)&&o(r,l,s),s.global)u?t[e]=r:a(e,r);else{try{s.unsafe?t[e]&&(u=!0):delete t[e];}catch(t){}u?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable});}return t;};},9998:function _(t,e,r){"use strict";var n=r(2928),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0});}catch(r){n[t]=e;}return e;};},4797:function _(t,e,r){"use strict";var n=r(3634);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function get(){return 7;}})[1];});},9750:function _(t,e,r){"use strict";var n=r(2928),i=r(5343),o=n.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{};};},8597:function _(t){"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};},3031:function _(t,e,r){"use strict";var n=r(9750)("span").classList,i=n&&n.constructor&&n.constructor.prototype;t.exports=i===Object.prototype?void 0:i;},6323:function _(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},n(t);}var i=r(9947),o=r(9407);t.exports=!i&&!o&&"object"==("undefined"==typeof window?"undefined":n(window))&&"object"==("undefined"==typeof document?"undefined":n(document));},9947:function _(t){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},e(t);}t.exports="object"==("undefined"==typeof Deno?"undefined":e(Deno))&&Deno&&"object"==e(Deno.version);},7383:function _(t,e,r){"use strict";var n=r(7485);t.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble;},3165:function _(t,e,r){"use strict";var n=r(7485);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n);},9407:function _(t,e,r){"use strict";var n=r(2928),i=r(7953);t.exports="process"===i(n.process);},3654:function _(t,e,r){"use strict";var n=r(7485);t.exports=/web0s(?!.*chrome)/i.test(n);},7485:function _(t){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||"";},2389:function _(t,e,r){"use strict";var n,i,o=r(2928),a=r(7485),s=o.process,u=o.Deno,l=s&&s.versions||u&&u.version,c=l&&l.v8;c&&(i=(n=c.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(i=+n[1]),t.exports=i;},3690:function _(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];},3485:function _(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},n(t);}var i=r(2928),o=r(3880).f,a=r(7592),s=r(4197),u=r(9998),l=r(4017),c=r(4857);t.exports=function(t,e){var r,h,f,p,y,d=t.target,v=t.global,m=t.stat;if(r=v?i:m?i[d]||u(d,{}):i[d]&&i[d].prototype)for(h in e){if(p=e[h],f=t.dontCallGetSet?(y=o(r,h))&&y.value:r[h],!c(v?h:d+(m?".":"#")+h,t.forced)&&void 0!==f){if(n(p)==n(f))continue;l(p,f);}(t.sham||f&&f.sham)&&a(p,"sham",!0),s(r,h,p,t);}};},3634:function _(t){"use strict";t.exports=function(t){try{return!!t();}catch(t){return!0;}};},4691:function _(t,e,r){"use strict";r(248);var n=r(3736),i=r(4197),o=r(2542),a=r(3634),s=r(1642),u=r(7592),l=s("species"),c=RegExp.prototype;t.exports=function(t,e,r,h){var f=s(t),p=!a(function(){var e={};return e[f]=function(){return 7;},7!==""[t](e);}),y=p&&!a(function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[l]=function(){return r;},r.flags="",r[f]=/./[f]),r.exec=function(){return e=!0,null;},r[f](""),!e;});if(!p||!y||r){var d=/./[f],v=e(f,""[t],function(t,e,r,i,a){var s=e.exec;return s===o||s===c.exec?p&&!a?{done:!0,value:n(d,e,r,i)}:{done:!0,value:n(t,r,e,i)}:{done:!1};});i(String.prototype,t,v[0]),i(c,f,v[1]);}h&&u(c[f],"sham",!0);};},678:function _(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},n(t);}var i=r(8607),o=Function.prototype,a=o.apply,s=o.call;t.exports="object"==("undefined"==typeof Reflect?"undefined":n(Reflect))&&Reflect.apply||(i?s.bind(a):function(){return s.apply(a,arguments);});},8269:function _(t,e,r){"use strict";var n=r(1515),i=r(3873),o=r(8607),a=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?a(t,e):function(){return t.apply(e,arguments);};};},8607:function _(t,e,r){"use strict";var n=r(3634);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype");});},3736:function _(t,e,r){"use strict";var n=r(8607),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments);};},9071:function _(t,e,r){"use strict";var n=r(4797),i=r(2770),o=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=i(o,"name"),u=s&&"something"===function(){}.name,l=s&&(!n||n&&a(o,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:l};},7809:function _(t,e,r){"use strict";var n=r(7889),i=r(3873);t.exports=function(t,e,r){try{return n(i(Object.getOwnPropertyDescriptor(t,e)[r]));}catch(t){}};},1515:function _(t,e,r){"use strict";var n=r(7953),i=r(7889);t.exports=function(t){if("Function"===n(t))return i(t);};},7889:function _(t,e,r){"use strict";var n=r(8607),i=Function.prototype,o=i.call,a=n&&i.bind.bind(o,o);t.exports=n?a:function(t){return function(){return o.apply(t,arguments);};};},148:function _(t,e,r){"use strict";var n=r(2928),i=r(5164);t.exports=function(t,e){return arguments.length<2?(r=n[t],i(r)?r:void 0):n[t]&&n[t][e];var r;};},898:function _(t,e,r){"use strict";var n=r(3502),i=r(4897),o=r(4350),a=r(1356),s=r(1642)("iterator");t.exports=function(t){if(!o(t))return i(t,s)||i(t,"@@iterator")||a[n(t)];};},7998:function _(t,e,r){"use strict";var n=r(3736),i=r(3873),o=r(5546),a=r(6390),s=r(898),u=TypeError;t.exports=function(t,e){var r=arguments.length<2?s(t):e;if(i(r))return o(n(r,t));throw new u(a(t)+" is not iterable");};},4897:function _(t,e,r){"use strict";var n=r(3873),i=r(4350);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r);};},7289:function _(t,e,r){"use strict";var n=r(7889),i=r(9452),o=Math.floor,a=n("".charAt),s=n("".replace),u=n("".slice),l=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,n,h,f){var p=r+t.length,y=n.length,d=c;return void 0!==h&&(h=i(h),d=l),s(f,d,function(i,s){var l;switch(a(s,0)){case"$":return"$";case"&":return t;case"`":return u(e,0,r);case"'":return u(e,p);case"<":l=h[u(s,1,-1)];break;default:var c=+s;if(0===c)return i;if(c>y){var f=o(c/10);return 0===f?i:f<=y?void 0===n[f-1]?a(s,1):n[f-1]+a(s,1):i;}l=n[c-1];}return void 0===l?"":l;});};},2928:function _(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},n(t);}var i=function i(t){return t&&t.Math===Math&&t;};t.exports=i("object"==("undefined"==typeof globalThis?"undefined":n(globalThis))&&globalThis)||i("object"==("undefined"==typeof window?"undefined":n(window))&&window)||i("object"==("undefined"==typeof self?"undefined":n(self))&&self)||i("object"==(void 0===r.g?"undefined":n(r.g))&&r.g)||i("object"==n(this)&&this)||function(){return this;}()||Function("return this")();},2770:function _(t,e,r){"use strict";var n=r(7889),i=r(9452),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e);};},7076:function _(t){"use strict";t.exports={};},4138:function _(t){"use strict";t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e);}catch(t){}};},3490:function _(t,e,r){"use strict";var n=r(148);t.exports=n("document","documentElement");},6182:function _(t,e,r){"use strict";var n=r(4797),i=r(3634),o=r(9750);t.exports=!n&&!i(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function get(){return 7;}}).a;});},4384:function _(t,e,r){"use strict";var n=r(7889),i=r(3634),o=r(7953),a=Object,s=n("".split);t.exports=i(function(){return!a("z").propertyIsEnumerable(0);})?function(t){return"String"===o(t)?s(t,""):a(t);}:a;},9413:function _(t,e,r){"use strict";var n=r(7889),i=r(5164),o=r(3094),a=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return a(t);}),t.exports=o.inspectSource;},6814:function _(t,e,r){"use strict";var n,i,o,a=r(6185),s=r(2928),u=r(5343),l=r(7592),c=r(2770),h=r(3094),f=r(56),p=r(7076),y="Object already initialized",d=s.TypeError,v=s.WeakMap;if(a||h.state){var m=h.state||(h.state=new v());m.get=m.get,m.has=m.has,m.set=m.set,n=function n(t,e){if(m.has(t))throw new d(y);return e.facade=t,m.set(t,e),e;},i=function i(t){return m.get(t)||{};},o=function o(t){return m.has(t);};}else{var g=f("state");p[g]=!0,n=function n(t,e){if(c(t,g))throw new d(y);return e.facade=t,l(t,g,e),e;},i=function i(t){return c(t,g)?t[g]:{};},o=function o(t){return c(t,g);};}t.exports={set:n,get:i,has:o,enforce:function enforce(t){return o(t)?i(t):n(t,{});},getterFor:function getterFor(t){return function(e){var r;if(!u(e)||(r=i(e)).type!==t)throw new d("Incompatible receiver, "+t+" required");return r;};}};},98:function _(t,e,r){"use strict";var n=r(1642),i=r(1356),o=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t);};},4783:function _(t,e,r){"use strict";var n=r(7953);t.exports=Array.isArray||function(t){return"Array"===n(t);};},5164:function _(t){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},e(t);}var r="object"==("undefined"==typeof document?"undefined":e(document))&&document.all;t.exports=void 0===r&&void 0!==r?function(t){return"function"==typeof t||t===r;}:function(t){return"function"==typeof t;};},2930:function _(t,e,r){"use strict";var n=r(7889),i=r(3634),o=r(5164),a=r(3502),s=r(148),u=r(9413),l=function l(){},c=s("Reflect","construct"),h=/^\s*(?:class|function)\b/,f=n(h.exec),p=!h.test(l),y=function y(t){if(!o(t))return!1;try{return c(l,[],t),!0;}catch(t){return!1;}},d=function d(t){if(!o(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1;}try{return p||!!f(h,u(t));}catch(t){return!0;}};d.sham=!0,t.exports=!c||i(function(){var t;return y(y.call)||!y(Object)||!y(function(){t=!0;})||t;})?d:y;},4857:function _(t,e,r){"use strict";var n=r(3634),i=r(5164),o=/#|\.prototype\./,a=function a(t,e){var r=u[s(t)];return r===c||r!==l&&(i(e)?n(e):!!e);},s=a.normalize=function(t){return String(t).replace(o,".").toLowerCase();},u=a.data={},l=a.NATIVE="N",c=a.POLYFILL="P";t.exports=a;},4350:function _(t){"use strict";t.exports=function(t){return null==t;};},5343:function _(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},n(t);}var i=r(5164);t.exports=function(t){return"object"==n(t)?null!==t:i(t);};},6696:function _(t,e,r){"use strict";var n=r(5343);t.exports=function(t){return n(t)||null===t;};},2358:function _(t){"use strict";t.exports=!1;},8681:function _(t,e,r){"use strict";var n=r(5343),i=r(7953),o=r(1642)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[o])?!!e:"RegExp"===i(t));};},5648:function _(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},n(t);}var i=r(148),o=r(5164),a=r(6466),s=r(2865),u=Object;t.exports=s?function(t){return"symbol"==n(t);}:function(t){var e=i("Symbol");return o(e)&&a(e.prototype,u(t));};},7641:function _(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},n(t);}var i=r(8269),o=r(3736),a=r(5546),s=r(6390),u=r(98),l=r(8765),c=r(6466),h=r(7998),f=r(898),p=r(6020),y=TypeError,d=function d(t,e){this.stopped=t,this.result=e;},v=d.prototype;t.exports=function(t,e,r){var m,g,b,x,w,S,_,M=r&&r.that,O=!(!r||!r.AS_ENTRIES),P=!(!r||!r.IS_RECORD),k=!(!r||!r.IS_ITERATOR),E=!(!r||!r.INTERRUPTED),C=i(e,M),T=function T(t){return m&&p(m,"normal",t),new d(!0,t);},A=function A(t){return O?(a(t),E?C(t[0],t[1],T):C(t[0],t[1])):E?C(t,T):C(t);};if(P)m=t.iterator;else if(k)m=t;else{if(!(g=f(t)))throw new y(s(t)+" is not iterable");if(u(g)){for(b=0,x=l(t);x>b;b++)if((w=A(t[b]))&&c(v,w))return w;return new d(!1);}m=h(t,g);}for(S=P?t.next:m.next;!(_=o(S,m)).done;){try{w=A(_.value);}catch(t){p(m,"throw",t);}if("object"==n(w)&&w&&c(v,w))return w;}return new d(!1);};},6020:function _(t,e,r){"use strict";var n=r(3736),i=r(5546),o=r(4897);t.exports=function(t,e,r){var a,s;i(t);try{if(!(a=o(t,"return"))){if("throw"===e)throw r;return r;}a=n(a,t);}catch(t){s=!0,a=t;}if("throw"===e)throw r;if(s)throw a;return i(a),r;};},1543:function _(t,e,r){"use strict";var n=r(1314).IteratorPrototype,i=r(8905),o=r(19),a=r(5418),s=r(1356),u=function u(){return this;};t.exports=function(t,e,r,l){var c=e+" Iterator";return t.prototype=i(n,{next:o(+!l,r)}),a(t,c,!1,!0),s[c]=u,t;};},8993:function _(t,e,r){"use strict";var n=r(3485),i=r(3736),o=r(2358),a=r(9071),s=r(5164),u=r(1543),l=r(1562),c=r(1576),h=r(5418),f=r(7592),p=r(4197),y=r(1642),d=r(1356),v=r(1314),m=a.PROPER,g=a.CONFIGURABLE,b=v.IteratorPrototype,x=v.BUGGY_SAFARI_ITERATORS,w=y("iterator"),S="keys",_="values",M="entries",O=function O(){return this;};t.exports=function(t,e,r,a,y,v,P){u(r,e,a);var k,E,C,T=function T(t){if(t===y&&R)return R;if(!x&&t&&t in j)return j[t];switch(t){case S:case _:case M:return function(){return new r(this,t);};}return function(){return new r(this);};},A=e+" Iterator",N=!1,j=t.prototype,I=j[w]||j["@@iterator"]||y&&j[y],R=!x&&I||T(y),L="Array"===e&&j.entries||I;if(L&&(k=l(L.call(new t())))!==Object.prototype&&k.next&&(o||l(k)===b||(c?c(k,b):s(k[w])||p(k,w,O)),h(k,A,!0,!0),o&&(d[A]=O)),m&&y===_&&I&&I.name!==_&&(!o&&g?f(j,"name",_):(N=!0,R=function R(){return i(I,this);})),y)if(E={values:T(_),keys:v?R:T(S),entries:T(M)},P)for(C in E)(x||N||!(C in j))&&p(j,C,E[C]);else n({target:e,proto:!0,forced:x||N},E);return o&&!P||j[w]===R||p(j,w,R,{name:y}),d[e]=R,E;};},1314:function _(t,e,r){"use strict";var n,i,o,a=r(3634),s=r(5164),u=r(5343),l=r(8905),c=r(1562),h=r(4197),f=r(1642),p=r(2358),y=f("iterator"),d=!1;[].keys&&("next"in(o=[].keys())?(i=c(c(o)))!==Object.prototype&&(n=i):d=!0),!u(n)||a(function(){var t={};return n[y].call(t)!==t;})?n={}:p&&(n=l(n)),s(n[y])||h(n,y,function(){return this;}),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:d};},1356:function _(t){"use strict";t.exports={};},8765:function _(t,e,r){"use strict";var n=r(1995);t.exports=function(t){return n(t.length);};},6514:function _(t,e,r){"use strict";var n=r(7889),i=r(3634),o=r(5164),a=r(2770),s=r(4797),u=r(9071).CONFIGURABLE,l=r(9413),c=r(6814),h=c.enforce,f=c.get,p=String,y=Object.defineProperty,d=n("".slice),v=n("".replace),m=n([].join),g=s&&!i(function(){return 8!==y(function(){},"length",{value:8}).length;}),b=String(String).split("String"),x=t.exports=function(t,e,r){"Symbol("===d(p(e),0,7)&&(e="["+v(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!a(t,"name")||u&&t.name!==e)&&(s?y(t,"name",{value:e,configurable:!0}):t.name=e),g&&r&&a(r,"arity")&&t.length!==r.arity&&y(t,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?s&&y(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0);}catch(t){}var n=h(t);return a(n,"source")||(n.source=m(b,"string"==typeof e?e:"")),t;};Function.prototype.toString=x(function(){return o(this)&&f(this).source||l(this);},"toString");},4433:function _(t){"use strict";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n);};},3790:function _(t,e,r){"use strict";var n,i,o,a,s,u=r(2928),l=r(7412),c=r(8269),h=r(6130).set,f=r(3128),p=r(3165),y=r(7383),d=r(3654),v=r(9407),m=u.MutationObserver||u.WebKitMutationObserver,g=u.document,b=u.process,x=u.Promise,w=l("queueMicrotask");if(!w){var S=new f(),_=function _(){var t,e;for(v&&(t=b.domain)&&t.exit();e=S.get();)try{e();}catch(t){throw S.head&&n(),t;}t&&t.enter();};p||v||d||!m||!g?!y&&x&&x.resolve?((a=x.resolve(void 0)).constructor=x,s=c(a.then,a),n=function n(){s(_);}):v?n=function n(){b.nextTick(_);}:(h=c(h,u),n=function n(){h(_);}):(i=!0,o=g.createTextNode(""),new m(_).observe(o,{characterData:!0}),n=function n(){o.data=i=!i;}),w=function w(t){S.head||n(),S.add(t);};}t.exports=w;},2308:function _(t,e,r){"use strict";var n=r(3873),i=TypeError,o=function o(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw new i("Bad Promise constructor");e=t,r=n;}),this.resolve=n(e),this.reject=n(r);};t.exports.f=function(t){return new o(t);};},3060:function _(t,e,r){"use strict";var n=r(8681),i=TypeError;t.exports=function(t){if(n(t))throw new i("The method doesn't accept regular expressions");return t;};},8905:function _(t,e,r){"use strict";var n,i=r(5546),o=r(2046),a=r(3690),s=r(7076),u=r(3490),l=r(9750),c=r(56),h="prototype",f="script",p=c("IE_PROTO"),y=function y(){},d=function d(t){return"<"+f+">"+t+"</"+f+">";},v=function v(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e;},_m=function m(){try{n=new ActiveXObject("htmlfile");}catch(t){}var t,e,r;_m="undefined"!=typeof document?document.domain&&n?v(n):(e=l("iframe"),r="java"+f+":",e.style.display="none",u.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):v(n);for(var i=a.length;i--;)delete _m[h][a[i]];return _m();};s[p]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(y[h]=i(t),r=new y(),y[h]=null,r[p]=t):r=_m(),void 0===e?r:o.f(r,e);};},2046:function _(t,e,r){"use strict";var n=r(4797),i=r(1363),o=r(754),a=r(5546),s=r(1212),u=r(1185);e.f=n&&!i?Object.defineProperties:function(t,e){a(t);for(var r,n=s(e),i=u(e),l=i.length,c=0;l>c;)o.f(t,r=i[c++],n[r]);return t;};},754:function _(t,e,r){"use strict";var n=r(4797),i=r(6182),o=r(1363),a=r(5546),s=r(8),u=TypeError,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,h="enumerable",f="configurable",p="writable";e.f=n?o?function(t,e,r){if(a(t),e=s(e),a(r),"function"==typeof t&&"prototype"===e&&"value"in r&&p in r&&!r[p]){var n=c(t,e);n&&n[p]&&(t[e]=r.value,r={configurable:f in r?r[f]:n[f],enumerable:h in r?r[h]:n[h],writable:!1});}return l(t,e,r);}:l:function(t,e,r){if(a(t),e=s(e),a(r),i)try{return l(t,e,r);}catch(t){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(t[e]=r.value),t;};},3880:function _(t,e,r){"use strict";var n=r(4797),i=r(3736),o=r(128),a=r(19),s=r(1212),u=r(8),l=r(2770),c=r(6182),h=Object.getOwnPropertyDescriptor;e.f=n?h:function(t,e){if(t=s(t),e=u(e),c)try{return h(t,e);}catch(t){}if(l(t,e))return a(!i(o.f,t,e),t[e]);};},125:function _(t,e,r){"use strict";var n=r(3763),i=r(3690).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i);};},7260:function _(t,e){"use strict";e.f=Object.getOwnPropertySymbols;},1562:function _(t,e,r){"use strict";var n=r(2770),i=r(5164),o=r(9452),a=r(56),s=r(4552),u=a("IE_PROTO"),l=Object,c=l.prototype;t.exports=s?l.getPrototypeOf:function(t){var e=o(t);if(n(e,u))return e[u];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof l?c:null;};},6466:function _(t,e,r){"use strict";var n=r(7889);t.exports=n({}.isPrototypeOf);},3763:function _(t,e,r){"use strict";var n=r(7889),i=r(2770),o=r(1212),a=r(5282).indexOf,s=r(7076),u=n([].push);t.exports=function(t,e){var r,n=o(t),l=0,c=[];for(r in n)!i(s,r)&&i(n,r)&&u(c,r);for(;e.length>l;)i(n,r=e[l++])&&(~a(c,r)||u(c,r));return c;};},1185:function _(t,e,r){"use strict";var n=r(3763),i=r(3690);t.exports=Object.keys||function(t){return n(t,i);};},128:function _(t,e){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable;}:r;},1576:function _(t,e,r){"use strict";var n=r(7809),i=r(5343),o=r(1365),a=r(857);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array;}catch(t){}return function(r,n){return o(r),a(n),i(r)?(e?t(r,n):r.__proto__=n,r):r;};}():void 0);},8367:function _(t,e,r){"use strict";var n=r(3736),i=r(5164),o=r(5343),a=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&i(r=t.toString)&&!o(s=n(r,t)))return s;if(i(r=t.valueOf)&&!o(s=n(r,t)))return s;if("string"!==e&&i(r=t.toString)&&!o(s=n(r,t)))return s;throw new a("Can't convert object to primitive value");};},6608:function _(t,e,r){"use strict";var n=r(148),i=r(7889),o=r(125),a=r(7260),s=r(5546),u=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(s(t)),r=a.f;return r?u(e,r(t)):e;};},9930:function _(t){"use strict";t.exports=function(t){try{return{error:!1,value:t()};}catch(t){return{error:!0,value:t};}};},8021:function _(t,e,r){"use strict";var n=r(2928),i=r(2405),o=r(5164),a=r(4857),s=r(9413),u=r(1642),l=r(6323),c=r(9947),h=r(2358),f=r(2389),p=i&&i.prototype,y=u("species"),d=!1,v=o(n.PromiseRejectionEvent),m=a("Promise",function(){var t=s(i),e=t!==String(i);if(!e&&66===f)return!0;if(h&&(!p.catch||!p.finally))return!0;if(!f||f<51||!/native code/.test(t)){var r=new i(function(t){t(1);}),n=function n(t){t(function(){},function(){});};if((r.constructor={})[y]=n,!(d=r.then(function(){})instanceof n))return!0;}return!e&&(l||c)&&!v;});t.exports={CONSTRUCTOR:m,REJECTION_EVENT:v,SUBCLASSING:d};},2405:function _(t,e,r){"use strict";var n=r(2928);t.exports=n.Promise;},899:function _(t,e,r){"use strict";var n=r(5546),i=r(5343),o=r(2308);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=o.f(t);return(0,r.resolve)(e),r.promise;};},9476:function _(t,e,r){"use strict";var n=r(2405),i=r(8211),o=r(8021).CONSTRUCTOR;t.exports=o||!i(function(t){n.all(t).then(void 0,function(){});});},3128:function _(t){"use strict";var e=function e(){this.head=null,this.tail=null;};e.prototype={add:function add(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e;},get:function get(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item;}},t.exports=e;},4801:function _(t,e,r){"use strict";var n=r(3736),i=r(5546),o=r(5164),a=r(7953),s=r(2542),u=TypeError;t.exports=function(t,e){var r=t.exec;if(o(r)){var l=n(r,t,e);return null!==l&&i(l),l;}if("RegExp"===a(t))return n(s,t,e);throw new u("RegExp#exec called on incompatible receiver");};},2542:function _(t,e,r){"use strict";var n,i,o=r(3736),a=r(7889),s=r(106),u=r(2020),l=r(9720),c=r(1930),h=r(8905),f=r(6814).get,p=r(180),y=r(529),d=c("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,_m2=v,g=a("".charAt),b=a("".indexOf),x=a("".replace),w=a("".slice),S=(i=/b*/g,o(v,n=/a/,"a"),o(v,i,"a"),0!==n.lastIndex||0!==i.lastIndex),_=l.BROKEN_CARET,M=void 0!==/()??/.exec("")[1];(S||M||_||p||y)&&(_m2=function m(t){var e,r,n,i,a,l,c,p=this,y=f(p),O=s(t),P=y.raw;if(P)return P.lastIndex=p.lastIndex,e=o(_m2,P,O),p.lastIndex=P.lastIndex,e;var k=y.groups,E=_&&p.sticky,C=o(u,p),T=p.source,A=0,N=O;if(E&&(C=x(C,"y",""),-1===b(C,"g")&&(C+="g"),N=w(O,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==g(O,p.lastIndex-1))&&(T="(?: "+T+")",N=" "+N,A++),r=new RegExp("^(?:"+T+")",C)),M&&(r=new RegExp("^"+T+"$(?!\\s)",C)),S&&(n=p.lastIndex),i=o(v,E?r:p,N),E?i?(i.input=w(i.input,A),i[0]=w(i[0],A),i.index=p.lastIndex,p.lastIndex+=i[0].length):p.lastIndex=0:S&&i&&(p.lastIndex=p.global?i.index+i[0].length:n),M&&i&&i.length>1&&o(d,i[0],r,function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0);}),i&&k)for(i.groups=l=h(null),a=0;a<k.length;a++)l[(c=k[a])[0]]=i[c[1]];return i;}),t.exports=_m2;},2020:function _(t,e,r){"use strict";var n=r(5546);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e;};},5081:function _(t,e,r){"use strict";var n=r(3736),i=r(2770),o=r(6466),a=r(2020),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||i(t,"flags")||!o(s,t)?e:n(a,t);};},9720:function _(t,e,r){"use strict";var n=r(3634),i=r(2928).RegExp,o=n(function(){var t=i("a","y");return t.lastIndex=2,null!==t.exec("abcd");}),a=o||n(function(){return!i("a","y").sticky;}),s=o||n(function(){var t=i("^r","gy");return t.lastIndex=2,null!==t.exec("str");});t.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:o};},180:function _(t,e,r){"use strict";var n=r(3634),i=r(2928).RegExp;t.exports=n(function(){var t=i(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags);});},529:function _(t,e,r){"use strict";var n=r(3634),i=r(2928).RegExp;t.exports=n(function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c");});},1365:function _(t,e,r){"use strict";var n=r(4350),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t;};},7412:function _(t,e,r){"use strict";var n=r(2928),i=r(4797),o=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!i)return n[t];var e=o(n,t);return e&&e.value;};},6956:function _(t,e,r){"use strict";var n=r(148),i=r(7557),o=r(1642),a=r(4797),s=o("species");t.exports=function(t){var e=n(t);a&&e&&!e[s]&&i(e,s,{configurable:!0,get:function get(){return this;}});};},5418:function _(t,e,r){"use strict";var n=r(754).f,i=r(2770),o=r(1642)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!i(t,o)&&n(t,o,{configurable:!0,value:e});};},56:function _(t,e,r){"use strict";var n=r(1930),i=r(6177),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t));};},3094:function _(t,e,r){"use strict";var n=r(2358),i=r(2928),o=r(9998),a="__core-js_shared__",s=t.exports=i[a]||o(a,{});(s.versions||(s.versions=[])).push({version:"3.37.0",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE",source:"https://github.com/zloirock/core-js"});},1930:function _(t,e,r){"use strict";var n=r(3094);t.exports=function(t,e){return n[t]||(n[t]=e||{});};},3900:function _(t,e,r){"use strict";var n=r(5546),i=r(6961),o=r(4350),a=r(1642)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||o(r=n(s)[a])?e:i(r);};},3908:function _(t,e,r){"use strict";var n=r(7889),i=r(3784),o=r(106),a=r(1365),s=n("".charAt),u=n("".charCodeAt),l=n("".slice),c=function c(t){return function(e,r){var n,c,h=o(a(e)),f=i(r),p=h.length;return f<0||f>=p?t?"":void 0:(n=u(h,f))<55296||n>56319||f+1===p||(c=u(h,f+1))<56320||c>57343?t?s(h,f):n:t?l(h,f,f+2):c-56320+(n-55296<<10)+65536;};};t.exports={codeAt:c(!1),charAt:c(!0)};},3289:function _(t,e,r){"use strict";var n=r(9071).PROPER,i=r(3634),o=r(1161);t.exports=function(t){return i(function(){return!!o[t]()||"​…᠎"!=="​…᠎"[t]()||n&&o[t].name!==t;});};},4611:function _(t,e,r){"use strict";var n=r(7889),i=r(1365),o=r(106),a=r(1161),s=n("".replace),u=RegExp("^["+a+"]+"),l=RegExp("(^|[^"+a+"])["+a+"]+$"),c=function c(t){return function(e){var r=o(i(e));return 1&t&&(r=s(r,u,"")),2&t&&(r=s(r,l,"$1")),r;};};t.exports={start:c(1),end:c(2),trim:c(3)};},6576:function _(t,e,r){"use strict";var n=r(2389),i=r(3634),o=r(2928).String;t.exports=!!Object.getOwnPropertySymbols&&!i(function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41;});},6130:function _(t,e,r){"use strict";var n,i,o,a,s=r(2928),u=r(678),l=r(8269),c=r(5164),h=r(2770),f=r(3634),p=r(3490),y=r(5905),d=r(9750),v=r(597),m=r(3165),g=r(9407),b=s.setImmediate,x=s.clearImmediate,w=s.process,S=s.Dispatch,_=s.Function,M=s.MessageChannel,O=s.String,P=0,k={},E="onreadystatechange";f(function(){n=s.location;});var C=function C(t){if(h(k,t)){var e=k[t];delete k[t],e();}},T=function T(t){return function(){C(t);};},A=function A(t){C(t.data);},N=function N(t){s.postMessage(O(t),n.protocol+"//"+n.host);};b&&x||(b=function b(t){v(arguments.length,1);var e=c(t)?t:_(t),r=y(arguments,1);return k[++P]=function(){u(e,void 0,r);},i(P),P;},x=function x(t){delete k[t];},g?i=function i(t){w.nextTick(T(t));}:S&&S.now?i=function i(t){S.now(T(t));}:M&&!m?(a=(o=new M()).port2,o.port1.onmessage=A,i=l(a.postMessage,a)):s.addEventListener&&c(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!f(N)?(i=N,s.addEventListener("message",A,!1)):i=E in d("script")?function(t){p.appendChild(d("script"))[E]=function(){p.removeChild(this),C(t);};}:function(t){setTimeout(T(t),0);}),t.exports={set:b,clear:x};},9603:function _(t,e,r){"use strict";var n=r(3784),i=Math.max,o=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):o(r,e);};},1212:function _(t,e,r){"use strict";var n=r(4384),i=r(1365);t.exports=function(t){return n(i(t));};},3784:function _(t,e,r){"use strict";var n=r(4433);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e);};},1995:function _(t,e,r){"use strict";var n=r(3784),i=Math.min;t.exports=function(t){var e=n(t);return e>0?i(e,9007199254740991):0;};},9452:function _(t,e,r){"use strict";var n=r(1365),i=Object;t.exports=function(t){return i(n(t));};},7762:function _(t,e,r){"use strict";var n=r(3736),i=r(5343),o=r(5648),a=r(4897),s=r(8367),u=r(1642),l=TypeError,c=u("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var r,u=a(t,c);if(u){if(void 0===e&&(e="default"),r=n(u,t,e),!i(r)||o(r))return r;throw new l("Can't convert object to primitive value");}return void 0===e&&(e="number"),s(t,e);};},8:function _(t,e,r){"use strict";var n=r(7762),i=r(5648);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+"";};},3361:function _(t,e,r){"use strict";var n={};n[r(1642)("toStringTag")]="z",t.exports="[object z]"===String(n);},106:function _(t,e,r){"use strict";var n=r(3502),i=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t);};},6390:function _(t){"use strict";var e=String;t.exports=function(t){try{return e(t);}catch(t){return"Object";}};},6177:function _(t,e,r){"use strict";var n=r(7889),i=0,o=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++i+o,36);};},2865:function _(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},n(t);}var i=r(6576);t.exports=i&&!Symbol.sham&&"symbol"==n(Symbol.iterator);},1363:function _(t,e,r){"use strict";var n=r(4797),i=r(3634);t.exports=n&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype;});},597:function _(t){"use strict";var e=TypeError;t.exports=function(t,r){if(t<r)throw new e("Not enough arguments");return t;};},6185:function _(t,e,r){"use strict";var n=r(2928),i=r(5164),o=n.WeakMap;t.exports=i(o)&&/native code/.test(String(o));},1642:function _(t,e,r){"use strict";var n=r(2928),i=r(1930),o=r(2770),a=r(6177),s=r(6576),u=r(2865),l=n.Symbol,c=i("wks"),h=u?l.for||l:l&&l.withoutSetter||a;t.exports=function(t){return o(c,t)||(c[t]=s&&o(l,t)?l[t]:h("Symbol."+t)),c[t];};},1161:function _(t){"use strict";t.exports="\t\n\x0B\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF";},7701:function _(t,e,r){"use strict";var n=r(3485),i=r(1515),o=r(5282).indexOf,a=r(8421),s=i([].indexOf),u=!!s&&1/s([1],1,-0)<0;n({target:"Array",proto:!0,forced:u||!a("indexOf")},{indexOf:function indexOf(t){var e=arguments.length>1?arguments[1]:void 0;return u?s(this,t,e)||0:o(this,t,e);}});},8641:function _(t,e,r){"use strict";var n=r(1212),i=r(1954),o=r(1356),a=r(6814),s=r(754).f,u=r(8993),l=r(6944),c=r(2358),h=r(4797),f="Array Iterator",p=a.set,y=a.getterFor(f);t.exports=u(Array,"Array",function(t,e){p(this,{type:f,target:n(t),index:0,kind:e});},function(){var t=y(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=void 0,l(void 0,!0);switch(t.kind){case"keys":return l(r,!1);case"values":return l(e[r],!1);}return l([r,e[r]],!1);},"values");var d=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!c&&h&&"values"!==d.name)try{s(d,"name",{value:"values"});}catch(t){}},3053:function _(t,e,r){"use strict";var n=r(3485),i=r(69).left,o=r(8421),a=r(2389);n({target:"Array",proto:!0,forced:!r(9407)&&a>79&&a<83||!o("reduce")},{reduce:function reduce(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0);}});},5749:function _(t,e,r){"use strict";var n=r(3485),i=r(7889),o=r(4783),a=i([].reverse),s=[1,2];n({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function reverse(){return o(this)&&(this.length=this.length),a(this);}});},760:function _(t,e,r){"use strict";var n=r(3485),i=r(3736),o=r(3873),a=r(2308),s=r(9930),u=r(7641);n({target:"Promise",stat:!0,forced:r(9476)},{all:function all(t){var e=this,r=a.f(e),n=r.resolve,l=r.reject,c=s(function(){var r=o(e.resolve),a=[],s=0,c=1;u(t,function(t){var o=s++,u=!1;c++,i(r,e,t).then(function(t){u||(u=!0,a[o]=t,--c||n(a));},l);}),--c||n(a);});return c.error&&l(c.value),r.promise;}});},5836:function _(t,e,r){"use strict";var n=r(3485),i=r(2358),o=r(8021).CONSTRUCTOR,a=r(2405),s=r(148),u=r(5164),l=r(4197),c=a&&a.prototype;if(n({target:"Promise",proto:!0,forced:o,real:!0},{catch:function _catch(t){return this.then(void 0,t);}}),!i&&u(a)){var h=s("Promise").prototype.catch;c.catch!==h&&l(c,"catch",h,{unsafe:!0});}},43:function _(t,e,r){"use strict";var n,i,o,a=r(3485),s=r(2358),u=r(9407),l=r(2928),c=r(3736),h=r(4197),f=r(1576),p=r(5418),y=r(6956),d=r(3873),v=r(5164),m=r(5343),g=r(9662),b=r(3900),x=r(6130).set,w=r(3790),S=r(4138),_=r(9930),M=r(3128),O=r(6814),P=r(2405),k=r(8021),E=r(2308),C="Promise",T=k.CONSTRUCTOR,A=k.REJECTION_EVENT,N=k.SUBCLASSING,j=O.getterFor(C),I=O.set,R=P&&P.prototype,L=P,F=R,D=l.TypeError,B=l.document,G=l.process,U=E.f,V=U,q=!!(B&&B.createEvent&&l.dispatchEvent),z="unhandledrejection",H=function H(t){var e;return!(!m(t)||!v(e=t.then))&&e;},Q=function Q(t,e){var r,n,i,o=e.value,a=1===e.state,s=a?t.ok:t.fail,u=t.resolve,l=t.reject,h=t.domain;try{s?(a||(2===e.rejection&&$(e),e.rejection=1),!0===s?r=o:(h&&h.enter(),r=s(o),h&&(h.exit(),i=!0)),r===t.promise?l(new D("Promise-chain cycle")):(n=H(r))?c(n,r,u,l):u(r)):l(o);}catch(t){h&&!i&&h.exit(),l(t);}},W=function W(t,e){t.notified||(t.notified=!0,w(function(){for(var r,n=t.reactions;r=n.get();)Q(r,t);t.notified=!1,e&&!t.rejection&&Y(t);}));},X=function X(t,e,r){var n,i;q?((n=B.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),l.dispatchEvent(n)):n={promise:e,reason:r},!A&&(i=l["on"+t])?i(n):t===z&&S("Unhandled promise rejection",r);},Y=function Y(t){c(x,l,function(){var e,r=t.facade,n=t.value;if(J(t)&&(e=_(function(){u?G.emit("unhandledRejection",n,r):X(z,r,n);}),t.rejection=u||J(t)?2:1,e.error))throw e.value;});},J=function J(t){return 1!==t.rejection&&!t.parent;},$=function $(t){c(x,l,function(){var e=t.facade;u?G.emit("rejectionHandled",e):X("rejectionhandled",e,t.value);});},K=function K(t,e,r){return function(n){t(e,n,r);};},Z=function Z(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,W(t,!0));},tt=function t(e,r,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===r)throw new D("Promise can't be resolved itself");var i=H(r);i?w(function(){var n={done:!1};try{c(i,r,K(t,n,e),K(Z,n,e));}catch(t){Z(n,t,e);}}):(e.value=r,e.state=1,W(e,!1));}catch(t){Z({done:!1},t,e);}}};if(T&&(F=(L=function L(t){g(this,F),d(t),c(n,this);var e=j(this);try{t(K(tt,e),K(Z,e));}catch(t){Z(e,t);}}).prototype,(n=function n(t){I(this,{type:C,done:!1,notified:!1,parent:!1,reactions:new M(),rejection:!1,state:0,value:void 0});}).prototype=h(F,"then",function(t,e){var r=j(this),n=U(b(this,L));return r.parent=!0,n.ok=!v(t)||t,n.fail=v(e)&&e,n.domain=u?G.domain:void 0,0===r.state?r.reactions.add(n):w(function(){Q(n,r);}),n.promise;}),i=function i(){var t=new n(),e=j(t);this.promise=t,this.resolve=K(tt,e),this.reject=K(Z,e);},E.f=U=function U(t){return t===L||void 0===t?new i(t):V(t);},!s&&v(P)&&R!==Object.prototype)){o=R.then,N||h(R,"then",function(t,e){var r=this;return new L(function(t,e){c(o,r,t,e);}).then(t,e);},{unsafe:!0});try{delete R.constructor;}catch(t){}f&&f(R,F);}a({global:!0,constructor:!0,wrap:!0,forced:T},{Promise:L}),p(L,C,!1,!0),y(C);},3633:function _(t,e,r){"use strict";r(43),r(760),r(5836),r(1414),r(7096),r(8555);},1414:function _(t,e,r){"use strict";var n=r(3485),i=r(3736),o=r(3873),a=r(2308),s=r(9930),u=r(7641);n({target:"Promise",stat:!0,forced:r(9476)},{race:function race(t){var e=this,r=a.f(e),n=r.reject,l=s(function(){var a=o(e.resolve);u(t,function(t){i(a,e,t).then(r.resolve,n);});});return l.error&&n(l.value),r.promise;}});},7096:function _(t,e,r){"use strict";var n=r(3485),i=r(2308);n({target:"Promise",stat:!0,forced:r(8021).CONSTRUCTOR},{reject:function reject(t){var e=i.f(this);return(0,e.reject)(t),e.promise;}});},8555:function _(t,e,r){"use strict";var n=r(3485),i=r(148),o=r(2358),a=r(2405),s=r(8021).CONSTRUCTOR,u=r(899),l=i("Promise"),c=o&&!s;n({target:"Promise",stat:!0,forced:o||s},{resolve:function resolve(t){return u(c&&this===l?a:this,t);}});},248:function _(t,e,r){"use strict";var n=r(3485),i=r(2542);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i});},4600:function _(t,e,r){"use strict";var n=r(9071).PROPER,i=r(4197),o=r(5546),a=r(106),s=r(3634),u=r(5081),l="toString",c=RegExp.prototype,h=c[l],f=s(function(){return"/a/b"!==h.call({source:"a",flags:"b"});}),p=n&&h.name!==l;(f||p)&&i(c,l,function(){var t=o(this);return"/"+a(t.source)+"/"+a(u(t));},{unsafe:!0});},6548:function _(t,e,r){"use strict";var n,i=r(3485),o=r(1515),a=r(3880).f,s=r(1995),u=r(106),l=r(3060),c=r(1365),h=r(6265),f=r(2358),p=o("".slice),y=Math.min,d=h("endsWith");i({target:"String",proto:!0,forced:!(!f&&!d&&(n=a(String.prototype,"endsWith"),n&&!n.writable)||d)},{endsWith:function endsWith(t){var e=u(c(this));l(t);var r=arguments.length>1?arguments[1]:void 0,n=e.length,i=void 0===r?n:y(s(r),n),o=u(t);return p(e,i-o.length,i)===o;}});},7284:function _(t,e,r){"use strict";var n=r(3485),i=r(7889),o=r(3060),a=r(1365),s=r(106),u=r(6265),l=i("".indexOf);n({target:"String",proto:!0,forced:!u("includes")},{includes:function includes(t){return!!~l(s(a(this)),s(o(t)),arguments.length>1?arguments[1]:void 0);}});},932:function _(t,e,r){"use strict";var n=r(3736),i=r(4691),o=r(5546),a=r(4350),s=r(1995),u=r(106),l=r(1365),c=r(4897),h=r(6698),f=r(4801);i("match",function(t,e,r){return[function(e){var r=l(this),i=a(e)?void 0:c(e,t);return i?n(i,e,r):new RegExp(e)[t](u(r));},function(t){var n=o(this),i=u(t),a=r(e,n,i);if(a.done)return a.value;if(!n.global)return f(n,i);var l=n.unicode;n.lastIndex=0;for(var c,p=[],y=0;null!==(c=f(n,i));){var d=u(c[0]);p[y]=d,""===d&&(n.lastIndex=h(i,s(n.lastIndex),l)),y++;}return 0===y?null:p;}];});},6021:function _(t,e,r){"use strict";var n=r(678),i=r(3736),o=r(7889),a=r(4691),s=r(3634),u=r(5546),l=r(5164),c=r(4350),h=r(3784),f=r(1995),p=r(106),y=r(1365),d=r(6698),v=r(4897),m=r(7289),g=r(4801),b=r(1642)("replace"),x=Math.max,w=Math.min,S=o([].concat),_=o([].push),M=o("".indexOf),O=o("".slice),P="$0"==="a".replace(/./,"$0"),k=!!/./[b]&&""===/./[b]("a","$0");a("replace",function(t,e,r){var o=k?"$":"$0";return[function(t,r){var n=y(this),o=c(t)?void 0:v(t,b);return o?i(o,t,n,r):i(e,p(n),t,r);},function(t,i){var a=u(this),s=p(t);if("string"==typeof i&&-1===M(i,o)&&-1===M(i,"$<")){var c=r(e,a,s,i);if(c.done)return c.value;}var y=l(i);y||(i=p(i));var v,b=a.global;b&&(v=a.unicode,a.lastIndex=0);for(var P,k=[];null!==(P=g(a,s))&&(_(k,P),b);)""===p(P[0])&&(a.lastIndex=d(s,f(a.lastIndex),v));for(var E,C="",T=0,A=0;A<k.length;A++){for(var N,j=p((P=k[A])[0]),I=x(w(h(P.index),s.length),0),R=[],L=1;L<P.length;L++)_(R,void 0===(E=P[L])?E:String(E));var F=P.groups;if(y){var D=S([j],R,I,s);void 0!==F&&_(D,F),N=p(n(i,void 0,D));}else N=m(j,s,I,R,F,i);I>=T&&(C+=O(s,T,I)+N,T=I+j.length);}return C+O(s,T);}];},!!s(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t;},"7"!=="".replace(t,"$<a>");})||!P||k);},7169:function _(t,e,r){"use strict";var n=r(3736),i=r(7889),o=r(4691),a=r(5546),s=r(4350),u=r(1365),l=r(3900),c=r(6698),h=r(1995),f=r(106),p=r(4897),y=r(4801),d=r(9720),v=r(3634),m=d.UNSUPPORTED_Y,g=Math.min,b=i([].push),x=i("".slice),w=!v(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments);};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1];}),S="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;o("split",function(t,e,r){var i="0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:n(e,this,t,r);}:e;return[function(e,r){var o=u(this),a=s(e)?void 0:p(e,t);return a?n(a,e,o,r):n(i,f(o),e,r);},function(t,n){var o=a(this),s=f(t);if(!S){var u=r(i,o,s,n,i!==e);if(u.done)return u.value;}var p=l(o,RegExp),d=o.unicode,v=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(m?"g":"y"),w=new p(m?"^(?:"+o.source+")":o,v),_=void 0===n?4294967295:n>>>0;if(0===_)return[];if(0===s.length)return null===y(w,s)?[s]:[];for(var M=0,O=0,P=[];O<s.length;){w.lastIndex=m?0:O;var k,E=y(w,m?x(s,O):s);if(null===E||(k=g(h(w.lastIndex+(m?O:0)),s.length))===M)O=c(s,O,d);else{if(b(P,x(s,M,O)),P.length===_)return P;for(var C=1;C<=E.length-1;C++)if(b(P,E[C]),P.length===_)return P;O=M=k;}}return b(P,x(s,M)),P;}];},S||!w,m);},4533:function _(t,e,r){"use strict";var n,i=r(3485),o=r(1515),a=r(3880).f,s=r(1995),u=r(106),l=r(3060),c=r(1365),h=r(6265),f=r(2358),p=o("".slice),y=Math.min,d=h("startsWith");i({target:"String",proto:!0,forced:!(!f&&!d&&(n=a(String.prototype,"startsWith"),n&&!n.writable)||d)},{startsWith:function startsWith(t){var e=u(c(this));l(t);var r=s(y(arguments.length>1?arguments[1]:void 0,e.length)),n=u(t);return p(e,r,r+n.length)===n;}});},6497:function _(t,e,r){"use strict";var n=r(3485),i=r(4611).trim;n({target:"String",proto:!0,forced:r(3289)("trim")},{trim:function trim(){return i(this);}});},4482:function _(t,e,r){"use strict";var n=r(2928),i=r(8597),o=r(3031),a=r(8641),s=r(7592),u=r(5418),l=r(1642)("iterator"),c=a.values,h=function h(t,e){if(t){if(t[l]!==c)try{s(t,l,c);}catch(e){t[l]=c;}if(u(t,e,!0),i[e])for(var r in a)if(t[r]!==a[r])try{s(t,r,a[r]);}catch(e){t[r]=a[r];}}};for(var f in i)h(n[f]&&n[f].prototype,f);h(o,"DOMTokenList");}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports;}r.amdO={},r.n=function(t){var e=t&&t.__esModule?function(){return t.default;}:function(){return t;};return r.d(e,{a:e}),e;},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]});},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")();}catch(t){if("object"==typeof window)return window;}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e);},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0});},r.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t;};var n={};return function(){"use strict";function t(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value;}catch(t){return void r(t);}s.done?e(u):Promise.resolve(u).then(n,i);}function e(e){return function(){var r=this,n=arguments;return new Promise(function(i,o){var a=e.apply(r,n);function s(e){t(a,i,o,s,u,"next",e);}function u(e){t(a,i,o,s,u,"throw",e);}s(void 0);});};}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},i(t);}function o(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==i(e)?e:e+"";}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t;}r.r(n),r.d(n,{createWebMapV2BaseExtending:function createWebMapV2BaseExtending(){return vh;}}),r(3633),r(932),r(6021),r(4533),r(8641),r(4482),r(3053),r(6548),r(7169);var a=r(7791),s=(r(6497),r(8476));function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},u(t);}r(7701),r(7284),r(5749);var _l2=function l(t,e){return(_l2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e;}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);})(t,e);};function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t;}_l2(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r());}function h(t,e){var r=t[0],n=t[1];return[r*Math.cos(e)-n*Math.sin(e),r*Math.sin(e)+n*Math.cos(e)];}function f(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0;r<t.length;r++)if("number"!=typeof t[r])throw new Error("assertNumbers arguments["+r+"] is not a number. "+u(t[r])+" == typeof "+t[r]);return!0;}var p=Math.PI;function y(t,e,r){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var n=t.rX,i=t.rY,o=t.x,a=t.y;n=Math.abs(t.rX),i=Math.abs(t.rY);var s=h([(e-o)/2,(r-a)/2],-t.xRot/180*p),u=s[0],l=s[1],c=Math.pow(u,2)/Math.pow(n,2)+Math.pow(l,2)/Math.pow(i,2);1<c&&(n*=Math.sqrt(c),i*=Math.sqrt(c)),t.rX=n,t.rY=i;var f=Math.pow(n,2)*Math.pow(l,2)+Math.pow(i,2)*Math.pow(u,2),y=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(i,2)-f)/f)),d=n*l/i*y,v=-i*u/n*y,m=h([d,v],t.xRot/180*p);t.cX=m[0]+(e+o)/2,t.cY=m[1]+(r+a)/2,t.phi1=Math.atan2((l-v)/i,(u-d)/n),t.phi2=Math.atan2((-l-v)/i,(-u-d)/n),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*p),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*p),t.phi1*=180/p,t.phi2*=180/p;}function d(t,e,r){f(t,e,r);var n=t*t+e*e-r*r;if(0>n)return[];if(0===n)return[[t*r/(t*t+e*e),e*r/(t*t+e*e)]];var i=Math.sqrt(n);return[[(t*r+e*i)/(t*t+e*e),(e*r-t*i)/(t*t+e*e)],[(t*r-e*i)/(t*t+e*e),(e*r+t*i)/(t*t+e*e)]];}var v,m=Math.PI/180;function g(t,e,r){return(1-r)*t+r*e;}function b(t,e,r,n){return t+Math.cos(n/180*p)*e+Math.sin(n/180*p)*r;}function x(t,e,r,n){var i=1e-6,o=e-t,a=r-e,s=3*o+3*(n-r)-6*a,u=6*(a-o),l=3*o;return Math.abs(s)<i?[-l/u]:function(t,e,r){void 0===r&&(r=1e-6);var n=t*t/4-e;if(n<-r)return[];if(n<=r)return[-t/2];var i=Math.sqrt(n);return[-t/2-i,-t/2+i];}(u/s,l/s,i);}function w(t,e,r,n,i){var o=1-i;return t*(o*o*o)+e*(3*o*o*i)+r*(3*o*i*i)+n*(i*i*i);}!function(t){function e(){return i(function(t,e,r){return t.relative&&(void 0!==t.x1&&(t.x1+=e),void 0!==t.y1&&(t.y1+=r),void 0!==t.x2&&(t.x2+=e),void 0!==t.y2&&(t.y2+=r),void 0!==t.x&&(t.x+=e),void 0!==t.y&&(t.y+=r),t.relative=!1),t;});}function r(){var t=NaN,e=NaN,r=NaN,n=NaN;return i(function(i,o,a){return i.type&k.SMOOTH_CURVE_TO&&(i.type=k.CURVE_TO,t=isNaN(t)?o:t,e=isNaN(e)?a:e,i.x1=i.relative?o-t:2*o-t,i.y1=i.relative?a-e:2*a-e),i.type&k.CURVE_TO?(t=i.relative?o+i.x2:i.x2,e=i.relative?a+i.y2:i.y2):(t=NaN,e=NaN),i.type&k.SMOOTH_QUAD_TO&&(i.type=k.QUAD_TO,r=isNaN(r)?o:r,n=isNaN(n)?a:n,i.x1=i.relative?o-r:2*o-r,i.y1=i.relative?a-n:2*a-n),i.type&k.QUAD_TO?(r=i.relative?o+i.x1:i.x1,n=i.relative?a+i.y1:i.y1):(r=NaN,n=NaN),i;});}function n(){var t=NaN,e=NaN;return i(function(r,n,i){if(r.type&k.SMOOTH_QUAD_TO&&(r.type=k.QUAD_TO,t=isNaN(t)?n:t,e=isNaN(e)?i:e,r.x1=r.relative?n-t:2*n-t,r.y1=r.relative?i-e:2*i-e),r.type&k.QUAD_TO){t=r.relative?n+r.x1:r.x1,e=r.relative?i+r.y1:r.y1;var o=r.x1,a=r.y1;r.type=k.CURVE_TO,r.x1=((r.relative?0:n)+2*o)/3,r.y1=((r.relative?0:i)+2*a)/3,r.x2=(r.x+2*o)/3,r.y2=(r.y+2*a)/3;}else t=NaN,e=NaN;return r;});}function i(t){var e=0,r=0,n=NaN,i=NaN;return function(o){if(isNaN(n)&&!(o.type&k.MOVE_TO))throw new Error("path must start with moveto");var a=t(o,e,r,n,i);return o.type&k.CLOSE_PATH&&(e=n,r=i),void 0!==o.x&&(e=o.relative?e+o.x:o.x),void 0!==o.y&&(r=o.relative?r+o.y:o.y),o.type&k.MOVE_TO&&(n=e,i=r),a;};}function o(t,e,r,n,o,a){return f(t,e,r,n,o,a),i(function(i,s,u,l){var c=i.x1,h=i.x2,f=i.relative&&!isNaN(l),p=void 0!==i.x?i.x:f?0:s,y=void 0!==i.y?i.y:f?0:u;function d(t){return t*t;}i.type&k.HORIZ_LINE_TO&&0!==e&&(i.type=k.LINE_TO,i.y=i.relative?0:u),i.type&k.VERT_LINE_TO&&0!==r&&(i.type=k.LINE_TO,i.x=i.relative?0:s),void 0!==i.x&&(i.x=i.x*t+y*r+(f?0:o)),void 0!==i.y&&(i.y=p*e+i.y*n+(f?0:a)),void 0!==i.x1&&(i.x1=i.x1*t+i.y1*r+(f?0:o)),void 0!==i.y1&&(i.y1=c*e+i.y1*n+(f?0:a)),void 0!==i.x2&&(i.x2=i.x2*t+i.y2*r+(f?0:o)),void 0!==i.y2&&(i.y2=h*e+i.y2*n+(f?0:a));var v=t*n-e*r;if(void 0!==i.xRot&&(1!==t||0!==e||0!==r||1!==n))if(0===v)delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag,i.type=k.LINE_TO;else{var m=i.xRot*Math.PI/180,g=Math.sin(m),b=Math.cos(m),x=1/d(i.rX),w=1/d(i.rY),S=d(b)*x+d(g)*w,_=2*g*b*(x-w),M=d(g)*x+d(b)*w,O=S*n*n-_*e*n+M*e*e,P=_*(t*n+e*r)-2*(S*r*n+M*t*e),E=S*r*r-_*t*r+M*t*t,C=(Math.atan2(P,O-E)+Math.PI)%Math.PI/2,T=Math.sin(C),A=Math.cos(C);i.rX=Math.abs(v)/Math.sqrt(O*d(A)+P*T*A+E*d(T)),i.rY=Math.abs(v)/Math.sqrt(O*d(T)-P*T*A+E*d(A)),i.xRot=180*C/Math.PI;}return void 0!==i.sweepFlag&&0>v&&(i.sweepFlag=+!i.sweepFlag),i;});}t.ROUND=function(t){function e(e){return Math.round(e*t)/t;}return void 0===t&&(t=1e13),f(t),function(t){return void 0!==t.x1&&(t.x1=e(t.x1)),void 0!==t.y1&&(t.y1=e(t.y1)),void 0!==t.x2&&(t.x2=e(t.x2)),void 0!==t.y2&&(t.y2=e(t.y2)),void 0!==t.x&&(t.x=e(t.x)),void 0!==t.y&&(t.y=e(t.y)),void 0!==t.rX&&(t.rX=e(t.rX)),void 0!==t.rY&&(t.rY=e(t.rY)),t;};},t.TO_ABS=e,t.TO_REL=function(){return i(function(t,e,r){return t.relative||(void 0!==t.x1&&(t.x1-=e),void 0!==t.y1&&(t.y1-=r),void 0!==t.x2&&(t.x2-=e),void 0!==t.y2&&(t.y2-=r),void 0!==t.x&&(t.x-=e),void 0!==t.y&&(t.y-=r),t.relative=!0),t;});},t.NORMALIZE_HVZ=function(t,e,r){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),i(function(n,i,o,a,s){if(isNaN(a)&&!(n.type&k.MOVE_TO))throw new Error("path must start with moveto");return e&&n.type&k.HORIZ_LINE_TO&&(n.type=k.LINE_TO,n.y=n.relative?0:o),r&&n.type&k.VERT_LINE_TO&&(n.type=k.LINE_TO,n.x=n.relative?0:i),t&&n.type&k.CLOSE_PATH&&(n.type=k.LINE_TO,n.x=n.relative?a-i:a,n.y=n.relative?s-o:s),n.type&k.ARC&&(0===n.rX||0===n.rY)&&(n.type=k.LINE_TO,delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag),n;});},t.NORMALIZE_ST=r,t.QT_TO_C=n,t.INFO=i,t.SANITIZE=function(t){void 0===t&&(t=0),f(t);var e=NaN,r=NaN,n=NaN,o=NaN;return i(function(i,a,s,u,l){var c=Math.abs,h=!1,f=0,p=0;if(i.type&k.SMOOTH_CURVE_TO&&(f=isNaN(e)?0:a-e,p=isNaN(r)?0:s-r),i.type&(k.CURVE_TO|k.SMOOTH_CURVE_TO)?(e=i.relative?a+i.x2:i.x2,r=i.relative?s+i.y2:i.y2):(e=NaN,r=NaN),i.type&k.SMOOTH_QUAD_TO?(n=isNaN(n)?a:2*a-n,o=isNaN(o)?s:2*s-o):i.type&k.QUAD_TO?(n=i.relative?a+i.x1:i.x1,o=i.relative?s+i.y1:i.y2):(n=NaN,o=NaN),i.type&k.LINE_COMMANDS||i.type&k.ARC&&(0===i.rX||0===i.rY||!i.lArcFlag)||i.type&k.CURVE_TO||i.type&k.SMOOTH_CURVE_TO||i.type&k.QUAD_TO||i.type&k.SMOOTH_QUAD_TO){var y=void 0===i.x?0:i.relative?i.x:i.x-a,d=void 0===i.y?0:i.relative?i.y:i.y-s;f=isNaN(n)?void 0===i.x1?f:i.relative?i.x:i.x1-a:n-a,p=isNaN(o)?void 0===i.y1?p:i.relative?i.y:i.y1-s:o-s;var v=void 0===i.x2?0:i.relative?i.x:i.x2-a,m=void 0===i.y2?0:i.relative?i.y:i.y2-s;c(y)<=t&&c(d)<=t&&c(f)<=t&&c(p)<=t&&c(v)<=t&&c(m)<=t&&(h=!0);}return i.type&k.CLOSE_PATH&&c(a-u)<=t&&c(s-l)<=t&&(h=!0),h?[]:i;});},t.MATRIX=o,t.ROTATE=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=0),f(t,e,r);var n=Math.sin(t),i=Math.cos(t);return o(i,n,-n,i,e-e*i+r*n,r-e*n-r*i);},t.TRANSLATE=function(t,e){return void 0===e&&(e=0),f(t,e),o(1,0,0,1,t,e);},t.SCALE=function(t,e){return void 0===e&&(e=t),f(t,e),o(t,0,0,e,0,0);},t.SKEW_X=function(t){return f(t),o(1,0,Math.atan(t),1,0,0);},t.SKEW_Y=function(t){return f(t),o(1,Math.atan(t),0,1,0,0);},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),f(t),o(-1,0,0,1,t,0);},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),f(t),o(1,0,0,-1,0,t);},t.A_TO_C=function(){return i(function(t,e,r){return k.ARC===t.type?function(t,e,r){var n,i,o,a;t.cX||y(t,e,r);for(var s=Math.min(t.phi1,t.phi2),u=Math.max(t.phi1,t.phi2)-s,l=Math.ceil(u/90),c=new Array(l),f=e,p=r,d=0;d<l;d++){var v=g(t.phi1,t.phi2,d/l),b=g(t.phi1,t.phi2,(d+1)/l),x=b-v,w=4/3*Math.tan(x*m/4),S=[Math.cos(v*m)-w*Math.sin(v*m),Math.sin(v*m)+w*Math.cos(v*m)],_=S[0],M=S[1],O=[Math.cos(b*m),Math.sin(b*m)],P=O[0],E=O[1],C=[P+w*Math.sin(b*m),E-w*Math.cos(b*m)],T=C[0],A=C[1];c[d]={relative:t.relative,type:k.CURVE_TO};var N=function N(e,r){var n=h([e*t.rX,r*t.rY],t.xRot),i=n[0],o=n[1];return[t.cX+i,t.cY+o];};n=N(_,M),c[d].x1=n[0],c[d].y1=n[1],i=N(T,A),c[d].x2=i[0],c[d].y2=i[1],o=N(P,E),c[d].x=o[0],c[d].y=o[1],t.relative&&(c[d].x1-=f,c[d].y1-=p,c[d].x2-=f,c[d].y2-=p,c[d].x-=f,c[d].y-=p),f=(a=[c[d].x,c[d].y])[0],p=a[1];}return c;}(t,t.relative?0:e,t.relative?0:r):t;});},t.ANNOTATE_ARCS=function(){return i(function(t,e,r){return t.relative&&(e=0,r=0),k.ARC===t.type&&y(t,e,r),t;});},t.CLONE=function(){return function(t){var e={};for(var r in t)e[r]=t[r];return e;};},t.CALCULATE_BOUNDS=function(){var t=e(),o=n(),a=r(),s=i(function(e,r,n){var i=a(o(t(function(t){var e={};for(var r in t)e[r]=t[r];return e;}(e))));function u(t){t>s.maxX&&(s.maxX=t),t<s.minX&&(s.minX=t);}function l(t){t>s.maxY&&(s.maxY=t),t<s.minY&&(s.minY=t);}if(i.type&k.DRAWING_COMMANDS&&(u(r),l(n)),i.type&k.HORIZ_LINE_TO&&u(i.x),i.type&k.VERT_LINE_TO&&l(i.y),i.type&k.LINE_TO&&(u(i.x),l(i.y)),i.type&k.CURVE_TO){u(i.x),l(i.y);for(var c=0,h=x(r,i.x1,i.x2,i.x);c<h.length;c++)0<(j=h[c])&&1>j&&u(w(r,i.x1,i.x2,i.x,j));for(var f=0,p=x(n,i.y1,i.y2,i.y);f<p.length;f++)0<(j=p[f])&&1>j&&l(w(n,i.y1,i.y2,i.y,j));}if(i.type&k.ARC){u(i.x),l(i.y),y(i,r,n);for(var v=i.xRot/180*Math.PI,m=Math.cos(v)*i.rX,g=Math.sin(v)*i.rX,S=-Math.sin(v)*i.rY,_=Math.cos(v)*i.rY,M=i.phi1<i.phi2?[i.phi1,i.phi2]:-180>i.phi2?[i.phi2+360,i.phi1+360]:[i.phi2,i.phi1],O=M[0],P=M[1],E=function E(t){var e=t[0],r=t[1],n=180*Math.atan2(r,e)/Math.PI;return n<O?n+360:n;},C=0,T=d(S,-m,0).map(E);C<T.length;C++)(j=T[C])>O&&j<P&&u(b(i.cX,m,S,j));for(var A=0,N=d(_,-g,0).map(E);A<N.length;A++){var j;(j=N[A])>O&&j<P&&l(b(i.cY,g,_,j));}}return e;});return s.minX=1/0,s.maxX=-1/0,s.minY=1/0,s.maxY=-1/0,s;};}(v||(v={}));var S,_=function(){function t(){}return t.prototype.round=function(t){return this.transform(v.ROUND(t));},t.prototype.toAbs=function(){return this.transform(v.TO_ABS());},t.prototype.toRel=function(){return this.transform(v.TO_REL());},t.prototype.normalizeHVZ=function(t,e,r){return this.transform(v.NORMALIZE_HVZ(t,e,r));},t.prototype.normalizeST=function(){return this.transform(v.NORMALIZE_ST());},t.prototype.qtToC=function(){return this.transform(v.QT_TO_C());},t.prototype.aToC=function(){return this.transform(v.A_TO_C());},t.prototype.sanitize=function(t){return this.transform(v.SANITIZE(t));},t.prototype.translate=function(t,e){return this.transform(v.TRANSLATE(t,e));},t.prototype.scale=function(t,e){return this.transform(v.SCALE(t,e));},t.prototype.rotate=function(t,e,r){return this.transform(v.ROTATE(t,e,r));},t.prototype.matrix=function(t,e,r,n,i,o){return this.transform(v.MATRIX(t,e,r,n,i,o));},t.prototype.skewX=function(t){return this.transform(v.SKEW_X(t));},t.prototype.skewY=function(t){return this.transform(v.SKEW_Y(t));},t.prototype.xSymmetry=function(t){return this.transform(v.X_AXIS_SYMMETRY(t));},t.prototype.ySymmetry=function(t){return this.transform(v.Y_AXIS_SYMMETRY(t));},t.prototype.annotateArcs=function(){return this.transform(v.ANNOTATE_ARCS());},t;}(),M=function M(t){return" "===t||"\t"===t||"\r"===t||"\n"===t;},O=function O(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0);},P=function(t){function e(){var e=t.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e;}return c(e,t),e.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t;},e.prototype.parse=function(t,e){var r=this;void 0===e&&(e=[]);for(var n=function n(t){e.push(t),r.curArgs.length=0,r.canParseCommandOrComma=!0;},i=0;i<t.length;i++){var o=t[i],a=!(this.curCommandType!==k.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),s=O(o)&&("0"===this.curNumber&&"0"===o||a);if(!O(o)||s){if("e"!==o&&"E"!==o){if("-"!==o&&"+"!==o||!this.curNumberHasExp||this.curNumberHasExpDigits){if("."!==o||this.curNumberHasExp||this.curNumberHasDecimal||a){if(this.curNumber&&-1!==this.curCommandType){var u=Number(this.curNumber);if(isNaN(u))throw new SyntaxError("Invalid number ending at "+i);if(this.curCommandType===k.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>u)throw new SyntaxError('Expected positive number, got "'+u+'" at index "'+i+'"');}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+i+'"');this.curArgs.push(u),this.curArgs.length===E[this.curCommandType]&&(k.HORIZ_LINE_TO===this.curCommandType?n({type:k.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):k.VERT_LINE_TO===this.curCommandType?n({type:k.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===k.MOVE_TO||this.curCommandType===k.LINE_TO||this.curCommandType===k.SMOOTH_QUAD_TO?(n({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),k.MOVE_TO===this.curCommandType&&(this.curCommandType=k.LINE_TO)):this.curCommandType===k.CURVE_TO?n({type:k.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===k.SMOOTH_CURVE_TO?n({type:k.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===k.QUAD_TO?n({type:k.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===k.ARC&&n({type:k.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0;}if(!M(o))if(","===o&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==o&&"-"!==o&&"."!==o){if(s)this.curNumber=o,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+i+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+o+'" at index '+i+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==o&&"Z"!==o){if("h"===o||"H"===o)this.curCommandType=k.HORIZ_LINE_TO,this.curCommandRelative="h"===o;else if("v"===o||"V"===o)this.curCommandType=k.VERT_LINE_TO,this.curCommandRelative="v"===o;else if("m"===o||"M"===o)this.curCommandType=k.MOVE_TO,this.curCommandRelative="m"===o;else if("l"===o||"L"===o)this.curCommandType=k.LINE_TO,this.curCommandRelative="l"===o;else if("c"===o||"C"===o)this.curCommandType=k.CURVE_TO,this.curCommandRelative="c"===o;else if("s"===o||"S"===o)this.curCommandType=k.SMOOTH_CURVE_TO,this.curCommandRelative="s"===o;else if("q"===o||"Q"===o)this.curCommandType=k.QUAD_TO,this.curCommandRelative="q"===o;else if("t"===o||"T"===o)this.curCommandType=k.SMOOTH_QUAD_TO,this.curCommandRelative="t"===o;else{if("a"!==o&&"A"!==o)throw new SyntaxError('Unexpected character "'+o+'" at index '+i+".");this.curCommandType=k.ARC,this.curCommandRelative="a"===o;}}else e.push({type:k.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1;}}else this.curNumber=o,this.curNumberHasDecimal="."===o;}else this.curNumber+=o,this.curNumberHasDecimal=!0;}else this.curNumber+=o;}else this.curNumber+=o,this.curNumberHasExp=!0;}else this.curNumber+=o,this.curNumberHasExpDigits=this.curNumberHasExp;}return e;},e.prototype.transform=function(t){return Object.create(this,{parse:{value:function value(e,r){void 0===r&&(r=[]);for(var n=0,i=Object.getPrototypeOf(this).parse.call(this,e);n<i.length;n++){var o=i[n],a=t(o);Array.isArray(a)?r.push.apply(r,a):r.push(a);}return r;}}});},e;}(_),k=function(t){function e(r){var n=t.call(this)||this;return n.commands="string"==typeof r?e.parse(r):r,n;}return c(e,t),e.prototype.encode=function(){return e.encode(this.commands);},e.prototype.getBounds=function(){var t=v.CALCULATE_BOUNDS();return this.transform(t),t;},e.prototype.transform=function(t){for(var e=[],r=0,n=this.commands;r<n.length;r++){var i=t(n[r]);Array.isArray(i)?e.push.apply(e,i):e.push(i);}return this.commands=e,this;},e.encode=function(t){return function(t){var e="";Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var n=t[r];if(n.type===k.CLOSE_PATH)e+="z";else if(n.type===k.HORIZ_LINE_TO)e+=(n.relative?"h":"H")+n.x;else if(n.type===k.VERT_LINE_TO)e+=(n.relative?"v":"V")+n.y;else if(n.type===k.MOVE_TO)e+=(n.relative?"m":"M")+n.x+" "+n.y;else if(n.type===k.LINE_TO)e+=(n.relative?"l":"L")+n.x+" "+n.y;else if(n.type===k.CURVE_TO)e+=(n.relative?"c":"C")+n.x1+" "+n.y1+" "+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===k.SMOOTH_CURVE_TO)e+=(n.relative?"s":"S")+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===k.QUAD_TO)e+=(n.relative?"q":"Q")+n.x1+" "+n.y1+" "+n.x+" "+n.y;else if(n.type===k.SMOOTH_QUAD_TO)e+=(n.relative?"t":"T")+n.x+" "+n.y;else{if(n.type!==k.ARC)throw new Error('Unexpected command type "'+n.type+'" at index '+r+".");e+=(n.relative?"a":"A")+n.rX+" "+n.rY+" "+n.xRot+" "+ +n.lArcFlag+" "+ +n.sweepFlag+" "+n.x+" "+n.y;}}return e;}(t);},e.parse=function(t){var e=new P(),r=[];return e.parse(t,r),e.finish(r),r;},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e;}(_),E=((S={})[k.MOVE_TO]=2,S[k.LINE_TO]=2,S[k.HORIZ_LINE_TO]=1,S[k.VERT_LINE_TO]=1,S[k.CLOSE_PATH]=0,S[k.QUAD_TO]=4,S[k.SMOOTH_QUAD_TO]=2,S[k.CURVE_TO]=6,S[k.SMOOTH_CURVE_TO]=4,S[k.ARC]=7,S);function C(t){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},C(t);}r(4600);var T=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],A=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function N(t,e,r,n,i,o){if(!(isNaN(o)||o<1)){o|=0;var a=function(t,e,r,n,i){if("string"==typeof t&&(t=document.getElementById(t)),!t||"object"!==C(t)||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var o=t.getContext("2d");try{return o.getImageData(e,r,n,i);}catch(t){throw new Error("unable to access image data: "+t);}}(t,e,r,n,i);a=function(t,e,r,n,i,o){for(var a,s=t.data,u=2*o+1,l=n-1,c=i-1,h=o+1,f=h*(h+1)/2,p=new j(),y=p,d=1;d<u;d++)y=y.next=new j(),d===h&&(a=y);y.next=p;for(var v=null,m=null,g=0,b=0,x=T[o],w=A[o],S=0;S<i;S++){y=p;for(var _=s[b],M=s[b+1],O=s[b+2],P=s[b+3],k=0;k<h;k++)y.r=_,y.g=M,y.b=O,y.a=P,y=y.next;for(var E=0,C=0,N=0,I=0,R=h*_,L=h*M,F=h*O,D=h*P,B=f*_,G=f*M,U=f*O,V=f*P,q=1;q<h;q++){var z=b+((l<q?l:q)<<2),H=s[z],Q=s[z+1],W=s[z+2],X=s[z+3],Y=h-q;B+=(y.r=H)*Y,G+=(y.g=Q)*Y,U+=(y.b=W)*Y,V+=(y.a=X)*Y,E+=H,C+=Q,N+=W,I+=X,y=y.next;}v=p,m=a;for(var J=0;J<n;J++){var $=V*x>>>w;if(s[b+3]=$,0!==$){var K=255/$;s[b]=(B*x>>>w)*K,s[b+1]=(G*x>>>w)*K,s[b+2]=(U*x>>>w)*K;}else s[b]=s[b+1]=s[b+2]=0;B-=R,G-=L,U-=F,V-=D,R-=v.r,L-=v.g,F-=v.b,D-=v.a;var Z=J+o+1;Z=g+(Z<l?Z:l)<<2,B+=E+=v.r=s[Z],G+=C+=v.g=s[Z+1],U+=N+=v.b=s[Z+2],V+=I+=v.a=s[Z+3],v=v.next;var tt=m,et=tt.r,rt=tt.g,nt=tt.b,it=tt.a;R+=et,L+=rt,F+=nt,D+=it,E-=et,C-=rt,N-=nt,I-=it,m=m.next,b+=4;}g+=n;}for(var ot=0;ot<n;ot++){var at=s[b=ot<<2],st=s[b+1],ut=s[b+2],lt=s[b+3],ct=h*at,ht=h*st,ft=h*ut,pt=h*lt,yt=f*at,dt=f*st,vt=f*ut,mt=f*lt;y=p;for(var gt=0;gt<h;gt++)y.r=at,y.g=st,y.b=ut,y.a=lt,y=y.next;for(var bt=n,xt=0,wt=0,St=0,_t=0,Mt=1;Mt<=o;Mt++){b=bt+ot<<2;var Ot=h-Mt;yt+=(y.r=at=s[b])*Ot,dt+=(y.g=st=s[b+1])*Ot,vt+=(y.b=ut=s[b+2])*Ot,mt+=(y.a=lt=s[b+3])*Ot,_t+=at,xt+=st,wt+=ut,St+=lt,y=y.next,Mt<c&&(bt+=n);}b=ot,v=p,m=a;for(var Pt=0;Pt<i;Pt++){var kt=b<<2;s[kt+3]=lt=mt*x>>>w,lt>0?(lt=255/lt,s[kt]=(yt*x>>>w)*lt,s[kt+1]=(dt*x>>>w)*lt,s[kt+2]=(vt*x>>>w)*lt):s[kt]=s[kt+1]=s[kt+2]=0,yt-=ct,dt-=ht,vt-=ft,mt-=pt,ct-=v.r,ht-=v.g,ft-=v.b,pt-=v.a,kt=ot+((kt=Pt+h)<c?kt:c)*n<<2,yt+=_t+=v.r=s[kt],dt+=xt+=v.g=s[kt+1],vt+=wt+=v.b=s[kt+2],mt+=St+=v.a=s[kt+3],v=v.next,ct+=at=m.r,ht+=st=m.g,ft+=ut=m.b,pt+=lt=m.a,_t-=at,xt-=st,wt-=ut,St-=lt,m=m.next,b+=n;}}return t;}(a,0,0,n,i,o),t.getContext("2d").putImageData(a,e,r);}}var j=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null;};function I(t){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},I(t);}function R(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=X(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var _n2=0,i=function i(){};return{s:i,n:function n(){return _n2>=t.length?{done:!0}:{done:!1,value:t[_n2++]};},e:function e(t){throw t;},f:i};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,s=!1;return{s:function s(){r=r.call(t);},n:function n(){var t=r.next();return a=t.done,t;},e:function e(t){s=!0,o=t;},f:function f(){try{a||null==r.return||r.return();}finally{if(s)throw o;}}};}function L(){return L="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=G(t)););return t;}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value;}},L.apply(this,arguments);}function F(t,e,r){return e=G(e),D(t,B()?Reflect.construct(e,r||[],G(t).constructor):e.apply(t,r));}function D(t,e){if(e&&("object"===I(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}function B(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(B=function B(){return!!t;})();}function G(t){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},G(t);}function U(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&V(t,e);}function V(t,e){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},V(t,e);}function q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}function z(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,Q(n.key),n);}}function H(t,e,r){return e&&z(t.prototype,e),r&&z(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;}function Q(t){var e=function(t,e){if("object"!=I(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=I(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==I(e)?e:e+"";}function W(t,e){return function(t){if(Array.isArray(t))return t;}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,l=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1;}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){l=!0,i=t;}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return;}finally{if(l)throw i;}}return s;}}(t,e)||X(t,e)||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.");}();}function X(t,e){if(t){if("string"==typeof t)return Y(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)?Y(t,e):void 0;}}function Y(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 J(){J=function J(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value;},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{l({},"");}catch(t){l=function l(t,e,r){return t[e]=r;};}function c(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new T(n||[]);return i(a,"_invoke",{value:P(t,r,s)}),a;}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=c;var f="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function g(){}function b(){}var x={};l(x,a,function(){return this;});var w=Object.getPrototypeOf,S=w&&w(w(A([])));S&&S!==r&&n.call(S,a)&&(x=S);var _=b.prototype=m.prototype=Object.create(x);function M(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t);});});}function O(t,e){function r(i,o,a,s){var u=h(t[i],t,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==I(c)&&n.call(c,"__await")?e.resolve(c.__await).then(function(t){r("next",t,a,s);},function(t){r("throw",t,a,s);}):e.resolve(c).then(function(t){l.value=t,a(l);},function(t){return r("throw",t,a,s);});}s(u.arg);}var o;i(this,"_invoke",{value:function value(t,n){function i(){return new e(function(e,i){r(t,n,e,i);});}return o=o?o.then(i,i):i();}});}function P(e,r,n){var i=f;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===d){if("throw"===o)throw a;return{value:t,done:!0};}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=k(s,n);if(u){if(u===v)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=d,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var l=h(e,r,n);if("normal"===l.type){if(i=n.done?d:p,l.arg===v)continue;return{value:l.arg,done:n.done};}"throw"===l.type&&(i=d,n.method="throw",n.arg=l.arg);}};}function k(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v);}function E(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0);}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r;};return o.next=o;}}throw new TypeError(I(e)+" is not iterable");}return g.prototype=b,i(_,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t;},e.awrap=function(t){return{__await:t};},M(O.prototype),l(O.prototype,s,function(){return this;}),e.AsyncIterator=O,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new O(c(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},M(_),l(_,u,"Generator"),l(_,a,function(){return this;}),l(_,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t;}return t.done=!0,t;};},e.values=A,T.prototype={constructor:T,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i;}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc);}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break;}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a);},complete:function complete(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),v;},finish:function finish(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),C(r),v;}},catch:function _catch(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 i=n.arg;C(r);}return i;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v;}},e;}function $(t){return t.replace(/(?!\u3000)\s+/gm," ");}function K(t){return((t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[]).map(parseFloat);}var Z=/^[A-Z-]+$/;function tt(t){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t)||[];return e[2]||e[3]||e[4];}var et=/(\[[^\]]+\])/g,rt=/(#[^\s+>~.[:]+)/g,nt=/(\.[^\s+>~.[:]+)/g,it=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,ot=/(:[\w-]+\([^)]*\))/gi,at=/(:[^\s+>~.[:]+)/g,st=/([^\s+>~.[:]+)/g;function ut(t,e){var r=e.exec(t);return r?[t.replace(e," "),r.length]:[t,0];}var lt=1e-8;function ct(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2));}function ht(t,e){return(t[0]*e[0]+t[1]*e[1])/(ct(t)*ct(e));}function ft(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(ht(t,e));}function pt(t){return t*t*t;}function yt(t){return 3*t*t*(1-t);}function dt(t){return 3*t*(1-t)*(1-t);}function vt(t){return(1-t)*(1-t)*(1-t);}function mt(t){return t*t;}function gt(t){return 2*t*(1-t);}function bt(t){return(1-t)*(1-t);}var xt=function(){function t(e,r,n){q(this,t),this.document=e,this.name=r,this.value=n,this.isNormalizedColor=!1;}return H(t,[{key:"split",value:function value(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ",r=this.document,n=this.name;return $(this.getString()).trim().split(e).map(function(e){return new t(r,n,e);});}},{key:"hasValue",value:function value(t){var e=this.value;return null!==e&&""!==e&&(t||0!==e)&&void 0!==e;}},{key:"isString",value:function value(t){var e=this.value,r="string"==typeof e;return r&&t?t.test(e):r;}},{key:"isUrlDefinition",value:function value(){return this.isString(/^url\(/);}},{key:"isPixels",value:function value(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case t.endsWith("px"):case /^[0-9]+$/.test(t):return!0;default:return!1;}}},{key:"setValue",value:function value(t){return this.value=t,this;}},{key:"getValue",value:function value(t){return void 0===t||this.hasValue()?this.value:t;}},{key:"getNumber",value:function value(t){if(!this.hasValue())return void 0===t?0:parseFloat(t);var e=this.value,r=parseFloat(e);return this.isString(/%$/)&&(r/=100),r;}},{key:"getString",value:function value(t){return void 0===t||this.hasValue()?void 0===this.value?"":String(this.value):String(t);}},{key:"getColor",value:function value(t){var e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=function(t){if(!t.startsWith("rgb"))return t;var e=3;return t.replace(/\d+(\.\d+)?/g,function(t,r){return e--&&r?String(Math.round(parseFloat(t))):t;});}(e),this.value=e),e;}},{key:"getDpi",value:function value(){return 96;}},{key:"getRem",value:function value(){return this.document.rootEmSize;}},{key:"getEm",value:function value(){return this.document.emSize;}},{key:"getUnits",value:function value(){return this.getString().replace(/[0-9.-]/g,"");}},{key:"getPixels",value:function value(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var r=W("boolean"==typeof t?[void 0,t]:[t],2),n=r[0],i=r[1],o=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(o.computeSize("x"),o.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(o.computeSize("x"),o.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*o.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*o.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&i:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*o.computeSize(n);default:var a=this.getNumber();return e&&a<1?a*o.computeSize(n):a;}}},{key:"getMilliseconds",value:function value(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0;}},{key:"getRadians",value:function value(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180);}}},{key:"getDefinition",value:function value(){var t=this.getString(),e=/#([^)'"]+)/.exec(t);return e&&(e=e[1]),e||(e=t),this.document.definitions[e];}},{key:"getFillStyleDefinition",value:function value(t,e){var r=this.getDefinition();if(!r)return null;if("function"==typeof r.createGradient)return r.createGradient(this.document.ctx,t,e);if("function"==typeof r.createPattern){if(r.getHrefAttribute().hasValue()){var n=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),n.hasValue()&&r.getAttribute("patternTransform",!0).setValue(n.value);}return r.createPattern(this.document.ctx,t,e);}return null;}},{key:"getTextBaseline",value:function value(){return this.hasValue()?t.textBaselineMapping[this.getString()]:null;}},{key:"addOpacity",value:function value(e){for(var r=this.getColor(),n=r.length,i=0,o=0;o<n&&(","===r[o]&&i++,3!==i);o++);if(e.hasValue()&&this.isString()&&3!==i){var a=new s(r);a.ok&&(a.alpha=e.getNumber(),r=a.toRGBA());}return new t(this.document,this.name,r);}}],[{key:"empty",value:function value(e){return new t(e,"EMPTY","");}}]);}();xt.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};var wt=function(){return H(function t(){q(this,t),this.viewPorts=[];},[{key:"clear",value:function value(){this.viewPorts=[];}},{key:"setCurrent",value:function value(t,e){this.viewPorts.push({width:t,height:e});}},{key:"removeCurrent",value:function value(){this.viewPorts.pop();}},{key:"getCurrent",value:function value(){var t=this.viewPorts;return t[t.length-1];}},{key:"width",get:function get(){return this.getCurrent().width;}},{key:"height",get:function get(){return this.getCurrent().height;}},{key:"computeSize",value:function value(t){return"number"==typeof t?t:"x"===t?this.width:"y"===t?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2);}}]);}(),St=function(){function t(e,r){q(this,t),this.x=e,this.y=r;}return H(t,[{key:"angleTo",value:function value(t){return Math.atan2(t.y-this.y,t.x-this.x);}},{key:"applyTransform",value:function value(t){var e=this.x,r=this.y,n=e*t[0]+r*t[2]+t[4],i=e*t[1]+r*t[3]+t[5];this.x=n,this.y=i;}}],[{key:"parse",value:function value(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=W(K(e),2),i=n[0],o=void 0===i?r:i,a=n[1];return new t(o,void 0===a?r:a);}},{key:"parseScale",value:function value(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=W(K(e),2),i=n[0],o=void 0===i?r:i,a=n[1];return new t(o,void 0===a?o:a);}},{key:"parsePath",value:function value(e){for(var r=K(e),n=r.length,i=[],o=0;o<n;o+=2)i.push(new t(r[o],r[o+1]));return i;}}]);}(),_t=function(){return H(function t(e){q(this,t),this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this);},[{key:"isWorking",value:function value(){return this.working;}},{key:"start",value:function value(){if(!this.working){var t=this.screen,e=this.onClick,r=this.onMouseMove,n=t.ctx.canvas;n.onclick=e,n.onmousemove=r,this.working=!0;}}},{key:"stop",value:function value(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null;}}},{key:"hasEvents",value:function value(){return this.working&&this.events.length>0;}},{key:"runEvents",value:function value(){if(this.working){var t=this.screen,e=this.events,r=this.eventElements,n=t.ctx.canvas.style;n&&(n.cursor=""),e.forEach(function(t,e){for(var n=t.run,i=r[e];i;)n(i),i=i.parent;}),this.events=[],this.eventElements=[];}}},{key:"checkPath",value:function value(t,e){if(this.working&&e){var r=this.events,n=this.eventElements;r.forEach(function(r,i){var o=r.x,a=r.y;!n[i]&&e.isPointInPath&&e.isPointInPath(o,a)&&(n[i]=t);});}}},{key:"checkBoundingBox",value:function value(t,e){if(this.working&&e){var r=this.events,n=this.eventElements;r.forEach(function(r,i){var o=r.x,a=r.y;!n[i]&&e.isPointInBox(o,a)&&(n[i]=t);});}}},{key:"mapXY",value:function value(t,e){for(var r=this.screen,n=r.window,i=r.ctx,o=new St(t,e),a=i.canvas;a;)o.x-=a.offsetLeft,o.y-=a.offsetTop,a=a.offsetParent;return n.scrollX&&(o.x+=n.scrollX),n.scrollY&&(o.y+=n.scrollY),o;}},{key:"onClick",value:function value(t){var e=this.mapXY(t.clientX,t.clientY),r=e.x,n=e.y;this.events.push({type:"onclick",x:r,y:n,run:function run(t){t.onClick&&t.onClick();}});}},{key:"onMouseMove",value:function value(t){var e=this.mapXY(t.clientX,t.clientY),r=e.x,n=e.y;this.events.push({type:"onmousemove",x:r,y:n,run:function run(t){t.onMouseMove&&t.onMouseMove();}});}}]);}(),Mt="undefined"!=typeof window?window:null,Ot="undefined"!=typeof fetch?fetch.bind(void 0):null,Pt=function(){return H(function t(e){q(this,t);var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.fetch,i=void 0===n?Ot:n,o=r.window,a=void 0===o?Mt:o;this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new wt(),this.mouse=new _t(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=a,this.fetch=i;},[{key:"wait",value:function value(t){this.waits.push(t);}},{key:"ready",value:function value(){return this.readyPromise?this.readyPromise:Promise.resolve();}},{key:"isReady",value:function value(){if(this.isReadyLock)return!0;var t=this.waits.every(function(t){return t();});return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t;}},{key:"setDefaults",value:function value(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4;}},{key:"setViewBox",value:function value(t){var e=t.document,r=t.ctx,n=t.aspectRatio,i=t.width,o=t.desiredWidth,a=t.height,s=t.desiredHeight,u=t.minX,l=void 0===u?0:u,c=t.minY,h=void 0===c?0:c,f=t.refX,p=t.refY,y=t.clip,d=void 0!==y&&y,v=t.clipX,m=void 0===v?0:v,g=t.clipY,b=void 0===g?0:g,x=W($(n).replace(/^defer\s/,"").split(" "),2),w=x[0]||"xMidYMid",S=x[1]||"meet",_=i/o,M=a/s,O=Math.min(_,M),P=Math.max(_,M),k=o,E=s;"meet"===S&&(k*=O,E*=O),"slice"===S&&(k*=P,E*=P);var C=new xt(e,"refX",f),T=new xt(e,"refY",p),A=C.hasValue()&&T.hasValue();if(A&&r.translate(-O*C.getPixels("x"),-O*T.getPixels("y")),d){var N=O*m,j=O*b;r.beginPath(),r.moveTo(N,j),r.lineTo(i,j),r.lineTo(i,a),r.lineTo(N,a),r.closePath(),r.clip();}if(!A){var I="meet"===S&&O===M,R="slice"===S&&P===M,L="meet"===S&&O===_,F="slice"===S&&P===_;w.startsWith("xMid")&&(I||R)&&r.translate(i/2-k/2,0),w.endsWith("YMid")&&(L||F)&&r.translate(0,a/2-E/2),w.startsWith("xMax")&&(I||R)&&r.translate(i-k,0),w.endsWith("YMax")&&(L||F)&&r.translate(0,a-E);}switch(!0){case"none"===w:r.scale(_,M);break;case"meet"===S:r.scale(O,O);break;case"slice"===S:r.scale(P,P);}r.translate(-l,-h);}},{key:"start",value:function value(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.enableRedraw,i=void 0!==n&&n,o=r.ignoreMouse,s=void 0!==o&&o,u=r.ignoreAnimation,l=void 0!==u&&u,c=r.ignoreDimensions,h=void 0!==c&&c,f=r.ignoreClear,p=void 0!==f&&f,y=r.forceRedraw,d=r.scaleWidth,v=r.scaleHeight,m=r.offsetX,g=r.offsetY,b=this.FRAMERATE,x=this.mouse,w=1e3/b;if(this.frameDuration=w,this.readyPromise=new Promise(function(t){e.resolveReady=t;}),this.isReady()&&this.render(t,h,p,d,v,m,g),i){var S=Date.now(),_=S,M=0;s||x.start(),this.intervalId=a(function r(){S=Date.now(),(M=S-_)>=w&&(_=S-M%w,e.shouldUpdate(l,y)&&(e.render(t,h,p,d,v,m,g),x.runEvents())),e.intervalId=a(r);});}}},{key:"stop",value:function value(){this.intervalId&&(a.cancel(this.intervalId),this.intervalId=null),this.mouse.stop();}},{key:"shouldUpdate",value:function value(t,e){if(!t){var r=this.frameDuration;if(this.animations.reduce(function(t,e){return e.update(r)||t;},!1))return!0;}return!("function"!=typeof e||!e())||!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents();}},{key:"render",value:function value(t,e,r,n,i,o,a){var s=this.CLIENT_WIDTH,u=this.CLIENT_HEIGHT,l=this.viewPort,c=this.ctx,h=this.isFirstRender,f=c.canvas;l.clear(),f.width&&f.height?l.setCurrent(f.width,f.height):l.setCurrent(s,u);var p=t.getStyle("width"),y=t.getStyle("height");!e&&(h||"number"!=typeof n&&"number"!=typeof i)&&(p.hasValue()&&(f.width=p.getPixels("x"),f.style&&(f.style.width="".concat(f.width,"px"))),y.hasValue()&&(f.height=y.getPixels("y"),f.style&&(f.style.height="".concat(f.height,"px"))));var d=f.clientWidth||f.width,v=f.clientHeight||f.height;if(e&&p.hasValue()&&y.hasValue()&&(d=p.getPixels("x"),v=y.getPixels("y")),l.setCurrent(d,v),"number"==typeof o&&t.getAttribute("x",!0).setValue(o),"number"==typeof a&&t.getAttribute("y",!0).setValue(a),"number"==typeof n||"number"==typeof i){var m=K(t.getAttribute("viewBox").getString()),g=0,b=0;if("number"==typeof n){var x=t.getStyle("width");x.hasValue()?g=x.getPixels("x")/n:isNaN(m[2])||(g=m[2]/n);}if("number"==typeof i){var w=t.getStyle("height");w.hasValue()?b=w.getPixels("y")/i:isNaN(m[3])||(b=m[3]/i);}g||(g=b),b||(b=g),t.getAttribute("width",!0).setValue(n),t.getAttribute("height",!0).setValue(i);var S=t.getStyle("transform",!0,!0);S.setValue("".concat(S.getString()," scale(").concat(1/g,", ").concat(1/b,")"));}r||c.clearRect(0,0,d,v),t.render(c),h&&(this.isFirstRender=!1);}}]);}();Pt.defaultWindow=Mt,Pt.defaultFetch=Ot;var kt=Pt.defaultFetch,Et="undefined"!=typeof DOMParser?DOMParser:null,Ct=function(){return H(function t(){q(this,t);var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.fetch,n=void 0===r?kt:r,i=e.DOMParser,o=void 0===i?Et:i;this.fetch=n,this.DOMParser=o;},[{key:"parse",value:function value(t){var r=this;return e(J().mark(function e(){return J().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.startsWith("<")){e.next=2;break;}return e.abrupt("return",r.parseFromString(t));case 2:return e.abrupt("return",r.load(t));case 3:case"end":return e.stop();}},e);}))();}},{key:"parseFromString",value:function value(t){var e=new this.DOMParser();try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"));}catch(r){return this.checkDocument(e.parseFromString(t,"text/xml"));}}},{key:"checkDocument",value:function value(t){var e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent);return t;}},{key:"load",value:function value(t){var r=this;return e(J().mark(function e(){var n,i;return J().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.fetch(t);case 2:return n=e.sent,e.next=5,n.text();case 5:return i=e.sent,e.abrupt("return",r.parseFromString(i));case 7:case"end":return e.stop();}},e);}))();}}]);}(),Tt=function(){return H(function t(e,r){q(this,t),this.type="translate",this.point=null,this.point=St.parse(r);},[{key:"apply",value:function value(t){var e=this.point,r=e.x,n=e.y;t.translate(r||0,n||0);}},{key:"unapply",value:function value(t){var e=this.point,r=e.x,n=e.y;t.translate(-1*r||0,-1*n||0);}},{key:"applyToPoint",value:function value(t){var e=this.point,r=e.x,n=e.y;t.applyTransform([1,0,0,1,r||0,n||0]);}}]);}(),At=function(){return H(function t(e,r,n){q(this,t),this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=K(r);this.angle=new xt(e,"angle",i[0]),this.originX=n[0],this.originY=n[1],this.cx=i[1]||0,this.cy=i[2]||0;},[{key:"apply",value:function value(t){var e=this.cx,r=this.cy,n=this.originX,i=this.originY,o=this.angle,a=e+n.getPixels("x"),s=r+i.getPixels("y");t.translate(a,s),t.rotate(o.getRadians()),t.translate(-a,-s);}},{key:"unapply",value:function value(t){var e=this.cx,r=this.cy,n=this.originX,i=this.originY,o=this.angle,a=e+n.getPixels("x"),s=r+i.getPixels("y");t.translate(a,s),t.rotate(-1*o.getRadians()),t.translate(-a,-s);}},{key:"applyToPoint",value:function value(t){var e=this.cx,r=this.cy,n=this.angle.getRadians();t.applyTransform([1,0,0,1,e||0,r||0]),t.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),t.applyTransform([1,0,0,1,-e||0,-r||0]);}}]);}(),Nt=function(){return H(function t(e,r,n){q(this,t),this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=St.parseScale(r);0!==i.x&&0!==i.y||(i.x=lt,i.y=lt),this.scale=i,this.originX=n[0],this.originY=n[1];},[{key:"apply",value:function value(t){var e=this.scale,r=e.x,n=e.y,i=this.originX,o=this.originY,a=i.getPixels("x"),s=o.getPixels("y");t.translate(a,s),t.scale(r,n||r),t.translate(-a,-s);}},{key:"unapply",value:function value(t){var e=this.scale,r=e.x,n=e.y,i=this.originX,o=this.originY,a=i.getPixels("x"),s=o.getPixels("y");t.translate(a,s),t.scale(1/r,1/n||r),t.translate(-a,-s);}},{key:"applyToPoint",value:function value(t){var e=this.scale,r=e.x,n=e.y;t.applyTransform([r||0,0,0,n||0,0,0]);}}]);}(),jt=function(){return H(function t(e,r,n){q(this,t),this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=K(r),this.originX=n[0],this.originY=n[1];},[{key:"apply",value:function value(t){var e=this.originX,r=this.originY,n=this.matrix,i=e.getPixels("x"),o=r.getPixels("y");t.translate(i,o),t.transform(n[0],n[1],n[2],n[3],n[4],n[5]),t.translate(-i,-o);}},{key:"unapply",value:function value(t){var e=this.originX,r=this.originY,n=this.matrix,i=n[0],o=n[2],a=n[4],s=n[1],u=n[3],l=n[5],c=1/(i*(1*u-0*l)-o*(1*s-0*l)+a*(0*s-0*u)),h=e.getPixels("x"),f=r.getPixels("y");t.translate(h,f),t.transform(c*(1*u-0*l),c*(0*l-1*s),c*(0*a-1*o),c*(1*i-0*a),c*(o*l-a*u),c*(a*s-i*l)),t.translate(-h,-f);}},{key:"applyToPoint",value:function value(t){t.applyTransform(this.matrix);}}]);}(),It=function(t){function e(t,r,n){var i;return q(this,e),(i=F(this,e,[t,r,n])).type="skew",i.angle=null,i.angle=new xt(t,"angle",r),i;}return U(e,t),H(e);}(jt),Rt=function(t){function e(t,r,n){var i;return q(this,e),(i=F(this,e,[t,r,n])).type="skewX",i.matrix=[1,0,Math.tan(i.angle.getRadians()),1,0,0],i;}return U(e,t),H(e);}(It),Lt=function(t){function e(t,r,n){var i;return q(this,e),(i=F(this,e,[t,r,n])).type="skewY",i.matrix=[1,Math.tan(i.angle.getRadians()),0,1,0,0],i;}return U(e,t),H(e);}(It),Ft=function(){function t(e,r,n){var i=this;q(this,t),this.document=e,this.transforms=[];var o=function(t){return $(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/);}(r);o.forEach(function(e){if("none"!==e){var r=function(t){var e=W(t.split("("),2),r=e[0],n=e[1];return[r.trim(),n.trim().replace(")","")];}(e),o=W(r,2),a=o[0],s=o[1],u=t.transformTypes[a];void 0!==u&&i.transforms.push(new u(i.document,s,n));}});}return H(t,[{key:"apply",value:function value(t){for(var e=this.transforms,r=e.length,n=0;n<r;n++)e[n].apply(t);}},{key:"unapply",value:function value(t){for(var e=this.transforms,r=e.length-1;r>=0;r--)e[r].unapply(t);}},{key:"applyToPoint",value:function value(t){for(var e=this.transforms,r=e.length,n=0;n<r;n++)e[n].applyToPoint(t);}}],[{key:"fromElement",value:function value(e,r){var n=r.getStyle("transform",!1,!0),i=W(r.getStyle("transform-origin",!1,!0).split(),2),o=i[0],a=i[1],s=[o,void 0===a?o:a];return n.hasValue()?new t(e,n.getString(),s):null;}}]);}();Ft.transformTypes={translate:Tt,rotate:At,scale:Nt,matrix:jt,skewX:Rt,skewY:Lt};var Dt=function(){function t(e,r){var n=this;q(this,t);var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.document=e,this.node=r,this.captureTextNodes=i,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],r&&1===r.nodeType){if(Array.from(r.attributes).forEach(function(t){var r,i=(r=t.nodeName,Z.test(r)?r.toLowerCase():r);n.attributes[i]=new xt(e,i,t.value);}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var o=this.getAttribute("style").getString().split(";").map(function(t){return t.trim();});o.forEach(function(t){if(t){var r=t.split(":").map(function(t){return t.trim();}),i=W(r,2),o=i[0],a=i[1];n.styles[o]=new xt(e,o,a);}});}var a=e.definitions,s=this.getAttribute("id");s.hasValue()&&(a[s.getString()]||(a[s.getString()]=this)),Array.from(r.childNodes).forEach(function(t){if(1===t.nodeType)n.addChild(t);else if(i&&(3===t.nodeType||4===t.nodeType)){var r=e.createTextNode(t);r.getText().length>0&&n.addChild(r);}});}}return H(t,[{key:"getAttribute",value:function value(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.attributes[t];if(!r&&e){var n=new xt(this.document,t,"");return this.attributes[t]=n,n;}return r||xt.empty(this.document);}},{key:"getHrefAttribute",value:function value(){for(var t in this.attributes)if("href"===t||t.endsWith(":href"))return this.attributes[t];return xt.empty(this.document);}},{key:"getStyle",value:function value(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.styles[t];if(n)return n;var i=this.getAttribute(t);if(null!=i&&i.hasValue())return this.styles[t]=i,i;if(!r){var o=this.parent;if(o){var a=o.getStyle(t);if(null!=a&&a.hasValue())return a;}}if(e){var s=new xt(this.document,t,"");return this.styles[t]=s,s;}return n||xt.empty(this.document);}},{key:"render",value:function value(t){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(t.save(),this.getStyle("mask").hasValue()){var e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this));}else if("none"!==this.getStyle("filter").getValue("none")){var r=this.getStyle("filter").getDefinition();r&&(this.applyEffects(t),r.apply(t,this));}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore();}}},{key:"setContext",value:function value(t){}},{key:"applyEffects",value:function value(t){var e=Ft.fromElement(this.document,this);e&&e.apply(t);var r=this.getStyle("clip-path",!1,!0);if(r.hasValue()){var n=r.getDefinition();n&&n.apply(t);}}},{key:"clearContext",value:function value(t){}},{key:"renderChildren",value:function value(t){this.children.forEach(function(e){e.render(t);});}},{key:"addChild",value:function value(e){var r=e instanceof t?e:this.document.createElement(e);r.parent=this,t.ignoreChildTypes.includes(r.type)||this.children.push(r);}},{key:"matchesSelector",value:function value(t){var e,r=this.node;if("function"==typeof r.matches)return r.matches(t);var n=null===(e=r.getAttribute)||void 0===e?void 0:e.call(r,"class");return!(!n||""===n)&&n.split(" ").some(function(e){return".".concat(e)===t;});}},{key:"addStylesFromStyleDefinition",value:function value(){var t=this.document,e=t.styles,r=t.stylesSpecificity;for(var n in e)if(!n.startsWith("@")&&this.matchesSelector(n)){var i=e[n],o=r[n];if(i)for(var a in i){var s=this.stylesSpecificity[a];void 0===s&&(s="000"),o>=s&&(this.styles[a]=i[a],this.stylesSpecificity[a]=o);}}}},{key:"removeStyles",value:function value(t,e){return e.reduce(function(e,r){var n=t.getStyle(r);if(!n.hasValue())return e;var i,o=n.getString();return n.setValue(""),[].concat(function(t){if(Array.isArray(t))return Y(t);}(i=e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t);}(i)||X(i)||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.");}(),[[r,o]]);},[]);}},{key:"restoreStyles",value:function value(t,e){e.forEach(function(e){var r=W(e,2),n=r[0],i=r[1];t.getStyle(n,!0).setValue(i);});}},{key:"isFirstChild",value:function value(){var t;return 0===(null===(t=this.parent)||void 0===t?void 0:t.children.indexOf(this));}}]);}();Dt.ignoreChildTypes=["title"];var Bt=function(t){function e(t,r,n){return q(this,e),F(this,e,[t,r,n]);}return U(e,t),H(e);}(Dt);function Gt(t){var e=t.trim();return /^('|")/.test(e)?e:'"'.concat(e,'"');}function Ut(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return /^oblique\s+(-|)\d+deg$/.test(e)?e:"";}}function Vt(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return /^[\d.]+$/.test(e)?e:"";}}var qt=function(){function t(e,r,n,i,o,a){q(this,t);var s=a?"string"==typeof a?t.parse(a):a:{};this.fontFamily=o||s.fontFamily,this.fontSize=i||s.fontSize,this.fontStyle=e||s.fontStyle,this.fontWeight=n||s.fontWeight,this.fontVariant=r||s.fontVariant;}return H(t,[{key:"toString",value:function value(){return[Ut(this.fontStyle),this.fontVariant,Vt(this.fontWeight),this.fontSize,(t=this.fontFamily,"undefined"==typeof process?t:t.trim().split(",").map(Gt).join(","))].join(" ").trim();var t;}}],[{key:"parse",value:function value(){var e=arguments.length>1?arguments[1]:void 0,r="",n="",i="",o="",a="",s=$(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().split(" "),u={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return s.forEach(function(e){switch(!0){case!u.fontStyle&&t.styles.includes(e):"inherit"!==e&&(r=e),u.fontStyle=!0;break;case!u.fontVariant&&t.variants.includes(e):"inherit"!==e&&(n=e),u.fontStyle=!0,u.fontVariant=!0;break;case!u.fontWeight&&t.weights.includes(e):"inherit"!==e&&(i=e),u.fontStyle=!0,u.fontVariant=!0,u.fontWeight=!0;break;case!u.fontSize:if("inherit"!==e){var s=W(e.split("/"),1);o=s[0];}u.fontStyle=!0,u.fontVariant=!0,u.fontWeight=!0,u.fontSize=!0;break;default:"inherit"!==e&&(a+=e);}}),new t(r,n,i,o,a,e);}}]);}();qt.styles="normal|italic|oblique|inherit",qt.variants="normal|small-caps|inherit",qt.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var zt=function(){return H(function t(){q(this,t);var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.NaN,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.NaN,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.NaN;this.x1=e,this.y1=r,this.x2=n,this.y2=i,this.addPoint(e,r),this.addPoint(n,i);},[{key:"x",get:function get(){return this.x1;}},{key:"y",get:function get(){return this.y1;}},{key:"width",get:function get(){return this.x2-this.x1;}},{key:"height",get:function get(){return this.y2-this.y1;}},{key:"addPoint",value:function value(t,e){void 0!==t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),void 0!==e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e));}},{key:"addX",value:function value(t){this.addPoint(t,null);}},{key:"addY",value:function value(t){this.addPoint(null,t);}},{key:"addBoundingBox",value:function value(t){if(t){var e=t.x1,r=t.y1,n=t.x2,i=t.y2;this.addPoint(e,r),this.addPoint(n,i);}}},{key:"sumCubic",value:function value(t,e,r,n,i){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*r+3*(1-t)*Math.pow(t,2)*n+Math.pow(t,3)*i;}},{key:"bezierCurveAdd",value:function value(t,e,r,n,i){var o=6*e-12*r+6*n,a=-3*e+9*r-9*n+3*i,s=3*r-3*e;if(0!==a){var u=Math.pow(o,2)-4*s*a;if(!(u<0)){var l=(-o+Math.sqrt(u))/(2*a);0<l&&l<1&&(t?this.addX(this.sumCubic(l,e,r,n,i)):this.addY(this.sumCubic(l,e,r,n,i)));var c=(-o-Math.sqrt(u))/(2*a);0<c&&c<1&&(t?this.addX(this.sumCubic(c,e,r,n,i)):this.addY(this.sumCubic(c,e,r,n,i)));}}else{if(0===o)return;var h=-s/o;0<h&&h<1&&(t?this.addX(this.sumCubic(h,e,r,n,i)):this.addY(this.sumCubic(h,e,r,n,i)));}}},{key:"addBezierCurve",value:function value(t,e,r,n,i,o,a,s){this.addPoint(t,e),this.addPoint(a,s),this.bezierCurveAdd(!0,t,r,i,a),this.bezierCurveAdd(!1,e,n,o,s);}},{key:"addQuadraticCurve",value:function value(t,e,r,n,i,o){var a=t+2/3*(r-t),s=e+2/3*(n-e),u=a+1/3*(i-t),l=s+1/3*(o-e);this.addBezierCurve(t,e,a,u,s,l,i,o);}},{key:"isPointInBox",value:function value(t,e){var r=this.x1,n=this.y1,i=this.x2,o=this.y2;return r<=t&&t<=i&&n<=e&&e<=o;}}]);}(),Ht=function(t){function e(t){var r;return q(this,e),(r=F(this,e,[t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")])).control=null,r.start=null,r.current=null,r.command=null,r.commands=r.commands,r.i=-1,r.previousCommand=null,r.points=[],r.angles=[],r;}return U(e,t),H(e,[{key:"reset",value:function value(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new St(0,0),this.control=new St(0,0),this.current=new St(0,0),this.points=[],this.angles=[];}},{key:"isEnd",value:function value(){return this.i>=this.commands.length-1;}},{key:"next",value:function value(){var t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t;}},{key:"getPoint",value:function value(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"x",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y",r=new St(this.command[t],this.command[e]);return this.makeAbsolute(r);}},{key:"getAsControlPoint",value:function value(t,e){var r=this.getPoint(t,e);return this.control=r,r;}},{key:"getAsCurrentPoint",value:function value(t,e){var r=this.getPoint(t,e);return this.current=r,r;}},{key:"getReflectedControlPoint",value:function value(){var t=this.previousCommand.type;if(t!==k.CURVE_TO&&t!==k.SMOOTH_CURVE_TO&&t!==k.QUAD_TO&&t!==k.SMOOTH_QUAD_TO)return this.current;var e=this.current,r=e.x,n=e.y,i=this.control,o=i.x,a=i.y;return new St(2*r-o,2*n-a);}},{key:"makeAbsolute",value:function value(t){if(this.command.relative){var e=this.current,r=e.x,n=e.y;t.x+=r,t.y+=n;}return t;}},{key:"addMarker",value:function value(t,e,r){var n=this.points,i=this.angles;r&&i.length>0&&!i[i.length-1]&&(i[i.length-1]=n[n.length-1].angleTo(r)),this.addMarkerAngle(t,e?e.angleTo(t):null);}},{key:"addMarkerAngle",value:function value(t,e){this.points.push(t),this.angles.push(e);}},{key:"getMarkerPoints",value:function value(){return this.points;}},{key:"getMarkerAngles",value:function value(){for(var t=this.angles,e=t.length,r=0;r<e;r++)if(!t[r])for(var n=r+1;n<e;n++)if(t[n]){t[r]=t[n];break;}return t;}}]);}(k),Qt=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).modifiedEmSizeStack=!1,t;}return U(e,t),H(e,[{key:"calculateOpacity",value:function value(){for(var t=1,e=this;e;){var r=e.getStyle("opacity",!1,!0);r.hasValue(!0)&&(t*=r.getNumber()),e=e.parent;}return t;}},{key:"setContext",value:function value(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e){var r=this.getStyle("fill"),n=this.getStyle("fill-opacity"),i=this.getStyle("stroke"),o=this.getStyle("stroke-opacity");if(r.isUrlDefinition()){var a=r.getFillStyleDefinition(this,n);a&&(t.fillStyle=a);}else if(r.hasValue()){"currentColor"===r.getString()&&r.setValue(this.getStyle("color").getColor());var s=r.getColor();"inherit"!==s&&(t.fillStyle="none"===s?"rgba(0,0,0,0)":s);}if(n.hasValue()){var u=new xt(this.document,"fill",t.fillStyle).addOpacity(n).getColor();t.fillStyle=u;}if(i.isUrlDefinition()){var l=i.getFillStyleDefinition(this,o);l&&(t.strokeStyle=l);}else if(i.hasValue()){"currentColor"===i.getString()&&i.setValue(this.getStyle("color").getColor());var c=i.getString();"inherit"!==c&&(t.strokeStyle="none"===c?"rgba(0,0,0,0)":c);}if(o.hasValue()){var h=new xt(this.document,"stroke",t.strokeStyle).addOpacity(o).getString();t.strokeStyle=h;}var f=this.getStyle("stroke-width");if(f.hasValue()){var p=f.getPixels();t.lineWidth=p||lt;}var y=this.getStyle("stroke-linecap"),d=this.getStyle("stroke-linejoin"),v=this.getStyle("stroke-miterlimit"),m=this.getStyle("stroke-dasharray"),g=this.getStyle("stroke-dashoffset");if(y.hasValue()&&(t.lineCap=y.getString()),d.hasValue()&&(t.lineJoin=d.getString()),v.hasValue()&&(t.miterLimit=v.getNumber()),m.hasValue()&&"none"!==m.getString()){var b=K(m.getString());void 0!==t.setLineDash?t.setLineDash(b):void 0!==t.webkitLineDash?t.webkitLineDash=b:void 0===t.mozDash||1===b.length&&0===b[0]||(t.mozDash=b);var x=g.getPixels();void 0!==t.lineDashOffset?t.lineDashOffset=x:void 0!==t.webkitLineDashOffset?t.webkitLineDashOffset=x:void 0!==t.mozDashOffset&&(t.mozDashOffset=x);}}if(this.modifiedEmSizeStack=!1,void 0!==t.font){var w=this.getStyle("font"),S=this.getStyle("font-style"),_=this.getStyle("font-variant"),M=this.getStyle("font-weight"),O=this.getStyle("font-size"),P=this.getStyle("font-family"),k=new qt(S.getString(),_.getString(),M.getString(),O.hasValue()?"".concat(O.getPixels(!0),"px"):"",P.getString(),qt.parse(w.getString(),t.font));S.setValue(k.fontStyle),_.setValue(k.fontVariant),M.setValue(k.fontWeight),O.setValue(k.fontSize),P.setValue(k.fontFamily),t.font=k.toString(),O.isPixels()&&(this.document.emSize=O.getPixels(),this.modifiedEmSizeStack=!0);}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity());}},{key:"clearContext",value:function value(t){L(G(e.prototype),"clearContext",this).call(this,t),this.modifiedEmSizeStack&&this.document.popEmSize();}}]);}(Dt),Wt=function(t){function e(t,r,n){var i;return q(this,e),(i=F(this,e,[t,r,n])).type="path",i.pathParser=null,i.pathParser=new Ht(i.getAttribute("d").getString()),i;}return U(e,t),H(e,[{key:"path",value:function value(t){var e=this.pathParser,r=new zt();for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.next().type){case Ht.MOVE_TO:this.pathM(t,r);break;case Ht.LINE_TO:this.pathL(t,r);break;case Ht.HORIZ_LINE_TO:this.pathH(t,r);break;case Ht.VERT_LINE_TO:this.pathV(t,r);break;case Ht.CURVE_TO:this.pathC(t,r);break;case Ht.SMOOTH_CURVE_TO:this.pathS(t,r);break;case Ht.QUAD_TO:this.pathQ(t,r);break;case Ht.SMOOTH_QUAD_TO:this.pathT(t,r);break;case Ht.ARC:this.pathA(t,r);break;case Ht.CLOSE_PATH:this.pathZ(t,r);}return r;}},{key:"getBoundingBox",value:function value(t){return this.path();}},{key:"getMarkers",value:function value(){var t=this.pathParser,e=t.getMarkerPoints(),r=t.getMarkerAngles(),n=e.map(function(t,e){return[t,r[e]];});return n;}},{key:"renderChildren",value:function value(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var e=this.getStyle("fill-rule");""!==t.fillStyle&&("inherit"!==e.getString("inherit")?t.fill(e.getString()):t.fill()),""!==t.strokeStyle&&("non-scaling-stroke"===this.getAttribute("vector-effect").getString()?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());var r=this.getMarkers();if(r){var n=r.length-1,i=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),a=this.getStyle("marker-end");if(i.isUrlDefinition()){var s=i.getDefinition(),u=W(r[0],2),l=u[0],c=u[1];s.render(t,l,c);}if(o.isUrlDefinition())for(var h=o.getDefinition(),f=1;f<n;f++){var p=W(r[f],2),y=p[0],d=p[1];h.render(t,y,d);}if(a.isUrlDefinition()){var v=a.getDefinition(),m=W(r[n],2),g=m[0],b=m[1];v.render(t,g,b);}}}},{key:"pathM",value:function value(t,r){var n=this.pathParser,i=e.pathM(n).point,o=i.x,a=i.y;n.addMarker(i),r.addPoint(o,a),t&&t.moveTo(o,a);}},{key:"pathL",value:function value(t,r){var n=this.pathParser,i=e.pathL(n),o=i.current,a=i.point,s=a.x,u=a.y;n.addMarker(a,o),r.addPoint(s,u),t&&t.lineTo(s,u);}},{key:"pathH",value:function value(t,r){var n=this.pathParser,i=e.pathH(n),o=i.current,a=i.point,s=a.x,u=a.y;n.addMarker(a,o),r.addPoint(s,u),t&&t.lineTo(s,u);}},{key:"pathV",value:function value(t,r){var n=this.pathParser,i=e.pathV(n),o=i.current,a=i.point,s=a.x,u=a.y;n.addMarker(a,o),r.addPoint(s,u),t&&t.lineTo(s,u);}},{key:"pathC",value:function value(t,r){var n=this.pathParser,i=e.pathC(n),o=i.current,a=i.point,s=i.controlPoint,u=i.currentPoint;n.addMarker(u,s,a),r.addBezierCurve(o.x,o.y,a.x,a.y,s.x,s.y,u.x,u.y),t&&t.bezierCurveTo(a.x,a.y,s.x,s.y,u.x,u.y);}},{key:"pathS",value:function value(t,r){var n=this.pathParser,i=e.pathS(n),o=i.current,a=i.point,s=i.controlPoint,u=i.currentPoint;n.addMarker(u,s,a),r.addBezierCurve(o.x,o.y,a.x,a.y,s.x,s.y,u.x,u.y),t&&t.bezierCurveTo(a.x,a.y,s.x,s.y,u.x,u.y);}},{key:"pathQ",value:function value(t,r){var n=this.pathParser,i=e.pathQ(n),o=i.current,a=i.controlPoint,s=i.currentPoint;n.addMarker(s,a,a),r.addQuadraticCurve(o.x,o.y,a.x,a.y,s.x,s.y),t&&t.quadraticCurveTo(a.x,a.y,s.x,s.y);}},{key:"pathT",value:function value(t,r){var n=this.pathParser,i=e.pathT(n),o=i.current,a=i.controlPoint,s=i.currentPoint;n.addMarker(s,a,a),r.addQuadraticCurve(o.x,o.y,a.x,a.y,s.x,s.y),t&&t.quadraticCurveTo(a.x,a.y,s.x,s.y);}},{key:"pathA",value:function value(t,r){var n=this.pathParser,i=e.pathA(n),o=i.currentPoint,a=i.rX,s=i.rY,u=i.sweepFlag,l=i.xAxisRotation,c=i.centp,h=i.a1,f=i.ad,p=1-u?1:-1,y=h+p*(f/2),d=new St(c.x+a*Math.cos(y),c.y+s*Math.sin(y));if(n.addMarkerAngle(d,y-p*Math.PI/2),n.addMarkerAngle(o,y-p*Math.PI),r.addPoint(o.x,o.y),t&&!isNaN(h)&&!isNaN(f)){var v=a>s?a:s,m=a>s?1:a/s,g=a>s?s/a:1;t.translate(c.x,c.y),t.rotate(l),t.scale(m,g),t.arc(0,0,v,h,h+f,Boolean(1-u)),t.scale(1/m,1/g),t.rotate(-l),t.translate(-c.x,-c.y);}}},{key:"pathZ",value:function value(t,r){e.pathZ(this.pathParser),t&&r.x1!==r.x2&&r.y1!==r.y2&&t.closePath();}}],[{key:"pathM",value:function value(t){var e=t.getAsCurrentPoint();return t.start=t.current,{point:e};}},{key:"pathL",value:function value(t){return{current:t.current,point:t.getAsCurrentPoint()};}},{key:"pathH",value:function value(t){var e=t.current,r=t.command,n=new St((r.relative?e.x:0)+r.x,e.y);return t.current=n,{current:e,point:n};}},{key:"pathV",value:function value(t){var e=t.current,r=t.command,n=new St(e.x,(r.relative?e.y:0)+r.y);return t.current=n,{current:e,point:n};}},{key:"pathC",value:function value(t){return{current:t.current,point:t.getPoint("x1","y1"),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()};}},{key:"pathS",value:function value(t){return{current:t.current,point:t.getReflectedControlPoint(),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()};}},{key:"pathQ",value:function value(t){return{current:t.current,controlPoint:t.getAsControlPoint("x1","y1"),currentPoint:t.getAsCurrentPoint()};}},{key:"pathT",value:function value(t){var e=t.current,r=t.getReflectedControlPoint();return t.control=r,{current:e,controlPoint:r,currentPoint:t.getAsCurrentPoint()};}},{key:"pathA",value:function value(t){var e=t.current,r=t.command,n=r.rX,i=r.rY,o=r.xRot,a=r.lArcFlag,s=r.sweepFlag,u=o*(Math.PI/180),l=t.getAsCurrentPoint(),c=new St(Math.cos(u)*(e.x-l.x)/2+Math.sin(u)*(e.y-l.y)/2,-Math.sin(u)*(e.x-l.x)/2+Math.cos(u)*(e.y-l.y)/2),h=Math.pow(c.x,2)/Math.pow(n,2)+Math.pow(c.y,2)/Math.pow(i,2);h>1&&(n*=Math.sqrt(h),i*=Math.sqrt(h));var f=(a===s?-1:1)*Math.sqrt((Math.pow(n,2)*Math.pow(i,2)-Math.pow(n,2)*Math.pow(c.y,2)-Math.pow(i,2)*Math.pow(c.x,2))/(Math.pow(n,2)*Math.pow(c.y,2)+Math.pow(i,2)*Math.pow(c.x,2)));isNaN(f)&&(f=0);var p=new St(f*n*c.y/i,f*-i*c.x/n),y=new St((e.x+l.x)/2+Math.cos(u)*p.x-Math.sin(u)*p.y,(e.y+l.y)/2+Math.sin(u)*p.x+Math.cos(u)*p.y),d=ft([1,0],[(c.x-p.x)/n,(c.y-p.y)/i]),v=[(c.x-p.x)/n,(c.y-p.y)/i],m=[(-c.x-p.x)/n,(-c.y-p.y)/i],g=ft(v,m);return ht(v,m)<=-1&&(g=Math.PI),ht(v,m)>=1&&(g=0),{currentPoint:l,rX:n,rY:i,sweepFlag:s,xAxisRotation:u,centp:y,a1:d,ad:g};}},{key:"pathZ",value:function value(t){t.current=t.start;}}]);}(Qt),Xt=function(t){function e(t,r,n){var i;return q(this,e),(i=F(this,e,[t,r,n])).type="glyph",i.horizAdvX=i.getAttribute("horiz-adv-x").getNumber(),i.unicode=i.getAttribute("unicode").getString(),i.arabicForm=i.getAttribute("arabic-form").getString(),i;}return U(e,t),H(e);}(Wt),Yt=function(t){function e(t,r,n){var i;return q(this,e),(i=F(this,e,[t,r,(this instanceof e?this.constructor:void 0)===e||n])).type="text",i.x=0,i.y=0,i.measureCache=-1,i;}return U(e,t),H(e,[{key:"setContext",value:function value(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];L(G(e.prototype),"setContext",this).call(this,t,r);var n=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();n&&(t.textBaseline=n);}},{key:"initializeCoordinates",value:function value(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY;}},{key:"getBoundingBox",value:function value(t){var e=this;if("text"!==this.type)return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);var r=null;return this.children.forEach(function(n,i){var o=e.getChildBoundingBox(t,e,e,i);r?r.addBoundingBox(o):r=o;}),r;}},{key:"getFontSize",value:function value(){var t=this.document,e=this.parent,r=qt.parse(t.ctx.font).fontSize;return e.getStyle("font-size").getNumber(r);}},{key:"getTElementBoundingBox",value:function value(t){var e=this.getFontSize();return new zt(this.x,this.y-e,this.x+this.measureText(t),this.y);}},{key:"getGlyph",value:function value(t,e,r){var n=e[r],i=null;if(t.isArabic){var o=e.length,a=e[r-1],s=e[r+1],u="isolated";if((0===r||" "===a)&&r<o-1&&" "!==s&&(u="terminal"),r>0&&" "!==a&&r<o-1&&" "!==s&&(u="medial"),r>0&&" "!==a&&(r===o-1||" "===s)&&(u="initial"),void 0!==t.glyphs[n]){var l=t.glyphs[n];i=l instanceof Xt?l:l[u];}}else i=t.glyphs[n];return i||(i=t.missingGlyph),i;}},{key:"getText",value:function value(){return"";}},{key:"getTextFromNode",value:function value(t){var e=t||this.node,r=Array.from(e.parentNode.childNodes),n=r.indexOf(e),i=r.length-1,o=$(e.textContent||"");return 0===n&&(o=o.replace(/^[\n \t]+/,"")),n===i&&(o=o.replace(/[\n \t]+$/,"")),o;}},{key:"renderChildren",value:function value(t){var e=this;if("text"===this.type){this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach(function(r,n){e.renderChild(t,e,e,n);});var r=this.document.screen.mouse;r.isWorking()&&r.checkBoundingBox(this,this.getBoundingBox(t));}else this.renderTElementChildren(t);}},{key:"renderTElementChildren",value:function value(t){var e=this.document,r=this.parent,n=this.getText(),i=r.getStyle("font-family").getDefinition();if(i)for(var o=i.fontFace.unitsPerEm,a=qt.parse(e.ctx.font),s=r.getStyle("font-size").getNumber(a.fontSize),u=r.getStyle("font-style").getString(a.fontStyle),l=s/o,c=i.isRTL?n.split("").reverse().join(""):n,h=K(r.getAttribute("dx").getString()),f=c.length,p=0;p<f;p++){var y=this.getGlyph(i,c,p);t.translate(this.x,this.y),t.scale(l,-l);var d=t.lineWidth;t.lineWidth=t.lineWidth*o/s,"italic"===u&&t.transform(1,0,.4,1,0,0),y.render(t),"italic"===u&&t.transform(1,0,-.4,1,0,0),t.lineWidth=d,t.scale(1/l,-1/l),t.translate(-this.x,-this.y),this.x+=s*(y.horizAdvX||i.horizAdvX)/o,void 0===h[p]||isNaN(h[p])||(this.x+=h[p]);}else{var v=this.x,m=this.y;t.fillStyle&&t.fillText(n,v,m),t.strokeStyle&&t.strokeText(n,v,m);}}},{key:"applyAnchoring",value:function value(){if(!(this.textChunkStart>=this.leafTexts.length)){var t,e=this.leafTexts[this.textChunkStart],r=e.getStyle("text-anchor").getString("start");t="start"===r?e.x-this.minX:"end"===r?e.x-this.maxX:e.x-(this.minX+this.maxX)/2;for(var n=this.textChunkStart;n<this.leafTexts.length;n++)this.leafTexts[n].x+=t;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length;}}},{key:"adjustChildCoordinatesRecursive",value:function value(t){var e=this;this.children.forEach(function(r,n){e.adjustChildCoordinatesRecursiveCore(t,e,e,n);}),this.applyAnchoring();}},{key:"adjustChildCoordinatesRecursiveCore",value:function value(t,e,r,n){var i=r.children[n];i.children.length>0?i.children.forEach(function(r,n){e.adjustChildCoordinatesRecursiveCore(t,e,i,n);}):this.adjustChildCoordinates(t,e,r,n);}},{key:"adjustChildCoordinates",value:function value(t,e,r,n){var i=r.children[n];if("function"!=typeof i.measureText)return i;t.save(),i.setContext(t,!0);var o=i.getAttribute("x"),a=i.getAttribute("y"),s=i.getAttribute("dx"),u=i.getAttribute("dy"),l=i.getStyle("font-family").getDefinition(),c=Boolean(l)&&l.isRTL;0===n&&(o.hasValue()||o.setValue(i.getInheritedAttribute("x")),a.hasValue()||a.setValue(i.getInheritedAttribute("y")),s.hasValue()||s.setValue(i.getInheritedAttribute("dx")),u.hasValue()||u.setValue(i.getInheritedAttribute("dy")));var h=i.measureText(t);return c&&(e.x-=h),o.hasValue()?(e.applyAnchoring(),i.x=o.getPixels("x"),s.hasValue()&&(i.x+=s.getPixels("x"))):(s.hasValue()&&(e.x+=s.getPixels("x")),i.x=e.x),e.x=i.x,c||(e.x+=h),a.hasValue()?(i.y=a.getPixels("y"),u.hasValue()&&(i.y+=u.getPixels("y"))):(u.hasValue()&&(e.y+=u.getPixels("y")),i.y=e.y),e.y=i.y,e.leafTexts.push(i),e.minX=Math.min(e.minX,i.x,i.x+h),e.maxX=Math.max(e.maxX,i.x,i.x+h),i.clearContext(t),t.restore(),i;}},{key:"getChildBoundingBox",value:function value(t,e,r,n){var i=r.children[n];if("function"!=typeof i.getBoundingBox)return null;var o=i.getBoundingBox(t);return o?(i.children.forEach(function(r,n){var a=e.getChildBoundingBox(t,e,i,n);o.addBoundingBox(a);}),o):null;}},{key:"renderChild",value:function value(t,e,r,n){var i=r.children[n];i.render(t),i.children.forEach(function(r,n){e.renderChild(t,e,i,n);});}},{key:"measureText",value:function value(t){var e=this.measureCache;if(~e)return e;var r=this.getText(),n=this.measureTargetText(t,r);return this.measureCache=n,n;}},{key:"measureTargetText",value:function value(t,e){if(!e.length)return 0;var r=this.parent,n=r.getStyle("font-family").getDefinition();if(n){for(var i=this.getFontSize(),o=n.isRTL?e.split("").reverse().join(""):e,a=K(r.getAttribute("dx").getString()),s=o.length,u=0,l=0;l<s;l++)u+=(this.getGlyph(n,o,l).horizAdvX||n.horizAdvX)*i/n.fontFace.unitsPerEm,void 0===a[l]||isNaN(a[l])||(u+=a[l]);return u;}if(!t.measureText)return 10*e.length;t.save(),this.setContext(t,!0);var c=t.measureText(e).width;return this.clearContext(t),t.restore(),c;}},{key:"getInheritedAttribute",value:function value(t){for(var r=this;r instanceof e&&r.isFirstChild();){var n=r.parent.getAttribute(t);if(n.hasValue(!0))return n.getValue("0");r=r.parent;}return null;}}]);}(Qt),Jt=function(t){function e(t,r,n){var i;return q(this,e),(i=F(this,e,[t,r,(this instanceof e?this.constructor:void 0)===e||n])).type="tspan",i.text=i.children.length>0?"":i.getTextFromNode(),i;}return U(e,t),H(e,[{key:"getText",value:function value(){return this.text;}}]);}(Yt),$t=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="textNode",t;}return U(e,t),H(e);}(Jt),Kt=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="svg",t.root=!1,t;}return U(e,t),H(e,[{key:"setContext",value:function value(t){var r,n=this.document,i=n.screen,o=n.window,a=t.canvas;if(i.setDefaults(t),a.style&&void 0!==t.font&&o&&void 0!==o.getComputedStyle){t.font=o.getComputedStyle(a).getPropertyValue("font");var s=new xt(n,"fontSize",qt.parse(t.font).fontSize);s.hasValue()&&(n.rootEmSize=s.getPixels("y"),n.emSize=n.rootEmSize);}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var u=i.viewPort,l=u.width,c=u.height;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var h=this.getAttribute("refX"),f=this.getAttribute("refY"),p=this.getAttribute("viewBox"),y=p.hasValue()?K(p.getString()):null,d=!this.root&&"visible"!==this.getStyle("overflow").getValue("hidden"),v=0,m=0,g=0,b=0;y&&(v=y[0],m=y[1]),this.root||(l=this.getStyle("width").getPixels("x"),c=this.getStyle("height").getPixels("y"),"marker"===this.type&&(g=v,b=m,v=0,m=0)),i.viewPort.setCurrent(l,c),!this.node||this.parent&&"foreignObject"!==(null===(r=this.node.parentNode)||void 0===r?void 0:r.nodeName)||!this.getStyle("transform",!1,!0).hasValue()||this.getStyle("transform-origin",!1,!0).hasValue()||this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),L(G(e.prototype),"setContext",this).call(this,t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),y&&(l=y[2],c=y[3]),n.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:l,height:i.viewPort.height,desiredHeight:c,minX:v,minY:m,refX:h.getValue(),refY:f.getValue(),clip:d,clipX:g,clipY:b}),y&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(l,c));}},{key:"clearContext",value:function value(t){L(G(e.prototype),"clearContext",this).call(this,t),this.document.screen.viewPort.removeCurrent();}},{key:"resize",value:function value(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.getAttribute("width",!0),i=this.getAttribute("height",!0),o=this.getAttribute("viewBox"),a=this.getAttribute("style"),s=n.getNumber(0),u=i.getNumber(0);if(r)if("string"==typeof r)this.getAttribute("preserveAspectRatio",!0).setValue(r);else{var l=this.getAttribute("preserveAspectRatio");l.hasValue()&&l.setValue(l.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"));}if(n.setValue(t),i.setValue(e),o.hasValue()||o.setValue("0 0 ".concat(s||t," ").concat(u||e)),a.hasValue()){var c=this.getStyle("width"),h=this.getStyle("height");c.hasValue()&&c.setValue("".concat(t,"px")),h.hasValue()&&h.setValue("".concat(e,"px"));}}}]);}(Qt),Zt=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="rect",t;}return U(e,t),H(e,[{key:"path",value:function value(t){var e=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),n=this.getStyle("width",!1,!0).getPixels("x"),i=this.getStyle("height",!1,!0).getPixels("y"),o=this.getAttribute("rx"),a=this.getAttribute("ry"),s=o.getPixels("x"),u=a.getPixels("y");if(o.hasValue()&&!a.hasValue()&&(u=s),a.hasValue()&&!o.hasValue()&&(s=u),s=Math.min(s,n/2),u=Math.min(u,i/2),t){var l=(Math.sqrt(2)-1)/3*4;t.beginPath(),i>0&&n>0&&(t.moveTo(e+s,r),t.lineTo(e+n-s,r),t.bezierCurveTo(e+n-s+l*s,r,e+n,r+u-l*u,e+n,r+u),t.lineTo(e+n,r+i-u),t.bezierCurveTo(e+n,r+i-u+l*u,e+n-s+l*s,r+i,e+n-s,r+i),t.lineTo(e+s,r+i),t.bezierCurveTo(e+s-l*s,r+i,e,r+i-u+l*u,e,r+i-u),t.lineTo(e,r+u),t.bezierCurveTo(e,r+u-l*u,e+s-l*s,r,e+s,r),t.closePath());}return new zt(e,r,e+n,r+i);}},{key:"getMarkers",value:function value(){return null;}}]);}(Wt),te=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="circle",t;}return U(e,t),H(e,[{key:"path",value:function value(t){var e=this.getAttribute("cx").getPixels("x"),r=this.getAttribute("cy").getPixels("y"),n=this.getAttribute("r").getPixels();return t&&n>0&&(t.beginPath(),t.arc(e,r,n,0,2*Math.PI,!1),t.closePath()),new zt(e-n,r-n,e+n,r+n);}},{key:"getMarkers",value:function value(){return null;}}]);}(Wt),ee=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="ellipse",t;}return U(e,t),H(e,[{key:"path",value:function value(t){var e=(Math.sqrt(2)-1)/3*4,r=this.getAttribute("rx").getPixels("x"),n=this.getAttribute("ry").getPixels("y"),i=this.getAttribute("cx").getPixels("x"),o=this.getAttribute("cy").getPixels("y");return t&&r>0&&n>0&&(t.beginPath(),t.moveTo(i+r,o),t.bezierCurveTo(i+r,o+e*n,i+e*r,o+n,i,o+n),t.bezierCurveTo(i-e*r,o+n,i-r,o+e*n,i-r,o),t.bezierCurveTo(i-r,o-e*n,i-e*r,o-n,i,o-n),t.bezierCurveTo(i+e*r,o-n,i+r,o-e*n,i+r,o),t.closePath()),new zt(i-r,o-n,i+r,o+n);}},{key:"getMarkers",value:function value(){return null;}}]);}(Wt),re=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="line",t;}return U(e,t),H(e,[{key:"getPoints",value:function value(){return[new St(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new St(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))];}},{key:"path",value:function value(t){var e=W(this.getPoints(),2),r=e[0],n=r.x,i=r.y,o=e[1],a=o.x,s=o.y;return t&&(t.beginPath(),t.moveTo(n,i),t.lineTo(a,s)),new zt(n,i,a,s);}},{key:"getMarkers",value:function value(){var t=W(this.getPoints(),2),e=t[0],r=t[1],n=e.angleTo(r);return[[e,n],[r,n]];}}]);}(Wt),ne=function(t){function e(t,r,n){var i;return q(this,e),(i=F(this,e,[t,r,n])).type="polyline",i.points=[],i.points=St.parsePath(i.getAttribute("points").getString()),i;}return U(e,t),H(e,[{key:"path",value:function value(t){var e=this.points,r=W(e,1)[0],n=r.x,i=r.y,o=new zt(n,i);return t&&(t.beginPath(),t.moveTo(n,i)),e.forEach(function(e){var r=e.x,n=e.y;o.addPoint(r,n),t&&t.lineTo(r,n);}),o;}},{key:"getMarkers",value:function value(){var t=this.points,e=t.length-1,r=[];return t.forEach(function(n,i){i!==e&&r.push([n,n.angleTo(t[i+1])]);}),r.length>0&&r.push([t[t.length-1],r[r.length-1][1]]),r;}}]);}(Wt),ie=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="polygon",t;}return U(e,t),H(e,[{key:"path",value:function value(t){var r=L(G(e.prototype),"path",this).call(this,t),n=W(this.points,1)[0],i=n.x,o=n.y;return t&&(t.lineTo(i,o),t.closePath()),r;}}]);}(ne),oe=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="pattern",t;}return U(e,t),H(e,[{key:"createPattern",value:function value(t,e,r){var n=this.getStyle("width").getPixels("x",!0),i=this.getStyle("height").getPixels("y",!0),o=new Kt(this.document,null);o.attributes.viewBox=new xt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new xt(this.document,"width","".concat(n,"px")),o.attributes.height=new xt(this.document,"height","".concat(i,"px")),o.attributes.transform=new xt(this.document,"transform",this.getAttribute("patternTransform").getValue()),o.children=this.children;var a=this.document.createCanvas(n,i),s=a.getContext("2d"),u=this.getAttribute("x"),l=this.getAttribute("y");u.hasValue()&&l.hasValue()&&s.translate(u.getPixels("x",!0),l.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:Reflect.deleteProperty(this.styles,"fill-opacity");for(var c=-1;c<=1;c++)for(var h=-1;h<=1;h++)s.save(),o.attributes.x=new xt(this.document,"x",c*a.width),o.attributes.y=new xt(this.document,"y",h*a.height),o.render(s),s.restore();return t.createPattern(a,"repeat");}}]);}(Dt),ae=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="marker",t;}return U(e,t),H(e,[{key:"render",value:function value(t,e,r){if(e){var n=e.x,i=e.y,o=this.getAttribute("orient").getString("auto"),a=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(n,i),"auto"===o&&t.rotate(r),"strokeWidth"===a&&t.scale(t.lineWidth,t.lineWidth),t.save();var s=new Kt(this.document,null);s.type=this.type,s.attributes.viewBox=new xt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),s.attributes.refX=new xt(this.document,"refX",this.getAttribute("refX").getValue()),s.attributes.refY=new xt(this.document,"refY",this.getAttribute("refY").getValue()),s.attributes.width=new xt(this.document,"width",this.getAttribute("markerWidth").getValue()),s.attributes.height=new xt(this.document,"height",this.getAttribute("markerHeight").getValue()),s.attributes.overflow=new xt(this.document,"overflow",this.getAttribute("overflow").getValue()),s.attributes.fill=new xt(this.document,"fill",this.getAttribute("fill").getColor("black")),s.attributes.stroke=new xt(this.document,"stroke",this.getAttribute("stroke").getValue("none")),s.children=this.children,s.render(t),t.restore(),"strokeWidth"===a&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"===o&&t.rotate(-r),t.translate(-n,-i);}}}]);}(Dt),se=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="defs",t;}return U(e,t),H(e,[{key:"render",value:function value(){}}]);}(Dt),ue=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="g",t;}return U(e,t),H(e,[{key:"getBoundingBox",value:function value(t){var e=new zt();return this.children.forEach(function(r){e.addBoundingBox(r.getBoundingBox(t));}),e;}}]);}(Qt),le=function(t){function e(t,r,n){var i;q(this,e),(i=F(this,e,[t,r,n])).attributesToInherit=["gradientUnits"],i.stops=[];var o=i,a=o.stops;return o.children.forEach(function(t){"stop"===t.type&&a.push(t);}),i;}return U(e,t),H(e,[{key:"getGradientUnits",value:function value(){return this.getAttribute("gradientUnits").getString("objectBoundingBox");}},{key:"createGradient",value:function value(t,e,r){var n=this,i=this;this.getHrefAttribute().hasValue()&&(i=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(i));var o=i.stops,a=this.getGradient(t,e);if(!a)return this.addParentOpacity(r,o[o.length-1].color);if(o.forEach(function(t){a.addColorStop(t.offset,n.addParentOpacity(r,t.color));}),this.getAttribute("gradientTransform").hasValue()){var s=this.document,u=s.screen,l=u.MAX_VIRTUAL_PIXELS,c=W(u.viewPort.viewPorts,1)[0],h=new Zt(s,null);h.attributes.x=new xt(s,"x",-l/3),h.attributes.y=new xt(s,"y",-l/3),h.attributes.width=new xt(s,"width",l),h.attributes.height=new xt(s,"height",l);var f=new ue(s,null);f.attributes.transform=new xt(s,"transform",this.getAttribute("gradientTransform").getValue()),f.children=[h];var p=new Kt(s,null);p.attributes.x=new xt(s,"x",0),p.attributes.y=new xt(s,"y",0),p.attributes.width=new xt(s,"width",c.width),p.attributes.height=new xt(s,"height",c.height),p.children=[f];var y=s.createCanvas(c.width,c.height),d=y.getContext("2d");return d.fillStyle=a,p.render(d),d.createPattern(y,"no-repeat");}return a;}},{key:"inheritStopContainer",value:function value(t){var e=this;this.attributesToInherit.forEach(function(r){!e.getAttribute(r).hasValue()&&t.getAttribute(r).hasValue()&&e.getAttribute(r,!0).setValue(t.getAttribute(r).getValue());});}},{key:"addParentOpacity",value:function value(t,e){return t.hasValue()?new xt(this.document,"color",e).addOpacity(t).getColor():e;}}]);}(Dt),ce=function(t){function e(t,r,n){var i;return q(this,e),(i=F(this,e,[t,r,n])).type="linearGradient",i.attributesToInherit.push("x1","y1","x2","y2"),i;}return U(e,t),H(e,[{key:"getGradient",value:function value(t,e){var r="objectBoundingBox"===this.getGradientUnits(),n=r?e.getBoundingBox(t):null;if(r&&!n)return null;this.getAttribute("x1").hasValue()||this.getAttribute("y1").hasValue()||this.getAttribute("x2").hasValue()||this.getAttribute("y2").hasValue()||(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var i=r?n.x+n.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),o=r?n.y+n.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),a=r?n.x+n.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),s=r?n.y+n.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return i===a&&o===s?null:t.createLinearGradient(i,o,a,s);}}]);}(le),he=function(t){function e(t,r,n){var i;return q(this,e),(i=F(this,e,[t,r,n])).type="radialGradient",i.attributesToInherit.push("cx","cy","r","fx","fy","fr"),i;}return U(e,t),H(e,[{key:"getGradient",value:function value(t,e){var r="objectBoundingBox"===this.getGradientUnits(),n=e.getBoundingBox(t);if(r&&!n)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var i=r?n.x+n.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),o=r?n.y+n.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),a=i,s=o;this.getAttribute("fx").hasValue()&&(a=r?n.x+n.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(s=r?n.y+n.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var u=r?(n.width+n.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),l=this.getAttribute("fr").getPixels();return t.createRadialGradient(a,s,l,i,o,u);}}]);}(le),fe=function(t){function e(t,r,n){var i;q(this,e),(i=F(this,e,[t,r,n])).type="stop";var o=Math.max(0,Math.min(1,i.getAttribute("offset").getNumber())),a=i.getStyle("stop-opacity"),s=i.getStyle("stop-color",!0);return""===s.getString()&&s.setValue("#000"),a.hasValue()&&(s=s.addOpacity(a)),i.offset=o,i.color=s.getColor(),i;}return U(e,t),H(e);}(Dt),pe=function(t){function e(t,r,n){var i;q(this,e),(i=F(this,e,[t,r,n])).type="animate",i.duration=0,i.initialValue=null,i.initialUnits="",i.removed=!1,i.frozen=!1,t.screen.animations.push(i),i.begin=i.getAttribute("begin").getMilliseconds(),i.maxDuration=i.begin+i.getAttribute("dur").getMilliseconds(),i.from=i.getAttribute("from"),i.to=i.getAttribute("to"),i.values=new xt(t,"values",null);var o=i.getAttribute("values");return o.hasValue()&&i.values.setValue(o.getString().split(";")),i;}return U(e,t),H(e,[{key:"getProperty",value:function value(){var t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return"CSS"===t?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0);}},{key:"calcValue",value:function value(){var t=this.initialUnits,e=this.getProgress(),r=e.progress,n=e.from,i=e.to,o=n.getNumber()+(i.getNumber()-n.getNumber())*r;return"%"===t&&(o*=100),"".concat(o).concat(t);}},{key:"update",value:function value(t){var e=this.parent,r=this.getProperty();if(this.initialValue||(this.initialValue=r.getString(),this.initialUnits=r.getUnits()),this.duration>this.maxDuration){var n=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==n||this.frozen){if("remove"===n&&!this.removed)return this.removed=!0,r.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0;}else this.frozen=!0,e.animationFrozen=!0,e.animationFrozenValue=r.getString();return!1;}this.duration+=t;var i=!1;if(this.begin<this.duration){var o=this.calcValue(),a=this.getAttribute("type");if(a.hasValue()){var s=a.getString();o="".concat(s,"(").concat(o,")");}r.setValue(o),i=!0;}return i;}},{key:"getProgress",value:function value(){var t=this.document,e=this.values,r={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(e.hasValue()){var n=r.progress*(e.getValue().length-1),i=Math.floor(n),o=Math.ceil(n);r.from=new xt(t,"from",parseFloat(e.getValue()[i])),r.to=new xt(t,"to",parseFloat(e.getValue()[o])),r.progress=(n-i)/(o-i);}else r.from=this.from,r.to=this.to;return r;}}]);}(Dt),ye=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="animateColor",t;}return U(e,t),H(e,[{key:"calcValue",value:function value(){var t=this.getProgress(),e=t.progress,r=t.from,n=t.to,i=new s(r.getColor()),o=new s(n.getColor());if(i.ok&&o.ok){var a=i.r+(o.r-i.r)*e,u=i.g+(o.g-i.g)*e,l=i.b+(o.b-i.b)*e;return"rgb(".concat(Math.floor(a),", ").concat(Math.floor(u),", ").concat(Math.floor(l),")");}return this.getAttribute("from").getColor();}}]);}(pe),de=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="animateTransform",t;}return U(e,t),H(e,[{key:"calcValue",value:function value(){var t=this.getProgress(),e=t.progress,r=t.from,n=t.to,i=K(r.getString()),o=K(n.getString()),a=i.map(function(t,r){return t+(o[r]-t)*e;}).join(" ");return a;}}]);}(pe),ve=function(t){function e(t,r,n){var i;q(this,e),(i=F(this,e,[t,r,n])).type="font",i.glyphs={},i.horizAdvX=i.getAttribute("horiz-adv-x").getNumber();var o,a=t.definitions,s=R(i.children);try{for(s.s();!(o=s.n()).done;){var u=o.value;switch(u.type){case"font-face":i.fontFace=u;var l=u.getStyle("font-family");l.hasValue()&&(a[l.getString()]=i);break;case"missing-glyph":i.missingGlyph=u;break;case"glyph":var c=u;c.arabicForm?(i.isRTL=!0,i.isArabic=!0,void 0===i.glyphs[c.unicode]&&(i.glyphs[c.unicode]={}),i.glyphs[c.unicode][c.arabicForm]=c):i.glyphs[c.unicode]=c;}}}catch(t){s.e(t);}finally{s.f();}return i;}return U(e,t),H(e,[{key:"render",value:function value(){}}]);}(Dt),me=function(t){function e(t,r,n){var i;return q(this,e),(i=F(this,e,[t,r,n])).type="font-face",i.ascent=i.getAttribute("ascent").getNumber(),i.descent=i.getAttribute("descent").getNumber(),i.unitsPerEm=i.getAttribute("units-per-em").getNumber(),i;}return U(e,t),H(e);}(Dt),ge=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="missing-glyph",t.horizAdvX=0,t;}return U(e,t),H(e);}(Wt),be=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="tref",t;}return U(e,t),H(e,[{key:"getText",value:function value(){var t=this.getHrefAttribute().getDefinition();if(t){var e=t.children[0];if(e)return e.getText();}return"";}}]);}(Yt),xe=function(t){function e(t,r,n){var i;q(this,e),(i=F(this,e,[t,r,n])).type="a";var o=r.childNodes,a=o[0],s=o.length>0&&Array.from(o).every(function(t){return 3===t.nodeType;});return i.hasText=s,i.text=s?i.getTextFromNode(a):"",i;}return U(e,t),H(e,[{key:"getText",value:function value(){return this.text;}},{key:"renderChildren",value:function value(t){if(this.hasText){L(G(e.prototype),"renderChildren",this).call(this,t);var r=this.document,n=this.x,i=this.y,o=r.screen.mouse,a=new xt(r,"fontSize",qt.parse(r.ctx.font).fontSize);o.isWorking()&&o.checkBoundingBox(this,new zt(n,i-a.getPixels("y"),n+this.measureText(t),i));}else if(this.children.length>0){var s=new ue(this.document,null);s.children=this.children,s.parent=this,s.render(t);}}},{key:"onClick",value:function value(){var t=this.document.window;t&&t.open(this.getHrefAttribute().getString());}},{key:"onMouseMove",value:function value(){this.document.ctx.canvas.style.cursor="pointer";}}]);}(Yt);function we(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 Se(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?we(Object(r),!0).forEach(function(e){o(t,e,r[e]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):we(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e));});}return t;}var _e=function(t){function e(t,r,n){var i;q(this,e),(i=F(this,e,[t,r,n])).type="textPath",i.textWidth=0,i.textHeight=0,i.pathLength=-1,i.glyphInfo=null,i.letterSpacingCache=[],i.measuresCache=new Map([["",0]]);var o=i.getHrefAttribute().getDefinition();return i.text=i.getTextFromNode(),i.dataArray=i.parsePathData(o),i;}return U(e,t),H(e,[{key:"getText",value:function value(){return this.text;}},{key:"path",value:function value(t){var e=this.dataArray;t&&t.beginPath(),e.forEach(function(e){var r=e.type,n=e.points;switch(r){case Ht.LINE_TO:t&&t.lineTo(n[0],n[1]);break;case Ht.MOVE_TO:t&&t.moveTo(n[0],n[1]);break;case Ht.CURVE_TO:t&&t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case Ht.QUAD_TO:t&&t.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case Ht.ARC:var i=W(n,8),o=i[0],a=i[1],s=i[2],u=i[3],l=i[4],c=i[5],h=i[6],f=i[7],p=s>u?s:u,y=s>u?1:s/u,d=s>u?u/s:1;t&&(t.translate(o,a),t.rotate(h),t.scale(y,d),t.arc(0,0,p,l,l+c,Boolean(1-f)),t.scale(1/y,1/d),t.rotate(-h),t.translate(-o,-a));break;case Ht.CLOSE_PATH:t&&t.closePath();}});}},{key:"renderChildren",value:function value(t){this.setTextData(t),t.save();var e=this.parent.getStyle("text-decoration").getString(),r=this.getFontSize(),n=this.glyphInfo,i=t.fillStyle;"underline"===e&&t.beginPath(),n.forEach(function(n,i){var o=n.p0,a=n.p1,s=n.rotation,u=n.text;t.save(),t.translate(o.x,o.y),t.rotate(s),t.fillStyle&&t.fillText(u,0,0),t.strokeStyle&&t.strokeText(u,0,0),t.restore(),"underline"===e&&(0===i&&t.moveTo(o.x,o.y+r/8),t.lineTo(a.x,a.y+r/5));}),"underline"===e&&(t.lineWidth=r/20,t.strokeStyle=i,t.stroke(),t.closePath()),t.restore();}},{key:"getLetterSpacingAt",value:function value(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.letterSpacingCache[t]||0;}},{key:"findSegmentToFitChar",value:function value(t,e,r,n,i,o,a,s,u){var l=o,c=this.measureText(t,s);" "===s&&"justify"===e&&r<n&&(c+=(n-r)/i),u>-1&&(l+=this.getLetterSpacingAt(u));var h=this.textHeight/20,f=this.getEquidistantPointOnPath(l,h,0),p=this.getEquidistantPointOnPath(l+c,h,0),y={p0:f,p1:p},d=f&&p?Math.atan2(p.y-f.y,p.x-f.x):0;if(a){var v=Math.cos(Math.PI/2+d)*a,m=Math.cos(-d)*a;y.p0=Se(Se({},f),{},{x:f.x+v,y:f.y+m}),y.p1=Se(Se({},p),{},{x:p.x+v,y:p.y+m});}return{offset:l+=c,segment:y,rotation:d};}},{key:"measureText",value:function value(t,e){var r=this.measuresCache,n=e||this.getText();if(r.has(n))return r.get(n);var i=this.measureTargetText(t,n);return r.set(n,i),i;}},{key:"setTextData",value:function value(t){var e=this;if(!this.glyphInfo){var r=this.getText(),n=r.split(""),i=r.split(" ").length-1,o=this.parent.getAttribute("dx").split().map(function(t){return t.getPixels("x");}),a=this.parent.getAttribute("dy").getPixels("y"),s=this.parent.getStyle("text-anchor").getString("start"),u=this.getStyle("letter-spacing"),l=this.parent.getStyle("letter-spacing"),c=0;u.hasValue()&&"inherit"!==u.getValue()?u.hasValue()&&"initial"!==u.getValue()&&"unset"!==u.getValue()&&(c=u.getPixels()):c=l.getPixels();var h=[],f=r.length;this.letterSpacingCache=h;for(var p=0;p<f;p++)h.push(void 0!==o[p]?o[p]:c);var y=h.reduce(function(t,e,r){return 0===r?0:t+e||0;},0),d=this.measureText(t),v=Math.max(d+y,0);this.textWidth=d,this.textHeight=this.getFontSize(),this.glyphInfo=[];var m=this.getPathLength(),g=this.getStyle("startOffset").getNumber(0)*m,b=0;"middle"!==s&&"center"!==s||(b=-v/2),"end"!==s&&"right"!==s||(b=-v),b+=g,n.forEach(function(r,o){var u=e.findSegmentToFitChar(t,s,v,m,i,b,a,r,o),l=u.offset,c=u.segment,h=u.rotation;b=l,c.p0&&c.p1&&e.glyphInfo.push({text:n[o],p0:c.p0,p1:c.p1,rotation:h});});}}},{key:"parsePathData",value:function value(t){if(this.pathLength=-1,!t)return[];var e=[],r=t.pathParser;for(r.reset();!r.isEnd();){var n=r.current,i=n?n.x:0,o=n?n.y:0,a=r.next(),s=a.type,u=[];switch(a.type){case Ht.MOVE_TO:this.pathM(r,u);break;case Ht.LINE_TO:s=this.pathL(r,u);break;case Ht.HORIZ_LINE_TO:s=this.pathH(r,u);break;case Ht.VERT_LINE_TO:s=this.pathV(r,u);break;case Ht.CURVE_TO:this.pathC(r,u);break;case Ht.SMOOTH_CURVE_TO:s=this.pathS(r,u);break;case Ht.QUAD_TO:this.pathQ(r,u);break;case Ht.SMOOTH_QUAD_TO:s=this.pathT(r,u);break;case Ht.ARC:u=this.pathA(r);break;case Ht.CLOSE_PATH:Wt.pathZ(r);}a.type!==Ht.CLOSE_PATH?e.push({type:s,points:u,start:{x:i,y:o},pathLength:this.calcLength(i,o,s,u)}):e.push({type:Ht.CLOSE_PATH,points:[],pathLength:0});}return e;}},{key:"pathM",value:function value(t,e){var r=Wt.pathM(t).point,n=r.x,i=r.y;e.push(n,i);}},{key:"pathL",value:function value(t,e){var r=Wt.pathL(t).point,n=r.x,i=r.y;return e.push(n,i),Ht.LINE_TO;}},{key:"pathH",value:function value(t,e){var r=Wt.pathH(t).point,n=r.x,i=r.y;return e.push(n,i),Ht.LINE_TO;}},{key:"pathV",value:function value(t,e){var r=Wt.pathV(t).point,n=r.x,i=r.y;return e.push(n,i),Ht.LINE_TO;}},{key:"pathC",value:function value(t,e){var r=Wt.pathC(t),n=r.point,i=r.controlPoint,o=r.currentPoint;e.push(n.x,n.y,i.x,i.y,o.x,o.y);}},{key:"pathS",value:function value(t,e){var r=Wt.pathS(t),n=r.point,i=r.controlPoint,o=r.currentPoint;return e.push(n.x,n.y,i.x,i.y,o.x,o.y),Ht.CURVE_TO;}},{key:"pathQ",value:function value(t,e){var r=Wt.pathQ(t),n=r.controlPoint,i=r.currentPoint;e.push(n.x,n.y,i.x,i.y);}},{key:"pathT",value:function value(t,e){var r=Wt.pathT(t),n=r.controlPoint,i=r.currentPoint;return e.push(n.x,n.y,i.x,i.y),Ht.QUAD_TO;}},{key:"pathA",value:function value(t){var e=Wt.pathA(t),r=e.rX,n=e.rY,i=e.sweepFlag,o=e.xAxisRotation,a=e.centp,s=e.a1,u=e.ad;return 0===i&&u>0&&(u-=2*Math.PI),1===i&&u<0&&(u+=2*Math.PI),[a.x,a.y,r,n,s,u,o,i];}},{key:"calcLength",value:function value(t,e,r,n){var i=0,o=null,a=null,s=0;switch(r){case Ht.LINE_TO:return this.getLineLength(t,e,n[0],n[1]);case Ht.CURVE_TO:for(i=0,o=this.getPointOnCubicBezier(0,t,e,n[0],n[1],n[2],n[3],n[4],n[5]),s=.01;s<=1;s+=.01)a=this.getPointOnCubicBezier(s,t,e,n[0],n[1],n[2],n[3],n[4],n[5]),i+=this.getLineLength(o.x,o.y,a.x,a.y),o=a;return i;case Ht.QUAD_TO:for(i=0,o=this.getPointOnQuadraticBezier(0,t,e,n[0],n[1],n[2],n[3]),s=.01;s<=1;s+=.01)a=this.getPointOnQuadraticBezier(s,t,e,n[0],n[1],n[2],n[3]),i+=this.getLineLength(o.x,o.y,a.x,a.y),o=a;return i;case Ht.ARC:i=0;var u=n[4],l=n[5],c=n[4]+l,h=Math.PI/180;if(Math.abs(u-c)<h&&(h=Math.abs(u-c)),o=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],u,0),l<0)for(s=u-h;s>c;s-=h)a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],s,0),i+=this.getLineLength(o.x,o.y,a.x,a.y),o=a;else for(s=u+h;s<c;s+=h)a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],s,0),i+=this.getLineLength(o.x,o.y,a.x,a.y),o=a;return a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],c,0),i+this.getLineLength(o.x,o.y,a.x,a.y);}return 0;}},{key:"getPointOnLine",value:function value(t,e,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:r,s=(i-r)/(n-e+lt),u=Math.sqrt(t*t/(1+s*s));n<e&&(u*=-1);var l=s*u,c=null;if(n===e)c={x:o,y:a+l};else if((a-r)/(o-e+lt)===s)c={x:o+u,y:a+l};else{var h,f,p=this.getLineLength(e,r,n,i);if(p<lt)return null;var y=(o-e)*(n-e)+(a-r)*(i-r);h=e+(y/=p*p)*(n-e),f=r+y*(i-r);var d=this.getLineLength(o,a,h,f),v=Math.sqrt(t*t-d*d);u=Math.sqrt(v*v/(1+s*s)),n<e&&(u*=-1),c={x:h+u,y:f+(l=s*u)};}return c;}},{key:"getPointOnPath",value:function value(t){var e=this.getPathLength(),r=0,n=null;if(t<-5e-5||t-5e-5>e)return null;var i,o=R(this.dataArray);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(!a||!(a.pathLength<5e-5||r+a.pathLength+5e-5<t)){var s=t-r,u=0;switch(a.type){case Ht.LINE_TO:n=this.getPointOnLine(s,a.start.x,a.start.y,a.points[0],a.points[1],a.start.x,a.start.y);break;case Ht.ARC:var l=a.points[4],c=a.points[5],h=a.points[4]+c;if(u=l+s/a.pathLength*c,c<0&&u<h||c>=0&&u>h)break;n=this.getPointOnEllipticalArc(a.points[0],a.points[1],a.points[2],a.points[3],u,a.points[6]);break;case Ht.CURVE_TO:(u=s/a.pathLength)>1&&(u=1),n=this.getPointOnCubicBezier(u,a.start.x,a.start.y,a.points[0],a.points[1],a.points[2],a.points[3],a.points[4],a.points[5]);break;case Ht.QUAD_TO:(u=s/a.pathLength)>1&&(u=1),n=this.getPointOnQuadraticBezier(u,a.start.x,a.start.y,a.points[0],a.points[1],a.points[2],a.points[3]);}if(n)return n;break;}r+=a.pathLength;}}catch(t){o.e(t);}finally{o.f();}return null;}},{key:"getLineLength",value:function value(t,e,r,n){return Math.sqrt((r-t)*(r-t)+(n-e)*(n-e));}},{key:"getPathLength",value:function value(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce(function(t,e){return e.pathLength>0?t+e.pathLength:t;},0)),this.pathLength;}},{key:"getPointOnCubicBezier",value:function value(t,e,r,n,i,o,a,s,u){return{x:s*pt(t)+o*yt(t)+n*dt(t)+e*vt(t),y:u*pt(t)+a*yt(t)+i*dt(t)+r*vt(t)};}},{key:"getPointOnQuadraticBezier",value:function value(t,e,r,n,i,o,a){return{x:o*mt(t)+n*gt(t)+e*bt(t),y:a*mt(t)+i*gt(t)+r*bt(t)};}},{key:"getPointOnEllipticalArc",value:function value(t,e,r,n,i,o){var a=Math.cos(o),s=Math.sin(o),u=r*Math.cos(i),l=n*Math.sin(i);return{x:t+(u*a-l*s),y:e+(u*s+l*a)};}},{key:"buildEquidistantCache",value:function value(t,e){var r=this.getPathLength(),n=e||.25,i=t||r/100;if(!this.equidistantCache||this.equidistantCache.step!==i||this.equidistantCache.precision!==n){this.equidistantCache={step:i,precision:n,points:[]};for(var o=0,a=0;a<=r;a+=n){var s=this.getPointOnPath(a),u=this.getPointOnPath(a+n);s&&u&&(o+=this.getLineLength(s.x,s.y,u.x,u.y))>=i&&(this.equidistantCache.points.push({x:s.x,y:s.y,distance:a}),o-=i);}}}},{key:"getEquidistantPointOnPath",value:function value(t,e,r){if(this.buildEquidistantCache(e,r),t<0||t-this.getPathLength()>5e-5)return null;var n=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[n]||null;}}]);}(Yt),Me=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i,Oe=function(t){function r(t,e,n){var i;q(this,r),(i=F(this,r,[t,e,n])).type="image",i.loaded=!1;var o=i.getHrefAttribute().getString();if(!o)return D(i);var a=o.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(o);return t.images.push(i),a?i.loadSvg(o):i.loadImage(o),i.isSvg=a,i;}return U(r,t),H(r,[{key:"loadImage",value:function value(t){var r=this;return e(J().mark(function e(){var n;return J().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.document.createImage(t);case 3:n=e.sent,r.image=n,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error('Error while loading image "'.concat(t,'":'),e.t0);case 10:r.loaded=!0;case 11:case"end":return e.stop();}},e,null,[[0,7]]);}))();}},{key:"loadSvg",value:function value(t){var r=this;return e(J().mark(function e(){var n,i,o,a;return J().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=Me.exec(t))){e.next=6;break;}i=n[5],"base64"===n[4]?r.image=atob(i):r.image=decodeURIComponent(i),e.next=19;break;case 6:return e.prev=6,e.next=9,r.document.fetch(t);case 9:return o=e.sent,e.next=12,o.text();case 12:a=e.sent,r.image=a,e.next=19;break;case 16:e.prev=16,e.t0=e.catch(6),console.error('Error while loading image "'.concat(t,'":'),e.t0);case 19:r.loaded=!0;case 20:case"end":return e.stop();}},e,null,[[6,16]]);}))();}},{key:"renderChildren",value:function value(t){var e=this.document,r=this.image,n=this.loaded,i=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),a=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");if(n&&r&&a&&s){if(t.save(),t.translate(i,o),this.isSvg){var u=e.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:a,scaleHeight:s});u.document.documentElement.parent=this,u.render();}else{var l=this.image;e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:a,desiredWidth:l.width,height:s,desiredHeight:l.height}),this.loaded&&(void 0===l.complete||l.complete)&&t.drawImage(l,0,0);}t.restore();}}},{key:"getBoundingBox",value:function value(){var t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),r=this.getStyle("width").getPixels("x"),n=this.getStyle("height").getPixels("y");return new zt(t,e,t+r,e+n);}}]);}(Qt),Pe=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="symbol",t;}return U(e,t),H(e,[{key:"render",value:function value(t){}}]);}(Qt),ke=function(){return H(function t(e){q(this,t),this.document=e,this.loaded=!1,e.fonts.push(this);},[{key:"load",value:function value(t,r){var n=this;return e(J().mark(function e(){var i,o,a;return J().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i=n.document,e.next=4,i.canvg.parser.load(r);case 4:o=e.sent,a=o.getElementsByTagName("font"),Array.from(a).forEach(function(e){var r=i.createElement(e);i.definitions[t]=r;}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.error('Error while loading font "'.concat(r,'":'),e.t0);case 12:n.loaded=!0;case 13:case"end":return e.stop();}},e,null,[[0,9]]);}))();}}]);}(),Ee=function(t){function e(t,r,n){var i;q(this,e),(i=F(this,e,[t,r,n])).type="style";var o=$(Array.from(r.childNodes).map(function(t){return t.textContent;}).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,""));return o.split("}").forEach(function(e){var r=e.trim();if(r){var n=r.split("{"),i=n[0].split(","),o=n[1].split(";");i.forEach(function(e){var r=e.trim();if(r){var n=t.styles[r]||{};if(o.forEach(function(e){var r=e.indexOf(":"),i=e.substr(0,r).trim(),o=e.substr(r+1,e.length-r).trim();i&&o&&(n[i]=new xt(t,i,o));}),t.styles[r]=n,t.stylesSpecificity[r]=function(t){var e=[0,0,0],r=t.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),n=0,i=W(ut(r,et),2);r=i[0],n=i[1],e[1]+=n;var o=W(ut(r,rt),2);r=o[0],n=o[1],e[0]+=n;var a=W(ut(r,nt),2);r=a[0],n=a[1],e[1]+=n;var s=W(ut(r,it),2);r=s[0],n=s[1],e[2]+=n;var u=W(ut(r,ot),2);r=u[0],n=u[1],e[1]+=n;var l=W(ut(r,at),2);r=l[0],n=l[1],e[1]+=n;var c=W(ut(r=r.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),st),2);return r=c[0],n=c[1],e[2]+=n,e.join("");}(r),"@font-face"===r){var i=n["font-family"].getString().replace(/"|'/g,"");n.src.getString().split(",").forEach(function(e){if(e.indexOf('format("svg")')>0){var r=tt(e);r&&new ke(t).load(i,r);}});}}});}}),i;}return U(e,t),H(e);}(Dt);Ee.parseExternalUrl=tt;var Ce=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="use",t;}return U(e,t),H(e,[{key:"setContext",value:function value(t){L(G(e.prototype),"setContext",this).call(this,t);var r=this.getAttribute("x"),n=this.getAttribute("y");r.hasValue()&&t.translate(r.getPixels("x"),0),n.hasValue()&&t.translate(0,n.getPixels("y"));}},{key:"path",value:function value(t){var e=this.element;e&&e.path(t);}},{key:"renderChildren",value:function value(t){var e=this.document,r=this.element;if(r){var n=r;if("symbol"===r.type&&((n=new Kt(e,null)).attributes.viewBox=new xt(e,"viewBox",r.getAttribute("viewBox").getString()),n.attributes.preserveAspectRatio=new xt(e,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),n.attributes.overflow=new xt(e,"overflow",r.getAttribute("overflow").getString()),n.children=r.children,r.styles.opacity=new xt(e,"opacity",this.calculateOpacity())),"svg"===n.type){var i=this.getStyle("width",!1,!0),o=this.getStyle("height",!1,!0);i.hasValue()&&(n.attributes.width=new xt(e,"width",i.getString())),o.hasValue()&&(n.attributes.height=new xt(e,"height",o.getString()));}var a=n.parent;n.parent=this,n.render(t),n.parent=a;}}},{key:"getBoundingBox",value:function value(t){var e=this.element;return e?e.getBoundingBox(t):null;}},{key:"elementTransform",value:function value(){var t=this.document,e=this.element;return Ft.fromElement(t,e);}},{key:"element",get:function get(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement;}}]);}(Qt);function Te(t,e,r,n,i,o){return t[r*n*4+4*e+o];}function Ae(t,e,r,n,i,o,a){t[r*n*4+4*e+o]=a;}function Ne(t,e,r){return t[e]*r;}function je(t,e,r,n){return e+Math.cos(t)*r+Math.sin(t)*n;}var Ie=function(t){function e(t,r,n){var i;q(this,e),(i=F(this,e,[t,r,n])).type="feColorMatrix";var o=K(i.getAttribute("values").getString());switch(i.getAttribute("type").getString("matrix")){case"saturate":var a=o[0];o=[.213+.787*a,.715-.715*a,.072-.072*a,0,0,.213-.213*a,.715+.285*a,.072-.072*a,0,0,.213-.213*a,.715-.715*a,.072+.928*a,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var s=o[0]*Math.PI/180;o=[je(s,.213,.787,-.213),je(s,.715,-.715,-.715),je(s,.072,-.072,.928),0,0,je(s,.213,-.213,.143),je(s,.715,.285,.14),je(s,.072,-.072,-.283),0,0,je(s,.213,-.213,-.787),je(s,.715,-.715,.715),je(s,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];}return i.matrix=o,i.includeOpacity=i.getAttribute("includeOpacity").hasValue(),i;}return U(e,t),H(e,[{key:"apply",value:function value(t,e,r,n,i){for(var o=this.includeOpacity,a=this.matrix,s=t.getImageData(0,0,n,i),u=0;u<i;u++)for(var l=0;l<n;l++){var c=Te(s.data,l,u,n,0,0),h=Te(s.data,l,u,n,0,1),f=Te(s.data,l,u,n,0,2),p=Te(s.data,l,u,n,0,3),y=Ne(a,0,c)+Ne(a,1,h)+Ne(a,2,f)+Ne(a,3,p)+Ne(a,4,1),d=Ne(a,5,c)+Ne(a,6,h)+Ne(a,7,f)+Ne(a,8,p)+Ne(a,9,1),v=Ne(a,10,c)+Ne(a,11,h)+Ne(a,12,f)+Ne(a,13,p)+Ne(a,14,1),m=Ne(a,15,c)+Ne(a,16,h)+Ne(a,17,f)+Ne(a,18,p)+Ne(a,19,1);o&&(y=0,d=0,v=0,m*=p/255),Ae(s.data,l,u,n,0,0,y),Ae(s.data,l,u,n,0,1,d),Ae(s.data,l,u,n,0,2,v),Ae(s.data,l,u,n,0,3,m);}t.clearRect(0,0,n,i),t.putImageData(s,0,0);}}]);}(Dt),Re=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="mask",t;}return U(e,t),H(e,[{key:"apply",value:function value(t,r){var n=this.document,i=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),a=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");if(!a&&!s){var u=new zt();this.children.forEach(function(e){u.addBoundingBox(e.getBoundingBox(t));}),i=Math.floor(u.x1),o=Math.floor(u.y1),a=Math.floor(u.width),s=Math.floor(u.height);}var l=this.removeStyles(r,e.ignoreStyles),c=n.createCanvas(i+a,o+s),h=c.getContext("2d");n.screen.setDefaults(h),this.renderChildren(h),new Ie(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(h,0,0,i+a,o+s);var f=n.createCanvas(i+a,o+s),p=f.getContext("2d");n.screen.setDefaults(p),r.render(p),p.globalCompositeOperation="destination-in",p.fillStyle=h.createPattern(c,"no-repeat"),p.fillRect(0,0,i+a,o+s),t.fillStyle=p.createPattern(f,"no-repeat"),t.fillRect(0,0,i+a,o+s),this.restoreStyles(r,l);}},{key:"render",value:function value(t){}}]);}(Dt);Re.ignoreStyles=["mask","transform","clip-path"];var Le=function Le(){},Fe=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="clipPath",t;}return U(e,t),H(e,[{key:"apply",value:function value(t){var e=this.document,r=Reflect.getPrototypeOf(t),n=t.beginPath,i=t.closePath;r&&(r.beginPath=Le,r.closePath=Le),Reflect.apply(n,t,[]),this.children.forEach(function(n){if(void 0!==n.path){var o=void 0!==n.elementTransform?n.elementTransform():null;o||(o=Ft.fromElement(e,n)),o&&o.apply(t),n.path(t),r&&(r.closePath=i),o&&o.unapply(t);}}),Reflect.apply(i,t,[]),t.clip(),r&&(r.beginPath=n,r.closePath=i);}},{key:"render",value:function value(t){}}]);}(Dt),De=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="filter",t;}return U(e,t),H(e,[{key:"apply",value:function value(t,r){var n=this.document,i=this.children,o=r.getBoundingBox(t);if(o){var a=0,s=0;i.forEach(function(t){var e=t.extraFilterDistance||0;a=Math.max(a,e),s=Math.max(s,e);});var u=Math.floor(o.width),l=Math.floor(o.height),c=u+2*a,h=l+2*s;if(!(c<1||h<1)){var f=Math.floor(o.x),p=Math.floor(o.y),y=this.removeStyles(r,e.ignoreStyles),d=n.createCanvas(c,h),v=d.getContext("2d");n.screen.setDefaults(v),v.translate(-f+a,-p+s),r.render(v),i.forEach(function(t){"function"==typeof t.apply&&t.apply(v,0,0,c,h);}),t.drawImage(d,0,0,c,h,f-a,p-s,c,h),this.restoreStyles(r,y);}}}},{key:"render",value:function value(t){}}]);}(Dt);De.ignoreStyles=["filter","transform","clip-path"];var Be=function(t){function e(t,r,n){var i;return q(this,e),(i=F(this,e,[t,r,n])).type="feDropShadow",i.addStylesFromStyleDefinition(),i;}return U(e,t),H(e,[{key:"apply",value:function value(t,e,r,n,i){}}]);}(Dt),Ge=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="feMorphology",t;}return U(e,t),H(e,[{key:"apply",value:function value(t,e,r,n,i){}}]);}(Dt),Ue=function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="feComposite",t;}return U(e,t),H(e,[{key:"apply",value:function value(t,e,r,n,i){}}]);}(Dt),Ve=function(t){function e(t,r,n){var i;return q(this,e),(i=F(this,e,[t,r,n])).type="feGaussianBlur",i.blurRadius=Math.floor(i.getAttribute("stdDeviation").getNumber()),i.extraFilterDistance=i.blurRadius,i;}return U(e,t),H(e,[{key:"apply",value:function value(t,e,r,n,i){var o=this.document,a=this.blurRadius,s=o.window?o.window.document.body:null,u=t.canvas;u.id=o.getUniqueId(),s&&(u.style.display="none",s.appendChild(u)),N(u,e,r,n,i,a),s&&s.removeChild(u);}}]);}(Dt),qe={svg:Kt,rect:Zt,circle:te,ellipse:ee,line:re,polyline:ne,polygon:ie,path:Wt,pattern:oe,marker:ae,defs:se,linearGradient:ce,radialGradient:he,stop:fe,animate:pe,animateColor:ye,animateTransform:de,font:ve,"font-face":me,"missing-glyph":ge,glyph:Xt,text:Yt,tspan:Jt,tref:be,a:xe,textPath:_e,image:Oe,g:ue,symbol:Pe,style:Ee,use:Ce,mask:Re,clipPath:Fe,filter:De,feDropShadow:Be,feMorphology:Ge,feComposite:Ue,feColorMatrix:Ie,feGaussianBlur:Ve,title:function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="title",t;}return U(e,t),H(e);}(Dt),desc:function(t){function e(){var t;return q(this,e),(t=F(this,e,arguments)).type="desc",t;}return U(e,t),H(e);}(Dt)};function ze(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 He(){return He=e(J().mark(function t(e){var r,n,i=arguments;return J().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]&&i[1],n=document.createElement("img"),r&&(n.crossOrigin="Anonymous"),t.abrupt("return",new Promise(function(t,r){n.onload=function(){t(n);},n.onerror=function(t,e,n,i,o){r(o);},n.src=e;}));case 4:case"end":return t.stop();}},t);})),He.apply(this,arguments);}var Qe=function(){function t(e){q(this,t);var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.rootEmSize,i=void 0===n?12:n,o=r.emSize,a=void 0===o?12:o,s=r.createCanvas,u=void 0===s?t.createCanvas:s,l=r.createImage,c=void 0===l?t.createImage:l,h=r.anonymousCrossOrigin;this.canvg=e,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=i,this.emSize=a,this.createCanvas=u,this.createImage=this.bindCreateImage(c,h),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this));}return H(t,[{key:"bindCreateImage",value:function value(t,e){return"boolean"==typeof e?function(r,n){return t(r,"boolean"==typeof n?n:e);}:t;}},{key:"window",get:function get(){return this.screen.window;}},{key:"fetch",get:function get(){return this.screen.fetch;}},{key:"ctx",get:function get(){return this.screen.ctx;}},{key:"emSize",get:function get(){var t=this.emSizeStack;return t[t.length-1];},set:function set(t){this.emSizeStack.push(t);}},{key:"popEmSize",value:function value(){this.emSizeStack.pop();}},{key:"getUniqueId",value:function value(){return"canvg".concat(++this.uniqueId);}},{key:"isImagesLoaded",value:function value(){return this.images.every(function(t){return t.loaded;});}},{key:"isFontsLoaded",value:function value(){return this.fonts.every(function(t){return t.loaded;});}},{key:"createDocumentElement",value:function value(t){var e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e;}},{key:"createElement",value:function value(e){var r=e.nodeName.replace(/^[^:]+:/,""),n=t.elementTypes[r];return void 0!==n?new n(this,e):new Bt(this,e);}},{key:"createTextNode",value:function value(t){return new $t(this,t);}},{key:"setViewBox",value:function value(t){this.screen.setViewBox(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ze(Object(r),!0).forEach(function(e){o(t,e,r[e]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ze(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e));});}return t;}({document:this},t));}}]);}();function We(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 Xe(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?We(Object(r),!0).forEach(function(e){o(t,e,r[e]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):We(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e));});}return t;}Qe.createCanvas=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r;},Qe.createImage=function(t){return He.apply(this,arguments);},Qe.elementTypes=qe;var Ye=function(){function t(e,r){q(this,t);var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.parser=new Ct(n),this.screen=new Pt(e,n),this.options=n;var i=new Qe(this,n),o=i.createDocumentElement(r);this.document=i,this.documentElement=o;}return H(t,[{key:"fork",value:function value(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.from(e,r,Xe(Xe({},this.options),n));}},{key:"forkString",value:function value(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.fromString(e,r,Xe(Xe({},this.options),n));}},{key:"ready",value:function value(){return this.screen.ready();}},{key:"isReady",value:function value(){return this.screen.isReady();}},{key:"render",value:function value(){var t=arguments,r=this;return e(J().mark(function e(){var n;return J().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.length>0&&void 0!==t[0]?t[0]:{},r.start(Xe({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},n)),e.next=4,r.ready();case 4:r.stop();case 5:case"end":return e.stop();}},e);}))();}},{key:"start",value:function value(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.documentElement,r=this.screen,n=this.options;r.start(e,Xe(Xe({enableRedraw:!0},n),t));}},{key:"stop",value:function value(){this.screen.stop();}},{key:"resize",value:function value(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.documentElement.resize(t,e,r);}}],[{key:"from",value:function value(r,n){var i=arguments;return e(J().mark(function e(){var o,a,s;return J().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=new Ct(o=i.length>2&&void 0!==i[2]?i[2]:{}),e.next=4,a.parse(n);case 4:return s=e.sent,e.abrupt("return",new t(r,s,o));case 6:case"end":return e.stop();}},e);}))();}},{key:"fromString",value:function value(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new t(e,new Ct(n).parseFromString(r),n);}}]);}();function Je(t,e,r){if(null!==t)for(var n,i,o,a,s,u,l,c,h=0,f=0,p=t.type,y="FeatureCollection"===p,d="Feature"===p,v=y?t.features.length:1,m=0;m<v;m++){s=(c=!!(l=y?t.features[m].geometry:d?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var g=0;g<s;g++){var b=0,x=0;if(null!==(a=c?l.geometries[g]:l)){u=a.coordinates;var w=a.type;switch(h=!r||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(u,f,m,b,x))return!1;f++,b++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(!1===e(u[n],f,m,b,x))return!1;f++,"MultiPoint"===w&&b++;}"LineString"===w&&b++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(i=0;i<u[n].length-h;i++){if(!1===e(u[n][i],f,m,b,x))return!1;f++;}"MultiLineString"===w&&b++,"Polygon"===w&&x++;}"Polygon"===w&&b++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(x=0,i=0;i<u[n].length;i++){for(o=0;o<u[n][i].length-h;o++){if(!1===e(u[n][i][o],f,m,b,x))return!1;f++;}x++;}b++;}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===Je(a.geometries[n],e,r))return!1;break;default:throw new Error("Unknown Geometry Type");}}}}}var $e=r(108),Ke=r.n($e),Ze=r(2635),tr=(r(3819),r(4537),r(9005)),er=r.n(tr),rr={startsWith:function startsWith(t,e){return 0==t.indexOf(e);},contains:function contains(t,e){return-1!=t.indexOf(e);},trim:function trim(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"");},camelize:function camelize(t){for(var e=t.split("-"),r=e[0],n=1,i=e.length;n<i;n++){var o=e[n];r+=o.charAt(0).toUpperCase()+o.substring(1);}return r;},format:function format(t,e,r){return e||(e=window),t.replace(rr.tokenRegEx,function(t,n){for(var i,o=n.split(/\.+/),a=0;a<o.length;a++)0==a&&(i=e),i=i[o[a]];return"function"==typeof i&&(i=r?i.apply(null,r):i()),void 0===i?"undefined":i;});},tokenRegEx:/\$\{([\w.]+?)\}/g,numberRegEx:/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,isNumeric:function isNumeric(t){return rr.numberRegEx.test(t);},numericIf:function numericIf(t){return rr.isNumeric(t)?parseFloat(t):t;}},nr={decimalSeparator:".",thousandsSeparator:",",limitSigDigs:function limitSigDigs(t,e){var r=0;return e>0&&(r=parseFloat(t.toPrecision(e))),r;},format:function format(t,e,r,n){e=void 0!==e?e:0,r=void 0!==r?r:nr.thousandsSeparator,n=void 0!==n?n:nr.decimalSeparator,null!=e&&(t=parseFloat(t.toFixed(e)));var i=t.toString().split(".");1===i.length&&null==e&&(e=0);var o,a=i[0];if(r)for(var s=/(-?[0-9]+)([0-9]{3})/;s.test(a);)a=a.replace(s,"$1"+r+"$2");if(0==e)o=a;else{var u=i.length>1?i[1]:"0";null!=e&&(u+=new Array(e-u.length+1).join("0")),o=a+n+u;}return o;}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(t){return nr.limitSigDigs(this,t);});var ir=function ir(t,e){var r=Array.prototype.slice.apply(arguments,[2]);return function(){var n=r.concat(Array.prototype.slice.apply(arguments,[0]));return t.apply(e,n);};};function or(t){return or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},or(t);}function ar(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,sr(n.key),n);}}function sr(t){var e=function(t,e){if("object"!=or(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=or(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==or(e)?e:e+"";}var ur=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.CLASS_NAME="SuperMap.Geometry",this.id=mr.createUniqueID(this.CLASS_NAME+"_"),this.parent=null,this.bounds=null,this.SRID=null;}return e=t,(r=[{key:"destroy",value:function value(){this.id=null,this.bounds=null,this.SRID=null;}},{key:"clone",value:function value(){return new t();}},{key:"setBounds",value:function value(t){t&&(this.bounds=t.clone());}},{key:"clearBounds",value:function value(){this.bounds=null,this.parent&&this.parent.clearBounds();}},{key:"extendBounds",value:function value(t){this.getBounds()?this.bounds.extend(t):this.setBounds(t);}},{key:"getBounds",value:function value(){return null==this.bounds&&this.calculateBounds(),this.bounds;}},{key:"calculateBounds",value:function value(){}},{key:"getVertices",value:function value(t){}},{key:"getArea",value:function value(){return 0;}}])&&ar(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r;}(),lr=r(9216),cr=r.n(lr);function hr(t){return hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},hr(t);}var fr,pr,yr,dr=function(){var t,e="",r="",n="pc",i=navigator.userAgent.toLowerCase();return i.indexOf("msie")>-1||i.indexOf("trident")>-1&&i.indexOf("rv")>-1?(e="msie",t=i.match(/msie ([\d.]+)/)||i.match(/rv:([\d.]+)/)):i.indexOf("chrome")>-1?(e="chrome",t=i.match(/chrome\/([\d.]+)/)):i.indexOf("firefox")>-1?(e="firefox",t=i.match(/firefox\/([\d.]+)/)):i.indexOf("opera")>-1?(e="opera",t=i.match(/version\/([\d.]+)/)):i.indexOf("safari")>-1&&(e="safari",t=i.match(/version\/([\d.]+)/)),r=t?t[1]:"",i.indexOf("ipad")>-1||i.indexOf("ipod")>-1||i.indexOf("iphone")>-1?n="apple":i.indexOf("android")>-1&&(r=(t=i.match(/version\/([\d.]+)/))?t[1]:"",n="android"),{name:e,version:r,device:n};}(),vr=(fr=!0,pr=dr,document.createElement("canvas").getContext?("firefox"===pr.name&&parseFloat(pr.version)<5&&(fr=!1),"safari"===pr.name&&parseFloat(pr.version)<4&&(fr=!1),"opera"===pr.name&&parseFloat(pr.version)<10&&(fr=!1),"msie"===pr.name&&parseFloat(pr.version)<9&&(fr=!1)):fr=!1,fr),mr=(-1===(yr=navigator.userAgent.toLowerCase()).indexOf("webkit")&&yr.indexOf("gecko"),{assign:function assign(t){for(var e=0;e<Object.getOwnPropertyNames(arguments).length;e++){var r=Object.getOwnPropertyNames(arguments)[e];if("caller"!=r&&"callee"!=r&&"length"!=r&&"arguments"!=r){var n=arguments[r];if(n)for(var i=0;i<Object.getOwnPropertyNames(n).length;i++){var o=Object.getOwnPropertyNames(n)[i];"caller"!=r&&"callee"!=r&&"length"!=r&&"arguments"!=r&&(t[o]=n[o]);}}}return t;},extend:function extend(t,e){if(t=t||{},e){for(var r in e){var n=e[r];void 0!==n&&(t[r]=n);}!("function"==typeof window.Event&&e instanceof window.Event)&&e.hasOwnProperty&&e.hasOwnProperty("toString")&&(t.toString=e.toString);}return t;},copy:function copy(t,e){var r;if(t=t||{},e)for(var n in t)void 0!==(r=e[n])&&(t[n]=r);},reset:function reset(t){for(var e in t=t||{})if(t.hasOwnProperty(e)){if("object"===hr(t[e])&&t[e]instanceof Array){for(var r in t[e])t[e][r].destroy&&t[e][r].destroy();t[e].length=0;}else"object"===hr(t[e])&&t[e]instanceof Object&&t[e].destroy&&t[e].destroy();t[e]=null;}},getElement:function getElement(){for(var t=[],e=0,r=arguments.length;e<r;e++){var n=arguments[e];if("string"==typeof n&&(n=document.getElementById(n)),1===arguments.length)return n;t.push(n);}return t;},isElement:function isElement(t){return!(!t||1!==t.nodeType);},isArray:function isArray(t){return"[object Array]"===Object.prototype.toString.call(t);},removeItem:function removeItem(t,e){for(var r=t.length-1;r>=0;r--)t[r]===e&&t.splice(r,1);return t;},indexOf:function indexOf(t,e){if(null==t)return-1;if("function"==typeof t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1;},modifyDOMElement:function modifyDOMElement(t,e,r,n,i,o,a,s){e&&(t.id=e),r&&(t.style.left=r.x+"px",t.style.top=r.y+"px"),n&&(t.style.width=n.w+"px",t.style.height=n.h+"px"),i&&(t.style.position=i),o&&(t.style.border=o),a&&(t.style.overflow=a),parseFloat(s)>=0&&parseFloat(s)<1?(t.style.filter="alpha(opacity="+100*s+")",t.style.opacity=s):1===parseFloat(s)&&(t.style.filter="",t.style.opacity="");},applyDefaults:function applyDefaults(t,e){t=t||{};var r="function"==typeof window.Event&&e instanceof window.Event;for(var n in e)(void 0===t[n]||!r&&e.hasOwnProperty&&e.hasOwnProperty(n)&&!t.hasOwnProperty(n))&&(t[n]=e[n]);return!r&&e&&e.hasOwnProperty&&e.hasOwnProperty("toString")&&!t.hasOwnProperty("toString")&&(t.toString=e.toString),t;},getParameterString:function getParameterString(t){var e=[];for(var r in t){var n,i=t[r];null!=i&&"function"!=typeof i&&(n=Array.isArray(i)||"[object Object]"===i.toString()?encodeURIComponent(JSON.stringify(i)):encodeURIComponent(i),e.push(encodeURIComponent(r)+"="+n));}return e.join("&");},urlAppend:function urlAppend(t,e){var r=t;if(e){0===e.indexOf("?")&&(e=e.substring(1));var n=(t+" ").split(/[?&]/);r+=" "===n.pop()?e:n.length?"&"+e:"?"+e;}return r;},urlPathAppend:function urlPathAppend(t,e){var r=t;if(!e)return r;0===e.indexOf("/")&&(e=e.substring(1));var n=t.split("?");return n[0].indexOf("/",n[0].length-1)<0&&(n[0]+="/"),"".concat(n[0]).concat(e).concat(n.length>1?"?".concat(n[1]):"");},DEFAULT_PRECISION:14,toFloat:function toFloat(t,e){return null==e&&(e=mr.DEFAULT_PRECISION),"number"!=typeof t&&(t=parseFloat(t)),0===e?t:parseFloat(t.toPrecision(e));},rad:function rad(t){return t*Math.PI/180;},getParameters:function getParameters(t){t=null==t?window.location.href:t;var e="";if(rr.contains(t,"?")){var r=t.indexOf("?")+1,n=rr.contains(t,"#")?t.indexOf("#"):t.length;e=t.substring(r,n);}for(var i={},o=e.split(/[&;]/),a=0,s=o.length;a<s;++a){var u=o[a].split("=");if(u[0]){var l=u[0];try{l=decodeURIComponent(l);}catch(t){l=unescape(l);}var c=(u[1]||"").replace(/\+/g," ");try{c=decodeURIComponent(c);}catch(t){c=unescape(c);}1==(c=c.split(",")).length&&(c=c[0]),i[l]=c;}}return i;},lastSeqID:0,createUniqueID:function createUniqueID(t){return null==t&&(t="id_"),mr.lastSeqID+=1,t+mr.lastSeqID;},normalizeScale:function normalizeScale(t){return t>1?1/t:t;},getResolutionFromScale:function getResolutionFromScale(t,e){var r;return t&&(null==e&&(e="degrees"),r=1/(mr.normalizeScale(t)*gr[e]*96)),r;},getScaleFromResolution:function getScaleFromResolution(t,e){return null==e&&(e="degrees"),t*gr[e]*96;},getBrowser:function getBrowser(){return dr;},isSupportCanvas:vr,supportCanvas:function supportCanvas(){return mr.isSupportCanvas;},isInTheSameDomain:function isInTheSameDomain(t){return!t||-1===t.indexOf("//")||mr.isSameDomain(t,document.location.toString());},isSameDomain:function isSameDomain(t,e){return new(cr())(t).normalize().origin()===new(cr())(e).normalize().origin();},calculateDpi:function calculateDpi(t,e,r,n,i){if(t&&e&&r){var o,a=t.getWidth(),s=t.getHeight(),u=e.w,l=e.h;if(i=i||6378137,"degree"===(n=n||"degrees").toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()){var c=a/u,h=s/l;o=254/(c>h?c:h)/r/(2*Math.PI*i/360)/1e4;}else o=254/(a/u)/r/1e4;return o;}},toJSON:function toJSON(t){var e=t;if(null==e)return null;switch(e.constructor){case String:return(e=(e=(e=(e=(e=(e='"'+e.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","&lt;")).replace(">","&gt;")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var r="",n=0,i=e.length;n<i;n++)r+=mr.toJSON(e[n]),n!==e.length-1&&(r+=",");return"["+r+"]";case Number:return isFinite(e)?String(e):null;case Boolean:return String(e);case Date:return"{'__type':\"System.DateTime\",'Year':"+e.getFullYear()+",'Month':"+(e.getMonth()+1)+",'Day':"+e.getDate()+",'Hour':"+e.getHours()+",'Minute':"+e.getMinutes()+",'Second':"+e.getSeconds()+",'Millisecond':"+e.getMilliseconds()+",'TimezoneOffset':"+e.getTimezoneOffset()+"}";default:if(null!=e.toJSON&&"function"==typeof e.toJSON)return e.toJSON();if("object"===hr(e)){if(e.length){for(var o=[],a=0,s=e.length;a<s;a++)o.push(mr.toJSON(e[a]));return"["+o.join(",")+"]";}var u=[];for(var l in e)"function"!=typeof e[l]&&"CLASS_NAME"!==l&&"parent"!==l&&u.push("'"+l+"':"+mr.toJSON(e[l]));return u.length>0?"{"+u.join(",")+"}":"{}";}return e.toString();}},getResolutionFromScaleDpi:function getResolutionFromScaleDpi(t,e,r,n){return n=n||6378137,r=r||"",t>0&&e>0?(t=mr.normalizeScale(t),"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/e/t/(2*Math.PI*n/360)/1e4:254/e/t/1e4):-1;},getScaleFromResolutionDpi:function getScaleFromResolutionDpi(t,e,r,n){return n=n||6378137,r=r||"",t>0&&e>0?"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/e/t/(2*Math.PI*n/360)/1e4:254/e/t/1e4:-1;},transformResult:function transformResult(t){return t.responseText&&"string"==typeof t.responseText&&(t=JSON.parse(t.responseText)),t;},copyAttributes:function copyAttributes(t,e){if(t=t||{},e)for(var r in e){var n=e[r];void 0!==n&&"CLASS_NAME"!==r&&"function"!=typeof n&&(t[r]=n);}return t;},copyAttributesWithClip:function copyAttributesWithClip(t,e,r){if(t=t||{},e)for(var n in e){var i=!1;if(r&&r.length)for(var o=0,a=r.length;o<a;o++)if(n===r[o]){i=!0;break;}if(!0!==i){var s=e[n];void 0!==s&&"CLASS_NAME"!==n&&"function"!=typeof s&&(t[n]=s);}}return t;},cloneObject:function cloneObject(t){if(null===t||"object"!==hr(t))return t;if(t instanceof Date){var e=new Date();return e.setTime(t.getTime()),e;}if(t instanceof Array)return t.slice(0);if(t instanceof Object){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=mr.cloneObject(t[n]));return r;}throw new Error("Unable to copy obj! Its type isn't supported.");},lineIntersection:function lineIntersection(t,e,r,n){var i,o,a=null,s=(n.x-r.x)*(t.y-r.y)-(n.y-r.y)*(t.x-r.x),u=(e.x-t.x)*(t.y-r.y)-(e.y-t.y)*(t.x-r.x),l=(n.y-r.y)*(e.x-t.x)-(n.x-r.x)*(e.y-t.y);if(0!=l)o=u/l,a=(i=s/l)>=0&&o<=1&&i<=1&&o>=0?new ur.Point(t.x+i*(e.x-t.x),t.y+i*(e.y-t.y)):"No Intersection";else if(0==s&&0==u){var c=Math.max(t.y,e.y),h=Math.min(t.y,e.y),f=Math.max(t.x,e.x),p=Math.min(t.x,e.x);a=(r.y>=h&&r.y<=c||n.y>=h&&n.y<=c)&&r.x>=p&&r.x<=f||n.x>=p&&n.x<=f?"Coincident":"Parallel";}else a="Parallel";return a;},getTextBounds:function getTextBounds(t,e,r){document.body.appendChild(r),r.style.width="auto",r.style.height="auto",t.fontSize&&(r.style.fontSize=t.fontSize),t.fontFamily&&(r.style.fontFamily=t.fontFamily),t.fontWeight&&(r.style.fontWeight=t.fontWeight),r.style.position="relative",r.style.visibility="hidden",r.style.display="inline-block",r.innerHTML=e;var n=r.clientWidth,i=r.clientHeight;return document.body.removeChild(r),{textWidth:n,textHeight:i};},convertPath:function convertPath(t,e){return e?t.replace(/\{([\w-\.]+)\}/g,function(t,r){var n,i;return n=e.hasOwnProperty(r)?null==(i=e[r])||null==i?"":i instanceof Date?i.toJSON():function(t){if("string"!=typeof t&&"object"!==hr(t))return!1;try{var e=t.toString();return"[object Object]"===e||"[object Array]"===e;}catch(t){return!1;}}(i)?JSON.stringify(i):i.toString():t,encodeURIComponent(n);}):t;}}),gr={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36};gr.in=gr.inches,gr.degrees=gr.dd,gr.nmi=1852*gr.m,mr.extend(gr,{Inch:gr.inches,Meter:39.37,Foot:12,IFoot:11.999976,ClarkeFoot:11.999868327581488,SearsFoot:11.999955194477684,GoldCoastFoot:11.999964589846002,IInch:.9999979999999999,MicroInch:999998e-9,Mil:9.99998e-7,Centimeter:.3937,Kilometer:39370,Yard:36,SearsYard:35.99986558343306,IndianYard:35.99987015540864,IndianYd37:35.999740205100004,IndianYd62:35.999880755999996,IndianYd75:35.999868945,IndianFoot:11.9999567087,IndianFt37:11.9999134017,IndianFt62:11.999960252000001,IndianFt75:11.999956315,Mile:63360,IYard:35.999928,IMile:63359.87328,NautM:72913.24,"Lat-66":4367838.370169282,"Lat-83":4367954.152606599,Decimeter:3.9370000000000003,Millimeter:.03937,Dekameter:393.7,Decameter:393.7,Hectometer:3937,GermanMeter:39.370535294205006,CaGrid:39.359685060000004,ClarkeChain:791.991309620512,GunterChain:792.0000000000001,BenoitChain:791.9977268035781,SearsChain:791.9970428354235,ClarkeLink:7.91991309620512,GunterLink:7.920000000000001,BenoitLink:7.919977268035781,SearsLink:7.919970428354236,Rod:198.00000000000014,IntnlChain:791.998416,IntnlLink:7.91998416,Perch:198.00000000000014,Pole:198.00000000000014,Furlong:7919.999999999997,Rood:148.75036777426,CapeFoot:11.999868185255002,Brealey:14763.75,ModAmFt:12.000458400000001,Fathom:71.999856,"NautM-UK":72959.85408,"50kilometers":1968500,"150kilometers":5905500}),mr.extend(gr,{mm:gr.Meter/1e3,cm:gr.Meter/100,dm:100*gr.Meter,km:1e3*gr.Meter,kmi:gr.nmi,fath:gr.Fathom,ch:gr.IntnlChain,link:gr.IntnlLink,"us-in":gr.inches,"us-ft":gr.Foot,"us-yd":gr.Yard,"us-ch":gr.GunterChain,"us-mi":gr.Mile,"ind-yd":gr.IndianYd37,"ind-ft":gr.IndianFt37,"ind-ch":791.9942845122}),gr.degree=gr.dd,gr.meter=gr.m,gr.foot=gr.ft,gr.inch=gr.inches,gr.mile=gr.mi,gr.kilometer=gr.km,gr.yard=gr.yd;var br=window.fetch,xr={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function addQueryStrings(t){for(var e in t){this.queryKeys.push(e),"string"!=typeof t[e]&&(t[e]=mr.toJSON(t[e]));var r=encodeURIComponent(t[e]);this.queryValues.push(r);}},issue:function issue(t){for(var e=this,r=e.getUid(),n=t.url,i=[],o=n,a=0,s=e.queryKeys?e.queryKeys.length:0,u=0;u<s;u++)if(o.length+e.queryKeys[u].length+2>=e.limitLength){if(0==a)return!1;i.push(o),o=n,a=0,u--;}else if(o.length+e.queryKeys[u].length+2+e.queryValues[u].length>e.limitLength)for(var l=e.queryValues[u];l.length>0;){var c=e.limitLength-o.length-e.queryKeys[u].length-2;o.indexOf("?")>-1?o+="&":o+="?";var h=l.substring(0,c);"%"===h.substring(c-1,c)?(c-=1,h=l.substring(0,c)):"%"===h.substring(c-2,c-1)&&(c-=2,h=l.substring(0,c)),o+=e.queryKeys[u]+"="+h,l=l.substring(c),h.length>0&&(i.push(o),o=n,a=0);}else a++,o.indexOf("?")>-1?o+="&":o+="?",o+=e.queryKeys[u]+"="+e.queryValues[u];return i.push(o),e.send(i,"SuperMapJSONPCallbacks_"+r,t&&t.proxy);},getUid:function getUid(){return 1e3*new Date().getTime()+Math.floor(1e17*Math.random());},send:function send(t,e,r){var n=t.length;if(n>0)return new Promise(function(i){for(var o=new Date().getTime(),a=0;a<n;a++){var s=t[a];s.indexOf("?")>-1?s+="&":s+="?",s+="sectionCount="+n,s+="&sectionIndex="+a,s+="&jsonpUserID="+o,r&&(s=decodeURIComponent(s),s=r+encodeURIComponent(s)),er()(s,{jsonpCallbackFunction:e,timeout:3e4}).then(function(t){i(t.json());});}});},GET:function GET(t){var e=this;return e.queryKeys.length=0,e.queryValues.length=0,e.addQueryStrings(t.params),e.issue(t);},POST:function POST(t){var e=this;return e.queryKeys.length=0,e.queryValues.length=0,e.addQueryStrings({requestEntity:t.data}),e.issue(t);},PUT:function PUT(t){var e=this;return e.queryKeys.length=0,e.queryValues.length=0,e.addQueryStrings({requestEntity:t.data}),e.issue(t);},DELETE:function DELETE(t){var e=this;return e.queryKeys.length=0,e.queryValues.length=0,e.addQueryStrings({requestEntity:t.data}),e.issue(t);}},wr={commit:function commit(t,e,r,n){switch(t=t?t.toUpperCase():t){case"GET":default:return this.get(e,r,n);case"POST":return this.post(e,r,n);case"PUT":return this.put(e,r,n);case"DELETE":return this.delete(e,r,n);}},supportDirectRequest:function supportDirectRequest(t,e){return!!mr.isInTheSameDomain(t)||(null!=e.crossOrigin?e.crossOrigin:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest()||e.proxy);},get:function get(t,e,r){if(r=r||{},t=mr.urlAppend(t,this._getParameterString(e||{})),t=this._processUrl(t,r),!this.supportDirectRequest(t,r)){var n={url:t=t.replace(".json",".jsonp"),data:e};return xr.GET(n);}return this.urlIsLong(t)?this._postSimulatie("GET",t.substring(0,t.indexOf("?")),e,r):this._fetch(t,e,r,"GET");},delete:function _delete(t,e,r){r=r||{};var n="DELETE";if(t=mr.urlAppend(t,this._getParameterString(e||{})),t=this._processUrl(t,r),!this.supportDirectRequest(t,r)){t=t.replace(".json",".jsonp");var i={url:t+="&_method=DELETE",data:e};return xr.DELETE(i);}return this.urlIsLong(t)?this._postSimulatie(n,t.substring(0,t.indexOf("?")),e,r):this._fetch(t,e,r,n);},post:function post(t,e,r){if(r=r||{},t=this._processUrl(t,r),!this.supportDirectRequest(t,r)){t=t.replace(".json",".jsonp");var n={url:mr.urlAppend(t,"_method=POST"),data:e};return xr.POST(n);}return this._fetch(t,e,r,"POST");},put:function put(t,e,r){if(r=r||{},t=this._processUrl(t,r),!this.supportDirectRequest(t,r)){t=t.replace(".json",".jsonp");var n={url:t+="&_method=PUT",data:e};return xr.PUT(n);}return this._fetch(t,e,r,"PUT");},urlIsLong:function urlIsLong(t){for(var e=0,r=null,n=0,i=t.length;n<i;n++)(r=t.charCodeAt(n))<127?e++:128<=r&&r<=2047?e+=2:2048<=r&&r<=65535&&(e+=3);return!(e<2e3);},_postSimulatie:function _postSimulatie(t,e,r,n){var i=e.indexOf("?")>-1?"&":"?";return e+=i+"_method="+t,"string"!=typeof r&&(r=JSON.stringify(r)),this.post(e,r,n);},_processUrl:function _processUrl(t,e){if(this._isMVTRequest(t))return t;if(-1===t.indexOf(".json")&&!e.withoutFormatSuffix)if(t.indexOf("?")<0)t+=".json";else{var r=t.split("?");2===r.length&&(t=r[0]+".json?"+r[1]);}return e&&e.proxy&&("function"==typeof e.proxy?t=e.proxy(t):(t=decodeURIComponent(t),t=e.proxy+encodeURIComponent(t))),t;},_fetch:function _fetch(t,e,r,n){return(r=r||{}).headers=r.headers||{},r.headers["Content-Type"]||FormData.prototype.isPrototypeOf(e)||(r.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),r.timeout?this._timeout(r.timeout,br(t,{method:n,headers:r.headers,body:"PUT"===n||"POST"===n?e:void 0,credentials:this._getWithCredentials(r),mode:"cors",timeout:45e3}).then(function(t){return t;})):br(t,{method:n,body:"PUT"===n||"POST"===n?e:void 0,headers:r.headers,credentials:this._getWithCredentials(r),mode:"cors",timeout:45e3}).then(function(t){return t;});},_getWithCredentials:function _getWithCredentials(t){return!0===t.withCredentials?"include":!1===t.withCredentials?"omit":"same-origin";},_fetchJsonp:function _fetchJsonp(t,e){return e=e||{},er()(t,{method:"GET",timeout:e.timeout}).then(function(t){return t;});},_timeout:function _timeout(t,e){return new Promise(function(r,n){setTimeout(function(){n(new Error("timeout"));},t),e.then(r,n);});},_getParameterString:function _getParameterString(t){var e=[];for(var r in t){var n,i=t[r];null!=i&&"function"!=typeof i&&(n=Array.isArray(i)||"[object Object]"===i.toString()?encodeURIComponent(JSON.stringify(i)):encodeURIComponent(i),e.push(encodeURIComponent(r)+"="+n));}return e.join("&");},_isMVTRequest:function _isMVTRequest(t){return t.indexOf(".mvt")>-1||t.indexOf(".pbf")>-1;}};function Sr(t){return Sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Sr(t);}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,Mr(n.key),n);}}function Mr(t){var e=function(t,e){if("object"!=Sr(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Sr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Sr(e)?e:e+"";}var Or=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.x=e?parseFloat(e):0,this.y=r?parseFloat(r):0,this.mode=n,this.CLASS_NAME="SuperMap.Pixel";}return e=t,r=[{key:"toString",value:function value(){return"x="+this.x+",y="+this.y;}},{key:"clone",value:function value(){return new t(this.x,this.y,this.mode);}},{key:"equals",value:function value(t){var e=!1;return null!=t&&(e=this.x==t.x&&this.y==t.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(t.x)&&isNaN(t.y)),e;}},{key:"distanceTo",value:function value(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2));}},{key:"add",value:function value(e,r){if(null==e||null==r)throw new TypeError("Pixel.add cannot receive null values");return new t(this.x+e,this.y+r);}},{key:"offset",value:function value(t){var e=this.clone();return t&&(e=this.add(t.x,t.y)),e;}},{key:"destroy",value:function value(){this.x=null,this.y=null,this.mode=null;}}],r&&_r(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r;}();Or.Mode={LeftTop:"lefttop",RightTop:"righttop",RightBottom:"rightbottom",LeftBottom:"leftbottom"};var Pr={observers:!1,KEY_SPACE:32,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function element(t){return t.target||t.srcElement;},isSingleTouch:function isSingleTouch(t){return t.touches&&1===t.touches.length;},isMultiTouch:function isMultiTouch(t){return t.touches&&t.touches.length>1;},isLeftClick:function isLeftClick(t){return t.which&&1===t.which||t.button&&1===t.button;},isRightClick:function isRightClick(t){return t.which&&3===t.which||t.button&&2===t.button;},stop:function stop(t,e){e||(t.preventDefault?t.preventDefault():t.returnValue=!1),t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;},findElement:function findElement(t,e){for(var r=Pr.element(t);r.parentNode&&(!r.tagName||r.tagName.toUpperCase()!=e.toUpperCase());)r=r.parentNode;return r;},observe:function observe(t,e,r,n){var i=mr.getElement(t);if(n=n||!1,"keypress"===e&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||i.attachEvent)&&(e="keydown"),this.observers||(this.observers={}),!i._eventCacheID){var o="eventCacheID_";i.id&&(o=i.id+"_"+o),i._eventCacheID=mr.createUniqueID(o);}var a=i._eventCacheID;this.observers[a]||(this.observers[a]=[]),this.observers[a].push({element:i,name:e,observer:r,useCapture:n}),i.addEventListener?"mousewheel"===e?i.addEventListener(e,r,{useCapture:n,passive:!1}):i.addEventListener(e,r,n):i.attachEvent&&i.attachEvent("on"+e,r);},stopObservingElement:function stopObservingElement(t){var e=mr.getElement(t)._eventCacheID;this._removeElementObservers(Pr.observers[e]);},_removeElementObservers:function _removeElementObservers(t){if(t)for(var e=t.length-1;e>=0;e--){var r=t[e],n=new Array(r.element,r.name,r.observer,r.useCapture);Pr.stopObserving.apply(this,n);}},stopObserving:function stopObserving(t,e,r,n){n=n||!1;var i=mr.getElement(t),o=i._eventCacheID;"keypress"===e&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||i.detachEvent)&&(e="keydown");var a=!1,s=Pr.observers[o];if(s)for(var u=0;!a&&u<s.length;){var l=s[u];if(l.name===e&&l.observer===r&&l.useCapture===n){s.splice(u,1),0==s.length&&delete Pr.observers[o],a=!0;break;}u++;}return a&&(i.removeEventListener?i.removeEventListener(e,r,n):i&&i.detachEvent&&i.detachEvent("on"+e,r)),a;},unloadCache:function unloadCache(){if(Pr&&Pr.observers){for(var t in Pr.observers){var e=Pr.observers[t];Pr._removeElementObservers.apply(this,[e]);}Pr.observers=!1;}},CLASS_NAME:"SuperMap.Event"};function kr(t){return kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},kr(t);}function Er(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,Cr(n.key),n);}}function Cr(t){var e=function(t,e){if("object"!=kr(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=kr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==kr(e)?e:e+"";}Pr.observe(window,"resize",Pr.unloadCache,!1);var Tr=function(){function t(e,r,n,i,o){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.BROWSER_EVENTS=["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur","touchstart","touchmove","touchend","keydown","MSPointerDown","MSPointerUp","pointerdown","pointerup","MSGestureStart","MSGestureChange","MSGestureEnd","contextmenu"],this.listeners={},this.object=e,this.element=null,this.eventTypes=[],this.eventHandler=null,this.fallThrough=i,this.includeXY=!1,this.extensions={},this.extensionCount={},this.clearMouseListener=null,mr.extend(this,o),null!=n)for(var a=0,s=n.length;a<s;a++)this.addEventType(n[a]);null!=r&&this.attachToElement(r),this.CLASS_NAME="SuperMap.Events";}return e=t,r=[{key:"destroy",value:function value(){for(var t in this.extensions)"boolean"!=typeof this.extensions[t]&&this.extensions[t].destroy();this.extensions=null,this.element&&(Pr.stopObservingElement(this.element),this.element.hasScrollEvent&&Pr.stopObserving(window,"scroll",this.clearMouseListener)),this.element=null,this.listeners=null,this.object=null,this.eventTypes=null,this.fallThrough=null,this.eventHandler=null;}},{key:"addEventType",value:function value(t){this.listeners[t]||(this.eventTypes.push(t),this.listeners[t]=[]);}},{key:"attachToElement",value:function value(t){var e,r;this.element?Pr.stopObservingElement(this.element):(this.eventHandler=(e=this.handleBrowserEvent,r=this,function(t){return e.call(r,t||window.event);}),this.clearMouseListener=ir(this.clearMouseCache,this)),this.element=t;for(var n=0,i=this.BROWSER_EVENTS.length;n<i;n++){var o=this.BROWSER_EVENTS[n];this.addEventType(o),Pr.observe(t,o,this.eventHandler);}Pr.observe(t,"dragstart",Pr.stop);}},{key:"on",value:function value(t){for(var e in t)"scope"!==e&&t.hasOwnProperty(e)&&this.register(e,t.scope,t[e]);}},{key:"register",value:function value(e,r,n,i){if(e in t&&!this.extensions[e]&&(this.extensions[e]=new t[e](this)),null!=n&&-1!==mr.indexOf(this.eventTypes,e)){null==r&&(r=this.object);var o=this.listeners[e];o||(o=[],this.listeners[e]=o,this.extensionCount[e]=0);var a={obj:r,func:n};i?(o.splice(this.extensionCount[e],0,a),"object"===kr(i)&&i.extension&&this.extensionCount[e]++):o.push(a);}}},{key:"registerPriority",value:function value(t,e,r){this.register(t,e,r,!0);}},{key:"un",value:function value(t){for(var e in t)"scope"!==e&&t.hasOwnProperty(e)&&this.unregister(e,t.scope,t[e]);}},{key:"unregister",value:function value(t,e,r){null==e&&(e=this.object);var n=this.listeners[t];if(null!=n)for(var i=0,o=n.length;i<o;i++)if(n[i].obj===e&&n[i].func===r){n.splice(i,1);break;}}},{key:"remove",value:function value(t){null!=this.listeners[t]&&(this.listeners[t]=[]);}},{key:"triggerEvent",value:function value(t,e){var r=this.listeners[t];if(r&&0!=r.length){var n;null==e&&(e={}),e.object=this.object,e.element=this.element,e.type||(e.type=t);for(var i=0,o=(r=r.slice()).length;i<o;i++){var a=r[i];if(null!=(n=a.func.apply(a.obj,[e]))&&!1===n)break;}return this.fallThrough||Pr.stop(e,!0),n;}}},{key:"handleBrowserEvent",value:function value(t){var e=t.type,r=this.listeners[e];if(r&&0!=r.length){var n=t.touches;if(n&&n[0]){for(var i,o=0,a=0,s=n.length,u=0;u<s;++u)o+=(i=n[u]).clientX,a+=i.clientY;t.clientX=o/s,t.clientY=a/s;}this.includeXY&&(t.xy=this.getMousePosition(t)),this.triggerEvent(e,t);}}},{key:"clearMouseCache",value:function value(){this.element.scrolls=null,this.element.lefttop=null;var t=document.body;t&&(0==t.scrollTop&&0==t.scrollLeft||!navigator.userAgent.match(/iPhone/i))&&(this.element.offsets=null);}},{key:"getMousePosition",value:function value(t){if(this.includeXY?this.element.hasScrollEvent||(Pr.observe(window,"scroll",this.clearMouseListener),this.element.hasScrollEvent=!0):this.clearMouseCache(),!this.element.scrolls){var e=mr.getViewportElement();this.element.scrolls=[e.scrollLeft,e.scrollTop];}return this.element.lefttop||(this.element.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0]),this.element.offsets||(this.element.offsets=mr.pagePosition(this.element)),new Or(t.clientX+this.element.scrolls[0]-this.element.offsets[0]-this.element.lefttop[0],t.clientY+this.element.scrolls[1]-this.element.offsets[1]-this.element.lefttop[1]);}}],r&&Er(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r;}();function Ar(t){return Ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Ar(t);}function Nr(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,jr(n.key),n);}}function jr(t){var e=function(t,e){if("object"!=Ar(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Ar(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Ar(e)?e:e+"";}Tr.prototype.BROWSER_EVENTS=["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur","touchstart","touchmove","touchend","keydown","MSPointerDown","MSPointerUp","pointerdown","pointerup","MSGestureStart","MSGestureChange","MSGestureEnd","contextmenu"];var Ir=function(){return t=function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.value=e||"",this.name=r||"token",this.CLASS_NAME="SuperMap.Credential";},(e=[{key:"getUrlParameters",value:function value(){return this.name+"="+this.value;}},{key:"getValue",value:function value(){return this.value;}},{key:"destroy",value:function value(){this.value=null,this.name=null;}}])&&Nr(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e;}();function Rr(t){return Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Rr(t);}function Lr(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,Fr(n.key),n);}}function Fr(t){var e=function(t,e){if("object"!=Rr(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Rr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Rr(e)?e:e+"";}Ir.CREDENTIAL=null;var Dr=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t);}return e=t,r=[{key:"generateToken",value:function value(t,e){var r=this.servers[t];if(r)return wr.post(r.tokenServiceUrl,JSON.stringify(e.toJSON())).then(function(t){return t.text();});}},{key:"registerServers",value:function value(t){this.servers=this.servers||{},mr.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var r=t[e];this.servers[r.server]=r;}}},{key:"registerToken",value:function value(t,e){if(this.tokens=this.tokens||{},t&&e){var r=this._getTokenStorageKey(t);this.tokens[r]=e;}}},{key:"registerKey",value:function value(t,e){if(this.keys=this.keys||{},t&&!(t.length<1)&&e){t=mr.isArray(t)?t:[t];for(var r=0;r<t.length;r++){var n=this._getUrlRestString(t[0])||t[0];this.keys[n]=e;}}}},{key:"getServerInfo",value:function value(t){return this.servers=this.servers||{},this.servers[t];}},{key:"getToken",value:function value(t){if(t){this.tokens=this.tokens||{};var e=this._getTokenStorageKey(t);return this.tokens[e];}}},{key:"getKey",value:function value(t){this.keys=this.keys||{};var e=this._getUrlRestString(t)||t;return this.keys[e];}},{key:"loginiServer",value:function value(t,e,r,n){t=mr.urlPathAppend(t,"services/security/login");var i={username:e&&e.toString(),password:r&&r.toString(),rememberme:n};return i=JSON.stringify(i),wr.post(t,i,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then(function(t){return t.json();});}},{key:"logoutiServer",value:function value(t){return t=mr.urlPathAppend(t,"services/security/logout"),wr.get(t,"",{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withoutFormatSuffix:!0}).then(function(){return!0;}).catch(function(){return!1;});}},{key:"loginOnline",value:function value(e,r){var n=t.SSO+"/login?service="+e;this._open(n,r);}},{key:"loginiPortal",value:function value(t,e,r){t=mr.urlPathAppend(t,"web/login");var n={username:e&&e.toString(),password:r&&r.toString()};return n=JSON.stringify(n),wr.post(t,n,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withCredentials:!1}).then(function(t){return t.json();});}},{key:"logoutiPortal",value:function value(t){return t=mr.urlPathAppend(t,"services/security/logout"),wr.get(t,"",{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withCredentials:!0,withoutFormatSuffix:!0}).then(function(){return!0;}).catch(function(){return!1;});}},{key:"loginManager",value:function value(t,e){var r=mr.urlPathAppend(t,"/security/tokens"),n=e||{},i={username:n.userName&&n.userName.toString(),password:n.password&&n.password.toString()};i=JSON.stringify(i);var o=this;return wr.post(r,i,{headers:{Accept:"*/*","Content-Type":"application/json; charset=UTF-8"}}).then(function(t){return t.text();}).then(function(t){return o.imanagerToken=t,t;});}},{key:"destroyAllCredentials",value:function value(){this.keys=null,this.tokens=null,this.servers=null;}},{key:"destroyToken",value:function value(t){if(t){var e=this._getTokenStorageKey(t);this.tokens=this.tokens||{},this.tokens[e]&&delete this.tokens[e];}}},{key:"destroyKey",value:function value(t){if(t){this.keys=this.keys||{};var e=this._getUrlRestString(t)||t;this.keys[e]&&delete this.keys[e];}}},{key:"appendCredential",value:function value(t){var e=t,r=this.getToken(t),n=r?new Ir(r,"token"):null;return n||(n=(r=this.getKey(t))?new Ir(r,"key"):null),n&&(e=mr.urlAppend(e,n.getUrlParameters())),e;}},{key:"_open",value:function value(t,e){e=null==e||e;var r=window.screen.availWidth/2-this.INNER_WINDOW_WIDTH/2,n=window.screen.availHeight/2-this.INNER_WINDOW_HEIGHT/2,i="height="+this.INNER_WINDOW_HEIGHT+", width="+this.INNER_WINDOW_WIDTH+",top="+n+", left="+r+",toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no";e?window.open(t,"login"):window.open(t,"login",i);}},{key:"_getTokenStorageKey",value:function value(t){var e=t.match(/(.*?):\/\/([^\/]+)/i);return e?e[0]:t;}},{key:"_getUrlRestString",value:function value(t){if(!t)return t;var e=t.match(/(http|https):\/\/(.*\/rest)/i);return e?e[0]:t;}}],null&&false,r&&Lr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r;}();function Br(t){return Br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Br(t);}function Gr(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,Ur(n.key),n);}}function Ur(t){var e=function(t,e){if("object"!=Br(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Br(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Br(e)?e:e+"";}function Vr(t){return Vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Vr(t);}function qr(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,zr(n.key),n);}}function zr(t){var e=function(t,e){if("object"!=Vr(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Vr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Vr(e)?e:e+"";}function Hr(t,e,r){return e=Wr(e),function(t,e){if(e&&("object"===Vr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,Qr()?Reflect.construct(e,r||[],Wr(t).constructor):e.apply(t,r));}function Qr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(Qr=function Qr(){return!!t;})();}function Wr(t){return Wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},Wr(t);}function Xr(t,e){return Xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},Xr(t,e);}Dr.INNER_WINDOW_WIDTH=600,Dr.INNER_WINDOW_HEIGHT=600,Dr.SSO="https://sso.supermap.com",Dr.ONLINE="https://www.supermapol.com";var Yr=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(r=Hr(this,e,[t])).indent=" ",r.space=" ",r.newline="\n",r.level=0,r.pretty=!1,r.nativeJSON=!(!window.JSON||"function"!=typeof JSON.parse||"function"!=typeof JSON.stringify),r.CLASS_NAME="SuperMap.Format.JSON",r.serialize={object:function object(t){if(null==t)return"null";if(t.constructor===Date)return this.serialize.date.apply(this,[t]);if(t.constructor===Array)return this.serialize.array.apply(this,[t]);var e,r,n,i=["{"];this.level+=1;var o=!1;for(e in t)t.hasOwnProperty(e)&&(r=this.write.apply(this,[e,this.pretty]),n=this.write.apply(this,[t[e],this.pretty]),null!=r&&null!=n&&(o&&i.push(","),i.push(this.writeNewline(),this.writeIndent(),r,":",this.writeSpace(),n),o=!0));return this.level-=1,i.push(this.writeNewline(),this.writeIndent(),"}"),i.join("");},array:function array(t){var e,r=["["];this.level+=1;for(var n=0,i=t.length;n<i;++n)null!=(e=this.write.apply(this,[t[n],this.pretty]))&&(n>0&&r.push(","),r.push(this.writeNewline(),this.writeIndent(),e));return this.level-=1,r.push(this.writeNewline(),this.writeIndent(),"]"),r.join("");},string:function string(t){var e={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return /["\\\x00-\x1f]/.test(t)?'"'+t.replace(/([\x00-\x1f\\"])/g,function(t,r){var n=e[r];return n||(n=r.charCodeAt(),"\\u00"+Math.floor(n/16).toString(16)+(n%16).toString(16));})+'"':'"'+t+'"';},number:function number(t){return isFinite(t)?String(t):"null";},boolean:function boolean(t){return String(t);},date:function date(t){function e(t){return t<10?"0"+t:t;}return'"'+t.getFullYear()+"-"+e(t.getMonth()+1)+"-"+e(t.getDate())+"T"+e(t.getHours())+":"+e(t.getMinutes())+":"+e(t.getSeconds())+'"';}},r;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xr(t,e);}(e,t),r=e,n=[{key:"read",value:function value(t,e){var r;if(this.nativeJSON)try{r=JSON.parse(t,e);}catch(e){return{data:t};}return this.keepData&&(this.data=r),r;}},{key:"write",value:function value(t,e){this.pretty=!!e;var r=null,n=Vr(t);if(this.serialize[n])try{r=!this.pretty&&this.nativeJSON?JSON.stringify(t):this.serialize[n].apply(this,[t]);}catch(t){}return r;}},{key:"writeIndent",value:function value(){var t=[];if(this.pretty)for(var e=0;e<this.level;++e)t.push(this.indent);return t.join("");}},{key:"writeNewline",value:function value(){return this.pretty?this.newline:"";}},{key:"writeSpace",value:function value(){return this.pretty?this.space:"";}}],n&&qr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n;}(function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.data=null,this.keepData=!1,mr.extend(this,e),this.options=e,this.CLASS_NAME="SuperMap.Format";},(e=[{key:"destroy",value:function value(){}},{key:"read",value:function value(t){}},{key:"write",value:function value(t){}}])&&Gr(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e;}()),Jr="GEOJSON",$r="ISERVER",Kr="FGB",Zr="LINE",tn="POINT",en="REGION";function rn(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 nn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?rn(Object(r),!0).forEach(function(e){var n,i,o;n=t,i=e,o=r[e],(i=sn(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o;}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rn(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e));});}return t;}function on(t){return on="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},on(t);}function an(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,sn(n.key),n);}}function sn(t){var e=function(t,e){if("object"!=on(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=on(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==on(e)?e:e+"";}var un=function(){return t=function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t);var n=this;this.EVENT_TYPES=["processCompleted","processFailed"],this.events=null,this.eventListeners=null,this.url=null,this.urls=null,this.proxy=null,this.index=null,this.length=null,this.totalTimes=null,this.POLLING_TIMES=3,this.isInTheSameDomain=null,this.withCredentials=!1,mr.isArray(e)?(n.urls=e,n.length=e.length,n.totalTimes=n.length,1===n.length?n.url=e[0]:(n.index=parseInt(Math.random()*n.length),n.url=e[n.index])):(n.totalTimes=1,n.url=e),mr.isArray(e)&&!n.isServiceSupportPolling()&&(n.url=e[0],n.totalTimes=1),r=r||{},this.crossOrigin=r.crossOrigin,this.headers=r.headers,mr.extend(this,r),n.isInTheSameDomain=mr.isInTheSameDomain(n.url),n.events=new Tr(n,null,n.EVENT_TYPES,!0),n.eventListeners instanceof Object&&n.events.on(n.eventListeners),this.CLASS_NAME="SuperMap.CommonServiceBase";},(e=[{key:"destroy",value:function value(){var t=this;mr.isArray(t.urls)&&(t.urls=null,t.index=null,t.length=null,t.totalTimes=null),t.url=null,t.isInTheSameDomain=null,t.EVENT_TYPES=null,t.events&&(t.events.destroy(),t.events=null),t.eventListeners&&(t.eventListeners=null);}},{key:"request",value:function value(t){var e=t.scope.format;if("string"==typeof t.success&&(t.scope.format=t.success,e=t.success,t.success=null,t.failure=null),e&&!this.supportDataFormat(e))throw new Error("".concat(this.CLASS_NAME," is not surport ").concat(e," format!"));var r=this;return t.url=t.url||r.url,this._returnContent(t)&&!t.url.includes("returnContent=true")&&(t.url=mr.urlAppend(t.url,"returnContent=true")),t.proxy=t.proxy||r.proxy,t.withCredentials=null!=t.withCredentials?t.withCredentials:r.withCredentials,t.crossOrigin=null!=t.crossOrigin?t.crossOrigin:r.crossOrigin,t.headers=t.headers||r.headers,t.isInTheSameDomain=r.isInTheSameDomain,t.withoutFormatSuffix=t.scope.withoutFormatSuffix||!1,t.url=Dr.appendCredential(t.url),r.calculatePollingTimes(),t.scope=r,r.totalTimes>0?(r.totalTimes--,r.ajaxPolling(t)):r._commit(t);}},{key:"ajaxPolling",value:function value(t){var e=this,r=t.url,n=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;return e.index=parseInt(Math.random()*e.length),e.url=e.urls[e.index],r=r.replace(n,n.exec(e.url)[0]),t.url=r,t.isInTheSameDomain=mr.isInTheSameDomain(r),e._commit(t);}},{key:"calculatePollingTimes",value:function value(){var t=this;t.times?t.totalTimes>t.POLLING_TIMES?t.times>t.POLLING_TIMES?t.totalTimes=t.POLLING_TIMES:t.totalTimes=t.times:t.times<t.totalTimes&&(t.totalTimes=t.times):t.totalTimes>t.POLLING_TIMES&&(t.totalTimes=t.POLLING_TIMES),t.totalTimes--;}},{key:"isServiceSupportPolling",value:function value(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME);}},{key:"transformResult",value:function value(t,e){return{result:t=mr.transformResult(t),options:e};}},{key:"transformErrorResult",value:function value(t,e){return{error:(t=mr.transformResult(t)).error||t,options:e};}},{key:"serviceProcessCompleted",value:function value(t,e){t=this.transformResult(t).result,this.events.triggerEvent("processCompleted",{result:t,options:e});}},{key:"serviceProcessFailed",value:function value(t,e){var r=(t=this.transformErrorResult(t).error).error||t;this.events.triggerEvent("processFailed",{error:r,options:e});}},{key:"_returnContent",value:function value(t){return t.scope.format!==Kr&&!!t.scope.returnContent;}},{key:"supportDataFormat",value:function value(t){return this.dataFormat().includes(t);}},{key:"dataFormat",value:function value(){return[Jr,$r];}},{key:"_commit",value:function value(t){var e=this;if("POST"===t.method||"PUT"===t.method||"PATCH"===t.method)if(t.params&&(t.url=mr.urlAppend(t.url,mr.getParameterString(t.params||{}))),"object"!==on(t.data)||t.data instanceof FormData)t.params=t.data;else try{t.params=mr.toJSON(t.data);}catch(t){console.log("不是json对象");}return wr.commit(t.method,t.url,t.params,{headers:t.headers,withoutFormatSuffix:t.withoutFormatSuffix,withCredentials:t.withCredentials,crossOrigin:t.crossOrigin,timeout:t.async?0:null,proxy:t.proxy}).then(function(t){return t.text?t.text():t.json?t.json():t;}).then(function(e){var r=e;return"string"==typeof e&&(r=new Yr().read(e)),(!r||r.error||r.code>=300&&304!==r.code)&&(r=r&&r.error?{error:r.error}:{error:r}),r&&t.scope.format===Kr&&(r.newResourceLocation=r.newResourceLocation.replace(".json","")+".fgb"),r;}).catch(function(t){return{error:t};}).then(function(r){var n={object:e};if(r.error){var i="processFailed";if(e.events&&e.events.listeners[i]&&e.events.listeners[i].length){var o=t.failure&&(t.scope?ir(t.failure,t.scope):t.failure);o?o(r,t):e.serviceProcessFailed(r,t);}else(n=nn(nn({},n),e.transformErrorResult(r,t))).type=i,t.failure&&t.failure(n);}else{var a="processCompleted";if(e.events&&e.events.listeners[a]&&e.events.listeners[a].length){var s=t.success&&(t.scope?ir(t.success,t.scope):t.success);s?s(r,t):e.serviceProcessCompleted(r,t);}else r.succeed=null==r.succeed||r.succeed,(n=nn(nn({},n),e.transformResult(r,t))).type=a,t.success&&t.success(n);}return n;});}}])&&an(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e;}();function ln(t){return ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},ln(t);}function cn(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,hn(n.key),n);}}function hn(t){var e=function(t,e){if("object"!=ln(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=ln(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==ln(e)?e:e+"";}var fn=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),e&&(this.customParams=null,this.prjCoordSys=null,this.expectCount=1e5,this.networkType=Zr,this.queryOption="ATTRIBUTEANDGEOMETRY",this.queryParams=null,this.startRecord=0,this.holdTime=10,this.returnCustomResult=!1,this.returnFeatureWithFieldCaption=!1,mr.extend(this,e),this.CLASS_NAME="SuperMap.QueryParameters");},e=[{key:"destroy",value:function value(){var t=this;if(t.customParams=null,t.expectCount=null,t.networkType=null,t.queryOption=null,t.queryParams){for(var e=0,r=t.queryParams,n=r.length;e<n;e++)r[e].destroy();t.queryParams=null;}t.startRecord=null,t.holdTime=null,t.returnCustomResult=null,t.prjCoordSys=null;}}],e&&cn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e;}();function pn(t){return pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},pn(t);}function yn(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,dn(n.key),n);}}function dn(t){var e=function(t,e){if("object"!=pn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=pn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==pn(e)?e:e+"";}function vn(t){return vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},vn(t);}function mn(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,gn(n.key),n);}}function gn(t){var e=function(t,e){if("object"!=vn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=vn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==vn(e)?e:e+"";}function bn(t,e,r){return e=Sn(e),function(t,e){if(e&&("object"===vn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,xn()?Reflect.construct(e,r||[],Sn(t).constructor):e.apply(t,r));}function xn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(xn=function xn(){return!!t;})();}function wn(){return wn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Sn(t)););return t;}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value;}},wn.apply(this,arguments);}function Sn(t){return Sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},Sn(t);}function _n(t,e){return _n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_n(t,e);}var Mn="Unknown",On="Insert",Pn="Update",kn="Delete",En=function(t){function e(t,r,n){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(i=bn(this,e,[null,null,r])).fid=null,i.geometry=t||null,i.attributes={},r&&(i.attributes=mr.extend(i.attributes,r)),i.bounds=null,i.state=null,i.style=n||null,i.url=null,i.lonlat=null,i.CLASS_NAME="SuperMap.Feature.Vector",e.style={default:{fillColor:"#ee9900",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},select:{fillColor:"blue",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},temporary:{fillColor:"#66cccc",fillOpacity:.2,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"default",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},delete:{display:"none"}},i;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_n(t,e);}(e,t),r=e,(n=[{key:"destroy",value:function value(){this.layer&&(this.layer.removeFeatures(this),this.layer=null),this.geometry=null,wn(Sn(e.prototype),"destroy",this).call(this);}},{key:"clone",value:function value(){return new e(this.geometry?this.geometry.clone():null,this.attributes,this.style);}},{key:"toState",value:function value(t){if(t===Pn)switch(this.state){case Mn:case kn:this.state=t;}else if(t===On)this.state===Mn||(this.state=t);else if(t===kn)switch(this.state){case On:case kn:break;case Mn:case Pn:this.state=t;}else t===Mn&&(this.state=t);}}])&&mn(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n;}(function(){return t=function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.CLASS_NAME="SuperMap.Feature",this.layer=e,this.id=mr.createUniqueID(this.CLASS_NAME+"_"),this.lonlat=r,this.data=null!=n?n:{};},(e=[{key:"destroy",value:function value(){this.id=null,this.lonlat=null,this.data=null;}}])&&yn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e;}());function Cn(t){return Cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Cn(t);}function Tn(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,An(n.key),n);}}function An(t){var e=function(t,e){if("object"!=Cn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Cn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Cn(e)?e:e+"";}var Nn=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.w=e?parseFloat(e):0,this.h=e?parseFloat(r):0,this.CLASS_NAME="SuperMap.Size";}return e=t,(r=[{key:"toString",value:function value(){return"w="+this.w+",h="+this.h;}},{key:"clone",value:function value(){return new t(this.w,this.h);}},{key:"equals",value:function value(t){var e=!1;return null!=t&&(e=this.w===t.w&&this.h===t.h||isNaN(this.w)&&isNaN(this.h)&&isNaN(t.w)&&isNaN(t.h)),e;}},{key:"destroy",value:function value(){this.w=null,this.h=null;}}])&&Tn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r;}();function jn(t){return jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},jn(t);}function In(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,Rn(n.key),n);}}function Rn(t){var e=function(t,e){if("object"!=jn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==jn(e)?e:e+"";}var Ln=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),mr.isArray(e)&&(r=e[1],e=e[0]),this.lon=e?mr.toFloat(e):0,this.lat=r?mr.toFloat(r):0,this.CLASS_NAME="SuperMap.LonLat";}return e=t,n=[{key:"fromString",value:function value(e){var r=e.split(",");return new t(r[0],r[1]);}},{key:"fromArray",value:function value(e){var r=mr.isArray(e);return new t(r&&e[0],r&&e[1]);}}],(r=[{key:"toString",value:function value(){return"lon="+this.lon+",lat="+this.lat;}},{key:"toShortString",value:function value(){return this.lon+","+this.lat;}},{key:"clone",value:function value(){return new t(this.lon,this.lat);}},{key:"add",value:function value(e,r){if(null==e||null==r)throw new TypeError("LonLat.add cannot receive null values");return new t(this.lon+mr.toFloat(e),this.lat+mr.toFloat(r));}},{key:"equals",value:function value(t){var e=!1;return null!=t&&(e=this.lon===t.lon&&this.lat===t.lat||isNaN(this.lon)&&isNaN(this.lat)&&isNaN(t.lon)&&isNaN(t.lat)),e;}},{key:"wrapDateLine",value:function value(t){var e=this.clone();if(t){for(;e.lon<t.left;)e.lon+=t.getWidth();for(;e.lon>t.right;)e.lon-=t.getWidth();}return e;}},{key:"destroy",value:function value(){this.lon=null,this.lat=null;}}])&&In(e.prototype,r),n&&In(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n;}();function Fn(t){return Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Fn(t);}function Dn(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,Bn(n.key),n);}}function Bn(t){var e=function(t,e){if("object"!=Fn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Fn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Fn(e)?e:e+"";}var Gn=function(){function t(e,r,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),mr.isArray(e)&&(i=e[3],n=e[2],r=e[1],e=e[0]),this.left=null!=e?mr.toFloat(e):this.left,this.bottom=null!=r?mr.toFloat(r):this.bottom,this.right=null!=n?mr.toFloat(n):this.right,this.top=null!=i?mr.toFloat(i):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.Bounds";}return e=t,r=[{key:"clone",value:function value(){return new t(this.left,this.bottom,this.right,this.top);}},{key:"equals",value:function value(t){var e=!1;return null!=t&&(e=this.left===t.left&&this.right===t.right&&this.top===t.top&&this.bottom===t.bottom),e;}},{key:"toString",value:function value(){return[this.left,this.bottom,this.right,this.top].join(",");}},{key:"toArray",value:function value(t){return!0===t?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top];}},{key:"toBBOX",value:function value(t,e){null==t&&(t=6);var r=Math.pow(10,t),n=Math.round(this.left*r)/r,i=Math.round(this.bottom*r)/r,o=Math.round(this.right*r)/r,a=Math.round(this.top*r)/r;return!0===e?i+","+n+","+a+","+o:n+","+i+","+o+","+a;}},{key:"getWidth",value:function value(){return this.right-this.left;}},{key:"getHeight",value:function value(){return this.top-this.bottom;}},{key:"getSize",value:function value(){return new Nn(this.getWidth(),this.getHeight());}},{key:"getCenterPixel",value:function value(){return new Or((this.left+this.right)/2,(this.bottom+this.top)/2);}},{key:"getCenterLonLat",value:function value(){return this.centerLonLat||(this.centerLonLat=new Ln((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat;}},{key:"scale",value:function value(e,r){var n,i;return e=e||1,null==r&&(r=this.getCenterLonLat()),"SuperMap.LonLat"===r.CLASS_NAME?(n=r.lon,i=r.lat):(n=r.x,i=r.y),new t((this.left-n)*e+n,(this.bottom-i)*e+i,(this.right-n)*e+n,(this.top-i)*e+i);}},{key:"add",value:function value(e,r){if(null==e||null==r)throw new TypeError("Bounds.add cannot receive null values");return new t(this.left+e,this.bottom+r,this.right+e,this.top+r);}},{key:"extend",value:function value(e){var r=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":r=new t(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":r=new t(e.x,e.y,e.x,e.y);break;case"SuperMap.Bounds":r=e;}r&&(this.centerLonLat=null,(null==this.left||r.left<this.left)&&(this.left=r.left),(null==this.bottom||r.bottom<this.bottom)&&(this.bottom=r.bottom),(null==this.right||r.right>this.right)&&(this.right=r.right),(null==this.top||r.top>this.top)&&(this.top=r.top));}}},{key:"containsLonLat",value:function value(t,e){"boolean"==typeof e&&(e={inclusive:e}),e=e||{};var r=this.contains(t.lon,t.lat,e.inclusive),n=e.worldBounds;if(n&&!r){var i=n.getWidth(),o=(n.left+n.right)/2,a=Math.round((t.lon-o)/i);r=this.containsLonLat({lon:t.lon-a*i,lat:t.lat},{inclusive:e.inclusive});}return r;}},{key:"containsPixel",value:function value(t,e){return this.contains(t.x,t.y,e);}},{key:"contains",value:function value(t,e,r){if(null==r&&(r=!0),null==t||null==e)return!1;return r?t>=this.left&&t<=this.right&&e>=this.bottom&&e<=this.top:t>this.left&&t<this.right&&e>this.bottom&&e<this.top;}},{key:"intersectsBounds",value:function value(t,e){if("boolean"==typeof e&&(e={inclusive:e}),(e=e||{}).worldBounds){var r=this.wrapDateLine(e.worldBounds);t=t.wrapDateLine(e.worldBounds);}else r=this;null==e.inclusive&&(e.inclusive=!0);var n=!1,i=r.left===t.right||r.right===t.left||r.top===t.bottom||r.bottom===t.top;if(e.inclusive||!i){var o=t.bottom>=r.bottom&&t.bottom<=r.top||r.bottom>=t.bottom&&r.bottom<=t.top,a=t.top>=r.bottom&&t.top<=r.top||r.top>t.bottom&&r.top<t.top,s=t.left>=r.left&&t.left<=r.right||r.left>=t.left&&r.left<=t.right,u=t.right>=r.left&&t.right<=r.right||r.right>=t.left&&r.right<=t.right;n=(o||a)&&(s||u);}if(e.worldBounds&&!n){var l=e.worldBounds,c=l.getWidth(),h=!l.containsBounds(r),f=!l.containsBounds(t);h&&!f?(t=t.add(-c,0),n=r.intersectsBounds(t,{inclusive:e.inclusive})):f&&!h&&(r=r.add(-c,0),n=t.intersectsBounds(r,{inclusive:e.inclusive}));}return n;}},{key:"containsBounds",value:function value(t,e,r){null==e&&(e=!1),null==r&&(r=!0);var n=this.contains(t.left,t.bottom,r),i=this.contains(t.right,t.bottom,r),o=this.contains(t.left,t.top,r),a=this.contains(t.right,t.top,r);return e?n||i||o||a:n&&i&&o&&a;}},{key:"determineQuadrant",value:function value(t){var e="",r=this.getCenterLonLat();return(e+=t.lat<r.lat?"b":"t")+(t.lon<r.lon?"l":"r");}},{key:"wrapDateLine",value:function value(t,e){var r=(e=e||{}).leftTolerance||0,n=e.rightTolerance||0,i=this.clone();if(t){for(var o=t.getWidth();i.left<t.left&&i.right-n<=t.left;)i=i.add(o,0);for(;i.left+r>=t.right&&i.right>t.right;)i=i.add(-o,0);var a=i.left+r;a<t.right&&a>t.left&&i.right-n>t.right&&(i=i.add(-o,0));}return i;}},{key:"toServerJSONObject",value:function value(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom};}},{key:"destroy",value:function value(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null;}}],n=[{key:"fromString",value:function value(e,r){var n=e.split(",");return t.fromArray(n,r);}},{key:"fromArray",value:function value(e,r){return!0===r?new t(e[1],e[0],e[3],e[2]):new t(e[0],e[1],e[2],e[3]);}},{key:"fromSize",value:function value(e){return new t(0,e.h,e.w,0);}},{key:"oppositeQuadrant",value:function value(t){var e="";return(e+="t"===t.charAt(0)?"b":"t")+("l"===t.charAt(1)?"r":"l");}}],r&&Dn(e.prototype,r),n&&Dn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n;}();function Un(t){return Un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Un(t);}function Vn(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,qn(n.key),n);}}function qn(t){var e=function(t,e){if("object"!=Un(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Un(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Un(e)?e:e+"";}function zn(t,e,r){return e=Wn(e),function(t,e){if(e&&("object"===Un(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,Hn()?Reflect.construct(e,r||[],Wn(t).constructor):e.apply(t,r));}function Hn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(Hn=function Hn(){return!!t;})();}function Qn(){return Qn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Wn(t)););return t;}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value;}},Qn.apply(this,arguments);}function Wn(t){return Wn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},Wn(t);}function Xn(t,e){return Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},Xn(t,e);}var Yn=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(r=zn(this,e)).components=[],r.componentTypes=null,null!=t&&r.addComponents(t),r.CLASS_NAME="SuperMap.Geometry.Collection",r.geometryType="Collection",r;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xn(t,e);}(e,t),r=e,n=[{key:"destroy",value:function value(){this.components.length=0,this.components=null,Qn(Wn(e.prototype),"destroy",this).call(this);}},{key:"clone",value:function value(){for(var t=new e(),r=0,n=this.components.length;r<n;r++)t.addComponent(this.components[r].clone());return mr.applyDefaults(t,this),t;}},{key:"getComponentsString",value:function value(){for(var t=[],e=0,r=this.components.length;e<r;e++)t.push(this.components[e].toShortString());return t.join(",");}},{key:"calculateBounds",value:function value(){this.bounds=null;var t=new Gn(),e=this.components;if(e)for(var r=0,n=e.length;r<n;r++)t.extend(e[r].getBounds());null!=t.left&&null!=t.bottom&&null!=t.right&&null!=t.top&&this.setBounds(t);}},{key:"addComponents",value:function value(t){mr.isArray(t)||(t=[t]);for(var e=0,r=t.length;e<r;e++)this.addComponent(t[e]);}},{key:"addComponent",value:function value(t,e){var r=!1;if(t&&(null==this.componentTypes||mr.indexOf(this.componentTypes,t.CLASS_NAME)>-1)){if(null!=e&&e<this.components.length){var n=this.components.slice(0,e),i=this.components.slice(e,this.components.length);n.push(t),this.components=n.concat(i);}else this.components.push(t);t.parent=this,this.clearBounds(),r=!0;}return r;}},{key:"removeComponents",value:function value(t){var e=!1;mr.isArray(t)||(t=[t]);for(var r=t.length-1;r>=0;--r)e=this.removeComponent(t[r])||e;return e;}},{key:"removeComponent",value:function value(t){return mr.removeItem(this.components,t),this.clearBounds(),!0;}},{key:"getArea",value:function value(){for(var t=0,e=0,r=this.components.length;e<r;e++)t+=this.components[e].getArea();return t;}},{key:"equals",value:function value(t){var e=!0;if(t&&t.CLASS_NAME&&this.CLASS_NAME===t.CLASS_NAME){if(mr.isArray(t.components)&&t.components.length===this.components.length){for(var r=0,n=this.components.length;r<n;++r)if(!this.components[r].equals(t.components[r])){e=!1;break;}}else e=!1;}else e=!1;return e;}},{key:"getVertices",value:function value(t){for(var e=[],r=0,n=this.components.length;r<n;++r)Array.prototype.push.apply(e,this.components[r].getVertices(t));return e;}}],n&&Vn(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n;}(ur);function Jn(t){return Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Jn(t);}function $n(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,Kn(n.key),n);}}function Kn(t){var e=function(t,e){if("object"!=Jn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Jn(e)?e:e+"";}function Zn(t,e,r){return e=ri(e),function(t,e){if(e&&("object"===Jn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,ti()?Reflect.construct(e,r||[],ri(t).constructor):e.apply(t,r));}function ti(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(ti=function ti(){return!!t;})();}function ei(){return ei="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ri(t)););return t;}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value;}},ei.apply(this,arguments);}function ri(t){return ri=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},ri(t);}function ni(t,e){return ni=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},ni(t,e);}var ii=function(t){function e(t,r,n,i){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(o=Zn(this,e,[t,r,n,i])).x=parseFloat(t),o.y=parseFloat(r),o.tag=i||0==i?parseFloat(i):null,o.type=n||"Point",o.CLASS_NAME="SuperMap.Geometry.Point",o.geometryType="Point",o;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ni(t,e);}(e,t),r=e,n=[{key:"clone",value:function value(t){return null==t&&(t=new e(this.x,this.y)),mr.applyDefaults(t,this),t;}},{key:"calculateBounds",value:function value(){this.bounds=new Gn(this.x,this.y,this.x,this.y);}},{key:"equals",value:function value(t){var e=!1;return null!=t&&(e=this.x===t.x&&this.y===t.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(t.x)&&isNaN(t.y)),e;}},{key:"move",value:function value(t,e){this.x=this.x+t,this.y=this.y+e,this.clearBounds();}},{key:"toShortString",value:function value(){return this.x+", "+this.y;}},{key:"destroy",value:function value(){this.x=null,this.y=null,this.tag=null,ei(ri(e.prototype),"destroy",this).call(this);}},{key:"getVertices",value:function value(){return[this];}}],n&&$n(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n;}(ur);function oi(t){return oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},oi(t);}function ai(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,si(n.key),n);}}function si(t){var e=function(t,e){if("object"!=oi(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=oi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==oi(e)?e:e+"";}function ui(t,e,r){return e=ci(e),function(t,e){if(e&&("object"===oi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,li()?Reflect.construct(e,r||[],ci(t).constructor):e.apply(t,r));}function li(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(li=function li(){return!!t;})();}function ci(t){return ci=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},ci(t);}function hi(t,e){return hi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},hi(t,e);}var fi=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(r=ui(this,e,[t])).componentTypes=["SuperMap.Geometry.Point"],r.CLASS_NAME="SuperMap.Geometry.MultiPoint",r.geometryType="MultiPoint",r;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hi(t,e);}(e,t),r=e,(n=[{key:"addPoint",value:function value(t,e){this.addComponent(t,e);}},{key:"removePoint",value:function value(t){this.removeComponent(t);}}])&&ai(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n;}(Yn);function pi(t){return pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},pi(t);}function yi(t,e,r){return e=vi(e),function(t,e){if(e&&("object"===pi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,di()?Reflect.construct(e,r||[],vi(t).constructor):e.apply(t,r));}function di(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(di=function di(){return!!t;})();}function vi(t){return vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},vi(t);}function mi(t,e){return mi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},mi(t,e);}function gi(t){return gi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},gi(t);}function bi(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,xi(n.key),n);}}function xi(t){var e=function(t,e){if("object"!=gi(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=gi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==gi(e)?e:e+"";}function wi(t,e,r){return e=Mi(e),function(t,e){if(e&&("object"===gi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,Si()?Reflect.construct(e,r||[],Mi(t).constructor):e.apply(t,r));}function Si(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(Si=function Si(){return!!t;})();}function _i(){return _i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Mi(t)););return t;}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value;}},_i.apply(this,arguments);}function Mi(t){return Mi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},Mi(t);}function Oi(t,e){return Oi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},Oi(t,e);}var Pi=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(r=wi(this,e,[t])).CLASS_NAME="SuperMap.Geometry.LineString",r.geometryType="LineString",r;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oi(t,e);}(e,t),r=e,n=[{key:"removeComponent",value:function value(t){var r=this.components&&this.components.length>2;return r&&_i(Mi(e.prototype),"removeComponent",this).apply(this,arguments),r;}},{key:"getSortedSegments",value:function value(){for(var t,e,r=this.components.length-1,n=new Array(r),i=0;i<r;++i)t=this.components[i],e=this.components[i+1],t.x<e.x?n[i]={x1:t.x,y1:t.y,x2:e.x,y2:e.y}:n[i]={x1:e.x,y1:e.y,x2:t.x,y2:t.y};return n.sort(function(t,e){return t.x1-e.x1;});}},{key:"getVertices",value:function value(t){return!0===t?[this.components[0],this.components[this.components.length-1]]:!1===t?this.components.slice(1,this.components.length-1):this.components.slice();}}],i=[{key:"calculateCircle",value:function value(t){if(t.length<3)return t;var e={},r=t[0],n=t[1],i=t[2],o=0,a=0,s=!0,u=0,l=0,c=0,h=[],f=(i.y-r.y)/(i.x-r.x),p=i.y-f*i.x;if(i.x!=r.x&&i.y!=r.y&&n.y==f*n.x+p||i.x==r.x&&n.x==r.x||i.y==r.y&&n.y==r.y||i.x==r.x&&i.y==r.y||i.x==n.x&&i.y==n.y||r.x==n.x&&r.y==n.y)h.push(r),h.push(n),h.push(i);else{var y=(n.x*n.x+n.y*n.y-(r.x*r.x+r.y*r.y))*(2*(i.y-r.y))-(i.x*i.x+i.y*i.y-(r.x*r.x+r.y*r.y))*(2*(n.y-r.y)),d=2*(n.x-r.x)*(i.x*i.x+i.y*i.y-(r.x*r.x+r.y*r.y))-2*(i.x-r.x)*(n.x*n.x+n.y*n.y-(r.x*r.x+r.y*r.y)),v=4*((n.x-r.x)*(i.y-r.y)-(i.x-r.x)*(n.y-r.y));e.x=y/v,e.y=d/v;var m=(2*(o=Math.sqrt((r.x-e.x)*(r.x-e.x)+(r.y-e.y)*(r.y-e.y)))*o-((r.x-i.x)*(r.x-i.x)+(r.y-i.y)*(r.y-i.y)))/(2*o*o);m=(m=m>=1?1:m)<=-1?-1:m,c=180*Math.acos(m)/Math.PI,a=(c=i.x==r.x?e.x>r.x&&n.x>r.x||e.x<r.x&&n.x<r.x?360-c:c:e.y>f*e.x+p&&n.y>f*n.x+p||e.y<f*e.x+p&&n.y<f*n.x+p?360-c:c)/72,i.y!=r.y?i.x==r.x?i.y>r.y?n.x<r.x&&(s=!1):n.x>r.x&&(s=!1):i.x<r.x?n.y<f*n.x+p&&(s=!1):n.y>f*n.x+p&&(s=!1):i.x>r.x?n.y>r.y&&(s=!1):n.y<r.y&&(s=!1);var g=(r.y-e.y)/(r.x-e.x),b=g>=0?180*Math.atan(g)/Math.PI:Math.abs(180*Math.atan(g)/Math.PI)+90,x=Math.abs(e.y);r.y==x&&x==i.y&&r.x<i.x&&(b+=180);var w=r.y-e.y;h.push(r);for(var S=1;S<72;S++){u=a*S,l=b,s?w>=0?g>=0?l+=u:l=180-(l-90)+u:l=g>0?l-180+u:90-l+u:w>=0?g>=0?l-=u:l=180-(l-90)-u:l=g>=0?l-180-u:90-l-u,l=l*Math.PI/180;var _=e.x+o*Math.cos(l),M=e.y+o*Math.sin(l);h.push(new ii(_,M));}h.push(i);}return h;}},{key:"createLineEPS",value:function value(t){var r=[],n=t.length;if(n<2)return t;for(var i=0;i<n;)if("LTypeArc"==t[i].type){var o=e.createLineArc(r,i,n,t);r=o[0],i=o[1];}else r.push(t[i]),i++;return r;}},{key:"createLineArc",value:function value(t,r,n,i){if(0==r){var o=e.addPointEPS(i,r,n,"LTypeArc");Array.prototype.push.apply(t,o[0]),r=o[1]+1;}else if(r==n-1){var a=[i[r-1],i[r]],s=e.calculateCircle(a);Array.prototype.push.apply(t,s),r++;}else{var u=e.addPointEPS(i,r,n,"LTypeArc");t.pop(),Array.prototype.push.apply(t,u[0]),r=u[1]+1;}return[t,r];}},{key:"addPointEPS",value:function value(t,r,n,i){var o,a=[],s=r+1;return 0==r?Array.prototype.push.apply(a,[t[r],t[r+1]]):r==n-1?Array.prototype.push.apply(a,[t[r-1],t[r]]):Array.prototype.push.apply(a,[t[r-1],t[r],t[r+1]]),"LTypeCurve"==i?o=e.calculatePointsFBZN(a):"LTypeArc"==i&&(o=e.calculateCircle(a)),[o,s];}}],n&&bi(r.prototype,n),i&&bi(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i;}(function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(r=yi(this,e,[t])).componentTypes=["SuperMap.Geometry.Point","SuperMap.PointWithMeasure"],r.CLASS_NAME="SuperMap.Geometry.Curve",r.geometryType="Curve",r;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mi(t,e);}(e,t),r=e,Object.defineProperty(r,"prototype",{writable:!1}),r;var r;}(fi));function ki(t){return ki="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},ki(t);}function Ei(t,e,r){return e=Ti(e),function(t,e){if(e&&("object"===ki(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,Ci()?Reflect.construct(e,r||[],Ti(t).constructor):e.apply(t,r));}function Ci(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(Ci=function Ci(){return!!t;})();}function Ti(t){return Ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},Ti(t);}function Ai(t,e){return Ai=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},Ai(t,e);}var Ni=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(r=Ei(this,e,[t])).componentTypes=["SuperMap.Geometry.LineString"],r.CLASS_NAME="SuperMap.Geometry.MultiLineString",r.geometryType="MultiLineString",r;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ai(t,e);}(e,t),r=e,Object.defineProperty(r,"prototype",{writable:!1}),r;var r;}(Yn);function ji(t){return ji="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},ji(t);}function Ii(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,Ri(n.key),n);}}function Ri(t){var e=function(t,e){if("object"!=ji(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=ji(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==ji(e)?e:e+"";}function Li(t,e,r){return e=Bi(e),function(t,e){if(e&&("object"===ji(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,Fi()?Reflect.construct(e,r||[],Bi(t).constructor):e.apply(t,r));}function Fi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(Fi=function Fi(){return!!t;})();}function Di(){return Di="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Bi(t)););return t;}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value;}},Di.apply(this,arguments);}function Bi(t){return Bi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},Bi(t);}function Gi(t,e){return Gi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},Gi(t,e);}var Ui=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(r=Li(this,e,[t])).componentTypes=["SuperMap.Geometry.Point"],r.CLASS_NAME="SuperMap.Geometry.LinearRing",r.geometryType="LinearRing",r;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gi(t,e);}(e,t),r=e,n=[{key:"addComponent",value:function value(t,r){var n=!1,i=this.components.pop();null==r&&t.equals(i)||(n=Di(Bi(e.prototype),"addComponent",this).apply(this,arguments));var o=this.components[0];return Di(Bi(e.prototype),"addComponent",this).apply(this,[o]),n;}},{key:"removeComponent",value:function value(t){var r=this.components&&this.components.length>3;if(r){this.components.pop(),Di(Bi(e.prototype),"removeComponent",this).apply(this,arguments);var n=this.components[0];Di(Bi(e.prototype),"addComponent",this).apply(this,[n]);}return r;}},{key:"getArea",value:function value(){var t=0;if(this.components&&this.components.length>2){for(var e=0,r=0,n=this.components.length;r<n-1;r++){var i=this.components[r],o=this.components[r+1];e+=(i.x+o.x)*(o.y-i.y);}t=-e/2;}return t;}},{key:"getVertices",value:function value(t){return!0===t?[]:this.components.slice(0,this.components.length-1);}}],n&&Ii(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n;}(Pi);function Vi(t){return Vi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Vi(t);}function qi(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,zi(n.key),n);}}function zi(t){var e=function(t,e){if("object"!=Vi(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Vi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Vi(e)?e:e+"";}function Hi(t,e,r){return e=Wi(e),function(t,e){if(e&&("object"===Vi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,Qi()?Reflect.construct(e,r||[],Wi(t).constructor):e.apply(t,r));}function Qi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(Qi=function Qi(){return!!t;})();}function Wi(t){return Wi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},Wi(t);}function Xi(t,e){return Xi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},Xi(t,e);}var Yi=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(r=Hi(this,e,[t])).componentTypes=["SuperMap.Geometry.LinearRing"],r.CLASS_NAME="SuperMap.Geometry.Polygon",r.geometryType="Polygon",r;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xi(t,e);}(e,t),r=e,n=[{key:"getArea",value:function value(){var t=0;if(this.components&&this.components.length>0){t+=Math.abs(this.components[0].getArea());for(var e=1,r=this.components.length;e<r;e++)t-=Math.abs(this.components[e].getArea());}return t;}}],n&&qi(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n;}(Yn);function Ji(t){return Ji="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Ji(t);}function $i(t,e,r){return e=Zi(e),function(t,e){if(e&&("object"===Ji(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,Ki()?Reflect.construct(e,r||[],Zi(t).constructor):e.apply(t,r));}function Ki(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(Ki=function Ki(){return!!t;})();}function Zi(t){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},Zi(t);}function to(t,e){return to=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},to(t,e);}var eo=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(r=$i(this,e,[t])).componentTypes=["SuperMap.Geometry.Polygon"],r.CLASS_NAME="SuperMap.Geometry.MultiPolygon",r.geometryType="MultiPolygon",r;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&to(t,e);}(e,t),r=e,Object.defineProperty(r,"prototype",{writable:!1}),r;var r;}(Yn);function ro(t){return ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},ro(t);}function no(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,io(n.key),n);}}function io(t){var e=function(t,e){if("object"!=ro(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=ro(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==ro(e)?e:e+"";}var oo=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.red=e||0==e?e:255,this.green=r||0,this.blue=n||0,this.CLASS_NAME="SuperMap.ServerColor";}return e=t,n=[{key:"fromJson",value:function value(e){if(e){var r=new t(),n=255;null!==e.red&&(n=Number(e.red)),r.red=n;var i=0;null!==e.green&&(i=Number(e.green)),r.green=i;var o=0;return null!==e.blue&&(o=Number(e.blue)),r.blue=o,r;}}}],(r=[{key:"destroy",value:function value(){var t=this;t.red=null,t.green=null,t.blue=null;}}])&&no(e.prototype,r),n&&no(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n;}();function ao(t){return ao="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},ao(t);}function so(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,uo(n.key),n);}}function uo(t){var e=function(t,e){if("object"!=ao(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=ao(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==ao(e)?e:e+"";}var lo=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.fillBackColor=new oo(255,255,255),this.fillBackOpaque=!1,this.fillForeColor=new oo(255,0,0),this.fillGradientMode=null,this.fillGradientAngle=0,this.fillGradientOffsetRatioX=0,this.fillGradientOffsetRatioY=0,this.fillOpaqueRate=100,this.fillSymbolID=0,this.lineColor=new oo(0,0,0),this.lineSymbolID=0,this.lineWidth=1,this.markerAngle=0,this.markerSize=1,this.markerSymbolID=-1,e&&mr.extend(this,e),this.CLASS_NAME="SuperMap.ServerStyle";}return e=t,n=[{key:"fromJson",value:function value(e){if(e)return new t({fillBackColor:oo.fromJson(e.fillBackColor),fillBackOpaque:e.fillBackOpaque,fillForeColor:oo.fromJson(e.fillForeColor),fillGradientMode:e.fillGradientMode,fillGradientAngle:e.fillGradientAngle,fillGradientOffsetRatioX:e.fillGradientOffsetRatioX,fillGradientOffsetRatioY:e.fillGradientOffsetRatioY,fillOpaqueRate:e.fillOpaqueRate,fillSymbolID:e.fillSymbolID,lineColor:oo.fromJson(e.lineColor),lineSymbolID:e.lineSymbolID,lineWidth:e.lineWidth,markerAngle:e.markerAngle,markerSize:e.markerSize,markerSymbolID:e.markerSymbolID});}}],(r=[{key:"destroy",value:function value(){var t=this;t.fillBackColor&&(t.fillBackColor.destroy(),t.fillBackColor=null),t.fillBackOpaque=null,t.fillForeColor&&(t.fillForeColor.destroy(),t.fillForeColor=null),t.fillGradientMode=null,t.fillGradientAngle=null,t.fillGradientOffsetRatioX=null,t.fillGradientOffsetRatioY=null,t.fillOpaqueRate=null,t.fillSymbolID=null,t.lineColor&&(t.lineColor.destroy(),t.lineColor=null),t.lineSymbolID=null,t.lineWidth=null,t.markerAngle=null,t.markerSize=null,t.markerSymbolID=null;}},{key:"toServerJSONObject",value:function value(){var t={};return mr.copyAttributes(t,this);}}])&&so(e.prototype,r),n&&so(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n;}();function co(t){return co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},co(t);}function ho(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,fo(n.key),n);}}function fo(t){var e=function(t,e){if("object"!=co(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=co(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==co(e)?e:e+"";}function po(t,e,r){return e=vo(e),function(t,e){if(e&&("object"===co(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,yo()?Reflect.construct(e,r||[],vo(t).constructor):e.apply(t,r));}function yo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(yo=function yo(){return!!t;})();}function vo(t){return vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},vo(t);}function mo(t,e){return mo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},mo(t,e);}var go=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(r=po(this,e,[t])).measure=null,t&&mr.extend(r,t),r.CLASS_NAME="SuperMap.PointWithMeasure",r;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mo(t,e);}(e,t),r=e,i=[{key:"fromJson",value:function value(t){if(t)return new e({x:t.x,y:t.y,measure:t.measure});}}],(n=[{key:"equals",value:function value(t){var e=!1;if(null!=t){var r=this.x===t.x&&this.y===t.y&&this.measure===t.measure,n=isNaN(this.x)&&isNaN(this.y)&&isNaN(this.measure),i=isNaN(t.x)&&isNaN(t.y)&&isNaN(t.measure);e=r||n&&i;}return e;}},{key:"toJson",value:function value(){var t="{";return null!=this.measure&&null!=this.measure&&(t+='"measure":'+this.measure+","),t+='"x":'+this.x+",",(t+='"y":'+this.y)+"}";}},{key:"destroy",value:function value(){var t=this;t.measure=null,t.x=null,t.y=null;}}])&&ho(r.prototype,n),i&&ho(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i;}(ii);function bo(t){return bo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},bo(t);}function xo(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,wo(n.key),n);}}function wo(t){var e=function(t,e){if("object"!=bo(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=bo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==bo(e)?e:e+"";}function So(t,e,r){return e=Mo(e),function(t,e){if(e&&("object"===bo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,_o()?Reflect.construct(e,r||[],Mo(t).constructor):e.apply(t,r));}function _o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_o=function _o(){return!!t;})();}function Mo(t){return Mo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},Mo(t);}function Oo(t,e){return Oo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},Oo(t,e);}var Po=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(n=So(this,e,[t,r])).id=null,n.center=null,n.style=null,n.length=null,n.maxM=null,n.minM=null,n.parts=null,n.points=null,n.type=null,n.componentTypes=["SuperMap.Geometry.LinearRing","SuperMap.Geometry.LineString"],r&&mr.extend(n,r),n.CLASS_NAME="SuperMap.Route",n.geometryType="LINEM",n;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oo(t,e);}(e,t),r=e,n=[{key:"toJson",value:function value(){var t="{";if(null!=this.id&&null!=this.id&&(t+='"id":'+this.id+","),null!=this.center&&null!=this.center&&(t+='"center":'+this.center+","),null!=this.style&&null!=this.style&&(t+='"style":'+this.style+","),null!=this.length&&null!=this.length&&(t+='"length":'+this.length+","),null!=this.maxM&&null!=this.maxM&&(t+='"maxM":'+this.maxM+","),null!=this.minM&&null!=this.minM&&(t+='"minM":'+this.minM+","),null!=this.type&&null!=this.type&&(t+='"type":"'+this.type+'",'),null!=this.parts&&null!=this.parts){t+='"parts":['+this.parts[0];for(var e=1;e<this.parts.length;e++)t+=","+this.parts[e];t+="],";}if(null!=this.components&&this.components.length>0){t+='"points":[';for(var r=0,n=this.components.length;r<n;r++)for(var i=0,o=this.components[r].components.length;i<o;i++)t+=this.components[r].components[i].toJson()+",";t=t.replace(/,$/g,""),t+="]";}return(t=t.replace(/,$/g,""))+"}";}},{key:"destroy",value:function value(){var t=this;t.id=null,t.center=null,t.style=null,t.length=null,t.maxM=null,t.minM=null,t.type=null,t.parts=null,t.components.length=0,t.components=null,t.componentTypes=null;}}],i=[{key:"fromJson",value:function value(t){if(t){var r=t.parts||[],n=t.points||[],i=r.length,o=[];if(!(i>0))return null;for(var a=0,s=0,u=[];a<i;a++){for(var l=0;l<r[a];l++)u.push(go.fromJson(n[s+l]));s+=r[a],u[0].equals(u[r[a]-1])?o.push(new Ui(u)):o.push(new Pi(u)),u=[];}return new e(o,{id:t.id,center:t.center,style:t.style,length:t.length,maxM:t.maxM,minM:t.minM,type:t.type,parts:t.parts});}}}],n&&xo(r.prototype,n),i&&xo(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i;}(Yn);function ko(t){return ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},ko(t);}function Eo(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,Co(n.key),n);}}function Co(t){var e=function(t,e){if("object"!=ko(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=ko(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==ko(e)?e:e+"";}var To=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.id=0,this.style=null,this.parts=null,this.points=null,this.type=null,this.prjCoordSys=null,e&&mr.extend(this,e),this.CLASS_NAME="SuperMap.ServerGeometry";}return e=t,r=[{key:"destroy",value:function value(){var t=this;t.id=null,t.style=null,t.parts=null,t.partTopo=null,t.points=null,t.type=null,t.prjCoordSys=null;}},{key:"toGeometry",value:function value(){var t=this;switch(t.type.toUpperCase()){case tn:return t.toGeoPoint();case Zr:return t.toGeoLine();case"LINEM":return t.toGeoLinem();case en:return t.toGeoRegion();case"POINTEPS":return t.toGeoPoint();case"LINEEPS":return t.toGeoLineEPS();case"REGIONEPS":return t.toGeoRegionEPS();case"GEOCOMPOUND":return t.transformGeoCompound();}}},{key:"toGeoPoint",value:function value(){var t=this.parts||[],e=this.points||[],r=t.length;if(r>0){if(1===r)return new ii(e[0].x,e[0].y);for(var n=[],i=0;i<r;i++)n.push(new ii(e[i].x,e[i].y));return new fi(n);}return null;}},{key:"toGeoLine",value:function value(){var t=this.parts||[],e=this.points||[],r=t.length;if(r>0){if(1===r){for(var n=[],i=0;i<t[0];i++)n.push(new ii(e[i].x,e[i].y));return n[0].equals(n[t[0]-1])?new Ui(n):new Pi(n);}for(var o=[],a=0;a<r;a++){for(var s=[],u=0;u<t[a];u++)s.push(new ii(e[u].x,e[u].y));o.push(new Pi(s)),e.splice(0,t[a]);}return new Ni(o);}return null;}},{key:"toGeoLineEPS",value:function value(){var t,e,r,n,i,o=this.parts||[],a=this.points||[],s=o.length;if(s>0){if(1===s){for(t=0,r=[];t<o[0];t++)r.push(new ii(a[t].x,a[t].y,a[t].type));return r[0].equals(r[o[0]-1])?(i=Pi.createLineEPS(r),new Ui(i)):(i=Pi.createLineEPS(r),new Pi(i));}for(t=0,n=[];t<s;t++){for(e=0,r=[];e<o[t];e++)r.push(new ii(a[e].x,a[e].y));i=Pi.createLineEPS(r),n.push(new Pi(i)),a.splice(0,o[t]);}return new Ni(n);}return null;}},{key:"toGeoLinem",value:function value(){return Po.fromJson(this);}},{key:"toGeoRegion",value:function value(){var e=this,r=e.parts||[],n=e.partTopo||[],i=e.points||[],o=r.length;if(o<=0)return null;var a=[],s=[];if(1==o){for(var u=0;u<i.length;u++)s.push(new ii(i[u].x,i[u].y));return a.push(new Yi([new Ui(s)])),new eo(a);}for(var l=[],c=[],h=[],f=[],p=[],y=0,d=0;y<o;y++){for(var v=0;v<r[y];v++)s.push(new ii(i[d+v].x,i[d+v].y));d+=r[y];var m=new Yi([new Ui(s)]);s=[],h.push(m),0===n.length&&f.push(m.getBounds()),p.push(1),c.push(m.getArea());}if(0===n.length){t.bubbleSort(c,h,n,f);for(var g=[],b=1;b<h.length;b++)for(var x=b-1;x>=0;x--)if(g[b]=-1,f[x].containsBounds(f[b])){p[b]=-1*p[x],p[b]<0&&(g[b]=x);break;}for(var w=0;w<h.length;w++)p[w]>0?a.push(h[w]):(a[g[w]].components=a[g[w]].components.concat(h[w].components),a.push(""));}else{a=new Array();for(var S=0;S<h.length;S++)if(n[S]&&-1==n[S]?l=l.concat(h[S].components):(l.length>0&&a.length>0&&(a[a.length-1].components=a[a.length-1].components.concat(l),l=[]),a.push(h[S])),S==o-1){var _=a.length;if(_)a[_-1].components=a[_-1].components.concat(l);else for(var M=0,O=l.length;M<O;M++)a.push(new Yi(l));}}return new eo(a);}},{key:"toGeoRegionEPS",value:function value(){var e=this,r=e.parts||[],n=e.partTopo||[],i=e.points||[],o=r.length;if(o<=0)return null;var a,s=[],u=[];if(1==o){for(var l=0;l<i.length;l++)u.push(new ii(i[l].x,i[l].y));return a=Pi.createLineEPS(u),s.push(new Yi([new Ui(a)])),new eo(s);}for(var c=[],h=[],f=[],p=[],y=[],d=0,v=0;d<o;d++){for(var m=0;m<r[d];m++)u.push(new ii(i[v+m].x,i[v+m].y));v+=r[d],a=Pi.createLineEPS(u);var g=new Yi([new Ui(a)]);u=[],f.push(g),0===n.length&&p.push(g.getBounds()),y.push(1),h.push(g.getArea());}if(0===n.length){t.bubbleSort(h,f,n,p);for(var b=[],x=1;x<f.length;x++)for(var w=x-1;w>=0;w--)if(b[x]=-1,p[w].containsBounds(p[x])){y[x]=-1*y[w],y[x]<0&&(b[x]=w);break;}for(var S=0;S<f.length;S++)y[S]>0?s.push(f[S]):(s[b[S]].components=s[b[S]].components.concat(f[S].components),s.push(""));}else{s=new Array();for(var _=0;_<f.length;_++)if(n[_]&&-1==n[_]?c=c.concat(f[_].components):(c.length>0&&s.length>0&&(s[s.length-1].components=s[s.length-1].components.concat(c),c=[]),s.push(f[_])),_==o-1){var M=s.length;if(M)s[M-1].components=s[M-1].components.concat(c);else for(var O=0,P=c.length;O<P;O++)s.push(new Yi(c));}}return new eo(s);}},{key:"transformGeoCompound",value:function value(){var e=this.geoParts||[],r=e.length;if(r<=0)return null;for(var n=[],i=0;i<r;i++){var o=e[i];n.push(new t(o).toGeometry());}return new Yn(n);}}],n=[{key:"fromJson",value:function value(e){if(e)return new t({id:e.id,style:lo.fromJson(e.style),parts:e.parts,partTopo:e.partTopo,points:e.points,center:e.center,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type});}},{key:"fromGeometry",value:function value(e){if(e){var r=0,n=[],i=[],o=null,a=e.components,s=e.CLASS_NAME,u={epsgCode:e.SRID};if(isNaN(e.id)||(r=e.id),"SuperMap.Geometry.LinearRing"!=s&&"SuperMap.Geometry.LineString"!=s&&(e instanceof fi||e instanceof Ni)){for(var l=a.length,c=0;c<l;c++){var h=a[c].getVertices(),f=h.length;n.push(f);for(var p=0;p<f;p++)i.push(new ii(h[p].x,h[p].y));}o="SuperMap.Geometry.MultiPoint"==s?tn:Zr;}else if(e instanceof eo){for(var y=a.length,d=0;d<y;d++)for(var v=a[d].components,m=v.length,g=0;g<m;g++){var b=v[g].getVertices(),x=b.length+1;n.push(x);for(var w=0;w<x-1;w++)i.push(new ii(b[w].x,b[w].y));i.push(new ii(b[0].x,b[0].y));}o=en;}else if(e instanceof Yi){for(var S=a.length,_=0;_<S;_++){var M=a[_].getVertices(),O=M.length+1;n.push(O);for(var P=0;P<O-1;P++)i.push(new ii(M[P].x,M[P].y));i.push(new ii(M[0].x,M[0].y));}o=en;}else{for(var k=e.getVertices(),E=k.length,C=0;C<E;C++)i.push(new ii(k[C].x,k[C].y));e instanceof Ui&&(i.push(new ii(k[0].x,k[0].y)),E++),n.push(E),o=e instanceof ii?tn:Zr;}return new t({id:r,style:null,parts:n,points:i,type:o,prjCoordSys:u});}}},{key:"IsClockWise",value:function value(t){var e=t.length;if(e<3)return 0;var r=t[0].y*(t[e-1].x-t[1].x);t.push(t[0]);for(var n=1;n<e;n++)r+=t[n].y*(t[n-1].x-t[n+1].x);return .5*r;}},{key:"bubbleSort",value:function value(t,e,r,n){for(var i=0;i<t.length;i++)for(var o=0;o<t.length;o++)if(t[i]>t[o]){var a=t[o];t[o]=t[i],t[i]=a;var s=e[o];if(e[o]=e[i],e[i]=s,r&&r.length>0){var u=r[o];r[o]=r[i],r[i]=u;}if(n&&n.length>0){var l=n[o];n[o]=n[i],n[i]=l;}}}}],r&&Eo(e.prototype,r),n&&Eo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n;}();function Ao(t){return Ao="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Ao(t);}function No(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,jo(n.key),n);}}function jo(t){var e=function(t,e){if("object"!=Ao(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Ao(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Ao(e)?e:e+"";}function Io(t,e,r){return e=Fo(e),function(t,e){if(e&&("object"===Ao(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,Ro()?Reflect.construct(e,r||[],Fo(t).constructor):e.apply(t,r));}function Ro(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(Ro=function Ro(){return!!t;})();}function Lo(){return Lo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Fo(t)););return t;}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value;}},Lo.apply(this,arguments);}function Fo(t){return Fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},Fo(t);}function Do(t,e){return Do=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},Do(t,e);}var Bo=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(r=Io(this,e,[t])).ignoreExtraDims=!0,r.CLASS_NAME="SuperMap.Format.GeoJSON",r.parseCoords={point:function point(t){if(!1===this.ignoreExtraDims&&2!=t.length)throw"Only 2D points are supported: "+t;return new ii(t[0],t[1]);},multipoint:function multipoint(t){for(var e=[],r=null,n=0,i=t.length;n<i;++n){try{r=this.parseCoords.point.apply(this,[t[n]]);}catch(t){throw t;}e.push(r);}return new fi(e);},linestring:function linestring(t){for(var e=[],r=null,n=0,i=t.length;n<i;++n){try{r=this.parseCoords.point.apply(this,[t[n]]);}catch(t){throw t;}e.push(r);}return new Pi(e);},multilinestring:function multilinestring(t){for(var e=[],r=null,n=0,i=t.length;n<i;++n){try{r=this.parseCoords.linestring.apply(this,[t[n]]);}catch(t){throw t;}e.push(r);}return new Ni(e);},polygon:function polygon(t){for(var e,r,n=[],i=0,o=t.length;i<o;++i){try{r=this.parseCoords.linestring.apply(this,[t[i]]);}catch(t){throw t;}e=new Ui(r.components),n.push(e);}return new Yi(n);},multipolygon:function multipolygon(t){for(var e=[],r=null,n=0,i=t.length;n<i;++n){try{r=this.parseCoords.polygon.apply(this,[t[n]]);}catch(t){throw t;}e.push(r);}return new eo(e);},box:function box(t){if(2!=t.length)throw"GeoJSON box coordinates must have 2 elements";return new Yi([new Ui([new ii(t[0][0],t[0][1]),new ii(t[1][0],t[0][1]),new ii(t[1][0],t[1][1]),new ii(t[0][0],t[1][1]),new ii(t[0][0],t[0][1])])]);}},r.extract={feature:function feature(t){var e=this.extract.geometry.apply(this,[t.geometry]),r={type:"Feature",properties:this.createAttributes(t),geometry:e};return t.geometry&&"TEXT"===t.geometry.type&&(r.properties.texts=t.geometry.texts,r.properties.textStyle=t.geometry.textStyle),t.fid&&(r.id=t.fid),t.ID&&(r.id=t.ID),r;},geometry:function geometry(t){if(null==t)return null;!t.parts&&t.points&&(t.parts=[t.points.length]);var e,r=t.hasOwnProperty("geometryType")?t:new To(t).toGeometry()||t,n=r.geometryType||r.type;return"LinearRing"===n&&(n="LineString"),"LINEM"===n&&(n="MultiLineString"),e=this.extract[n.toLowerCase()].apply(this,[r]),"Collection"===(n="TEXT"===n?"Point":n)?{type:"GeometryCollection",geometries:e}:{type:n,coordinates:e};},point:function point(t){var e=[t.x,t.y];for(var r in t)"x"===r||"y"===r||null===t[r]||isNaN(t[r])||e.push(t[r]);return e;},text:function text(t){return[t.points[0].x,t.points[0].y];},multipoint:function multipoint(t){for(var e=[],r=0,n=t.components.length;r<n;++r)e.push(this.extract.point.apply(this,[t.components[r]]));return e;},linestring:function linestring(t){for(var e=[],r=0,n=t.components.length;r<n;++r)e.push(this.extract.point.apply(this,[t.components[r]]));return e;},multilinestring:function multilinestring(t){for(var e=[],r=0,n=t.components.length;r<n;++r)e.push(this.extract.linestring.apply(this,[t.components[r]]));return e;},polygon:function polygon(t){for(var e=[],r=0,n=t.components.length;r<n;++r)e.push(this.extract.linestring.apply(this,[t.components[r]]));return e;},multipolygon:function multipolygon(t){for(var e=[],r=0,n=t.components.length;r<n;++r)e.push(this.extract.polygon.apply(this,[t.components[r]]));return e;},collection:function collection(t){for(var e=t.components.length,r=new Array(e),n=0;n<e;++n)r[n]=this.extract.geometry.apply(this,[t.components[n]]);return r;}},r;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Do(t,e);}(e,t),r=e,n=[{key:"read",value:function value(t,r,n){r=r||"FeatureCollection";var i,o=null;if(i="string"==typeof t?Lo(Fo(e.prototype),"read",this).call(this,t,n):t)if("string"!=typeof i.type);else if(this.isValidType(i,r))switch(r){case"Geometry":try{o=this.parseGeometry(i);}catch(t){}break;case"Feature":try{(o=this.parseFeature(i)).type="Feature";}catch(t){}break;case"FeatureCollection":switch(o=[],i.type){case"Feature":try{o.push(this.parseFeature(i));}catch(t){o=null;}break;case"FeatureCollection":for(var a=0,s=i.features.length;a<s;++a)try{o.push(this.parseFeature(i.features[a]));}catch(t){o=null;}break;default:try{var u=this.parseGeometry(i);o.push(new En(u));}catch(t){o=null;}}}return o;}},{key:"write",value:function value(t,r){return Lo(Fo(e.prototype),"write",this).call(this,this.toGeoJSON(t),r);}},{key:"fromGeoJSON",value:function value(t,e,r){var n=this,i=this.read(t,e,r);return mr.isArray(i)?i.map(function(t){return n._toiSevrerFeature(t);}):this._toiSevrerFeature(i);}},{key:"toGeoJSON",value:function value(t){var e={type:null};if(mr.isArray(t)){e.type="FeatureCollection";var r=t.length;e.features=new Array(r);for(var n=0;n<r;++n){var i=t[n];if(s(i)){var o={};o.geometry=i,e.features[n]=this.extract.feature.apply(this,[o]);}else e.features[n]=this.extract.feature.apply(this,[i]);}}else if(s(t)){var a={};a.geometry=t,e=this.extract.feature.apply(this,[a]);}else e=this.extract.feature.apply(this,[t]);function s(t){return t.hasOwnProperty("parts")&&t.hasOwnProperty("points")||t.hasOwnProperty("geoParts");}return e;}},{key:"isValidType",value:function value(t,e){var r=!1;switch(e){case"Geometry":-1==mr.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],t.type)||(r=!0);break;case"FeatureCollection":r=!0;break;default:t.type==e&&(r=!0);}return r;}},{key:"parseFeature",value:function value(t){var e,r,n,i;n=t.properties?t.properties:{},i=t.geometry&&t.geometry.bbox||t.bbox;try{r=this.parseGeometry(t.geometry);}catch(t){throw t;}return e=new En(r,n),i&&(e.bounds=Gn.fromArray(i)),t.id&&(e.geometry.id=t.id,e.fid=t.id),e;}},{key:"parseGeometry",value:function value(t){if(null==t)return null;var e;if("GeometryCollection"==t.type){if(!mr.isArray(t.geometries))throw"GeometryCollection must have geometries array: "+t;for(var r=t.geometries.length,n=new Array(r),i=0;i<r;++i)n[i]=this.parseGeometry.apply(this,[t.geometries[i]]);e=new Yn(n);}else{if(!mr.isArray(t.coordinates))throw"Geometry must have coordinates array: "+t;if(!this.parseCoords[t.type.toLowerCase()])throw"Unsupported geometry type: "+t.type;try{e=this.parseCoords[t.type.toLowerCase()].apply(this,[t.coordinates]);}catch(t){throw t;}}return e;}},{key:"createCRSObject",value:function value(t){var e=t.layer.projection.toString(),r={};if(e.match(/epsg:/i)){var n=parseInt(e.substring(e.indexOf(":")+1));r=4326==n?{type:"name",properties:{name:"urn:ogc:def:crs:OGC:1.3:CRS84"}}:{type:"name",properties:{name:"EPSG:"+n}};}return r;}},{key:"_toiSevrerFeature",value:function value(t){var e=t.attributes,r=[],n=[];for(var i in e)r.push(i),n.push(e[i]);var o={fieldNames:r,fieldValues:n,geometry:To.fromGeometry(t.geometry)};return o.geometry.id=t.fid,o;}},{key:"createAttributes",value:function value(t){if(!t)return null;var e={};!function(t,e){if(t.hasOwnProperty("fieldNames")&&t.hasOwnProperty("fieldValues")){var r=t.fieldNames,n=t.fieldValues;for(var i in r)e[r[i]]=n[i];}}(t,e);var r=["fieldNames","fieldValues","geometry","stringID","ID"];for(var n in t)r.indexOf(n)>-1||(e[n]=t[n]);return e;}}],n&&No(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n;}(Yr);function Go(t){return Go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Go(t);}function Uo(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,Vo(n.key),n);}}function Vo(t){var e=function(t,e){if("object"!=Go(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Go(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Go(e)?e:e+"";}function qo(t,e,r){return e=Wo(e),zo(t,Ho()?Reflect.construct(e,r||[],Wo(t).constructor):e.apply(t,r));}function zo(t,e){if(e&&("object"===Go(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}function Ho(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(Ho=function Ho(){return!!t;})();}function Qo(){return Qo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Wo(t)););return t;}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value;}},Qo.apply(this,arguments);}function Wo(t){return Wo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},Wo(t);}function Xo(t,e){return Xo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},Xo(t,e);}var Yo=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(n=qo(this,e,[t,r])).returnContent=!1,n.format=Jr,n.returnFeatureWithFieldCaption=!1,r&&mr.extend(n,r),n.CLASS_NAME="SuperMap.QueryService",n.url?(r&&r.format&&(n.format=r.format.toUpperCase()),n.url=mr.urlPathAppend(n.url,"queryResults"),n):zo(n);}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xo(t,e);}(e,t),r=e,n=[{key:"destroy",value:function value(){Qo(Wo(e.prototype),"destroy",this).call(this),this.returnContent=null,this.format=null;}},{key:"processAsync",value:function value(t,e){if(t instanceof fn){var r,n=this,i=null;return n.returnContent=t.returnContent,r=n.getJsonParameters(t),n.returnContent||(i=t.returnCustomResult)&&(n.url=mr.urlAppend(n.url,"returnCustomResult="+i)),n.returnFeatureWithFieldCaption=t.returnFeatureWithFieldCaption,n.request({method:"POST",data:r,scope:n,success:e,failure:e});}}},{key:"transformResult",value:function value(t,e){t=mr.transformResult(t);var r=new Bo();if(t&&t.recordsets)for(var n=0,i=t.recordsets,o=i.length;n<o;n++)i[n].features&&(!0===this.returnFeatureWithFieldCaption&&i[n].features.map(function(t){return t.fieldNames=i[n].fieldCaptions,t;}),this.format===Jr&&(i[n].features=r.toGeoJSON(i[n].features)));return{result:t,options:e};}},{key:"dataFormat",value:function value(){return[Jr,$r,Kr];}},{key:"getQueryParameters",value:function value(t){return new fn({customParams:t.customParams,expectCount:t.expectCount,networkType:t.networkType,queryOption:t.queryOption,queryParams:t.queryParams,startRecord:t.startRecord,prjCoordSys:t.prjCoordSys,holdTime:t.holdTime});}}],n&&Uo(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n;}(un);function Jo(t){return Jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Jo(t);}function $o(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,Ko(n.key),n);}}function Ko(t){var e=function(t,e){if("object"!=Jo(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Jo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Jo(e)?e:e+"";}function Zo(t,e,r){return e=ra(e),function(t,e){if(e&&("object"===Jo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,ta()?Reflect.construct(e,r||[],ra(t).constructor):e.apply(t,r));}function ta(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(ta=function ta(){return!!t;})();}function ea(){return ea="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ra(t)););return t;}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value;}},ea.apply(this,arguments);}function ra(t){return ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},ra(t);}function na(t,e){return na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},na(t,e);}var ia=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(r=Zo(this,e,[t=t||{}])).returnContent=!0,mr.extend(r,t),r.CLASS_NAME="SuperMap.QueryBySQLParameters",r;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&na(t,e);}(e,t),r=e,(n=[{key:"destroy",value:function value(){ea(ra(e.prototype),"destroy",this).call(this),this.returnContent=null;}}])&&$o(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n;}(fn);function oa(t){return oa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},oa(t);}function aa(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,sa(n.key),n);}}function sa(t){var e=function(t,e){if("object"!=oa(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=oa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==oa(e)?e:e+"";}function ua(t,e,r){return e=ha(e),function(t,e){if(e&&("object"===oa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,la()?Reflect.construct(e,r||[],ha(t).constructor):e.apply(t,r));}function la(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(la=function la(){return!!t;})();}function ca(){return ca="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ha(t)););return t;}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value;}},ca.apply(this,arguments);}function ha(t){return ha=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},ha(t);}function fa(t,e){return fa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},fa(t,e);}var pa=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(n=ua(this,e,[t,r])).CLASS_NAME="SuperMap.QueryBySQLService",n;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fa(t,e);}(e,t),r=e,n=[{key:"destroy",value:function value(){ca(ha(e.prototype),"destroy",this).call(this);}},{key:"getJsonParameters",value:function value(t){if(t instanceof ia){var e,r="";return e=this.getQueryParameters(t),r+="'queryMode':'SqlQuery','queryParameters':","{"+(r+=mr.toJSON(e))+"}";}}}],n&&aa(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n;}(Yo);function ya(t){return ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},ya(t);}function da(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,va(n.key),n);}}function va(t){var e=function(t,e){if("object"!=ya(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=ya(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==ya(e)?e:e+"";}var ma=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.attributeFilter=null,this.name=null,this.joinItems=null,this.linkItems=null,this.ids=null,this.orderBy=null,this.groupBy=null,this.fields=null,e&&mr.extend(this,e),this.CLASS_NAME="SuperMap.FilterParameter";},e=[{key:"destroy",value:function value(){var t=this;if(t.attributeFilter=null,t.name=null,t.joinItems){for(var e=0,r=t.joinItems,n=r.length;e<n;e++)r[e].destroy();t.joinItems=null;}if(t.linkItems){for(var i=0,o=t.linkItems,a=o.length;i<a;i++)o[i].destroy();t.linkItems=null;}t.ids=null,t.orderBy=null,t.groupBy=null,t.fields=null;}}],e&&da(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e;}();function ga(t){return ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},ga(t);}function ba(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,xa(n.key),n);}}function xa(t){var e=function(t,e){if("object"!=ga(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=ga(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==ga(e)?e:e+"";}var wa=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.datasetNames=null,this.targetEpsgCode=null,this.targetPrj=null,this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.returnFeaturesOnly=!1,this.maxFeatures=null,this.hasGeometry=!0,this.aggregations=null,mr.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesParametersBase";},(e=[{key:"destroy",value:function value(){var t=this;t.datasetNames=null,t.returnContent=null,t.fromIndex=null,t.toIndex=null,t.hasGeometry=null,t.maxFeatures=null,t.targetEpsgCode=null,t.targetPrj=null,t.aggregation&&(t.aggregation=null);}}])&&ba(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e;}();function Sa(t){return Sa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Sa(t);}function _a(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,Ma(n.key),n);}}function Ma(t){var e=function(t,e){if("object"!=Sa(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Sa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Sa(e)?e:e+"";}function Oa(t,e,r){return e=Ea(e),function(t,e){if(e&&("object"===Sa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,Pa()?Reflect.construct(e,r||[],Ea(t).constructor):e.apply(t,r));}function Pa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(Pa=function Pa(){return!!t;})();}function ka(){return ka="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ea(t)););return t;}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value;}},ka.apply(this,arguments);}function Ea(t){return Ea=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},Ea(t);}function Ca(t,e){return Ca=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},Ca(t,e);}var Ta=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(r=Oa(this,e,[t])).getFeatureMode=e.getFeatureMode.BOUNDS,r.bounds=null,r.fields=null,r.attributeFilter=null,r.spatialQueryMode="CONTAIN",mr.extend(r,t),r.CLASS_NAME="SuperMap.GetFeaturesByBoundsParameters",r;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ca(t,e);}(e,t),r=e,i=[{key:"toJsonParameters",value:function value(t){var r,n,i;return n={leftBottom:{x:t.bounds.left,y:t.bounds.bottom},rightTop:{x:t.bounds.right,y:t.bounds.top}},i={datasetNames:t.datasetNames,getFeatureMode:e.getFeatureMode.BOUNDS,bounds:n,spatialQueryMode:t.spatialQueryMode},t.fields&&((r=new ma()).name=t.datasetNames,r.fields=t.fields,i.queryParameter=r),t.attributeFilter&&(i.attributeFilter=t.attributeFilter,i.getFeatureMode=e.getFeatureMode.BOUNDS_ATTRIBUTEFILTER),t.maxFeatures&&!isNaN(t.maxFeatures)&&(i.maxFeatures=t.maxFeatures),"boolean"==typeof t.hasGeometry&&(i.hasGeometry=t.hasGeometry),t.targetEpsgCode&&(i.targetEpsgCode=t.targetEpsgCode),!t.targetEpsgCode&&t.targetPrj&&(i.targetPrj=t.targetPrj),t.aggregations&&(i.aggregations=t.aggregations),mr.toJSON(i);}}],(n=[{key:"destroy",value:function value(){ka(Ea(e.prototype),"destroy",this).call(this);var t=this;if(t.bounds&&(t.bounds.destroy(),t.bounds=null),t.fields){for(;t.fields.length>0;)t.fields.pop();t.fields=null;}t.attributeFilter=null,t.spatialQueryMode=null,t.getFeatureMode=null;}}])&&_a(r.prototype,n),i&&_a(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i;}(wa);function Aa(t){return Aa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Aa(t);}function Na(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,ja(n.key),n);}}function ja(t){var e=function(t,e){if("object"!=Aa(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Aa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Aa(e)?e:e+"";}function Ia(t,e,r){return e=Fa(e),function(t,e){if(e&&("object"===Aa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,Ra()?Reflect.construct(e,r||[],Fa(t).constructor):e.apply(t,r));}function Ra(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(Ra=function Ra(){return!!t;})();}function La(){return La="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Fa(t)););return t;}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value;}},La.apply(this,arguments);}function Fa(t){return Fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},Fa(t);}function Da(t,e){return Da=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},Da(t,e);}Ta.getFeatureMode={BOUNDS:"BOUNDS",BOUNDS_ATTRIBUTEFILTER:"BOUNDS_ATTRIBUTEFILTER"};var Ba=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),n=Ia(this,e,[t,r]),r=r||{},n.returnContent=!0,n.returnFeaturesOnly=!1,n.fromIndex=0,n.toIndex=19,n.hasGeometry=!0,n.maxFeatures=null,n.format=Jr,mr.extend(n,r),n.url=mr.urlPathAppend(n.url,"featureResults"),n.CLASS_NAME="SuperMap.GetFeaturesServiceBase",n;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Da(t,e);}(e,t),r=e,n=[{key:"destroy",value:function value(){La(Fa(e.prototype),"destroy",this).call(this);var t=this;t.returnContent=null,t.fromIndex=null,t.toIndex=null,t.maxFeatures=null,t.format=null,t.hasGeometry=null;}},{key:"processAsync",value:function value(t,e){if(t){var r,n=this,i=!0;return n.returnContent=t.returnContent,n.returnFeaturesOnly=t.returnFeaturesOnly,n.fromIndex=t.fromIndex,n.toIndex=t.toIndex,n.maxFeatures=t.maxFeatures,n.hasGeometry=t.hasGeometry,n.returnContent&&(i=!1),null!=n.fromIndex&&null!=n.toIndex&&!isNaN(n.fromIndex)&&!isNaN(n.toIndex)&&n.fromIndex>=0&&n.toIndex>=0&&!i&&(n.url=mr.urlAppend(n.url,"fromIndex=".concat(n.fromIndex,"&toIndex=").concat(n.toIndex))),n.returnContent&&(t.returnCountOnly||t.returnDatasetInfoOnly||t.returnFeaturesOnly||console.warn("recommend set returnFeaturesOnly config to true to imporve performance. if need get Total amount and Dataset information. FeatureService provide getFeaturesCount and getFeaturesDatasetInfo method"),t.returnCountOnly&&(n.url=mr.urlAppend(n.url,"returnCountOnly="+t.returnCountOnly)),t.returnDatasetInfoOnly&&(n.url=mr.urlAppend(n.url,"returnDatasetInfoOnly="+t.returnDatasetInfoOnly)),t.returnFeaturesOnly&&(n.url=mr.urlAppend(n.url,"returnFeaturesOnly="+t.returnFeaturesOnly))),r=n.getJsonParameters(t),n.request({method:"POST",data:r,scope:n,success:e,failure:e});}}},{key:"transformResult",value:function value(t,e){t=mr.transformResult(t);var r=new Bo();return this.format===Jr&&t.features&&(t.features=r.toGeoJSON(t.features)),this.returnFeaturesOnly&&Array.isArray(t)&&(t={succeed:t.succeed,features:r.toGeoJSON(t)}),{result:t,options:e};}},{key:"dataFormat",value:function value(){return[Jr,$r,Kr];}}],n&&Na(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n;}(un);function Ga(t){return Ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Ga(t);}function Ua(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,Va(n.key),n);}}function Va(t){var e=function(t,e){if("object"!=Ga(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Ga(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Ga(e)?e:e+"";}function qa(t,e,r){return e=Qa(e),function(t,e){if(e&&("object"===Ga(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,za()?Reflect.construct(e,r||[],Qa(t).constructor):e.apply(t,r));}function za(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(za=function za(){return!!t;})();}function Ha(){return Ha="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Qa(t)););return t;}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value;}},Ha.apply(this,arguments);}function Qa(t){return Qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},Qa(t);}function Wa(t,e){return Wa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},Wa(t,e);}var Xa=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(r=qa(this,e,[t])).getFeatureMode="SQL",r.queryParameter=null,mr.extend(r,t),r.CLASS_NAME="SuperMap.GetFeaturesBySQLParameters",r;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wa(t,e);}(e,t),r=e,i=[{key:"toJsonParameters",value:function value(t){var e={datasetNames:t.datasetNames,getFeatureMode:"SQL",queryParameter:t.queryParameter};return t.maxFeatures&&!isNaN(t.maxFeatures)&&(e.maxFeatures=t.maxFeatures),"boolean"==typeof t.hasGeometry&&(e.hasGeometry=t.hasGeometry),t.aggregations&&(e.aggregations=t.aggregations),t.targetEpsgCode&&(e.targetEpsgCode=t.targetEpsgCode),!t.targetEpsgCode&&t.targetPrj&&(e.targetPrj=t.targetPrj),t.aggregations&&(e.aggregations=t.aggregations),mr.toJSON(e);}}],(n=[{key:"destroy",value:function value(){Ha(Qa(e.prototype),"destroy",this).call(this);var t=this;t.getFeatureMode=null,t.queryParameter&&(t.queryParameter.destroy(),t.queryParameter=null);}}])&&Ua(r.prototype,n),i&&Ua(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i;}(wa);function Ya(t){return Ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Ya(t);}function Ja(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,$a(n.key),n);}}function $a(t){var e=function(t,e){if("object"!=Ya(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Ya(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Ya(e)?e:e+"";}function Ka(t,e,r){return e=es(e),function(t,e){if(e&&("object"===Ya(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,Za()?Reflect.construct(e,r||[],es(t).constructor):e.apply(t,r));}function Za(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(Za=function Za(){return!!t;})();}function ts(){return ts="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=es(t)););return t;}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value;}},ts.apply(this,arguments);}function es(t){return es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},es(t);}function rs(t,e){return rs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},rs(t,e);}var ns=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,e),(n=Ka(this,e,[t,r])).CLASS_NAME="SuperMap.GetFeaturesBySQLService",n;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rs(t,e);}(e,t),r=e,n=[{key:"destroy",value:function value(){ts(es(e.prototype),"destroy",this).call(this);}},{key:"getJsonParameters",value:function value(t){return Xa.toJsonParameters(t);}}],n&&Ja(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n;}(Ba);function is(t){return is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},is(t);}function os(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,as(n.key),n);}}function as(t){var e=function(t,e){if("object"!=is(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=is(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==is(e)?e:e+"";}function ss(t){return ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},ss(t);}function us(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,ls(n.key),n);}}function ls(t){var e=function(t,e){if("object"!=ss(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=ss(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==ss(e)?e:e+"";}(function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.field=void 0,this.direction=t.Direction.ASC,this.CLASS_NAME="SuperMap.Sortby",mr.extend(this,e);}return e=t,n=[{key:"constructFromObject",value:function value(e,r){return e&&(r=r||new t(),e.hasOwnProperty("field")&&(r.field=e.field),e.hasOwnProperty("direction")&&(r.direction=e.direction)),r;}}],(r=[{key:"destroy",value:function value(){this.field=void 0,this.direction="ASC";}}])&&os(e.prototype,r),n&&os(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n;})().Direction={ASC:"ASC",DESC:"DESC"};var cs=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.stretchType=void 0,this.stdevCoefficient=void 0,this.gaussianCoefficient=void 0,this.useMedianValue=void 0,this.minPercent=void 0,this.maxPercent=void 0,this.CLASS_NAME="SuperMap.ImageStretchOption",mr.extend(this,e);}return e=t,n=[{key:"constructFromObject",value:function value(e,r){return e&&(r=r||new t(),e.hasOwnProperty("stretchType")&&(r.stretchType=e.stretchType),e.hasOwnProperty("stdevCoefficient")&&(r.stdevCoefficient=e.stdevCoefficient),e.hasOwnProperty("gaussianCoefficient")&&(r.gaussianCoefficient=e.gaussianCoefficient),e.hasOwnProperty("useMedianValue")&&(r.useMedianValue=e.useMedianValue),e.hasOwnProperty("minPercent")&&(r.minPercent=e.minPercent),e.hasOwnProperty("maxPercent")&&(r.maxPercent=e.maxPercent)),r;}}],(r=[{key:"destroy",value:function value(){var t=this;t.stretchType=void 0,t.stdevCoefficient=void 0,t.gaussianCoefficient=void 0,t.useMedianValue=void 0,t.minPercent=void 0,t.maxPercent=void 0;}}])&&us(e.prototype,r),n&&us(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n;}();function hs(t){return hs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},hs(t);}function fs(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,ps(n.key),n);}}function ps(t){var e=function(t,e){if("object"!=hs(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=hs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==hs(e)?e:e+"";}cs.StretchType={NONE:"NONE",GAUSSIAN:"GAUSSIAN",PERCENTCLIP:"PERCENTCLIP",MINIMUMMAXIMUM:"MINIMUMMAXIMUM",STANDARDDEVIATION:"STANDARDDEVIATION"};var ys=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.displayMode=void 0,this.displayBands=void 0,this.stretchOption=void 0,this.interpolationMode=void 0,this.colorScheme=void 0,this.colorTable=void 0,this.brightness=void 0,this.contrast=void 0,this.noData=void 0,this.noDataColor=void 0,this.noDataTransparent=void 0,this.backgroundValue=void 0,this.backgroundColor=void 0,this.backgroundTransparent=void 0,this.gridFunctions=void 0,this.gamma=void 0,this.CLASS_NAME="SuperMap.ImageRenderingRule",mr.extend(this,e);}return e=t,n=[{key:"constructFromObject",value:function value(e,r){return e&&(r=r||new t(),e.hasOwnProperty("displayMode")&&(r.displayMode=e.displayMode),e.hasOwnProperty("displayBands")&&(r.displayBands=e.displayBands),e.hasOwnProperty("stretchOption")&&(r.stretchOption=cs.constructFromObject&&cs.constructFromObject(e.stretchOption,{})||e.stretchOption),e.hasOwnProperty("interpolationMode")&&(r.interpolationMode=e.interpolationMode),e.hasOwnProperty("colorScheme")&&(r.colorScheme=e.colorScheme),e.hasOwnProperty("colorTable")&&(r.colorTable=e.colorTable),e.hasOwnProperty("brightness")&&(r.brightness=e.brightness),e.hasOwnProperty("gamma")&&(r.gamma=e.gamma),e.hasOwnProperty("contrast")&&(r.contrast=e.contrast),e.hasOwnProperty("noData")&&(r.noData=e.noData),e.hasOwnProperty("noDataColor")&&(r.noDataColor=e.noDataColor),e.hasOwnProperty("backgroundValue")&&(r.backgroundValue=e.backgroundValue),e.hasOwnProperty("noDataTransparent")&&(r.noDataTransparent=e.noDataTransparent),e.hasOwnProperty("backgroundColor")&&(r.backgroundColor=e.backgroundColor),e.hasOwnProperty("backgroundTransparent")&&(r.backgroundTransparent=e.backgroundTransparent),e.hasOwnProperty("gridFunctions")&&(r.gridFunctions=e.gridFunctions)),r;}}],(r=[{key:"destroy",value:function value(){var t=this;t.displayMode=void 0,t.displayBands=void 0,t.stretchOption=void 0,t.interpolationMode=void 0,t.colorScheme=void 0,t.colorTable=void 0,t.brightness=void 0,t.contrast=void 0,t.noData=void 0,t.noDataColor=void 0,t.noDataTransparent=void 0,t.backgroundValue=void 0,t.backgroundColor=void 0,t.backgroundTransparent=void 0,t.gridFuncOptions=void 0,t.gamma=void 0;}}])&&fs(e.prototype,r),n&&fs(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n;}();ys.DisplayMode={COMPOSITE:"COMPOSITE",STRETCHED:"Stretched"},ys.InterpolationMode={NEARESTNEIGHBOR:"NEARESTNEIGHBOR",HIGHQUALITYBILINEAR:"HIGHQUALITYBILINEAR",DEFAULT:"DEFAULT"};!function(){try{return"undefined"==typeof Uint8Array||void 0===Uint8Array.prototype.subarray?"slice":"undefined"!=typeof Buffer?void 0===Buffer.prototype.subarray?"slice":("function"==typeof Buffer.from?Buffer.from([72,62]):new Buffer([72,62]))instanceof Uint8Array?"subarray":"slice":"subarray";}catch(t){return"slice";}}(),"undefined"!=typeof FileReader&&FileReader.prototype&&FileReader.prototype.readAsBinaryString,"undefined"!=typeof FileReader&&FileReader.prototype&&FileReader.prototype.readAsArrayBuffer,"undefined"!=typeof FileReader&&FileReader.prototype&&FileReader.prototype.readAsText;var ds=function ds(t){var e=t.toLowerCase();return"y"===e||"smy"===e||"wd"===e||"纬度"===e||"北纬"===e||"latitude"===e||"lat"===e||"y坐标"===e;};var vs=JSON.parse('[{"name":"克拉玛依市","coord":[85.01486759299489,45.406422237230046]},{"name":"昌吉回族自治州","coord":[88.7154624754753,44.26991024636568]},{"name":"石河子市","coord":[86.0208600035924,44.239045558096805]},{"name":"霍林郭勒市","coord":[114.73479243733115,44.16058374713977]},{"name":"本溪市","coord":[124.64357865201586,41.177197783134275]},{"name":"嘉峪关市","coord":[98.16891560537093,39.76279786284264]},{"name":"莱芜市","coord":[117.65723565456207,36.27916499211527]},{"name":"神农架林区","coord":[110.48296222218153,31.581260143666697]},{"name":"天门市","coord":[113.00615321481195,30.64105781887143]},{"name":"鄂州市","coord":[114.94764081970385,30.325634953844585]},{"name":"潜江市","coord":[112.70703817700621,30.349210666019893]},{"name":"仙桃市","coord":[113.34688900729822,30.315951161935402]},{"name":"萍乡市","coord":[113.88072263074415,27.47193090553213]},{"name":"台湾省","coord":[120.14338943402045,23.596002465926095]},{"name":"东莞市","coord":[113.89443658529342,22.897826158636448]},{"name":"中山市","coord":[113.37118387764659,22.501478858616522]},{"name":"珠海市","coord":[113.21799258934986,22.23782602992192]},{"name":"北海市","coord":[109.18248083043899,21.695773689750148]},{"name":"香港","coord":[114.20689279508653,22.36016760139811]},{"name":"舟山市","coord":[122.22514712841459,30.338633120695956]},{"name":"克孜勒苏柯尔克孜","coord":[74.62910472637343,39.59886016069875]},{"name":"喀什地区","coord":[77.19899922143753,37.85462871211595]},{"name":"阿克苏地区","coord":[81.43930290016381,41.067304799230456]},{"name":"和田地区","coord":[80.69780509160952,36.95287032287055]},{"name":"阿里地区","coord":[82.536487505389,32.69566569631762]},{"name":"日喀则地区","coord":[86.5996831353606,29.54861754814263]},{"name":"那曲地区","coord":[88.32523292667608,33.20600450932715]},{"name":"玉树藏族自治州","coord":[95.2107128446203,33.90320387919257]},{"name":"迪庆藏族自治州","coord":[99.42465312188943,28.052797714348895]},{"name":"怒江傈傈族自治州","coord":[98.85737910439825,26.98345757528851]},{"name":"大理白族自治州","coord":[99.93934374816013,25.684737357453045]},{"name":"德宏傣族景颇族自","coord":[98.13830877778075,24.593421919561205]},{"name":"保山市","coord":[99.19031013453166,24.979380341662]},{"name":"临沧市","coord":[99.62483778975081,24.058807858948214]},{"name":"普洱市","coord":[100.94440267992684,23.44121660743221]},{"name":"西双版纳傣族自治","coord":[100.86105801845994,21.882475641324206]},{"name":"拉萨市","coord":[91.3684790613129,30.14176592960237]},{"name":"山南地区","coord":[92.11665242621062,28.33000201578789]},{"name":"林芝地区","coord":[94.9307847458166,29.125110156601963]},{"name":"昌都地区","coord":[97.33912235873476,30.48520825551814]},{"name":"丽江市","coord":[100.65713436205135,26.96190318191959]},{"name":"攀枝花市","coord":[101.73355913301131,26.714486678752795]},{"name":"凉山彝族自治州","coord":[102.08678551422615,27.683020519860396]},{"name":"楚雄彝族自治州","coord":[101.68264761198458,25.369603845264024]},{"name":"红河哈尼族彝族自","coord":[102.95101719613119,23.624860095239875]},{"name":"文山壮族苗族自治","coord":[104.8708359910614,23.579587266862504]},{"name":"百色市","coord":[106.69546907589859,23.98220841166522]},{"name":"崇左市","coord":[107.3277087317123,22.49769755349952]},{"name":"防城港市","coord":[107.88939931155171,21.94550204069006]},{"name":"南宁市","coord":[108.67078983716917,23.12207641861882]},{"name":"钦州市","coord":[108.8532307305186,22.157690108421384]},{"name":"玉林市","coord":[110.26918466489103,22.391823643610415]},{"name":"湛江市","coord":[109.93033457863683,21.086751055633457]},{"name":"茂名市","coord":[110.80336192333934,22.069184739040775]},{"name":"阳江市","coord":[111.70471342186183,22.108751366417575]},{"name":"江门市","coord":[112.53715618649149,22.297368082806777]},{"name":"广州市","coord":[113.4949302208309,23.28359314707863]},{"name":"清远市","coord":[113.10957368131268,24.334444053233856]},{"name":"肇庆市","coord":[112.11117530204233,23.60241158796112]},{"name":"梧州市","coord":[111.01709510772797,23.518132876753846]},{"name":"贺州市","coord":[111.50423061842756,24.4095096817199]},{"name":"桂林市","coord":[110.44046163393094,25.353966673735407]},{"name":"柳州市","coord":[109.34854449214147,24.972408051485047]},{"name":"河池市","coord":[107.81191841865586,24.649291651298164]},{"name":"黔东南苗族侗族自","coord":[108.39952601614591,26.429286420465576]},{"name":"贵阳市","coord":[106.59784062851153,26.797907456479816]},{"name":"安顺市","coord":[105.76161265300635,25.988644902171018]},{"name":"黔西南布依族苗族","coord":[105.5954078788574,25.404850939549405]},{"name":"曲靖市","coord":[103.9164335632742,25.697243690315265]},{"name":"六盘水市","coord":[104.77723228072432,26.15402255629164]},{"name":"毕节地区","coord":[105.03867422931839,27.077913968069666]},{"name":"昭通市","coord":[104.29730513046874,27.62418247971078]},{"name":"宜宾市","coord":[104.76748901448207,28.553501804266475]},{"name":"乐山市","coord":[103.56027669102787,29.160754519210577]},{"name":"自贡市","coord":[104.63272827056402,29.273152614922402]},{"name":"内江市","coord":[104.82644562304716,29.61272653799929]},{"name":"遵义市","coord":[106.82413636302059,28.191847588570702]},{"name":"达州市","coord":[107.59704170009518,31.32138258839703]},{"name":"遂宁市","coord":[105.48979445433736,30.677687821242678]},{"name":"广安市","coord":[106.56708164098042,30.43500706741521]},{"name":"泸州市","coord":[105.42591761727707,28.50277238478137]},{"name":"资阳市","coord":[104.97995126874034,30.154251886139654]},{"name":"雅安市","coord":[102.69931299964517,29.892630706195035]},{"name":"眉山市","coord":[104.07052881858888,29.894202166560405]},{"name":"甘孜藏族自治州","coord":[100.50721042614238,30.975216556269658]},{"name":"果洛藏族自治州","coord":[99.30775565051923,34.03539865224808]},{"name":"海南藏族自治州","coord":[100.39969108016373,35.90048272566899]},{"name":"黄南藏族自治州","coord":[101.5360706381689,35.10286360841902]},{"name":"赣南藏族自治州","coord":[102.97083885806067,34.326752803339026]},{"name":"陇南市","coord":[105.24780098912132,33.57031117443431]},{"name":"天水市","coord":[105.53503634660417,34.62320421368087]},{"name":"定西市","coord":[104.58787768541339,35.08900966621695]},{"name":"临夏回族自治州","coord":[103.2612870434902,35.591577124455235]},{"name":"西宁市","coord":[101.57680657999033,36.84800271717157]},{"name":"海东地区","coord":[102.30909850729282,36.287400615025646]},{"name":"海北藏族自治州","coord":[100.27122484450717,37.892557516083826]},{"name":"金昌市","coord":[102.02244049169511,38.497330414886164]},{"name":"酒泉市","coord":[95.94486678270127,40.56891536586272]},{"name":"海西蒙古族藏族自","coord":[94.67143298050689,36.022725148503724]},{"name":"巴音郭楞蒙古自治","coord":[88.18116214759745,39.556478810319916]},{"name":"哈密地区","coord":[93.84302392518026,42.95015211178875]},{"name":"叶鲁番地区","coord":[89.82035217277885,42.399368632283505]},{"name":"乌鲁木齐市","coord":[88.00048109561487,43.549986370786]},{"name":"阿勒泰地区","coord":[88.11213933257655,47.05593413019629]},{"name":"博尔塔拉蒙古自治","coord":[82.26402238163408,44.671135542630864]},{"name":"伊犁哈萨克自治州","coord":[82.80778717477179,43.53783381365267]},{"name":"阿拉善盟","coord":[103.29923966842289,40.10955801781495]},{"name":"武威市","coord":[102.73362058791429,37.94211141321436]},{"name":"兰州市","coord":[103.73793563506032,36.27379827886003]},{"name":"中卫市","coord":[105.6943786030716,37.20654236148948]},{"name":"银川市","coord":[106.20022174140034,38.52103167597483]},{"name":"石嘴山市","coord":[106.41544011793628,38.84054137571417]},{"name":"乌海市","coord":[106.8984175998405,39.54616572239788]},{"name":"鄂尔多斯市","coord":[108.43285571424619,39.24036799350715]},{"name":"巴彦淖尔市","coord":[107.45840392808307,41.30159860424196]},{"name":"包头市","coord":[110.46472193224272,41.48017783644221]},{"name":"呼和浩特市","coord":[111.48365173603975,40.498363056149884]},{"name":"乌兰察布市","coord":[112.61568977597707,41.75789561273154]},{"name":"大同市","coord":[113.7107192749083,39.898956799744184]},{"name":"朔州市","coord":[112.65428748167508,39.681772914701924]},{"name":"忻州市","coord":[112.36127575589583,38.88990233614568]},{"name":"榆林市","coord":[109.68473112169593,38.19921027134876]},{"name":"延安市","coord":[109.52425222161318,36.406522726136814]},{"name":"庆阳市","coord":[107.73052193155061,36.183821532624464]},{"name":"固原市","coord":[106.20191575442442,36.11634909496382]},{"name":"白银市","coord":[104.68634478137065,36.51582865625868]},{"name":"宝鸡市","coord":[107.33534779230747,34.3387216485855]},{"name":"汉中市","coord":[107.03534754266246,33.00142998064871]},{"name":"广元市","coord":[105.92928137563939,32.21872447205537]},{"name":"巴中市","coord":[107.03422410306194,31.99874720836291]},{"name":"南充市","coord":[106.32964805032347,31.156657700184095]},{"name":"绵阳市","coord":[104.58949560201106,31.88628780630976]},{"name":"德阳市","coord":[104.41542984932845,31.110558133718676]},{"name":"成都市","coord":[103.8852290010473,30.777258040348634]},{"name":"阿坝藏族羌族自治","coord":[102.26209319552814,32.45725845387284]},{"name":"安康市","coord":[109.14236501848015,32.77467694678074]},{"name":"十堰市","coord":[110.39934083416314,32.376209039347906]},{"name":"襄阳市","coord":[111.97539147094662,31.93399822417465]},{"name":"宜昌市","coord":[111.22204852395754,30.772457669035354]},{"name":"恩施市","coord":[109.42158366502872,30.260366574390105]},{"name":"张家界市","coord":[110.59760006538717,29.330107409240718]},{"name":"吉首市","coord":[109.72176899848378,28.681903937242495]},{"name":"铜仁地区","coord":[108.54247523485463,28.11736237519646]},{"name":"重庆市","coord":[107.86007108564992,30.186253395053196]},{"name":"怀化市","coord":[109.94325166787243,27.43919084801186]},{"name":"益阳市","coord":[112.43060358108062,28.75127294553697]},{"name":"娄底市","coord":[111.41891416951897,27.696312460064604]},{"name":"常德市","coord":[111.72571610131646,29.27189463838195]},{"name":"荆州市","coord":[112.65896596965268,30.05161542755362]},{"name":"荆门市","coord":[112.6586855902184,31.01267124474617]},{"name":"岳阳市","coord":[113.2595036144316,29.106247116930163]},{"name":"长沙市","coord":[113.15415586456598,28.222934680488425]},{"name":"湘潭市","coord":[112.51092596317824,27.69881544105668]},{"name":"株州市","coord":[113.49665538546823,27.03993794610501]},{"name":"衡阳市","coord":[112.48849636578527,26.783613569970782]},{"name":"邵阳市","coord":[110.6723832117475,26.81652287086792]},{"name":"永州市","coord":[111.8565364154186,25.768488267811968]},{"name":"韶关市","coord":[113.53420325850979,24.69848878771937]},{"name":"惠州市","coord":[114.32029589634925,23.25504544231892]},{"name":"佛山市","coord":[112.95925897403649,23.10116677189257]},{"name":"云浮市","coord":[111.78042514904234,22.840400494105687]},{"name":"深圳市","coord":[114.13138648919008,22.649563063468342]},{"name":"汕尾市","coord":[115.57412892884373,23.06989642104901]},{"name":"河源市","coord":[114.89746229844398,23.97971937124767]},{"name":"揭阳市","coord":[116.04290004239446,23.304802704715357]},{"name":"汕头市","coord":[116.7008461897183,23.35898625947344]},{"name":"潮州市","coord":[116.75405548481658,23.854381508863064]},{"name":"梅州市","coord":[116.13719397345734,24.15633544812716]},{"name":"漳州市","coord":[117.38279760543345,24.41111215459575]},{"name":"厦门市","coord":[118.04275971554665,24.675908246507944]},{"name":"龙岩市","coord":[116.69341144552507,25.20284542644492]},{"name":"泉州市","coord":[118.12035864630246,25.22984144365049]},{"name":"莆田市","coord":[118.82439690138142,25.439653480972687]},{"name":"福州市","coord":[119.1608285845262,25.99117532466728]},{"name":"三明市","coord":[117.51188176216434,26.318292906961602]},{"name":"南平市","coord":[118.16153136678187,27.306303151805437]},{"name":"抚州市","coord":[116.3455359885574,27.487043655935366]},{"name":"鹰潭市","coord":[117.01082360702333,28.241253742969946]},{"name":"吉安市","coord":[114.91377151807418,26.957486660664525]},{"name":"赣州市","coord":[115.046455717572,25.81565075681663]},{"name":"郴州市","coord":[113.1544526703492,25.871927095452524]},{"name":"新余市","coord":[114.94161795877827,27.79044654578371]},{"name":"宜春市","coord":[115.04574494880995,28.306428044943356]},{"name":"南昌市","coord":[115.9963824234495,28.664803351584705]},{"name":"九江市","coord":[115.53225905704193,29.362905920276297]},{"name":"上饶市","coord":[117.8595355766598,28.765755150094634]},{"name":"景德镇市","coord":[117.25387030721845,29.33426823662448]},{"name":"黄山市","coord":[117.85476357809696,29.969632034273722]},{"name":"池州市","coord":[117.34517113140791,30.208089337922335]},{"name":"铜陵市","coord":[117.93160431300694,30.926442655001676]},{"name":"安庆市","coord":[116.54307680610799,30.524265461641296]},{"name":"黄石市","coord":[115.02354597728443,29.924060229331015]},{"name":"咸宁市","coord":[114.26967602231792,29.652174021136048]},{"name":"黄冈市","coord":[115.2859016705373,30.65856897065683]},{"name":"武汉市","coord":[114.34552076948799,30.68836237966767]},{"name":"随州市","coord":[113.3850627838818,31.87891659924412]},{"name":"信阳市","coord":[114.81374730587638,32.0309685135914]},{"name":"驻马店市","coord":[114.07756451509235,32.896720987266114]},{"name":"商洛市","coord":[109.82044421310393,33.77403373563189]},{"name":"西安市","coord":[109.11839808451401,34.225257215515896]},{"name":"渭南市","coord":[109.75732444226935,35.025913644359306]},{"name":"铜川市","coord":[108.98695328111377,35.19235092947735]},{"name":"咸阳市","coord":[108.36398776446165,34.84311348287181]},{"name":"三门峡市","coord":[110.80049688104964,34.31818709571671]},{"name":"运城市","coord":[111.1736679525165,35.19010372283576]},{"name":"洛阳市","coord":[111.87577573098216,34.33379926109848]},{"name":"平顶山市","coord":[112.80931281928427,33.759895800153096]},{"name":"漯河市","coord":[113.83505724178012,33.70034266174508]},{"name":"许昌市","coord":[113.78762484088509,34.051835688452435]},{"name":"郑州市","coord":[113.49619951867594,34.61181797865449]},{"name":"焦作市","coord":[113.13404280173008,35.134167097471625]},{"name":"晋城市","coord":[112.7495732073233,35.63186423091449]},{"name":"长治市","coord":[112.85900842873183,36.45872910742828]},{"name":"临汾市","coord":[111.49379787924448,36.22810800777857]},{"name":"太原市","coord":[112.15628804033796,37.91704444063036]},{"name":"吕梁市","coord":[111.31901105774872,37.712740463356496]},{"name":"晋中市","coord":[113.08199599739676,37.36532613794343]},{"name":"邯郸市","coord":[114.41824047234618,36.530119932543315]},{"name":"安阳市","coord":[113.88883283163116,35.7797611183252]},{"name":"鹤壁市","coord":[114.3654094911545,35.75770487428472]},{"name":"新乡市","coord":[113.9184107718167,35.348471214026716]},{"name":"开封市","coord":[114.52801677500626,34.61371216679872]},{"name":"周口市","coord":[114.88509782391864,33.69999759722657]},{"name":"阜阳市","coord":[115.44595951398213,32.98060371610532]},{"name":"淮南市","coord":[116.68941991880993,32.79972275772595]},{"name":"蚌埠市","coord":[117.38594715783302,33.106729536033896]},{"name":"淮北市","coord":[116.69651711889378,33.69527529383458]},{"name":"宿州市","coord":[117.30175405886838,33.943330421260015]},{"name":"亳州市","coord":[116.12410804185097,33.46769392946132]},{"name":"商丘市","coord":[115.59575176872548,34.28339840831147]},{"name":"菏泽市","coord":[115.53631974831816,35.197319393220624]},{"name":"濮阳市","coord":[115.3070485514902,35.775883510964334]},{"name":"聊城市","coord":[115.8870069012884,36.40529594548765]},{"name":"邢台市","coord":[114.74259008644859,37.251396750084155]},{"name":"石家庄市","coord":[114.56923838363613,38.13141710980106]},{"name":"阳泉市","coord":[113.39216149668508,38.09075470547468]},{"name":"保定市","coord":[115.261524468934,39.09118520781398]},{"name":"衡水市","coord":[115.8182936677897,37.715661598187154]},{"name":"德州市","coord":[116.4582273790399,37.19372347888644]},{"name":"沧州市","coord":[116.76192710911863,38.20240042039232]},{"name":"廊坊市","coord":[116.50410772133856,39.27896741763884]},{"name":"天津市","coord":[117.31988934444873,39.37154482470619]},{"name":"北京市","coord":[116.59734730757869,40.237112944270976]},{"name":"张家口市","coord":[115.1823606483226,40.83732566607167]},{"name":"唐山市","coord":[117.8693184261954,39.71862889477249]},{"name":"秦皇岛市","coord":[119.30467355367742,39.990574652162564]},{"name":"承德市","coord":[117.16275671911026,41.36623845548547]},{"name":"葫芦岛市","coord":[119.9342336210531,40.5628822626519]},{"name":"朝阳市","coord":[120.11853493535794,41.471852354885755]},{"name":"赤峰市","coord":[118.50943546234379,43.25452976059767]},{"name":"锦州市","coord":[121.5167549323861,41.45933087433065]},{"name":"营口市","coord":[122.58571915054674,40.42093503997384]},{"name":"丹东市","coord":[124.33549382902183,40.46369290272115]},{"name":"辽阳市","coord":[123.34064798039414,41.152331397771356]},{"name":"盘锦市","coord":[122.06718005354679,41.05573599862555]},{"name":"阜新市","coord":[121.93889757908204,42.27641773244204]},{"name":"鞍山市","coord":[122.78904432242356,40.77781183142038]},{"name":"沈阳市","coord":[122.99508899709724,42.1162195010079]},{"name":"铁岭市","coord":[124.23100515588399,42.72666083611828]},{"name":"扶顺市","coord":[124.46027188217573,41.82955407638859]},{"name":"通辽市","coord":[122.0729370657937,43.90889130864869]},{"name":"兴安盟","coord":[120.79456431092532,45.92003249442161]},{"name":"白城市","coord":[123.10619907715235,45.25475749267784]},{"name":"齐齐哈尔市","coord":[124.5462214659102,47.55395009317394]},{"name":"大兴安岭地区","coord":[124.50992855161529,52.18438447846694]},{"name":"黑河市","coord":[127.14721400335922,49.25080134026901]},{"name":"大庆市","coord":[124.40329830095243,46.401048760966745]},{"name":"绥化市","coord":[126.5214484055605,46.76992452194825]},{"name":"松原市","coord":[124.21244334807682,44.75779381338502]},{"name":"四平市","coord":[124.27839350328821,43.52139065090318]},{"name":"通化市","coord":[125.67392830706305,41.91771808663852]},{"name":"辽源市","coord":[125.33529527643432,42.758340204944986]},{"name":"吉林市","coord":[126.83350281902375,43.60730120049175]},{"name":"长春市","coord":[125.53597875970374,44.24624314701737]},{"name":"白山市","coord":[127.16780160322108,42.093893880305075]},{"name":"哈尔滨市","coord":[127.39125008786029,45.36200668820575]},{"name":"鹤岗市","coord":[130.4703811258197,47.66520688940109]},{"name":"伊春市","coord":[128.91240831703635,47.93833794565277]},{"name":"七台河市","coord":[131.2677920224311,45.945099776108584]},{"name":"鸡西市","coord":[132.38059153660274,45.722934218318535]},{"name":"双鸭山市","coord":[132.3184817002743,46.65813679030265]},{"name":"佳木斯市","coord":[132.26174446608726,47.17569713691394]},{"name":"呼伦贝尔市","coord":[122.3210739998419,50.18176996070858]},{"name":"孝感市","coord":[113.83749892135485,31.11757234692128]},{"name":"贵港市","coord":[110.07354588052804,23.380735604767374]},{"name":"黔南布依族苗族自","coord":[107.30931767543106,26.2976919432269]},{"name":"宁德市","coord":[119.52482556634342,27.013151692716413]},{"name":"温州市","coord":[120.30037042732202,27.8699145504001]},{"name":"台州市","coord":[120.88886782713843,28.670799172772313]},{"name":"丽水市","coord":[119.56796851966463,28.170268394477755]},{"name":"衢州市","coord":[118.79479802644406,28.865874397158763]},{"name":"金华市","coord":[119.99381920686633,29.093455548185744]},{"name":"绍兴市","coord":[120.46546691682343,29.69382513836818]},{"name":"宁波市","coord":[121.42142987830871,29.70001162878972]},{"name":"杭州市","coord":[119.4405685790891,29.87218307296989]},{"name":"宣城市","coord":[118.68748382914703,30.628143499626418]},{"name":"湖州市","coord":[119.98261306633574,30.7945175862809]},{"name":"嘉兴市","coord":[120.83889215988998,30.67538495499343]},{"name":"上海市","coord":[121.37534147322967,31.25628247908459]},{"name":"苏州市","coord":[120.6906182622391,31.381280695137775]},{"name":"无锡市","coord":[120.32182300914366,31.54113306724517]},{"name":"常州市","coord":[119.61953292830165,31.611878565375576]},{"name":"南京市","coord":[118.71890548838064,31.910863187910323]},{"name":"镇江市","coord":[119.42349332902813,31.97942313430778]},{"name":"合肥市","coord":[117.30651975617157,31.79407863049138]},{"name":"六安市","coord":[116.24668220575353,31.820846193819513]},{"name":"滁州市","coord":[117.88422385307969,32.51792621904418]},{"name":"泰州市","coord":[120.03124303305091,32.56503102346783]},{"name":"南通市","coord":[120.85599446760912,32.18496706099728]},{"name":"盐城市","coord":[120.01812490612667,33.54219948734023]},{"name":"淮安市","coord":[119.0749424205415,33.39203631772854]},{"name":"宿迁市","coord":[118.45404943216346,33.666258719120265]},{"name":"徐州市","coord":[117.77482249295966,34.30847766157078]},{"name":"济宁市","coord":[116.74147276546373,35.27488504351119]},{"name":"枣庄市","coord":[117.43359942491492,34.884162021736]},{"name":"连云港市","coord":[119.01553213785074,34.54316517587849]},{"name":"临沂市","coord":[118.31478835349617,35.28173079028279]},{"name":"日照市","coord":[119.14265350444272,35.54479073199592]},{"name":"青岛市","coord":[120.27779044405756,36.3464117375903]},{"name":"威海市","coord":[122.12963327195605,37.13879077904251]},{"name":"烟台市","coord":[120.7689567423966,37.19772002195597]},{"name":"潍坊市","coord":[119.02178548592039,36.49292234053931]},{"name":"淄博市","coord":[117.92936024367185,36.60871347163638]},{"name":"泰安市","coord":[116.93810893944303,36.0423330118612]},{"name":"济南市","coord":[117.34560282551296,36.769574973846304]},{"name":"东营市","coord":[118.4915054457184,37.52194690335787]},{"name":"滨州市","coord":[117.67610299757533,37.4439597758601]},{"name":"昆明市","coord":[102.93100245594789,25.481300763922075]},{"name":"玉溪市","coord":[102.23080854291823,24.156168324611663]},{"name":"塔城地区","coord":[83.60908162840168,45.3721852373893]},{"name":"张掖市","coord":[100.47710030600572,38.704239320458385]},{"name":"南阳市","coord":[112.1400670951149,33.03033276715801]},{"name":"扬州市","coord":[119.48949608990988,32.80956776339646]},{"name":"延边朝鲜族自治州","coord":[129.3577692895626,43.24968794080283]},{"name":"牡丹江市","coord":[129.87240796405672,44.7073040108322]},{"name":"澳门","coord":[113.56289691515346,22.14602596262204]},{"name":"吴忠市","coord":[106.76894508116403,37.72566765880316]},{"name":"来宾市","coord":[109.25592217010114,23.86346274681084]},{"name":"平凉市","coord":[107.0708132782897,35.30329631658711]},{"name":"马鞍山市","coord":[118.27245878467022,31.657727937739004]},{"name":"芜湖市","coord":[118.32992684415504,31.081688223101658]},{"name":"澄迈县","coord":[110.04198076060266,19.694955078668105]},{"name":"保亭黎族苗族自治","coord":[109.6055304964257,18.6101488675304]},{"name":"乐东黎族自治县","coord":[109.04051999525574,18.643137437909203]},{"name":"儋州市","coord":[109.3431358337404,19.550974957403195]},{"name":"定安县","coord":[110.38744429685676,19.47557074114284]},{"name":"屯昌县","coord":[110.00574767630334,19.367175093044388]},{"name":"白沙黎族自治县","coord":[109.36860737761768,19.214416393082217]},{"name":"琼中黎族苗族自治","coord":[109.86691465937548,19.073671135862682]},{"name":"东方市","coord":[108.86903802405428,19.017352815445214]},{"name":"昌江黎族自治县","coord":[108.9686431884767,19.182594167127824]},{"name":"海口市","coord":[110.420654296875,19.806565564640795]},{"name":"济源市","coord":[112.38051465474433,35.07958362422394]},{"name":"五指山市","coord":[109.53595187364496,18.832908264613966]},{"name":"大连市","coord":[121.96662235866603,39.444150542439914]},{"name":"文昌市三沙市","coord":[110.81828537536748,19.756501444162936]},{"name":"三亚市","coord":[109.38424600793707,18.39186315877128]},{"name":"万宁市","coord":[110.28485046979574,18.860240588635115]},{"name":"陵水黎族自治县","coord":[109.95577603229562,18.594712684620465]},{"name":"临高县","coord":[109.71915395436967,19.79420403032508]},{"name":"琼海市","coord":[110.41650700703043,19.22315873149372]}]'),ms=JSON.parse('[{"name":"黑龙江省","coord":[127.64559817675396,48.48668098449708]},{"name":"内蒙古自治区","coord":[118.34519572208615,45.370218276977525]},{"name":"新疆维吾尔自治区","coord":[87.13479065593184,41.75497055053711]},{"name":"吉林省","coord":[126.12985278813787,43.57983207702637]},{"name":"辽宁省","coord":[124.02494773936439,41.105743408203125]},{"name":"甘肃省","coord":[102.87785725633012,37.69582366943361]},{"name":"河北省","coord":[115.66327227481898,39.33383178710938]},{"name":"北京市","coord":[116.62199343603638,40.25053787231445]},{"name":"山西省","coord":[112.45180235808988,37.666561126708984]},{"name":"天津市","coord":[117.35711842642581,39.406789779663086]},{"name":"陕西省","coord":[109.56294003056632,35.64754199981689]},{"name":"宁夏回族自治区","coord":[105.96110877640074,37.3081169128418]},{"name":"青海省","coord":[96.07301048277901,35.44417190551758]},{"name":"山东省","coord":[118.03833752951093,36.29800605773925]},{"name":"西藏自治区","coord":[87.47361520439412,31.6703872680664]},{"name":"河南省","coord":[113.07832397097275,33.87751102447509]},{"name":"江苏省","coord":[119.93926538201052,32.945452690124505]},{"name":"安徽省","coord":[117.15146765881019,32.024482727050774]},{"name":"四川省","coord":[102.28998890142759,30.182161331176758]},{"name":"湖北省","coord":[112.87798261431585,31.157071113586426]},{"name":"重庆市","coord":[107.870126637831,30.188085556030266]},{"name":"上海市","coord":[121.42561166015514,31.276043891906745]},{"name":"浙江省","coord":[119.75337092707514,29.175934791564945]},{"name":"湖南省","coord":[111.52770282777405,27.38110256195069]},{"name":"江西省","coord":[115.51091280655628,27.283511161804206]},{"name":"云南省","coord":[101.27053825991308,25.19783210754396]},{"name":"贵州省","coord":[106.49672346773299,26.92267990112305]},{"name":"福建省","coord":[117.9976766946587,25.939599990844727]},{"name":"广西壮族自治区","coord":[108.98706831086302,23.891559600830078]},{"name":"台湾省","coord":[120.82468432537434,23.602651596069336]},{"name":"香港特别行政区","coord":[114.21036850371561,22.374858856201172]},{"name":"海南省","coord":[109.62792940960824,19.163116455078125]},{"name":"广东省","coord":[113.32127888266032,22.873867034912106]},{"name":"澳门特别行政区","coord":[113.56819996291901,22.160347992976]}]');function gs(t,e){if("string"==typeof(n=e)&&n.constructor===String){var r=t.substr(0,2);return"张家"===r&&(r=t.substr(0,3)),!!e.match(new RegExp(r));}var n;return!1;}function bs(t){return t&&"/"!==t.slice(-1)?"".concat(t,"/"):t;}function xs(t){return function(t){if(Array.isArray(t))return ws(t);}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t);}(t)||function(t,e){if(t){if("string"==typeof t)return ws(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)?ws(t,e):void 0;}}(t)||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.");}();}function ws(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 Ss(){Ss=function Ss(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value;},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{l({},"");}catch(t){l=function l(t,e,r){return t[e]=r;};}function c(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new T(n||[]);return i(a,"_invoke",{value:P(t,r,s)}),a;}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=c;var f="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function g(){}function b(){}var x={};l(x,a,function(){return this;});var w=Object.getPrototypeOf,S=w&&w(w(A([])));S&&S!==r&&n.call(S,a)&&(x=S);var _=b.prototype=m.prototype=Object.create(x);function M(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t);});});}function O(t,e){function r(i,o,a,s){var u=h(t[i],t,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==Os(c)&&n.call(c,"__await")?e.resolve(c.__await).then(function(t){r("next",t,a,s);},function(t){r("throw",t,a,s);}):e.resolve(c).then(function(t){l.value=t,a(l);},function(t){return r("throw",t,a,s);});}s(u.arg);}var o;i(this,"_invoke",{value:function value(t,n){function i(){return new e(function(e,i){r(t,n,e,i);});}return o=o?o.then(i,i):i();}});}function P(e,r,n){var i=f;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===d){if("throw"===o)throw a;return{value:t,done:!0};}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=k(s,n);if(u){if(u===v)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=d,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var l=h(e,r,n);if("normal"===l.type){if(i=n.done?d:p,l.arg===v)continue;return{value:l.arg,done:n.done};}"throw"===l.type&&(i=d,n.method="throw",n.arg=l.arg);}};}function k(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v);}function E(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0);}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r;};return o.next=o;}}throw new TypeError(Os(e)+" is not iterable");}return g.prototype=b,i(_,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t;},e.awrap=function(t){return{__await:t};},M(O.prototype),l(O.prototype,s,function(){return this;}),e.AsyncIterator=O,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new O(c(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},M(_),l(_,u,"Generator"),l(_,a,function(){return this;}),l(_,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t;}return t.done=!0,t;};},e.values=A,T.prototype={constructor:T,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i;}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc);}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break;}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a);},complete:function complete(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),v;},finish:function finish(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),C(r),v;}},catch:function _catch(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 i=n.arg;C(r);}return i;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v;}},e;}function _s(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value;}catch(t){return void r(t);}s.done?e(u):Promise.resolve(u).then(n,i);}function Ms(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){_s(o,n,i,a,s,"next",t);}function s(t){_s(o,n,i,a,s,"throw",t);}a(void 0);});};}function Os(t){return Os="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Os(t);}function Ps(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,ks(n.key),n);}}function ks(t){var e=function(t,e){if("object"!=Os(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Os(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Os(e)?e:e+"";}var Es=["GoogleCRS84Quad","GoogleMapsCompatible","urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible","urn:ogc:def:wkss:OGC:1.0:GoogleCRS84Quad"],Cs=[559082264.0287178,279541132.0143589,139770566.00717944,69885283.00358972,34942641.50179486,17471320.75089743,8735660.375448715,4367830.1877243575,2183915.0938621787,1091957.5469310894,545978.7734655447,272989.38673277234,136494.69336638617,68247.34668319309,34123.67334159654,17061.83667079827,8530.918335399136,4265.459167699568,2132.729583849784,1066.364791924892,533.182395962446,266.591197981223,133.2955989906115],Ts=[559082264.0287176,279541132.0143588,139770566.0071794,69885283.0035897,34942641.50179485,17471320.750897426,8735660.375448713,4367830.187724357,2183915.0938621783,1091957.5469310891,545978.7734655446,272989.3867327723,136494.69336638614,68247.34668319307,34123.673341596535,17061.836670798268,8530.918335399134,4265.459167699567,2132.7295838497835,1066.3647919248917,533.1823959624459,266.59119798122293,133.29559899061147],As=function(){return t=function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),"string"==typeof e||"number"==typeof e?this.mapId=e:null!==e&&"object"===Os(e)&&(this.mapInfo=e),this.serverUrl=r.serverUrl||"https://www.supermapol.com",this.credentialKey=r.credentialKey,this.credentialValue=r.credentialValue,this.tiandituKey=r.tiandituKey||"",this.withCredentials=r.withCredentials||!1,this.excludePortalProxyUrl=r.excludePortalProxyUrl,this.iportalServiceProxyUrl=r.iportalServiceProxyUrlPrefix,this.proxy=r.proxy,this.proxyOptions={data:"apps/viewer/getUrlResource.json?url=",image:"apps/viewer/getUrlResource.png?url="};},e=[{key:"setMapId",value:function value(t){"string"==typeof t||"number"==typeof t?(this.mapId=t,this.mapInfo=null):null!==t&&"object"===Os(t)&&(this.mapInfo=t,this.mapId="");}},{key:"setServerUrl",value:function value(t){this.serverUrl=t;}},{key:"setWithCredentials",value:function value(t){this.withCredentials=t;}},{key:"setProxy",value:function value(t){this.proxy=t;}},{key:"handleServerUrl",value:function value(t){var e=bs(t);return this.serverUrl=e,e;}},{key:"getMapInfo",value:(r=Ms(Ss().mark(function t(){var e,r=this;return Ss().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.mapId||!this.mapInfo){t.next=2;break;}return t.abrupt("return",new Promise(function(t){t(r.mapInfo);}));case 2:return e=this._handleMapUrl(),t.prev=3,t.next=6,this.getiPortalServiceProxy();case 6:return t.abrupt("return",new Promise(function(t,n){wr.get(e,null,{withCredentials:r.withCredentials}).then(function(t){return t.json();}).then(function(e){if(e&&!1===e.succeed){var r={message:e&&e.error&&e.error.errorMsg};n(r);}else e.mapParams={title:e.title,description:e.description},t(e);}).catch(function(t){n(t);});}));case 9:return t.prev=9,t.t0=t.catch(3),t.abrupt("return",Promise.reject(t.t0));case 12:case"end":return t.stop();}},t,this,[[3,9]]);})),function(){return r.apply(this,arguments);})},{key:"getiPortalServiceProxy",value:function value(){var t=this;return new Promise(function(e,r){wr.get("".concat(t.serverUrl,"web/config/portal.json"),{scope:["serviceProxy"]}).then(function(t){return t.json();}).then(function(n){if(n&&n.serviceProxy){var i=n.serviceProxy;i.enable&&(i.proxyServerRootUrl?t.iportalServiceProxyUrl=i.proxyServerRootUrl:i.port&&i.rootUrlPostfix&&(t.iportalServiceProxyUrl="".concat(i.port,"/").concat(i.rootUrlPostfix)),t.serverUrl.indexOf(t.iportalServiceProxyUrl)>-1&&(t.iportalServiceProxyUrl="")),e(i);}else r("serviceProxyFailed");}).catch(function(t){r(t);});});}},{key:"getLayerFeatures",value:function value(t,e,r){var n;switch(t){case"hosted":n=this._getFeaturesFromHosted(e,r);break;case"rest_data":n=this._getFeaturesFromRestData(e,r);break;case"rest_map":n=this._getFeaturesFromRestMap(e);break;case"dataflow":n=this._getFeaturesFromDataflow(e);break;case"user_data":n=this._getFeaturesFromUserData(e);}return n;}},{key:"getWmsInfo",value:function value(t){var e=this;return new Promise(function(r){var n=e.handleProxy(),i=mr.urlAppend(t.url,"REQUEST=GetCapabilities&SERVICE=WMS");wr.get(i,null,{withCredentials:e.handleWithCredentials(n,t.url,!1),withoutFormatSuffix:!0,proxy:n}).then(function(t){return t.text();}).then(function(t){var e=new Ze.XMLParser({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(t),n=e.WMT_MS_Capabilities||e.WMS_Capabilities,i=n.Capability.Layer.LatLonBoundingBox,o=null;i&&(o=[+i["@_minx"],+i["@_miny"],+i["@_maxx"],+i["@_maxy"]]);var a=n.Capability.Layer.EX_GeographicBoundingBox;a&&(o=[+a.westBoundLongitude,+a.southBoundLatitude,+a.eastBoundLongitude,+a.northBoundLatitude]),r({version:n["@_version"],bounds:o});});});}},{key:"getMapBoxStyle",value:function value(t){return new Promise(function(e,r){wr.get(t).then(function(t){return t.json();}).then(function(t){e(t);}).catch(function(t){r(t);});});}},{key:"getWmtsInfo",value:function value(t,e){var r=this;return new Promise(function(n,i){var o,a=!1,s=22,u=0,l="",c="",h="",f=r.handleProxy(),p=mr.urlAppend(t.url,"REQUEST=GetCapabilities&SERVICE=WMTS&VERSION=1.0.0");p=r.handleParentRes(p),wr.get(p,null,{withCredentials:r.handleWithCredentials(f,t.url,!1),withoutFormatSuffix:!0,proxy:f}).then(function(t){return t.text();}).then(function(i){var f=["Layer","TileMatrixSet","ows:Operation","ows:Get","ResourceURL","Style"],p=new Ze.XMLParser({ignoreAttributes:!1,attributeNamePrefix:"@_",isArray:function isArray(t){if(-1!==f.indexOf(t))return!0;}}).parse(i).Capabilities,y=p.Contents,d=p["ows:OperationsMetadata"];if(d){var v=d["ows:Operation"];Array.isArray(v)||(v=[v]);var m=v.find(function(t){return"GetTile"===t["@_name"];});if(m){var g=m["ows:DCP"]["ows:HTTP"]["ows:Get"];Array.isArray(g)||(g=[g]);var b=g.find(function(t){return"KVP"===t["ows:Constraint"]["ows:AllowedValues"]["ows:Value"];});b&&(h=b["@_xlink:href"]);}}for(var x=y.TileMatrixSet,w=0;w<x.length;w++)if(x[w]["ows:Identifier"]&&x[w]["ows:Identifier"]+""===t.tileMatrixSet){if(x[w].WellKnownScaleSet&&Es.includes(x[w].WellKnownScaleSet))a=!0;else{for(var S={},_="EPSG:3857"===e?Cs:Ts,M="EPSG:3857"===e?[-20037508.342789248,20037508.342789087]:[-180,90],O=0;O<x[w].TileMatrix.length;O++){var P=x[w].TileMatrix[O],k=P["ows:Identifier"],E=xs(P.TopLeftCorner.split(" "));if(!(r.numberEqual(E[0],M[0])&&r.numberEqual(E[1],M[1])||r.numberEqual(E[0],M[1])&&r.numberEqual(E[1],M[0])))break;var C=_[+k];if(!C)break;var T=parseFloat(x[w].TileMatrix[O].ScaleDenominator);if(r.numberEqual(C,T))S[+k]=T;else if(Object.keys(S).length>0)break;}var A=Object.keys(S).map(function(t){return+t;});if(s=A.length>0?Math.max.apply(Math,xs(A)):void 0,u=A.length>0?Math.min.apply(Math,xs(A)):void 0,0===A.length)throw Error("TileMatrixSetNotSuppport");a=!0;}break;}var N=y.Layer&&y.Layer.find(function(e){return e["ows:Identifier"]===t.layer;});if(N){var j=N.Style;if(l=Array.isArray(N.Style)?j[0]["ows:Identifier"]?j[0]["ows:Identifier"]:"":j["ows:Identifier"]?j["ows:Identifier"]:"",N["ows:WGS84BoundingBox"]){var I=N["ows:WGS84BoundingBox"]["ows:LowerCorner"].split(" "),R=N["ows:WGS84BoundingBox"]["ows:UpperCorner"].split(" ");o=[parseFloat(I[0]),parseFloat(I[1]),parseFloat(R[0]),parseFloat(R[1])];}var L=N.ResourceURL;Array.isArray(L)||(L=[L]);var F=L.find(function(t){return"tile"===t["@_resourceType"];});F&&(c=F["@_template"]);}n({isMatched:a,matchMaxZoom:s,matchMinZoom:u,style:l,bounds:o,restResourceURL:c,kvpResourceUrl:h});}).catch(function(t){i(t);});});}},{key:"_getFeaturesFromHosted",value:function value(t,e){var r=t.dataSource,n=t.layerType,i=r?r.serverId:t.serverId;return i?"MARKER"===n||r&&(!r.accessType||"DIRECT"===r.accessType)?this._getDataFromIportal(i,t):this._getDataFromHosted({layer:t,serverId:i,baseProjection:e}):new Promise(function(t){t({type:"noServerId"});});}},{key:"_getFeaturesFromRestData",value:function value(t,e){var r,n=this,i=t.dataSource;return new Promise(function(o,a){n._getFeatureBySQL(i.url,[decodeURIComponent(i.dataSourceName)||t.name],function(t){t.result.features?(r=n.parseGeoJsonData2Feature({allDatas:{features:t.result.features.features}}),o({type:"feature",features:r})):a("features must be valid");},function(t){a(t);},e);});}},{key:"_getFeaturesFromRestMap",value:function value(t){var e=this;return new Promise(function(r,n){e._queryFeatureBySQL(t.dataSource.url,t.dataSource.layerName,function(i){var o=i&&i.result.recordsets,a=o&&o[0],s=a.fields;if(a&&s){var u=[];for(var l in s){var c=s[l];0===c.indexOf("Sm")&&"SmID"!==c||u.push(c);}e._getFeatures(u,t,function(t){r({type:"feature",features:t});},function(t){n(t);});}},function(t){n(t);},"smid=1");});}},{key:"_getFeaturesFromUserData",value:function value(t){var e=this,r=t.dataSource;return new Promise(function(t,n){var i=e.handleProxy(),o=e.handleParentRes(r.url);wr.get(o,null,{withCredentials:e.handleWithCredentials(i,o,e.withCredentials),proxy:i,withoutFormatSuffix:!0}).then(function(t){return t.json();}).then(function(r){var n;n=r&&r instanceof Object&&"FeatureCollection"===r.type?r.features:r,n=e.parseGeoJsonData2Feature({allDatas:{features:n}}),t({type:"feature",features:n});}).catch(function(t){n(t);});});}},{key:"_queryFeatureBySQL",value:function value(t,e,r,n,i,o,a,s,u,l){var c=this._getQueryFeaturesParam(e,i,o,a,s,u,l),h=this.handleProxy(),f=this.handleParentRes(t);new pa(f,{proxy:h,withCredentials:this.handleWithCredentials(h,t,!1),eventListeners:{processCompleted:function processCompleted(t){r&&r(t);},processFailed:function processFailed(t){n&&n(t);}}}).processAsync(c);}},{key:"_getFeatures",value:function value(t,e,r,n){var i=this,o=e.dataSource;this._queryFeatureBySQL(o.url,o.layerName,function(t){var e=t.result.recordsets[0].features.features,n=i.parseGeoJsonData2Feature({allDatas:{features:e}});r(n);},function(t){n(t);},null,t);}},{key:"_getQueryFeaturesParam",value:function value(t,e,r,n,i,o,a){var s=new ma({name:t,attributeFilter:e});r&&(s.fields=r);var u={queryParams:[s]};return a&&(u.queryOption="ATTRIBUTE"),i&&(u.startRecord=i),o&&(u.expectCount=o),n&&(u.prjCoordSys={epsgCode:n}),new ia(u);}},{key:"_getFeaturesFromDataflow",value:function value(t){var e=this;return new Promise(function(r,n){e._getDataflowInfo(t,function(){r({type:"dataflow"});},function(t){n(t);});});}},{key:"_getDataflowInfo",value:function value(t,e,r){var n,i=t.url,o="".concat(i,".json");t.credential&&t.credential.token&&(n=t.credential.token,o+="?token=".concat(n));var a=this.handleProxy();o=this.handleParentRes(o),wr.get(o,null,{proxy:a,withCredentials:this.handleWithCredentials(a,o,!1)}).then(function(t){return t.json();}).then(function(n){n?(n.featureMetaData&&(t.featureType=n.featureMetaData.featureType.toUpperCase(),t.dataSource={dataTypes:{}},n.featureMetaData.fieldInfos&&n.featureMetaData.fieldInfos.length>0&&n.featureMetaData.fieldInfos.forEach(function(e){var r=e.name.trim();"TEXT"===e.type?t.dataSource.dataTypes[r]="STRING":["DOUBLE","INT","FLOAT","LONG","SHORT"].includes(e.type)?t.dataSource.dataTypes[r]="NUMBER":t.dataSource.dataTypes[r]="UNKNOWN";})),t.wsUrl=n.urls[0].url,t.name=n.urls[0].url.split("iserver/services/")[1].split("/dataflow")[0],e()):r();}).catch(function(){r();});}},{key:"getDatasourceType",value:function value(t){var e,r=t.dataSource,n=t.layerType;return r&&"SAMPLE_DATA"===r.type?r.type:(r&&r.serverId||"MARKER"===n||"HOSTED_TILE"===n?e="hosted":"ZXY_TILE"===n||"SUPERMAP_REST"===n||"TILE"===n||"WMS"===n||"WMTS"===n||"MAPBOXSTYLE"===n?e="tile":r&&"REST_DATA"===r.type?e="rest_data":r&&"REST_MAP"===r.type&&r.url?e="rest_map":"DATAFLOW_POINT_TRACK"===n||"DATAFLOW_HEAT"===n?e="dataflow":r&&"USER_DATA"===r.type&&(e="user_data"),e);}},{key:"getFeatureProperties",value:function value(t){var e=[];return t&&t.length&&t.forEach(function(t){var r=t.properties;r&&e.push(r);}),e;}},{key:"parseGeoJsonData2Feature",value:function value(t){for(var e=t.allDatas.features,r=[],n=0,i=e.length;n<i;n++){var o=e[n],a=o.geometry.coordinates;"Point"===e[n].geometry.type&&e[n].properties&&(e[n].properties.lon=a[0],e[n].properties.lat=a[1]),o.properties.index=n+"",r.push(o);}return r;}},{key:"_getDataFromIportal",value:function value(t,e){var r,n=this,i="".concat(this.serverUrl,"web/datas/").concat(t,"/content.json?pageSize=9999999&currentPage=1");return this.credentialKey&&this.credentialValue&&(i="".concat(i,"&").concat(this.credentialKey,"=").concat(this.credentialValue)),new Promise(function(t,o){i=n.handleParentRes(i);var a=n.handleProxy();wr.get(i,null,{withCredentials:n.handleWithCredentials(a,i,n.withCredentials),proxy:a}).then(function(t){return t.json();}).then(function(){var i=Ms(Ss().mark(function i(a){var s,u,l,c;return Ss().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(!1===a.succeed&&o(a.error),!a||!a.type){i.next=22;break;}if("JSON"!==a.type&&"GEOJSON"!==a.type){i.next=7;break;}a.content=JSON.parse(a.content.trim()),r=n._formatGeoJSON(a.content),i.next=21;break;case 7:if("EXCEL"!==a.type&&"CSV"!==a.type){i.next=20;break;}if(!e.dataSource||!e.dataSource.administrativeInfo){i.next=17;break;}return a.content.rows.unshift(a.content.colTitles),s=e.dataSource.administrativeInfo,u=s.divisionType,l=s.divisionField,i.next=13,n._excelData2FeatureByDivision(a.content,u,l);case 13:c=i.sent,r=n._formatGeoJSON(c),i.next=18;break;case 17:r=n._excelData2Feature(a.content,e&&e.xyField||{});case 18:i.next=21;break;case 20:"SHP"===a.type&&(a.content=JSON.parse(a.content.trim()),r=n._formatGeoJSON(a.content.layers[0]));case 21:t({type:"feature",features:r});case 22:case"end":return i.stop();}},i);}));return function(t){return i.apply(this,arguments);};}()).catch(function(t){o(t);});});}},{key:"_getDataFromHosted",value:function value(t){var e=this,r=t.layer,n=t.serverId,i=t.baseProjection,o="HOSTED_TILE"===r.layerType;return new Promise(function(t,a){e._checkUploadToRelationship(n).then(function(s){if(s&&s.length>0){var u=s[0].name,l=s[0].type.toUpperCase();e._getDataService(n,u).then(function(n){var s=n.dataItemServices;0===s.length&&a("noDataServices");var c={layer:r,dataItemServices:s,datasetName:u,featureType:l,resolve:t,reject:a,baseProjection:i};if(o){var h=s.filter(function(t){return t&&"RESTDATA"===t.serviceType;})[0];e._isMvt(h.address,u,i).then(function(t){e._getServiceInfoFromLayer(c,t);}).catch(function(){e._getServiceInfoFromLayer(c);});}else e._getServiceInfoFromLayer(c);});}else a("resultIsEmpty");}).catch(function(t){a(t);});});}},{key:"_isMvt",value:function value(t,e,r){return this._getDatasetsInfo(t,e).then(function(t){return t.epsgCode==r.split("EPSG:")[1]?wr.get("".concat(t.url,"/tilefeature.mvt")).then(function(t){return t.json();}).then(function(e){return t.isMvt=e.error&&400===e.error.code,t;}).catch(function(){return t;}):t;});}},{key:"_getServiceInfoFromLayer",value:function value(t,e){var r=this,n=t.layer,i=t.dataItemServices,o=t.datasetName,a=t.featureType,s=t.resolve,u=t.reject,l=t.baseProjection,c=e?!e.isMvt:"HOSTED_TILE"===n.layerType,h=!1;i.forEach(function(t){h||(t&&c&&"RESTMAP"===t.serviceType?(h=!0,r._getTileLayerInfo(t.address,l).then(function(t){s({type:"restMap",restMaps:t});})):t&&!c&&"RESTDATA"===t.serviceType&&(e&&e.isMvt?s({type:"mvt",info:e,featureType:a}):(h=!0,r._getDatasources(t.address).then(function(e){n.dataSource.dataSourceName=e+":"+o,n.dataSource.url="".concat(t.address,"/data"),r._getFeatureBySQL(n.dataSource.url,[n.dataSource.dataSourceName||n.name],function(t){var e=r.parseGeoJsonData2Feature({allDatas:{features:t.result.features.features}});s({type:"feature",features:e});},function(t){u(t);});},function(t){u(t);}))));},this),h||u("noService");}},{key:"_getDatasetsInfo",value:function value(t,e){var r=this;return this._getDatasources(t).then(function(n){var i="".concat(t,"/data/datasources/").concat(n,"/datasets/").concat(e),o=r.handleProxy();return i=r.handleParentRes(i),wr.get(i,null,{withCredentials:r.handleWithCredentials(o,i,!1),proxy:o}).then(function(t){return t.json();}).then(function(t){return{epsgCode:t.datasetInfo.prjCoordSys.epsgCode,bounds:t.datasetInfo.bounds,datasourceName:n,datasetName:e,url:i};});});}},{key:"_getDatasources",value:function value(t){var e=this.handleProxy(),r="".concat(t,"/data/datasources.json");return r=this.handleParentRes(r),wr.get(r,null,{withCredentials:this.handleWithCredentials(e,r,!1),proxy:e}).then(function(t){return t.json();}).then(function(t){if(401===t.code)throw Error(t.errorMsg);return t.datasourceNames[0];});}},{key:"_getDataService",value:function value(t,e){var r=this.handleProxy(),n="".concat(this.serverUrl,"web/datas/").concat(t,".json");return n=this.handleParentRes(n),wr.get(n,null,{withCredentials:this.handleWithCredentials(r,n,this.withCredentials),proxy:r}).then(function(t){return t.json();}).then(function(r){return r.fileId=t,r.datasetName=e,r;});}},{key:"_checkUploadToRelationship",value:function value(t){var e=this.handleProxy(),r="".concat(this.serverUrl,"web/datas/").concat(t,"/datasets.json");return r=this.handleParentRes(r),wr.get(r,null,{withCredentials:this.handleWithCredentials(e,r,this.withCredentials),proxy:e}).then(function(t){return t.json();}).then(function(t){return t;});}},{key:"_handleMapUrl",value:function value(){var t=this.serverUrl+"web/maps/"+this.mapId+"/map";this.credentialValue&&this.credentialKey&&(t+="?"+this.credentialKey+"="+this.credentialValue);var e="getUrlResource.json?url=";if(this.excludePortalProxyUrl&&this.serverUrl.indexOf(e)>-1){var r=this.serverUrl.split(e);r.length>1&&(t=r[0]+e+this.serverUrl+"web/maps/"+this.mapId+"/map.json");}return-1===t.indexOf(".json")?"".concat(t,".json"):t;}},{key:"handleProxy",value:function value(t){if(!this.proxy)return null;var e=this.proxyOptions[t||"data"],r=this.serverUrl+e;return"string"==typeof this.proxy&&(r=this.proxy),r;}},{key:"handleWithCredentials",value:function value(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.withCredentials;return e&&e.includes("https://www.supermapol.com")?"":!(!t||!t.startsWith(this.serverUrl)||e&&!e.startsWith(t))||!!(e&&this.iportalServiceProxyUrl&&e.indexOf(this.iportalServiceProxyUrl)>=0)||r;}},{key:"isIportalResourceUrl",value:function value(t){return t.startsWith(this.serverUrl)||this.iportalServiceProxyUrl&&t.indexOf(this.iportalServiceProxyUrl)>=0;}},{key:"handleParentRes",value:function value(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mapId,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"MAP";return this.isIportalResourceUrl(t)?mr.urlAppend(t,"parentResType=".concat(r,"&parentResId=").concat(e)):t;}},{key:"_formatGeoJSON",value:function value(t){var e=t.features;return e.forEach(function(t,e){t.properties.index=e;}),e;}},{key:"_excelData2Feature",value:function value(t){var e,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.colTitles,o=i.indexOf(n.xField),a=i.indexOf(n.yField);if(a<0||o<0)for(var s=0,u=i.length;s<u;s++)e=i[s],r=void 0,("x"===(r=e.toLowerCase())||"smx"===r||"jd"===r||"经度"===r||"东经"===r||"longitude"===r||"lot"===r||"lon"===r||"lng"===r||"x坐标"===r)&&(o=s),ds(i[s])&&(a=s);for(var l=[],c=0,h=t.rows.length;c<h;c++){var f=t.rows[c],p=Number(f[o]),y=Number(f[a]);if(!isNaN(p)&&!isNaN(y)){for(var d={},v=0;v<t.colTitles.length;v++)d[t.colTitles[v].trim()]=t.rows[c][v];d.index=c+"";var m={type:"Feature",geometry:{type:"Point",coordinates:[p,y]},properties:d};l.push(m);}}return l;}},{key:"_excelData2FeatureByDivision",value:function value(t,e,r){var n=this,i=["城市","City"].includes(e)?"MunicipalData":"ProvinceData";if(window[i]&&window[i].features)return new Promise(function(e){e(n._combineFeature(t,window[i],r));});var o=["城市","City"].includes(e)?"MunicipalData.js":"ProvincialData.js",a=this.handleProxy(),s="".concat(this.serverUrl,"apps/dataviz/libs/administrative_data/").concat(o);return wr.get(s,null,{withCredentials:!1,proxy:a,withoutFormatSuffix:!0}).then(function(t){return t.text();}).then(function(e){return new Function(e)(),n._combineFeature(t,window[i],r);});}},{key:"_combineFeature",value:function value(t,e,r){var n=this,i={type:"FeatureCollection",features:[]};if(t.length<2)return i;var o=t.colTitles,a=t.rows,s=o.findIndex(function(t){return t===r;});return a.forEach(function(t){var r=e.features.find(function(e){return n._isMatchAdministrativeName(e.properties.Name,t[s]);});if(r){var a=r.properties.Province,u={properties:{},geometry:r.geometry,type:"Feature"};t.forEach(function(t,e){u.properties[o[e]]=t;}),a&&(u.properties.Province=a),i.features.push(u);}}),i;}},{key:"_isMatchAdministrativeName",value:function value(t,e){if(t&&"string"==typeof e&&e.constructor===String){var r=t.trim().substr(0,2);return"张家"===r&&(r=t.trim().substr(0,3)),"阿拉"===r&&(r=t.trim().substr(0,3)),!!e.match(new RegExp(r));}return!1;}},{key:"_getTileLayerInfo",value:function value(t,e){var r=this,n=this.handleProxy(),i=e.split("EPSG:")[1],o="".concat(t,"/maps.json");return o=this.handleParentRes(o),wr.get(o,null,{withCredentials:this.handleWithCredentials(n,o,this.withCredentials),proxy:n}).then(function(t){return t.json();}).then(function(t){var e=[];return t&&t.forEach(function(t){var o=wr.get("".concat(t.path,".json?prjCoordSys=").concat(JSON.stringify({epsgCode:i})),null,{withCredentials:r.withCredentials,proxy:n}).then(function(t){return t.json();}).then(function(e){return e.url=t.path,e;});e.push(o);}),Promise.all(e).then(function(t){return t;});});}},{key:"_getFeatureBySQL",value:function value(t,e,r,n,i){var o,a,s=this;o=new ma({name:e.join().replace(":","@"),attributeFilter:null}),a=new Xa({queryParameter:o,datasetNames:e,fromIndex:0,toIndex:-1,maxFeatures:-1,returnContent:!0}),i&&"EPSG:4326"!==i&&(a.targetEpsgCode=4326);var u=this.handleProxy(),l={proxy:u,withCredentials:this.handleWithCredentials(u,t,!1),eventListeners:{processCompleted:function processCompleted(t){var e=t.result;if(e&&e.datasetInfos){var n=[],i=[],o=[];e.datasetInfos[0].fieldInfos.forEach(function(t){t.name&&(n.push(t.name.toUpperCase()),i.push(t.caption.toUpperCase()),o.push(t.type));});var a=s.statisticsFeatures(e.features.features,n,i,o);t.result.features.features=a.features;}r&&r(t);},processFailed:function processFailed(t){n&&n(t);}}},c=this.handleParentRes(t);new ns(c,l).processAsync(a);}},{key:"statisticsFeatures",value:function value(t,e,r,n){var i={features:t,fields:e||[],fieldValues:[],fieldTypes:n};if(t&&t.length){r&&r.length&&t.forEach(function(t){var n={};for(var i in t.properties){var o=e.indexOf(i);n[r[o]||i]=t.properties[i];}t.properties=n;});var o=Object.assign({},t[0].properties,t[t.length-1].properties);i.fields=Object.keys(o);}for(var a in i.fields){var s=[];for(var u in t){var l=t[u],c=i.fields[a],h=l.properties[c];s.push(h);}i.fieldValues.push(s);}return i;}},{key:"numberEqual",value:function value(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e-5;return Math.abs(+t-+e)<=r;}}],e&&Ps(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r;}(),Ns=1,js=2,Is=3,Rs=5,Ls=6378137,Fs=6356752.314,Ds=.0066943799901413165,Bs=484813681109536e-20,Gs=Math.PI/2,Us=1e-10,Vs=.017453292519943295,qs=57.29577951308232,zs=Math.PI/4,Hs=2*Math.PI,Qs=3.14159265359,Ws={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};var Xs={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var Ys=/[\s_\-\/\(\)]/g;function Js(t,e){if(t[e])return t[e];for(var r,n=Object.keys(t),i=e.toLowerCase().replace(Ys,""),o=-1;++o<n.length;)if((r=n[o]).toLowerCase().replace(Ys,"")===i)return t[r];}function $s(t){var e,r,n,i={},o=t.split("+").map(function(t){return t.trim();}).filter(function(t){return t;}).reduce(function(t,e){var r=e.split("=");return r.push(!0),t[r[0].toLowerCase()]=r[1],t;},{}),a={proj:"projName",datum:"datumCode",rf:function rf(t){i.rf=parseFloat(t);},lat_0:function lat_0(t){i.lat0=t*Vs;},lat_1:function lat_1(t){i.lat1=t*Vs;},lat_2:function lat_2(t){i.lat2=t*Vs;},lat_ts:function lat_ts(t){i.lat_ts=t*Vs;},lon_0:function lon_0(t){i.long0=t*Vs;},lon_1:function lon_1(t){i.long1=t*Vs;},lon_2:function lon_2(t){i.long2=t*Vs;},alpha:function alpha(t){i.alpha=parseFloat(t)*Vs;},gamma:function gamma(t){i.rectified_grid_angle=parseFloat(t);},lonc:function lonc(t){i.longc=t*Vs;},x_0:function x_0(t){i.x0=parseFloat(t);},y_0:function y_0(t){i.y0=parseFloat(t);},k_0:function k_0(t){i.k0=parseFloat(t);},k:function k(t){i.k0=parseFloat(t);},a:function a(t){i.a=parseFloat(t);},b:function b(t){i.b=parseFloat(t);},r:function r(t){i.a=i.b=parseFloat(t);},r_a:function r_a(){i.R_A=!0;},zone:function zone(t){i.zone=parseInt(t,10);},south:function south(){i.utmSouth=!0;},towgs84:function towgs84(t){i.datum_params=t.split(",").map(function(t){return parseFloat(t);});},to_meter:function to_meter(t){i.to_meter=parseFloat(t);},units:function units(t){i.units=t;var e=Js(Xs,t);e&&(i.to_meter=e.to_meter);},from_greenwich:function from_greenwich(t){i.from_greenwich=t*Vs;},pm:function pm(t){var e=Js(Ws,t);i.from_greenwich=(e||parseFloat(t))*Vs;},nadgrids:function nadgrids(t){"@null"===t?i.datumCode="none":i.nadgrids=t;},axis:function axis(t){var e="ewnsud";3===t.length&&-1!==e.indexOf(t.substr(0,1))&&-1!==e.indexOf(t.substr(1,1))&&-1!==e.indexOf(t.substr(2,1))&&(i.axis=t);},approx:function approx(){i.approx=!0;}};for(e in o)r=o[e],e in a?"function"==typeof(n=a[e])?n(r):i[n]=r:i[e]=r;return"string"==typeof i.datumCode&&"WGS84"!==i.datumCode&&(i.datumCode=i.datumCode.toLowerCase()),i;}var Ks=function Ks(t){return new ou(t).output();};var Zs=1,tu=/\s/,eu=/[A-Za-z]/,ru=/[A-Za-z84_]/,nu=/[,\]]/,iu=/[\d\.E\-\+]/;function ou(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=Zs;}function au(t,e,r){Array.isArray(e)&&(r.unshift(e),e=null);var n=e?{}:t,i=r.reduce(function(t,e){return su(e,t),t;},n);e&&(t[e]=i);}function su(t,e){if(Array.isArray(t)){var r=t.shift();if("PARAMETER"===r&&(r=t.shift()),1===t.length)return Array.isArray(t[0])?(e[r]={},void su(t[0],e[r])):void(e[r]=t[0]);if(t.length){if("TOWGS84"!==r){if("AXIS"===r)return r in e||(e[r]=[]),void e[r].push(t);var n;switch(Array.isArray(r)||(e[r]={}),r){case"UNIT":case"PRIMEM":case"VERT_DATUM":return e[r]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&su(t[2],e[r]));case"SPHEROID":case"ELLIPSOID":return e[r]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&su(t[3],e[r]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return t[0]=["name",t[0]],void au(e,r,t);default:for(n=-1;++n<t.length;)if(!Array.isArray(t[n]))return su(t,e[r]);return au(e,r,t);}}else e[r]=t;}else e[r]=!0;}else e[t]=!0;}function uu(t){return uu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},uu(t);}ou.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;tu.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++];}switch(this.state){case Zs:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return;}},ou.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(nu.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place);},ou.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=Zs)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=Zs,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0;},ou.prototype.number=function(t){if(!iu.test(t)){if(nu.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place);}this.word+=t;},ou.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5;},ou.prototype.keyword=function(t){if(ru.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=Zs);}if(!nu.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t);}},ou.prototype.neutral=function(t){if(eu.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(iu.test(t))return this.word=t,void(this.state=3);if(!nu.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t);},ou.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state);};var lu=.017453292519943295;function cu(t){return t*lu;}function hu(t){var e=Ks(t),r=e.shift(),n=e.shift();e.unshift(["name",n]),e.unshift(["type",r]);var i={};return su(e,i),function(t){if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"===uu(t.PROJECTION)?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var e="",r=0,n=t.AXIS.length;r<n;++r){var i=[t.AXIS[r][0].toLowerCase(),t.AXIS[r][1].toLowerCase()];-1!==i[0].indexOf("north")||("y"===i[0]||"lat"===i[0])&&"north"===i[1]?e+="n":-1!==i[0].indexOf("south")||("y"===i[0]||"lat"===i[0])&&"south"===i[1]?e+="s":-1!==i[0].indexOf("east")||("x"===i[0]||"lon"===i[0])&&"east"===i[1]?e+="e":-1===i[0].indexOf("west")&&("x"!==i[0]&&"lon"!==i[0]||"west"!==i[1])||(e+="w");}2===e.length&&(e+="u"),3===e.length&&(t.axis=e);}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var o=t.GEOGCS;function a(e){return e*(t.to_meter||1);}"GEOGCS"===t.type&&(o=t),o&&(o.DATUM?t.datumCode=o.DATUM.name.toLowerCase():t.datumCode=o.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==t.datumCode&&"new_zealand_1949"!==t.datumCode||(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"_ferro"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),"_jakarta"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf("belge")&&(t.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(t.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=o.DATUM.SPHEROID.a,t.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(t.datum_params=o.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",cu],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",cu],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",cu],["lat0","latitude_of_origin",cu],["lat0","standard_parallel_1",cu],["lat1","standard_parallel_1",cu],["lat2","standard_parallel_2",cu],["azimuth","Azimuth"],["alpha","azimuth",cu],["srsCode","name"]].forEach(function(e){return function(t,e){var r=e[0],n=e[1];!(r in t)&&n in t&&(t[r]=t[n],3===e.length&&(t[r]=e[2](t[r])));}(t,e);}),t.long0||!t.longc||"Albers_Conic_Equal_Area"!==t.projName&&"Lambert_Azimuthal_Equal_Area"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||"Stereographic_South_Pole"!==t.projName&&"Polar Stereographic (variant B)"!==t.projName?!t.lat_ts&&t.lat0&&"Polar_Stereographic"===t.projName&&(t.lat_ts=t.lat0,t.lat0=cu(t.lat0>0?90:-90)):(t.lat0=cu(t.lat1>0?90:-90),t.lat_ts=t.lat1);}(i),i;}function fu(t){var e=this;if(2===arguments.length){var r=arguments[1];"string"==typeof r?"+"===r.charAt(0)?fu[t]=$s(arguments[1]):fu[t]=hu(arguments[1]):fu[t]=r;}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){Array.isArray(t)?fu.apply(e,t):fu(t);});if("string"==typeof t){if(t in fu)return fu[t];}else"EPSG"in t?fu["EPSG:"+t.EPSG]=t:"ESRI"in t?fu["ESRI:"+t.ESRI]=t:"IAU2000"in t?fu["IAU2000:"+t.IAU2000]=t:console.log(t);return;}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"];}(fu);var pu=fu;var yu=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"],du=["3857","900913","3785","102113"];function vu(t,e){var r,n;if(t=t||{},!e)return t;for(n in e)void 0!==(r=e[n])&&(t[n]=r);return t;}function mu(t,e,r){var n=t*e;return r/Math.sqrt(1-n*n);}function gu(t){return t<0?-1:1;}function bu(t){return Math.abs(t)<=Qs?t:t-gu(t)*Hs;}function xu(t,e,r){var n=t*r,i=.5*t;return n=Math.pow((1-n)/(1+n),i),Math.tan(.5*(Gs-e))/n;}function wu(t,e){for(var r,n,i=.5*t,o=Gs-2*Math.atan(e),a=0;a<=15;a++)if(r=t*Math.sin(o),o+=n=Gs-2*Math.atan(e*Math.pow((1-r)/(1+r),i))-o,Math.abs(n)<=1e-10)return o;return-9999;}var Su={init:function init(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=mu(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1);},forward:function forward(t){var e,r,n=t.x,i=t.y;if(i*qs>90&&i*qs<-90&&n*qs>180&&n*qs<-180)return null;if(Math.abs(Math.abs(i)-Gs)<=Us)return null;if(this.sphere)e=this.x0+this.a*this.k0*bu(n-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(zs+.5*i));else{var o=Math.sin(i),a=xu(this.e,i,o);e=this.x0+this.a*this.k0*bu(n-this.long0),r=this.y0-this.a*this.k0*Math.log(a);}return t.x=e,t.y=r,t;},inverse:function inverse(t){var e,r,n=t.x-this.x0,i=t.y-this.y0;if(this.sphere)r=Gs-2*Math.atan(Math.exp(-i/(this.a*this.k0)));else{var o=Math.exp(-i/(this.a*this.k0));if(-9999===(r=wu(this.e,o)))return null;}return e=bu(this.long0+n/(this.a*this.k0)),t.x=e,t.y=r,t;},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]};function _u(t){return t;}var Mu=[Su,{init:function init(){},forward:_u,inverse:_u,names:["longlat","identity"]}],Ou={},Pu=[];function ku(t,e){var r=Pu.length;return t.names?(Pu[r]=t,t.names.forEach(function(t){Ou[t.toLowerCase()]=r;}),this):(console.log(e),!0);}var Eu={start:function start(){Mu.forEach(ku);},add:ku,get:function get(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==Ou[e]&&Pu[Ou[e]]?Pu[Ou[e]]:void 0;}};var Cu={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},Tu=Cu.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Cu.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var Au={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},militargeographische_institut:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}};var Nu={};function ju(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:Nu[t]||null,isNull:!1};}function Iu(t){return t/3600*Math.PI/180;}function Ru(t,e,r){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,r)));}function Lu(t){return t.map(function(t){return[Iu(t.longitudeShift),Iu(t.latitudeShift)];});}function Fu(t,e,r){return{name:Ru(t,e+8,e+16).trim(),parent:Ru(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,r),upperLatitude:t.getFloat64(e+88,r),lowerLongitude:t.getFloat64(e+104,r),upperLongitude:t.getFloat64(e+120,r),latitudeInterval:t.getFloat64(e+136,r),longitudeInterval:t.getFloat64(e+152,r),gridNodeCount:t.getInt32(e+168,r)};}function Du(t,e,r,n){for(var i=e+176,o=[],a=0;a<r.gridNodeCount;a++){var s={latitudeShift:t.getFloat32(i+16*a,n),longitudeShift:t.getFloat32(i+16*a+4,n),latitudeAccuracy:t.getFloat32(i+16*a+8,n),longitudeAccuracy:t.getFloat32(i+16*a+12,n)};o.push(s);}return o;}function Bu(t,e){if(!(this instanceof Bu))return new Bu(t);e=e||function(t){if(t)throw t;};var r=function(t){if(!function(t){return"string"==typeof t;}(t))return t;if(function(t){return t in pu;}(t))return pu[t];if(function(t){return yu.some(function(e){return t.indexOf(e)>-1;});}(t)){var e=hu(t);if(function(t){var e=Js(t,"authority");if(e){var r=Js(e,"epsg");return r&&du.indexOf(r)>-1;}}(e))return pu["EPSG:3857"];var r=function(t){var e=Js(t,"extension");if(e)return Js(e,"proj4");}(e);return r?$s(r):e;}return function(t){return"+"===t[0];}(t)?$s(t):void 0;}(t);if("object"==typeof r){var n=Bu.projections.get(r.projName);if(n){if(r.datumCode&&"none"!==r.datumCode){var i=Js(Au,r.datumCode);i&&(r.datum_params=r.datum_params||(i.towgs84?i.towgs84.split(","):null),r.ellps=i.ellipse,r.datumName=i.datumName?i.datumName:r.datumCode);}r.k0=r.k0||1,r.axis=r.axis||"enu",r.ellps=r.ellps||"wgs84",r.lat1=r.lat1||r.lat0;var o=function(t,e,r,n,i){if(!t){var o=Js(Cu,n);o||(o=Tu),t=o.a,e=o.b,r=o.rf;}return r&&!e&&(e=(1-1/r)*t),(0===r||Math.abs(t-e)<Us)&&(i=!0,e=t),{a:t,b:e,rf:r,sphere:i};}(r.a,r.b,r.rf,r.ellps,r.sphere),a=function(t,e,r,n){var i=t*t,o=e*e,a=(i-o)/i,s=0;return n?(i=(t*=1-a*(.16666666666666666+a*(.04722222222222222+.022156084656084655*a)))*t,a=0):s=Math.sqrt(a),{es:a,e:s,ep2:(i-o)/o};}(o.a,o.b,o.rf,r.R_A),s=function(t){return void 0===t?null:t.split(",").map(ju);}(r.nadgrids),u=r.datum||function(t,e,r,n,i,o,a){var s={};return s.datum_type=void 0===t||"none"===t?Rs:4,e&&(s.datum_params=e.map(parseFloat),0===s.datum_params[0]&&0===s.datum_params[1]&&0===s.datum_params[2]||(s.datum_type=Ns),s.datum_params.length>3&&(0===s.datum_params[3]&&0===s.datum_params[4]&&0===s.datum_params[5]&&0===s.datum_params[6]||(s.datum_type=js,s.datum_params[3]*=Bs,s.datum_params[4]*=Bs,s.datum_params[5]*=Bs,s.datum_params[6]=s.datum_params[6]/1e6+1))),a&&(s.datum_type=Is,s.grids=a),s.a=r,s.b=n,s.es=i,s.ep2=o,s;}(r.datumCode,r.datum_params,o.a,o.b,a.es,a.ep2,s);vu(this,r),vu(this,n),this.a=o.a,this.b=o.b,this.rf=o.rf,this.sphere=o.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=u,this.init(),e(null,this);}else e(t);}else e(t);}Bu.projections=Eu,Bu.projections.start();var Gu=Bu;function Uu(t,e,r){var n,i,o,a,s=t.x,u=t.y,l=t.z?t.z:0;if(u<-Gs&&u>-1.001*Gs)u=-Gs;else if(u>Gs&&u<1.001*Gs)u=Gs;else{if(u<-Gs)return{x:-1/0,y:-1/0,z:t.z};if(u>Gs)return{x:1/0,y:1/0,z:t.z};}return s>Math.PI&&(s-=2*Math.PI),i=Math.sin(u),a=Math.cos(u),o=i*i,{x:((n=r/Math.sqrt(1-e*o))+l)*a*Math.cos(s),y:(n+l)*a*Math.sin(s),z:(n*(1-e)+l)*i};}function Vu(t,e,r,n){var i,o,a,s,u,l,c,h,f,p,y,d,v,m,g,b=t.x,x=t.y,w=t.z?t.z:0;if(i=Math.sqrt(b*b+x*x),o=Math.sqrt(b*b+x*x+w*w),i/r<1e-12){if(m=0,o/r<1e-12)return g=-n,{x:t.x,y:t.y,z:t.z};}else m=Math.atan2(x,b);a=w/o,h=(s=i/o)*(1-e)*(u=1/Math.sqrt(1-e*(2-e)*s*s)),f=a*u,v=0;do{v++,l=e*(c=r/Math.sqrt(1-e*f*f))/(c+(g=i*h+w*f-c*(1-e*f*f))),d=(y=a*(u=1/Math.sqrt(1-l*(2-l)*s*s)))*h-(p=s*(1-l)*u)*f,h=p,f=y;}while(d*d>1e-24&&v<30);return{x:m,y:Math.atan(y/Math.abs(p)),z:g};}function qu(t){return t===Ns||t===js;}function zu(t,e,r){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;var n={x:-r.x,y:r.y},i={x:Number.NaN,y:Number.NaN},o=[];t:for(var a=0;a<t.grids.length;a++){var s=t.grids[a];if(o.push(s.name),s.isNull){i=n;break;}if(s.mandatory,null!==s.grid)for(var u=s.grid.subgrids,l=0,c=u.length;l<c;l++){var h=u[l],f=(Math.abs(h.del[1])+Math.abs(h.del[0]))/1e4,p=h.ll[0]-f,y=h.ll[1]-f,d=h.ll[0]+(h.lim[0]-1)*h.del[0]+f,v=h.ll[1]+(h.lim[1]-1)*h.del[1]+f;if(!(y>n.y||p>n.x||v<n.y||d<n.x||(i=Hu(n,e,h),isNaN(i.x))))break t;}else if(s.mandatory)return console.log("Unable to find mandatory grid '"+s.name+"'"),-1;}return isNaN(i.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*qs+" "+n.y*qs+" tried: '"+o+"'"),-1):(r.x=-i.x,r.y=i.y,0);}function Hu(t,e,r){var n={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return n;var i={x:t.x,y:t.y};i.x-=r.ll[0],i.y-=r.ll[1],i.x=bu(i.x-Math.PI)+Math.PI;var o=Qu(i,r);if(e){if(isNaN(o.x))return n;o.x=i.x-o.x,o.y=i.y-o.y;var a,s,u=9;do{if(s=Qu(o,r),isNaN(s.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break;}a={x:i.x-(s.x+o.x),y:i.y-(s.y+o.y)},o.x+=a.x,o.y+=a.y;}while(u--&&Math.abs(a.x)>1e-12&&Math.abs(a.y)>1e-12);if(u<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=bu(o.x+r.ll[0]),n.y=o.y+r.ll[1];}else isNaN(o.x)||(n.x=t.x+o.x,n.y=t.y+o.y);return n;}function Qu(t,e){var r,n={x:t.x/e.del[0],y:t.y/e.del[1]},i=Math.floor(n.x),o=Math.floor(n.y),a=n.x-1*i,s=n.y-1*o,u={x:Number.NaN,y:Number.NaN};if(i<0||i>=e.lim[0])return u;if(o<0||o>=e.lim[1])return u;r=o*e.lim[0]+i;var l=e.cvs[r][0],c=e.cvs[r][1];r++;var h=e.cvs[r][0],f=e.cvs[r][1];r+=e.lim[0];var p=e.cvs[r][0],y=e.cvs[r][1];r--;var d=e.cvs[r][0],v=e.cvs[r][1],m=a*s,g=a*(1-s),b=(1-a)*(1-s),x=(1-a)*s;return u.x=b*l+g*h+x*d+m*p,u.y=b*c+g*f+x*v+m*y,u;}function Wu(t,e,r){var n,i,o,a=r.x,s=r.y,u=r.z||0,l={};for(o=0;o<3;o++)if(!e||2!==o||void 0!==r.z)switch(0===o?(n=a,i=-1!=="ew".indexOf(t.axis[o])?"x":"y"):1===o?(n=s,i=-1!=="ns".indexOf(t.axis[o])?"y":"x"):(n=u,i="z"),t.axis[o]){case"e":case"n":l[i]=n;break;case"w":case"s":l[i]=-n;break;case"u":void 0!==r[i]&&(l.z=n);break;case"d":void 0!==r[i]&&(l.z=-n);break;default:return null;}return l;}function Xu(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e;}function Yu(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers");}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers");}function Ju(t,e,r,n){var i,o=void 0!==(r=Array.isArray(r)?Xu(r):{x:r.x,y:r.y,z:r.z,m:r.m}).z;if(function(t){Yu(t.x),Yu(t.y);}(r),t.datum&&e.datum&&function(t,e){return(t.datum.datum_type===Ns||t.datum.datum_type===js||t.datum.datum_type===Is)&&"WGS84"!==e.datumCode||(e.datum.datum_type===Ns||e.datum.datum_type===js||e.datum.datum_type===Is)&&"WGS84"!==t.datumCode;}(t,e)&&(r=Ju(t,i=new Gu("WGS84"),r,n),t=i),n&&"enu"!==t.axis&&(r=Wu(t,!1,r)),"longlat"===t.projName)r={x:r.x*Vs,y:r.y*Vs,z:r.z||0};else if(t.to_meter&&(r={x:r.x*t.to_meter,y:r.y*t.to_meter,z:r.z||0}),!(r=t.inverse(r)))return;if(t.from_greenwich&&(r.x+=t.from_greenwich),r=function(t,e,r){if(function(t,e){return t.datum_type===e.datum_type&&!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(t.datum_type===Ns?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:t.datum_type!==js||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6]);}(t,e))return r;if(t.datum_type===Rs||e.datum_type===Rs)return r;var n=t.a,i=t.es;if(t.datum_type===Is){if(0!==zu(t,!1,r))return;n=Ls,i=Ds;}var o=e.a,a=e.b,s=e.es;return e.datum_type===Is&&(o=Ls,a=Fs,s=Ds),i!==s||n!==o||qu(t.datum_type)||qu(e.datum_type)?(r=Uu(r,i,n),qu(t.datum_type)&&(r=function(t,e,r){if(e===Ns)return{x:t.x+r[0],y:t.y+r[1],z:t.z+r[2]};if(e===js){var n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],l=r[6];return{x:l*(t.x-u*t.y+s*t.z)+n,y:l*(u*t.x+t.y-a*t.z)+i,z:l*(-s*t.x+a*t.y+t.z)+o};}}(r,t.datum_type,t.datum_params)),qu(e.datum_type)&&(r=function(t,e,r){if(e===Ns)return{x:t.x-r[0],y:t.y-r[1],z:t.z-r[2]};if(e===js){var n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],l=r[6],c=(t.x-n)/l,h=(t.y-i)/l,f=(t.z-o)/l;return{x:c+u*h-s*f,y:-u*c+h+a*f,z:s*c-a*h+f};}}(r,e.datum_type,e.datum_params)),r=Vu(r,s,o,a),e.datum_type!==Is||0===zu(e,!0,r)?r:void 0):r;}(t.datum,e.datum,r))return e.from_greenwich&&(r={x:r.x-e.from_greenwich,y:r.y,z:r.z||0}),"longlat"===e.projName?r={x:r.x*qs,y:r.y*qs,z:r.z||0}:(r=e.forward(r),e.to_meter&&(r={x:r.x/e.to_meter,y:r.y/e.to_meter,z:r.z||0})),n&&"enu"!==e.axis?Wu(e,!0,r):(r&&!o&&delete r.z,r);}var $u=Gu("WGS84");function Ku(t,e,r,n){var i,o,a;return Array.isArray(r)?(i=Ju(t,e,r,n)||{x:NaN,y:NaN},r.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof i.z?[i.x,i.y,i.z].concat(r.splice(3)):[i.x,i.y,r[2]].concat(r.splice(3)):[i.x,i.y].concat(r.splice(2)):[i.x,i.y]):(o=Ju(t,e,r,n),2===(a=Object.keys(r)).length||a.forEach(function(n){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===n||"y"===n||"z"===n)return;}else if("x"===n||"y"===n)return;o[n]=r[n];}),o);}function Zu(t){return t instanceof Gu?t:t.oProj?t.oProj:Gu(t);}var tl=function tl(t,e,r){t=Zu(t);var n,i=!1;return void 0===e?(e=t,t=$u,i=!0):(void 0!==e.x||Array.isArray(e))&&(r=e,e=t,t=$u,i=!0),e=Zu(e),r?Ku(t,e,r):(n={forward:function forward(r,n){return Ku(t,e,r,n);},inverse:function inverse(r,n){return Ku(e,t,r,n);}},i&&(n.oProj=e),n);};var el=6,rl="AJSAJS",nl="AFAFAF",il=65,ol=73,al=79,sl=86,ul=90;var ll={forward:cl,inverse:function inverse(t){var e=yl(vl(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top];},toPoint:hl};function cl(t,e){return e=e||5,function(t,e){var r,n,i,o,a,s,u,l,c,h,f,p,y,d="00000"+t.easting,v="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(c=t.easting,h=t.northing,f=dl(t.zoneNumber),p=Math.floor(c/1e5),y=Math.floor(h/1e5)%20,r=p,n=y,i=f-1,o=rl.charCodeAt(i),a=nl.charCodeAt(i),l=!1,(s=o+r-1)>ul&&(s=s-ul+il-1,l=!0),(s===ol||o<ol&&s>ol||(s>ol||o<ol)&&l)&&s++,(s===al||o<al&&s>al||(s>al||o<al)&&l)&&++s===ol&&s++,s>ul&&(s=s-ul+il-1),(u=a+n)>sl?(u=u-sl+il-1,l=!0):l=!1,(u===ol||a<ol&&u>ol||(u>ol||a<ol)&&l)&&u++,(u===al||a<al&&u>al||(u>al||a<al)&&l)&&++u===ol&&u++,u>sl&&(u=u-sl+il-1),String.fromCharCode(s)+String.fromCharCode(u))+d.substr(d.length-5,e)+v.substr(v.length-5,e);}(function(t){var e,r,n,i,o,a,s,u=t.lat,l=t.lon,c=6378137,h=.00669438,f=.9996,p=fl(u),y=fl(l);s=Math.floor((l+180)/6)+1,180===l&&(s=60),u>=56&&u<64&&l>=3&&l<12&&(s=32),u>=72&&u<84&&(l>=0&&l<9?s=31:l>=9&&l<21?s=33:l>=21&&l<33?s=35:l>=33&&l<42&&(s=37)),a=fl(6*(s-1)-180+3),e=.006739496752268451,r=c/Math.sqrt(1-h*Math.sin(p)*Math.sin(p)),n=Math.tan(p)*Math.tan(p),i=e*Math.cos(p)*Math.cos(p);var d,v,m=f*r*((o=Math.cos(p)*(y-a))+(1-n+i)*o*o*o/6+(5-18*n+n*n+72*i-58*e)*o*o*o*o*o/120)+5e5,g=f*(c*(.9983242984503243*p-.002514607064228144*Math.sin(2*p)+2639046602129982e-21*Math.sin(4*p)-3.418046101696858e-9*Math.sin(6*p))+r*Math.tan(p)*(o*o/2+(5-n+9*i+4*i*i)*o*o*o*o/24+(61-58*n+n*n+600*i-2.2240339282485886)*o*o*o*o*o*o/720));return u<0&&(g+=1e7),{northing:Math.round(g),easting:Math.round(m),zoneNumber:s,zoneLetter:(d=u,v="Z",84>=d&&d>=72?v="X":72>d&&d>=64?v="W":64>d&&d>=56?v="V":56>d&&d>=48?v="U":48>d&&d>=40?v="T":40>d&&d>=32?v="S":32>d&&d>=24?v="R":24>d&&d>=16?v="Q":16>d&&d>=8?v="P":8>d&&d>=0?v="N":0>d&&d>=-8?v="M":-8>d&&d>=-16?v="L":-16>d&&d>=-24?v="K":-24>d&&d>=-32?v="J":-32>d&&d>=-40?v="H":-40>d&&d>=-48?v="G":-48>d&&d>=-56?v="F":-56>d&&d>=-64?v="E":-64>d&&d>=-72?v="D":-72>d&&d>=-80&&(v="C"),v)};}({lat:t[1],lon:t[0]}),e);}function hl(t){var e=yl(vl(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2];}function fl(t){return t*(Math.PI/180);}function pl(t){return t/Math.PI*180;}function yl(t){var e=t.northing,r=t.easting,n=t.zoneLetter,i=t.zoneNumber;if(i<0||i>60)return null;var o,a,s,u,l,c,h,f,p,y=.9996,d=6378137,v=.00669438,m=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),g=r-5e5,b=e;n<"N"&&(b-=1e7),h=6*(i-1)-180+3,o=.006739496752268451,p=(f=b/y/6367449.145945056)+(3*m/2-27*m*m*m/32)*Math.sin(2*f)+(21*m*m/16-55*m*m*m*m/32)*Math.sin(4*f)+151*m*m*m/96*Math.sin(6*f),a=d/Math.sqrt(1-v*Math.sin(p)*Math.sin(p)),s=Math.tan(p)*Math.tan(p),u=o*Math.cos(p)*Math.cos(p),l=.99330562*d/Math.pow(1-v*Math.sin(p)*Math.sin(p),1.5),c=g/(a*y);var x=p-a*Math.tan(p)/l*(c*c/2-(5+3*s+10*u-4*u*u-9*o)*c*c*c*c/24+(61+90*s+298*u+45*s*s-1.6983531815716497-3*u*u)*c*c*c*c*c*c/720);x=pl(x);var w,S=(c-(1+2*s+u)*c*c*c/6+(5-2*u+28*s-3*u*u+8*o+24*s*s)*c*c*c*c*c/120)/Math.cos(p);if(S=h+pl(S),t.accuracy){var _=yl({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});w={top:_.lat,right:_.lon,bottom:x,left:S};}else w={lat:x,lon:S};return w;}function dl(t){var e=t%el;return 0===e&&(e=el),e;}function vl(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,r=t.length,n=null,i="",o=0;!/[A-Z]/.test(e=t.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+t;i+=e,o++;}var a=parseInt(i,10);if(0===o||o+3>r)throw"MGRSPoint bad conversion from: "+t;var s=t.charAt(o++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+t;n=t.substring(o,o+=2);for(var u=dl(a),l=function(t,e){for(var r=rl.charCodeAt(e-1),n=1e5,i=!1;r!==t.charCodeAt(0);){if(++r===ol&&r++,r===al&&r++,r>ul){if(i)throw"Bad character: "+t;r=il,i=!0;}n+=1e5;}return n;}(n.charAt(0),u),c=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var r=nl.charCodeAt(e-1),n=0,i=!1;r!==t.charCodeAt(0);){if(++r===ol&&r++,r===al&&r++,r>sl){if(i)throw"Bad character: "+t;r=il,i=!0;}n+=1e5;}return n;}(n.charAt(1),u);c<ml(s);)c+=2e6;var h=r-o;if(h%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var f,p,y,d=h/2,v=0,m=0;return d>0&&(f=1e5/Math.pow(10,d),p=t.substring(o,o+d),v=parseFloat(p)*f,y=t.substring(o+d),m=parseFloat(y)*f),{easting:v+l,northing:m+c,zoneLetter:s,zoneNumber:a,accuracy:f};}function ml(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1;}if(e>=0)return e;throw"Invalid zone letter: "+t;}function gl(t,e,r){if(!(this instanceof gl))return new gl(t,e,r);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var n=t.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0;}else this.x=t,this.y=e,this.z=r||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint");}gl.fromMGRS=function(t){return new gl(hl(t));},gl.prototype.toMGRS=function(t){return cl([this.x,this.y],t);};var bl=gl;var xl=.046875,wl=.01953125,Sl=.01068115234375;function _l(t){var e=[];e[0]=1-t*(.25+t*(xl+t*(wl+t*Sl))),e[1]=t*(.75-t*(xl+t*(wl+t*Sl)));var r=t*t;return e[2]=r*(.46875-t*(.013020833333333334+.007120768229166667*t)),r*=t,e[3]=r*(.3645833333333333-.005696614583333333*t),e[4]=r*t*.3076171875,e;}function Ml(t,e,r,n){return r*=e,e*=e,n[0]*t-r*(n[1]+e*(n[2]+e*(n[3]+e*n[4])));}function Ol(t,e,r){for(var n=1/(1-e),i=t,o=20;o;--o){var a=Math.sin(i),s=1-e*a*a;if(i-=s=(Ml(i,a,Math.cos(i),r)-t)*(s*Math.sqrt(s))*n,Math.abs(s)<Us)return i;}return i;}var Pl={init:function init(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=_l(this.es),this.ml0=Ml(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en));},forward:function forward(t){var e,r,n,i=t.x,o=t.y,a=bu(i-this.long0),s=Math.sin(o),u=Math.cos(o);if(this.es){var l=u*a,c=Math.pow(l,2),h=this.ep2*Math.pow(u,2),f=Math.pow(h,2),p=Math.abs(u)>Us?Math.tan(o):0,y=Math.pow(p,2),d=Math.pow(y,2);e=1-this.es*Math.pow(s,2),l/=Math.sqrt(e);var v=Ml(o,s,u,this.en);r=this.a*(this.k0*l*(1+c/6*(1-y+h+c/20*(5-18*y+d+14*h-58*y*h+c/42*(61+179*d-d*y-479*y)))))+this.x0,n=this.a*(this.k0*(v-this.ml0+s*a*l/2*(1+c/12*(5-y+9*h+4*f+c/30*(61+d-58*y+270*h-330*y*h+c/56*(1385+543*d-d*y-3111*y))))))+this.y0;}else{var m=u*Math.sin(a);if(Math.abs(Math.abs(m)-1)<Us)return 93;if(r=.5*this.a*this.k0*Math.log((1+m)/(1-m))+this.x0,n=u*Math.cos(a)/Math.sqrt(1-Math.pow(m,2)),(m=Math.abs(n))>=1){if(m-1>Us)return 93;n=0;}else n=Math.acos(n);o<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0;}return t.x=r,t.y=n,t;},inverse:function inverse(t){var e,r,n,i,o=(t.x-this.x0)*(1/this.a),a=(t.y-this.y0)*(1/this.a);if(this.es){if(r=Ol(e=this.ml0+a/this.k0,this.es,this.en),Math.abs(r)<Gs){var s=Math.sin(r),u=Math.cos(r),l=Math.abs(u)>Us?Math.tan(r):0,c=this.ep2*Math.pow(u,2),h=Math.pow(c,2),f=Math.pow(l,2),p=Math.pow(f,2);e=1-this.es*Math.pow(s,2);var y=o*Math.sqrt(e)/this.k0,d=Math.pow(y,2);n=r-(e*=l)*d/(1-this.es)*.5*(1-d/12*(5+3*f-9*c*f+c-4*h-d/30*(61+90*f-252*c*f+45*p+46*c-d/56*(1385+3633*f+4095*p+1574*p*f)))),i=bu(this.long0+y*(1-d/6*(1+2*f+c-d/20*(5+28*f+24*p+8*c*f+6*c-d/42*(61+662*f+1320*p+720*p*f))))/u);}else n=Gs*gu(a),i=0;}else{var v=Math.exp(o/this.k0),m=.5*(v-1/v),g=this.lat0+a/this.k0,b=Math.cos(g);e=Math.sqrt((1-Math.pow(b,2))/(1+Math.pow(m,2))),n=Math.asin(e),a<0&&(n=-n),i=0===m&&0===b?0:bu(Math.atan2(m,b)+this.long0);}return t.x=i,t.y=n,t;},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function kl(t){var e=Math.exp(t);return(e-1/e)/2;}function El(t,e){t=Math.abs(t),e=Math.abs(e);var r=Math.max(t,e),n=Math.min(t,e)/(r||1);return r*Math.sqrt(1+Math.pow(n,2));}function Cl(t,e){for(var r,n=2*Math.cos(2*e),i=t.length-1,o=t[i],a=0;--i>=0;)r=n*o-a+t[i],a=o,o=r;return e+r*Math.sin(2*e);}function Tl(t,e,r){for(var n,i,o=Math.sin(e),a=Math.cos(e),s=kl(r),u=function(t){var e=Math.exp(t);return(e+1/e)/2;}(r),l=2*a*u,c=-2*o*s,h=t.length-1,f=t[h],p=0,y=0,d=0;--h>=0;)n=y,i=p,f=l*(y=f)-n-c*(p=d)+t[h],d=c*y-i+l*p;return[(l=o*u)*f-(c=a*s)*d,l*d+c*f];}var Al={init:function init(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Pl.init.apply(this),this.forward=Pl.forward,this.inverse=Pl.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),r=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),r*=e,this.cgb[1]=r*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=r*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),r*=e,this.cgb[2]=r*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=r*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),r*=e,this.cgb[3]=r*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=r*(1237/630+e*(e*(-24832/14175)-2.4)),r*=e,this.cgb[4]=r*(4174/315+e*(-144838/6237)),this.cbg[4]=r*(-734/315+e*(109598/31185)),r*=e,this.cgb[5]=r*(601676/22275),this.cbg[5]=r*(444337/155925),r=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+r*(1/4+r*(1/64+r/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=r*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=r*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),r*=e,this.utg[2]=r*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=r*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),r*=e,this.utg[3]=r*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=r*(49561/161280+e*(-179/168+e*(6601661/7257600))),r*=e,this.utg[4]=r*(-4583/161280+e*(108847/3991680)),this.gtu[4]=r*(34729/80640+e*(-3418889/1995840)),r*=e,this.utg[5]=r*(-20648693/638668800),this.gtu[5]=.6650675310896665*r;var n=Cl(this.cbg,this.lat0);this.Zb=-this.Qn*(n+function(t,e){for(var r,n=2*Math.cos(e),i=t.length-1,o=t[i],a=0;--i>=0;)r=n*o-a+t[i],a=o,o=r;return Math.sin(e)*r;}(this.gtu,2*n));},forward:function forward(t){var e=bu(t.x-this.long0),r=t.y;r=Cl(this.cbg,r);var n=Math.sin(r),i=Math.cos(r),o=Math.sin(e),a=Math.cos(e);r=Math.atan2(n,a*i),e=Math.atan2(o*i,El(n,i*a)),e=function(t){var e=Math.abs(t);return e=function(t){var e=1+t,r=e-1;return 0===r?t:t*Math.log(e)/r;}(e*(1+e/(El(1,e)+1))),t<0?-e:e;}(Math.tan(e));var s,u,l=Tl(this.gtu,2*r,2*e);return r+=l[0],e+=l[1],Math.abs(e)<=2.623395162778?(s=this.a*(this.Qn*e)+this.x0,u=this.a*(this.Qn*r+this.Zb)+this.y0):(s=1/0,u=1/0),t.x=s,t.y=u,t;},inverse:function inverse(t){var e,r,n=(t.x-this.x0)*(1/this.a),i=(t.y-this.y0)*(1/this.a);if(i=(i-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var o=Tl(this.utg,2*i,2*n);i+=o[0],n+=o[1],n=Math.atan(kl(n));var a=Math.sin(i),s=Math.cos(i),u=Math.sin(n),l=Math.cos(n);i=Math.atan2(a*l,El(u,l*s)),e=bu((n=Math.atan2(u,l*s))+this.long0),r=Cl(this.cgb,i);}else e=1/0,r=1/0;return t.x=e,t.y=r,t;},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]},Nl={init:function init(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(bu(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60;}return t;}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*Vs,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Al.init.apply(this),this.forward=Al.forward,this.inverse=Al.inverse;},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function jl(t,e){return Math.pow((1-t)/(1+t),e);}var Il={init:function init(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+zs)/(Math.pow(Math.tan(.5*this.lat0+zs),this.C)*jl(this.e*t,this.ratexp));},forward:function forward(t){var e=t.x,r=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*r+zs),this.C)*jl(this.e*Math.sin(r),this.ratexp))-Gs,t.x=this.C*e,t;},inverse:function inverse(t){for(var e=t.x/this.C,r=t.y,n=Math.pow(Math.tan(.5*r+zs)/this.K,1/this.C),i=20;i>0&&(r=2*Math.atan(n*jl(this.e*Math.sin(t.y),-.5*this.e))-Gs,!(Math.abs(r-t.y)<1e-14));--i)t.y=r;return i?(t.x=e,t.y=r,t):null;},names:["gauss"]},Rl={init:function init(){Il.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"));},forward:function forward(t){var e,r,n,i;return t.x=bu(t.x-this.long0),Il.forward.apply(this,[t]),e=Math.sin(t.y),r=Math.cos(t.y),n=Math.cos(t.x),i=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*r*n),t.x=i*r*Math.sin(t.x),t.y=i*(this.cosc0*e-this.sinc0*r*n),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t;},inverse:function inverse(t){var e,r,n,i,o;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,o=El(t.x,t.y)){var a=2*Math.atan2(o,this.R2);e=Math.sin(a),r=Math.cos(a),i=Math.asin(r*this.sinc0+t.y*e*this.cosc0/o),n=Math.atan2(t.x*e,o*this.cosc0*r-t.y*this.sinc0*e);}else i=this.phic0,n=0;return t.x=n,t.y=i,Il.inverse.apply(this,[t]),t.x=bu(t.x+this.long0),t;},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},Ll={init:function init(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Us&&(this.k0=.5*(1+gu(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=Us&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Us&&Math.abs(Math.cos(this.lat_ts))>Us&&(this.k0=.5*this.cons*mu(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/xu(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=mu(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-Gs,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0));},forward:function forward(t){var e,r,n,i,o,a,s=t.x,u=t.y,l=Math.sin(u),c=Math.cos(u),h=bu(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=Us&&Math.abs(u+this.lat0)<=Us?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*l+this.coslat0*c*Math.cos(h)),t.x=this.a*e*c*Math.sin(h)+this.x0,t.y=this.a*e*(this.coslat0*l-this.sinlat0*c*Math.cos(h))+this.y0,t):(r=2*Math.atan(this.ssfn_(u,l,this.e))-Gs,i=Math.cos(r),n=Math.sin(r),Math.abs(this.coslat0)<=Us?(o=xu(this.e,u*this.con,this.con*l),a=2*this.a*this.k0*o/this.cons,t.x=this.x0+a*Math.sin(s-this.long0),t.y=this.y0-this.con*a*Math.cos(s-this.long0),t):(Math.abs(this.sinlat0)<Us?(e=2*this.a*this.k0/(1+i*Math.cos(h)),t.y=e*n):(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*n+this.cosX0*i*Math.cos(h))),t.y=e*(this.cosX0*n-this.sinX0*i*Math.cos(h))+this.y0),t.x=e*i*Math.sin(h)+this.x0,t));},inverse:function inverse(t){var e,r,n,i,o;t.x-=this.x0,t.y-=this.y0;var a=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var s=2*Math.atan(a/(2*this.a*this.k0));return e=this.long0,r=this.lat0,a<=Us?(t.x=e,t.y=r,t):(r=Math.asin(Math.cos(s)*this.sinlat0+t.y*Math.sin(s)*this.coslat0/a),e=Math.abs(this.coslat0)<Us?this.lat0>0?bu(this.long0+Math.atan2(t.x,-1*t.y)):bu(this.long0+Math.atan2(t.x,t.y)):bu(this.long0+Math.atan2(t.x*Math.sin(s),a*this.coslat0*Math.cos(s)-t.y*this.sinlat0*Math.sin(s))),t.x=e,t.y=r,t);}if(Math.abs(this.coslat0)<=Us){if(a<=Us)return r=this.lat0,e=this.long0,t.x=e,t.y=r,t;t.x*=this.con,t.y*=this.con,n=a*this.cons/(2*this.a*this.k0),r=this.con*wu(this.e,n),e=this.con*bu(this.con*this.long0+Math.atan2(t.x,-1*t.y));}else i=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,a<=Us?o=this.X0:(o=Math.asin(Math.cos(i)*this.sinX0+t.y*Math.sin(i)*this.cosX0/a),e=bu(this.long0+Math.atan2(t.x*Math.sin(i),a*this.cosX0*Math.cos(i)-t.y*this.sinX0*Math.sin(i)))),r=-1*wu(this.e,Math.tan(.5*(Gs+o)));return t.x=e,t.y=r,t;},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"],ssfn_:function ssfn_(t,e,r){return e*=r,Math.tan(.5*(Gs+t))*Math.pow((1-e)/(1+e),.5*r);}},Fl={init:function init(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),r=this.a,n=1/this.rf,i=2*n-Math.pow(n,2),o=this.e=Math.sqrt(i);this.R=this.k0*r*Math.sqrt(1-i)/(1-i*Math.pow(e,2)),this.alpha=Math.sqrt(1+i/(1-i)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+t/2)),u=Math.log((1+o*e)/(1-o*e));this.K=a-this.alpha*s+this.alpha*o/2*u;},forward:function forward(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),r=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),n=-this.alpha*(e+r)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(t.x-this.lambda0),a=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(o))),s=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(o));return t.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,t.x=this.R*a+this.x0,t;},inverse:function inverse(t){for(var e=t.x-this.x0,r=t.y-this.y0,n=e/this.R,i=2*(Math.atan(Math.exp(r/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),s=this.lambda0+a/this.alpha,u=0,l=o,c=-1e3,h=0;Math.abs(l-c)>1e-7;){if(++h>20)return;u=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),c=l,l=2*Math.atan(Math.exp(u))-Math.PI/2;}return t.x=s,t.y=l,t;},names:["somerc"]};var Dl=1e-7;var Bl={init:function init(){var t,e,r,n,i,o,a,s,u,l,c,h,f,p=0,y=0,d=0,v=0,m=0,g=0,b=0;this.no_off=(f="object"==typeof(h=this).PROJECTION?Object.keys(h.PROJECTION)[0]:h.PROJECTION,"no_uoff"in h||"no_off"in h||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(f)),this.no_rot="no_rot"in this;var x=!1;"alpha"in this&&(x=!0);var w=!1;if("rectified_grid_angle"in this&&(w=!0),x&&(b=this.alpha),w&&(p=this.rectified_grid_angle*Vs),x||w)y=this.longc;else if(d=this.long1,m=this.lat1,v=this.long2,g=this.lat2,Math.abs(m-g)<=Dl||(t=Math.abs(m))<=Dl||Math.abs(t-Gs)<=Dl||Math.abs(Math.abs(this.lat0)-Gs)<=Dl||Math.abs(Math.abs(g)-Gs)<=Dl)throw new Error();var S=1-this.es;e=Math.sqrt(S),Math.abs(this.lat0)>Us?(s=Math.sin(this.lat0),r=Math.cos(this.lat0),t=1-this.es*s*s,this.B=r*r,this.B=Math.sqrt(1+this.es*this.B*this.B/S),this.A=this.B*this.k0*e/t,(i=(n=this.B*e/(r*Math.sqrt(t)))*n-1)<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=n,this.E*=Math.pow(xu(this.e,this.lat0,s),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=i=1),x||w?(x?(c=Math.asin(Math.sin(b)/n),w||(p=b)):(c=p,b=Math.asin(n*Math.sin(c))),this.lam0=y-Math.asin(.5*(i-1/i)*Math.tan(c))/this.B):(o=Math.pow(xu(this.e,m,Math.sin(m)),this.B),a=Math.pow(xu(this.e,g,Math.sin(g)),this.B),i=this.E/o,u=(a-o)/(a+o),l=((l=this.E*this.E)-a*o)/(l+a*o),(t=d-v)<-Math.pi?v-=Hs:t>Math.pi&&(v+=Hs),this.lam0=bu(.5*(d+v)-Math.atan(l*Math.tan(.5*this.B*(d-v))/u)/this.B),c=Math.atan(2*Math.sin(this.B*bu(d-this.lam0))/(i-1/i)),p=b=Math.asin(n*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(p),this.cosrot=Math.cos(p),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(b))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(zs-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(zs+i));},forward:function forward(t){var e,r,n,i,o,a,s,u,l={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-Gs)>Us){if(e=.5*((o=this.E/Math.pow(xu(this.e,t.y,Math.sin(t.y)),this.B))-(a=1/o)),r=.5*(o+a),i=Math.sin(this.B*t.x),n=(e*this.singam-i*this.cosgam)/r,Math.abs(Math.abs(n)-1)<Us)throw new Error();u=.5*this.ArB*Math.log((1-n)/(1+n)),a=Math.cos(this.B*t.x),s=Math.abs(a)<Dl?this.A*t.x:this.ArB*Math.atan2(e*this.cosgam+i*this.singam,a);}else u=t.y>0?this.v_pole_n:this.v_pole_s,s=this.ArB*t.y;return this.no_rot?(l.x=s,l.y=u):(s-=this.u_0,l.x=u*this.cosrot+s*this.sinrot,l.y=s*this.cosrot-u*this.sinrot),l.x=this.a*l.x+this.x0,l.y=this.a*l.y+this.y0,l;},inverse:function inverse(t){var e,r,n,i,o,a,s,u={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(r=t.y,e=t.x):(r=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),i=.5*((n=Math.exp(-this.BrA*r))-1/n),o=.5*(n+1/n),s=((a=Math.sin(this.BrA*e))*this.cosgam+i*this.singam)/o,Math.abs(Math.abs(s)-1)<Us)u.x=0,u.y=s<0?-Gs:Gs;else{if(u.y=this.E/Math.sqrt((1+s)/(1-s)),u.y=wu(this.e,Math.pow(u.y,1/this.B)),u.y===1/0)throw new Error();u.x=-this.rB*Math.atan2(i*this.cosgam-a*this.singam,Math.cos(this.BrA*e));}return u.x+=this.lam0,u;},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]},Gl={init:function init(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<Us)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),r=Math.cos(this.lat1),n=mu(this.e,e,r),i=xu(this.e,this.lat1,e),o=Math.sin(this.lat2),a=Math.cos(this.lat2),s=mu(this.e,o,a),u=xu(this.e,this.lat2,o),l=xu(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>Us?this.ns=Math.log(n/s)/Math.log(i/u):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic");}},forward:function forward(t){var e=t.x,r=t.y;Math.abs(2*Math.abs(r)-Math.PI)<=Us&&(r=gu(r)*(Gs-2e-10));var n,i,o=Math.abs(Math.abs(r)-Gs);if(o>Us)n=xu(this.e,r,Math.sin(r)),i=this.a*this.f0*Math.pow(n,this.ns);else{if((o=r*this.ns)<=0)return null;i=0;}var a=this.ns*bu(e-this.long0);return t.x=this.k0*(i*Math.sin(a))+this.x0,t.y=this.k0*(this.rh-i*Math.cos(a))+this.y0,t;},inverse:function inverse(t){var e,r,n,i,o,a=(t.x-this.x0)/this.k0,s=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(a*a+s*s),r=1):(e=-Math.sqrt(a*a+s*s),r=-1);var u=0;if(0!==e&&(u=Math.atan2(r*a,r*s)),0!==e||this.ns>0){if(r=1/this.ns,n=Math.pow(e/(this.a*this.f0),r),-9999===(i=wu(this.e,n)))return null;}else i=-Gs;return o=bu(u/this.ns+this.long0),t.x=o,t.y=i,t;},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]},Ul={init:function init(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq;},forward:function forward(t){var e,r,n,i,o,a,s,u=t.x,l=t.y,c=bu(u-this.long0);return e=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),r=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/e)-this.s45),n=-c*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(r)+Math.sin(this.ad)*Math.cos(r)*Math.cos(n)),o=Math.asin(Math.cos(r)*Math.sin(n)/Math.cos(i)),a=this.n*o,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),t.y=s*Math.cos(a)/1,t.x=s*Math.sin(a)/1,this.czech||(t.y*=-1,t.x*=-1),t;},inverse:function inverse(t){var e,r,n,i,o,a,s,u=t.x;t.x=t.y,t.y=u,this.czech||(t.y*=-1,t.x*=-1),o=Math.sqrt(t.x*t.x+t.y*t.y),i=Math.atan2(t.y,t.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),r=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(e)),t.x=this.long0-r/this.alfa,a=e,s=0;var l=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-t.y)<1e-10&&(s=1),a=t.y,l+=1;}while(0===s&&l<15);return l>=15?null:t;},names:["Krovak","krovak"]};function Vl(t,e,r,n,i){return t*i-e*Math.sin(2*i)+r*Math.sin(4*i)-n*Math.sin(6*i);}function ql(t){return 1-.25*t*(1+t/16*(3+1.25*t));}function zl(t){return .375*t*(1+.25*t*(1+.46875*t));}function Hl(t){return .05859375*t*t*(1+.75*t);}function Ql(t){return t*t*t*(35/3072);}function Wl(t,e,r){var n=e*r;return t/Math.sqrt(1-n*n);}function Xl(t){return Math.abs(t)<Gs?t:t-gu(t)*Math.PI;}function Yl(t,e,r,n,i){var o,a;o=t/e;for(var s=0;s<15;s++)if(o+=a=(t-(e*o-r*Math.sin(2*o)+n*Math.sin(4*o)-i*Math.sin(6*o)))/(e-2*r*Math.cos(2*o)+4*n*Math.cos(4*o)-6*i*Math.cos(6*o)),Math.abs(a)<=1e-10)return o;return NaN;}var Jl={init:function init(){this.sphere||(this.e0=ql(this.es),this.e1=zl(this.es),this.e2=Hl(this.es),this.e3=Ql(this.es),this.ml0=this.a*Vl(this.e0,this.e1,this.e2,this.e3,this.lat0));},forward:function forward(t){var e,r,n=t.x,i=t.y;if(n=bu(n-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(i)*Math.sin(n)),r=this.a*(Math.atan2(Math.tan(i),Math.cos(n))-this.lat0);else{var o=Math.sin(i),a=Math.cos(i),s=Wl(this.a,this.e,o),u=Math.tan(i)*Math.tan(i),l=n*Math.cos(i),c=l*l,h=this.es*a*a/(1-this.es);e=s*l*(1-c*u*(1/6-(8-u+8*h)*c/120)),r=this.a*Vl(this.e0,this.e1,this.e2,this.e3,i)-this.ml0+s*o/a*c*(.5+(5-u+6*h)*c/24);}return t.x=e+this.x0,t.y=r+this.y0,t;},inverse:function inverse(t){t.x-=this.x0,t.y-=this.y0;var e,r,n=t.x/this.a,i=t.y/this.a;if(this.sphere){var o=i+this.lat0;e=Math.asin(Math.sin(o)*Math.cos(n)),r=Math.atan2(Math.tan(n),Math.cos(o));}else{var a=Yl(this.ml0/this.a+i,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-Gs)<=Us)return t.x=this.long0,t.y=Gs,i<0&&(t.y*=-1),t;var s=Wl(this.a,this.e,Math.sin(a)),u=s*s*s/this.a/this.a*(1-this.es),l=Math.pow(Math.tan(a),2),c=n*this.a/s,h=c*c;e=a-s*Math.tan(a)/u*c*c*(.5-(1+3*l)*c*c/24),r=c*(1-h*(l/3+(1+3*l)*l*h/15))/Math.cos(a);}return t.x=bu(r+this.long0),t.y=Xl(e),t;},names:["Cassini","Cassini_Soldner","cass"]};function $l(t,e){var r;return t>1e-7?(1-t*t)*(e/(1-(r=t*e)*r)-.5/t*Math.log((1-r)/(1+r))):2*e;}var Kl={init:function init(){var t,e=Math.abs(this.lat0);if(Math.abs(e-Gs)<Us?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(e)<Us?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=$l(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,r=[];return r[0]=.3333333333333333*t,e=t*t,r[0]+=.17222222222222222*e,r[1]=.06388888888888888*e,e*=t,r[0]+=.10257936507936508*e,r[1]+=.0664021164021164*e,r[2]=.016415012942191543*e,r;}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=$l(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0));},forward:function forward(t){var e,r,n,i,o,a,s,u,l,c,h=t.x,f=t.y;if(h=bu(h-this.long0),this.sphere){if(o=Math.sin(f),c=Math.cos(f),n=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((r=this.mode===this.EQUIT?1+c*n:1+this.sinph0*o+this.cosph0*c*n)<=Us)return null;e=(r=Math.sqrt(2/r))*c*Math.sin(h),r*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*c*n;}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(f+this.lat0)<Us)return null;r=zs-.5*f,e=(r=2*(this.mode===this.S_POLE?Math.cos(r):Math.sin(r)))*Math.sin(h),r*=n;}}else{switch(s=0,u=0,l=0,n=Math.cos(h),i=Math.sin(h),o=Math.sin(f),a=$l(this.e,o),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(s=a/this.qp,u=Math.sqrt(1-s*s)),this.mode){case this.OBLIQ:l=1+this.sinb1*s+this.cosb1*u*n;break;case this.EQUIT:l=1+u*n;break;case this.N_POLE:l=Gs+f,a=this.qp-a;break;case this.S_POLE:l=f-Gs,a=this.qp+a;}if(Math.abs(l)<Us)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:l=Math.sqrt(2/l),r=this.mode===this.OBLIQ?this.ymf*l*(this.cosb1*s-this.sinb1*u*n):(l=Math.sqrt(2/(1+u*n)))*s*this.ymf,e=this.xmf*l*u*i;break;case this.N_POLE:case this.S_POLE:a>=0?(e=(l=Math.sqrt(a))*i,r=n*(this.mode===this.S_POLE?l:-l)):e=r=0;}}return t.x=this.a*e+this.x0,t.y=this.a*r+this.y0,t;},inverse:function inverse(t){t.x-=this.x0,t.y-=this.y0;var e,r,n,i,o,a,s,u,l,c,h=t.x/this.a,f=t.y/this.a;if(this.sphere){var p,y=0,d=0;if((r=.5*(p=Math.sqrt(h*h+f*f)))>1)return null;switch(r=2*Math.asin(r),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(d=Math.sin(r),y=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(p)<=Us?0:Math.asin(f*d/p),h*=d,f=y*p;break;case this.OBLIQ:r=Math.abs(p)<=Us?this.lat0:Math.asin(y*this.sinph0+f*d*this.cosph0/p),h*=d*this.cosph0,f=(y-Math.sin(r)*this.sinph0)*p;break;case this.N_POLE:f=-f,r=Gs-r;break;case this.S_POLE:r-=Gs;}e=0!==f||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(h,f):0;}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(h/=this.dd,f*=this.dd,(a=Math.sqrt(h*h+f*f))<Us)return t.x=this.long0,t.y=this.lat0,t;i=2*Math.asin(.5*a/this.rq),n=Math.cos(i),h*=i=Math.sin(i),this.mode===this.OBLIQ?(s=n*this.sinb1+f*i*this.cosb1/a,o=this.qp*s,f=a*this.cosb1*n-f*this.sinb1*i):(s=f*i/a,o=this.qp*s,f=a*n);}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(f=-f),!(o=h*h+f*f))return t.x=this.long0,t.y=this.lat0,t;s=1-o/this.qp,this.mode===this.S_POLE&&(s=-s);}e=Math.atan2(h,f),c=(u=Math.asin(s))+u,r=u+(l=this.apa)[0]*Math.sin(c)+l[1]*Math.sin(c+c)+l[2]*Math.sin(c+c+c);}return t.x=bu(this.long0+e),t.y=r,t;},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4};function Zl(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t);}var tc={init:function init(){Math.abs(this.lat1+this.lat2)<Us||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=mu(this.e3,this.sin_po,this.cos_po),this.qs1=$l(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=mu(this.e3,this.sin_po,this.cos_po),this.qs2=$l(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=$l(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>Us?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0);},forward:function forward(t){var e=t.x,r=t.y;this.sin_phi=Math.sin(r),this.cos_phi=Math.cos(r);var n=$l(this.e3,this.sin_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*bu(e-this.long0),a=i*Math.sin(o)+this.x0,s=this.rh-i*Math.cos(o)+this.y0;return t.x=a,t.y=s,t;},inverse:function inverse(t){var e,r,n,i,o,a;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),n=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1),i=0,0!==e&&(i=Math.atan2(n*t.x,n*t.y)),n=e*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(r=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,r)),o=bu(i/this.ns0+this.long0),t.x=o,t.y=a,t;},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function phi1z(t,e){var r,n,i,o,a=Zl(.5*e);if(t<Us)return a;for(var s=t*t,u=1;u<=25;u++)if(a+=o=.5*(i=1-(n=t*(r=Math.sin(a)))*n)*i/Math.cos(a)*(e/(1-s)-r/i+.5/t*Math.log((1-n)/(1+n))),Math.abs(o)<=1e-7)return a;return null;}},ec={init:function init(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1;},forward:function forward(t){var e,r,n,i,o,a,s,u=t.x,l=t.y;return n=bu(u-this.long0),e=Math.sin(l),r=Math.cos(l),i=Math.cos(n),(o=this.sin_p14*e+this.cos_p14*r*i)>0||Math.abs(o)<=Us?(a=this.x0+1*this.a*r*Math.sin(n)/o,s=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*r*i)/o):(a=this.x0+this.infinity_dist*r*Math.sin(n),s=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*r*i)),t.x=a,t.y=s,t;},inverse:function inverse(t){var e,r,n,i,o,a;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(i=Math.atan2(e,this.rc),r=Math.sin(i),a=Zl((n=Math.cos(i))*this.sin_p14+t.y*r*this.cos_p14/e),o=Math.atan2(t.x*r,e*this.cos_p14*n-t.y*this.sin_p14*r),o=bu(this.long0+o)):(a=this.phic0,o=0),t.x=o,t.y=a,t;},names:["gnom"]},rc={init:function init(){this.sphere||(this.k0=mu(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)));},forward:function forward(t){var e,r,n=t.x,i=t.y,o=bu(n-this.long0);if(this.sphere)e=this.x0+this.a*o*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var a=$l(this.e,Math.sin(i));e=this.x0+this.a*this.k0*o,r=this.y0+this.a*a*.5/this.k0;}return t.x=e,t.y=r,t;},inverse:function inverse(t){var e,r;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=bu(this.long0+t.x/this.a/Math.cos(this.lat_ts)),r=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(r=function(t,e){var r=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-r)<1e-6)return e<0?-1*Gs:Gs;for(var n,i,o,a,s=Math.asin(.5*e),u=0;u<30;u++)if(i=Math.sin(s),o=Math.cos(s),a=t*i,s+=n=Math.pow(1-a*a,2)/(2*o)*(e/(1-t*t)-i/(1-a*a)+.5/t*Math.log((1-a)/(1+a))),Math.abs(n)<=1e-10)return s;return NaN;}(this.e,2*t.y*this.k0/this.a),e=bu(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=r,t;},names:["cea"]},nc={init:function init(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts);},forward:function forward(t){var e=t.x,r=t.y,n=bu(e-this.long0),i=Xl(r-this.lat0);return t.x=this.x0+this.a*n*this.rc,t.y=this.y0+this.a*i,t;},inverse:function inverse(t){var e=t.x,r=t.y;return t.x=bu(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=Xl(this.lat0+(r-this.y0)/this.a),t;},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},ic={init:function init(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ql(this.es),this.e1=zl(this.es),this.e2=Hl(this.es),this.e3=Ql(this.es),this.ml0=this.a*Vl(this.e0,this.e1,this.e2,this.e3,this.lat0);},forward:function forward(t){var e,r,n,i=t.x,o=t.y,a=bu(i-this.long0);if(n=a*Math.sin(o),this.sphere)Math.abs(o)<=Us?(e=this.a*a,r=-1*this.a*this.lat0):(e=this.a*Math.sin(n)/Math.tan(o),r=this.a*(Xl(o-this.lat0)+(1-Math.cos(n))/Math.tan(o)));else if(Math.abs(o)<=Us)e=this.a*a,r=-1*this.ml0;else{var s=Wl(this.a,this.e,Math.sin(o))/Math.tan(o);e=s*Math.sin(n),r=this.a*Vl(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+s*(1-Math.cos(n));}return t.x=e+this.x0,t.y=r+this.y0,t;},inverse:function inverse(t){var e,r,n,i,o,a,s,u,l;if(n=t.x-this.x0,i=t.y-this.y0,this.sphere){if(Math.abs(i+this.a*this.lat0)<=Us)e=bu(n/this.a+this.long0),r=0;else{var c;for(a=this.lat0+i/this.a,s=n*n/this.a/this.a+a*a,u=a,o=20;o;--o)if(u+=l=-1*(a*(u*(c=Math.tan(u))+1)-u-.5*(u*u+s)*c)/((u-a)/c-1),Math.abs(l)<=Us){r=u;break;}e=bu(this.long0+Math.asin(n*Math.tan(u)/this.a)/Math.sin(r));}}else if(Math.abs(i+this.ml0)<=Us)r=0,e=bu(this.long0+n/this.a);else{var h,f,p,y,d;for(a=(this.ml0+i)/this.a,s=n*n/this.a/this.a+a*a,u=a,o=20;o;--o)if(d=this.e*Math.sin(u),h=Math.sqrt(1-d*d)*Math.tan(u),f=this.a*Vl(this.e0,this.e1,this.e2,this.e3,u),p=this.e0-2*this.e1*Math.cos(2*u)+4*this.e2*Math.cos(4*u)-6*this.e3*Math.cos(6*u),u-=l=(a*(h*(y=f/this.a)+1)-y-.5*h*(y*y+s))/(this.es*Math.sin(2*u)*(y*y+s-2*a*y)/(4*h)+(a-y)*(h*p-2/Math.sin(2*u))-p),Math.abs(l)<=Us){r=u;break;}h=Math.sqrt(1-this.es*Math.pow(Math.sin(r),2))*Math.tan(r),e=bu(this.long0+Math.asin(n*h/this.a)/Math.sin(r));}return t.x=e,t.y=r,t;},names:["Polyconic","poly"]},oc={init:function init(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013;},forward:function forward(t){var e,r=t.x,n=t.y-this.lat0,i=r-this.long0,o=n/Bs*1e-5,a=i,s=1,u=0;for(e=1;e<=10;e++)s*=o,u+=this.A[e]*s;var l,c=u,h=a,f=1,p=0,y=0,d=0;for(e=1;e<=6;e++)l=p*c+f*h,f=f*c-p*h,p=l,y=y+this.B_re[e]*f-this.B_im[e]*p,d=d+this.B_im[e]*f+this.B_re[e]*p;return t.x=d*this.a+this.x0,t.y=y*this.a+this.y0,t;},inverse:function inverse(t){var e,r,n=t.x,i=t.y,o=n-this.x0,a=(i-this.y0)/this.a,s=o/this.a,u=1,l=0,c=0,h=0;for(e=1;e<=6;e++)r=l*a+u*s,u=u*a-l*s,l=r,c=c+this.C_re[e]*u-this.C_im[e]*l,h=h+this.C_im[e]*u+this.C_re[e]*l;for(var f=0;f<this.iterations;f++){var p,y=c,d=h,v=a,m=s;for(e=2;e<=6;e++)p=d*c+y*h,y=y*c-d*h,d=p,v+=(e-1)*(this.B_re[e]*y-this.B_im[e]*d),m+=(e-1)*(this.B_im[e]*y+this.B_re[e]*d);y=1,d=0;var g=this.B_re[1],b=this.B_im[1];for(e=2;e<=6;e++)p=d*c+y*h,y=y*c-d*h,d=p,g+=e*(this.B_re[e]*y-this.B_im[e]*d),b+=e*(this.B_im[e]*y+this.B_re[e]*d);var x=g*g+b*b;c=(v*g+m*b)/x,h=(m*g-v*b)/x;}var w=c,S=h,_=1,M=0;for(e=1;e<=9;e++)_*=w,M+=this.D[e]*_;var O=this.lat0+M*Bs*1e5,P=this.long0+S;return t.x=P,t.y=O,t;},names:["New_Zealand_Map_Grid","nzmg"]},ac={init:function init(){},forward:function forward(t){var e=t.x,r=t.y,n=bu(e-this.long0),i=this.x0+this.a*n,o=this.y0+this.a*Math.log(Math.tan(Math.PI/4+r/2.5))*1.25;return t.x=i,t.y=o,t;},inverse:function inverse(t){t.x-=this.x0,t.y-=this.y0;var e=bu(this.long0+t.x/this.a),r=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=r,t;},names:["Miller_Cylindrical","mill"]},sc={init:function init(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=_l(this.es);},forward:function forward(t){var e,r,n=t.x,i=t.y;if(n=bu(n-this.long0),this.sphere){if(this.m)for(var o=this.n*Math.sin(i),a=20;a;--a){var s=(this.m*i+Math.sin(i)-o)/(this.m+Math.cos(i));if(i-=s,Math.abs(s)<Us)break;}else i=1!==this.n?Math.asin(this.n*Math.sin(i)):i;e=this.a*this.C_x*n*(this.m+Math.cos(i)),r=this.a*this.C_y*i;}else{var u=Math.sin(i),l=Math.cos(i);r=this.a*Ml(i,u,l,this.en),e=this.a*n*l/Math.sqrt(1-this.es*u*u);}return t.x=e,t.y=r,t;},inverse:function inverse(t){var e,r,n;return t.x-=this.x0,r=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,r/=this.C_x*(this.m+Math.cos(e)),this.m?e=Zl((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=Zl(Math.sin(e)/this.n)),r=bu(r+this.long0),e=Xl(e)):(e=Ol(t.y/this.a,this.es,this.en),(n=Math.abs(e))<Gs?(n=Math.sin(e),r=bu(this.long0+t.x*Math.sqrt(1-this.es*n*n)/(this.a*Math.cos(e)))):n-Us<Gs&&(r=this.long0)),t.x=r,t.y=e,t;},names:["Sinusoidal","sinu"]},uc={init:function init(){},forward:function forward(t){for(var e=t.x,r=t.y,n=bu(e-this.long0),i=r,o=Math.PI*Math.sin(r);;){var a=-(i+Math.sin(i)-o)/(1+Math.cos(i));if(i+=a,Math.abs(a)<Us)break;}i/=2,Math.PI/2-Math.abs(r)<Us&&(n=0);var s=.900316316158*this.a*n*Math.cos(i)+this.x0,u=1.4142135623731*this.a*Math.sin(i)+this.y0;return t.x=s,t.y=u,t;},inverse:function inverse(t){var e,r;t.x-=this.x0,t.y-=this.y0,r=t.y/(1.4142135623731*this.a),Math.abs(r)>.999999999999&&(r=.999999999999),e=Math.asin(r);var n=bu(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),r=(2*e+Math.sin(2*e))/Math.PI,Math.abs(r)>1&&(r=1);var i=Math.asin(r);return t.x=n,t.y=i,t;},names:["Mollweide","moll"]},lc={init:function init(){Math.abs(this.lat1+this.lat2)<Us||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ql(this.es),this.e1=zl(this.es),this.e2=Hl(this.es),this.e3=Ql(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=mu(this.e,this.sinphi,this.cosphi),this.ml1=Vl(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<Us?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=mu(this.e,this.sinphi,this.cosphi),this.ml2=Vl(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Vl(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0));},forward:function forward(t){var e,r=t.x,n=t.y;if(this.sphere)e=this.a*(this.g-n);else{var i=Vl(this.e0,this.e1,this.e2,this.e3,n);e=this.a*(this.g-i);}var o=this.ns*bu(r-this.long0),a=this.x0+e*Math.sin(o),s=this.y0+this.rh-e*Math.cos(o);return t.x=a,t.y=s,t;},inverse:function inverse(t){var e,r,n,i;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(r=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(r=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var o=0;return 0!==r&&(o=Math.atan2(e*t.x,e*t.y)),this.sphere?(i=bu(this.long0+o/this.ns),n=Xl(this.g-r/this.a),t.x=i,t.y=n,t):(n=Yl(this.g-r/this.a,this.e0,this.e1,this.e2,this.e3),i=bu(this.long0+o/this.ns),t.x=i,t.y=n,t);},names:["Equidistant_Conic","eqdc"]},cc={init:function init(){this.R=this.a;},forward:function forward(t){var e,r,n=t.x,i=t.y,o=bu(n-this.long0);Math.abs(i)<=Us&&(e=this.x0+this.R*o,r=this.y0);var a=Zl(2*Math.abs(i/Math.PI));(Math.abs(o)<=Us||Math.abs(Math.abs(i)-Gs)<=Us)&&(e=this.x0,r=i>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var s=.5*Math.abs(Math.PI/o-o/Math.PI),u=s*s,l=Math.sin(a),c=Math.cos(a),h=c/(l+c-1),f=h*h,p=h*(2/l-1),y=p*p,d=Math.PI*this.R*(s*(h-y)+Math.sqrt(u*(h-y)*(h-y)-(y+u)*(f-y)))/(y+u);o<0&&(d=-d),e=this.x0+d;var v=u+h;return d=Math.PI*this.R*(p*v-s*Math.sqrt((y+u)*(u+1)-v*v))/(y+u),r=i>=0?this.y0+d:this.y0-d,t.x=e,t.y=r,t;},inverse:function inverse(t){var e,r,n,i,o,a,s,u,l,c,h,f;return t.x-=this.x0,t.y-=this.y0,h=Math.PI*this.R,o=(n=t.x/h)*n+(i=t.y/h)*i,h=3*(i*i/(u=-2*(a=-Math.abs(i)*(1+o))+1+2*i*i+o*o)+(2*(s=a-2*i*i+n*n)*s*s/u/u/u-9*a*s/u/u)/27)/(l=(a-s*s/3/u)/u)/(c=2*Math.sqrt(-l/3)),Math.abs(h)>1&&(h=h>=0?1:-1),f=Math.acos(h)/3,r=t.y>=0?(-c*Math.cos(f+Math.PI/3)-s/3/u)*Math.PI:-(-c*Math.cos(f+Math.PI/3)-s/3/u)*Math.PI,e=Math.abs(n)<Us?this.long0:bu(this.long0+Math.PI*(o-1+Math.sqrt(1+2*(n*n-i*i)+o*o))/2/n),t.x=e,t.y=r,t;},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]},hc={init:function init(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0);},forward:function forward(t){var e,r,n,i,o,a,s,u,l,c,h,f,p,y,d,v,m,g,b,x,w,S,_=t.x,M=t.y,O=Math.sin(t.y),P=Math.cos(t.y),k=bu(_-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=Us?(t.x=this.x0+this.a*(Gs-M)*Math.sin(k),t.y=this.y0-this.a*(Gs-M)*Math.cos(k),t):Math.abs(this.sin_p12+1)<=Us?(t.x=this.x0+this.a*(Gs+M)*Math.sin(k),t.y=this.y0+this.a*(Gs+M)*Math.cos(k),t):(g=this.sin_p12*O+this.cos_p12*P*Math.cos(k),m=(v=Math.acos(g))?v/Math.sin(v):1,t.x=this.x0+this.a*m*P*Math.sin(k),t.y=this.y0+this.a*m*(this.cos_p12*O-this.sin_p12*P*Math.cos(k)),t):(e=ql(this.es),r=zl(this.es),n=Hl(this.es),i=Ql(this.es),Math.abs(this.sin_p12-1)<=Us?(o=this.a*Vl(e,r,n,i,Gs),a=this.a*Vl(e,r,n,i,M),t.x=this.x0+(o-a)*Math.sin(k),t.y=this.y0-(o-a)*Math.cos(k),t):Math.abs(this.sin_p12+1)<=Us?(o=this.a*Vl(e,r,n,i,Gs),a=this.a*Vl(e,r,n,i,M),t.x=this.x0+(o+a)*Math.sin(k),t.y=this.y0+(o+a)*Math.cos(k),t):(s=O/P,u=Wl(this.a,this.e,this.sin_p12),l=Wl(this.a,this.e,O),c=Math.atan((1-this.es)*s+this.es*u*this.sin_p12/(l*P)),b=0===(h=Math.atan2(Math.sin(k),this.cos_p12*Math.tan(c)-this.sin_p12*Math.cos(k)))?Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.abs(Math.abs(h)-Math.PI)<=Us?-Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.asin(Math.sin(k)*Math.cos(c)/Math.sin(h)),f=this.e*this.sin_p12/Math.sqrt(1-this.es),v=u*b*(1-(x=b*b)*(d=(p=this.e*this.cos_p12*Math.cos(h)/Math.sqrt(1-this.es))*p)*(1-d)/6+(w=x*b)/8*(y=f*p)*(1-2*d)+(S=w*b)/120*(d*(4-7*d)-3*f*f*(1-7*d))-S*b/48*y),t.x=this.x0+v*Math.sin(h),t.y=this.y0+v*Math.cos(h),t));},inverse:function inverse(t){var e,r,n,i,o,a,s,u,l,c,h,f,p,y,d,v,m,g,b,x,w,S,_;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((e=Math.sqrt(t.x*t.x+t.y*t.y))>2*Gs*this.a)return;return r=e/this.a,n=Math.sin(r),i=Math.cos(r),o=this.long0,Math.abs(e)<=Us?a=this.lat0:(a=Zl(i*this.sin_p12+t.y*n*this.cos_p12/e),s=Math.abs(this.lat0)-Gs,o=Math.abs(s)<=Us?this.lat0>=0?bu(this.long0+Math.atan2(t.x,-t.y)):bu(this.long0-Math.atan2(-t.x,t.y)):bu(this.long0+Math.atan2(t.x*n,e*this.cos_p12*i-t.y*this.sin_p12*n))),t.x=o,t.y=a,t;}return u=ql(this.es),l=zl(this.es),c=Hl(this.es),h=Ql(this.es),Math.abs(this.sin_p12-1)<=Us?(a=Yl(((f=this.a*Vl(u,l,c,h,Gs))-(e=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,u,l,c,h),o=bu(this.long0+Math.atan2(t.x,-1*t.y)),t.x=o,t.y=a,t):Math.abs(this.sin_p12+1)<=Us?(f=this.a*Vl(u,l,c,h,Gs),a=Yl(((e=Math.sqrt(t.x*t.x+t.y*t.y))-f)/this.a,u,l,c,h),o=bu(this.long0+Math.atan2(t.x,t.y)),t.x=o,t.y=a,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),d=Math.atan2(t.x,t.y),p=Wl(this.a,this.e,this.sin_p12),v=Math.cos(d),g=-(m=this.e*this.cos_p12*v)*m/(1-this.es),b=3*this.es*(1-g)*this.sin_p12*this.cos_p12*v/(1-this.es),S=1-g*(w=(x=e/p)-g*(1+g)*Math.pow(x,3)/6-b*(1+3*g)*Math.pow(x,4)/24)*w/2-x*w*w*w/6,y=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*v),o=bu(this.long0+Math.asin(Math.sin(d)*Math.sin(w)/Math.cos(y))),_=Math.sin(y),a=Math.atan2((_-this.es*S*this.sin_p12)*Math.tan(y),_*(1-this.es)),t.x=o,t.y=a,t);},names:["Azimuthal_Equidistant","aeqd"]},fc={init:function init(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0);},forward:function forward(t){var e,r,n,i,o,a,s,u=t.x,l=t.y;return n=bu(u-this.long0),e=Math.sin(l),r=Math.cos(l),i=Math.cos(n),((o=this.sin_p14*e+this.cos_p14*r*i)>0||Math.abs(o)<=Us)&&(a=1*this.a*r*Math.sin(n),s=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*r*i)),t.x=a,t.y=s,t;},inverse:function inverse(t){var e,r,n,i,o,a,s;return t.x-=this.x0,t.y-=this.y0,r=Zl((e=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),n=Math.sin(r),i=Math.cos(r),a=this.long0,Math.abs(e)<=Us?(s=this.lat0,t.x=a,t.y=s,t):(s=Zl(i*this.sin_p14+t.y*n*this.cos_p14/e),o=Math.abs(this.lat0)-Gs,Math.abs(o)<=Us?(a=this.lat0>=0?bu(this.long0+Math.atan2(t.x,-t.y)):bu(this.long0-Math.atan2(-t.x,t.y)),t.x=a,t.y=s,t):(a=bu(this.long0+Math.atan2(t.x*n,e*this.cos_p14*i-t.y*this.sin_p14*n)),t.x=a,t.y=s,t));},names:["ortho"]};var pc=1,yc=2,dc=3,vc=4;function mc(t,e,r,n){var i;return t<Us?(n.value=pc,i=0):(i=Math.atan2(e,r),Math.abs(i)<=zs?n.value=pc:i>zs&&i<=Gs+zs?(n.value=yc,i-=Gs):i>Gs+zs||i<=-(Gs+zs)?(n.value=dc,i=i>=0?i-Qs:i+Qs):(n.value=vc,i+=Gs)),i;}function gc(t,e){var r=t+e;return r<-Qs?r+=Hs:r>+Qs&&(r-=Hs),r;}var bc={init:function init(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=Gs-zs/2?this.face=5:this.lat0<=-(Gs-zs/2)?this.face=6:Math.abs(this.long0)<=zs?this.face=1:Math.abs(this.long0)<=Gs+zs?this.face=this.long0>0?2:4:this.face=3,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f);},forward:function forward(t){var e,r,n,i,o,a,s={x:0,y:0},u={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,r=t.x,5===this.face)i=Gs-e,r>=zs&&r<=Gs+zs?(u.value=pc,n=r-Gs):r>Gs+zs||r<=-(Gs+zs)?(u.value=yc,n=r>0?r-Qs:r+Qs):r>-(Gs+zs)&&r<=-zs?(u.value=dc,n=r+Gs):(u.value=vc,n=r);else if(6===this.face)i=Gs+e,r>=zs&&r<=Gs+zs?(u.value=pc,n=-r+Gs):r<zs&&r>=-zs?(u.value=yc,n=-r):r<-zs&&r>=-(Gs+zs)?(u.value=dc,n=-r-Gs):(u.value=vc,n=r>0?-r+Qs:-r-Qs);else{var l,c,h,f,p,y;2===this.face?r=gc(r,+Gs):3===this.face?r=gc(r,+Qs):4===this.face&&(r=gc(r,-Gs)),f=Math.sin(e),p=Math.cos(e),y=Math.sin(r),l=p*Math.cos(r),c=p*y,h=f,1===this.face?n=mc(i=Math.acos(l),h,c,u):2===this.face?n=mc(i=Math.acos(c),h,-l,u):3===this.face?n=mc(i=Math.acos(-l),h,-c,u):4===this.face?n=mc(i=Math.acos(-c),h,l,u):(i=n=0,u.value=pc);}return a=Math.atan(12/Qs*(n+Math.acos(Math.sin(n)*Math.cos(zs))-Gs)),o=Math.sqrt((1-Math.cos(i))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),u.value===yc?a+=Gs:u.value===dc?a+=Qs:u.value===vc&&(a+=1.5*Qs),s.x=o*Math.cos(a),s.y=o*Math.sin(a),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,t.x=s.x,t.y=s.y,t;},inverse:function inverse(t){var e,r,n,i,o,a,s,u,l,c,h,f,p={lam:0,phi:0},y={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,r=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?y.value=pc:t.y>=0&&t.y>=Math.abs(t.x)?(y.value=yc,e-=Gs):t.x<0&&-t.x>=Math.abs(t.y)?(y.value=dc,e=e<0?e+Qs:e-Qs):(y.value=vc,e+=Gs),l=Qs/12*Math.tan(e),o=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),a=Math.atan(o),(s=1-(n=Math.cos(e))*n*(i=Math.tan(r))*i*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?s=-1:s>1&&(s=1),5===this.face)u=Math.acos(s),p.phi=Gs-u,y.value===pc?p.lam=a+Gs:y.value===yc?p.lam=a<0?a+Qs:a-Qs:y.value===dc?p.lam=a-Gs:p.lam=a;else if(6===this.face)u=Math.acos(s),p.phi=u-Gs,y.value===pc?p.lam=-a+Gs:y.value===yc?p.lam=-a:y.value===dc?p.lam=-a-Gs:p.lam=a<0?-a-Qs:-a+Qs;else{var d,v,m;l=(d=s)*d,v=(l+=(m=l>=1?0:Math.sqrt(1-l)*Math.sin(a))*m)>=1?0:Math.sqrt(1-l),y.value===yc?(l=v,v=-m,m=l):y.value===dc?(v=-v,m=-m):y.value===vc&&(l=v,v=m,m=-l),2===this.face?(l=d,d=-v,v=l):3===this.face?(d=-d,v=-v):4===this.face&&(l=d,d=v,v=-l),p.phi=Math.acos(-m)-Gs,p.lam=Math.atan2(v,d),2===this.face?p.lam=gc(p.lam,-Gs):3===this.face?p.lam=gc(p.lam,-Qs):4===this.face&&(p.lam=gc(p.lam,+Gs));}return 0!==this.es&&(c=p.phi<0?1:0,h=Math.tan(p.phi),f=this.b/Math.sqrt(h*h+this.one_minus_f_squared),p.phi=Math.atan(Math.sqrt(this.a*this.a-f*f)/(this.one_minus_f*f)),c&&(p.phi=-p.phi)),p.lam+=this.long0,t.x=p.lam,t.y=p.phi,t;},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]};var xc=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],wc=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Sc=.8487,_c=1.3523,Mc=qs/5,Oc=1/Mc,Pc=function Pc(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]));};var kc={init:function init(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson";},forward:function forward(t){var e=bu(t.x-this.long0),r=Math.abs(t.y),n=Math.floor(r*Mc);n<0?n=0:n>=18&&(n=17);var i={x:Pc(xc[n],r=qs*(r-Oc*n))*e,y:Pc(wc[n],r)};return t.y<0&&(i.y=-i.y),i.x=i.x*this.a*Sc+this.x0,i.y=i.y*this.a*_c+this.y0,i;},inverse:function inverse(t){var e={x:(t.x-this.x0)/(this.a*Sc),y:Math.abs(t.y-this.y0)/(this.a*_c)};if(e.y>=1)e.x/=xc[18][0],e.y=t.y<0?-Gs:Gs;else{var r=Math.floor(18*e.y);for(r<0?r=0:r>=18&&(r=17);;)if(wc[r][0]>e.y)--r;else{if(!(wc[r+1][0]<=e.y))break;++r;}var n=wc[r],i=5*(e.y-n[0])/(wc[r+1][0]-n[0]);i=function(t,e,r,n){for(var i=e;n;--n){var o=t(i);if(i-=o,Math.abs(o)<1e-10)break;}return i;}(function(t){return(Pc(n,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3]);}(n,t);},i,0,100),e.x/=Pc(xc[r],i),e.y=(5*r+i)*Vs,t.y<0&&(e.y=-e.y);}return e.x=bu(e.x+this.long0),e;},names:["Robinson","robin"]},Ec={init:function init(){this.name="geocent";},forward:function forward(t){return Uu(t,this.es,this.a);},inverse:function inverse(t){return Vu(t,this.es,this.a,this.b);},names:["Geocentric","geocentric","geocent","Geocent"]};var Cc={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};var Tc={init:function init(){if(Object.keys(Cc).forEach(function(t){if(void 0===this[t])this[t]=Cc[t].def;else{if(Cc[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);Cc[t].num&&(this[t]=parseFloat(this[t]));}Cc[t].degrees&&(this[t]=this[t]*Vs);}.bind(this)),Math.abs(Math.abs(this.lat0)-Gs)<Us?this.mode=this.lat0<0?1:0:Math.abs(this.lat0)<Us?this.mode=2:(this.mode=3,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(t),this.sw=Math.sin(t);},forward:function forward(t){t.x-=this.long0;var e,r,n,i,o=Math.sin(t.y),a=Math.cos(t.y),s=Math.cos(t.x);switch(this.mode){case 3:r=this.sinph0*o+this.cosph0*a*s;break;case 2:r=a*s;break;case 1:r=-o;break;case 0:r=o;}switch(e=(r=this.pn1/(this.p-r))*a*Math.sin(t.x),this.mode){case 3:r*=this.cosph0*o-this.sinph0*a*s;break;case 2:r*=o;break;case 0:r*=-a*s;break;case 1:r*=a*s;}return i=1/((n=r*this.cg+e*this.sg)*this.sw*this.h1+this.cw),e=(e*this.cg-r*this.sg)*this.cw*i,r=n*i,t.x=e*this.a,t.y=r*this.a,t;},inverse:function inverse(t){t.x/=this.a,t.y/=this.a;var e,r,n,i={x:t.x,y:t.y};n=1/(this.pn1-t.y*this.sw),e=this.pn1*t.x*n,r=this.pn1*t.y*this.cw*n,t.x=e*this.cg+r*this.sg,t.y=r*this.cg-e*this.sg;var o=El(t.x,t.y);if(Math.abs(o)<Us)i.x=0,i.y=t.y;else{var a,s;switch(s=1-o*o*this.pfact,s=(this.p-Math.sqrt(s))/(this.pn1/o+o/this.pn1),a=Math.sqrt(1-s*s),this.mode){case 3:i.y=Math.asin(a*this.sinph0+t.y*s*this.cosph0/o),t.y=(a-this.sinph0*Math.sin(i.y))*o,t.x*=s*this.cosph0;break;case 2:i.y=Math.asin(t.y*s/o),t.y=a*o,t.x*=s;break;case 0:i.y=Math.asin(a),t.y=-t.y;break;case 1:i.y=-Math.asin(a);}i.x=Math.atan2(t.x,t.y);}return t.x=i.x+this.long0,t.y=i.y,t;},names:["Tilted_Perspective","tpers"]},Ac={init:function init(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error();if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,e=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=e,this.shape="ellipse";}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View");},forward:function forward(t){var e,r,n,i,o=t.x,a=t.y;if(o-=this.long0,"ellipse"===this.shape){a=Math.atan(this.radius_p2*Math.tan(a));var s=this.radius_p/El(this.radius_p*Math.cos(a),Math.sin(a));if(r=s*Math.cos(o)*Math.cos(a),n=s*Math.sin(o)*Math.cos(a),i=s*Math.sin(a),(this.radius_g-r)*r-n*n-i*i*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=this.radius_g-r,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/El(i,e)),t.y=this.radius_g_1*Math.atan(i/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(i/El(n,e)));}else"sphere"===this.shape&&(e=Math.cos(a),r=Math.cos(o)*e,n=Math.sin(o)*e,i=Math.sin(a),e=this.radius_g-r,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/El(i,e)),t.y=this.radius_g_1*Math.atan(i/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(i/El(n,e))));return t.x=t.x*this.a,t.y=t.y*this.a,t;},inverse:function inverse(t){var e,r,n,i,o=-1,a=0,s=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*El(1,s)):(a=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*El(1,a));var u=s/this.radius_p;if(e=a*a+u*u+o*o,(n=(r=2*this.radius_g*o)*r-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;i=(-r-Math.sqrt(n))/(2*e),o=this.radius_g+i*o,a*=i,s*=i,t.x=Math.atan2(a,o),t.y=Math.atan(s*Math.cos(t.x)/o),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y));}else if("sphere"===this.shape){if(this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+s*s)):(a=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+a*a)),e=a*a+s*s+o*o,(n=(r=2*this.radius_g*o)*r-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;i=(-r-Math.sqrt(n))/(2*e),o=this.radius_g+i*o,a*=i,s*=i,t.x=Math.atan2(a,o),t.y=Math.atan(s*Math.cos(t.x)/o);}return t.x=t.x+this.long0,t;},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};var Nc=1.340264,jc=-.081106,Ic=893e-6,Rc=.003796,Lc=Math.sqrt(3)/2;var Fc={init:function init(){this.es=0,this.long0=void 0!==this.long0?this.long0:0;},forward:function forward(t){var e=bu(t.x-this.long0),r=t.y,n=Math.asin(Lc*Math.sin(r)),i=n*n,o=i*i*i;return t.x=e*Math.cos(n)/(Lc*(Nc+3*jc*i+o*(7*Ic+9*Rc*i))),t.y=n*(Nc+jc*i+o*(Ic+Rc*i)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t;},inverse:function inverse(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var e,r,n,i,o=t.y;for(i=0;i<12&&(o-=n=(o*(Nc+jc*(e=o*o)+(r=e*e*e)*(Ic+Rc*e))-t.y)/(Nc+3*jc*e+r*(7*Ic+9*Rc*e)),!(Math.abs(n)<1e-9));++i);return r=(e=o*o)*e*e,t.x=Lc*t.x*(Nc+3*jc*e+r*(7*Ic+9*Rc*e))/Math.cos(o),t.y=Math.asin(Math.sin(o)/Lc),t.x=bu(t.x+this.long0),t;},names:["eqearth","Equal Earth","Equal_Earth"]};var Dc;tl.defaultDatum="WGS84",tl.Proj=Gu,tl.WGS84=new tl.Proj("WGS84"),tl.Point=bl,tl.toPoint=Xu,tl.defs=pu,tl.nadgrid=function(t,e){var r=new DataView(e),n=function(t){var e=t.getInt32(8,!1);return 11!==e&&(11!==(e=t.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0);}(r),i=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:Ru(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)};}(r,n),o=function(t,e,r){for(var n=176,i=[],o=0;o<e.nSubgrids;o++){var a=Fu(t,n,r),s=Du(t,n,a,r),u=Math.round(1+(a.upperLongitude-a.lowerLongitude)/a.longitudeInterval),l=Math.round(1+(a.upperLatitude-a.lowerLatitude)/a.latitudeInterval);i.push({ll:[Iu(a.lowerLongitude),Iu(a.lowerLatitude)],del:[Iu(a.longitudeInterval),Iu(a.latitudeInterval)],lim:[u,l],count:a.gridNodeCount,cvs:Lu(s)}),n+=176+16*a.gridNodeCount;}return i;}(r,i,n),a={header:i,subgrids:o};return Nu[t]=a,a;},tl.transform=Ju,tl.mgrs=ll,tl.version="__VERSION__",(Dc=tl).Proj.projections.add(Pl),Dc.Proj.projections.add(Al),Dc.Proj.projections.add(Nl),Dc.Proj.projections.add(Rl),Dc.Proj.projections.add(Ll),Dc.Proj.projections.add(Fl),Dc.Proj.projections.add(Bl),Dc.Proj.projections.add(Gl),Dc.Proj.projections.add(Ul),Dc.Proj.projections.add(Jl),Dc.Proj.projections.add(Kl),Dc.Proj.projections.add(tc),Dc.Proj.projections.add(ec),Dc.Proj.projections.add(rc),Dc.Proj.projections.add(nc),Dc.Proj.projections.add(ic),Dc.Proj.projections.add(oc),Dc.Proj.projections.add(ac),Dc.Proj.projections.add(sc),Dc.Proj.projections.add(uc),Dc.Proj.projections.add(lc),Dc.Proj.projections.add(cc),Dc.Proj.projections.add(hc),Dc.Proj.projections.add(fc),Dc.Proj.projections.add(bc),Dc.Proj.projections.add(kc),Dc.Proj.projections.add(Ec),Dc.Proj.projections.add(Tc),Dc.Proj.projections.add(Ac),Dc.Proj.projections.add(Fc);var Bc=tl;function Gc(t,e,r){r.defs(t)||(e?r.defs(t,e):console.error("".concat(t," not define")));}function Uc(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Bc;if("[object Object]"!==Object.prototype.toString.call(arguments[0]))Gc(t,e,r);else{var n=arguments[0];for(var i in n)Gc(i,n[i],r);}}function Vc(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bc;if(!e.defs(t)){var r={"EPSG:3857":'PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]]',"EPSG:4326":'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],AXIS["Easting", "EAST"],AXIS["Northing", "NORTH"],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]',"EPSG:4490":'GEOGCS["China Geodetic Coordinate System 2000", DATUM["China 2000", SPHEROID["CGCS2000", 6378137.0, 298.257222101, AUTHORITY["EPSG","1024"]], AUTHORITY["EPSG","1043"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", EAST], AUTHORITY["EPSG","4490"]]'};r[t]&&Uc(t,r[t]);}return e.defs(t);}function qc(t){return qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},qc(t);}function zc(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,Hc(n.key),n);}}function Hc(t){var e=function(t,e){if("object"!=qc(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=qc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==qc(e)?e:e+"";}var Qc=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t);},(e=[{key:"newInstance",value:function value(){return this.geostatsInstance||(this.geostatsInstance=new window.geostats()),this.geostatsInstance;}},{key:"getInstance",value:function value(t){var e=this.newInstance();return e.setSerie(t),e;}},{key:"getArrayStatistic",value:function value(t,e){return t.length?"Sum"===e||"求和"===e?this.getSum(t):"Maximum"===e||"最大值"===e?this.getMax(t):"Minimum"===e||"最小值"===e?this.getMin(t):"Average"===e||"平均值"===e?this.getMean(t):"Median"===e||"中位数"===e?this.getMedian(t):"times"===e||"计数"===e?this.getTimes(t):void 0:0;}},{key:"getArraySegments",value:function value(t,e,r){return"offset"===e?this.getEqInterval(t,r):"jenks"===e?this.getJenks(t,r):"square"===e?this.getMin(t)>=0&&this.getSqrtInterval(t,r):"logarithm"===e?this.getMin(t)>0&&this.getGeometricProgression(t,r):void 0;}},{key:"getSum",value:function value(t){return this.getInstance(t).sum();}},{key:"getMax",value:function value(t){return this.getInstance(t).max();}},{key:"getMin",value:function value(t){return this.getInstance(t).min();}},{key:"getMean",value:function value(t){return this.getInstance(t).mean();}},{key:"getMedian",value:function value(t){return this.getInstance(t).median();}},{key:"getTimes",value:function value(t){return t.length;}},{key:"getEqInterval",value:function value(t,e){return this.getInstance(t).getClassEqInterval(e);}},{key:"getJenks",value:function value(t,e){return this.getInstance(t).getClassJenks(e);}},{key:"getSqrtInterval",value:function value(t,e){return t=t.map(function(t){return Math.sqrt(t);}),this.getInstance(t).getClassEqInterval(e).map(function(t){return t*t;});}},{key:"getGeometricProgression",value:function value(t,e){return this.getInstance(t).getClassGeometricProgression(e);}}])&&zc(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e;}();function Wc(t){return Wc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},Wc(t);}function Xc(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,Yc(n.key),n);}}function Yc(t){var e=function(t,e){if("object"!=Wc(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Wc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==Wc(e)?e:e+"";}var Jc=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.BUILTIN_OBJECT={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},this._ctx=null,this._canvas=null,this._pixelCtx=null,this._width=null,this._height=null,this._offsetX=0,this._offsetY=0,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Util";},e=[{key:"clone",value:function value(t){var e=this.BUILTIN_OBJECT;if("object"==Wc(t)&&null!==t){var r=t;if(t instanceof Array){r=[];for(var n=0,i=t.length;n<i;n++)r[n]=this.clone(t[n]);}else if(!e[Object.prototype.toString.call(t)])for(var o in r={},t)t.hasOwnProperty(o)&&(r[o]=this.clone(t[o]));return r;}return t;}},{key:"mergeItem",value:function value(t,e,r,n){var i=this.BUILTIN_OBJECT;e.hasOwnProperty(r)&&("object"!=Wc(t[r])||i[Object.prototype.toString.call(t[r])]?!n&&r in t||(t[r]=e[r]):this.merge(t[r],e[r],n));}},{key:"merge",value:function value(t,e,r){for(var n in e)this.mergeItem(t,e,n,r);return t;}},{key:"getContext",value:function value(){return this._ctx||(this._ctx=document.createElement("canvas").getContext("2d")),this._ctx;}},{key:"getPixelContext",value:function value(){return this._pixelCtx||(this._canvas=document.createElement("canvas"),this._width=this._canvas.width,this._height=this._canvas.height,this._pixelCtx=this._canvas.getContext("2d")),this._pixelCtx;}},{key:"adjustCanvasSize",value:function value(t,e){var r,n=this._canvas,i=this._pixelCtx,o=this._width,a=this._height,s=this._offsetX,u=this._offsetY,l=100;t+s>o&&(o=t+s+l,n.width=o,r=!0),e+u>a&&(a=e+u+l,n.height=a,r=!0),t<-s&&(o+=s=Math.ceil(-t/l)*l,n.width=o,r=!0),e<-u&&(a+=u=Math.ceil(-e/l)*l,n.height=a,r=!0),r&&i.translate(s,u);}},{key:"getPixelOffset",value:function value(){return{x:this._offsetX,y:this._offsetY};}},{key:"indexOf",value:function value(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1;}},{key:"inherits",value:function value(t,e){var r=t.prototype;function n(){}for(var i in n.prototype=e.prototype,t.prototype=new n(),r)t.prototype[i]=r[i];t.constructor=t;}}],e&&Xc(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e;}();function $c(t){return $c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},$c(t);}function Kc(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,Zc(n.key),n);}}function Zc(t){var e=function(t,e){if("object"!=$c(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=$c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==$c(e)?e:e+"";}var th=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t),this.util=new Jc(),this._ctx=null,this.palette=["#ff9277"," #dddd00"," #ffc877"," #bbe3ff"," #d5ffbb","#bbbbff"," #ddb000"," #b0dd00"," #e2bbff"," #ffbbe3","#ff7777"," #ff9900"," #83dd00"," #77e3ff"," #778fff","#c877ff"," #ff77ab"," #ff6600"," #aa8800"," #77c7ff","#ad77ff"," #ff77ff"," #dd0083"," #777700"," #00aa00","#0088aa"," #8400dd"," #aa0088"," #dd0000"," #772e00"],this._palette=this.palette,this.highlightColor="rgba(0,0,255,1)",this._highlightColor=this.highlightColor,this.colorRegExp=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,this._nameColors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"},this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Color";}return e=t,r=[{key:"customPalette",value:function value(t){this.palette=t;}},{key:"resetPalette",value:function value(){this.palette=this._palette;}},{key:"getColor",value:function value(t,e){return t|=0,(e=e||this.palette)[t%e.length];}},{key:"customHighlight",value:function value(t){this.highlightColor=t;}},{key:"resetHighlight",value:function value(){this.highlightColor=this._highlightColor;}},{key:"getHighlightColor",value:function value(){return this.highlightColor;}},{key:"getRadialGradient",value:function value(t,e,r,n,i,o,a){var s=this.util;this._ctx||(this._ctx=s.getContext());for(var u=this._ctx.createRadialGradient(t,e,r,n,i,o),l=0,c=a.length;l<c;l++)u.addColorStop(a[l][0],a[l][1]);return u.__nonRecursion=!0,u;}},{key:"getLinearGradient",value:function value(t,e,r,n,i){var o=this.util;this._ctx||(this._ctx=o.getContext());for(var a=this._ctx.createLinearGradient(t,e,r,n),s=0,u=i.length;s<u;s++)a.addColorStop(i[s][0],i[s][1]);return a.__nonRecursion=!0,a;}},{key:"getStepColors",value:function value(t,e,r){t=this.toRGBA(t),e=this.toRGBA(e),t=this.getData(t);for(var n=[],i=((e=this.getData(e))[0]-t[0])/r,o=(e[1]-t[1])/r,a=(e[2]-t[2])/r,s=(e[3]-t[3])/r,u=0,l=t[0],c=t[1],h=t[2],f=t[3];u<r;u++)n[u]=this.toColor([this.adjust(Math.floor(l),[0,255]),this.adjust(Math.floor(c),[0,255]),this.adjust(Math.floor(h),[0,255]),f.toFixed(4)-0],"rgba"),l+=i,c+=o,h+=a,f+=s;return l=e[0],c=e[1],h=e[2],f=e[3],n[u]=this.toColor([l,c,h,f],"rgba"),n;}},{key:"getGradientColors",value:function value(t,e){var r=[],n=t.length;if(void 0===e&&(e=20),1===n)r=this.getStepColors(t[0],t[0],e);else if(n>1)for(var i=0,o=n-1;i<o;i++){var a=this.getStepColors(t[i],t[i+1],e);i<o-1&&a.pop(),r=r.concat(a);}return r;}},{key:"toColor",value:function value(t,e){if(e=e||"rgb",t&&(3===t.length||4===t.length)){if(t=this.map(t,function(t){return t>1?Math.ceil(t):t;}),e.indexOf("hex")>-1)return"#"+((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1);if(e.indexOf("hs")>-1){var r=this.map(t.slice(1,3),function(t){return t+"%";});t[1]=r[0],t[2]=r[1];}return e.indexOf("a")>-1?(3===t.length&&t.push(1),t[3]=this.adjust(t[3],[0,1]),e+"("+t.slice(0,4).join(",")+")"):e+"("+t.slice(0,3).join(",")+")";}}},{key:"toArray",value:function value(t){(t=this.trim(t)).indexOf("rgba")<0&&(t=this.toRGBA(t));var e=[],r=0;return t.replace(/[\d.]+/g,function(t){r<3?t|=0:t=+t,e[r++]=t;}),e;}},{key:"convert",value:function value(t,e){if(!this.isCalculableColor(t))return t;var r=this.getData(t),n=r[3];return void 0===n&&(n=1),t.indexOf("hsb")>-1?r=this._HSV_2_RGB(r):t.indexOf("hsl")>-1&&(r=this._HSL_2_RGB(r)),e.indexOf("hsb")>-1||e.indexOf("hsv")>-1?r=this._RGB_2_HSB(r):e.indexOf("hsl")>-1&&(r=this._RGB_2_HSL(r)),r[3]=n,this.toColor(r,e);}},{key:"toRGBA",value:function value(t){return this.convert(t,"rgba");}},{key:"toRGB",value:function value(t){return this.convert(t,"rgb");}},{key:"toHex",value:function value(t){return this.convert(t,"hex");}},{key:"toHSVA",value:function value(t){return this.convert(t,"hsva");}},{key:"toHSV",value:function value(t){return this.convert(t,"hsv");}},{key:"toHSBA",value:function value(t){return this.convert(t,"hsba");}},{key:"toHSB",value:function value(t){return this.convert(t,"hsb");}},{key:"toHSLA",value:function value(t){return this.convert(t,"hsla");}},{key:"toHSL",value:function value(t){return this.convert(t,"hsl");}},{key:"toName",value:function value(t){for(var e in this._nameColors)if(this.toHex(this._nameColors[e])===this.toHex(t))return e;return null;}},{key:"trim",value:function value(t){return String(t).replace(/\s+/g,"");}},{key:"normalize",value:function value(t){if(this._nameColors[t]&&(t=this._nameColors[t]),t=(t=this.trim(t)).replace(/hsv/i,"hsb"),/^#[\da-f]{3}$/i.test(t)){var e=(3840&(t=parseInt(t.slice(1),16)))<<8,r=(240&t)<<4,n=15&t;t="#"+((1<<24)+(e<<4)+e+(r<<4)+r+(n<<4)+n).toString(16).slice(1);}return t;}},{key:"lift",value:function value(t,e){if(!this.isCalculableColor(t))return t;var r=e>0?1:-1;void 0===e&&(e=0),e=Math.abs(e)>1?1:Math.abs(e),t=this.toRGB(t);for(var n=this.getData(t),i=0;i<3;i++)n[i]=1===r?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0;return"rgb("+n.join(",")+")";}},{key:"reverse",value:function value(t){if(!this.isCalculableColor(t))return t;var e=this.getData(this.toRGBA(t));return e=this.map(e,function(t){return 255-t;}),this.toColor(e,"rgb");}},{key:"mix",value:function value(t,e,r){if(!this.isCalculableColor(t)||!this.isCalculableColor(e))return t;void 0===r&&(r=.5);for(var n=2*(r=1-this.adjust(r,[0,1]))-1,i=this.getData(this.toRGBA(t)),o=this.getData(this.toRGBA(e)),a=i[3]-o[3],s=((n*a==-1?n:(n+a)/(1+n*a))+1)/2,u=1-s,l=[],c=0;c<3;c++)l[c]=i[c]*s+o[c]*u;var h=i[3]*r+o[3]*(1-r);return h=Math.max(0,Math.min(1,h)),1===i[3]&&1===o[3]?this.toColor(l,"rgb"):(l[3]=h,this.toColor(l,"rgba"));}},{key:"random",value:function value(){return"#"+Math.random().toString(16).slice(2,8);}},{key:"getData",value:function value(e){var r,n,i=(e=this.normalize(e)).match(this.colorRegExp);if(null===i)throw new Error("The color format error");var o,a=[];if(i[2])o=[(r=i[2].replace("#","").split(""))[0]+r[1],r[2]+r[3],r[4]+r[5]],a=this.map(o,function(e){return t.prototype.adjust.call(this,parseInt(e,16),[0,255]);});else if(i[4]){var s=i[4].split(",");n=s[3],o=s.slice(0,3),a=this.map(o,function(e){return e=Math.floor(e.indexOf("%")>0?2.55*parseInt(e,0):e),t.prototype.adjust.call(this,e,[0,255]);}),void 0!==n&&a.push(this.adjust(parseFloat(n),[0,1]));}else if(i[5]||i[6]){var u=(i[5]||i[6]).split(","),l=parseInt(u[0],0)/360,c=u[1],h=u[2];n=u[3],a=this.map([c,h],function(e){return t.prototype.adjust.call(this,parseFloat(e)/100,[0,1]);}),a.unshift(l),void 0!==n&&a.push(this.adjust(parseFloat(n),[0,1]));}return a;}},{key:"alpha",value:function value(t,e){if(!this.isCalculableColor(t))return t;null===e&&(e=1);var r=this.getData(this.toRGBA(t));return r[3]=this.adjust(Number(e).toFixed(4),[0,1]),this.toColor(r,"rgba");}},{key:"map",value:function value(t,e){if("function"!=typeof e)throw new TypeError();for(var r=t?t.length:0,n=0;n<r;n++)t[n]=e(t[n]);return t;}},{key:"adjust",value:function value(t,e){return t<=e[0]?t=e[0]:t>=e[1]&&(t=e[1]),t;}},{key:"isCalculableColor",value:function value(t){return t instanceof Array||"string"==typeof t;}},{key:"_HSV_2_RGB",value:function value(t){var e,r,n,i=t[0],o=t[1],a=t[2];if(0===o)e=255*a,r=255*a,n=255*a;else{var s=6*i;6===s&&(s=0);var u=0|s,l=a*(1-o),c=a*(1-o*(s-u)),h=a*(1-o*(1-(s-u))),f=0,p=0,y=0;0===u?(f=a,p=h,y=l):1===u?(f=c,p=a,y=l):2===u?(f=l,p=a,y=h):3===u?(f=l,p=c,y=a):4===u?(f=h,p=l,y=a):(f=a,p=l,y=c),e=255*f,r=255*p,n=255*y;}return[e,r,n];}},{key:"_HSL_2_RGB",value:function value(t){var e,r,n,i=t[0],o=t[1],a=t[2];if(0===o)e=255*a,r=255*a,n=255*a;else{var s,u=2*a-(s=a<.5?a*(1+o):a+o-o*a);e=255*this._HUE_2_RGB(u,s,i+1/3),r=255*this._HUE_2_RGB(u,s,i),n=255*this._HUE_2_RGB(u,s,i-1/3);}return[e,r,n];}},{key:"_HUE_2_RGB",value:function value(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),6*r<1?t+6*(e-t)*r:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t;}},{key:"_RGB_2_HSB",value:function value(t){var e,r,n=t[0]/255,i=t[1]/255,o=t[2]/255,a=Math.min(n,i,o),s=Math.max(n,i,o),u=s-a,l=s;if(0===u)e=0,r=0;else{r=u/s;var c=((s-n)/6+u/2)/u,h=((s-i)/6+u/2)/u,f=((s-o)/6+u/2)/u;n===s?e=f-h:i===s?e=1/3+c-f:o===s&&(e=2/3+h-c),e<0&&(e+=1),e>1&&(e-=1);}return[e*=360,r*=100,l*=100];}},{key:"_RGB_2_HSL",value:function value(t){var e,r,n=t[0]/255,i=t[1]/255,o=t[2]/255,a=Math.min(n,i,o),s=Math.max(n,i,o),u=s-a,l=(s+a)/2;if(0===u)e=0,r=0;else{r=l<.5?u/(s+a):u/(2-s-a);var c=((s-n)/6+u/2)/u,h=((s-i)/6+u/2)/u,f=((s-o)/6+u/2)/u;n===s?e=f-h:i===s?e=1/3+c-f:o===s&&(e=2/3+h-c),e<0&&(e+=1),e>1&&(e-=1);}return[e*=360,r*=100,l*=100];}}],r&&Kc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r;}();function eh(t){return eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},eh(t);}function rh(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,nh(n.key),n);}}function nh(t){var e=function(t,e){if("object"!=eh(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=eh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==eh(e)?e:e+"";}var ih=new th(),oh=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,t);},e=[{key:"createCanvas",value:function value(t,e){var r=document.createElement("canvas");return r.height=t,r.width=e,r.getContext("2d");}},{key:"getLinearGradient",value:function value(t,e,r,n,i){this._ctx||(this._ctx=this.getContext());for(var o=this._ctx.createLinearGradient(t,e,r,n),a=i.length,s=1/(a-1),u=0,l=0;l<a;l++)o.addColorStop(u,i[l]),u+=s;return o.__nonRecursion=!0,o;}},{key:"getContext",value:function value(){return this._ctx||(this._ctx=document.createElement("canvas").getContext("2d")),this._ctx;}},{key:"getStepColors",value:function value(t,e,r){t=ih.toRGBA(t),e=ih.toRGBA(e),t=ih.getData(t);for(var n=[],i=((e=ih.getData(e))[0]-t[0])/r,o=(e[1]-t[1])/r,a=(e[2]-t[2])/r,s=(e[3]-t[3])/r,u=0,l=t[0],c=t[1],h=t[2],f=t[3];u<r;u++)n[u]=ih.toColor([ih.adjust(Math.floor(l),[0,255]),ih.adjust(Math.floor(c),[0,255]),ih.adjust(Math.floor(h),[0,255]),f.toFixed(4)-0],"hex"),l+=i,c+=o,h+=a,f+=s;return l=e[0],c=e[1],h=e[2],f=e[3],n[u]=ih.toColor([l,c,h,f],"hex"),n;}},{key:"getGradientColors",value:function value(t,e,r){var n,i,o,a=[],s=t.length;if(void 0!==e){if(s>=e){if("RANGE"===r)for(i=0;i<e;i++)a.push(t[i]);else for(i=0;i<e;i++){var u=Math.floor(i/2);if(i%2==0)a.push(t[u]);else{var l=t.length-1-u;a.push(t[l]);}}}else{for(n=Math.ceil(e/(s-1)),i=0,o=s-1;i<o;i++){var c=this.getStepColors(t[i],t[i+1],n);i<o-1&&c.pop(),a=a.concat(c);}for(var h=a.length-e,f=0;f<h;f++)a.splice(2,1);}return a;}}},{key:"getColorWithOpacity",value:function value(t,e){return ih.alpha(t,e);}}],e&&rh(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e;}();function ah(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 sh(){sh=function sh(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value;},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{l({},"");}catch(t){l=function l(t,e,r){return t[e]=r;};}function c(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new T(n||[]);return i(a,"_invoke",{value:P(t,r,s)}),a;}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=c;var f="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function g(){}function b(){}var x={};l(x,a,function(){return this;});var w=Object.getPrototypeOf,S=w&&w(w(A([])));S&&S!==r&&n.call(S,a)&&(x=S);var _=b.prototype=m.prototype=Object.create(x);function M(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t);});});}function O(t,e){function r(i,o,a,s){var u=h(t[i],t,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==lh(c)&&n.call(c,"__await")?e.resolve(c.__await).then(function(t){r("next",t,a,s);},function(t){r("throw",t,a,s);}):e.resolve(c).then(function(t){l.value=t,a(l);},function(t){return r("throw",t,a,s);});}s(u.arg);}var o;i(this,"_invoke",{value:function value(t,n){function i(){return new e(function(e,i){r(t,n,e,i);});}return o=o?o.then(i,i):i();}});}function P(e,r,n){var i=f;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===d){if("throw"===o)throw a;return{value:t,done:!0};}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=k(s,n);if(u){if(u===v)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=d,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var l=h(e,r,n);if("normal"===l.type){if(i=n.done?d:p,l.arg===v)continue;return{value:l.arg,done:n.done};}"throw"===l.type&&(i=d,n.method="throw",n.arg=l.arg);}};}function k(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v);}function E(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0);}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r;};return o.next=o;}}throw new TypeError(lh(e)+" is not iterable");}return g.prototype=b,i(_,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t;},e.awrap=function(t){return{__await:t};},M(O.prototype),l(O.prototype,s,function(){return this;}),e.AsyncIterator=O,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new O(c(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},M(_),l(_,u,"Generator"),l(_,a,function(){return this;}),l(_,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t;}return t.done=!0,t;};},e.values=A,T.prototype={constructor:T,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i;}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc);}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break;}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a);},complete:function complete(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),v;},finish:function finish(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),C(r),v;}},catch:function _catch(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 i=n.arg;C(r);}return i;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v;}},e;}function uh(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value;}catch(t){return void r(t);}s.done?e(u):Promise.resolve(u).then(n,i);}function lh(t){return lh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t;}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t;},lh(t);}function ch(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,hh(n.key),n);}}function hh(t){var e=function(t,e){if("object"!=lh(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=lh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(t);}(t);return"symbol"==lh(e)?e:e+"";}function fh(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(fh=function fh(){return!!t;})();}function ph(t){return ph=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},ph(t);}function yh(t,e){return yh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},yh(t,e);}!function(){if("toISOString"in Date.prototype);}();var dh=1e3;function vh(){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"triggerEvent";return function(e){function r(t,e,n){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}(this,r),(i=function(t,e,r){return e=ph(e),function(t,e){if(e&&("object"===lh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t;}(t);}(t,fh()?Reflect.construct(e,r||[],ph(t).constructor):e.apply(t,r));}(this,r)).serverUrl=e.serverUrl||"https://www.supermapol.com",i.credentialValue=e.credentialValue,i.credentialKey=e.credentialKey,i.tiandituKey=e.tiandituKey||"",i.googleMapsAPIKey=e.googleMapsAPIKey||"",i.bingMapsKey=e.bingMapsKey||"",i.googleMapsLanguage=e.googleMapsLanguage||"zh-CN",i.withCredentials=e.withCredentials||!1,i.proxy=e.proxy,i.target=e.target||"map",i.excluortalProxyUrl=e.excludePortalProxyUrl,i.isSuperMapOnline=e.isSuperMapOnline,i.ignoreBaseProjection=e.ignoreBaseProjection,i.specifiedProj4=e.proj4,i.echartslayer=[],i.canvgsV=[],i.webMapService=new As(t,e),i.mapOptions=n,i.eventTypes=["mapcreatefailed","layercreatefailed"],i.mapId=t,i;}return 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yh(t,e);}(r,e),n=r,i=[{key:"_initWebMap",value:function value(){throw new Error("_initWebMap is not implemented");}},{key:"_getMapInfo",value:function value(){throw new Error("_getMapInfo is not implemented");}},{key:"_createMap",value:function value(){throw new Error("_createMap is not implemented");}},{key:"_initBaseLayer",value:function value(){throw new Error("_initBaseLayer is not implemented");}},{key:"_initOverlayLayer",value:function value(){throw new Error("_initOverlayLayer is not implemented");}},{key:"_addLayerSucceeded",value:function value(){throw new Error("_addLayerSucceeded is not implemented");}},{key:"_unproject",value:function value(){throw new Error("_unproject is not implemented");}},{key:"clean",value:function value(){throw new Error("clean is not implemented");}},{key:"echartsLayerResize",value:function value(){this.echartslayer.forEach(function(t){t.chart.resize();});}},{key:"setMapId",value:function value(t){var e=this;"string"==typeof t||"number"==typeof t?(this.mapId=t,this.webMapInfo=null):null!==t&&"object"===lh(t)&&(this.webMapInfo=t,this.mapId=""),this.webMapService.setMapId(t),t&&setTimeout(function(){e._initWebMap();},0);}},{key:"setServerUrl",value:function value(t){this.serverUrl=t,this.webMapService.setServerUrl(t);}},{key:"setWithCredentials",value:function value(t){this.withCredentials=t,this.webMapService.setWithCredentials(t);}},{key:"setProxy",value:function value(t){this.proxy=t,this.webMapService.setProxy(t);}},{key:"setZoom",value:function value(t){this.map&&(this.mapOptions.zoom=t,t!==+this.map.getZoom().toFixed(2)&&(t||0===t)&&this.map.setZoom(t,{from:"setZoom"}));}},{key:"setMaxBounds",value:function value(t){this.map&&(this.mapOptions.maxBounds=t,t&&this.map.setMaxBounds(t));}},{key:"setMinZoom",value:function value(t){this.map&&(this.mapOptions.minZoom=t,(t||0===t)&&this.map.setMinZoom(t));}},{key:"setMaxZoom",value:function value(t){this.map&&(this.mapOptions.maxZoom=t,(t||0===t)&&this.map.setMaxZoom(t));}},{key:"initWebMap",value:function value(){if(this.clean(),this.serverUrl=this.serverUrl&&this.webMapService.handleServerUrl(this.serverUrl),this.webMapInfo){var t=this.webMapInfo;return t.mapParams={title:this.webMapInfo.title,description:this.webMapInfo.description},this.mapParams=t.mapParams,void this._getMapInfo(t);}this.mapId&&this.serverUrl?(this._taskID=new Date(),this.getMapInfo(this._taskID)):this._createMap();}},{key:"getMapInfo",value:function value(t){var e=this;this.serverUrl=this.serverUrl&&this.webMapService.handleServerUrl(this.serverUrl),this.webMapService.getMapInfo().then(function(r){e._taskID===t&&(e.mapParams=r.mapParams,e._getMapInfo(r,t));},function(t){throw t;}).catch(function(t){e._fire("mapcreatefailed",{error:t}),console.log(t);});}},{key:"getBaseLayerType",value:function value(t){var e=t.layerType;switch((e.indexOf("TIANDITU_VEC")>-1||e.indexOf("TIANDITU_IMG")>-1||e.indexOf("TIANDITU_TER")>-1)&&(e="TIANDITU"),e){case"TILE":case"SUPERMAP_REST":return"TILE";case"CLOUD":case"CLOUD_BLACK":return"CLOUD";case"OSM":case"JAPAN_ORT":case"JAPAN_RELIEF":case"JAPAN_PALE":case"JAPAN_STD":case"GOOGLE_CN":case"GOOGLE":return"XYZ";default:return e;}}},{key:"getMapurls",value:function value(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{CLOUD:t.CLOUD||"http://t2.dituhui.com/FileService/image?map=quanguo&type=web&x={x}&y={y}&z={z}",CLOUD_BLACK:t.CLOUD_BLACK||"http://t3.dituhui.com/MapService/getGdp?x={x}&y={y}&z={z}",OSM:t.OSM||"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",GOOGLE:"https://maps.googleapis.com/maps/vt?pb=!1m5!1m4!1i{z}!2i{x}!3i{y}!4i256!2m3!1e0!2sm!3i540264686!3m12!2s{googleMapsLanguage}!3sUS!5e18!12m4!1e68!2m2!1sset!2sRoadmap!12m3!1e37!2m1!1ssmartmaps!4e0&key={googleMapsAPIKey}",GOOGLE_CN:"https://mt{0-3}.google.com/vt/lyrs=m&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}",JAPAN_STD:"https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",JAPAN_PALE:"https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png",JAPAN_RELIEF:"https://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png",JAPAN_ORT:"https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg"};}},{key:"getLayerFeatures",value:function value(t,e,r){var n=this,i=this.webMapService.getLayerFeatures(r,t,this.baseProjection);i&&i.then(function(){var r,i=(r=sh().mark(function r(i){var o;return sh().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!n.mapId||n._taskID===e){r.next=2;break;}return r.abrupt("return");case 2:if(!i||!t.projection){r.next=8;break;}if(Vc(t.projection,n.specifiedProj4)){r.next=8;break;}return r.next=6,a=t.projection.split(":")[1],s=n.serverUrl,u=a.replace(/^EPSG:/,""),l=bs(s),wr.get("".concat(l,"epsgcodes/").concat(u,".json"),null).then(function(t){return t.json();}).then(function(t){return t.wkt;}).catch(function(t){console.error(t);});case 6:(o=r.sent)&&Uc(t.projection,o,n.specifiedProj4);case 8:n._getLayerFeaturesSucceeded(i,t);case 9:case"end":return r.stop();}var a,s,u,l;},r);}),function(){var t=this,e=arguments;return new Promise(function(n,i){var o=r.apply(t,e);function a(t){uh(o,n,i,a,s,"next",t);}function s(t){uh(o,n,i,a,s,"throw",t);}a(void 0);});});return function(t){return i.apply(this,arguments);};}(),function(t){throw new Error(t);}).catch(function(e){n._addLayerSucceeded(),n._fire("layercreatefailed",{error:e,layer:t,map:n.map}),console.log(e);});}},{key:"setFeatureInfo",value:function value(t){var e,r=t.dv_v5_markerInfo;if(!r||!r.dataViz_title)return r;e=r;var n=t.properties;for(var i in e)n[i]&&(e[i]=n[i],delete n[i]);return e;}},{key:"getRankStyleGroup",value:function value(t,e,r){var n=[],i=[],o=r.style,a=r.themeSetting,s=a.segmentMethod,u=a.segmentCount,l=a.customSettings,c=r.themeSetting.minRadius,h=r.themeSetting.maxRadius,f=a.colors,p=o.fillColor;e.forEach(function(e){var r=e.properties[t];null==r||""===r||isNaN(+r)||n.push(Number(r));});try{i=Qc.getArraySegments(n,s,u);}catch(t){console.log(t);}for(var y=0;y<u;y++)if(y in l){var d=l[y].segment.start,v=l[y].segment.end;null!=d&&(i[y]=d),null!=v&&(i[y+1]=v);}var m=[];if(i&&i.length){for(var g,b,x=i.length,w=(h-c)/(x-1),S=Number(((h+c)/2).toFixed(2)),_="",M=f?oh.getGradientColors(f,x,"RANGE"):[],O=0;O<x-1;O++)S=(g=Number(i[O].toFixed(2)))===(b=Number(i[O+1].toFixed(2)))?S:c+Math.round(w*O),b=O===x-2?b+.01:b,S=l[O]&&l[O].radius?l[O].radius:S,o.radius=S,f&&f.length>0&&(_=l[O]&&l[O].color?l[O].color:M[O]||p,o.fillColor=_),m.push({radius:S,color:_,start:g,end:b,style:o});return m;}return!1;}},{key:"createRankStyleSource",value:function value(t,e){var r=t.themeSetting.themeField,n=this.getRankStyleGroup(r,e,t);return!!n&&{parameters:t,styleGroups:n};}},{key:"getRestMapLayerInfo",value:function value(t,e){var r=t.bounds,n=t.coordUnit,i=t.visibleScales,o=t.url;return e.layerType="TILE",e.orginEpsgCode=this.baseProjection,e.units=n&&n.toLowerCase(),e.extent=[r.left,r.bottom,r.right,r.top],e.visibleScales=i,e.url=o,e.sourceType="TILE",e;}},{key:"handleLayerFeatures",value:function value(t,e){var r=e.layerType,n=e.style,i=e.themeSetting,o=e.filterCondition;return(n||i)&&o&&"RANGE"!==r&&"UNIQUE"!==r&&"RANK_SYMBOL"!==r&&(t=this.getFilterFeatures(o,t)),t;}},{key:"getFilterFeatures",value:function value(t,e){if(!t)return e;for(var r=this.replaceFilterCharacter(t),n=[],i=0;i<e.length;i++){var o=e[i],a=void 0,s=o.properties;try{r=this.parseCondition(r,Object.keys(s));var u=this.parseConditionFeature(s),l="select * from json where ("+r+")";a=window.jsonsql.query(l,{attributes:u});}catch(t){continue;}a&&a.length>0&&n.push(o);}return n;}},{key:"replaceFilterCharacter",value:function value(t){return t.replace(/=/g,"==").replace(/AND|and/g,"&&").replace(/or|OR/g,"||").replace(/<==/g,"<=").replace(/>==/g,">=");}},{key:"getParseSpecialCharacter",value:function value(){var t={};return["(",")","(",")",",",","].forEach(function(e,r){t[e]="$".concat(r);}),t;}},{key:"parseSpecialCharacter",value:function value(t){var e=this.getParseSpecialCharacter();for(var r in e)for(var n=e[r],i=new RegExp("\\".concat(r),"g");i.test(t);)t=t.replace(i,n);return t;}},{key:"parseCondition",value:function value(t,e){var r=this,n=t.replace(/&|\||>|<|=|!/g," ").split(" ").filter(function(t){return t;}),i=t;return n.forEach(function(t){var n=e.find(function(e){return e===t;});if(r.startsWithNumber(t)&&n&&(i=i.replace(n,"$"+n)),n){var o=r.parseSpecialCharacter(n);i=i.replace(n,o);}}),i;}},{key:"parseConditionFeature",value:function value(t){var e={};for(var r in t){var n=r;this.startsWithNumber(r)&&(n="$"+r),e[n=this.parseSpecialCharacter(n)]=t[r];}return e;}},{key:"startsWithNumber",value:function value(t){return /^\d/.test(t);}},{key:"getEchartsLayerOptions",value:function value(t,e,r){var n=this.webMapService.getFeatureProperties(e),i=function(t,e){var r=[];if(e&&e.length){var n,i,o=t.from,a=t.to;if("XY_FIELD"===o.type&&o.xField&&o.yField&&a.xField&&a.yField)e.forEach(function(t){var e=t[o.xField],s=t[o.yField],u=t[a.xField],l=t[a.yField];e&&s&&u&&l&&(n=[t[o.xField],t[o.yField]],i=[t[a.xField],t[a.yField]],r.push({coords:[n,i]}));});else if("PLACE_FIELD"===o.type&&o.field&&a.field){var s=ms.concat(vs);e.forEach(function(t){var e=t[o.field],u=t[a.field];n=s.find(function(t){return gs(t.name,e);}),i=s.find(function(t){return gs(t.name,u);}),n&&i&&r.push({coords:[n.coord,i.coord]});});}}return r;}(t,n),o=this._createPointsData(i,t,n);return this._createOptions(t,i,o,r);}},{key:"getEchartsLayerById",value:function value(t){return this.echartslayer.find(function(e){return e.id===t;});}},{key:"getDashStyle",value:function value(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"array";if(!t)return"array"===e?[]:"";var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;switch(t){case"solid":r=[];break;case"dot":r=[1,4*n];break;case"dash":r=[4*n,4*n];break;case"dashrailway":r=[8*n,12*n];break;case"dashdot":r=[4*n,4*n,1*n,4*n];break;case"longdash":r=[8*n,4*n];break;case"longdashdot":r=[8*n,4*n,1,4*n];break;default:r=mr.isArray(t)?t:(t=rr.trim(t).replace(/\s+/g,",")).replace(/\[|\]/gi,"").split(",");}return"array"===e?r:r.join(",");}},{key:"getCanvasFromSVG",value:function value(t,e,r){var n=this,i=document.createElement("canvas");if(i.id="dataviz-canvas-".concat(new Date().getTime()),i.style.display="none",e.appendChild(i),t){var o=(window.canvg||{}).default?window.canvg.default:Ye,a=i.getContext("2d");o.from(a,t,{ignoreMouse:!0,ignoreAnimation:!0,forceRedraw:function forceRedraw(){return!1;}}).then(function(t){t.start(),n.canvgsV.push(t),i.width>300||i.height>300||r(i);});}else r(i);}},{key:"stopCanvg",value:function value(){this.canvgsV.forEach(function(t){return t.stop();}),this.canvgsV=[];}},{key:"getRangeStyleGroup",value:function value(t,e){var r,n=t.featureType,i=t.style,o=t.themeSetting,a=o.customSettings,s=o.themeField,u=o.segmentCount,l=o.segmentMethod,c=o.colors,h=[];e.forEach(function(t){if(r=t.properties){var e=r[s];(e||0===e)&&!isNaN(+e)&&h.push(parseFloat(e));}},this);var f=h&&h.length&&Qc.getArraySegments(h,l,u);if(f){var p=u;r&&f[0]===f[r.length-1]&&(p=1,f.length=2);for(var y=0;y<f.length;y++){var d=f[y];d=0===y?Math.floor(100*d)/100:Math.ceil(100*d)/100+.1,f[y]=Number(d.toFixed(2));}var v=c;v=oh.getGradientColors(v,p,"RANGE");for(var m=0;m<p;m++)m in a&&(a[m].segment.start&&(f[m]=a[m].segment.start),a[m].segment.end&&(f[m+1]=a[m].segment.end));for(var g=[],b=0;b<p;b++){var x=v[b];b in a&&a[b].color&&(x=a[b].color),"LINE"===n?i.strokeColor=x:i.fillColor=x;var w=f[b],S=f[b+1],_=JSON.parse(JSON.stringify(i));g.push({style:_,color:x,start:w,end:S});}return g;}}},{key:"getCustomSettingColors",value:function value(t,e){var r=Object.keys(t),n=[];return r.forEach(function(r){"LINE"===e?n.push(t[r].strokeColor):n.push(t[r].fillColor);}),n;}},{key:"getUniqueStyleGroup",value:function value(t,e){var r=t.featureType,n=t.style,i=t.themeSetting,o=i.colors,a=i.customSettings,s=i.themeField,u=e&&e[0]&&e[0].properties||{};Object.keys(u).forEach(function(t){t.toLocaleUpperCase()===s.toLocaleUpperCase()&&(s=t);});var l=[];for(var c in e){var h=e[c].properties[s],f=!1;for(var p in l)if(l[p]===h){f=!0;break;}f||l.push(h);}var y=o;y=oh.getGradientColors(y,l.length);var d=this.getCustomSettingColors(a,r).map(function(t){return t&&t.toLowerCase();}),v=oh.getGradientColors(o,l.length+Object.keys(a).length).map(function(t){return t.toLowerCase();}),m=Ke()(v,d),g=[];return l.forEach(function(t,e){var i=y[e],o=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ah(Object(r),!0).forEach(function(e){var n,i,o;n=t,i=e,o=r[e],(i=hh(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o;}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ah(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e));});}return t;}({},n),u=a[t];"object"===lh(u)?i=(o=Object.assign(o,u)).fillColor||o.strokeColor:("string"==typeof u&&(i=a[t]),u||(i=m.shift()),"LINE"===r?o.strokeColor=i:o.fillColor=i),g.push({color:i,style:o,value:t,themeField:s});},this),g;}},{key:"transformFeatures",value:function value(t){var e=this;return t&&t.forEach(function(r,n){var i=r.geometry&&r.geometry.coordinates;i&&0!==i.length&&(Je(r,function(t){var r=e._unproject(t);t[0]=r[0],t[1]=r[1];}),t[n]=r);}),t;}},{key:"_drawTextRectAndGetSize",value:function value(t){var e,r=t.context,n=t.style,i=t.textArray,o=t.lineHeight,a=t.doublePadding,s=t.canvas,u=n.backgroundFill,l=n.maxWidth-a,c=0,h=0,f=[];i.forEach(function(t){var e="",n=!1;h++;for(var i=0;i<t.length;i++){var o=e+t[i],a=r.measureText(o).width;a>l&&i>0||"\n"===t[i]?(e=t[i],h++,n=!0):(e=o,c=a);}n?f.push(l):f.push(c);},this);for(var p=0;p<f.length;p++){var y=f[p];if(y>=l){c=l;break;}y>c&&(c=y);}return c+=a,e=h*o+a-6,s.width=c,s.height=e,r.fillStyle=u,r.fillRect(0,0,c,e),r.lineWidth=n.borderWidth,r.strokeStyle=n.borderColor,r.strokeRect(0,0,c,e),{width:c,height:e};}},{key:"_drawTextWithCanvas",value:function value(t){var e=t.context,r=t.canvas,n=t.style,i=Number(n.font.replace(/[^0-9]/gi,""))+3,o=n.text.split("\r\n");e.font=n.font;var a=this._drawTextRectAndGetSize({context:e,style:n,textArray:o,lineHeight:i,doublePadding:16,canvas:r}),s=8;o.forEach(function(t,r){0!==r&&(s+=i),e.font=n.font;var o,u=n.textAlign,l=a.width-16;switch(u){case"center":o=l/2;break;case"right":o=l;break;default:o=8;}for(var c=t.split(""),h="",f=n.fillColor,p=n.maxWidth-16,y=0;y<c.length;y++){var d=h+c[y];e.measureText(d).width>p&&y>0||"\n"===c[y]?(e.fillStyle=f,e.textAlign=u,e.textBaseline="top",e.fillText(h,o,s),h=c[y],s+=i):h=d;}e.fillStyle=f,e.textAlign=u,e.textBaseline="top",e.fillText(h,o,s);},this);}},{key:"handleSvgColor",value:function value(t,e){var r=t.fillColor,n=t.fillOpacity,i=t.strokeColor,o=t.strokeOpacity,a=t.strokeWidth,s=e.getContext("2d");t.text?this._drawTextWithCanvas({context:s,canvas:e,style:t}):(r&&(s.fillStyle=oh.getColorWithOpacity(r,n),s.fill()),(i||a)&&(s.strokeStyle=oh.getColorWithOpacity(i,o),s.lineWidth=a,s.stroke()));}},{key:"_createPointsData",value:function value(t,e,r){var n=[],i=e.labelSetting;if(!i.show||!t.length)return n;var o=[],a=[];return t.forEach(function(t,e){var n=t.coords,s=n[0],u=n[1],l=r[e][i.from],c=r[e][i.to];!o.find(function(t){return t.value[0]===s[0]&&t.value[1]===s[1];})&&o.push({name:l,value:s}),!a.find(function(t){return t.value[0]===u[0]&&t.value[1]===u[1];})&&a.push({name:c,value:u});}),o.concat(a);}},{key:"_createOptions",value:function value(t,e,r,n){var i,o=this._createLineSeries(t,e,n);if(r&&r.length){var a=this._createPointSeries(t,r,n);i=o.concat(a);}else i=o.slice();return{series:i,animation:!1};}},{key:"_createPointSeries",value:function value(t,e,r){var n=t.lineSetting,i=t.animationSetting,o=t.labelSetting,a=[{name:"point-series",coordinateSystem:r,zlevel:2,label:{normal:{show:o.show,position:"right",formatter:"{b}",color:o.color,fontFamily:o.fontFamily}},itemStyle:{normal:{color:n.color||o.color}},data:e}];return i.show?(a[0].type="effectScatter",a[0].rippleEffect={brushType:"stroke"}):a[0].type="scatter",a;}},{key:"_createLineSeries",value:function value(t,e,r){var n=t.lineSetting,i=t.animationSetting,o=[{name:"line-series",coordinateSystem:r,type:"lines",zlevel:1,effect:{show:i.show,constantSpeed:i.constantSpeed,trailLength:0,symbol:i.symbol,symbolSize:i.symbolSize},lineStyle:{normal:{color:n.color,type:n.type,width:n.width,opacity:n.opacity,curveness:n.curveness}},data:e}];return e.length>=dh&&(o[0].large=!0,o[0].largeThreshold=100,o[0].blendMode="lighter"),o;}},{key:"_getLayerFeaturesSucceeded",value:function value(t,e){switch(t.type){case"feature":this._initOverlayLayer(e,t.features);break;case"restMap":e.layerType="restMap",this._initOverlayLayer(e,t.restMaps);break;case"mvt":e.layerType="mvt",this._initOverlayLayer(e,t);break;case"dataflow":case"noServerId":this._initOverlayLayer(e);}}},{key:"_fire",value:function value(e,r){this[t]&&this[t](e,r);}}],i&&ch(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i;}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tr);}}(),n;}();});
2343
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(502), __webpack_require__(19).setImmediate, __webpack_require__(503).Buffer))
2217
2344
 
2218
2345
  /***/ }),
2219
2346
 
2220
- /***/ 506:
2221
- /***/ (function(module, exports) {
2347
+ /***/ 502:
2348
+ /***/ (function(module, exports, __webpack_require__) {
2222
2349
 
2223
- module.exports = require("@supermapgis/vue-iclient-leaflet/lib/spin");
2350
+ "use strict";
2351
+
2352
+
2353
+ // shim for using process in browser
2354
+ var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it
2355
+ // don't break things. But we need to wrap it in a try catch in case it is
2356
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
2357
+ // function because try/catches deoptimize in certain engines.
2358
+
2359
+ var cachedSetTimeout;
2360
+ var cachedClearTimeout;
2361
+
2362
+ function defaultSetTimout() {
2363
+ throw new Error('setTimeout has not been defined');
2364
+ }
2365
+
2366
+ function defaultClearTimeout() {
2367
+ throw new Error('clearTimeout has not been defined');
2368
+ }
2369
+
2370
+ (function () {
2371
+ try {
2372
+ if (typeof setTimeout === 'function') {
2373
+ cachedSetTimeout = setTimeout;
2374
+ } else {
2375
+ cachedSetTimeout = defaultSetTimout;
2376
+ }
2377
+ } catch (e) {
2378
+ cachedSetTimeout = defaultSetTimout;
2379
+ }
2380
+
2381
+ try {
2382
+ if (typeof clearTimeout === 'function') {
2383
+ cachedClearTimeout = clearTimeout;
2384
+ } else {
2385
+ cachedClearTimeout = defaultClearTimeout;
2386
+ }
2387
+ } catch (e) {
2388
+ cachedClearTimeout = defaultClearTimeout;
2389
+ }
2390
+ })();
2391
+
2392
+ function runTimeout(fun) {
2393
+ if (cachedSetTimeout === setTimeout) {
2394
+ //normal enviroments in sane situations
2395
+ return setTimeout(fun, 0);
2396
+ } // if setTimeout wasn't available but was latter defined
2397
+
2398
+
2399
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
2400
+ cachedSetTimeout = setTimeout;
2401
+ return setTimeout(fun, 0);
2402
+ }
2403
+
2404
+ try {
2405
+ // when when somebody has screwed with setTimeout but no I.E. maddness
2406
+ return cachedSetTimeout(fun, 0);
2407
+ } catch (e) {
2408
+ try {
2409
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
2410
+ return cachedSetTimeout.call(null, fun, 0);
2411
+ } catch (e) {
2412
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
2413
+ return cachedSetTimeout.call(this, fun, 0);
2414
+ }
2415
+ }
2416
+ }
2417
+
2418
+ function runClearTimeout(marker) {
2419
+ if (cachedClearTimeout === clearTimeout) {
2420
+ //normal enviroments in sane situations
2421
+ return clearTimeout(marker);
2422
+ } // if clearTimeout wasn't available but was latter defined
2423
+
2424
+
2425
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
2426
+ cachedClearTimeout = clearTimeout;
2427
+ return clearTimeout(marker);
2428
+ }
2429
+
2430
+ try {
2431
+ // when when somebody has screwed with setTimeout but no I.E. maddness
2432
+ return cachedClearTimeout(marker);
2433
+ } catch (e) {
2434
+ try {
2435
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
2436
+ return cachedClearTimeout.call(null, marker);
2437
+ } catch (e) {
2438
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
2439
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
2440
+ return cachedClearTimeout.call(this, marker);
2441
+ }
2442
+ }
2443
+ }
2444
+
2445
+ var queue = [];
2446
+ var draining = false;
2447
+ var currentQueue;
2448
+ var queueIndex = -1;
2449
+
2450
+ function cleanUpNextTick() {
2451
+ if (!draining || !currentQueue) {
2452
+ return;
2453
+ }
2454
+
2455
+ draining = false;
2456
+
2457
+ if (currentQueue.length) {
2458
+ queue = currentQueue.concat(queue);
2459
+ } else {
2460
+ queueIndex = -1;
2461
+ }
2462
+
2463
+ if (queue.length) {
2464
+ drainQueue();
2465
+ }
2466
+ }
2467
+
2468
+ function drainQueue() {
2469
+ if (draining) {
2470
+ return;
2471
+ }
2472
+
2473
+ var timeout = runTimeout(cleanUpNextTick);
2474
+ draining = true;
2475
+ var len = queue.length;
2476
+
2477
+ while (len) {
2478
+ currentQueue = queue;
2479
+ queue = [];
2480
+
2481
+ while (++queueIndex < len) {
2482
+ if (currentQueue) {
2483
+ currentQueue[queueIndex].run();
2484
+ }
2485
+ }
2486
+
2487
+ queueIndex = -1;
2488
+ len = queue.length;
2489
+ }
2490
+
2491
+ currentQueue = null;
2492
+ draining = false;
2493
+ runClearTimeout(timeout);
2494
+ }
2495
+
2496
+ process.nextTick = function (fun) {
2497
+ var args = new Array(arguments.length - 1);
2498
+
2499
+ if (arguments.length > 1) {
2500
+ for (var i = 1; i < arguments.length; i++) {
2501
+ args[i - 1] = arguments[i];
2502
+ }
2503
+ }
2504
+
2505
+ queue.push(new Item(fun, args));
2506
+
2507
+ if (queue.length === 1 && !draining) {
2508
+ runTimeout(drainQueue);
2509
+ }
2510
+ }; // v8 likes predictible objects
2511
+
2512
+
2513
+ function Item(fun, array) {
2514
+ this.fun = fun;
2515
+ this.array = array;
2516
+ }
2517
+
2518
+ Item.prototype.run = function () {
2519
+ this.fun.apply(null, this.array);
2520
+ };
2521
+
2522
+ process.title = 'browser';
2523
+ process.browser = true;
2524
+ process.env = {};
2525
+ process.argv = [];
2526
+ process.version = ''; // empty string to avoid regexp issues
2527
+
2528
+ process.versions = {};
2529
+
2530
+ function noop() {}
2531
+
2532
+ process.on = noop;
2533
+ process.addListener = noop;
2534
+ process.once = noop;
2535
+ process.off = noop;
2536
+ process.removeListener = noop;
2537
+ process.removeAllListeners = noop;
2538
+ process.emit = noop;
2539
+ process.prependListener = noop;
2540
+ process.prependOnceListener = noop;
2541
+
2542
+ process.listeners = function (name) {
2543
+ return [];
2544
+ };
2545
+
2546
+ process.binding = function (name) {
2547
+ throw new Error('process.binding is not supported');
2548
+ };
2549
+
2550
+ process.cwd = function () {
2551
+ return '/';
2552
+ };
2553
+
2554
+ process.chdir = function (dir) {
2555
+ throw new Error('process.chdir is not supported');
2556
+ };
2557
+
2558
+ process.umask = function () {
2559
+ return 0;
2560
+ };
2224
2561
 
2225
2562
  /***/ }),
2226
2563
 
2227
- /***/ 51:
2228
- /***/ (function(module, exports) {
2564
+ /***/ 503:
2565
+ /***/ (function(module, exports, __webpack_require__) {
2229
2566
 
2230
- module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_utils/epsg-define.js");
2567
+ "use strict";
2568
+ /* WEBPACK VAR INJECTION */(function(global) {/*!
2569
+ * The buffer module from node.js, for the browser.
2570
+ *
2571
+ * @author Feross Aboukhadijeh <http://feross.org>
2572
+ * @license MIT
2573
+ */
2574
+
2575
+ /* eslint-disable no-proto */
2576
+
2577
+
2578
+ var base64 = __webpack_require__(504);
2579
+
2580
+ var ieee754 = __webpack_require__(505);
2581
+
2582
+ var isArray = __webpack_require__(506);
2583
+
2584
+ exports.Buffer = Buffer;
2585
+ exports.SlowBuffer = SlowBuffer;
2586
+ exports.INSPECT_MAX_BYTES = 50;
2587
+ /**
2588
+ * If `Buffer.TYPED_ARRAY_SUPPORT`:
2589
+ * === true Use Uint8Array implementation (fastest)
2590
+ * === false Use Object implementation (most compatible, even IE6)
2591
+ *
2592
+ * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
2593
+ * Opera 11.6+, iOS 4.2+.
2594
+ *
2595
+ * Due to various browser bugs, sometimes the Object implementation will be used even
2596
+ * when the browser supports typed arrays.
2597
+ *
2598
+ * Note:
2599
+ *
2600
+ * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
2601
+ * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
2602
+ *
2603
+ * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
2604
+ *
2605
+ * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
2606
+ * incorrect length in some situations.
2607
+
2608
+ * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
2609
+ * get the Object implementation, which is slower but behaves correctly.
2610
+ */
2611
+
2612
+ Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport();
2613
+ /*
2614
+ * Export kMaxLength after typed array support is determined.
2615
+ */
2616
+
2617
+ exports.kMaxLength = kMaxLength();
2618
+
2619
+ function typedArraySupport() {
2620
+ try {
2621
+ var arr = new Uint8Array(1);
2622
+ arr.__proto__ = {
2623
+ __proto__: Uint8Array.prototype,
2624
+ foo: function foo() {
2625
+ return 42;
2626
+ }
2627
+ };
2628
+ return arr.foo() === 42 && // typed array instances can be augmented
2629
+ typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
2630
+ arr.subarray(1, 1).byteLength === 0; // ie10 has broken `subarray`
2631
+ } catch (e) {
2632
+ return false;
2633
+ }
2634
+ }
2635
+
2636
+ function kMaxLength() {
2637
+ return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;
2638
+ }
2639
+
2640
+ function createBuffer(that, length) {
2641
+ if (kMaxLength() < length) {
2642
+ throw new RangeError('Invalid typed array length');
2643
+ }
2644
+
2645
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
2646
+ // Return an augmented `Uint8Array` instance, for best performance
2647
+ that = new Uint8Array(length);
2648
+ that.__proto__ = Buffer.prototype;
2649
+ } else {
2650
+ // Fallback: Return an object instance of the Buffer class
2651
+ if (that === null) {
2652
+ that = new Buffer(length);
2653
+ }
2654
+
2655
+ that.length = length;
2656
+ }
2657
+
2658
+ return that;
2659
+ }
2660
+ /**
2661
+ * The Buffer constructor returns instances of `Uint8Array` that have their
2662
+ * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
2663
+ * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
2664
+ * and the `Uint8Array` methods. Square bracket notation works as expected -- it
2665
+ * returns a single octet.
2666
+ *
2667
+ * The `Uint8Array` prototype remains unmodified.
2668
+ */
2669
+
2670
+
2671
+ function Buffer(arg, encodingOrOffset, length) {
2672
+ if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
2673
+ return new Buffer(arg, encodingOrOffset, length);
2674
+ } // Common case.
2675
+
2676
+
2677
+ if (typeof arg === 'number') {
2678
+ if (typeof encodingOrOffset === 'string') {
2679
+ throw new Error('If encoding is specified then the first argument must be a string');
2680
+ }
2681
+
2682
+ return allocUnsafe(this, arg);
2683
+ }
2684
+
2685
+ return from(this, arg, encodingOrOffset, length);
2686
+ }
2687
+
2688
+ Buffer.poolSize = 8192; // not used by this implementation
2689
+ // TODO: Legacy, not needed anymore. Remove in next major version.
2690
+
2691
+ Buffer._augment = function (arr) {
2692
+ arr.__proto__ = Buffer.prototype;
2693
+ return arr;
2694
+ };
2695
+
2696
+ function from(that, value, encodingOrOffset, length) {
2697
+ if (typeof value === 'number') {
2698
+ throw new TypeError('"value" argument must not be a number');
2699
+ }
2700
+
2701
+ if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
2702
+ return fromArrayBuffer(that, value, encodingOrOffset, length);
2703
+ }
2704
+
2705
+ if (typeof value === 'string') {
2706
+ return fromString(that, value, encodingOrOffset);
2707
+ }
2708
+
2709
+ return fromObject(that, value);
2710
+ }
2711
+ /**
2712
+ * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
2713
+ * if value is a number.
2714
+ * Buffer.from(str[, encoding])
2715
+ * Buffer.from(array)
2716
+ * Buffer.from(buffer)
2717
+ * Buffer.from(arrayBuffer[, byteOffset[, length]])
2718
+ **/
2719
+
2720
+
2721
+ Buffer.from = function (value, encodingOrOffset, length) {
2722
+ return from(null, value, encodingOrOffset, length);
2723
+ };
2724
+
2725
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
2726
+ Buffer.prototype.__proto__ = Uint8Array.prototype;
2727
+ Buffer.__proto__ = Uint8Array;
2728
+
2729
+ if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) {
2730
+ // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
2731
+ Object.defineProperty(Buffer, Symbol.species, {
2732
+ value: null,
2733
+ configurable: true
2734
+ });
2735
+ }
2736
+ }
2737
+
2738
+ function assertSize(size) {
2739
+ if (typeof size !== 'number') {
2740
+ throw new TypeError('"size" argument must be a number');
2741
+ } else if (size < 0) {
2742
+ throw new RangeError('"size" argument must not be negative');
2743
+ }
2744
+ }
2745
+
2746
+ function alloc(that, size, fill, encoding) {
2747
+ assertSize(size);
2748
+
2749
+ if (size <= 0) {
2750
+ return createBuffer(that, size);
2751
+ }
2752
+
2753
+ if (fill !== undefined) {
2754
+ // Only pay attention to encoding if it's a string. This
2755
+ // prevents accidentally sending in a number that would
2756
+ // be interpretted as a start offset.
2757
+ return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill);
2758
+ }
2759
+
2760
+ return createBuffer(that, size);
2761
+ }
2762
+ /**
2763
+ * Creates a new filled Buffer instance.
2764
+ * alloc(size[, fill[, encoding]])
2765
+ **/
2766
+
2767
+
2768
+ Buffer.alloc = function (size, fill, encoding) {
2769
+ return alloc(null, size, fill, encoding);
2770
+ };
2771
+
2772
+ function allocUnsafe(that, size) {
2773
+ assertSize(size);
2774
+ that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
2775
+
2776
+ if (!Buffer.TYPED_ARRAY_SUPPORT) {
2777
+ for (var i = 0; i < size; ++i) {
2778
+ that[i] = 0;
2779
+ }
2780
+ }
2781
+
2782
+ return that;
2783
+ }
2784
+ /**
2785
+ * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
2786
+ * */
2787
+
2788
+
2789
+ Buffer.allocUnsafe = function (size) {
2790
+ return allocUnsafe(null, size);
2791
+ };
2792
+ /**
2793
+ * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
2794
+ */
2795
+
2796
+
2797
+ Buffer.allocUnsafeSlow = function (size) {
2798
+ return allocUnsafe(null, size);
2799
+ };
2800
+
2801
+ function fromString(that, string, encoding) {
2802
+ if (typeof encoding !== 'string' || encoding === '') {
2803
+ encoding = 'utf8';
2804
+ }
2805
+
2806
+ if (!Buffer.isEncoding(encoding)) {
2807
+ throw new TypeError('"encoding" must be a valid string encoding');
2808
+ }
2809
+
2810
+ var length = byteLength(string, encoding) | 0;
2811
+ that = createBuffer(that, length);
2812
+ var actual = that.write(string, encoding);
2813
+
2814
+ if (actual !== length) {
2815
+ // Writing a hex string, for example, that contains invalid characters will
2816
+ // cause everything after the first invalid character to be ignored. (e.g.
2817
+ // 'abxxcd' will be treated as 'ab')
2818
+ that = that.slice(0, actual);
2819
+ }
2820
+
2821
+ return that;
2822
+ }
2823
+
2824
+ function fromArrayLike(that, array) {
2825
+ var length = array.length < 0 ? 0 : checked(array.length) | 0;
2826
+ that = createBuffer(that, length);
2827
+
2828
+ for (var i = 0; i < length; i += 1) {
2829
+ that[i] = array[i] & 255;
2830
+ }
2831
+
2832
+ return that;
2833
+ }
2834
+
2835
+ function fromArrayBuffer(that, array, byteOffset, length) {
2836
+ array.byteLength; // this throws if `array` is not a valid ArrayBuffer
2837
+
2838
+ if (byteOffset < 0 || array.byteLength < byteOffset) {
2839
+ throw new RangeError('\'offset\' is out of bounds');
2840
+ }
2841
+
2842
+ if (array.byteLength < byteOffset + (length || 0)) {
2843
+ throw new RangeError('\'length\' is out of bounds');
2844
+ }
2845
+
2846
+ if (byteOffset === undefined && length === undefined) {
2847
+ array = new Uint8Array(array);
2848
+ } else if (length === undefined) {
2849
+ array = new Uint8Array(array, byteOffset);
2850
+ } else {
2851
+ array = new Uint8Array(array, byteOffset, length);
2852
+ }
2853
+
2854
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
2855
+ // Return an augmented `Uint8Array` instance, for best performance
2856
+ that = array;
2857
+ that.__proto__ = Buffer.prototype;
2858
+ } else {
2859
+ // Fallback: Return an object instance of the Buffer class
2860
+ that = fromArrayLike(that, array);
2861
+ }
2862
+
2863
+ return that;
2864
+ }
2865
+
2866
+ function fromObject(that, obj) {
2867
+ if (Buffer.isBuffer(obj)) {
2868
+ var len = checked(obj.length) | 0;
2869
+ that = createBuffer(that, len);
2870
+
2871
+ if (that.length === 0) {
2872
+ return that;
2873
+ }
2874
+
2875
+ obj.copy(that, 0, 0, len);
2876
+ return that;
2877
+ }
2878
+
2879
+ if (obj) {
2880
+ if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {
2881
+ if (typeof obj.length !== 'number' || isnan(obj.length)) {
2882
+ return createBuffer(that, 0);
2883
+ }
2884
+
2885
+ return fromArrayLike(that, obj);
2886
+ }
2887
+
2888
+ if (obj.type === 'Buffer' && isArray(obj.data)) {
2889
+ return fromArrayLike(that, obj.data);
2890
+ }
2891
+ }
2892
+
2893
+ throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');
2894
+ }
2895
+
2896
+ function checked(length) {
2897
+ // Note: cannot use `length < kMaxLength()` here because that fails when
2898
+ // length is NaN (which is otherwise coerced to zero.)
2899
+ if (length >= kMaxLength()) {
2900
+ throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');
2901
+ }
2902
+
2903
+ return length | 0;
2904
+ }
2905
+
2906
+ function SlowBuffer(length) {
2907
+ if (+length != length) {
2908
+ // eslint-disable-line eqeqeq
2909
+ length = 0;
2910
+ }
2911
+
2912
+ return Buffer.alloc(+length);
2913
+ }
2914
+
2915
+ Buffer.isBuffer = function isBuffer(b) {
2916
+ return !!(b != null && b._isBuffer);
2917
+ };
2918
+
2919
+ Buffer.compare = function compare(a, b) {
2920
+ if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
2921
+ throw new TypeError('Arguments must be Buffers');
2922
+ }
2923
+
2924
+ if (a === b) return 0;
2925
+ var x = a.length;
2926
+ var y = b.length;
2927
+
2928
+ for (var i = 0, len = Math.min(x, y); i < len; ++i) {
2929
+ if (a[i] !== b[i]) {
2930
+ x = a[i];
2931
+ y = b[i];
2932
+ break;
2933
+ }
2934
+ }
2935
+
2936
+ if (x < y) return -1;
2937
+ if (y < x) return 1;
2938
+ return 0;
2939
+ };
2940
+
2941
+ Buffer.isEncoding = function isEncoding(encoding) {
2942
+ switch (String(encoding).toLowerCase()) {
2943
+ case 'hex':
2944
+ case 'utf8':
2945
+ case 'utf-8':
2946
+ case 'ascii':
2947
+ case 'latin1':
2948
+ case 'binary':
2949
+ case 'base64':
2950
+ case 'ucs2':
2951
+ case 'ucs-2':
2952
+ case 'utf16le':
2953
+ case 'utf-16le':
2954
+ return true;
2955
+
2956
+ default:
2957
+ return false;
2958
+ }
2959
+ };
2960
+
2961
+ Buffer.concat = function concat(list, length) {
2962
+ if (!isArray(list)) {
2963
+ throw new TypeError('"list" argument must be an Array of Buffers');
2964
+ }
2965
+
2966
+ if (list.length === 0) {
2967
+ return Buffer.alloc(0);
2968
+ }
2969
+
2970
+ var i;
2971
+
2972
+ if (length === undefined) {
2973
+ length = 0;
2974
+
2975
+ for (i = 0; i < list.length; ++i) {
2976
+ length += list[i].length;
2977
+ }
2978
+ }
2979
+
2980
+ var buffer = Buffer.allocUnsafe(length);
2981
+ var pos = 0;
2982
+
2983
+ for (i = 0; i < list.length; ++i) {
2984
+ var buf = list[i];
2985
+
2986
+ if (!Buffer.isBuffer(buf)) {
2987
+ throw new TypeError('"list" argument must be an Array of Buffers');
2988
+ }
2989
+
2990
+ buf.copy(buffer, pos);
2991
+ pos += buf.length;
2992
+ }
2993
+
2994
+ return buffer;
2995
+ };
2996
+
2997
+ function byteLength(string, encoding) {
2998
+ if (Buffer.isBuffer(string)) {
2999
+ return string.length;
3000
+ }
3001
+
3002
+ if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
3003
+ return string.byteLength;
3004
+ }
3005
+
3006
+ if (typeof string !== 'string') {
3007
+ string = '' + string;
3008
+ }
3009
+
3010
+ var len = string.length;
3011
+ if (len === 0) return 0; // Use a for loop to avoid recursion
3012
+
3013
+ var loweredCase = false;
3014
+
3015
+ for (;;) {
3016
+ switch (encoding) {
3017
+ case 'ascii':
3018
+ case 'latin1':
3019
+ case 'binary':
3020
+ return len;
3021
+
3022
+ case 'utf8':
3023
+ case 'utf-8':
3024
+ case undefined:
3025
+ return utf8ToBytes(string).length;
3026
+
3027
+ case 'ucs2':
3028
+ case 'ucs-2':
3029
+ case 'utf16le':
3030
+ case 'utf-16le':
3031
+ return len * 2;
3032
+
3033
+ case 'hex':
3034
+ return len >>> 1;
3035
+
3036
+ case 'base64':
3037
+ return base64ToBytes(string).length;
3038
+
3039
+ default:
3040
+ if (loweredCase) return utf8ToBytes(string).length; // assume utf8
3041
+
3042
+ encoding = ('' + encoding).toLowerCase();
3043
+ loweredCase = true;
3044
+ }
3045
+ }
3046
+ }
3047
+
3048
+ Buffer.byteLength = byteLength;
3049
+
3050
+ function slowToString(encoding, start, end) {
3051
+ var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
3052
+ // property of a typed array.
3053
+ // This behaves neither like String nor Uint8Array in that we set start/end
3054
+ // to their upper/lower bounds if the value passed is out of range.
3055
+ // undefined is handled specially as per ECMA-262 6th Edition,
3056
+ // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
3057
+
3058
+ if (start === undefined || start < 0) {
3059
+ start = 0;
3060
+ } // Return early if start > this.length. Done here to prevent potential uint32
3061
+ // coercion fail below.
3062
+
3063
+
3064
+ if (start > this.length) {
3065
+ return '';
3066
+ }
3067
+
3068
+ if (end === undefined || end > this.length) {
3069
+ end = this.length;
3070
+ }
3071
+
3072
+ if (end <= 0) {
3073
+ return '';
3074
+ } // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
3075
+
3076
+
3077
+ end >>>= 0;
3078
+ start >>>= 0;
3079
+
3080
+ if (end <= start) {
3081
+ return '';
3082
+ }
3083
+
3084
+ if (!encoding) encoding = 'utf8';
3085
+
3086
+ while (true) {
3087
+ switch (encoding) {
3088
+ case 'hex':
3089
+ return hexSlice(this, start, end);
3090
+
3091
+ case 'utf8':
3092
+ case 'utf-8':
3093
+ return utf8Slice(this, start, end);
3094
+
3095
+ case 'ascii':
3096
+ return asciiSlice(this, start, end);
3097
+
3098
+ case 'latin1':
3099
+ case 'binary':
3100
+ return latin1Slice(this, start, end);
3101
+
3102
+ case 'base64':
3103
+ return base64Slice(this, start, end);
3104
+
3105
+ case 'ucs2':
3106
+ case 'ucs-2':
3107
+ case 'utf16le':
3108
+ case 'utf-16le':
3109
+ return utf16leSlice(this, start, end);
3110
+
3111
+ default:
3112
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
3113
+ encoding = (encoding + '').toLowerCase();
3114
+ loweredCase = true;
3115
+ }
3116
+ }
3117
+ } // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
3118
+ // Buffer instances.
3119
+
3120
+
3121
+ Buffer.prototype._isBuffer = true;
3122
+
3123
+ function swap(b, n, m) {
3124
+ var i = b[n];
3125
+ b[n] = b[m];
3126
+ b[m] = i;
3127
+ }
3128
+
3129
+ Buffer.prototype.swap16 = function swap16() {
3130
+ var len = this.length;
3131
+
3132
+ if (len % 2 !== 0) {
3133
+ throw new RangeError('Buffer size must be a multiple of 16-bits');
3134
+ }
3135
+
3136
+ for (var i = 0; i < len; i += 2) {
3137
+ swap(this, i, i + 1);
3138
+ }
3139
+
3140
+ return this;
3141
+ };
3142
+
3143
+ Buffer.prototype.swap32 = function swap32() {
3144
+ var len = this.length;
3145
+
3146
+ if (len % 4 !== 0) {
3147
+ throw new RangeError('Buffer size must be a multiple of 32-bits');
3148
+ }
3149
+
3150
+ for (var i = 0; i < len; i += 4) {
3151
+ swap(this, i, i + 3);
3152
+ swap(this, i + 1, i + 2);
3153
+ }
3154
+
3155
+ return this;
3156
+ };
3157
+
3158
+ Buffer.prototype.swap64 = function swap64() {
3159
+ var len = this.length;
3160
+
3161
+ if (len % 8 !== 0) {
3162
+ throw new RangeError('Buffer size must be a multiple of 64-bits');
3163
+ }
3164
+
3165
+ for (var i = 0; i < len; i += 8) {
3166
+ swap(this, i, i + 7);
3167
+ swap(this, i + 1, i + 6);
3168
+ swap(this, i + 2, i + 5);
3169
+ swap(this, i + 3, i + 4);
3170
+ }
3171
+
3172
+ return this;
3173
+ };
3174
+
3175
+ Buffer.prototype.toString = function toString() {
3176
+ var length = this.length | 0;
3177
+ if (length === 0) return '';
3178
+ if (arguments.length === 0) return utf8Slice(this, 0, length);
3179
+ return slowToString.apply(this, arguments);
3180
+ };
3181
+
3182
+ Buffer.prototype.equals = function equals(b) {
3183
+ if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');
3184
+ if (this === b) return true;
3185
+ return Buffer.compare(this, b) === 0;
3186
+ };
3187
+
3188
+ Buffer.prototype.inspect = function inspect() {
3189
+ var str = '';
3190
+ var max = exports.INSPECT_MAX_BYTES;
3191
+
3192
+ if (this.length > 0) {
3193
+ str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');
3194
+ if (this.length > max) str += ' ... ';
3195
+ }
3196
+
3197
+ return '<Buffer ' + str + '>';
3198
+ };
3199
+
3200
+ Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
3201
+ if (!Buffer.isBuffer(target)) {
3202
+ throw new TypeError('Argument must be a Buffer');
3203
+ }
3204
+
3205
+ if (start === undefined) {
3206
+ start = 0;
3207
+ }
3208
+
3209
+ if (end === undefined) {
3210
+ end = target ? target.length : 0;
3211
+ }
3212
+
3213
+ if (thisStart === undefined) {
3214
+ thisStart = 0;
3215
+ }
3216
+
3217
+ if (thisEnd === undefined) {
3218
+ thisEnd = this.length;
3219
+ }
3220
+
3221
+ if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
3222
+ throw new RangeError('out of range index');
3223
+ }
3224
+
3225
+ if (thisStart >= thisEnd && start >= end) {
3226
+ return 0;
3227
+ }
3228
+
3229
+ if (thisStart >= thisEnd) {
3230
+ return -1;
3231
+ }
3232
+
3233
+ if (start >= end) {
3234
+ return 1;
3235
+ }
3236
+
3237
+ start >>>= 0;
3238
+ end >>>= 0;
3239
+ thisStart >>>= 0;
3240
+ thisEnd >>>= 0;
3241
+ if (this === target) return 0;
3242
+ var x = thisEnd - thisStart;
3243
+ var y = end - start;
3244
+ var len = Math.min(x, y);
3245
+ var thisCopy = this.slice(thisStart, thisEnd);
3246
+ var targetCopy = target.slice(start, end);
3247
+
3248
+ for (var i = 0; i < len; ++i) {
3249
+ if (thisCopy[i] !== targetCopy[i]) {
3250
+ x = thisCopy[i];
3251
+ y = targetCopy[i];
3252
+ break;
3253
+ }
3254
+ }
3255
+
3256
+ if (x < y) return -1;
3257
+ if (y < x) return 1;
3258
+ return 0;
3259
+ }; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
3260
+ // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
3261
+ //
3262
+ // Arguments:
3263
+ // - buffer - a Buffer to search
3264
+ // - val - a string, Buffer, or number
3265
+ // - byteOffset - an index into `buffer`; will be clamped to an int32
3266
+ // - encoding - an optional encoding, relevant is val is a string
3267
+ // - dir - true for indexOf, false for lastIndexOf
3268
+
3269
+
3270
+ function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
3271
+ // Empty buffer means no match
3272
+ if (buffer.length === 0) return -1; // Normalize byteOffset
3273
+
3274
+ if (typeof byteOffset === 'string') {
3275
+ encoding = byteOffset;
3276
+ byteOffset = 0;
3277
+ } else if (byteOffset > 0x7fffffff) {
3278
+ byteOffset = 0x7fffffff;
3279
+ } else if (byteOffset < -0x80000000) {
3280
+ byteOffset = -0x80000000;
3281
+ }
3282
+
3283
+ byteOffset = +byteOffset; // Coerce to Number.
3284
+
3285
+ if (isNaN(byteOffset)) {
3286
+ // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
3287
+ byteOffset = dir ? 0 : buffer.length - 1;
3288
+ } // Normalize byteOffset: negative offsets start from the end of the buffer
3289
+
3290
+
3291
+ if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
3292
+
3293
+ if (byteOffset >= buffer.length) {
3294
+ if (dir) return -1;else byteOffset = buffer.length - 1;
3295
+ } else if (byteOffset < 0) {
3296
+ if (dir) byteOffset = 0;else return -1;
3297
+ } // Normalize val
3298
+
3299
+
3300
+ if (typeof val === 'string') {
3301
+ val = Buffer.from(val, encoding);
3302
+ } // Finally, search either indexOf (if dir is true) or lastIndexOf
3303
+
3304
+
3305
+ if (Buffer.isBuffer(val)) {
3306
+ // Special case: looking for empty string/buffer always fails
3307
+ if (val.length === 0) {
3308
+ return -1;
3309
+ }
3310
+
3311
+ return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
3312
+ } else if (typeof val === 'number') {
3313
+ val = val & 0xFF; // Search for a byte value [0-255]
3314
+
3315
+ if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {
3316
+ if (dir) {
3317
+ return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
3318
+ } else {
3319
+ return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
3320
+ }
3321
+ }
3322
+
3323
+ return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
3324
+ }
3325
+
3326
+ throw new TypeError('val must be string, number or Buffer');
3327
+ }
3328
+
3329
+ function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
3330
+ var indexSize = 1;
3331
+ var arrLength = arr.length;
3332
+ var valLength = val.length;
3333
+
3334
+ if (encoding !== undefined) {
3335
+ encoding = String(encoding).toLowerCase();
3336
+
3337
+ if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {
3338
+ if (arr.length < 2 || val.length < 2) {
3339
+ return -1;
3340
+ }
3341
+
3342
+ indexSize = 2;
3343
+ arrLength /= 2;
3344
+ valLength /= 2;
3345
+ byteOffset /= 2;
3346
+ }
3347
+ }
3348
+
3349
+ function read(buf, i) {
3350
+ if (indexSize === 1) {
3351
+ return buf[i];
3352
+ } else {
3353
+ return buf.readUInt16BE(i * indexSize);
3354
+ }
3355
+ }
3356
+
3357
+ var i;
3358
+
3359
+ if (dir) {
3360
+ var foundIndex = -1;
3361
+
3362
+ for (i = byteOffset; i < arrLength; i++) {
3363
+ if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
3364
+ if (foundIndex === -1) foundIndex = i;
3365
+ if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
3366
+ } else {
3367
+ if (foundIndex !== -1) i -= i - foundIndex;
3368
+ foundIndex = -1;
3369
+ }
3370
+ }
3371
+ } else {
3372
+ if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
3373
+
3374
+ for (i = byteOffset; i >= 0; i--) {
3375
+ var found = true;
3376
+
3377
+ for (var j = 0; j < valLength; j++) {
3378
+ if (read(arr, i + j) !== read(val, j)) {
3379
+ found = false;
3380
+ break;
3381
+ }
3382
+ }
3383
+
3384
+ if (found) return i;
3385
+ }
3386
+ }
3387
+
3388
+ return -1;
3389
+ }
3390
+
3391
+ Buffer.prototype.includes = function includes(val, byteOffset, encoding) {
3392
+ return this.indexOf(val, byteOffset, encoding) !== -1;
3393
+ };
3394
+
3395
+ Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
3396
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
3397
+ };
3398
+
3399
+ Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
3400
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
3401
+ };
3402
+
3403
+ function hexWrite(buf, string, offset, length) {
3404
+ offset = Number(offset) || 0;
3405
+ var remaining = buf.length - offset;
3406
+
3407
+ if (!length) {
3408
+ length = remaining;
3409
+ } else {
3410
+ length = Number(length);
3411
+
3412
+ if (length > remaining) {
3413
+ length = remaining;
3414
+ }
3415
+ } // must be an even number of digits
3416
+
3417
+
3418
+ var strLen = string.length;
3419
+ if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');
3420
+
3421
+ if (length > strLen / 2) {
3422
+ length = strLen / 2;
3423
+ }
3424
+
3425
+ for (var i = 0; i < length; ++i) {
3426
+ var parsed = parseInt(string.substr(i * 2, 2), 16);
3427
+ if (isNaN(parsed)) return i;
3428
+ buf[offset + i] = parsed;
3429
+ }
3430
+
3431
+ return i;
3432
+ }
3433
+
3434
+ function utf8Write(buf, string, offset, length) {
3435
+ return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
3436
+ }
3437
+
3438
+ function asciiWrite(buf, string, offset, length) {
3439
+ return blitBuffer(asciiToBytes(string), buf, offset, length);
3440
+ }
3441
+
3442
+ function latin1Write(buf, string, offset, length) {
3443
+ return asciiWrite(buf, string, offset, length);
3444
+ }
3445
+
3446
+ function base64Write(buf, string, offset, length) {
3447
+ return blitBuffer(base64ToBytes(string), buf, offset, length);
3448
+ }
3449
+
3450
+ function ucs2Write(buf, string, offset, length) {
3451
+ return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
3452
+ }
3453
+
3454
+ Buffer.prototype.write = function write(string, offset, length, encoding) {
3455
+ // Buffer#write(string)
3456
+ if (offset === undefined) {
3457
+ encoding = 'utf8';
3458
+ length = this.length;
3459
+ offset = 0; // Buffer#write(string, encoding)
3460
+ } else if (length === undefined && typeof offset === 'string') {
3461
+ encoding = offset;
3462
+ length = this.length;
3463
+ offset = 0; // Buffer#write(string, offset[, length][, encoding])
3464
+ } else if (isFinite(offset)) {
3465
+ offset = offset | 0;
3466
+
3467
+ if (isFinite(length)) {
3468
+ length = length | 0;
3469
+ if (encoding === undefined) encoding = 'utf8';
3470
+ } else {
3471
+ encoding = length;
3472
+ length = undefined;
3473
+ } // legacy write(string, encoding, offset, length) - remove in v0.13
3474
+
3475
+ } else {
3476
+ throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
3477
+ }
3478
+
3479
+ var remaining = this.length - offset;
3480
+ if (length === undefined || length > remaining) length = remaining;
3481
+
3482
+ if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
3483
+ throw new RangeError('Attempt to write outside buffer bounds');
3484
+ }
3485
+
3486
+ if (!encoding) encoding = 'utf8';
3487
+ var loweredCase = false;
3488
+
3489
+ for (;;) {
3490
+ switch (encoding) {
3491
+ case 'hex':
3492
+ return hexWrite(this, string, offset, length);
3493
+
3494
+ case 'utf8':
3495
+ case 'utf-8':
3496
+ return utf8Write(this, string, offset, length);
3497
+
3498
+ case 'ascii':
3499
+ return asciiWrite(this, string, offset, length);
3500
+
3501
+ case 'latin1':
3502
+ case 'binary':
3503
+ return latin1Write(this, string, offset, length);
3504
+
3505
+ case 'base64':
3506
+ // Warning: maxLength not taken into account in base64Write
3507
+ return base64Write(this, string, offset, length);
3508
+
3509
+ case 'ucs2':
3510
+ case 'ucs-2':
3511
+ case 'utf16le':
3512
+ case 'utf-16le':
3513
+ return ucs2Write(this, string, offset, length);
3514
+
3515
+ default:
3516
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
3517
+ encoding = ('' + encoding).toLowerCase();
3518
+ loweredCase = true;
3519
+ }
3520
+ }
3521
+ };
3522
+
3523
+ Buffer.prototype.toJSON = function toJSON() {
3524
+ return {
3525
+ type: 'Buffer',
3526
+ data: Array.prototype.slice.call(this._arr || this, 0)
3527
+ };
3528
+ };
3529
+
3530
+ function base64Slice(buf, start, end) {
3531
+ if (start === 0 && end === buf.length) {
3532
+ return base64.fromByteArray(buf);
3533
+ } else {
3534
+ return base64.fromByteArray(buf.slice(start, end));
3535
+ }
3536
+ }
3537
+
3538
+ function utf8Slice(buf, start, end) {
3539
+ end = Math.min(buf.length, end);
3540
+ var res = [];
3541
+ var i = start;
3542
+
3543
+ while (i < end) {
3544
+ var firstByte = buf[i];
3545
+ var codePoint = null;
3546
+ var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
3547
+
3548
+ if (i + bytesPerSequence <= end) {
3549
+ var secondByte, thirdByte, fourthByte, tempCodePoint;
3550
+
3551
+ switch (bytesPerSequence) {
3552
+ case 1:
3553
+ if (firstByte < 0x80) {
3554
+ codePoint = firstByte;
3555
+ }
3556
+
3557
+ break;
3558
+
3559
+ case 2:
3560
+ secondByte = buf[i + 1];
3561
+
3562
+ if ((secondByte & 0xC0) === 0x80) {
3563
+ tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;
3564
+
3565
+ if (tempCodePoint > 0x7F) {
3566
+ codePoint = tempCodePoint;
3567
+ }
3568
+ }
3569
+
3570
+ break;
3571
+
3572
+ case 3:
3573
+ secondByte = buf[i + 1];
3574
+ thirdByte = buf[i + 2];
3575
+
3576
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
3577
+ tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;
3578
+
3579
+ if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
3580
+ codePoint = tempCodePoint;
3581
+ }
3582
+ }
3583
+
3584
+ break;
3585
+
3586
+ case 4:
3587
+ secondByte = buf[i + 1];
3588
+ thirdByte = buf[i + 2];
3589
+ fourthByte = buf[i + 3];
3590
+
3591
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
3592
+ tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;
3593
+
3594
+ if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
3595
+ codePoint = tempCodePoint;
3596
+ }
3597
+ }
3598
+
3599
+ }
3600
+ }
3601
+
3602
+ if (codePoint === null) {
3603
+ // we did not generate a valid codePoint so insert a
3604
+ // replacement char (U+FFFD) and advance only 1 byte
3605
+ codePoint = 0xFFFD;
3606
+ bytesPerSequence = 1;
3607
+ } else if (codePoint > 0xFFFF) {
3608
+ // encode to utf16 (surrogate pair dance)
3609
+ codePoint -= 0x10000;
3610
+ res.push(codePoint >>> 10 & 0x3FF | 0xD800);
3611
+ codePoint = 0xDC00 | codePoint & 0x3FF;
3612
+ }
3613
+
3614
+ res.push(codePoint);
3615
+ i += bytesPerSequence;
3616
+ }
3617
+
3618
+ return decodeCodePointsArray(res);
3619
+ } // Based on http://stackoverflow.com/a/22747272/680742, the browser with
3620
+ // the lowest limit is Chrome, with 0x10000 args.
3621
+ // We go 1 magnitude less, for safety
3622
+
3623
+
3624
+ var MAX_ARGUMENTS_LENGTH = 0x1000;
3625
+
3626
+ function decodeCodePointsArray(codePoints) {
3627
+ var len = codePoints.length;
3628
+
3629
+ if (len <= MAX_ARGUMENTS_LENGTH) {
3630
+ return String.fromCharCode.apply(String, codePoints); // avoid extra slice()
3631
+ } // Decode in chunks to avoid "call stack size exceeded".
3632
+
3633
+
3634
+ var res = '';
3635
+ var i = 0;
3636
+
3637
+ while (i < len) {
3638
+ res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
3639
+ }
3640
+
3641
+ return res;
3642
+ }
3643
+
3644
+ function asciiSlice(buf, start, end) {
3645
+ var ret = '';
3646
+ end = Math.min(buf.length, end);
3647
+
3648
+ for (var i = start; i < end; ++i) {
3649
+ ret += String.fromCharCode(buf[i] & 0x7F);
3650
+ }
3651
+
3652
+ return ret;
3653
+ }
3654
+
3655
+ function latin1Slice(buf, start, end) {
3656
+ var ret = '';
3657
+ end = Math.min(buf.length, end);
3658
+
3659
+ for (var i = start; i < end; ++i) {
3660
+ ret += String.fromCharCode(buf[i]);
3661
+ }
3662
+
3663
+ return ret;
3664
+ }
3665
+
3666
+ function hexSlice(buf, start, end) {
3667
+ var len = buf.length;
3668
+ if (!start || start < 0) start = 0;
3669
+ if (!end || end < 0 || end > len) end = len;
3670
+ var out = '';
3671
+
3672
+ for (var i = start; i < end; ++i) {
3673
+ out += toHex(buf[i]);
3674
+ }
3675
+
3676
+ return out;
3677
+ }
3678
+
3679
+ function utf16leSlice(buf, start, end) {
3680
+ var bytes = buf.slice(start, end);
3681
+ var res = '';
3682
+
3683
+ for (var i = 0; i < bytes.length; i += 2) {
3684
+ res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
3685
+ }
3686
+
3687
+ return res;
3688
+ }
3689
+
3690
+ Buffer.prototype.slice = function slice(start, end) {
3691
+ var len = this.length;
3692
+ start = ~~start;
3693
+ end = end === undefined ? len : ~~end;
3694
+
3695
+ if (start < 0) {
3696
+ start += len;
3697
+ if (start < 0) start = 0;
3698
+ } else if (start > len) {
3699
+ start = len;
3700
+ }
3701
+
3702
+ if (end < 0) {
3703
+ end += len;
3704
+ if (end < 0) end = 0;
3705
+ } else if (end > len) {
3706
+ end = len;
3707
+ }
3708
+
3709
+ if (end < start) end = start;
3710
+ var newBuf;
3711
+
3712
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
3713
+ newBuf = this.subarray(start, end);
3714
+ newBuf.__proto__ = Buffer.prototype;
3715
+ } else {
3716
+ var sliceLen = end - start;
3717
+ newBuf = new Buffer(sliceLen, undefined);
3718
+
3719
+ for (var i = 0; i < sliceLen; ++i) {
3720
+ newBuf[i] = this[i + start];
3721
+ }
3722
+ }
3723
+
3724
+ return newBuf;
3725
+ };
3726
+ /*
3727
+ * Need to make sure that buffer isn't trying to write out of bounds.
3728
+ */
3729
+
3730
+
3731
+ function checkOffset(offset, ext, length) {
3732
+ if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
3733
+ if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
3734
+ }
3735
+
3736
+ Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {
3737
+ offset = offset | 0;
3738
+ byteLength = byteLength | 0;
3739
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
3740
+ var val = this[offset];
3741
+ var mul = 1;
3742
+ var i = 0;
3743
+
3744
+ while (++i < byteLength && (mul *= 0x100)) {
3745
+ val += this[offset + i] * mul;
3746
+ }
3747
+
3748
+ return val;
3749
+ };
3750
+
3751
+ Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {
3752
+ offset = offset | 0;
3753
+ byteLength = byteLength | 0;
3754
+
3755
+ if (!noAssert) {
3756
+ checkOffset(offset, byteLength, this.length);
3757
+ }
3758
+
3759
+ var val = this[offset + --byteLength];
3760
+ var mul = 1;
3761
+
3762
+ while (byteLength > 0 && (mul *= 0x100)) {
3763
+ val += this[offset + --byteLength] * mul;
3764
+ }
3765
+
3766
+ return val;
3767
+ };
3768
+
3769
+ Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {
3770
+ if (!noAssert) checkOffset(offset, 1, this.length);
3771
+ return this[offset];
3772
+ };
3773
+
3774
+ Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
3775
+ if (!noAssert) checkOffset(offset, 2, this.length);
3776
+ return this[offset] | this[offset + 1] << 8;
3777
+ };
3778
+
3779
+ Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
3780
+ if (!noAssert) checkOffset(offset, 2, this.length);
3781
+ return this[offset] << 8 | this[offset + 1];
3782
+ };
3783
+
3784
+ Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
3785
+ if (!noAssert) checkOffset(offset, 4, this.length);
3786
+ return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;
3787
+ };
3788
+
3789
+ Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
3790
+ if (!noAssert) checkOffset(offset, 4, this.length);
3791
+ return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
3792
+ };
3793
+
3794
+ Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {
3795
+ offset = offset | 0;
3796
+ byteLength = byteLength | 0;
3797
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
3798
+ var val = this[offset];
3799
+ var mul = 1;
3800
+ var i = 0;
3801
+
3802
+ while (++i < byteLength && (mul *= 0x100)) {
3803
+ val += this[offset + i] * mul;
3804
+ }
3805
+
3806
+ mul *= 0x80;
3807
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength);
3808
+ return val;
3809
+ };
3810
+
3811
+ Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {
3812
+ offset = offset | 0;
3813
+ byteLength = byteLength | 0;
3814
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
3815
+ var i = byteLength;
3816
+ var mul = 1;
3817
+ var val = this[offset + --i];
3818
+
3819
+ while (i > 0 && (mul *= 0x100)) {
3820
+ val += this[offset + --i] * mul;
3821
+ }
3822
+
3823
+ mul *= 0x80;
3824
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength);
3825
+ return val;
3826
+ };
3827
+
3828
+ Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {
3829
+ if (!noAssert) checkOffset(offset, 1, this.length);
3830
+ if (!(this[offset] & 0x80)) return this[offset];
3831
+ return (0xff - this[offset] + 1) * -1;
3832
+ };
3833
+
3834
+ Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
3835
+ if (!noAssert) checkOffset(offset, 2, this.length);
3836
+ var val = this[offset] | this[offset + 1] << 8;
3837
+ return val & 0x8000 ? val | 0xFFFF0000 : val;
3838
+ };
3839
+
3840
+ Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
3841
+ if (!noAssert) checkOffset(offset, 2, this.length);
3842
+ var val = this[offset + 1] | this[offset] << 8;
3843
+ return val & 0x8000 ? val | 0xFFFF0000 : val;
3844
+ };
3845
+
3846
+ Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
3847
+ if (!noAssert) checkOffset(offset, 4, this.length);
3848
+ return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
3849
+ };
3850
+
3851
+ Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
3852
+ if (!noAssert) checkOffset(offset, 4, this.length);
3853
+ return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
3854
+ };
3855
+
3856
+ Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
3857
+ if (!noAssert) checkOffset(offset, 4, this.length);
3858
+ return ieee754.read(this, offset, true, 23, 4);
3859
+ };
3860
+
3861
+ Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
3862
+ if (!noAssert) checkOffset(offset, 4, this.length);
3863
+ return ieee754.read(this, offset, false, 23, 4);
3864
+ };
3865
+
3866
+ Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
3867
+ if (!noAssert) checkOffset(offset, 8, this.length);
3868
+ return ieee754.read(this, offset, true, 52, 8);
3869
+ };
3870
+
3871
+ Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
3872
+ if (!noAssert) checkOffset(offset, 8, this.length);
3873
+ return ieee754.read(this, offset, false, 52, 8);
3874
+ };
3875
+
3876
+ function checkInt(buf, value, offset, ext, max, min) {
3877
+ if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
3878
+ if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
3879
+ if (offset + ext > buf.length) throw new RangeError('Index out of range');
3880
+ }
3881
+
3882
+ Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {
3883
+ value = +value;
3884
+ offset = offset | 0;
3885
+ byteLength = byteLength | 0;
3886
+
3887
+ if (!noAssert) {
3888
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1;
3889
+ checkInt(this, value, offset, byteLength, maxBytes, 0);
3890
+ }
3891
+
3892
+ var mul = 1;
3893
+ var i = 0;
3894
+ this[offset] = value & 0xFF;
3895
+
3896
+ while (++i < byteLength && (mul *= 0x100)) {
3897
+ this[offset + i] = value / mul & 0xFF;
3898
+ }
3899
+
3900
+ return offset + byteLength;
3901
+ };
3902
+
3903
+ Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {
3904
+ value = +value;
3905
+ offset = offset | 0;
3906
+ byteLength = byteLength | 0;
3907
+
3908
+ if (!noAssert) {
3909
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1;
3910
+ checkInt(this, value, offset, byteLength, maxBytes, 0);
3911
+ }
3912
+
3913
+ var i = byteLength - 1;
3914
+ var mul = 1;
3915
+ this[offset + i] = value & 0xFF;
3916
+
3917
+ while (--i >= 0 && (mul *= 0x100)) {
3918
+ this[offset + i] = value / mul & 0xFF;
3919
+ }
3920
+
3921
+ return offset + byteLength;
3922
+ };
3923
+
3924
+ Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
3925
+ value = +value;
3926
+ offset = offset | 0;
3927
+ if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
3928
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
3929
+ this[offset] = value & 0xff;
3930
+ return offset + 1;
3931
+ };
3932
+
3933
+ function objectWriteUInt16(buf, value, offset, littleEndian) {
3934
+ if (value < 0) value = 0xffff + value + 1;
3935
+
3936
+ for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
3937
+ buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;
3938
+ }
3939
+ }
3940
+
3941
+ Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
3942
+ value = +value;
3943
+ offset = offset | 0;
3944
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
3945
+
3946
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
3947
+ this[offset] = value & 0xff;
3948
+ this[offset + 1] = value >>> 8;
3949
+ } else {
3950
+ objectWriteUInt16(this, value, offset, true);
3951
+ }
3952
+
3953
+ return offset + 2;
3954
+ };
3955
+
3956
+ Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
3957
+ value = +value;
3958
+ offset = offset | 0;
3959
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
3960
+
3961
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
3962
+ this[offset] = value >>> 8;
3963
+ this[offset + 1] = value & 0xff;
3964
+ } else {
3965
+ objectWriteUInt16(this, value, offset, false);
3966
+ }
3967
+
3968
+ return offset + 2;
3969
+ };
3970
+
3971
+ function objectWriteUInt32(buf, value, offset, littleEndian) {
3972
+ if (value < 0) value = 0xffffffff + value + 1;
3973
+
3974
+ for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
3975
+ buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;
3976
+ }
3977
+ }
3978
+
3979
+ Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
3980
+ value = +value;
3981
+ offset = offset | 0;
3982
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
3983
+
3984
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
3985
+ this[offset + 3] = value >>> 24;
3986
+ this[offset + 2] = value >>> 16;
3987
+ this[offset + 1] = value >>> 8;
3988
+ this[offset] = value & 0xff;
3989
+ } else {
3990
+ objectWriteUInt32(this, value, offset, true);
3991
+ }
3992
+
3993
+ return offset + 4;
3994
+ };
3995
+
3996
+ Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
3997
+ value = +value;
3998
+ offset = offset | 0;
3999
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
4000
+
4001
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
4002
+ this[offset] = value >>> 24;
4003
+ this[offset + 1] = value >>> 16;
4004
+ this[offset + 2] = value >>> 8;
4005
+ this[offset + 3] = value & 0xff;
4006
+ } else {
4007
+ objectWriteUInt32(this, value, offset, false);
4008
+ }
4009
+
4010
+ return offset + 4;
4011
+ };
4012
+
4013
+ Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {
4014
+ value = +value;
4015
+ offset = offset | 0;
4016
+
4017
+ if (!noAssert) {
4018
+ var limit = Math.pow(2, 8 * byteLength - 1);
4019
+ checkInt(this, value, offset, byteLength, limit - 1, -limit);
4020
+ }
4021
+
4022
+ var i = 0;
4023
+ var mul = 1;
4024
+ var sub = 0;
4025
+ this[offset] = value & 0xFF;
4026
+
4027
+ while (++i < byteLength && (mul *= 0x100)) {
4028
+ if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
4029
+ sub = 1;
4030
+ }
4031
+
4032
+ this[offset + i] = (value / mul >> 0) - sub & 0xFF;
4033
+ }
4034
+
4035
+ return offset + byteLength;
4036
+ };
4037
+
4038
+ Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {
4039
+ value = +value;
4040
+ offset = offset | 0;
4041
+
4042
+ if (!noAssert) {
4043
+ var limit = Math.pow(2, 8 * byteLength - 1);
4044
+ checkInt(this, value, offset, byteLength, limit - 1, -limit);
4045
+ }
4046
+
4047
+ var i = byteLength - 1;
4048
+ var mul = 1;
4049
+ var sub = 0;
4050
+ this[offset + i] = value & 0xFF;
4051
+
4052
+ while (--i >= 0 && (mul *= 0x100)) {
4053
+ if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
4054
+ sub = 1;
4055
+ }
4056
+
4057
+ this[offset + i] = (value / mul >> 0) - sub & 0xFF;
4058
+ }
4059
+
4060
+ return offset + byteLength;
4061
+ };
4062
+
4063
+ Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
4064
+ value = +value;
4065
+ offset = offset | 0;
4066
+ if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
4067
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
4068
+ if (value < 0) value = 0xff + value + 1;
4069
+ this[offset] = value & 0xff;
4070
+ return offset + 1;
4071
+ };
4072
+
4073
+ Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
4074
+ value = +value;
4075
+ offset = offset | 0;
4076
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
4077
+
4078
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
4079
+ this[offset] = value & 0xff;
4080
+ this[offset + 1] = value >>> 8;
4081
+ } else {
4082
+ objectWriteUInt16(this, value, offset, true);
4083
+ }
4084
+
4085
+ return offset + 2;
4086
+ };
4087
+
4088
+ Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
4089
+ value = +value;
4090
+ offset = offset | 0;
4091
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
4092
+
4093
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
4094
+ this[offset] = value >>> 8;
4095
+ this[offset + 1] = value & 0xff;
4096
+ } else {
4097
+ objectWriteUInt16(this, value, offset, false);
4098
+ }
4099
+
4100
+ return offset + 2;
4101
+ };
4102
+
4103
+ Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
4104
+ value = +value;
4105
+ offset = offset | 0;
4106
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
4107
+
4108
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
4109
+ this[offset] = value & 0xff;
4110
+ this[offset + 1] = value >>> 8;
4111
+ this[offset + 2] = value >>> 16;
4112
+ this[offset + 3] = value >>> 24;
4113
+ } else {
4114
+ objectWriteUInt32(this, value, offset, true);
4115
+ }
4116
+
4117
+ return offset + 4;
4118
+ };
4119
+
4120
+ Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
4121
+ value = +value;
4122
+ offset = offset | 0;
4123
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
4124
+ if (value < 0) value = 0xffffffff + value + 1;
4125
+
4126
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
4127
+ this[offset] = value >>> 24;
4128
+ this[offset + 1] = value >>> 16;
4129
+ this[offset + 2] = value >>> 8;
4130
+ this[offset + 3] = value & 0xff;
4131
+ } else {
4132
+ objectWriteUInt32(this, value, offset, false);
4133
+ }
4134
+
4135
+ return offset + 4;
4136
+ };
4137
+
4138
+ function checkIEEE754(buf, value, offset, ext, max, min) {
4139
+ if (offset + ext > buf.length) throw new RangeError('Index out of range');
4140
+ if (offset < 0) throw new RangeError('Index out of range');
4141
+ }
4142
+
4143
+ function writeFloat(buf, value, offset, littleEndian, noAssert) {
4144
+ if (!noAssert) {
4145
+ checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);
4146
+ }
4147
+
4148
+ ieee754.write(buf, value, offset, littleEndian, 23, 4);
4149
+ return offset + 4;
4150
+ }
4151
+
4152
+ Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
4153
+ return writeFloat(this, value, offset, true, noAssert);
4154
+ };
4155
+
4156
+ Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
4157
+ return writeFloat(this, value, offset, false, noAssert);
4158
+ };
4159
+
4160
+ function writeDouble(buf, value, offset, littleEndian, noAssert) {
4161
+ if (!noAssert) {
4162
+ checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);
4163
+ }
4164
+
4165
+ ieee754.write(buf, value, offset, littleEndian, 52, 8);
4166
+ return offset + 8;
4167
+ }
4168
+
4169
+ Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
4170
+ return writeDouble(this, value, offset, true, noAssert);
4171
+ };
4172
+
4173
+ Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
4174
+ return writeDouble(this, value, offset, false, noAssert);
4175
+ }; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
4176
+
4177
+
4178
+ Buffer.prototype.copy = function copy(target, targetStart, start, end) {
4179
+ if (!start) start = 0;
4180
+ if (!end && end !== 0) end = this.length;
4181
+ if (targetStart >= target.length) targetStart = target.length;
4182
+ if (!targetStart) targetStart = 0;
4183
+ if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done
4184
+
4185
+ if (end === start) return 0;
4186
+ if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions
4187
+
4188
+ if (targetStart < 0) {
4189
+ throw new RangeError('targetStart out of bounds');
4190
+ }
4191
+
4192
+ if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');
4193
+ if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob?
4194
+
4195
+ if (end > this.length) end = this.length;
4196
+
4197
+ if (target.length - targetStart < end - start) {
4198
+ end = target.length - targetStart + start;
4199
+ }
4200
+
4201
+ var len = end - start;
4202
+ var i;
4203
+
4204
+ if (this === target && start < targetStart && targetStart < end) {
4205
+ // descending copy from end
4206
+ for (i = len - 1; i >= 0; --i) {
4207
+ target[i + targetStart] = this[i + start];
4208
+ }
4209
+ } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
4210
+ // ascending copy from start
4211
+ for (i = 0; i < len; ++i) {
4212
+ target[i + targetStart] = this[i + start];
4213
+ }
4214
+ } else {
4215
+ Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);
4216
+ }
4217
+
4218
+ return len;
4219
+ }; // Usage:
4220
+ // buffer.fill(number[, offset[, end]])
4221
+ // buffer.fill(buffer[, offset[, end]])
4222
+ // buffer.fill(string[, offset[, end]][, encoding])
4223
+
4224
+
4225
+ Buffer.prototype.fill = function fill(val, start, end, encoding) {
4226
+ // Handle string cases:
4227
+ if (typeof val === 'string') {
4228
+ if (typeof start === 'string') {
4229
+ encoding = start;
4230
+ start = 0;
4231
+ end = this.length;
4232
+ } else if (typeof end === 'string') {
4233
+ encoding = end;
4234
+ end = this.length;
4235
+ }
4236
+
4237
+ if (val.length === 1) {
4238
+ var code = val.charCodeAt(0);
4239
+
4240
+ if (code < 256) {
4241
+ val = code;
4242
+ }
4243
+ }
4244
+
4245
+ if (encoding !== undefined && typeof encoding !== 'string') {
4246
+ throw new TypeError('encoding must be a string');
4247
+ }
4248
+
4249
+ if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
4250
+ throw new TypeError('Unknown encoding: ' + encoding);
4251
+ }
4252
+ } else if (typeof val === 'number') {
4253
+ val = val & 255;
4254
+ } // Invalid ranges are not set to a default, so can range check early.
4255
+
4256
+
4257
+ if (start < 0 || this.length < start || this.length < end) {
4258
+ throw new RangeError('Out of range index');
4259
+ }
4260
+
4261
+ if (end <= start) {
4262
+ return this;
4263
+ }
4264
+
4265
+ start = start >>> 0;
4266
+ end = end === undefined ? this.length : end >>> 0;
4267
+ if (!val) val = 0;
4268
+ var i;
4269
+
4270
+ if (typeof val === 'number') {
4271
+ for (i = start; i < end; ++i) {
4272
+ this[i] = val;
4273
+ }
4274
+ } else {
4275
+ var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString());
4276
+ var len = bytes.length;
4277
+
4278
+ for (i = 0; i < end - start; ++i) {
4279
+ this[i + start] = bytes[i % len];
4280
+ }
4281
+ }
4282
+
4283
+ return this;
4284
+ }; // HELPER FUNCTIONS
4285
+ // ================
4286
+
4287
+
4288
+ var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g;
4289
+
4290
+ function base64clean(str) {
4291
+ // Node strips out invalid characters like \n and \t from the string, base64-js does not
4292
+ str = stringtrim(str).replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to ''
4293
+
4294
+ if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
4295
+
4296
+ while (str.length % 4 !== 0) {
4297
+ str = str + '=';
4298
+ }
4299
+
4300
+ return str;
4301
+ }
4302
+
4303
+ function stringtrim(str) {
4304
+ if (str.trim) return str.trim();
4305
+ return str.replace(/^\s+|\s+$/g, '');
4306
+ }
4307
+
4308
+ function toHex(n) {
4309
+ if (n < 16) return '0' + n.toString(16);
4310
+ return n.toString(16);
4311
+ }
4312
+
4313
+ function utf8ToBytes(string, units) {
4314
+ units = units || Infinity;
4315
+ var codePoint;
4316
+ var length = string.length;
4317
+ var leadSurrogate = null;
4318
+ var bytes = [];
4319
+
4320
+ for (var i = 0; i < length; ++i) {
4321
+ codePoint = string.charCodeAt(i); // is surrogate component
4322
+
4323
+ if (codePoint > 0xD7FF && codePoint < 0xE000) {
4324
+ // last char was a lead
4325
+ if (!leadSurrogate) {
4326
+ // no lead yet
4327
+ if (codePoint > 0xDBFF) {
4328
+ // unexpected trail
4329
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
4330
+ continue;
4331
+ } else if (i + 1 === length) {
4332
+ // unpaired lead
4333
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
4334
+ continue;
4335
+ } // valid lead
4336
+
4337
+
4338
+ leadSurrogate = codePoint;
4339
+ continue;
4340
+ } // 2 leads in a row
4341
+
4342
+
4343
+ if (codePoint < 0xDC00) {
4344
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
4345
+ leadSurrogate = codePoint;
4346
+ continue;
4347
+ } // valid surrogate pair
4348
+
4349
+
4350
+ codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
4351
+ } else if (leadSurrogate) {
4352
+ // valid bmp char, but last char was a lead
4353
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
4354
+ }
4355
+
4356
+ leadSurrogate = null; // encode utf8
4357
+
4358
+ if (codePoint < 0x80) {
4359
+ if ((units -= 1) < 0) break;
4360
+ bytes.push(codePoint);
4361
+ } else if (codePoint < 0x800) {
4362
+ if ((units -= 2) < 0) break;
4363
+ bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);
4364
+ } else if (codePoint < 0x10000) {
4365
+ if ((units -= 3) < 0) break;
4366
+ bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
4367
+ } else if (codePoint < 0x110000) {
4368
+ if ((units -= 4) < 0) break;
4369
+ bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
4370
+ } else {
4371
+ throw new Error('Invalid code point');
4372
+ }
4373
+ }
4374
+
4375
+ return bytes;
4376
+ }
4377
+
4378
+ function asciiToBytes(str) {
4379
+ var byteArray = [];
4380
+
4381
+ for (var i = 0; i < str.length; ++i) {
4382
+ // Node's code seems to be doing this and not & 0x7F..
4383
+ byteArray.push(str.charCodeAt(i) & 0xFF);
4384
+ }
4385
+
4386
+ return byteArray;
4387
+ }
4388
+
4389
+ function utf16leToBytes(str, units) {
4390
+ var c, hi, lo;
4391
+ var byteArray = [];
4392
+
4393
+ for (var i = 0; i < str.length; ++i) {
4394
+ if ((units -= 2) < 0) break;
4395
+ c = str.charCodeAt(i);
4396
+ hi = c >> 8;
4397
+ lo = c % 256;
4398
+ byteArray.push(lo);
4399
+ byteArray.push(hi);
4400
+ }
4401
+
4402
+ return byteArray;
4403
+ }
4404
+
4405
+ function base64ToBytes(str) {
4406
+ return base64.toByteArray(base64clean(str));
4407
+ }
4408
+
4409
+ function blitBuffer(src, dst, offset, length) {
4410
+ for (var i = 0; i < length; ++i) {
4411
+ if (i + offset >= dst.length || i >= src.length) break;
4412
+ dst[i + offset] = src[i];
4413
+ }
4414
+
4415
+ return i;
4416
+ }
4417
+
4418
+ function isnan(val) {
4419
+ return val !== val; // eslint-disable-line no-self-compare
4420
+ }
4421
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(18)))
4422
+
4423
+ /***/ }),
4424
+
4425
+ /***/ 504:
4426
+ /***/ (function(module, exports) {
4427
+
4428
+ module.exports = require("base64-js");
4429
+
4430
+ /***/ }),
4431
+
4432
+ /***/ 505:
4433
+ /***/ (function(module, exports) {
4434
+
4435
+ module.exports = require("ieee754");
4436
+
4437
+ /***/ }),
4438
+
4439
+ /***/ 506:
4440
+ /***/ (function(module, exports) {
4441
+
4442
+ module.exports = require("isarray");
4443
+
4444
+ /***/ }),
4445
+
4446
+ /***/ 507:
4447
+ /***/ (function(module, exports) {
4448
+
4449
+ module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_mixin/map-events.js");
4450
+
4451
+ /***/ }),
4452
+
4453
+ /***/ 508:
4454
+ /***/ (function(module, exports) {
4455
+
4456
+ module.exports = require("@supermapgis/vue-iclient-leaflet/lib/spin");
4457
+
4458
+ /***/ }),
4459
+
4460
+ /***/ 57:
4461
+ /***/ (function(module, exports) {
4462
+
4463
+ module.exports = require("proj4");
2231
4464
 
2232
4465
  /***/ }),
2233
4466