@zyzgroup/core-web 0.0.4 → 0.0.6

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,26 +1,26 @@
1
- class I extends Error {
1
+ class B extends Error {
2
2
  cause;
3
3
  constructor(t, n) {
4
4
  super(t, n), this.name = this.constructor.name;
5
5
  }
6
6
  }
7
- class F extends I {
7
+ class G extends B {
8
8
  constructor() {
9
9
  super("This is not a browser environment");
10
10
  }
11
11
  }
12
- class B extends I {
12
+ class F extends B {
13
13
  constructor() {
14
14
  super("Cancel select");
15
15
  }
16
16
  }
17
- class j extends I {
17
+ class W extends B {
18
18
  accepts;
19
19
  constructor(t) {
20
20
  super(`Please select files in ${t} format`), this.accepts = t;
21
21
  }
22
22
  }
23
- function W(e, t) {
23
+ function te(e, t) {
24
24
  e.addEventListener(
25
25
  "change",
26
26
  function() {
@@ -29,7 +29,7 @@ function W(e, t) {
29
29
  !1
30
30
  );
31
31
  }
32
- function J(e, t) {
32
+ function ne(e, t) {
33
33
  e.addEventListener(
34
34
  "dragover",
35
35
  function(n) {
@@ -44,39 +44,39 @@ function J(e, t) {
44
44
  !1
45
45
  );
46
46
  }
47
- const Y = (e = ["*"], t) => {
47
+ const oe = (e = ["*"], t) => {
48
48
  if (!globalThis.document || !(globalThis.document instanceof Document))
49
- throw new F();
49
+ throw new G();
50
50
  const n = globalThis.document.createElement("input");
51
- return n.setAttribute("type", "file"), n.setAttribute("visibility", "hidden"), Array.isArray(e) && e.length > 0 && n.setAttribute("accept", e.join(",")), t && n.setAttribute("multiple", "true"), n.click(), new Promise((r, l) => {
51
+ return n.setAttribute("type", "file"), n.setAttribute("visibility", "hidden"), Array.isArray(e) && e.length > 0 && n.setAttribute("accept", e.join(",")), t && n.setAttribute("multiple", "true"), n.click(), new Promise((r, c) => {
52
52
  globalThis.addEventListener(
53
53
  "focus",
54
54
  () => {
55
55
  setTimeout(() => {
56
- (!n.files || n.files?.length === 0) && l(new B());
56
+ (!n.files || n.files?.length === 0) && c(new F());
57
57
  }, 1e3);
58
58
  },
59
59
  { once: !0 }
60
60
  ), n.addEventListener("change", () => {
61
61
  if (!n.files || n.files?.length === 0)
62
- l(new B());
62
+ c(new F());
63
63
  else {
64
- const d = Array.from(n.files);
65
- o(d) && l(new j(e)), r(d);
64
+ const f = Array.from(n.files);
65
+ o(f) && c(new W(e)), r(f);
66
66
  }
67
67
  });
68
68
  });
69
69
  function o(r) {
70
- return !e.includes("*") && r.some((l) => !e.includes(`.${$(l)}`));
70
+ return !e.includes("*") && r.some((c) => !e.includes(`.${J(c)}`));
71
71
  }
72
- }, Q = (e) => {
72
+ }, re = (e) => {
73
73
  const t = new FileReader();
74
74
  return new Promise((n, o) => {
75
75
  t.addEventListener(
76
76
  "progress",
77
77
  (r) => {
78
- const l = "(" + Math.floor(r.total / 1e3) + " KB)", d = Math.floor(r.loaded / r.total * 100) + "%";
79
- console.log(`Loading size: ${l} progress: ${d}`);
78
+ const c = "(" + Math.floor(r.total / 1e3) + " KB)", f = Math.floor(r.loaded / r.total * 100) + "%";
79
+ console.log(`Loading size: ${c} progress: ${f}`);
80
80
  }
81
81
  ), t.addEventListener("load", (r) => {
82
82
  n(r.target?.result);
@@ -84,23 +84,23 @@ const Y = (e = ["*"], t) => {
84
84
  o(r);
85
85
  }), e(t);
86
86
  });
87
- }, $ = (e) => {
87
+ }, J = (e) => {
88
88
  let t;
89
89
  return e instanceof File ? t = e.name : t = e, t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i)[1] ?? "";
90
- }, K = (e) => /^image\//.test(e.type), Z = (e) => /^video\//.test(e.type), N = (e) => /^audio\//.test(e.type), ee = (e) => /^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/.test(
90
+ }, ie = (e) => /^image\//.test(e.type), se = (e) => /^video\//.test(e.type), ae = (e) => /^audio\//.test(e.type), ce = (e) => /^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/.test(
91
91
  e.type
92
- ), te = (e) => /^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/.test(
92
+ ), le = (e) => /^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/.test(
93
93
  e.type
94
- ), ne = (e) => /^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/.test(
94
+ ), ue = (e) => /^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/.test(
95
95
  e.type
96
- ), oe = (e) => /^application\/json$/.test(e.type), re = (e) => /^(?:application|text)\/(?:xml|xhtml\+xml)$/.test(e.type);
97
- function ie(e) {
96
+ ), de = (e) => /^application\/json$/.test(e.type), fe = (e) => /^(?:application|text)\/(?:xml|xhtml\+xml)$/.test(e.type);
97
+ function me(e) {
98
98
  const t = e.slice(0, 4), n = new FileReader();
99
99
  let o;
100
- return new Promise((r, l) => {
100
+ return new Promise((r, c) => {
101
101
  n.onload = function() {
102
- const d = n.result;
103
- switch (new DataView(d).getUint32(0, !1)) {
102
+ const f = n.result;
103
+ switch (new DataView(f).getUint32(0, !1)) {
104
104
  case 2303741511:
105
105
  o = "image/png";
106
106
  break;
@@ -118,33 +118,33 @@ function ie(e) {
118
118
  }, n.readAsArrayBuffer(t);
119
119
  });
120
120
  }
121
- function ae(e) {
121
+ function ge(e) {
122
122
  const t = new Blob(["(" + e.toString() + ")()"], {
123
123
  type: "application/javascript"
124
124
  });
125
125
  return URL.createObjectURL(t);
126
126
  }
127
- function se(e, t) {
127
+ function pe(e, t) {
128
128
  if (!e.type.startsWith("image/"))
129
129
  return;
130
130
  const n = document.createElement("img");
131
131
  return n.src = URL.createObjectURL(e), n.width = t?.width ?? 60, n.height = t?.height ?? 60, n.onload = function() {
132
132
  }, n;
133
133
  }
134
- function ce(e) {
134
+ function he(e) {
135
135
  function t() {
136
136
  document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", t));
137
137
  }
138
138
  typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", t), t());
139
139
  }
140
- function le(e) {
140
+ function we(e) {
141
141
  typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch(
142
142
  (t) => setTimeout(() => {
143
143
  throw t;
144
144
  })
145
145
  );
146
146
  }
147
- function z(e, t, n) {
147
+ function Y(e, t, n) {
148
148
  if (!e) {
149
149
  n && t && n.appendChild(t);
150
150
  return;
@@ -163,11 +163,11 @@ function z(e, t, n) {
163
163
  !t.hasAttribute(r) && r !== "open" && e.removeAttribute(r);
164
164
  }
165
165
  for (let o = 0; o < t.attributes.length; o++) {
166
- const r = t.attributes[o].name, l = t.attributes[o].value;
167
- e.setAttribute(r, l);
166
+ const r = t.attributes[o].name, c = t.attributes[o].value;
167
+ e.setAttribute(r, c);
168
168
  }
169
169
  for (let o = 0; o < t.childNodes.length; o++)
170
- e.childNodes[o] ? z(
170
+ e.childNodes[o] ? Y(
171
171
  e.childNodes[o],
172
172
  t.childNodes[o],
173
173
  e
@@ -176,13 +176,13 @@ function z(e, t, n) {
176
176
  e.lastChild && e.removeChild(e.lastChild);
177
177
  }
178
178
  }
179
- function ue(e, t, n) {
179
+ function ve(e, t, n) {
180
180
  var o = /* @__PURE__ */ new Date();
181
181
  o.setTime(o.getTime() + n * 24 * 60 * 60 * 1e3);
182
182
  var r = "expires=" + o.toGMTString();
183
183
  document.cookie = e + "=" + t + "; " + r;
184
184
  }
185
- function fe(e) {
185
+ function be(e) {
186
186
  for (var t = e + "=", n = document.cookie.split(";"), o = 0; o < n.length; o++) {
187
187
  var r = n[o].trim();
188
188
  if (r.indexOf(t) == 0)
@@ -190,10 +190,10 @@ function fe(e) {
190
190
  }
191
191
  return "";
192
192
  }
193
- const de = () => document.cookie.split(";").map((e) => e.split("=")).reduce((e, [t, n]) => (e[t.trim().replace('"', "")] = n) && e, {}), me = () => document.cookie.split(";").forEach(
193
+ const Ee = () => document.cookie.split(";").map((e) => e.split("=")).reduce((e, [t, n]) => (e[t.trim().replace('"', "")] = n) && e, {}), Le = () => document.cookie.split(";").forEach(
194
194
  (e) => document.cookie = e.replace(/^ +/, "").replace(/=.*/, `=;expires=${(/* @__PURE__ */ new Date()).toUTCString()};path=/`)
195
195
  );
196
- class y {
196
+ class C {
197
197
  constructor(t) {
198
198
  this.waitingResponse = [], this.messageQueue = [], this.url = t, this.createSocket();
199
199
  }
@@ -203,7 +203,7 @@ class y {
203
203
  // time, but rather only when the user initiates an action that must
204
204
  // message (i.e.) interact with the WebSocket
205
205
  createSocket() {
206
- this.socket = new y(this.url), this.socket.onopen = () => {
206
+ this.socket = new C(this.url), this.socket.onopen = () => {
207
207
  this.messageQueue.forEach((t) => this.socket.send(t)), this.messageQueue = [];
208
208
  }, this.socket.onclose = (t) => {
209
209
  const { code: n, reason: o, wasClean: r } = t;
@@ -235,13 +235,13 @@ class y {
235
235
  let n = +/* @__PURE__ */ new Date();
236
236
  const o = this.waitingResponse[n] = { sent: n }, r = { ...o, ...t };
237
237
  try {
238
- this.socket.readyState === y.OPEN ? this.socket.send(JSON.stringify(r)) : this.recreateSocket(JSON.stringify(r));
239
- const l = await new Promise(function(d, f) {
240
- o.resolve = d, console.log(o), setTimeout(() => {
241
- f("Timeout");
238
+ this.socket.readyState === C.OPEN ? this.socket.send(JSON.stringify(r)) : this.recreateSocket(JSON.stringify(r));
239
+ const c = await new Promise(function(f, d) {
240
+ o.resolve = f, console.log(o), setTimeout(() => {
241
+ d("Timeout");
242
242
  }, 5e3);
243
243
  });
244
- return console.info("Time took", (+/* @__PURE__ */ new Date() - o.sent) / 1e3), l;
244
+ return console.info("Time took", (+/* @__PURE__ */ new Date() - o.sent) / 1e3), c;
245
245
  } finally {
246
246
  console.log("Exit code ran successfully"), delete this.waitingResponse[n];
247
247
  }
@@ -309,96 +309,96 @@ class y {
309
309
  return t;
310
310
  }
311
311
  })();
312
- this.socket.readyState === y.OPEN ? this.socket.send(n) : this.recreateSocket(n);
312
+ this.socket.readyState === C.OPEN ? this.socket.send(n) : this.recreateSocket(n);
313
313
  }
314
314
  }
315
- function x() {
315
+ function k() {
316
316
  return document.compatMode == "BackCompat" ? document.body : document.documentElement;
317
317
  }
318
- function D() {
319
- const e = x();
318
+ function q() {
319
+ const e = k();
320
320
  return {
321
321
  width: e.clientWidth || window.innerWidth,
322
322
  height: e.clientHeight || window.innerHeight
323
323
  };
324
324
  }
325
- function ge() {
326
- const e = x(), t = D();
325
+ function ye() {
326
+ const e = k(), t = q();
327
327
  return {
328
328
  width: Math.max(e.scrollWidth, t.width),
329
329
  height: Math.max(e.scrollHeight, t.height)
330
330
  };
331
331
  }
332
- function pe(e) {
333
- const t = D(), n = e.getBoundingClientRect();
332
+ function Te(e) {
333
+ const t = q(), n = e.getBoundingClientRect();
334
334
  return n.bottom > 0 && n.top < t.height && n.right > 0 && n.left < t.width;
335
335
  }
336
- function U() {
337
- const e = x();
336
+ function $() {
337
+ const e = k();
338
338
  return {
339
339
  scrollLeft: e.scrollLeft,
340
340
  scrollTop: e.scrollTop
341
341
  };
342
342
  }
343
- function X() {
344
- const e = x();
343
+ function V() {
344
+ const e = k();
345
345
  return {
346
346
  clientLeft: e.clientLeft,
347
347
  clientTop: e.clientTop
348
348
  };
349
349
  }
350
- function G(e) {
350
+ function Q(e) {
351
351
  let t = e.offsetLeft, n = e.offsetParent;
352
352
  for (; n !== null; )
353
353
  t += n.offsetLeft, n = n.offsetParent;
354
354
  return t;
355
355
  }
356
- function V(e) {
356
+ function N(e) {
357
357
  let t = e.offsetTop, n = e.offsetParent;
358
358
  for (; n !== null; )
359
359
  t += n.offsetTop, n = n.offsetParent;
360
360
  return t;
361
361
  }
362
- function he(e) {
362
+ function ke(e) {
363
363
  return {
364
- x: G(e),
365
- y: V(e)
364
+ x: Q(e),
365
+ y: N(e)
366
366
  };
367
367
  }
368
- function we(e) {
369
- const t = e.getBoundingClientRect(), n = U(), o = X();
368
+ function Ce(e) {
369
+ const t = e.getBoundingClientRect(), n = $(), o = V();
370
370
  return {
371
371
  x: t.left + n.scrollLeft - o.clientLeft,
372
372
  y: t.top + n.scrollTop - o.clientTop
373
373
  };
374
374
  }
375
- function ve(e) {
375
+ function xe(e) {
376
376
  const t = e.getBoundingClientRect();
377
377
  return {
378
378
  x: t.left,
379
379
  y: t.top
380
380
  };
381
381
  }
382
- function be() {
383
- const e = x(), t = e.scrollHeight - e.clientHeight;
382
+ function Pe() {
383
+ const e = k(), t = e.scrollHeight - e.clientHeight;
384
384
  return t <= 0 ? 0 : e.scrollTop / t * 100;
385
385
  }
386
- function Ee(e) {
386
+ function Se(e) {
387
387
  if (e.pageX && e.pageY)
388
388
  return { x: e.pageX, y: e.pageY };
389
- const t = U(), n = X();
389
+ const t = $(), n = V();
390
390
  return {
391
391
  x: e.clientX + t.scrollLeft - n.clientLeft,
392
392
  y: e.clientY + t.scrollTop - n.clientTop
393
393
  };
394
394
  }
395
- function ke(e) {
395
+ function _e(e) {
396
396
  return {
397
397
  x: e.clientX,
398
398
  y: e.clientY
399
399
  };
400
400
  }
401
- function Te(e) {
401
+ function Ae(e) {
402
402
  if (document.implementation.hasFeature("MouseEvents", "2.0"))
403
403
  return e.button;
404
404
  switch (e.button) {
@@ -415,64 +415,110 @@ function Te(e) {
415
415
  return 1;
416
416
  }
417
417
  }
418
- function Le() {
419
- let e = navigator.userAgent;
420
- return {
421
- trident: e.indexOf("Trident") > -1,
422
- //IE内核
423
- presto: e.indexOf("Presto") > -1,
424
- //opera内核
425
- webKit: e.indexOf("AppleWebKit") > -1,
426
- //苹果、谷歌内核
427
- gecko: e.indexOf("Gecko") > -1 && e.indexOf("KHTML") == -1,
428
- //火狐内核
429
- mobile: !!e.match(/AppleWebKit.*Mobile.*/),
430
- //是否为移动终端
431
- ios: !!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
432
- //ios终端
433
- android: e.indexOf("Android") > -1 || e.indexOf("Linux") > -1,
434
- //android终端或uc浏览器
435
- iPhone: e.indexOf("iPhone") > -1,
436
- //是否为iPhone或者QQHD浏览器
437
- iPad: e.indexOf("iPad") > -1,
438
- //是否iPad
439
- webApp: e.indexOf("Safari") == -1
440
- //是否web应该程序,没有头部与底部
441
- };
442
- }
443
- function xe() {
418
+ const x = () => {
419
+ const e = navigator.userAgent.toLowerCase();
420
+ let t = "Unknown";
421
+ return e.includes("mac") ? t = "macOS" : e.includes("win") ? t = "Windows" : /android/.test(e) ? t = "Android" : /iphone|ipad|ipod/.test(e) ? t = "iOS" : /linux/.test(e) ? t = "Linux" : /bsd/.test(e) && (t = "BSD"), t.toLowerCase();
422
+ }, Me = () => {
423
+ const e = navigator.userAgent;
424
+ let t = "Unknown";
425
+ if (/Windows NT/.test(e)) {
426
+ const n = e.match(/Windows NT (\d+\.\d+)/);
427
+ n && (t = n[1]);
428
+ } else if (/Mac OS X/.test(e)) {
429
+ const n = e.match(/Mac OS X (\d+_\d+)/);
430
+ n && (t = n[1].replace("_", "."));
431
+ } else if (/Android/.test(e)) {
432
+ const n = e.match(/Android (\d+\.\d+)/);
433
+ n && (t = n[1]);
434
+ } else if (/iPhone|iPad|iPod/.test(e)) {
435
+ const n = e.match(/OS (\d+_\d+)/);
436
+ n && (t = n[1].replace("_", "."));
437
+ }
438
+ return t.toLowerCase();
439
+ }, Re = () => {
440
+ const e = navigator.userAgent.toLowerCase();
441
+ let t = "Unknown";
442
+ return /chrome/.test(e) ? t = "Chrome" : /firefox/.test(e) ? t = "Firefox" : /safari/.test(e) ? t = "Safari" : /edge/.test(e) ? t = "Edge" : /msie|trident/.test(e) && (t = "IE"), t.toLowerCase();
443
+ }, Ie = () => {
444
+ const e = navigator.userAgent;
445
+ let t = "Unknown";
446
+ if (/Chrome/.test(e)) {
447
+ const n = e.match(/Chrome\/(\d+\.\d+)/);
448
+ n && (t = n[1]);
449
+ } else if (/Firefox/.test(e)) {
450
+ const n = e.match(/Firefox\/(\d+\.\d+)/);
451
+ n && (t = n[1]);
452
+ } else if (/Safari/.test(e)) {
453
+ const n = e.match(/Version\/(\d+\.\d+)/);
454
+ n && (t = n[1]);
455
+ } else if (/Edge/.test(e)) {
456
+ const n = e.match(/Edge\/(\d+\.\d+)/);
457
+ n && (t = n[1]);
458
+ } else if (/MSIE|Trident/.test(e)) {
459
+ const n = e.match(/(?:MSIE|rv:)(\d+\.\d+)/);
460
+ n && (t = n[1]);
461
+ }
462
+ return t;
463
+ }, De = () => "geolocation" in navigator ? new Promise((e, t) => {
464
+ navigator.geolocation.getCurrentPosition(
465
+ (n) => {
466
+ const o = n.coords.latitude, r = n.coords.longitude;
467
+ e({ latitude: o, longitude: r });
468
+ },
469
+ (n) => {
470
+ t(n);
471
+ }
472
+ );
473
+ }) : Promise.reject("Geolocation is not available.");
474
+ function Oe() {
444
475
  return (navigator.browserLanguage || navigator.language).toLowerCase();
445
476
  }
446
- function ye(e) {
477
+ function Ue() {
478
+ return Intl.DateTimeFormat().resolvedOptions().timeZone.toLowerCase();
479
+ }
480
+ function Z() {
481
+ return x() === "ios";
482
+ }
483
+ function Be() {
484
+ return x() === "ios" | x() === "macos";
485
+ }
486
+ function K() {
487
+ return x() === "android";
488
+ }
489
+ function qe() {
490
+ return Z() || K();
491
+ }
492
+ function Xe() {
493
+ return typeof window == "object" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
494
+ }
495
+ const je = typeof window == "object" && typeof document == "object", Fe = typeof process < "u" && process.versions != null && process.versions.node != null;
496
+ function He(e) {
447
497
  var t = document.documentElement, n = window.devicePixelRatio;
448
498
  t.dataset.dpr = n;
449
499
  var o = 100, r = function() {
450
- var l = Math.min(t.clientWidth, e);
451
- t.dataset.width = l, t.dataset.rem = o = Math.round(100 * (l / e)), t.style.fontSize = o + "px";
500
+ var c = Math.min(t.clientWidth, e);
501
+ t.dataset.width = c, t.dataset.rem = o = Math.round(100 * (c / e)), t.style.fontSize = o + "px";
452
502
  };
453
- r(), window.rem2px = function(l) {
454
- return l = parseFloat(l), l * o;
455
- }, window.px2rem = function(l) {
456
- return l = parseFloat(l), l / o;
503
+ r(), window.rem2px = function(c) {
504
+ return c = parseFloat(c), c * o;
505
+ }, window.px2rem = function(c) {
506
+ return c = parseFloat(c), c / o;
457
507
  }, window.addEventListener && window.addEventListener(
458
508
  "orientationchange" in window ? "orientationchange" : "resize",
459
509
  r,
460
510
  !1
461
511
  );
462
512
  }
463
- require("path");
464
- require("querystring");
465
- require("util");
466
- require("url");
467
- function Pe(e) {
513
+ function $e(e) {
468
514
  return btoa(encodeURIComponent(e)).replaceAll("+", "*").replaceAll("/", "-").replaceAll("=", "");
469
515
  }
470
- function Ce(e) {
516
+ function Ve(e) {
471
517
  let t = e.replaceAll("*", "+").replaceAll("-", "/"), n = t.length % 4;
472
518
  return n && (t = t.padEnd(t.length + (4 - n), "=")), decodeURIComponent(atob(t));
473
519
  }
474
- const _e = (e) => !/^([a-z]+:)?[\\/]/i.test(e);
475
- function Ae(e) {
520
+ const ze = (e) => !/^([a-z]+:)?[\\/]/i.test(e);
521
+ function Ge(e) {
476
522
  let t;
477
523
  try {
478
524
  t = new URL(e);
@@ -481,23 +527,38 @@ function Ae(e) {
481
527
  }
482
528
  return t.protocol === "http:" || t.protocol === "https:";
483
529
  }
484
- function Me() {
485
- let e = location.search;
486
- if (e) {
487
- let t = {};
488
- return e = e.substring(1, e.length), e.split("&").forEach((o) => {
489
- t[o.split("=")[0]] = decodeURIComponent(o.split("=")[1]);
490
- }), t;
491
- } else
492
- return !1;
493
- }
494
- const Se = (e) => Array.from(new URLSearchParams(e)).reduce(
530
+ const We = (e) => Array.from(new URLSearchParams(e)).reduce(
495
531
  (t, [n, o]) => Object.assign({}, t, {
496
532
  [n]: t[n] ? (Array.isArray(t[n]) ? t[n] : [t[n]]).concat(o) : o
497
533
  }),
498
534
  {}
499
535
  );
500
- function Re(e) {
536
+ function Je() {
537
+ let e = {}, t = location.search;
538
+ return t && (t = t.substring(1, t.length), t.split("&").forEach((o) => {
539
+ const r = o.split("=");
540
+ e[r[0]] = decodeURIComponent(r[1]);
541
+ })), e;
542
+ }
543
+ function Ye(e) {
544
+ let t = "";
545
+ new MutationObserver(function(o) {
546
+ window.location.href !== t && (t = window.location.href, console.log(`URL data changed to ${window.location.href}`), e && e(location.href));
547
+ }).observe(document, {
548
+ attributes: !0,
549
+ childList: !0,
550
+ subtree: !0
551
+ });
552
+ }
553
+ function Qe(e) {
554
+ window.addEventListener("hashchange", () => {
555
+ e(location.hash);
556
+ });
557
+ }
558
+ function Ne(e) {
559
+ window.addEventListener("popstate", e);
560
+ }
561
+ function Ze(e) {
501
562
  e = e || localStorage.theme, e || (e = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", localStorage.theme = e), document.documentElement.classList.toggle("dark", e === "dark");
502
563
  }
503
564
  class E {
@@ -739,22 +800,34 @@ class E {
739
800
  222: "single_quote"
740
801
  };
741
802
  }
742
- const Ie = (e) => navigator.clipboard.writeText(e), De = () => window.getSelection().toString(), Oe = (e) => e === document.activeElement, qe = (e) => [].slice.call(e.parentNode.children).filter((t) => t !== e), Be = () => window.scrollTo(0, 0), Ue = () => !document.hidden, Xe = () => history.back(), He = () => history.go(-1);
743
- function Fe(e) {
803
+ const Ke = (e) => navigator.clipboard.writeText(e), et = () => window.getSelection().toString(), tt = (e) => e === document.activeElement, nt = (e) => [].slice.call(e.parentNode.children).filter((t) => t !== e), ot = () => !document.hidden, rt = () => history.back(), it = () => history.go(-1);
804
+ function st(e) {
744
805
  let t = document.createElement("script");
745
806
  t.type = "text/javascript", t.src = e, t.async = !1, document.body.appendChild(t), t.onload = () => {
746
807
  }, t.onerror = () => {
747
808
  };
748
809
  }
749
- function je(e) {
810
+ function at(e) {
750
811
  let t = e[0];
751
812
  for (let n = 1; n < arguments.length; n++) {
752
813
  let o = String(arguments[n]);
753
- t += o.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), t += e[n];
814
+ t += o.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), t += e[n];
754
815
  }
755
816
  return t;
756
817
  }
757
- function $e(e) {
818
+ function ct(e) {
819
+ var t = {
820
+ "&amp;": "&",
821
+ "&lt;": "<",
822
+ "&gt;": ">",
823
+ "&quot;": '"',
824
+ "&#39;": "'"
825
+ };
826
+ for (var n in t)
827
+ Object.hasOwnProperty.call(t, n) && (e = e.replace(new RegExp(n, "g"), t[n]));
828
+ return e;
829
+ }
830
+ function lt(e) {
758
831
  const t = /<%=(.+?)%>/g, n = /<%([\s\S]+?)%>/g;
759
832
  return e = e.replace(t, "`); \n echo( $1 ); \n echo(`").replace(n, "`); \n $1 \n echo(`"), e = "echo(`" + e + "`);", `(function parse(data){
760
833
  let output = "";
@@ -768,42 +841,49 @@ function $e(e) {
768
841
  return output;
769
842
  })`;
770
843
  }
771
- function ze(e, t, n) {
844
+ function ut(e, t, n) {
772
845
  e.addEventListener ? e.addEventListener(t, n, !1) : e.attachEvent ? e.attachEvent("on" + t, n) : e["on" + t] = n;
773
846
  }
774
- function Ge(e, t, n) {
847
+ function dt(e, t, n) {
775
848
  e.removeEventListener ? e.removeEventListener(t, n, !1) : e.detachEvent ? e.detachEvent("on" + t, n) : e["on" + t] = null;
776
849
  }
777
- function Ve(e) {
850
+ function ft(e) {
778
851
  e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0;
779
852
  }
780
- function We(e) {
853
+ function mt(e) {
781
854
  e.preventDefault ? e.preventDefault : e.returnValue = !1;
782
855
  }
783
- function Je(e) {
784
- return e || window.event;
785
- }
786
- function Ye(e) {
856
+ function gt(e) {
787
857
  return e.target || e.srcElement;
788
858
  }
789
- function Qe(e) {
859
+ function pt(e) {
790
860
  return e.relatedTarget ? e.relatedTarget : e.toElement ? e.toElement : e.fromElement ? e.fromElement : null;
791
861
  }
792
- function Ke() {
862
+ function ht() {
793
863
  return !!(window.File && window.FileReader && window.FileList && window.Blob);
794
864
  }
865
+ const wt = (e) => new Promise((t) => {
866
+ const n = Array.from(e.querySelectorAll("link[rel=stylesheet]"));
867
+ let o = e.styleSheets.length ?? 0;
868
+ const r = () => o >= n.length ? (t(), !0) : !1;
869
+ r() || n.forEach((c) => {
870
+ c.onload = () => {
871
+ o += 1, r();
872
+ };
873
+ });
874
+ });
795
875
  window.requestAnimationFrame || (window.requestAnimationFrame = function() {
796
876
  return window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(e) {
797
877
  window.setTimeout(e, 1e3 / 60);
798
878
  };
799
879
  }());
800
- const Ze = (e, t) => {
880
+ const vt = (e, t) => {
801
881
  var n = document.getElementById(e), o = n.getContext("2d");
802
882
  (function r() {
803
883
  window.requestAnimationFrame(r), o.clearRect(0, 0, n.width, n.height), t(o);
804
884
  })();
805
885
  };
806
- function Ne(e) {
886
+ function bt(e) {
807
887
  return new Promise(function(t, n) {
808
888
  const o = new Image();
809
889
  o.onload = function() {
@@ -813,92 +893,92 @@ function Ne(e) {
813
893
  }, o.src = e;
814
894
  });
815
895
  }
816
- function et() {
817
- const e = document.getElementsByTagName("img"), t = D().height;
896
+ function Et() {
897
+ const e = document.getElementsByTagName("img"), t = q().height;
818
898
  let n = 0;
819
899
  for (let o = n; o < e.length; o++)
820
900
  e[o].getBoundingClientRect().top < t && (e[o].src = e[o].getAttribute("data-src"), n = o + 1);
821
901
  }
822
- function tt(e) {
823
- var t = [], n = [], o = [], r, l, d, f, u = 0, k = document.createElement("canvas"), T = k.getContext("2d"), h = document.createElement("image");
824
- h.src = e, k.width = h.width, k.height = h.height, T.drawImage(h, 0, 0);
825
- for (var w = T.getImageData(0, 0, h.width, h.height).data, g = 0; g < w.length; g += 4)
902
+ function Lt(e) {
903
+ var t = [], n = [], o = [], r, c, f, d, u = 0, L = document.createElement("canvas"), y = L.getContext("2d"), h = document.createElement("image");
904
+ h.src = e, L.width = h.width, L.height = h.height, y.drawImage(h, 0, 0);
905
+ for (var w = y.getImageData(0, 0, h.width, h.height).data, g = 0; g < w.length; g += 4)
826
906
  t[u] = w[g], n[u] = w[g + 1], o[u] = w[g + 2], u += 1;
827
- return r = R(t), l = R(n), d = R(o), f = "rgb(" + r + "," + l + "," + d + ")", f;
907
+ return r = D(t), c = D(n), f = D(o), d = "rgb(" + r + "," + c + "," + f + ")", d;
828
908
  }
829
- function R(e) {
909
+ function D(e) {
830
910
  var t = {}, n = [], o = [], r = 0;
831
911
  for (let u = 0; u < e.length; u++)
832
912
  t[e[u]] ? n.push(e[u]) : t[e[u]] = 1;
833
913
  for (let u = 0; u < n.length; u++) {
834
914
  r = 0;
835
- for (var l = 0; l < n.length; l++)
836
- n[u] === n[l] && (r += 1), o[u] = r;
915
+ for (var c = 0; c < n.length; c++)
916
+ n[u] === n[c] && (r += 1), o[u] = r;
837
917
  }
838
- for (var d = Math.max.apply(null, o), f = 0; f < o.length; f++)
839
- if (o[f] === d)
918
+ for (var f = Math.max.apply(null, o), d = 0; d < o.length; d++)
919
+ if (o[d] === f)
840
920
  return;
841
- return n[f];
921
+ return n[d];
842
922
  }
843
- const nt = function(e) {
923
+ const yt = function(e) {
844
924
  e || (e = "2d");
845
925
  const t = function() {
846
- const i = document.createElement("canvas"), a = i.getContext(
926
+ const i = document.createElement("canvas"), s = i.getContext(
847
927
  e
848
- ), s = !!a;
928
+ ), a = !!s;
849
929
  return {
850
- canvas: s,
851
- imageData: s && !!a.getImageData,
930
+ canvas: a,
931
+ imageData: a && !!s.getImageData,
852
932
  dataURL: !!i.toDataURL,
853
933
  btoa: !!window.btoa
854
934
  };
855
935
  }(), n = "image/octet-stream";
856
- function o(i, a, s) {
857
- const c = i.width, m = i.height;
858
- a === void 0 && (a = c), s === void 0 && (s = m);
936
+ function o(i, s, a) {
937
+ const l = i.width, m = i.height;
938
+ s === void 0 && (s = l), a === void 0 && (a = m);
859
939
  const p = document.createElement("canvas"), v = p.getContext(
860
940
  e
861
941
  );
862
- return p.width = a, p.height = s, v.drawImage(i, 0, 0, c, m, 0, 0, a, s), p;
863
- }
864
- function r(i, a, s, c) {
865
- return e == "2d" && (i = o(i, s, c)), i.toDataURL(a);
942
+ return p.width = s, p.height = a, v.drawImage(i, 0, 0, l, m, 0, 0, s, a), p;
866
943
  }
867
- function l(i, a, s = "name") {
868
- const c = document.createElement("a");
869
- c.download = s + "." + a, c.href = i, c.click();
944
+ function r(i, s, a, l) {
945
+ return e == "2d" && (i = o(i, a, l)), i.toDataURL(s);
870
946
  }
871
- function d(i) {
872
- const a = document.createElement("img");
873
- return a.src = i, a;
947
+ function c(i, s, a = "name") {
948
+ const l = document.createElement("a");
949
+ l.download = a + "." + s, l.href = i, l.click();
874
950
  }
875
951
  function f(i) {
952
+ const s = document.createElement("img");
953
+ return s.src = i, s;
954
+ }
955
+ function d(i) {
876
956
  return i = i.toLowerCase().replace(/jpg/i, "jpeg"), "image/" + i.match(/png|jpeg|bmp|gif/)?.[0];
877
957
  }
878
958
  function u(i) {
879
959
  if (!window.btoa)
880
960
  throw "btoa undefined";
881
- let a = "";
961
+ let s = "";
882
962
  if (typeof i == "string")
883
- a = i;
963
+ s = i;
884
964
  else
885
- for (let s = 0; s < i.length; s++)
886
- a += String.fromCharCode(i[s]);
887
- return btoa(a);
965
+ for (let a = 0; a < i.length; a++)
966
+ s += String.fromCharCode(i[a]);
967
+ return btoa(s);
888
968
  }
889
- function k(i) {
890
- const a = e == "2d" ? void 0 : { preserveDrawingBuffer: !0 };
891
- return i.getContext(e, a);
969
+ function L(i) {
970
+ const s = e == "2d" ? void 0 : { preserveDrawingBuffer: !0 };
971
+ return i.getContext(e, s);
892
972
  }
893
- function T(i) {
894
- const a = i.width, s = i.height;
895
- return k(i).getImageData(0, 0, a, s);
973
+ function y(i) {
974
+ const s = i.width, a = i.height;
975
+ return L(i).getImageData(0, 0, s, a);
896
976
  }
897
- function h(i, a) {
898
- return "data:" + a + ";base64," + i;
977
+ function h(i, s) {
978
+ return "data:" + s + ";base64," + i;
899
979
  }
900
980
  const w = function(i) {
901
- const a = i.width, s = i.height, c = a * s * 3, m = c + 54, p = [
981
+ const s = i.width, a = i.height, l = s * a * 3, m = l + 54, p = [
902
982
  // WORD bfType -- The file type signature; must be "BM"
903
983
  66,
904
984
  77,
@@ -925,15 +1005,15 @@ const nt = function(e) {
925
1005
  0,
926
1006
  0,
927
1007
  // LONG biWidth -- The width of the bitmap, in pixels
928
- a & 255,
929
- a >> 8 & 255,
930
- a >> 16 & 255,
931
- a >> 24 & 255,
932
- // LONG biHeight -- The height of the bitmap, in pixels
933
1008
  s & 255,
934
1009
  s >> 8 & 255,
935
1010
  s >> 16 & 255,
936
1011
  s >> 24 & 255,
1012
+ // LONG biHeight -- The height of the bitmap, in pixels
1013
+ a & 255,
1014
+ a >> 8 & 255,
1015
+ a >> 16 & 255,
1016
+ a >> 24 & 255,
937
1017
  // WORD biPlanes -- The number of planes for the target device. This value must be set to 1
938
1018
  1,
939
1019
  0,
@@ -947,10 +1027,10 @@ const nt = function(e) {
947
1027
  0,
948
1028
  0,
949
1029
  // DWORD biSizeImage -- The size, in bytes, of the image. This may be set to zero for BI_RGB bitmaps
950
- c & 255,
951
- c >> 8 & 255,
952
- c >> 16 & 255,
953
- c >> 24 & 255,
1030
+ l & 255,
1031
+ l >> 8 & 255,
1032
+ l >> 16 & 255,
1033
+ l >> 24 & 255,
954
1034
  // LONG biXPelsPerMeter, unused
955
1035
  0,
956
1036
  0,
@@ -971,73 +1051,73 @@ const nt = function(e) {
971
1051
  0,
972
1052
  0,
973
1053
  0
974
- ], P = (4 - a * 3 % 4) % 4, C = i.data;
975
- let O = "";
976
- const H = a << 2;
977
- let q = s;
978
- const _ = String.fromCharCode;
1054
+ ], S = (4 - s * 3 % 4) % 4, _ = i.data;
1055
+ let X = "";
1056
+ const z = s << 2;
1057
+ let j = a;
1058
+ const A = String.fromCharCode;
979
1059
  do {
980
- const A = H * (q - 1);
981
- let M = "";
982
- for (let b = 0; b < a; b++) {
983
- const S = b << 2;
984
- M += _(C[A + S + 2]) + _(C[A + S + 1]) + _(C[A + S]);
1060
+ const M = z * (j - 1);
1061
+ let R = "";
1062
+ for (let b = 0; b < s; b++) {
1063
+ const I = b << 2;
1064
+ R += A(_[M + I + 2]) + A(_[M + I + 1]) + A(_[M + I]);
985
1065
  }
986
- for (let b = 0; b < P; b++)
987
- M += String.fromCharCode(0);
988
- O += M;
989
- } while (--q);
990
- return u(p.concat(v)) + u(O);
991
- }, g = function(i, a, s, c, m) {
992
- const p = c;
1066
+ for (let b = 0; b < S; b++)
1067
+ R += String.fromCharCode(0);
1068
+ X += R;
1069
+ } while (--j);
1070
+ return u(p.concat(v)) + u(X);
1071
+ }, g = function(i, s, a, l, m) {
1072
+ const p = l;
993
1073
  if (t.canvas && t.dataURL)
994
- if (typeof i == "string" && (i = document.getElementById(i)), c === void 0 && (c = "png"), c = f(c), /bmp/.test(c)) {
995
- const v = T(o(i, a, s)), P = w(v);
996
- l(h(P, n), p, m);
1074
+ if (typeof i == "string" && (i = document.getElementById(i)), l === void 0 && (l = "png"), l = d(l), /bmp/.test(l)) {
1075
+ const v = y(o(i, s, a)), S = w(v);
1076
+ c(h(S, n), p, m);
997
1077
  } else {
998
- const v = r(i, c, a, s);
999
- l(v.replace(c, n), p, m);
1078
+ const v = r(i, l, s, a);
1079
+ c(v.replace(l, n), p, m);
1000
1080
  }
1001
- }, L = function(i, a, s, c) {
1081
+ }, T = function(i, s, a, l) {
1002
1082
  if (t.canvas && t.dataURL)
1003
- if (typeof i == "string" && (i = document.getElementById(i)), c === void 0 && (c = "png"), c = f(c), /bmp/.test(c)) {
1004
- const m = T(o(i, a, s)), p = w(m);
1005
- return d(h(p, "image/bmp"));
1083
+ if (typeof i == "string" && (i = document.getElementById(i)), l === void 0 && (l = "png"), l = d(l), /bmp/.test(l)) {
1084
+ const m = y(o(i, s, a)), p = w(m);
1085
+ return f(h(p, "image/bmp"));
1006
1086
  } else {
1007
- const m = r(i, c, a, s);
1008
- return d(m);
1087
+ const m = r(i, l, s, a);
1088
+ return f(m);
1009
1089
  }
1010
1090
  };
1011
1091
  return {
1012
1092
  saveAsImage: g,
1013
- saveAsPNG: function(i, a, s, c) {
1014
- return g(i, a, s, "png", c);
1093
+ saveAsPNG: function(i, s, a, l) {
1094
+ return g(i, s, a, "png", l);
1015
1095
  },
1016
- saveAsJPEG: function(i, a, s, c) {
1017
- return g(i, a, s, "jpeg", c);
1096
+ saveAsJPEG: function(i, s, a, l) {
1097
+ return g(i, s, a, "jpeg", l);
1018
1098
  },
1019
- saveAsGIF: function(i, a, s, c) {
1020
- return g(i, a, s, "gif", c);
1099
+ saveAsGIF: function(i, s, a, l) {
1100
+ return g(i, s, a, "gif", l);
1021
1101
  },
1022
- saveAsBMP: function(i, a, s, c) {
1023
- return g(i, a, s, "bmp", c);
1102
+ saveAsBMP: function(i, s, a, l) {
1103
+ return g(i, s, a, "bmp", l);
1024
1104
  },
1025
- convertToImage: L,
1026
- convertToPNG: function(i, a, s) {
1027
- return L(i, a, s, "png");
1105
+ convertToImage: T,
1106
+ convertToPNG: function(i, s, a) {
1107
+ return T(i, s, a, "png");
1028
1108
  },
1029
- convertToJPEG: function(i, a, s) {
1030
- return L(i, a, s, "jpeg");
1109
+ convertToJPEG: function(i, s, a) {
1110
+ return T(i, s, a, "jpeg");
1031
1111
  },
1032
- convertToGIF: function(i, a, s) {
1033
- return L(i, a, s, "gif");
1112
+ convertToGIF: function(i, s, a) {
1113
+ return T(i, s, a, "gif");
1034
1114
  },
1035
- convertToBMP: function(i, a, s) {
1036
- return L(i, a, s, "bmp");
1115
+ convertToBMP: function(i, s, a) {
1116
+ return T(i, s, a, "bmp");
1037
1117
  }
1038
1118
  };
1039
1119
  };
1040
- function ot() {
1120
+ function Tt() {
1041
1121
  var e = null;
1042
1122
  if (window.ActiveXObject)
1043
1123
  for (var t = [
@@ -1059,7 +1139,7 @@ function ot() {
1059
1139
  e = new XMLHttpRequest();
1060
1140
  return e;
1061
1141
  }
1062
- function rt(e) {
1142
+ function kt(e) {
1063
1143
  if (e.action) {
1064
1144
  if (e.method.toLowerCase() === "post")
1065
1145
  return {
@@ -1071,7 +1151,7 @@ function rt(e) {
1071
1151
  if (o.hasAttribute("name")) {
1072
1152
  var r = o.nodeName.toUpperCase() === "INPUT" ? o.getAttribute("type").toUpperCase() : "TEXT";
1073
1153
  if (r === "FILE")
1074
- for (var l = 0; l < o.files.length; t += "&" + escape(o.name) + "=" + escape(o.files[l++].name))
1154
+ for (var c = 0; c < o.files.length; t += "&" + escape(o.name) + "=" + escape(o.files[c++].name))
1075
1155
  ;
1076
1156
  else
1077
1157
  (r !== "RADIO" && r !== "CHECKBOX" || o.checked) && (t += "&" + escape(o.name) + "=" + escape(o.value));
@@ -1086,27 +1166,27 @@ function rt(e) {
1086
1166
  };
1087
1167
  }
1088
1168
  }
1089
- function it(e, t) {
1169
+ function Ct(e, t) {
1090
1170
  return new Promise((n, o) => {
1091
- var r = new XMLHttpRequest(), l = function() {
1171
+ var r = new XMLHttpRequest(), c = function() {
1092
1172
  o("The request for " + e + " is timed out for " + t + ".");
1093
- }, d = function(f) {
1173
+ }, f = function(d) {
1094
1174
  r.readyState === 4 && (r.status === 200 ? n(r.response) : o(r.statusText));
1095
1175
  };
1096
- r.open("GET", e), r.onload = d, r.timeout = t, r.ontimeout = l, r.upload.addEventListener(
1176
+ r.open("GET", e), r.onload = f, r.timeout = t, r.ontimeout = c, r.upload.addEventListener(
1097
1177
  "progress",
1098
- function(f) {
1099
- if (f.lengthComputable) {
1100
- const u = Math.round(f.loaded * 100 / f.total);
1178
+ function(d) {
1179
+ if (d.lengthComputable) {
1180
+ const u = Math.round(d.loaded * 100 / d.total);
1101
1181
  console.log(u + "%");
1102
1182
  }
1103
1183
  },
1104
1184
  !1
1105
- ), r.upload.addEventListener("load", function(f) {
1185
+ ), r.upload.addEventListener("load", function(d) {
1106
1186
  }, !1), r.send(null);
1107
1187
  });
1108
1188
  }
1109
- function at(e, t, n) {
1189
+ function xt(e, t, n) {
1110
1190
  return fetch(
1111
1191
  e,
1112
1192
  Object.assign(
@@ -1135,7 +1215,7 @@ function at(e, t, n) {
1135
1215
  )
1136
1216
  ).then((o) => o.json());
1137
1217
  }
1138
- function st(e, t) {
1218
+ function Pt(e, t) {
1139
1219
  var n = new XMLHttpRequest();
1140
1220
  n.open("HEAD", e), n.filepath = e, n.callback = t, n.onload = function() {
1141
1221
  var o = parseFloat(
@@ -1144,89 +1224,180 @@ function st(e, t) {
1144
1224
  (isNaN(o) || r > o) && (window.localStorage.setItem("lm_" + this.filepath, Date.now()), isFinite(o) && this.callback(r, o));
1145
1225
  }, n.send();
1146
1226
  }
1227
+ function St(e, t) {
1228
+ if (t)
1229
+ window.localStorage.setItem(
1230
+ e,
1231
+ typeof t == "string" ? t : JSON.stringify(t)
1232
+ );
1233
+ else
1234
+ return window.localStorage.getItem(e);
1235
+ }
1236
+ const _t = (e = { x: 0, y: 0 }) => window.scrollTo(e.x, e.y);
1237
+ function O(e) {
1238
+ try {
1239
+ window.history.scrollRestoration = e;
1240
+ } catch {
1241
+ }
1242
+ }
1243
+ "scrollRestoration" in window.history && (O("manual"), window.addEventListener("beforeunload", () => {
1244
+ O("auto");
1245
+ }), window.addEventListener("load", () => {
1246
+ O("manual");
1247
+ }));
1248
+ let P;
1249
+ const H = /* @__PURE__ */ new WeakMap();
1250
+ function U(e, t) {
1251
+ let n = H.get(e);
1252
+ n || (n = /* @__PURE__ */ new Map(), H.set(e, n));
1253
+ let o = n.get(t);
1254
+ return o || (o = new ee(), n.set(t, o)), o;
1255
+ }
1256
+ class ee {
1257
+ subscribers;
1258
+ constructor() {
1259
+ this.subscribers = /* @__PURE__ */ new Set();
1260
+ }
1261
+ depend() {
1262
+ P && this.subscribers.add(P);
1263
+ }
1264
+ notify() {
1265
+ this.subscribers.forEach((t) => t());
1266
+ }
1267
+ }
1268
+ function At(e) {
1269
+ P = e, e(), P = null;
1270
+ }
1271
+ function Mt(e) {
1272
+ return Object.keys(e).forEach((t) => {
1273
+ let n = e[t];
1274
+ const o = U(e, t);
1275
+ Object.defineProperty(e, t, {
1276
+ get() {
1277
+ return o.depend(), n;
1278
+ },
1279
+ set(r) {
1280
+ r != n && (n = r, o.notify());
1281
+ }
1282
+ });
1283
+ }), e;
1284
+ }
1285
+ function Rt(e) {
1286
+ return new Proxy(e, {
1287
+ get(t, n, o) {
1288
+ return U(e, n).depend(), Reflect.get(t, n, o);
1289
+ },
1290
+ set(t, n, o, r) {
1291
+ const c = U(e, n);
1292
+ return e[n] != o && (e[n] = o, c.notify()), Reflect.set(t, n, o, r);
1293
+ }
1294
+ });
1295
+ }
1147
1296
  export {
1148
- I as BaseError,
1149
- nt as Canvas2Image,
1297
+ B as BaseError,
1298
+ yt as Canvas2Image,
1150
1299
  E as DOMKeyboardKeyCode,
1151
- F as EnvironmentError,
1152
- B as FileSelectCancelError,
1153
- j as IllegalFileError,
1154
- y as WebSocket,
1155
- ze as addEventListener,
1156
- Ae as checkHttpUrl,
1157
- me as clearCookies,
1158
- Ie as copyToClipboard,
1159
- ot as createXMLHttpRequest,
1160
- Ze as drawCanvasInWeb,
1161
- at as fetchUseFetch,
1162
- it as fetchUseXMLHttpRequest,
1163
- se as file2Image,
1164
- ae as fn2ObjectURL,
1165
- xe as getBrowserLanguage,
1166
- Le as getBrowserUserAgent,
1167
- fe as getCookie,
1168
- de as getCookieObject,
1169
- x as getDocumentElement,
1170
- G as getElementLeftInPage,
1171
- we as getElementPositionInPage,
1172
- he as getElementPositionInPage2,
1173
- ve as getElementPositionInViewport,
1174
- V as getElementTopInPage,
1175
- Je as getEvent,
1176
- $ as getFileExtension,
1177
- ie as getFileType,
1178
- rt as getFormElementData,
1179
- tt as getImageColor,
1180
- Te as getMouseButton,
1181
- Ee as getMousePositionInPage,
1182
- ke as getMousePositionInViewport,
1183
- X as getPageClient,
1184
- U as getPageScroll,
1185
- ge as getPageSize,
1186
- be as getPageVerticalScrollPercent,
1187
- Qe as getRelatedTarget,
1188
- Me as getSearchData,
1189
- De as getSelectedText,
1190
- Ye as getTarget,
1191
- Se as getUrlParams,
1192
- D as getViewportSize,
1193
- J as handleDragAndDropFiles,
1194
- W as handleInputFiles,
1195
- st as ifWebFileHasChanged,
1196
- N as isAudio,
1197
- Ke as isBrowserSupportFileAPI,
1198
- pe as isElementInViewport,
1199
- te as isExcelDocument,
1200
- Oe as isFocus,
1201
- K as isImage,
1202
- oe as isJsonDocument,
1203
- ne as isPowerPointDocument,
1204
- Ue as isTabInView,
1205
- _e as isURLRelative,
1206
- Z as isVideo,
1207
- ee as isWordDocument,
1208
- re as isXmlDocument,
1209
- et as lazyloadImages,
1210
- Ne as loadImageAsync,
1211
- Fe as loadScript,
1212
- le as microTask,
1213
- Xe as navigateBack,
1214
- He as navigateBack2,
1215
- ce as onDocumentReady,
1216
- z as patchDOM,
1217
- We as preventDefault,
1218
- Q as readeFile,
1219
- Ge as removeEventListener,
1220
- je as saferHTML,
1221
- Be as scrollToTop,
1222
- Y as selectFile,
1223
- ue as setCookie,
1224
- ye as setRem,
1225
- Re as setTheme,
1226
- qe as siblings,
1227
- Ve as stopPropagation,
1228
- $e as templateCompile,
1229
- Ce as urlsafe_b64decode,
1230
- Pe as urlsafe_b64encode
1300
+ ee as Dep,
1301
+ G as EnvironmentError,
1302
+ F as FileSelectCancelError,
1303
+ W as IllegalFileError,
1304
+ C as WebSocket,
1305
+ ut as addEventListener,
1306
+ Le as clearCookies,
1307
+ Ke as copyToClipboard,
1308
+ Tt as createXMLHttpRequest,
1309
+ vt as drawCanvasInWeb,
1310
+ xt as fetchUseFetch,
1311
+ Ct as fetchUseXMLHttpRequest,
1312
+ pe as file2Image,
1313
+ ge as fn2ObjectURL,
1314
+ Re as getBrowserClient,
1315
+ Ie as getBrowserClientVersion,
1316
+ Oe as getBrowserLanguage,
1317
+ be as getCookie,
1318
+ Ee as getCookieObject,
1319
+ k as getDocumentElement,
1320
+ Q as getElementLeftInPage,
1321
+ Ce as getElementPositionInPage,
1322
+ ke as getElementPositionInPage2,
1323
+ xe as getElementPositionInViewport,
1324
+ N as getElementTopInPage,
1325
+ J as getFileExtension,
1326
+ me as getFileType,
1327
+ kt as getFormElementData,
1328
+ Lt as getImageColor,
1329
+ Ae as getMouseButton,
1330
+ Se as getMousePositionInPage,
1331
+ _e as getMousePositionInViewport,
1332
+ x as getOperatingSystem,
1333
+ Me as getOperatingSystemVersion,
1334
+ V as getPageClient,
1335
+ $ as getPageScroll,
1336
+ ye as getPageSize,
1337
+ Pe as getPageVerticalScrollPercent,
1338
+ pt as getRelatedTarget,
1339
+ et as getSelectedText,
1340
+ gt as getTarget,
1341
+ Ue as getTimeZone,
1342
+ We as getUrlParams,
1343
+ Je as getUrlParams2,
1344
+ De as getUserGeolocationPromise,
1345
+ q as getViewportSize,
1346
+ ne as handleDragAndDropFiles,
1347
+ Qe as handleHashChange,
1348
+ Ne as handleHistoryChange,
1349
+ te as handleInputFiles,
1350
+ Ye as handleURLChange,
1351
+ ct as htmlDecode,
1352
+ at as htmlEncode,
1353
+ Pt as ifWebFileHasChanged,
1354
+ K as isAndroid,
1355
+ Be as isAppleDevice,
1356
+ ae as isAudio,
1357
+ je as isBrowser,
1358
+ ht as isBrowserSupportFileAPI,
1359
+ Xe as isDarkMode,
1360
+ Te as isElementInViewport,
1361
+ le as isExcelDocument,
1362
+ tt as isFocus,
1363
+ Z as isIOS,
1364
+ ie as isImage,
1365
+ de as isJsonDocument,
1366
+ qe as isMobile,
1367
+ Fe as isNode,
1368
+ ue as isPowerPointDocument,
1369
+ ot as isTabInView,
1370
+ Ge as isURL,
1371
+ ze as isURLRelative,
1372
+ se as isVideo,
1373
+ ce as isWordDocument,
1374
+ fe as isXmlDocument,
1375
+ Et as lazyloadImages,
1376
+ bt as loadImageAsync,
1377
+ st as loadScript,
1378
+ St as localstorage,
1379
+ we as microTask,
1380
+ rt as navigateBack,
1381
+ it as navigateBack2,
1382
+ he as onDocumentReady,
1383
+ Y as patchDOM,
1384
+ mt as preventDefault,
1385
+ Mt as reactiveVue2,
1386
+ Rt as reactiveVue3,
1387
+ re as readeFile,
1388
+ dt as removeEventListener,
1389
+ _t as scrollTo,
1390
+ oe as selectFile,
1391
+ ve as setCookie,
1392
+ He as setRem,
1393
+ O as setScrollRestoration,
1394
+ Ze as setTheme,
1395
+ nt as siblings,
1396
+ ft as stopPropagation,
1397
+ lt as templateCompile,
1398
+ Ve as urlsafe_b64decode,
1399
+ $e as urlsafe_b64encode,
1400
+ wt as waitForStyleSheetsLoaded,
1401
+ At as watchEffect
1231
1402
  };
1232
1403
  //# sourceMappingURL=zyzgroup_core_web.js.map