@zyzgroup/core-web 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/zyzgroup_core_web.iife.js +12 -0
  2. package/dist/zyzgroup_core_web.iife.js.map +1 -0
  3. package/dist/zyzgroup_core_web.js +1232 -0
  4. package/dist/zyzgroup_core_web.js.map +1 -0
  5. package/dist/zyzgroup_core_web.umd.cjs +12 -0
  6. package/dist/zyzgroup_core_web.umd.cjs.map +1 -0
  7. package/package.json +3 -3
  8. package/types/Canvas2Image.d.ts +13 -0
  9. package/types/Canvas2Image.d.ts.map +1 -0
  10. package/types/DOMKeyboardKeyCode.d.ts +11 -0
  11. package/types/DOMKeyboardKeyCode.d.ts.map +1 -0
  12. package/types/canvas.d.ts +2 -0
  13. package/types/canvas.d.ts.map +1 -0
  14. package/types/cookie.d.ts +5 -0
  15. package/types/cookie.d.ts.map +1 -0
  16. package/types/dom.d.ts +20 -0
  17. package/types/dom.d.ts.map +1 -0
  18. package/types/env.d.ts +14 -0
  19. package/types/env.d.ts.map +1 -0
  20. package/types/error.d.ts +1 -0
  21. package/types/error.d.ts.map +1 -0
  22. package/types/fetch.d.ts +12 -0
  23. package/types/fetch.d.ts.map +1 -0
  24. package/types/file.d.ts +23 -0
  25. package/types/file.d.ts.map +1 -0
  26. package/types/image.d.ts +4 -0
  27. package/types/image.d.ts.map +1 -0
  28. package/types/index.d.ts +20 -1
  29. package/types/index.d.ts.map +1 -0
  30. package/types/microTask.d.ts +2 -0
  31. package/types/microTask.d.ts.map +1 -0
  32. package/types/mouse.d.ts +2 -0
  33. package/types/mouse.d.ts.map +1 -0
  34. package/types/onDocumentReady.d.ts +2 -0
  35. package/types/onDocumentReady.d.ts.map +1 -0
  36. package/types/patchDOM.d.ts +2 -0
  37. package/types/patchDOM.d.ts.map +1 -0
  38. package/types/position.d.ts +42 -0
  39. package/types/position.d.ts.map +1 -0
  40. package/types/rem.d.ts +2 -0
  41. package/types/rem.d.ts.map +1 -0
  42. package/types/theme.d.ts +2 -0
  43. package/types/theme.d.ts.map +1 -0
  44. package/types/url.d.ts +7 -0
  45. package/types/url.d.ts.map +1 -0
  46. package/types/websocket.d.ts +16 -0
  47. package/types/websocket.d.ts.map +1 -0
  48. package/dist/zyzgroup-core-web.js +0 -29
  49. package/dist/zyzgroup-core-web.js.map +0 -1
  50. package/dist/zyzgroup-core-web.umd.cjs +0 -2
  51. package/dist/zyzgroup-core-web.umd.cjs.map +0 -1
