gis-common 4.1.3 → 4.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- var x = Object.defineProperty;
2
- var D = (t, e, n) => e in t ? x(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var f = (t, e, n) => D(t, typeof e != "symbol" ? e + "" : e, n);
4
- const y = {
1
+ var D = Object.defineProperty;
2
+ var A = (t, e, n) => e in t ? D(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var f = (t, e, n) => A(t, typeof e != "symbol" ? e + "" : e, n);
4
+ const E = {
5
5
  MAP_RENDER: "mapRender",
6
6
  MAP_READY: "mapReady",
7
7
  MOUSE_CLICK: "click",
@@ -23,7 +23,7 @@ const y = {
23
23
  WEB_SOCKET_ERROR: "webSocketError",
24
24
  WEB_SOCKET_MESSAGE: "webSocketMessage",
25
25
  WEB_SOCKET_CLOSE: "webSocketClose"
26
- }, S = {
26
+ }, b = {
27
27
  LOGIN_EXPIRED: "登录信息过期,请重新登录",
28
28
  CROSS_ERROR: "跨域访问",
29
29
  UNEXIST_RESOURCE: "资源不存在",
@@ -44,7 +44,7 @@ const y = {
44
44
  PARAMETER_ERROR_OBJECT: "格式类型验证失败:必须是对象",
45
45
  PARAMETER_ERROR_LACK: "参数缺失",
46
46
  STRING_CHECK_LOSS: "字符缺少关键字"
47
- }, b = {
47
+ }, v = {
48
48
  SUPER_MAP_IMAGES: "SuperMapImages",
49
49
  // 超图影像服务 栅格数据
50
50
  SUPER_MAP_DATA: "SuperMapData",
@@ -58,7 +58,7 @@ const y = {
58
58
  // addS3MGroupLayer(url, options, index) 添加S3M分组图层。
59
59
  TERRAIN_LAYER: "TerrainFileLayer"
60
60
  // 地形图层, 需要单独处理
61
- }, I = {
61
+ }, _ = {
62
62
  POINT: "point",
63
63
  POLYLINE: "polyline",
64
64
  POLYGON: "polygon",
@@ -68,16 +68,16 @@ const y = {
68
68
  LABEL: "label",
69
69
  MODEL: "model",
70
70
  WALL: "wall"
71
- }, T = {
71
+ }, P = {
72
72
  DISTANCE: "distance",
73
73
  AREA: "area",
74
74
  HEIGHT: "height"
75
- }, _ = {
75
+ }, L = {
76
76
  ADD: "add",
77
77
  REMOVE: "remove",
78
78
  INIT: "init"
79
79
  };
80
- class v {
80
+ class N {
81
81
  constructor(e) {
82
82
  /**
83
83
  * Creates an instance of AudioPlayer.
@@ -102,7 +102,7 @@ class v {
102
102
  this.audio.muted = e;
103
103
  }
104
104
  }
105
- const g = {
105
+ const m = {
106
106
  DEG2RAD: Math.PI / 180,
107
107
  RAD2DEG: 180 / Math.PI,
108
108
  randInt(t, e) {
@@ -149,9 +149,31 @@ const g = {
149
149
  },
150
150
  formatFloat(t, e = 2) {
151
151
  return Math.round(t * Math.pow(10, e)) / Math.pow(10, e);
152
+ },
153
+ /**
154
+ * 根据给定值返回指定的最小值和最大值之间的最小值
155
+ *
156
+ * @param val 给定的数值
157
+ * @param min 最小值
158
+ * @param max 最大值
159
+ * @returns 返回限制后的数值
160
+ */
161
+ minMax(t, e, n) {
162
+ return Math.min(Math.max(t, e), n);
163
+ },
164
+ /**
165
+ * 根据给定值返回指定的最小值和最大值之间的最大值
166
+ *
167
+ * @param val 给定的数值
168
+ * @param min 最小值
169
+ * @param max 最大值
170
+ * @returns 返回限制后的数值
171
+ */
172
+ maxMin(t, e, n) {
173
+ return Math.max(Math.min(t, n), e);
152
174
  }
153
175
  };
154
- class P {
176
+ class k {
155
177
  constructor(e) {
156
178
  f(this, "context", null);
157
179
  if (typeof e == "string" && (e = document.querySelector("#" + e), !e))
@@ -173,12 +195,12 @@ class P {
173
195
  * @param options 绘制选项,包括线条宽度和颜色
174
196
  * @throws 当画布上下文不存在时抛出错误
175
197
  */
176
- drawLine({ x: e, y: n }, { x: s, y: r }, i = {}) {
198
+ drawLine({ x: e, y: n }, { x: r, y: s }, i = {}) {
177
199
  if (!this.context)
178
200
  throw new Error("Canvas context is null or undefined");
179
201
  this.context.beginPath();
180
- const a = i.width ?? 1, o = i.color ?? "#000";
181
- this.context.lineWidth = a, this.context.strokeStyle = o, this.context.moveTo(e, n), this.context.lineTo(s, r), this.context.stroke();
202
+ const o = i.width || 1, a = i.color || "#000";
203
+ this.context.lineWidth = o, this.context.strokeStyle = a, this.context.moveTo(e, n), this.context.lineTo(r, s), this.context.stroke();
182
204
  }
183
205
  /**
184
206
  * 绘制圆弧
@@ -193,52 +215,57 @@ class P {
193
215
  * @param bgColor 背景颜色
194
216
  * @throws 当Canvas context为null或undefined时抛出错误
195
217
  */
196
- drawArc({ x: e, y: n }, s, r, i, a, o, c) {
218
+ drawArc({ x: e, y: n }, r, s, i, o, a, c) {
197
219
  if (!this.context)
198
220
  throw new Error("Canvas context is null or undefined");
199
- o ? (this.context.fillStyle = c, this.context.beginPath(), this.context.arc(e, n, s, g.degreesToRadians(r), g.degreesToRadians(i), a), this.context.fill()) : (this.context.strokeStyle = c, this.context.beginPath(), this.context.arc(e, n, s, g.degreesToRadians(r), g.degreesToRadians(i), a), this.context.stroke());
221
+ a ? (this.context.fillStyle = c, this.context.beginPath(), this.context.arc(e, n, r, m.degreesToRadians(s), m.degreesToRadians(i), o), this.context.fill()) : (this.context.strokeStyle = c, this.context.beginPath(), this.context.arc(e, n, r, m.degreesToRadians(s), m.degreesToRadians(i), o), this.context.stroke());
222
+ }
223
+ static createCanvas(e = 1, n = 1) {
224
+ let r;
225
+ if (typeof document < "u")
226
+ return r = document.createElement("canvas"), e && (r.width = e), n && (r.height = n), r;
200
227
  }
201
228
  }
202
- class A {
229
+ class C {
203
230
  constructor() {
204
231
  f(this, "_listeners");
205
232
  f(this, "_mutex", {});
206
233
  f(this, "_context");
207
234
  }
208
- addEventListener(e, n, s, r = !1) {
209
- this._listeners === void 0 && (this._listeners = {}), this._context = s;
210
- const i = this._mutex, a = this._listeners;
211
- return a[e] === void 0 && (a[e] = []), a[e].indexOf(n) === -1 && (r && (i[e] = n), a[e].push(n)), this;
235
+ addEventListener(e, n, r, s = !1) {
236
+ this._listeners === void 0 && (this._listeners = {}), this._context = r;
237
+ const i = this._mutex, o = this._listeners;
238
+ return o[e] === void 0 && (o[e] = []), o[e].indexOf(n) === -1 && (s && (i[e] = n), o[e].push(n)), this;
212
239
  }
213
240
  hasEventListener(e, n) {
214
241
  if (this._listeners === null || this._listeners === void 0) return !1;
215
- const s = this._listeners;
216
- return s[e] !== void 0 && s[e].indexOf(n) !== -1;
242
+ const r = this._listeners;
243
+ return r[e] !== void 0 && r[e].indexOf(n) !== -1;
217
244
  }
218
245
  removeEventListener(e, n) {
219
246
  if (this._listeners === void 0) return;
220
- const r = this._listeners[e];
221
- if (this._mutex[e] === n && (this._mutex[e] = null), r !== void 0) {
222
- const i = r.map((a) => a.toString()).indexOf(n.toString());
223
- i !== -1 && r.splice(i, 1);
247
+ const s = this._listeners[e];
248
+ if (this._mutex[e] === n && (this._mutex[e] = null), s !== void 0) {
249
+ const i = s.map((o) => o.toString()).indexOf(n.toString());
250
+ i !== -1 && s.splice(i, 1);
224
251
  }
225
252
  }
226
253
  dispatchEvent(e) {
227
254
  if (this._listeners === void 0) return;
228
- const s = this._listeners[e.type];
229
- if (s !== void 0) {
255
+ const r = this._listeners[e.type];
256
+ if (r !== void 0) {
230
257
  e.target = this;
231
- const r = s.slice(0);
258
+ const s = r.slice(0);
232
259
  if (this._mutex[e.type] !== void 0) {
233
- const i = r.find((a) => a === this._mutex[e.type]);
260
+ const i = s.find((o) => o === this._mutex[e.type]);
234
261
  if (i) {
235
262
  i.call(this._context || this, e);
236
263
  return;
237
264
  }
238
265
  }
239
- for (let i = 0, a = r.length; i < a; i++) {
240
- const o = r[i];
241
- typeof o == "function" && o.call(this._context || this, e);
266
+ for (let i = 0, o = s.length; i < o; i++) {
267
+ const a = s[i];
268
+ typeof a == "function" && a.call(this._context || this, e);
242
269
  }
243
270
  }
244
271
  }
@@ -248,7 +275,7 @@ class A {
248
275
  this._listeners[e] = [];
249
276
  }
250
277
  }
251
- class E extends Map {
278
+ class x extends Map {
252
279
  isEmpty() {
253
280
  return this.size === 0;
254
281
  }
@@ -264,13 +291,13 @@ class E extends Map {
264
291
  fromEntries() {
265
292
  }
266
293
  }
267
- E.prototype.fromEntries = function(t = []) {
268
- const e = new E();
294
+ x.prototype.fromEntries = function(t = []) {
295
+ const e = new x();
269
296
  return t.forEach((n) => {
270
297
  Array.isArray(n) && n.length === 2 && e.set(n[0], n[1]);
271
298
  }), e;
272
299
  };
273
- class L extends A {
300
+ class U extends C {
274
301
  constructor(n = "ws://127.0.0.1:10088") {
275
302
  super();
276
303
  f(this, "maxCheckTimes", 10);
@@ -285,25 +312,25 @@ class L extends A {
285
312
  try {
286
313
  if (console.info("创建ws连接>>>" + this.url), this.client = new WebSocket(this.url), this.client) {
287
314
  const n = this;
288
- this.client.onopen = function(s) {
315
+ this.client.onopen = function(r) {
289
316
  n.dispatchEvent({
290
- type: y.WEB_SOCKET_CONNECT,
291
- message: s
317
+ type: E.WEB_SOCKET_CONNECT,
318
+ message: r
292
319
  });
293
- }, this.client.onmessage = function(s) {
320
+ }, this.client.onmessage = function(r) {
294
321
  n.connectStatus = !0, n.dispatchEvent({
295
- type: y.WEB_SOCKET_MESSAGE,
296
- message: s
322
+ type: E.WEB_SOCKET_MESSAGE,
323
+ message: r
297
324
  });
298
- }, this.client.onclose = function(s) {
325
+ }, this.client.onclose = function(r) {
299
326
  n.dispatchEvent({
300
- type: y.WEB_SOCKET_CLOSE,
301
- message: s
327
+ type: E.WEB_SOCKET_CLOSE,
328
+ message: r
302
329
  });
303
- }, this.checkTimes === this.maxCheckTimes && (this.client.onerror = function(s) {
330
+ }, this.checkTimes === this.maxCheckTimes && (this.client.onerror = function(r) {
304
331
  n.dispatchEvent({
305
- type: y.WEB_SOCKET_ERROR,
306
- message: s
332
+ type: E.WEB_SOCKET_ERROR,
333
+ message: r
307
334
  });
308
335
  });
309
336
  }
@@ -333,7 +360,7 @@ class L extends A {
333
360
  }, 1e3);
334
361
  }
335
362
  }
336
- const M = {
363
+ const R = {
337
364
  /**
338
365
  * 获取数据类型
339
366
  *
@@ -389,9 +416,9 @@ const M = {
389
416
  let e = "";
390
417
  if (t.length > 1) {
391
418
  const n = t.slice(1, t.length % 2 === 0 ? t.length - 1 : t.length);
392
- for (let s = 0; s < n.length; s = s + 2) {
393
- const r = n[s];
394
- t[0] === r && (e = n[s + 1]);
419
+ for (let r = 0; r < n.length; r = r + 2) {
420
+ const s = n[r];
421
+ t[0] === s && (e = n[r + 1]);
395
422
  }
396
423
  !e && t.length % 2 === 0 && (e = t[t.length - 1]);
397
424
  } else
@@ -406,9 +433,9 @@ const M = {
406
433
  * @returns 返回目标对象,包含所有复制的属性。
407
434
  */
408
435
  extend(t, ...e) {
409
- let n, s, r, i;
410
- for (s = 0, r = e.length; s < r; s++) {
411
- i = e[s];
436
+ let n, r, s, i;
437
+ for (r = 0, s = e.length; r < s; r++) {
438
+ i = e[r];
412
439
  for (n in i)
413
440
  t[n] = i[n];
414
441
  }
@@ -423,15 +450,15 @@ const M = {
423
450
  * @param childrenPropertyName 树形结构中标识子节点的字段名,默认为'children'
424
451
  * @returns 转换后的树形结构数组
425
452
  */
426
- convertToTree2(t, e = "id", n = "parentId", s = "children") {
427
- const r = [];
428
- function i(a) {
429
- const o = t.filter((c) => c[n] === a[e]).map((c) => (r.some((l) => l[e] === c[e]) || i(c), c));
430
- o.length > 0 && (a[s] = o);
453
+ convertToTree2(t, e = "id", n = "parentId", r = "children") {
454
+ const s = [];
455
+ function i(o) {
456
+ const a = t.filter((c) => c[n] === o[e]).map((c) => (s.some((h) => h[e] === c[e]) || i(c), c));
457
+ a.length > 0 && (o[r] = a);
431
458
  }
432
- return t.forEach((a) => {
433
- t.some((o) => o[n] === a[e]) || (i(a), r.push(a));
434
- }), r;
459
+ return t.forEach((o) => {
460
+ t.some((a) => a[n] === o[e]) || (i(o), s.push(o));
461
+ }), s;
435
462
  },
436
463
  /**
437
464
  * 异步加载script
@@ -441,16 +468,16 @@ const M = {
441
468
  asyncLoadScript(t) {
442
469
  return new Promise((e, n) => {
443
470
  try {
444
- const s = document.createElement("script");
445
- s.type = "text/javascript", s.src = t, "readyState" in s ? s.onreadystatechange = function() {
446
- (s.readyState === "complete" || s.readyState === "loaded") && e(s);
447
- } : (s.onload = function() {
448
- e(s);
449
- }, s.onerror = function() {
471
+ const r = document.createElement("script");
472
+ r.type = "text/javascript", r.src = t, "readyState" in r ? r.onreadystatechange = function() {
473
+ (r.readyState === "complete" || r.readyState === "loaded") && e(r);
474
+ } : (r.onload = function() {
475
+ e(r);
476
+ }, r.onerror = function() {
450
477
  n(new Error("Script failed to load for URL: " + t));
451
- }), document.body.appendChild(s);
452
- } catch (s) {
453
- n(s);
478
+ }), document.body.appendChild(r);
479
+ } catch (r) {
480
+ n(r);
454
481
  }
455
482
  });
456
483
  },
@@ -478,10 +505,10 @@ const M = {
478
505
  */
479
506
  template(t, e) {
480
507
  const n = /\{ *([\w_-]+) *\}/g;
481
- return t.replace(n, (s, r) => {
482
- const i = e[r];
508
+ return t.replace(n, (r, s) => {
509
+ const i = e[s];
483
510
  if (i === void 0)
484
- throw new Error(`${S.JSON_VALUE_ERROR}: ${s}`);
511
+ throw new Error(`${b.JSON_VALUE_ERROR}: ${r}`);
485
512
  return typeof i == "function" ? i(e) : i;
486
513
  });
487
514
  },
@@ -500,8 +527,8 @@ const M = {
500
527
  (typeof t != "object" || t === null) && (t = {});
501
528
  for (const n of e)
502
529
  if (typeof n == "object" && n !== null)
503
- for (const s in n)
504
- Object.prototype.hasOwnProperty.call(n, s) && (typeof n[s] == "object" && n[s] !== null ? (t[s] || (t[s] = Array.isArray(n[s]) ? [] : {}), this.deepAssign(t[s], n[s])) : t[s] = n[s]);
530
+ for (const r in n)
531
+ Object.prototype.hasOwnProperty.call(n, r) && (typeof n[r] == "object" && n[r] !== null ? (t[r] || (t[r] = Array.isArray(n[r]) ? [] : {}), this.deepAssign(t[r], n[r])) : t[r] = n[r]);
505
532
  return t;
506
533
  },
507
534
  /**
@@ -515,11 +542,11 @@ const M = {
515
542
  return navigator.clipboard.writeText(t);
516
543
  {
517
544
  const e = document.createElement("textarea");
518
- return e.style.position = "fixed", e.style.top = e.style.left = "-100vh", e.style.opacity = "0", e.value = t, document.body.appendChild(e), e.focus(), e.select(), new Promise((n, s) => {
545
+ return e.style.position = "fixed", e.style.top = e.style.left = "-100vh", e.style.opacity = "0", e.value = t, document.body.appendChild(e), e.focus(), e.select(), new Promise((n, r) => {
519
546
  try {
520
547
  document.execCommand("copy"), n();
521
548
  } catch {
522
- s(new Error("copy failed"));
549
+ r(new Error("copy failed"));
523
550
  } finally {
524
551
  e.remove();
525
552
  }
@@ -539,15 +566,15 @@ const M = {
539
566
  Array.prototype.groupBy = function(t) {
540
567
  var e = {};
541
568
  return this.forEach(function(n) {
542
- var s = JSON.stringify(t(n));
543
- e[s] = e[s] || [], e[s].push(n);
569
+ var r = JSON.stringify(t(n));
570
+ e[r] = e[r] || [], e[r].push(n);
544
571
  }), Object.keys(e).map((n) => e[n]);
545
572
  };
546
573
  Array.prototype.distinct = function(t = (e) => e) {
547
574
  const e = [], n = {};
548
- return this.forEach((s) => {
549
- const r = t(s), i = String(r);
550
- n[i] || (n[i] = !0, e.push(s));
575
+ return this.forEach((r) => {
576
+ const s = t(r), i = String(s);
577
+ n[i] || (n[i] = !0, e.push(r));
551
578
  }), e;
552
579
  };
553
580
  Array.prototype.max = function() {
@@ -571,9 +598,9 @@ Array.prototype.asc = function(t = (e) => e) {
571
598
  Array.prototype.clear = function() {
572
599
  return this.length = 0, this;
573
600
  };
574
- const k = {
601
+ const F = {
575
602
  asArray(t) {
576
- return M.isEmpty(t) ? [] : Array.isArray(t) ? t : [t];
603
+ return R.isEmpty(t) ? [] : Array.isArray(t) ? t : [t];
577
604
  },
578
605
  generateArray(t) {
579
606
  return [...new Array(t).keys()];
@@ -587,7 +614,7 @@ const k = {
587
614
  union(...t) {
588
615
  let e = [];
589
616
  return t.forEach((n) => {
590
- Array.isArray(n) && (e = e.concat(n.filter((s) => !e.includes(s))));
617
+ Array.isArray(n) && (e = e.concat(n.filter((r) => !e.includes(r))));
591
618
  }), e;
592
619
  },
593
620
  /**
@@ -599,7 +626,7 @@ const k = {
599
626
  intersection(...t) {
600
627
  let e = t[0] || [];
601
628
  return t.forEach((n) => {
602
- Array.isArray(n) && (e = e.filter((s) => n.includes(s)));
629
+ Array.isArray(n) && (e = e.filter((r) => n.includes(r)));
603
630
  }), e;
604
631
  },
605
632
  /**
@@ -620,7 +647,7 @@ const k = {
620
647
  difference(...t) {
621
648
  return this.union(...t).filter((e) => !this.intersection(...t).includes(e));
622
649
  }
623
- }, U = {
650
+ }, $ = {
624
651
  /**
625
652
  * 获取浏览器类型
626
653
  *
@@ -637,8 +664,8 @@ const k = {
637
664
  */
638
665
  detectOS() {
639
666
  let t = "";
640
- const e = navigator.userAgent.indexOf("Windows", 0) != -1 ? 1 : 0, n = navigator.userAgent.indexOf("mac", 0) != -1 ? 1 : 0, s = navigator.userAgent.indexOf("Linux", 0) != -1 ? 1 : 0, r = navigator.userAgent.indexOf("X11", 0) != -1 ? 1 : 0;
641
- return e ? t = "MS Windows" : n ? t = "Apple mac" : s ? t = "Linux" : r && (t = "Unix"), t;
667
+ const e = navigator.userAgent.indexOf("Windows", 0) != -1 ? 1 : 0, n = navigator.userAgent.indexOf("mac", 0) != -1 ? 1 : 0, r = navigator.userAgent.indexOf("Linux", 0) != -1 ? 1 : 0, s = navigator.userAgent.indexOf("X11", 0) != -1 ? 1 : 0;
668
+ return e ? t = "MS Windows" : n ? t = "Apple mac" : r ? t = "Linux" : s && (t = "Unix"), t;
642
669
  },
643
670
  /**
644
671
  * 切换全屏状态
@@ -660,9 +687,9 @@ const k = {
660
687
  refreshScale() {
661
688
  const t = document.documentElement.clientWidth || 0, e = document.documentElement.clientHeight || 0, n = document.getElementById("app");
662
689
  if (!n) return;
663
- const s = n.style, r = t / e, i = 16 / 9;
664
- let a = t / 1920;
665
- r > i && (a = e / 1080), s.transformOrigin = "left top", s.transform = `scale(${a}) translateX(-49.99%)`, s.width = `${t / a}px`;
690
+ const r = n.style, s = t / e, i = 16 / 9;
691
+ let o = t / 1920;
692
+ s > i && (o = e / 1080), r.transformOrigin = "left top", r.transform = `scale(${o}) translateX(-49.99%)`, r.width = `${t / o}px`;
666
693
  },
667
694
  /**
668
695
  * 获取HTML字体大小
@@ -673,10 +700,10 @@ const k = {
673
700
  const t = document.documentElement.clientWidth || document.body.clientWidth, e = document.querySelector("html");
674
701
  e && (e.style.fontSize = t / 192 + "px");
675
702
  }
676
- }, N = {
703
+ }, G = {
677
704
  set: function(t, e, n = 30) {
678
- var s = /* @__PURE__ */ new Date();
679
- s.setTime(s.getTime() + n * 24 * 60 * 60 * 1e3), document.cookie = t + "=" + escape(e) + ";expires=" + s.toUTCString();
705
+ var r = /* @__PURE__ */ new Date();
706
+ r.setTime(r.getTime() + n * 24 * 60 * 60 * 1e3), document.cookie = t + "=" + escape(e) + ";expires=" + r.toUTCString();
680
707
  },
681
708
  remove: function(t) {
682
709
  var e = /* @__PURE__ */ new Date();
@@ -688,17 +715,17 @@ const k = {
688
715
  var e = document.cookie.match(new RegExp("(^| )" + t + "=([^;]*)(;|$)"));
689
716
  return e != null ? e[2] : "";
690
717
  }
691
- }, F = {
718
+ }, B = {
692
719
  PI: 3.141592653589793,
693
720
  XPI: 3.141592653589793 * 3e3 / 180,
694
721
  delta(t, e) {
695
- const s = 0.006693421622965943;
696
- let r = this.transformLat(e - 105, t - 35), i = this.transformLon(e - 105, t - 35);
697
- const a = t / 180 * this.PI;
698
- let o = Math.sin(a);
699
- o = 1 - s * o * o;
700
- const c = Math.sqrt(o);
701
- return r = r * 180 / (6378245 * (1 - s) / (o * c) * this.PI), i = i * 180 / (6378245 / c * Math.cos(a) * this.PI), { lat: r, lng: i };
722
+ const r = 0.006693421622965943;
723
+ let s = this.transformLat(e - 105, t - 35), i = this.transformLon(e - 105, t - 35);
724
+ const o = t / 180 * this.PI;
725
+ let a = Math.sin(o);
726
+ a = 1 - r * a * a;
727
+ const c = Math.sqrt(a);
728
+ return s = s * 180 / (6378245 * (1 - r) / (a * c) * this.PI), i = i * 180 / (6378245 / c * Math.cos(o) * this.PI), { lat: s, lng: i };
702
729
  },
703
730
  /**
704
731
  * 判断经纬度是否不在中国境内
@@ -726,37 +753,37 @@ const k = {
726
753
  },
727
754
  // GCJ-02 to WGS-84 exactly
728
755
  gcjDecryptExact(t, e) {
729
- let r = 0.01, i = 0.01, a = t - r, o = e - i, c = t + r, l = e + i, h = 0, u = 0, d = 0;
756
+ let s = 0.01, i = 0.01, o = t - s, a = e - i, c = t + s, h = e + i, l = 0, u = 0, d = 0;
730
757
  for (; ; ) {
731
- h = (a + c) / 2, u = (o + l) / 2;
732
- const m = this.gcjEncrypt(h, u);
733
- if (r = m.lat - t, i = m.lng - e, Math.abs(r) < 1e-9 && Math.abs(i) < 1e-9 || (r > 0 ? c = h : a = h, i > 0 ? l = u : o = u, ++d > 1e4)) break;
758
+ l = (o + c) / 2, u = (a + h) / 2;
759
+ const p = this.gcjEncrypt(l, u);
760
+ if (s = p.lat - t, i = p.lng - e, Math.abs(s) < 1e-9 && Math.abs(i) < 1e-9 || (s > 0 ? c = l : o = l, i > 0 ? h = u : a = u, ++d > 1e4)) break;
734
761
  }
735
- return { lat: h, lng: u };
762
+ return { lat: l, lng: u };
736
763
  },
737
764
  // GCJ-02 to BD-09
738
765
  bdEncrypt(t, e) {
739
- const n = e, s = t, r = Math.sqrt(n * n + s * s) + 2e-5 * Math.sin(s * this.XPI), i = Math.atan2(s, n) + 3e-6 * Math.cos(n * this.XPI), a = r * Math.cos(i) + 65e-4;
740
- return { lat: r * Math.sin(i) + 6e-3, lng: a };
766
+ const n = e, r = t, s = Math.sqrt(n * n + r * r) + 2e-5 * Math.sin(r * this.XPI), i = Math.atan2(r, n) + 3e-6 * Math.cos(n * this.XPI), o = s * Math.cos(i) + 65e-4;
767
+ return { lat: s * Math.sin(i) + 6e-3, lng: o };
741
768
  },
742
769
  // BD-09 to GCJ-02
743
770
  bdDecrypt(t, e) {
744
- const n = e - 65e-4, s = t - 6e-3, r = Math.sqrt(n * n + s * s) - 2e-5 * Math.sin(s * this.XPI), i = Math.atan2(s, n) - 3e-6 * Math.cos(n * this.XPI), a = r * Math.cos(i);
745
- return { lat: r * Math.sin(i), lng: a };
771
+ const n = e - 65e-4, r = t - 6e-3, s = Math.sqrt(n * n + r * r) - 2e-5 * Math.sin(r * this.XPI), i = Math.atan2(r, n) - 3e-6 * Math.cos(n * this.XPI), o = s * Math.cos(i);
772
+ return { lat: s * Math.sin(i), lng: o };
746
773
  },
747
774
  // WGS-84 to Web mercator
748
775
  // mercatorLat -> y mercatorLon -> x
749
776
  mercatorEncrypt(t, e) {
750
777
  const n = e * 2003750834e-2 / 180;
751
- let s = Math.log(Math.tan((90 + t) * this.PI / 360)) / (this.PI / 180);
752
- return s = s * 2003750834e-2 / 180, { lat: s, lng: n };
778
+ let r = Math.log(Math.tan((90 + t) * this.PI / 360)) / (this.PI / 180);
779
+ return r = r * 2003750834e-2 / 180, { lat: r, lng: n };
753
780
  },
754
781
  // Web mercator to WGS-84
755
782
  // mercatorLat -> y mercatorLon -> x
756
783
  mercatorDecrypt(t, e) {
757
784
  const n = e / 2003750834e-2 * 180;
758
- let s = t / 2003750834e-2 * 180;
759
- return s = 180 / this.PI * (2 * Math.atan(Math.exp(s * this.PI / 180)) - this.PI / 2), { lat: s, lng: n };
785
+ let r = t / 2003750834e-2 * 180;
786
+ return r = 180 / this.PI * (2 * Math.atan(Math.exp(r * this.PI / 180)) - this.PI / 2), { lat: r, lng: n };
760
787
  },
761
788
  transformLat(t, e) {
762
789
  let n = -100 + 2 * t + 3 * e + 0.2 * e * e + 0.1 * t * e + 0.2 * Math.sqrt(Math.abs(t));
@@ -766,13 +793,13 @@ const k = {
766
793
  let n = 300 + t + 2 * e + 0.1 * t * t + 0.1 * t * e + 0.1 * Math.sqrt(Math.abs(t));
767
794
  return n += (20 * Math.sin(6 * t * this.PI) + 20 * Math.sin(2 * t * this.PI)) * 2 / 3, n += (20 * Math.sin(t * this.PI) + 40 * Math.sin(t / 3 * this.PI)) * 2 / 3, n += (150 * Math.sin(t / 12 * this.PI) + 300 * Math.sin(t / 30 * this.PI)) * 2 / 3, n;
768
795
  },
769
- randomCoordinate(t, e, n, s) {
796
+ randomCoordinate(t, e, n, r) {
770
797
  return {
771
- lat: Math.random() * (s - e) + e,
798
+ lat: Math.random() * (r - e) + e,
772
799
  lng: Math.random() * (n - t) + t
773
800
  };
774
801
  }
775
- }, $ = {
802
+ }, J = {
776
803
  /**
777
804
  * 将RGB颜色值转换为十六进制颜色值
778
805
  *
@@ -800,11 +827,11 @@ const k = {
800
827
  * @returns 返回rgba格式的颜色值,格式为rgba(r,g,b,1)
801
828
  */
802
829
  hexToRgba(t) {
803
- const e = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, n = t.replace(e, (c, l, h, u) => l + l + h + h + u + u), r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);
804
- if (!r)
830
+ const e = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, n = t.replace(e, (c, h, l, u) => h + h + l + l + u + u), s = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);
831
+ if (!s)
805
832
  return t;
806
- const i = parseInt(r[1], 16), a = parseInt(r[2], 16), o = parseInt(r[3], 16);
807
- return `rgba(${i},${a},${o},1)`;
833
+ const i = parseInt(s[1], 16), o = parseInt(s[2], 16), a = parseInt(s[3], 16);
834
+ return `rgba(${i},${o},${a},1)`;
808
835
  },
809
836
  /**
810
837
  * 将 HSL 颜色值转换为 RGBA 颜色值
@@ -818,18 +845,18 @@ const k = {
818
845
  const e = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t);
819
846
  if (!e)
820
847
  return null;
821
- const n = parseInt(e[1], 10) / 360, s = parseInt(e[2], 10) / 100, r = parseInt(e[3], 10) / 100, i = e[4] ? parseFloat(e[4]) : 1;
822
- function a(h, u, d) {
823
- return d < 0 && (d += 1), d > 1 && (d -= 1), d < 1 / 6 ? h + (u - h) * 6 * d : d < 1 / 2 ? u : d < 2 / 3 ? h + (u - h) * (2 / 3 - d) * 6 : h;
848
+ const n = parseInt(e[1], 10) / 360, r = parseInt(e[2], 10) / 100, s = parseInt(e[3], 10) / 100, i = e[4] ? parseFloat(e[4]) : 1;
849
+ function o(l, u, d) {
850
+ return d < 0 && (d += 1), d > 1 && (d -= 1), d < 1 / 6 ? l + (u - l) * 6 * d : d < 1 / 2 ? u : d < 2 / 3 ? l + (u - l) * (2 / 3 - d) * 6 : l;
824
851
  }
825
- let o, c, l;
826
- if (s === 0)
827
- o = c = l = r;
852
+ let a, c, h;
853
+ if (r === 0)
854
+ a = c = h = s;
828
855
  else {
829
- const h = r < 0.5 ? r * (1 + s) : r + s - r * s, u = 2 * r - h;
830
- o = a(u, h, n + 1 / 3), c = a(u, h, n), l = a(u, h, n - 1 / 3);
856
+ const l = s < 0.5 ? s * (1 + r) : s + r - s * r, u = 2 * s - l;
857
+ a = o(u, l, n + 1 / 3), c = o(u, l, n), h = o(u, l, n - 1 / 3);
831
858
  }
832
- return `rgba(${Math.round(o * 255)},${Math.round(c * 255)},${Math.round(l * 255)},${i})`;
859
+ return `rgba(${Math.round(a * 255)},${Math.round(c * 255)},${Math.round(h * 255)},${i})`;
833
860
  },
834
861
  isHex(t) {
835
862
  return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);
@@ -871,8 +898,8 @@ Date.prototype.format = function(t) {
871
898
  /(y+)/.test(t) && (t = t.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)));
872
899
  for (const n in e)
873
900
  if (new RegExp("(" + n + ")").test(t)) {
874
- const s = n.length === 1 ? 1 : Number(n.slice(1));
875
- t = t.replace(RegExp.$1, ("00" + e[n]).substr(("" + e[n]).length + s - (e[n] + "").length));
901
+ const r = n.length === 1 ? 1 : Number(n.slice(1));
902
+ t = t.replace(RegExp.$1, ("00" + e[n]).substr(("" + e[n]).length + r - (e[n] + "").length));
876
903
  }
877
904
  return t;
878
905
  };
@@ -909,7 +936,7 @@ Date.prototype.addDate = function(t, e) {
909
936
  }
910
937
  return n;
911
938
  };
912
- const B = {
939
+ const q = {
913
940
  lastMonthDate: new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1),
914
941
  thisMonthDate: new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1),
915
942
  nextMonthDate: new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() + 1, 1),
@@ -953,26 +980,26 @@ const B = {
953
980
  * @returns {*}
954
981
  */
955
982
  formatDateInterval(t, e) {
956
- const n = new Date(t), r = new Date(e).getTime() - n.getTime(), i = Math.floor(r / (24 * 3600 * 1e3)), a = r % (24 * 3600 * 1e3), o = Math.floor(a / (3600 * 1e3)), c = a % (3600 * 1e3), l = Math.floor(c / (60 * 1e3)), h = c % (60 * 1e3), u = Math.round(h / 1e3);
983
+ const n = new Date(t), s = new Date(e).getTime() - n.getTime(), i = Math.floor(s / (24 * 3600 * 1e3)), o = s % (24 * 3600 * 1e3), a = Math.floor(o / (3600 * 1e3)), c = o % (3600 * 1e3), h = Math.floor(c / (60 * 1e3)), l = c % (60 * 1e3), u = Math.round(l / 1e3);
957
984
  let d = "";
958
- return i > 0 && (d += i + "天"), o > 0 && (d += o + "时"), l > 0 && (d += l + "分"), u > 0 && (d += u + "秒"), i === 0 && o === 0 && l === 0 && u === 0 && (d = "少于1秒"), d;
985
+ return i > 0 && (d += i + "天"), a > 0 && (d += a + "时"), h > 0 && (d += h + "分"), u > 0 && (d += u + "秒"), i === 0 && a === 0 && h === 0 && u === 0 && (d = "少于1秒"), d;
959
986
  },
960
987
  formatterCounter(t) {
961
- const e = function(o) {
962
- return (o > 10 ? "" : "0") + (o || 0);
963
- }, n = e(Math.floor(t / 3600)), s = t % 3600, r = e(Math.floor(s / 60)), i = s % 60, a = e(Math.round(i));
964
- return `${n}:${r}:${a}`;
988
+ const e = function(a) {
989
+ return (a > 10 ? "" : "0") + (a || 0);
990
+ }, n = e(Math.floor(t / 3600)), r = t % 3600, s = e(Math.floor(r / 60)), i = r % 60, o = e(Math.round(i));
991
+ return `${n}:${s}:${o}`;
965
992
  },
966
993
  sleep(t) {
967
994
  }
968
995
  };
969
- function O(t) {
996
+ function T(t) {
970
997
  return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "");
971
998
  }
972
- function R(t) {
973
- return O(t).split(/\s+/);
999
+ function S(t) {
1000
+ return T(t).split(/\s+/);
974
1001
  }
975
- const q = {
1002
+ const W = {
976
1003
  /**
977
1004
  * 获取元素的样式值
978
1005
  *
@@ -981,11 +1008,11 @@ const q = {
981
1008
  * @returns 元素的样式值,如果获取不到则返回 null
982
1009
  */
983
1010
  getStyle(t, e) {
984
- var s;
1011
+ var r;
985
1012
  let n = t.style[e];
986
1013
  if (!n || n === "auto") {
987
- const r = (s = document.defaultView) == null ? void 0 : s.getComputedStyle(t, null);
988
- n = r ? r[e] : null, n === "auto" && (n = null);
1014
+ const s = (r = document.defaultView) == null ? void 0 : r.getComputedStyle(t, null);
1015
+ n = s ? s[e] : null, n === "auto" && (n = null);
989
1016
  }
990
1017
  return n;
991
1018
  },
@@ -998,8 +1025,8 @@ const q = {
998
1025
  * @returns 返回新创建的HTML元素
999
1026
  */
1000
1027
  create(t, e, n) {
1001
- const s = document.createElement(t);
1002
- return s.className = e || "", n && n.appendChild(s), s;
1028
+ const r = document.createElement(t);
1029
+ return r.className = e || "", n && n.appendChild(r), r;
1003
1030
  },
1004
1031
  /**
1005
1032
  * 从父节点中移除指定元素。
@@ -1057,8 +1084,8 @@ const q = {
1057
1084
  * @returns 返回一个布尔值,表示元素是否包含指定类名
1058
1085
  */
1059
1086
  hasClass(t, e) {
1060
- var s;
1061
- if ((s = t.classList) != null && s.contains(e))
1087
+ var r;
1088
+ if ((r = t.classList) != null && r.contains(e))
1062
1089
  return !0;
1063
1090
  const n = this.getClass(t);
1064
1091
  return n.length > 0 && new RegExp(`(^|\\s)${e}(\\s|$)`).test(n);
@@ -1071,9 +1098,9 @@ const q = {
1071
1098
  */
1072
1099
  addClass(t, e) {
1073
1100
  if (t.classList !== void 0) {
1074
- const n = R(e);
1075
- for (let s = 0, r = n.length; s < r; s++)
1076
- t.classList.add(n[s]);
1101
+ const n = S(e);
1102
+ for (let r = 0, s = n.length; r < s; r++)
1103
+ t.classList.add(n[r]);
1077
1104
  } else if (!this.hasClass(t, e)) {
1078
1105
  const n = this.getClass(t);
1079
1106
  this.setClass(t, (n ? n + " " : "") + e);
@@ -1086,7 +1113,7 @@ const q = {
1086
1113
  * @param name 要移除的类名,多个类名用空格分隔
1087
1114
  */
1088
1115
  removeClass(t, e) {
1089
- t.classList !== void 0 ? R(e).forEach((s) => t.classList.remove(s)) : this.setClass(t, (" " + this.getClass(t) + " ").replace(" " + e + " ", " ").trim());
1116
+ t.classList !== void 0 ? S(e).forEach((r) => t.classList.remove(r)) : this.setClass(t, (" " + this.getClass(t) + " ").replace(" " + e + " ", " ").trim());
1090
1117
  },
1091
1118
  /**
1092
1119
  * 设置元素的 CSS 类名
@@ -1106,7 +1133,7 @@ const q = {
1106
1133
  parseFromString(t) {
1107
1134
  return new DOMParser().parseFromString(t, "text/xml").children[0];
1108
1135
  }
1109
- }, G = {
1136
+ }, H = {
1110
1137
  toRadian: Math.PI / 180,
1111
1138
  R: 6371393,
1112
1139
  /**
@@ -1137,9 +1164,9 @@ const q = {
1137
1164
  * @returns 返回两点之间的距离,单位为米
1138
1165
  */
1139
1166
  distanceByPoints(t, e) {
1140
- const { lng: n, lat: s } = t, { lng: r, lat: i } = e, a = 6371e3, o = Math.cos(s * Math.PI / 180) * Math.cos(i * Math.PI / 180) * Math.cos((n - r) * Math.PI / 180), c = Math.sin(s * Math.PI / 180) * Math.sin(i * Math.PI / 180);
1141
- let l = o + c;
1142
- return l > 1 && (l = 1), l < -1 && (l = -1), Math.acos(l) * a;
1167
+ const { lng: n, lat: r } = t, { lng: s, lat: i } = e, o = 6371e3, a = Math.cos(r * Math.PI / 180) * Math.cos(i * Math.PI / 180) * Math.cos((n - s) * Math.PI / 180), c = Math.sin(r * Math.PI / 180) * Math.sin(i * Math.PI / 180);
1168
+ let h = a + c;
1169
+ return h > 1 && (h = 1), h < -1 && (h = -1), Math.acos(h) * o;
1143
1170
  },
1144
1171
  /**
1145
1172
  * 格式化经纬度为度分秒格式
@@ -1150,11 +1177,11 @@ const q = {
1150
1177
  */
1151
1178
  formatLnglat(t, e) {
1152
1179
  let n = "";
1153
- function s(r) {
1154
- const i = Math.floor(r), a = Math.floor((r - i) * 60), o = (r - i) * 3600 - a * 60;
1155
- return `${i}°${a}′${o.toFixed(2)}″`;
1180
+ function r(s) {
1181
+ const i = Math.floor(s), o = Math.floor((s - i) * 60), a = (s - i) * 3600 - o * 60;
1182
+ return `${i}°${o}′${a.toFixed(2)}″`;
1156
1183
  }
1157
- return this.isLnglat(t, e) ? n = s(t) + "," + s(e) : isNaN(t) ? isNaN(e) || (n = s(e)) : n = s(t), n;
1184
+ return this.isLnglat(t, e) ? n = r(t) + "," + r(e) : isNaN(t) ? isNaN(e) || (n = r(e)) : n = r(t), n;
1158
1185
  },
1159
1186
  /**
1160
1187
  * 将经纬度字符串转换为度
@@ -1164,13 +1191,13 @@ const q = {
1164
1191
  * @returns 转换后的经纬度对象
1165
1192
  */
1166
1193
  transformLnglat(t, e) {
1167
- function n(s) {
1168
- let i = /[sw]/i.test(s) ? -1 : 1;
1169
- const a = s.match(/[\d.]+/g) || [];
1170
- let o = 0;
1171
- for (let c = 0; c < a.length; c++)
1172
- o += parseFloat(a[c]) / i, i *= 60;
1173
- return o;
1194
+ function n(r) {
1195
+ let i = /[sw]/i.test(r) ? -1 : 1;
1196
+ const o = r.match(/[\d.]+/g) || [];
1197
+ let a = 0;
1198
+ for (let c = 0; c < o.length; c++)
1199
+ a += parseFloat(o[c]) / i, i *= 60;
1200
+ return a;
1174
1201
  }
1175
1202
  if (t && e)
1176
1203
  return {
@@ -1186,18 +1213,18 @@ const q = {
1186
1213
  * @returns 返回字符串,表示点相对于多边形的位置:'in'表示在多边形内,'out'表示在多边形外,'on'表示在多边形上
1187
1214
  */
1188
1215
  rayCasting(t, e) {
1189
- for (var n = t.x, s = t.y, r = !1, i = 0, a = e.length, o = a - 1; i < a; o = i, i++) {
1190
- var c = e[i].x, l = e[i].y, h = e[o].x, u = e[o].y;
1191
- if (c === n && l === s || h === n && u === s)
1216
+ for (var n = t.x, r = t.y, s = !1, i = 0, o = e.length, a = o - 1; i < o; a = i, i++) {
1217
+ var c = e[i].x, h = e[i].y, l = e[a].x, u = e[a].y;
1218
+ if (c === n && h === r || l === n && u === r)
1192
1219
  return "on";
1193
- if (l < s && u >= s || l >= s && u < s) {
1194
- var d = c + (s - l) * (h - c) / (u - l);
1220
+ if (h < r && u >= r || h >= r && u < r) {
1221
+ var d = c + (r - h) * (l - c) / (u - h);
1195
1222
  if (d === n)
1196
1223
  return "on";
1197
- d > n && (r = !r);
1224
+ d > n && (s = !s);
1198
1225
  }
1199
1226
  }
1200
- return r ? "in" : "out";
1227
+ return s ? "in" : "out";
1201
1228
  },
1202
1229
  /**
1203
1230
  * 旋转点
@@ -1208,8 +1235,8 @@ const q = {
1208
1235
  * @returns 旋转后点坐标
1209
1236
  */
1210
1237
  rotatePoint(t, e, n) {
1211
- const s = (t.x - e.x) * Math.cos(Math.PI / 180 * -n) - (t.y - e.y) * Math.sin(Math.PI / 180 * -n) + e.x, r = (t.x - e.x) * Math.sin(Math.PI / 180 * -n) + (t.y - e.y) * Math.cos(Math.PI / 180 * -n) + e.y;
1212
- return { x: s, y: r };
1238
+ const r = (t.x - e.x) * Math.cos(Math.PI / 180 * -n) - (t.y - e.y) * Math.sin(Math.PI / 180 * -n) + e.x, s = (t.x - e.x) * Math.sin(Math.PI / 180 * -n) + (t.y - e.y) * Math.cos(Math.PI / 180 * -n) + e.y;
1239
+ return { x: r, y: s };
1213
1240
  },
1214
1241
  /**
1215
1242
  * 根据两个平面坐标点计算方位角和距离
@@ -1219,8 +1246,8 @@ const q = {
1219
1246
  * @returns 返回一个对象,包含angle和distance属性,分别表示两点之间的角度(以度为单位,取值范围为0~359)和距离
1220
1247
  */
1221
1248
  calcBearAndDis(t, e) {
1222
- const { x: n, y: s } = t, { x: r, y: i } = e, a = r - n, o = i - s, c = Math.sqrt(a * a + o * o);
1223
- return { angle: (Math.atan2(o, a) * (180 / Math.PI) + 360 + 90) % 360, distance: c };
1249
+ const { x: n, y: r } = t, { x: s, y: i } = e, o = s - n, a = i - r, c = Math.sqrt(o * o + a * a);
1250
+ return { angle: (Math.atan2(a, o) * (180 / Math.PI) + 360 + 90) % 360, distance: c };
1224
1251
  },
1225
1252
  /**
1226
1253
  * 根据两个经纬度点计算方位角和距离
@@ -1230,10 +1257,10 @@ const q = {
1230
1257
  * @returns 包含方位角和距离的对象
1231
1258
  */
1232
1259
  calcBearAndDisByPoints(t, e) {
1233
- var n = t.lat * 1, s = t.lng * 1, r = e.lat * 1, i = e.lng * 1, a = Math.sin((i - s) * this.toRadian) * Math.cos(r * this.toRadian), o = Math.cos(n * this.toRadian) * Math.sin(r * this.toRadian) - Math.sin(n * this.toRadian) * Math.cos(r * this.toRadian) * Math.cos((i - s) * this.toRadian), c = Math.atan2(a, o) * (180 / Math.PI), l = (r - n) * this.toRadian, h = (i - s) * this.toRadian, u = Math.sin(l / 2) * Math.sin(l / 2) + Math.cos(n * this.toRadian) * Math.cos(r * this.toRadian) * Math.sin(h / 2) * Math.sin(h / 2), d = 2 * Math.atan2(Math.sqrt(u), Math.sqrt(1 - u)), m = this.R * d;
1260
+ var n = t.lat * 1, r = t.lng * 1, s = e.lat * 1, i = e.lng * 1, o = Math.sin((i - r) * this.toRadian) * Math.cos(s * this.toRadian), a = Math.cos(n * this.toRadian) * Math.sin(s * this.toRadian) - Math.sin(n * this.toRadian) * Math.cos(s * this.toRadian) * Math.cos((i - r) * this.toRadian), c = Math.atan2(o, a) * (180 / Math.PI), h = (s - n) * this.toRadian, l = (i - r) * this.toRadian, u = Math.sin(h / 2) * Math.sin(h / 2) + Math.cos(n * this.toRadian) * Math.cos(s * this.toRadian) * Math.sin(l / 2) * Math.sin(l / 2), d = 2 * Math.atan2(Math.sqrt(u), Math.sqrt(1 - u)), p = this.R * d;
1234
1261
  return {
1235
1262
  angle: c,
1236
- distance: m
1263
+ distance: p
1237
1264
  };
1238
1265
  },
1239
1266
  /**
@@ -1245,14 +1272,14 @@ const q = {
1245
1272
  * @returns 点P到线段P1P2的最短距离
1246
1273
  */
1247
1274
  distanceToSegment(t, e, n) {
1248
- const s = t.x, r = t.y, i = e.x, a = e.y, o = n.x, c = n.y, l = (o - i) * (s - i) + (c - a) * (r - a);
1249
- if (l <= 0)
1250
- return Math.sqrt((s - i) * (s - i) + (r - a) * (r - a));
1251
- const h = (o - i) * (o - i) + (c - a) * (c - a);
1252
- if (l >= h)
1253
- return Math.sqrt((s - o) * (s - o) + (r - c) * (r - c));
1254
- const u = l / h, d = i + (o - i) * u, m = a + (c - a) * u;
1255
- return Math.sqrt((s - d) * (s - d) + (r - m) * (r - m));
1275
+ const r = t.x, s = t.y, i = e.x, o = e.y, a = n.x, c = n.y, h = (a - i) * (r - i) + (c - o) * (s - o);
1276
+ if (h <= 0)
1277
+ return Math.sqrt((r - i) * (r - i) + (s - o) * (s - o));
1278
+ const l = (a - i) * (a - i) + (c - o) * (c - o);
1279
+ if (h >= l)
1280
+ return Math.sqrt((r - a) * (r - a) + (s - c) * (s - c));
1281
+ const u = h / l, d = i + (a - i) * u, p = o + (c - o) * u;
1282
+ return Math.sqrt((r - d) * (r - d) + (s - p) * (s - p));
1256
1283
  },
1257
1284
  /**
1258
1285
  * 根据给定的经纬度、角度和距离计算新的经纬度点
@@ -1263,12 +1290,12 @@ const q = {
1263
1290
  * @returns 返回计算后的新经纬度点,类型为{lat: number, lng: number}
1264
1291
  */
1265
1292
  calcPointByBearAndDis(t, e, n) {
1266
- const s = g.toRadians(t.lat * 1), r = g.toRadians(t.lng * 1), i = n / this.R;
1267
- e = g.toRadians(e);
1268
- const a = Math.asin(Math.sin(s) * Math.cos(i) + Math.cos(s) * Math.sin(i) * Math.cos(e)), o = r + Math.atan2(Math.sin(e) * Math.sin(i) * Math.cos(s), Math.cos(i) - Math.sin(s) * Math.sin(a));
1293
+ const r = m.toRadians(t.lat * 1), s = m.toRadians(t.lng * 1), i = n / this.R;
1294
+ e = m.toRadians(e);
1295
+ const o = Math.asin(Math.sin(r) * Math.cos(i) + Math.cos(r) * Math.sin(i) * Math.cos(e)), a = s + Math.atan2(Math.sin(e) * Math.sin(i) * Math.cos(r), Math.cos(i) - Math.sin(r) * Math.sin(o));
1269
1296
  return {
1270
- lat: g.toDegrees(a),
1271
- lng: g.toDegrees(o)
1297
+ lat: m.toDegrees(o),
1298
+ lng: m.toDegrees(a)
1272
1299
  };
1273
1300
  },
1274
1301
  /**
@@ -1280,9 +1307,9 @@ const q = {
1280
1307
  */
1281
1308
  mercatorTolonlat(t, e) {
1282
1309
  const n = t / 2003750834e-2 * 180;
1283
- var s = e / 2003750834e-2 * 180;
1284
- const r = 180 / Math.PI * (2 * Math.atan(Math.exp(s * Math.PI / 180)) - Math.PI / 2);
1285
- return { lng: n, lat: r };
1310
+ var r = e / 2003750834e-2 * 180;
1311
+ const s = 180 / Math.PI * (2 * Math.atan(Math.exp(r * Math.PI / 180)) - Math.PI / 2);
1312
+ return { lng: n, lat: s };
1286
1313
  },
1287
1314
  /**
1288
1315
  * 将经纬度坐标转换为墨卡托坐标
@@ -1293,19 +1320,125 @@ const q = {
1293
1320
  */
1294
1321
  lonlatToMercator(t, e) {
1295
1322
  var n = 6378137;
1296
- const s = t * Math.PI / 180 * n;
1297
- var r = e * Math.PI / 180;
1298
- const i = n / 2 * Math.log((1 + Math.sin(r)) / (1 - Math.sin(r)));
1299
- return { x: s, y: i };
1323
+ const r = t * Math.PI / 180 * n;
1324
+ var s = e * Math.PI / 180;
1325
+ const i = n / 2 * Math.log((1 + Math.sin(s)) / (1 - Math.sin(s)));
1326
+ return { x: r, y: i };
1327
+ }
1328
+ }, y = ["Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon"], j = {
1329
+ getGeoJSONType(t) {
1330
+ return t.geometry ? t.geometry.type : null;
1331
+ },
1332
+ isGeoJSON(t) {
1333
+ const e = this.getGeoJSONType(t);
1334
+ if (e) {
1335
+ for (let n = 0, r = y.length; n < r; n++)
1336
+ if (y[n] === e)
1337
+ return !0;
1338
+ }
1339
+ return !1;
1340
+ },
1341
+ isGeoJSONPolygon(t) {
1342
+ const e = this.getGeoJSONType(t);
1343
+ return !!(e && (e === y[4] || e === y[5]));
1344
+ },
1345
+ isGeoJSONLine(t) {
1346
+ const e = this.getGeoJSONType(t);
1347
+ return !!(e && (e === y[2] || e === y[3]));
1348
+ },
1349
+ isGeoJSONPoint(t) {
1350
+ const e = this.getGeoJSONType(t);
1351
+ return !!(e && (e === y[0] || e === y[1]));
1352
+ },
1353
+ isGeoJSONMulti(t) {
1354
+ const e = this.getGeoJSONType(t);
1355
+ return !!(e && e.indexOf("Multi") > -1);
1356
+ },
1357
+ getGeoJSONCoordinates(t) {
1358
+ return t.geometry ? t.geometry.coordinates : [];
1359
+ },
1360
+ getGeoJSONCenter(t, e) {
1361
+ const n = this.getGeoJSONType(t);
1362
+ if (!n || !t.geometry)
1363
+ return null;
1364
+ const s = t.geometry.coordinates;
1365
+ if (!s)
1366
+ return null;
1367
+ let i = 0, o = 0, a = 0;
1368
+ switch (n) {
1369
+ case "Point": {
1370
+ i = s[0], o = s[1], a++;
1371
+ break;
1372
+ }
1373
+ case "MultiPoint":
1374
+ case "LineString": {
1375
+ for (let l = 0, u = s.length; l < u; l++)
1376
+ i += s[l][0], o += s[l][1], a++;
1377
+ break;
1378
+ }
1379
+ case "MultiLineString":
1380
+ case "Polygon": {
1381
+ for (let l = 0, u = s.length; l < u; l++)
1382
+ for (let d = 0, p = s[l].length; d < p; d++)
1383
+ i += s[l][d][0], o += s[l][d][1], a++;
1384
+ break;
1385
+ }
1386
+ case "MultiPolygon": {
1387
+ for (let l = 0, u = s.length; l < u; l++)
1388
+ for (let d = 0, p = s[l].length; d < p; d++)
1389
+ for (let M = 0, O = s[l][d].length; M < O; M++)
1390
+ i += s[l][d][M][0], o += s[l][d][M][1], a++;
1391
+ break;
1392
+ }
1393
+ }
1394
+ const c = i / a, h = o / a;
1395
+ return e ? (e.x = c, e.y = h, e) : { x: c, y: h };
1396
+ },
1397
+ spliteGeoJSONMulti(t) {
1398
+ const e = this.getGeoJSONType(t);
1399
+ if (!e || !t.geometry)
1400
+ return null;
1401
+ const n = t.geometry, r = t.properties || {}, s = n.coordinates;
1402
+ if (!s)
1403
+ return null;
1404
+ const i = [];
1405
+ let o;
1406
+ switch (e) {
1407
+ case "MultiPoint": {
1408
+ o = "Point";
1409
+ break;
1410
+ }
1411
+ case "MultiLineString": {
1412
+ o = "LineString";
1413
+ break;
1414
+ }
1415
+ case "MultiPolygon": {
1416
+ o = "Polygon";
1417
+ break;
1418
+ }
1419
+ }
1420
+ if (o)
1421
+ for (let a = 0, c = s.length; a < c; a++)
1422
+ i.push({
1423
+ type: "Feature",
1424
+ geometry: {
1425
+ type: o,
1426
+ coordinates: s[a]
1427
+ },
1428
+ properties: r
1429
+ });
1430
+ else
1431
+ i.push(t);
1432
+ return i;
1300
1433
  }
1301
- }, W = {
1434
+ }, K = {
1302
1435
  deepClone(t) {
1303
1436
  return structuredClone(t);
1304
1437
  },
1305
1438
  isEqual(t, e) {
1306
1439
  return JSON.stringify(t) === JSON.stringify(e);
1307
1440
  }
1308
- }, H = {
1441
+ }, Y = {
1309
1442
  /**
1310
1443
  * 将Base64编码的字符串转换为Blob对象
1311
1444
  *
@@ -1313,11 +1446,11 @@ const q = {
1313
1446
  * @returns 转换后的Blob对象
1314
1447
  */
1315
1448
  convertBase64ToBlob(t) {
1316
- const e = t.split(",")[0].split(":")[1].split(";")[0], n = atob(t.split(",")[1]), s = new Array(n.length);
1317
- for (let a = 0; a < n.length; a++)
1318
- s[a] = n.charCodeAt(a);
1319
- const r = new Uint8Array(s);
1320
- return new Blob([r], { type: e });
1449
+ const e = t.split(",")[0].split(":")[1].split(";")[0], n = atob(t.split(",")[1]), r = new Array(n.length);
1450
+ for (let o = 0; o < n.length; o++)
1451
+ r[o] = n.charCodeAt(o);
1452
+ const s = new Uint8Array(r);
1453
+ return new Blob([s], { type: e });
1321
1454
  },
1322
1455
  /**
1323
1456
  * 将图片的URL转换为Base64编码
@@ -1328,24 +1461,24 @@ const q = {
1328
1461
  * @returns 返回Promise对象,解析后得到包含Base64编码数据的对象
1329
1462
  */
1330
1463
  convertUrlToBase64(t, e, n) {
1331
- return new Promise((s, r) => {
1464
+ return new Promise((r, s) => {
1332
1465
  var i = new Image();
1333
1466
  i.crossOrigin = "Anonymous", i.src = t, i.onload = function() {
1334
- var a = document.createElement("canvas");
1335
- a.width = e || i.width, a.height = n || i.height;
1336
- var o = a.getContext("2d");
1337
- if (!o) {
1338
- r(new Error("Failed to get canvas context"));
1467
+ var o = document.createElement("canvas");
1468
+ o.width = e || i.width, o.height = n || i.height;
1469
+ var a = o.getContext("2d");
1470
+ if (!a) {
1471
+ s(new Error("Failed to get canvas context"));
1339
1472
  return;
1340
1473
  }
1341
- o.drawImage(i, 0, 0, i.width, i.height);
1342
- var c = i.src.substring(i.src.lastIndexOf(".") + 1).toLowerCase(), l = a.toDataURL("image/" + c), h = {
1343
- dataURL: l,
1474
+ a.drawImage(i, 0, 0, i.width, i.height);
1475
+ var c = i.src.substring(i.src.lastIndexOf(".") + 1).toLowerCase(), h = o.toDataURL("image/" + c), l = {
1476
+ dataURL: h,
1344
1477
  type: "image/" + c,
1345
1478
  ext: c
1346
1479
  };
1347
- s(h);
1348
- }, i.onerror = r;
1480
+ r(l);
1481
+ }, i.onerror = s;
1349
1482
  });
1350
1483
  },
1351
1484
  /**
@@ -1356,10 +1489,10 @@ const q = {
1356
1489
  * @returns 返回文件对象
1357
1490
  */
1358
1491
  convertBase64ToFile(t, e) {
1359
- const n = t.split(","), s = n[0].match(/:(.*?);/), r = s ? s[1] : "image/png", i = atob(n[1]), a = new Uint8Array(i.length);
1492
+ const n = t.split(","), r = n[0].match(/:(.*?);/), s = r ? r[1] : "image/png", i = atob(n[1]), o = new Uint8Array(i.length);
1360
1493
  for (let c = 0; c < i.length; c++)
1361
- a[c] = i.charCodeAt(c);
1362
- return new File([a], e, { type: r });
1494
+ o[c] = i.charCodeAt(c);
1495
+ return new File([o], e, { type: s });
1363
1496
  },
1364
1497
  /**
1365
1498
  * 从文件下载数据
@@ -1372,17 +1505,17 @@ const q = {
1372
1505
  if (t instanceof Blob)
1373
1506
  t = URL.createObjectURL(t);
1374
1507
  else {
1375
- const s = JSON.stringify(t), r = new Blob([s], { type: "text/json" });
1376
- t = window.URL.createObjectURL(r);
1508
+ const r = JSON.stringify(t), s = new Blob([r], { type: "text/json" });
1509
+ t = window.URL.createObjectURL(s);
1377
1510
  }
1378
1511
  else if (typeof t == "string" && t.indexOf("http") === -1) {
1379
- const s = new Blob([t], { type: "text/json" });
1380
- t = window.URL.createObjectURL(s);
1512
+ const r = new Blob([t], { type: "text/json" });
1513
+ t = window.URL.createObjectURL(r);
1381
1514
  }
1382
1515
  var n = document.createElement("a");
1383
1516
  n.href = t, n.download = e || "", n.click(), window.URL.revokeObjectURL(n.href);
1384
1517
  }
1385
- }, K = {
1518
+ }, z = {
1386
1519
  /**
1387
1520
  * 防抖函数,在指定的等待时间内,如果连续触发事件,则只在最后一次触发后执行函数。适用于像搜索输入框这种需要用户停止输入后才调用的场景
1388
1521
  *
@@ -1392,15 +1525,15 @@ const q = {
1392
1525
  * @returns 返回防抖后的函数。
1393
1526
  */
1394
1527
  debounce(t, e, n = !0) {
1395
- let s = null, r, i, a;
1396
- const o = () => {
1528
+ let r = null, s, i, o;
1529
+ const a = () => {
1397
1530
  const c = Date.now() - i;
1398
- c < e && c > 0 ? s = setTimeout(o, e - c) : (s = null, n || (a = t.apply(this, r)));
1531
+ c < e && c > 0 ? r = setTimeout(a, e - c) : (r = null, n || (o = t.apply(this, s)));
1399
1532
  };
1400
1533
  return (...c) => {
1401
1534
  i = Date.now();
1402
- const l = n && !s;
1403
- return s || (s = setTimeout(o, e)), l && (a = t.apply(this, c), s || (c = null)), a;
1535
+ const h = n && !r;
1536
+ return r || (r = setTimeout(a, e)), h && (o = t.apply(this, c), r || (c = null)), o;
1404
1537
  };
1405
1538
  },
1406
1539
  /**
@@ -1412,13 +1545,13 @@ const q = {
1412
1545
  * @returns 返回一个新的函数,该函数在节流控制下执行传入的函数
1413
1546
  */
1414
1547
  throttle(t, e, n = 1) {
1415
- let s = 0, r = null;
1548
+ let r = 0, s = null;
1416
1549
  return (...i) => {
1417
1550
  if (n === 1) {
1418
- const a = Date.now();
1419
- a - s >= e && (t.apply(this, i), s = a);
1420
- } else n === 2 && (r || (r = setTimeout(() => {
1421
- r = null, t.apply(this, i);
1551
+ const o = Date.now();
1552
+ o - r >= e && (t.apply(this, i), r = o);
1553
+ } else n === 2 && (s || (s = setTimeout(() => {
1554
+ s = null, t.apply(this, i);
1422
1555
  }, e)));
1423
1556
  };
1424
1557
  },
@@ -1431,12 +1564,12 @@ const q = {
1431
1564
  memoize(t) {
1432
1565
  const e = /* @__PURE__ */ new Map();
1433
1566
  return (...n) => {
1434
- const s = JSON.stringify(n);
1435
- if (e.has(s))
1436
- return e.get(s);
1567
+ const r = JSON.stringify(n);
1568
+ if (e.has(r))
1569
+ return e.get(r);
1437
1570
  {
1438
- const r = t.apply(this, n);
1439
- return e.set(s, r), r;
1571
+ const s = t.apply(this, n);
1572
+ return e.set(r, s), s;
1440
1573
  }
1441
1574
  };
1442
1575
  },
@@ -1448,12 +1581,12 @@ const q = {
1448
1581
  * @param duration 函数递归调用的总时长,单位为毫秒,默认为5000毫秒。
1449
1582
  */
1450
1583
  recurve(t, e = 500, n = 5e3) {
1451
- let s = 0;
1584
+ let r = 0;
1452
1585
  setTimeout(() => {
1453
- s++, s < Math.floor(n / e) && (t.call(this), setTimeout(this.recurve.bind(this, t, e, n), e));
1586
+ r++, r < Math.floor(n / e) && (t.call(this), setTimeout(this.recurve.bind(this, t, e, n), e));
1454
1587
  }, e);
1455
1588
  }
1456
- }, j = {
1589
+ }, X = {
1457
1590
  /**
1458
1591
  * 校验字符串是否符合指定类型
1459
1592
  *
@@ -1561,7 +1694,7 @@ const q = {
1561
1694
  */
1562
1695
  tag(t, ...e) {
1563
1696
  return e = e.map((n) => {
1564
- switch (M.getDataType(n)) {
1697
+ switch (R.getDataType(n)) {
1565
1698
  case "Object":
1566
1699
  return n || "{}";
1567
1700
  case "Array":
@@ -1569,7 +1702,7 @@ const q = {
1569
1702
  default:
1570
1703
  return n || "";
1571
1704
  }
1572
- }), t.reduce((n, s, r) => `${n}${e[r - 1]}${s}`);
1705
+ }), t.reduce((n, r, s) => `${n}${e[s - 1]}${r}`);
1573
1706
  },
1574
1707
  /**
1575
1708
  * 计算字符串的字节长度
@@ -1589,13 +1722,13 @@ const q = {
1589
1722
  * @returns 返回截取后的子串
1590
1723
  */
1591
1724
  subStringByte(t, e, n) {
1592
- var s = /[^\x00-\xff]/g;
1593
- if (t.replace(s, "mm").length <= n)
1725
+ var r = /[^\x00-\xff]/g;
1726
+ if (t.replace(r, "mm").length <= n)
1594
1727
  return t;
1595
- for (var r = Math.floor(n / 2), i = r; i < t.length; i++) {
1596
- let a = t.substring(e, i);
1597
- if (a.replace(s, "mm").length >= n)
1598
- return a;
1728
+ for (var s = Math.floor(n / 2), i = s; i < t.length; i++) {
1729
+ let o = t.substring(e, i);
1730
+ if (o.replace(r, "mm").length >= n)
1731
+ return o;
1599
1732
  }
1600
1733
  return t;
1601
1734
  },
@@ -1606,9 +1739,9 @@ const q = {
1606
1739
  * @returns 转换后的字符串,如果值为空,则返回空字符串
1607
1740
  */
1608
1741
  asString(t) {
1609
- if (M.isEmpty(t))
1742
+ if (R.isEmpty(t))
1610
1743
  return "";
1611
- switch (M.getDataType(t)) {
1744
+ switch (R.getDataType(t)) {
1612
1745
  case "Object":
1613
1746
  case "Array":
1614
1747
  return JSON.stringify(t);
@@ -1616,21 +1749,21 @@ const q = {
1616
1749
  return t;
1617
1750
  }
1618
1751
  }
1619
- }, p = class p {
1620
- static set(e, n = null, s = null) {
1621
- var r = this._getPrefixedKey(e, s);
1752
+ }, g = class g {
1753
+ static set(e, n = null, r = null) {
1754
+ var s = this._getPrefixedKey(e, r);
1622
1755
  try {
1623
- localStorage.setItem(r, JSON.stringify({ data: n }));
1756
+ localStorage.setItem(s, JSON.stringify({ data: n }));
1624
1757
  } catch {
1625
1758
  console && console.warn("StoreUtil didn't successfully save the '{" + e + ": " + n + "}' pair, because the localStorage is full.");
1626
1759
  }
1627
1760
  }
1628
- static get(e, n, s) {
1629
- var r = this._getPrefixedKey(e, s), i;
1761
+ static get(e, n, r) {
1762
+ var s = this._getPrefixedKey(e, r), i;
1630
1763
  try {
1631
- i = JSON.parse(localStorage.getItem(r) || "");
1764
+ i = JSON.parse(localStorage.getItem(s) || "");
1632
1765
  } catch {
1633
- localStorage[r] ? i = { data: localStorage.getItem(r) } : i = null;
1766
+ localStorage[s] ? i = { data: localStorage.getItem(s) } : i = null;
1634
1767
  }
1635
1768
  if (i) {
1636
1769
  if (typeof i == "object" && typeof i.data < "u")
@@ -1640,38 +1773,38 @@ const q = {
1640
1773
  static keys() {
1641
1774
  const e = [];
1642
1775
  var n = Object.keys(localStorage);
1643
- return p.prefix.length === 0 ? n : (n.forEach(function(s) {
1644
- s.indexOf(p.prefix) !== -1 && e.push(s.replace(p.prefix, ""));
1776
+ return g.prefix.length === 0 ? n : (n.forEach(function(r) {
1777
+ r.indexOf(g.prefix) !== -1 && e.push(r.replace(g.prefix, ""));
1645
1778
  }), e);
1646
1779
  }
1647
1780
  static getAll(e) {
1648
- var n = p.keys();
1781
+ var n = g.keys();
1649
1782
  if (e) {
1650
- const s = [];
1651
- return n.forEach((r) => {
1652
- if (e.includes(r)) {
1783
+ const r = [];
1784
+ return n.forEach((s) => {
1785
+ if (e.includes(s)) {
1653
1786
  const i = {};
1654
- i[r] = p.get(r, null, null), s.push(i);
1787
+ i[s] = g.get(s, null, null), r.push(i);
1655
1788
  }
1656
- }), s;
1789
+ }), r;
1657
1790
  }
1658
- return n.map((s) => p.get(s, null, null));
1791
+ return n.map((r) => g.get(r, null, null));
1659
1792
  }
1660
1793
  static remove(e, n) {
1661
- var s = this._getPrefixedKey(e, n);
1662
- localStorage.removeItem(s);
1794
+ var r = this._getPrefixedKey(e, n);
1795
+ localStorage.removeItem(r);
1663
1796
  }
1664
1797
  static clear(e) {
1665
- p.prefix.length ? this.keys().forEach((n) => {
1798
+ g.prefix.length ? this.keys().forEach((n) => {
1666
1799
  localStorage.removeItem(this._getPrefixedKey(n, e));
1667
1800
  }) : localStorage.clear();
1668
1801
  }
1669
1802
  };
1670
- f(p, "prefix", ""), f(p, "_getPrefixedKey", function(e, n) {
1671
- return n = n || {}, n.noPrefix ? e : p.prefix + e;
1803
+ f(g, "prefix", ""), f(g, "_getPrefixedKey", function(e, n) {
1804
+ return n = n || {}, n.noPrefix ? e : g.prefix + e;
1672
1805
  });
1673
- let w = p;
1674
- const Y = {
1806
+ let w = g;
1807
+ const Q = {
1675
1808
  /**
1676
1809
  * 将json对象转换为查询字符串
1677
1810
  *
@@ -1682,8 +1815,8 @@ const Y = {
1682
1815
  var e = [];
1683
1816
  for (var n in t)
1684
1817
  if (t.hasOwnProperty(n)) {
1685
- var s = n, r = t[n];
1686
- e.push(encodeURIComponent(s) + "=" + encodeURIComponent(r));
1818
+ var r = n, s = t[n];
1819
+ e.push(encodeURIComponent(r) + "=" + encodeURIComponent(s));
1687
1820
  }
1688
1821
  var i = e.join("&");
1689
1822
  return i;
@@ -1696,49 +1829,50 @@ const Y = {
1696
1829
  * @returns 返回一个包含解析后参数的对象,其中键为参数名,值为参数值
1697
1830
  */
1698
1831
  query2Json(t = window.location.href, e = !0) {
1699
- const n = /([^&=]+)=([\w\W]*?)(&|$|#)/g, { search: s, hash: r } = new URL(t), i = [s, r];
1700
- let a = {};
1701
- for (let o = 0; o < i.length; o++) {
1702
- const c = i[o];
1832
+ const n = /([^&=]+)=([\w\W]*?)(&|$|#)/g, { search: r, hash: s } = new URL(t), i = [r, s];
1833
+ let o = {};
1834
+ for (let a = 0; a < i.length; a++) {
1835
+ const c = i[a];
1703
1836
  if (c) {
1704
- const h = c.replace(/#|\//g, "").split("?");
1705
- if (h.length > 1)
1706
- for (let u = 1; u < h.length; u++) {
1837
+ const l = c.replace(/#|\//g, "").split("?");
1838
+ if (l.length > 1)
1839
+ for (let u = 1; u < l.length; u++) {
1707
1840
  let d;
1708
- for (; d = n.exec(h[u]); )
1709
- a[d[1]] = e ? decodeURIComponent(d[2]) : d[2];
1841
+ for (; d = n.exec(l[u]); )
1842
+ o[d[1]] = e ? decodeURIComponent(d[2]) : d[2];
1710
1843
  }
1711
1844
  }
1712
1845
  }
1713
- return a;
1846
+ return o;
1714
1847
  }
1715
1848
  };
1716
1849
  export {
1717
- k as ArrayUtil,
1718
- v as AudioPlayer,
1719
- U as BrowserUtil,
1720
- P as CanvasDrawer,
1721
- $ as ColorUtil,
1722
- N as Cookie,
1723
- F as CoordsUtil,
1724
- B as DateUtil,
1725
- q as DomUtil,
1726
- S as ErrorType,
1727
- A as EventDispatcher,
1728
- y as EventType,
1729
- H as FileUtil,
1730
- G as GeoUtil,
1731
- I as GraphicType,
1732
- E as HashMap,
1733
- W as JsonUtil,
1734
- b as LayerType,
1735
- g as MathUtil,
1736
- T as MeasureMode,
1737
- _ as ObjectState,
1738
- K as OptimizeUtil,
1850
+ F as ArrayUtil,
1851
+ N as AudioPlayer,
1852
+ $ as BrowserUtil,
1853
+ k as CanvasDrawer,
1854
+ J as ColorUtil,
1855
+ G as Cookie,
1856
+ B as CoordsUtil,
1857
+ q as DateUtil,
1858
+ W as DomUtil,
1859
+ b as ErrorType,
1860
+ C as EventDispatcher,
1861
+ E as EventType,
1862
+ Y as FileUtil,
1863
+ j as GeoJsonUtil,
1864
+ H as GeoUtil,
1865
+ _ as GraphicType,
1866
+ x as HashMap,
1867
+ v as LayerType,
1868
+ m as MathUtil,
1869
+ P as MeasureMode,
1870
+ L as ObjectState,
1871
+ K as ObjectUtil,
1872
+ z as OptimizeUtil,
1739
1873
  w as StoreUtil,
1740
- j as StringUtil,
1741
- Y as UrlUtil,
1742
- M as Util,
1743
- L as WebSocketClient
1874
+ X as StringUtil,
1875
+ Q as UrlUtil,
1876
+ R as Util,
1877
+ U as WebSocketClient
1744
1878
  };