@@ -0,0 +1,1232 @@
1
+ class I extends Error {
2
+ cause;
3
+ constructor(t, n) {
4
+ super(t, n), this.name = this.constructor.name;
5
+ }
6
+ }
7
+ class F extends I {
8
+ constructor() {
9
+ super("This is not a browser environment");
10
+ }
11
+ }
12
+ class B extends I {
13
+ constructor() {
14
+ super("Cancel select");
15
+ }
16
+ }
17
+ class j extends I {
18
+ accepts;
19
+ constructor(t) {
20
+ super(`Please select files in ${t} format`), this.accepts = t;
21
+ }
22
+ }
23
+ function W(e, t) {
24
+ e.addEventListener(
25
+ "change",
26
+ function() {
27
+ t(e.files);
28
+ },
29
+ !1
30
+ );
31
+ }
32
+ function J(e, t) {
33
+ e.addEventListener(
34
+ "dragover",
35
+ function(n) {
36
+ n.stopPropagation(), n.preventDefault(), n.dataTransfer && (n.dataTransfer.dropEffect = "copy");
37
+ },
38
+ !1
39
+ ), e.addEventListener(
40
+ "drop",
41
+ function(n) {
42
+ n.stopPropagation(), n.preventDefault(), n.dataTransfer && t(n.dataTransfer.files);
43
+ },
44
+ !1
45
+ );
46
+ }
47
+ const Y = (e = ["*"], t) => {
48
+ if (!globalThis.document || !(globalThis.document instanceof Document))
49
+ throw new F();
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) => {
52
+ globalThis.addEventListener(
53
+ "focus",
54
+ () => {
55
+ setTimeout(() => {
56
+ (!n.files || n.files?.length === 0) && l(new B());
57
+ }, 1e3);
58
+ },
59
+ { once: !0 }
60
+ ), n.addEventListener("change", () => {
61
+ if (!n.files || n.files?.length === 0)
62
+ l(new B());
63
+ else {
64
+ const d = Array.from(n.files);
65
+ o(d) && l(new j(e)), r(d);
66
+ }
67
+ });
68
+ });
69
+ function o(r) {
70
+ return !e.includes("*") && r.some((l) => !e.includes(`.${$(l)}`));
71
+ }
72
+ }, Q = (e) => {
73
+ const t = new FileReader();
74
+ return new Promise((n, o) => {
75
+ t.addEventListener(
76
+ "progress",
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}`);
80
+ }
81
+ ), t.addEventListener("load", (r) => {
82
+ n(r.target?.result);
83
+ }), t.addEventListener("error", (r) => {
84
+ o(r);
85
+ }), e(t);
86
+ });
87
+ }, $ = (e) => {
88
+ let t;
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(
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(
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(
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) {
98
+ const t = e.slice(0, 4), n = new FileReader();
99
+ let o;
100
+ return new Promise((r, l) => {
101
+ n.onload = function() {
102
+ const d = n.result;
103
+ switch (new DataView(d).getUint32(0, !1)) {
104
+ case 2303741511:
105
+ o = "image/png";
106
+ break;
107
+ case 1195984440:
108
+ o = "image/gif";
109
+ break;
110
+ case 626017350:
111
+ o = "application/pdf";
112
+ break;
113
+ case 1347093252:
114
+ o = "application/zip";
115
+ break;
116
+ }
117
+ return r(o);
118
+ }, n.readAsArrayBuffer(t);
119
+ });
120
+ }
121
+ function ae(e) {
122
+ const t = new Blob(["(" + e.toString() + ")()"], {
123
+ type: "application/javascript"
124
+ });
125
+ return URL.createObjectURL(t);
126
+ }
127
+ function se(e, t) {
128
+ if (!e.type.startsWith("image/"))
129
+ return;
130
+ const n = document.createElement("img");
131
+ return n.src = URL.createObjectURL(e), n.width = t?.width ?? 60, n.height = t?.height ?? 60, n.onload = function() {
132
+ }, n;
133
+ }
134
+ function ce(e) {
135
+ function t() {
136
+ document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", t));
137
+ }
138
+ typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", t), t());
139
+ }
140
+ function le(e) {
141
+ typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch(
142
+ (t) => setTimeout(() => {
143
+ throw t;
144
+ })
145
+ );
146
+ }
147
+ function z(e, t, n) {
148
+ if (!e) {
149
+ n && t && n.appendChild(t);
150
+ return;
151
+ }
152
+ if (!e.isEqualNode(t)) {
153
+ if (e.nodeName !== t.nodeName) {
154
+ n.replaceChild(t, e);
155
+ return;
156
+ }
157
+ if (e.nodeType === Node.TEXT_NODE) {
158
+ e.textContent !== t.textContent && (e.textContent = t.textContent);
159
+ return;
160
+ }
161
+ for (let o = e.attributes.length - 1; o >= 0; o--) {
162
+ const r = e.attributes[o].name;
163
+ !t.hasAttribute(r) && r !== "open" && e.removeAttribute(r);
164
+ }
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);
168
+ }
169
+ for (let o = 0; o < t.childNodes.length; o++)
170
+ e.childNodes[o] ? z(
171
+ e.childNodes[o],
172
+ t.childNodes[o],
173
+ e
174
+ ) : e.appendChild(t.childNodes[o].cloneNode(!0));
175
+ for (; e.childNodes.length > t.childNodes.length; )
176
+ e.lastChild && e.removeChild(e.lastChild);
177
+ }
178
+ }
179
+ function ue(e, t, n) {
180
+ var o = /* @__PURE__ */ new Date();
181
+ o.setTime(o.getTime() + n * 24 * 60 * 60 * 1e3);
182
+ var r = "expires=" + o.toGMTString();
183
+ document.cookie = e + "=" + t + "; " + r;
184
+ }
185
+ function fe(e) {
186
+ for (var t = e + "=", n = document.cookie.split(";"), o = 0; o < n.length; o++) {
187
+ var r = n[o].trim();
188
+ if (r.indexOf(t) == 0)
189
+ return r.substring(t.length, r.length);
190
+ }
191
+ return "";
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(
194
+ (e) => document.cookie = e.replace(/^ +/, "").replace(/=.*/, `=;expires=${(/* @__PURE__ */ new Date()).toUTCString()};path=/`)
195
+ );
196
+ class y {
197
+ constructor(t) {
198
+ this.waitingResponse = [], this.messageQueue = [], this.url = t, this.createSocket();
199
+ }
200
+ // The reconnection logic is that whenever a message fails to send, the
201
+ // message is added to messageQueue and a reconnection attempt is made.
202
+ // So, when a connection is lost, it is reconnected to after a certain
203
+ // time, but rather only when the user initiates an action that must
204
+ // message (i.e.) interact with the WebSocket
205
+ createSocket() {
206
+ this.socket = new y(this.url), this.socket.onopen = () => {
207
+ this.messageQueue.forEach((t) => this.socket.send(t)), this.messageQueue = [];
208
+ }, this.socket.onclose = (t) => {
209
+ const { code: n, reason: o, wasClean: r } = t;
210
+ console.log(`ws closed : ${n} ${o} ${r}`);
211
+ }, this.socket.onerror = (t) => {
212
+ console.log(`ws error : ${t}`);
213
+ }, this.socket.onmessage = (t) => {
214
+ this.processMessage(t);
215
+ };
216
+ }
217
+ // Creates a new socket and adds any unsent
218
+ // messages onto the message queue
219
+ recreateSocket(t) {
220
+ console.log("Reconnection Attempted"), this.messageQueue.push(t), this.createSocket();
221
+ }
222
+ // Closes a socket, which can take a bit
223
+ // of time (few seconds) since a roundtrip to
224
+ // the server is done
225
+ closeSocket() {
226
+ this.socket.close(), console.log("Socket closed manually.");
227
+ }
228
+ // Exposes a function for users to start a new
229
+ // socket - there is no way to 'reconnect' to
230
+ // a socket, a new websocket needs to be created
231
+ openSocket() {
232
+ this.createSocket(), console.log("Socket opened manually.");
233
+ }
234
+ async sendPayload(t) {
235
+ let n = +/* @__PURE__ */ new Date();
236
+ const o = this.waitingResponse[n] = { sent: n }, r = { ...o, ...t };
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");
242
+ }, 5e3);
243
+ });
244
+ return console.info("Time took", (+/* @__PURE__ */ new Date() - o.sent) / 1e3), l;
245
+ } finally {
246
+ console.log("Exit code ran successfully"), delete this.waitingResponse[n];
247
+ }
248
+ }
249
+ // Message Receiver, we attach this to the onmessage handler
250
+ // Expects message to be in JSON format, otherwise throws
251
+ // an error and simply logs the message to console
252
+ // The message must also have a requestid property (we
253
+ // use lowercase "i" here because Common Lisp's JZON library
254
+ // lowercases property names in JSON messages
255
+ // Test if the requestid passed in has an entry in the waitingResponse
256
+ // queue (data.requestid is the array index and the sendPayload function
257
+ // sets a value in this array for various id indexes to { sent: .. }
258
+ // This index also has a reference to the resolve function for the
259
+ // associated promise for that request id
260
+ // If that is true ('truthy' via if (request)), then resolve the
261
+ // associated promise via request.resolve(data), where data is
262
+ // the value resolved by the promise
263
+ // Otherwise pass a variety of console warnings / logs - the message
264
+ // will not be handled and disappear from the future (i.e. every
265
+ // message needs a requestid set in waitingResponse to be caught
266
+ // We could probably add in a router for server initiated messages
267
+ // to be handled (under the second warning below)
268
+ async processMessage(t) {
269
+ try {
270
+ let n = JSON.parse(t.data);
271
+ if (Object.prototype.hasOwnProperty.call(n, "requestid")) {
272
+ const o = this.waitingResponse[n.requestid];
273
+ o ? o.resolve(n) : console.warn(
274
+ "Got data but found no associated request, already timed out?",
275
+ n
276
+ );
277
+ } else
278
+ console.warn("Got data without request id", n);
279
+ } catch {
280
+ console.log(t.data);
281
+ }
282
+ }
283
+ // Main entry point for calling functions with a simple
284
+ // callback to action to perform on the received data
285
+ // Exists here to reduce boilerplate for the calling function
286
+ async sendRequest(t, n, o = (r) => {
287
+ console.log(r);
288
+ }) {
289
+ this.sendPayload(t).then(
290
+ function(r) {
291
+ n(r);
292
+ },
293
+ function(r) {
294
+ o(r);
295
+ }
296
+ );
297
+ }
298
+ // Second entry point for one direction messages
299
+ // i.e. not expecting any responses. This bypasses
300
+ // the request-response promise functions above
301
+ // Attempts to JSON.stringify the object first,
302
+ // and just sends the object if cannot be made
303
+ // into a JSON string
304
+ sendMessage(t) {
305
+ const n = (() => {
306
+ try {
307
+ return JSON.stringify(t);
308
+ } catch {
309
+ return t;
310
+ }
311
+ })();
312
+ this.socket.readyState === y.OPEN ? this.socket.send(n) : this.recreateSocket(n);
313
+ }
314
+ }
315
+ function x() {
316
+ return document.compatMode == "BackCompat" ? document.body : document.documentElement;
317
+ }
318
+ function D() {
319
+ const e = x();
320
+ return {
321
+ width: e.clientWidth || window.innerWidth,
322
+ height: e.clientHeight || window.innerHeight
323
+ };
324
+ }
325
+ function ge() {
326
+ const e = x(), t = D();
327
+ return {
328
+ width: Math.max(e.scrollWidth, t.width),
329
+ height: Math.max(e.scrollHeight, t.height)
330
+ };
331
+ }
332
+ function pe(e) {
333
+ const t = D(), n = e.getBoundingClientRect();
334
+ return n.bottom > 0 && n.top < t.height && n.right > 0 && n.left < t.width;
335
+ }
336
+ function U() {
337
+ const e = x();
338
+ return {
339
+ scrollLeft: e.scrollLeft,
340
+ scrollTop: e.scrollTop
341
+ };
342
+ }
343
+ function X() {
344
+ const e = x();
345
+ return {
346
+ clientLeft: e.clientLeft,
347
+ clientTop: e.clientTop
348
+ };
349
+ }
350
+ function G(e) {
351
+ let t = e.offsetLeft, n = e.offsetParent;
352
+ for (; n !== null; )
353
+ t += n.offsetLeft, n = n.offsetParent;
354
+ return t;
355
+ }
356
+ function V(e) {
357
+ let t = e.offsetTop, n = e.offsetParent;
358
+ for (; n !== null; )
359
+ t += n.offsetTop, n = n.offsetParent;
360
+ return t;
361
+ }
362
+ function he(e) {
363
+ return {
364
+ x: G(e),
365
+ y: V(e)
366
+ };
367
+ }
368
+ function we(e) {
369
+ const t = e.getBoundingClientRect(), n = U(), o = X();
370
+ return {
371
+ x: t.left + n.scrollLeft - o.clientLeft,
372
+ y: t.top + n.scrollTop - o.clientTop
373
+ };
374
+ }
375
+ function ve(e) {
376
+ const t = e.getBoundingClientRect();
377
+ return {
378
+ x: t.left,
379
+ y: t.top
380
+ };
381
+ }
382
+ function be() {
383
+ const e = x(), t = e.scrollHeight - e.clientHeight;
384
+ return t <= 0 ? 0 : e.scrollTop / t * 100;
385
+ }
386
+ function Ee(e) {
387
+ if (e.pageX && e.pageY)
388
+ return { x: e.pageX, y: e.pageY };
389
+ const t = U(), n = X();
390
+ return {
391
+ x: e.clientX + t.scrollLeft - n.clientLeft,
392
+ y: e.clientY + t.scrollTop - n.clientTop
393
+ };
394
+ }
395
+ function ke(e) {
396
+ return {
397
+ x: e.clientX,
398
+ y: e.clientY
399
+ };
400
+ }
401
+ function Te(e) {
402
+ if (document.implementation.hasFeature("MouseEvents", "2.0"))
403
+ return e.button;
404
+ switch (e.button) {
405
+ case 0:
406
+ case 1:
407
+ case 3:
408
+ case 5:
409
+ case 7:
410
+ return 0;
411
+ case 2:
412
+ case 6:
413
+ return 2;
414
+ case 4:
415
+ return 1;
416
+ }
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() {
444
+ return (navigator.browserLanguage || navigator.language).toLowerCase();
445
+ }
446
+ function ye(e) {
447
+ var t = document.documentElement, n = window.devicePixelRatio;
448
+ t.dataset.dpr = n;
449
+ 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";
452
+ };
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;
457
+ }, window.addEventListener && window.addEventListener(
458
+ "orientationchange" in window ? "orientationchange" : "resize",
459
+ r,
460
+ !1
461
+ );
462
+ }
463
+ require("path");
464
+ require("querystring");
465
+ require("util");
466
+ require("url");
467
+ function Pe(e) {
468
+ return btoa(encodeURIComponent(e)).replaceAll("+", "*").replaceAll("/", "-").replaceAll("=", "");
469
+ }
470
+ function Ce(e) {
471
+ let t = e.replaceAll("*", "+").replaceAll("-", "/"), n = t.length % 4;
472
+ return n && (t = t.padEnd(t.length + (4 - n), "=")), decodeURIComponent(atob(t));
473
+ }
474
+ const _e = (e) => !/^([a-z]+:)?[\\/]/i.test(e);
475
+ function Ae(e) {
476
+ let t;
477
+ try {
478
+ t = new URL(e);
479
+ } catch (n) {
480
+ return console.log(n), !1;
481
+ }
482
+ return t.protocol === "http:" || t.protocol === "https:";
483
+ }
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(
495
+ (t, [n, o]) => Object.assign({}, t, {
496
+ [n]: t[n] ? (Array.isArray(t[n]) ? t[n] : [t[n]]).concat(o) : o
497
+ }),
498
+ {}
499
+ );
500
+ function Re(e) {
501
+ 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
+ }
503
+ class E {
504
+ static getEvent(t) {
505
+ const n = t.keyCode || t.charCode;
506
+ return {
507
+ code: n,
508
+ key: E.codeToKey(n)
509
+ };
510
+ }
511
+ /**
512
+ * keyToCode(keyName: string)
513
+ *
514
+ * @param keyName {string} - The keyName of the key you wish to get the code for.
515
+ *
516
+ * @return {number} - Will be the keycode of the given keyName, or -1 if it does not exist in
517
+ * the set of known keys.
518
+ */
519
+ static keyToCode(t) {
520
+ return Object.prototype.hasOwnProperty.call(
521
+ E.keyToCodes,
522
+ t
523
+ ) ? E.keyToCodes[t] : -1;
524
+ }
525
+ /**
526
+ * codeToKey(code: string)
527
+ *
528
+ * @param code {string} - The key code to lookup the keyname for
529
+ *
530
+ * @reaturn {string} - Will be the keyname of the given Code or '' if it does not
531
+ * exist on the set of known codes.
532
+ */
533
+ static codeToKey(t) {
534
+ return Object.prototype.hasOwnProperty.call(
535
+ E.codeToKeys,
536
+ t.toString()
537
+ ) ? E.codeToKeys[t.toString()] : "";
538
+ }
539
+ static keyToCodes = {
540
+ 0: 48,
541
+ 1: 49,
542
+ 2: 50,
543
+ 3: 51,
544
+ 4: 52,
545
+ 5: 53,
546
+ 6: 54,
547
+ 7: 55,
548
+ 8: 56,
549
+ 9: 57,
550
+ spacebar: 32,
551
+ backspace: 8,
552
+ tab: 9,
553
+ enter: 13,
554
+ shift: 16,
555
+ ctrl: 17,
556
+ alt: 18,
557
+ pause_break: 19,
558
+ caps_lock: 20,
559
+ escape: 27,
560
+ page_up: 33,
561
+ page_down: 34,
562
+ end: 35,
563
+ home: 36,
564
+ left_arrow: 37,
565
+ up_arrow: 38,
566
+ right_arrow: 39,
567
+ down_arrow: 40,
568
+ insert: 45,
569
+ delete: 46,
570
+ a: 65,
571
+ b: 66,
572
+ c: 67,
573
+ d: 68,
574
+ e: 69,
575
+ f: 70,
576
+ g: 71,
577
+ h: 72,
578
+ i: 73,
579
+ j: 74,
580
+ k: 75,
581
+ l: 76,
582
+ m: 77,
583
+ n: 78,
584
+ o: 79,
585
+ p: 80,
586
+ q: 81,
587
+ r: 82,
588
+ s: 83,
589
+ t: 84,
590
+ u: 85,
591
+ v: 86,
592
+ w: 87,
593
+ x: 88,
594
+ y: 89,
595
+ z: 90,
596
+ left_window_key: 91,
597
+ right_window_key: 92,
598
+ select_key: 93,
599
+ numpad_0: 96,
600
+ numpad_1: 97,
601
+ numpad_2: 98,
602
+ numpad_3: 99,
603
+ numpad_4: 100,
604
+ numpad_5: 101,
605
+ numpad_6: 102,
606
+ numpad_7: 103,
607
+ numpad_8: 104,
608
+ numpad_9: 105,
609
+ multiply: 106,
610
+ add: 107,
611
+ subtract: 109,
612
+ decimal_point: 110,
613
+ divide: 111,
614
+ f1: 112,
615
+ f2: 113,
616
+ f3: 114,
617
+ f4: 115,
618
+ f5: 116,
619
+ f6: 117,
620
+ f7: 118,
621
+ f8: 119,
622
+ f9: 120,
623
+ f10: 121,
624
+ f11: 122,
625
+ f12: 123,
626
+ num_lock: 144,
627
+ scroll_lock: 145,
628
+ semi_colon: 186,
629
+ equal_sign: 187,
630
+ comma: 188,
631
+ dash: 189,
632
+ period: 190,
633
+ forward_slash: 191,
634
+ grave_accent: 192,
635
+ open_bracket: 219,
636
+ back_slash: 220,
637
+ close_braket: 221,
638
+ single_quote: 222
639
+ };
640
+ static codeToKeys = {
641
+ 8: "backspace",
642
+ 9: "tab",
643
+ 13: "enter",
644
+ 16: "shift",
645
+ 17: "ctrl",
646
+ 18: "alt",
647
+ 19: "pause_break",
648
+ 20: "caps_lock",
649
+ 27: "escape",
650
+ 32: "spacebar",
651
+ 33: "page_up",
652
+ 34: "page_down",
653
+ 35: "end",
654
+ 36: "home",
655
+ 37: "left_arrow",
656
+ 38: "up_arrow",
657
+ 39: "right_arrow",
658
+ 40: "down_arrow",
659
+ 45: "insert",
660
+ 46: "delete",
661
+ 48: "0",
662
+ 49: "1",
663
+ 50: "2",
664
+ 51: "3",
665
+ 52: "4",
666
+ 53: "5",
667
+ 54: "6",
668
+ 55: "7",
669
+ 56: "8",
670
+ 57: "9",
671
+ 65: "a",
672
+ 66: "b",
673
+ 67: "c",
674
+ 68: "d",
675
+ 69: "e",
676
+ 70: "f",
677
+ 71: "g",
678
+ 72: "h",
679
+ 73: "i",
680
+ 74: "j",
681
+ 75: "k",
682
+ 76: "l",
683
+ 77: "m",
684
+ 78: "n",
685
+ 79: "o",
686
+ 80: "p",
687
+ 81: "q",
688
+ 82: "r",
689
+ 83: "s",
690
+ 84: "t",
691
+ 85: "u",
692
+ 86: "v",
693
+ 87: "w",
694
+ 88: "x",
695
+ 89: "y",
696
+ 90: "z",
697
+ 91: "left_window_key",
698
+ 92: "right_window_key",
699
+ 93: "select_key",
700
+ 96: "numpad_0",
701
+ 97: "numpad_1",
702
+ 98: "numpad_2",
703
+ 99: "numpad_3",
704
+ 100: "numpad_4",
705
+ 101: "numpad_5",
706
+ 102: "numpad_6",
707
+ 103: "numpad_7",
708
+ 104: "numpad_8",
709
+ 105: "numpad_9",
710
+ 106: "multiply",
711
+ 107: "add",
712
+ 109: "subtract",
713
+ 110: "decimal_point",
714
+ 111: "divide",
715
+ 112: "f1",
716
+ 113: "f2",
717
+ 114: "f3",
718
+ 115: "f4",
719
+ 116: "f5",
720
+ 117: "f6",
721
+ 118: "f7",
722
+ 119: "f8",
723
+ 120: "f9",
724
+ 121: "f10",
725
+ 122: "f11",
726
+ 123: "f12",
727
+ 144: "num_lock",
728
+ 145: "scroll_lock",
729
+ 186: "semi_colon",
730
+ 187: "equal_sign",
731
+ 188: "comma",
732
+ 189: "dash",
733
+ 190: "period",
734
+ 191: "forward_slash",
735
+ 192: "grave_accent",
736
+ 219: "open_bracket",
737
+ 220: "back_slash",
738
+ 221: "close_braket",
739
+ 222: "single_quote"
740
+ };
741
+ }
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) {
744
+ let t = document.createElement("script");
745
+ t.type = "text/javascript", t.src = e, t.async = !1, document.body.appendChild(t), t.onload = () => {
746
+ }, t.onerror = () => {
747
+ };
748
+ }
749
+ function je(e) {
750
+ let t = e[0];
751
+ for (let n = 1; n < arguments.length; n++) {
752
+ let o = String(arguments[n]);
753
+ t += o.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), t += e[n];
754
+ }
755
+ return t;
756
+ }
757
+ function $e(e) {
758
+ const t = /<%=(.+?)%>/g, n = /<%([\s\S]+?)%>/g;
759
+ return e = e.replace(t, "`); \n echo( $1 ); \n echo(`").replace(n, "`); \n $1 \n echo(`"), e = "echo(`" + e + "`);", `(function parse(data){
760
+ let output = "";
761
+
762
+ function echo(html){
763
+ output += html;
764
+ }
765
+
766
+ ${e}
767
+
768
+ return output;
769
+ })`;
770
+ }
771
+ function ze(e, t, n) {
772
+ e.addEventListener ? e.addEventListener(t, n, !1) : e.attachEvent ? e.attachEvent("on" + t, n) : e["on" + t] = n;
773
+ }
774
+ function Ge(e, t, n) {
775
+ e.removeEventListener ? e.removeEventListener(t, n, !1) : e.detachEvent ? e.detachEvent("on" + t, n) : e["on" + t] = null;
776
+ }
777
+ function Ve(e) {
778
+ e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0;
779
+ }
780
+ function We(e) {
781
+ e.preventDefault ? e.preventDefault : e.returnValue = !1;
782
+ }
783
+ function Je(e) {
784
+ return e || window.event;
785
+ }
786
+ function Ye(e) {
787
+ return e.target || e.srcElement;
788
+ }
789
+ function Qe(e) {
790
+ return e.relatedTarget ? e.relatedTarget : e.toElement ? e.toElement : e.fromElement ? e.fromElement : null;
791
+ }
792
+ function Ke() {
793
+ return !!(window.File && window.FileReader && window.FileList && window.Blob);
794
+ }
795
+ window.requestAnimationFrame || (window.requestAnimationFrame = function() {
796
+ return window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(e) {
797
+ window.setTimeout(e, 1e3 / 60);
798
+ };
799
+ }());
800
+ const Ze = (e, t) => {
801
+ var n = document.getElementById(e), o = n.getContext("2d");
802
+ (function r() {
803
+ window.requestAnimationFrame(r), o.clearRect(0, 0, n.width, n.height), t(o);
804
+ })();
805
+ };
806
+ function Ne(e) {
807
+ return new Promise(function(t, n) {
808
+ const o = new Image();
809
+ o.onload = function() {
810
+ t(o);
811
+ }, o.onerror = function() {
812
+ n(new Error("Could not load image at " + e));
813
+ }, o.src = e;
814
+ });
815
+ }
816
+ function et() {
817
+ const e = document.getElementsByTagName("img"), t = D().height;
818
+ let n = 0;
819
+ for (let o = n; o < e.length; o++)
820
+ e[o].getBoundingClientRect().top < t && (e[o].src = e[o].getAttribute("data-src"), n = o + 1);
821
+ }
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)
826
+ 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;
828
+ }
829
+ function R(e) {
830
+ var t = {}, n = [], o = [], r = 0;
831
+ for (let u = 0; u < e.length; u++)
832
+ t[e[u]] ? n.push(e[u]) : t[e[u]] = 1;
833
+ for (let u = 0; u < n.length; u++) {
834
+ r = 0;
835
+ for (var l = 0; l < n.length; l++)
836
+ n[u] === n[l] && (r += 1), o[u] = r;
837
+ }
838
+ for (var d = Math.max.apply(null, o), f = 0; f < o.length; f++)
839
+ if (o[f] === d)
840
+ return;
841
+ return n[f];
842
+ }
843
+ const nt = function(e) {
844
+ e || (e = "2d");
845
+ const t = function() {
846
+ const i = document.createElement("canvas"), a = i.getContext(
847
+ e
848
+ ), s = !!a;
849
+ return {
850
+ canvas: s,
851
+ imageData: s && !!a.getImageData,
852
+ dataURL: !!i.toDataURL,
853
+ btoa: !!window.btoa
854
+ };
855
+ }(), 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);
859
+ const p = document.createElement("canvas"), v = p.getContext(
860
+ e
861
+ );
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);
866
+ }
867
+ function l(i, a, s = "name") {
868
+ const c = document.createElement("a");
869
+ c.download = s + "." + a, c.href = i, c.click();
870
+ }
871
+ function d(i) {
872
+ const a = document.createElement("img");
873
+ return a.src = i, a;
874
+ }
875
+ function f(i) {
876
+ return i = i.toLowerCase().replace(/jpg/i, "jpeg"), "image/" + i.match(/png|jpeg|bmp|gif/)?.[0];
877
+ }
878
+ function u(i) {
879
+ if (!window.btoa)
880
+ throw "btoa undefined";
881
+ let a = "";
882
+ if (typeof i == "string")
883
+ a = i;
884
+ else
885
+ for (let s = 0; s < i.length; s++)
886
+ a += String.fromCharCode(i[s]);
887
+ return btoa(a);
888
+ }
889
+ function k(i) {
890
+ const a = e == "2d" ? void 0 : { preserveDrawingBuffer: !0 };
891
+ return i.getContext(e, a);
892
+ }
893
+ function T(i) {
894
+ const a = i.width, s = i.height;
895
+ return k(i).getImageData(0, 0, a, s);
896
+ }
897
+ function h(i, a) {
898
+ return "data:" + a + ";base64," + i;
899
+ }
900
+ const w = function(i) {
901
+ const a = i.width, s = i.height, c = a * s * 3, m = c + 54, p = [
902
+ // WORD bfType -- The file type signature; must be "BM"
903
+ 66,
904
+ 77,
905
+ // DWORD bfSize -- The size, in bytes, of the bitmap file
906
+ m & 255,
907
+ m >> 8 & 255,
908
+ m >> 16 & 255,
909
+ m >> 24 & 255,
910
+ // WORD bfReserved1 -- Reserved; must be zero
911
+ 0,
912
+ 0,
913
+ // WORD bfReserved2 -- Reserved; must be zero
914
+ 0,
915
+ 0,
916
+ // DWORD bfOffBits -- The offset, in bytes, from the beginning of the BITMAPFILEHEADER structure to the bitmap bits.
917
+ 54,
918
+ 0,
919
+ 0,
920
+ 0
921
+ ], v = [
922
+ // DWORD biSize -- The number of bytes required by the structure
923
+ 40,
924
+ 0,
925
+ 0,
926
+ 0,
927
+ // 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
+ s & 255,
934
+ s >> 8 & 255,
935
+ s >> 16 & 255,
936
+ s >> 24 & 255,
937
+ // WORD biPlanes -- The number of planes for the target device. This value must be set to 1
938
+ 1,
939
+ 0,
940
+ // WORD biBitCount -- The number of bits-per-pixel, 24 bits-per-pixel -- the bitmap
941
+ // has a maximum of 2^24 colors (16777216, Truecolor)
942
+ 24,
943
+ 0,
944
+ // DWORD biCompression -- The type of compression, BI_RGB (code 0) -- uncompressed
945
+ 0,
946
+ 0,
947
+ 0,
948
+ 0,
949
+ // 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,
954
+ // LONG biXPelsPerMeter, unused
955
+ 0,
956
+ 0,
957
+ 0,
958
+ 0,
959
+ // LONG biYPelsPerMeter, unused
960
+ 0,
961
+ 0,
962
+ 0,
963
+ 0,
964
+ // DWORD biClrUsed, the number of color indexes of palette, unused
965
+ 0,
966
+ 0,
967
+ 0,
968
+ 0,
969
+ // DWORD biClrImportant, unused
970
+ 0,
971
+ 0,
972
+ 0,
973
+ 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;
979
+ 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]);
985
+ }
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;
993
+ 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);
997
+ } else {
998
+ const v = r(i, c, a, s);
999
+ l(v.replace(c, n), p, m);
1000
+ }
1001
+ }, L = function(i, a, s, c) {
1002
+ 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"));
1006
+ } else {
1007
+ const m = r(i, c, a, s);
1008
+ return d(m);
1009
+ }
1010
+ };
1011
+ return {
1012
+ saveAsImage: g,
1013
+ saveAsPNG: function(i, a, s, c) {
1014
+ return g(i, a, s, "png", c);
1015
+ },
1016
+ saveAsJPEG: function(i, a, s, c) {
1017
+ return g(i, a, s, "jpeg", c);
1018
+ },
1019
+ saveAsGIF: function(i, a, s, c) {
1020
+ return g(i, a, s, "gif", c);
1021
+ },
1022
+ saveAsBMP: function(i, a, s, c) {
1023
+ return g(i, a, s, "bmp", c);
1024
+ },
1025
+ convertToImage: L,
1026
+ convertToPNG: function(i, a, s) {
1027
+ return L(i, a, s, "png");
1028
+ },
1029
+ convertToJPEG: function(i, a, s) {
1030
+ return L(i, a, s, "jpeg");
1031
+ },
1032
+ convertToGIF: function(i, a, s) {
1033
+ return L(i, a, s, "gif");
1034
+ },
1035
+ convertToBMP: function(i, a, s) {
1036
+ return L(i, a, s, "bmp");
1037
+ }
1038
+ };
1039
+ };
1040
+ function ot() {
1041
+ var e = null;
1042
+ if (window.ActiveXObject)
1043
+ for (var t = [
1044
+ "Microsoft.XMLHTTP",
1045
+ "MSXML6.XMLHTTP",
1046
+ "MSXML5.XMLHTTP",
1047
+ "MSXML4.XMLHTTP",
1048
+ "MSXML3.XMLHTTP",
1049
+ "MSXML2.XMLHTTP",
1050
+ "MSXML.XMLHTTP"
1051
+ ], n = 0; n < t.length; n++)
1052
+ try {
1053
+ e = new window.ActiveXObject(t[n]);
1054
+ break;
1055
+ } catch {
1056
+ continue;
1057
+ }
1058
+ else
1059
+ e = new XMLHttpRequest();
1060
+ return e;
1061
+ }
1062
+ function rt(e) {
1063
+ if (e.action) {
1064
+ if (e.method.toLowerCase() === "post")
1065
+ return {
1066
+ url: e.action,
1067
+ data: new FormData(e)
1068
+ };
1069
+ for (var t = "", n = 0; n < e.elements.length; n++) {
1070
+ var o = e.elements[n];
1071
+ if (o.hasAttribute("name")) {
1072
+ var r = o.nodeName.toUpperCase() === "INPUT" ? o.getAttribute("type").toUpperCase() : "TEXT";
1073
+ if (r === "FILE")
1074
+ for (var l = 0; l < o.files.length; t += "&" + escape(o.name) + "=" + escape(o.files[l++].name))
1075
+ ;
1076
+ else
1077
+ (r !== "RADIO" && r !== "CHECKBOX" || o.checked) && (t += "&" + escape(o.name) + "=" + escape(o.value));
1078
+ }
1079
+ }
1080
+ return {
1081
+ url: e.action.replace(
1082
+ /(?:\?.*)?$/,
1083
+ t.replace(/^&/, "?")
1084
+ ),
1085
+ data: null
1086
+ };
1087
+ }
1088
+ }
1089
+ function it(e, t) {
1090
+ return new Promise((n, o) => {
1091
+ var r = new XMLHttpRequest(), l = function() {
1092
+ o("The request for " + e + " is timed out for " + t + ".");
1093
+ }, d = function(f) {
1094
+ r.readyState === 4 && (r.status === 200 ? n(r.response) : o(r.statusText));
1095
+ };
1096
+ r.open("GET", e), r.onload = d, r.timeout = t, r.ontimeout = l, r.upload.addEventListener(
1097
+ "progress",
1098
+ function(f) {
1099
+ if (f.lengthComputable) {
1100
+ const u = Math.round(f.loaded * 100 / f.total);
1101
+ console.log(u + "%");
1102
+ }
1103
+ },
1104
+ !1
1105
+ ), r.upload.addEventListener("load", function(f) {
1106
+ }, !1), r.send(null);
1107
+ });
1108
+ }
1109
+ function at(e, t, n) {
1110
+ return fetch(
1111
+ e,
1112
+ Object.assign(
1113
+ {
1114
+ method: "POST",
1115
+ // GET, POST, PUT, DELETE
1116
+ headers: {
1117
+ // "Content-Type": "application/json"
1118
+ // "Content-Type": "application/x-www-form-urlencoded"
1119
+ },
1120
+ // 请求的头信息,形式为 Headers 对象或 ByteString
1121
+ body: {},
1122
+ // JSON.stringify(data) 请求发送的数据 blob、BufferSource、FormData、URLSearchParams(get 或head 方法中不能包含 body)
1123
+ mode: "",
1124
+ //请求的模式,是否跨域等,如 cors、 no-cors 或 same-origin
1125
+ credentials: "",
1126
+ //cookie 的跨域策略,如 omit、same-origin 或 include
1127
+ cache: "",
1128
+ //请求的 cache 模式: default、no-store、reload、no-cache、 force-cache 或 only-if-cached
1129
+ redirect: "follow",
1130
+ // manual, *follow, error
1131
+ referrerPolicy: "no-referrer"
1132
+ // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
1133
+ },
1134
+ t
1135
+ )
1136
+ ).then((o) => o.json());
1137
+ }
1138
+ function st(e, t) {
1139
+ var n = new XMLHttpRequest();
1140
+ n.open("HEAD", e), n.filepath = e, n.callback = t, n.onload = function() {
1141
+ var o = parseFloat(
1142
+ window.localStorage.getItem("lm_" + this.filepath)
1143
+ ), r = Date.parse(this.getResponseHeader("Last-Modified"));
1144
+ (isNaN(o) || r > o) && (window.localStorage.setItem("lm_" + this.filepath, Date.now()), isFinite(o) && this.callback(r, o));
1145
+ }, n.send();
1146
+ }
1147
+ export {
1148
+ I as BaseError,
1149
+ nt as Canvas2Image,
1150
+ 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
1231
+ };
1232
+ //# sourceMappingURL=zyzgroup_core_web.js.map