@dxtmisha/functional-basic 1.11.0 → 1.11.1

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.
package/dist/library.js CHANGED
@@ -32,7 +32,7 @@ function i(e) {
32
32
  //#endregion
33
33
  //#region src/functions/toString.ts
34
34
  function a(e) {
35
- return String(e == null ? "" : e);
35
+ return String(e ?? "");
36
36
  }
37
37
  //#endregion
38
38
  //#region src/functions/getRequestString.ts
@@ -120,90 +120,54 @@ function g(e) {
120
120
  }
121
121
  //#endregion
122
122
  //#region src/functions/toNumber.ts
123
- var _ = /[^-+\d., ]+/g, v = /( [0-9]{3}[ ,.]|[0-9] [0-9])/, te = / /g, y = /,/g, ne = /,[0-9]{3}[,.]/, re = /[.][0-9]{3}[,.]/, ie = /[.]/g;
124
- function b(e) {
123
+ var _ = /[^-+\d., ]+/g, v = /( [0-9]{3}[ ,.]|[0-9] [0-9])/, y = / /g, b = /,/g, te = /,[0-9]{3}[,.]/, ne = /[.][0-9]{3}[,.]/, re = /[.]/g;
124
+ function x(e) {
125
125
  if (typeof e == "number") return Number.isFinite(e) && e || 0;
126
126
  if (l(e) && d(e)) {
127
127
  let t = e.replace(_, "");
128
- return t = v.test(t) ? t.replace(te, "").replace(y, ".") : ne.test(t) ? t.replace(y, "") : re.test(t) ? t.replace(ie, "").replace(y, ".") : t.replace(y, "."), parseFloat(t) || 0;
128
+ return t = v.test(t) ? t.replace(y, "").replace(b, ".") : te.test(t) ? t.replace(b, "") : ne.test(t) ? t.replace(re, "").replace(b, ".") : t.replace(b, "."), parseFloat(t) || 0;
129
129
  }
130
130
  return 0;
131
131
  }
132
132
  //#endregion
133
133
  //#region src/functions/isSelected.ts
134
- function x(e, t) {
135
- return c(e) ? !1 : Array.isArray(t) ? t.includes(e) : g(e) && g(t) ? b(e) === b(t) : e === t;
134
+ function S(e, t) {
135
+ return c(e) ? !1 : Array.isArray(t) ? t.includes(e) : g(e) && g(t) ? x(e) === x(t) : e === t;
136
136
  }
137
137
  //#endregion
138
138
  //#region src/functions/anyToString.ts
139
- function S(e, n = !0, r = !0) {
140
- var a;
139
+ function C(e, n = !0, r = !0) {
141
140
  if (d(e)) return r ? e.trim() : e;
142
141
  if (c(e)) return "";
143
142
  if (i(e) && !e.some((e) => t(e)) && n) return e.join(",");
144
143
  if (t(e)) try {
145
144
  return JSON.stringify(e);
146
- } catch (t) {
145
+ } catch {
147
146
  return String(e);
148
147
  }
149
- return e === !0 ? "1" : e === !1 ? "0" : (a = e == null ? void 0 : e.toString()) == null ? "" : a;
148
+ return e === !0 ? "1" : e === !1 ? "0" : e?.toString() ?? "";
150
149
  }
151
150
  //#endregion
152
151
  //#region src/functions/isDomData.ts
153
- function ae() {
152
+ function ie() {
154
153
  return s() && location.href.startsWith("data:");
155
154
  }
156
155
  //#endregion
157
156
  //#region src/functions/strSplit.ts
158
- function oe(e, t, n) {
159
- let r = S(e);
157
+ function ae(e, t, n) {
158
+ let r = C(e);
160
159
  if (!n || n <= 0) return r.split(t);
161
160
  let i = r.split(t, n), a = r.split(t);
162
161
  return i.length === a.length ? i : (i.pop(), [...i, a.slice(n - 1).join(t)]);
163
162
  }
164
163
  //#endregion
165
- //#region \0@oxc-project+runtime@0.147.0/helpers/esm/typeof.js
166
- function C(e) {
167
- "@babel/helpers - typeof";
168
- return C = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
169
- return typeof e;
170
- } : function(e) {
171
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
172
- }, C(e);
173
- }
174
- //#endregion
175
- //#region \0@oxc-project+runtime@0.147.0/helpers/esm/toPrimitive.js
176
- function se(e, t) {
177
- if (C(e) != "object" || !e) return e;
178
- var n = e[Symbol.toPrimitive];
179
- if (n !== void 0) {
180
- var r = n.call(e, t || "default");
181
- if (C(r) != "object") return r;
182
- throw TypeError("@@toPrimitive must return a primitive value.");
183
- }
184
- return (t === "string" ? String : Number)(e);
185
- }
186
- //#endregion
187
- //#region \0@oxc-project+runtime@0.147.0/helpers/esm/toPropertyKey.js
188
- function ce(e) {
189
- var t = se(e, "string");
190
- return C(t) == "symbol" ? t : t + "";
191
- }
192
- //#endregion
193
- //#region \0@oxc-project+runtime@0.147.0/helpers/esm/defineProperty.js
194
- function w(e, t, n) {
195
- return (t = ce(t)) in e ? Object.defineProperty(e, t, {
196
- value: n,
197
- enumerable: !0,
198
- configurable: !0,
199
- writable: !0
200
- }) : e[t] = n, e;
201
- }
202
- //#endregion
203
164
  //#region src/classes/ErrorCenterHandler.ts
204
- var le = class {
165
+ var oe = class {
166
+ handlers = [];
167
+ callbacks = [];
168
+ isConsole = !0;
205
169
  constructor(e, t = !0) {
206
- w(this, "handlers", []), w(this, "callbacks", []), w(this, "isConsole", !0), this.isConsole = t, e && this.addList(e);
170
+ this.isConsole = t, e && this.addList(e);
207
171
  }
208
172
  has(e) {
209
173
  return !!this.get(e);
@@ -228,9 +192,8 @@ var le = class {
228
192
  return this.isConsole = e, this;
229
193
  }
230
194
  on(e) {
231
- var t;
232
- let n = (t = this.get(e.group)) == null ? this.get(void 0) : t;
233
- return n && n.handlers.forEach((t) => t(e)), this.callbacks.forEach((t) => t(e)), this.toConsole(e), this;
195
+ let t = this.get(e.group) ?? this.get(void 0);
196
+ return t && t.handlers.forEach((t) => t(e)), this.callbacks.forEach((t) => t(e)), this.toConsole(e), this;
234
197
  }
235
198
  toConsole(e) {
236
199
  if (m(this.isConsole, e) && (console.error(`Error Center: ${e.code}`), console.error("Error Center/message: ", e.message), console.error("Error Center/details: ", e.details), !s())) {
@@ -239,9 +202,11 @@ var le = class {
239
202
  }
240
203
  return this;
241
204
  }
242
- }, ue = class {
243
- constructor(e, t = new le()) {
244
- w(this, "handler", void 0), w(this, "causes", []), this.handler = t, e && this.addList(e);
205
+ }, se = class {
206
+ handler;
207
+ causes = [];
208
+ constructor(e, t = new oe()) {
209
+ this.handler = t, e && this.addList(e);
245
210
  }
246
211
  has(e, t) {
247
212
  return !!this.get(e, t);
@@ -272,19 +237,15 @@ var le = class {
272
237
  }
273
238
  assign(e) {
274
239
  let t = this.get(e.code, e.group);
275
- if (t) {
276
- var n, r;
277
- return ((n = t.priority) == null ? 500 : n) > ((r = e.priority) == null ? 500 : r) ? {
278
- ...e,
279
- ...t
280
- } : {
281
- ...t,
282
- ...e
283
- };
284
- }
285
- return e;
240
+ return t ? (t.priority ?? 500) > (e.priority ?? 500) ? {
241
+ ...e,
242
+ ...t
243
+ } : {
244
+ ...t,
245
+ ...e
246
+ } : e;
286
247
  }
287
- }, de = [
248
+ }, ce = [
288
249
  {
289
250
  group: "api",
290
251
  code: "cacheClear",
@@ -435,9 +396,10 @@ var le = class {
435
396
  label: "Translate Error",
436
397
  message: "An error occurred while loading translations."
437
398
  }
438
- ], T = class {
399
+ ], w = class {
400
+ static item;
439
401
  static getItem() {
440
- return this.item;
402
+ return this.item ||= new se(ce), this.item;
441
403
  }
442
404
  static has(e, t) {
443
405
  return this.getItem().has(e, t);
@@ -467,63 +429,57 @@ var le = class {
467
429
  this.getItem().on(e);
468
430
  }
469
431
  };
470
- w(T, "item", new ue(de));
471
432
  //#endregion
472
433
  //#region src/functions/transformation.ts
473
- function fe(e, t = !1) {
434
+ function T(e, t = !1) {
474
435
  if (typeof e == "string") {
475
- let r = e.trim();
476
- switch (r) {
436
+ let n = e.trim();
437
+ switch (n) {
477
438
  case "undefined": return;
478
439
  case "null": return null;
479
440
  case "true": return !0;
480
441
  case "false": return !1;
481
- default:
482
- var n;
483
- if (/^[{[]/.exec(r)) try {
484
- return JSON.parse(r);
485
- } catch (e) {
486
- T.on({
487
- group: "transformation",
488
- code: "error",
489
- details: e
490
- });
491
- }
492
- else if (/^-?[0-9]+\.[0-9]+$/.exec(r)) return parseFloat(r);
493
- else if (/^-?[0-9]+$/.exec(r)) return parseInt(r, 10);
494
- else if (t && s() && typeof ((n = window) == null ? void 0 : n[r]) == "function") return window[r];
442
+ default: if (/^[{[]/.exec(n)) try {
443
+ return JSON.parse(n);
444
+ } catch (e) {
445
+ w.on({
446
+ group: "transformation",
447
+ code: "error",
448
+ details: e
449
+ });
450
+ }
451
+ else if (/^-?[0-9]+\.[0-9]+$/.exec(n)) return parseFloat(n);
452
+ else if (/^-?[0-9]+$/.exec(n)) return parseInt(n, 10);
453
+ else if (t && s() && typeof window?.[n] == "function") return window[n];
495
454
  }
496
455
  }
497
456
  return e;
498
457
  }
499
458
  //#endregion
500
459
  //#region src/functions/encodeLiteAttribute.ts
501
- var pe = {
460
+ var le = {
502
461
  "<": "&lt;",
503
462
  ">": "&gt;",
504
463
  "&": "&amp;"
505
464
  };
506
- function me(e) {
507
- return String(e).replace(/[<>&]/g, (e) => {
508
- var t;
509
- return (t = pe == null ? void 0 : pe[e]) == null ? e : t;
510
- });
465
+ function ue(e) {
466
+ return String(e).replace(/[<>&]/g, (e) => le?.[e] ?? e);
511
467
  }
512
468
  //#endregion
513
469
  //#region src/functions/getElementSafeScript.ts
514
- function he(e, t) {
470
+ function de(e, t) {
515
471
  return `<script id="${e.replace(/"/g, "&quot;")}" type="application/json">${JSON.stringify(t).replace(/<\/(script)>/gi, "<\\/$1>")}<\/script>`;
516
472
  }
517
473
  //#endregion
518
474
  //#region src/functions/getHydrationData.ts
519
- function ge(e, t, n = !0) {
475
+ function fe(e, t, n = !0) {
520
476
  if (typeof document < "u") {
521
477
  let t = document.getElementById(e);
522
478
  if (t) try {
523
479
  let e = JSON.parse(t.textContent || "");
524
480
  return n && t.remove(), e;
525
481
  } catch (t) {
526
- T.on({
482
+ w.on({
527
483
  group: "hydration",
528
484
  code: "error",
529
485
  details: {
@@ -537,9 +493,12 @@ function ge(e, t, n = !0) {
537
493
  }
538
494
  //#endregion
539
495
  //#region src/classes/ServerStorage.ts
540
- var _e = "__ui:server-storage__", ve = "__ui:server:storage:id__", E = class {
496
+ var pe = "__ui:server-storage__", me = "__ui:server:storage:id__", E = class {
497
+ static storage;
498
+ static listener;
499
+ static hideError;
541
500
  static init(e) {
542
- return this.listener || (this.listener = e), this;
501
+ return this.listener ||= e, this;
543
502
  }
544
503
  static reset() {
545
504
  this.storage = void 0, this.listener = void 0;
@@ -567,25 +526,20 @@ var _e = "__ui:server-storage__", ve = "__ui:server:storage:id__", E = class {
567
526
  e in t && delete t[e];
568
527
  }
569
528
  static toString() {
570
- return he(ve, this.getDataForHydration());
529
+ return de(me, this.getDataForHydration());
571
530
  }
572
531
  static getStorage(e = !0, t) {
573
- var n;
574
532
  if (s()) return this.getStorageDom();
575
- let r = (n = this.listener) == null ? void 0 : n.call(this);
576
- if (!r) {
577
- var i;
578
- return this.hideError || T.on({
579
- group: "storage",
580
- code: "context",
581
- details: { status: t }
582
- }), e && !this.storage && (this.storage = {}), (i = this.storage) == null ? {} : i;
583
- }
584
- return _e in r || (r[_e] = {}), r[_e];
533
+ let n = this.listener?.();
534
+ return n ? (pe in n || (n[pe] = {}), n[pe]) : (this.hideError || w.on({
535
+ group: "storage",
536
+ code: "context",
537
+ details: { status: t }
538
+ }), e && !this.storage && (this.storage = {}), this.storage ?? {});
585
539
  }
586
540
  static getStorageDom() {
587
541
  if (!this.storage) {
588
- let e = ge(ve, {});
542
+ let e = fe(me, {});
589
543
  this.storage = {}, r(e, (e, t) => {
590
544
  this.storage[t] = {
591
545
  value: e,
@@ -601,17 +555,18 @@ var _e = "__ui:server-storage__", ve = "__ui:server:storage:id__", E = class {
601
555
  e.hydration && (t[n] = e.value);
602
556
  }), t;
603
557
  }
604
- };
605
- w(E, "storage", void 0), w(E, "listener", void 0), w(E, "hideError", void 0);
606
- //#endregion
607
- //#region src/classes/DataStorage.ts
608
- var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D = class {
558
+ }, he = "ui-storage", ge = () => E.get("__ui:data-storage__", () => ({})), D = class {
559
+ name;
560
+ isSession;
561
+ errorCenter;
609
562
  static setPrefix(e) {
610
- ye = e;
563
+ he = e;
611
564
  }
612
- constructor(e, t = !1, n = T.getItem()) {
613
- w(this, "name", void 0), w(this, "isSession", void 0), w(this, "errorCenter", void 0), w(this, "value", void 0), w(this, "age", void 0), this.name = e, this.isSession = t, this.errorCenter = n;
614
- let r = `${t ? "session" : "storage"}#${e}`, i = be();
565
+ value;
566
+ age;
567
+ constructor(e, t = !1, n = w.getItem()) {
568
+ this.name = e, this.isSession = t, this.errorCenter = n;
569
+ let r = `${t ? "session" : "storage"}#${e}`, i = ge();
615
570
  if (r in i) return i[r];
616
571
  this.make(), i[r] = this;
617
572
  }
@@ -620,19 +575,13 @@ var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D =
620
575
  if (e !== void 0) return this.set(e);
621
576
  }
622
577
  set(e) {
623
- if (this.value = m(e), this.age = Date.now(), this.value === void 0) this.remove();
624
- else {
625
- var t;
626
- (t = this.getMethod()) == null || t.setItem(this.getIndex(), me(JSON.stringify({
627
- value: this.value,
628
- age: this.age
629
- })));
630
- }
631
- return this.value;
578
+ return this.value = m(e), this.age = Date.now(), this.value === void 0 ? this.remove() : this.getMethod()?.setItem(this.getIndex(), ue(JSON.stringify({
579
+ value: this.value,
580
+ age: this.age
581
+ }))), this.value;
632
582
  }
633
583
  remove() {
634
- var e;
635
- return this.value = void 0, this.age = void 0, (e = this.getMethod()) == null || e.removeItem(this.getIndex()), this;
584
+ return this.value = void 0, this.age = void 0, this.getMethod()?.removeItem(this.getIndex()), this;
636
585
  }
637
586
  update() {
638
587
  return this.make(), this;
@@ -641,20 +590,18 @@ var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D =
641
590
  return c(e) || this.age && this.age + e * 1e3 >= Date.now();
642
591
  }
643
592
  getMethod() {
644
- if (s() && !ae()) {
645
- var e, t;
646
- let n = this.isSession ? (e = window) == null ? void 0 : e.sessionStorage : (t = window) == null ? void 0 : t.localStorage;
647
- if (n) return n;
593
+ if (s() && !ie()) {
594
+ let e = this.isSession ? window?.sessionStorage : window?.localStorage;
595
+ if (e) return e;
648
596
  }
649
597
  }
650
598
  getIndex() {
651
- return `${ye}__${this.name}`;
599
+ return `${he}__${this.name}`;
652
600
  }
653
601
  getValue() {
654
- var e, t;
655
- let n = (e = this.getMethod()) == null || (t = e.getItem) == null ? void 0 : t.call(e, this.getIndex());
656
- if (n) try {
657
- return JSON.parse(n);
602
+ let e = this.getMethod()?.getItem?.(this.getIndex());
603
+ if (e) try {
604
+ return JSON.parse(e);
658
605
  } catch (e) {
659
606
  this.errorCenter.on({
660
607
  group: "storage",
@@ -667,20 +614,17 @@ var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D =
667
614
  let e = this.getValue();
668
615
  return e ? (this.value = e.value, this.age = e.age) : (this.value = void 0, this.age = void 0), this;
669
616
  }
670
- }, xe = "__ui:cookie-block__", Se = class {
671
- constructor() {
672
- w(this, "storage", new D(xe));
673
- }
617
+ }, _e = "__ui:cookie-block__", ve = class {
618
+ storage = new D(_e);
674
619
  get() {
675
- var e;
676
- return (e = this.storage.get()) != null && e;
620
+ return this.storage.get() ?? !1;
677
621
  }
678
622
  set(e) {
679
623
  this.storage.set(e);
680
624
  }
681
- }, Ce = class {
625
+ }, ye = class {
682
626
  static getItem() {
683
- return E.get("__ui:cookie-block__", () => new Se());
627
+ return E.get("__ui:cookie-block__", () => new ve());
684
628
  }
685
629
  static get() {
686
630
  return this.getItem().get();
@@ -688,7 +632,10 @@ var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D =
688
632
  static set(e) {
689
633
  this.getItem().set(e);
690
634
  }
691
- }, we = "__ui:cookie-storage__", O = class {
635
+ }, be = "__ui:cookie-storage__", xe = class {
636
+ static getListener;
637
+ static getListenerRaw;
638
+ static setListener;
692
639
  static init(e, t, n) {
693
640
  this.getListener = e, this.getListenerRaw = t, this.setListener = n;
694
641
  }
@@ -696,62 +643,60 @@ var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D =
696
643
  this.getListener = void 0, this.getListenerRaw = void 0, this.setListener = void 0;
697
644
  }
698
645
  static get(e, t) {
699
- var n, r;
700
- let i = (n = (r = this.getListener) == null ? void 0 : r.call(this, e)) == null ? this.initItems()[e] : n;
701
- return i === void 0 && t !== void 0 ? this.set(e, t) : fe(i);
646
+ let n = this.getListener?.(e) ?? this.initItems()[e];
647
+ return n === void 0 && t !== void 0 ? this.set(e, t) : T(n);
702
648
  }
703
649
  static set(e, t, n) {
704
650
  let r = m(t);
705
- if (Ce.get()) return r;
706
- let i = S(r, !1);
651
+ if (ye.get()) return r;
652
+ let i = C(r, !1);
707
653
  return this.setListener ? this.setListener(e, i, this.format(e, i, n), n) : (this.initItems()[e] = i === "" ? void 0 : r, this.hasDom() && (document.cookie = this.format(e, i, n))), r;
708
654
  }
709
655
  static remove(e) {
710
656
  this.set(e, "", { age: -1 });
711
657
  }
712
658
  static update() {
713
- s() && (E.remove(we), this.initItems());
659
+ s() && (E.remove(be), this.initItems());
714
660
  }
715
661
  static format(e, t, n) {
716
662
  return [
717
663
  `${encodeURIComponent(e)}=${encodeURIComponent(t)}`,
718
- this.toMaxAge(t, n == null ? void 0 : n.age),
719
- this.toSameSite(n == null ? void 0 : n.sameSite),
720
- this.toPath(n == null ? void 0 : n.path),
721
- this.toDomain(n == null ? void 0 : n.domain),
722
- this.toSecure(n == null ? void 0 : n.secure),
723
- this.toHttpOnly(n == null ? void 0 : n.httpOnly),
724
- this.toPartitioned(n == null ? void 0 : n.partitioned),
725
- ...this.toArguments(n == null ? void 0 : n.arguments)
664
+ this.toMaxAge(t, n?.age),
665
+ this.toSameSite(n?.sameSite),
666
+ this.toPath(n?.path),
667
+ this.toDomain(n?.domain),
668
+ this.toSecure(n?.secure),
669
+ this.toHttpOnly(n?.httpOnly),
670
+ this.toPartitioned(n?.partitioned),
671
+ ...this.toArguments(n?.arguments)
726
672
  ].filter(Boolean).join("; ");
727
673
  }
728
674
  static hasDom() {
729
- return s() && !ae();
675
+ return s() && !ie();
730
676
  }
731
677
  static parse(e) {
732
678
  let t = {};
733
679
  for (let n of e.split(";")) {
734
- let [e, r] = oe(n.trim(), "=", 2);
680
+ let [e, r] = ae(n.trim(), "=", 2);
735
681
  e && l(r) && (t[e] = r);
736
682
  }
737
683
  return t;
738
684
  }
739
685
  static initItems() {
740
- return E.get(we, () => {
741
- var e;
686
+ return E.get(be, () => {
742
687
  if (this.hasDom()) return this.parse(document.cookie);
743
- let t = (e = this.getListenerRaw) == null ? void 0 : e.call(this);
744
- return l(t) ? this.parse(t) : {};
688
+ let e = this.getListenerRaw?.();
689
+ return l(e) ? this.parse(e) : {};
745
690
  });
746
691
  }
747
692
  static toMaxAge(e, t) {
748
- return `Max-Age=${encodeURIComponent(e === "" ? -1 : t == null ? 604800 : t)}`;
693
+ return `Max-Age=${encodeURIComponent(e === "" ? -1 : t ?? 604800)}`;
749
694
  }
750
695
  static toSameSite(e) {
751
- return `SameSite=${encodeURIComponent(e == null ? "Strict" : e)}`;
696
+ return `SameSite=${encodeURIComponent(e ?? "Strict")}`;
752
697
  }
753
698
  static toPath(e) {
754
- return `Path=${encodeURIComponent(e == null ? "/" : e)}`;
699
+ return `Path=${encodeURIComponent(e ?? "/")}`;
755
700
  }
756
701
  static toDomain(e) {
757
702
  return e ? `Domain=${encodeURIComponent(e)}` : void 0;
@@ -766,22 +711,20 @@ var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D =
766
711
  return e ? "Partitioned" : void 0;
767
712
  }
768
713
  static toArguments(e) {
769
- return e === void 0 ? [] : Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => `${e}=${S(t)}`);
714
+ return e === void 0 ? [] : Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => `${e}=${C(t)}`);
770
715
  }
771
- };
772
- w(O, "getListener", void 0), w(O, "getListenerRaw", void 0), w(O, "setListener", void 0);
773
- //#endregion
774
- //#region src/classes/Cookie.ts
775
- var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
716
+ }, Se = () => E.get("__ui:cookie-items__", () => ({})), Ce = class e {
717
+ name;
776
718
  static getInstance(t) {
777
- var n, r;
778
- return (n = (r = Te()) == null ? void 0 : r[t]) == null ? new e(t) : n;
719
+ return Se()?.[t] ?? new e(t);
779
720
  }
721
+ value;
722
+ options = {};
780
723
  constructor(e) {
781
- w(this, "name", void 0), w(this, "value", void 0), w(this, "options", {}), this.name = e;
782
- let t = Te();
724
+ this.name = e;
725
+ let t = Se();
783
726
  if (e in t) return t[e];
784
- this.value = O.get(this.name), t[e] = this;
727
+ this.value = xe.get(this.name), t[e] = this;
785
728
  }
786
729
  get(e, t) {
787
730
  return this.value === void 0 && e && this.set(e, t), this.value;
@@ -793,11 +736,18 @@ var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
793
736
  this.set("");
794
737
  }
795
738
  update() {
796
- O.set(this.name, this.value, this.options);
797
- }
798
- }, De = "ui-geo-code", Oe = "__ui:geo-code__", ke = class {
739
+ xe.set(this.name, this.value, this.options);
740
+ }
741
+ }, we = "ui-geo-code", Te = "__ui:geo-code__", Ee = class {
742
+ list = [...e];
743
+ storage = new D(Te);
744
+ location;
745
+ valueDefault;
746
+ item;
747
+ language;
748
+ timezone = (/* @__PURE__ */ new Date()).getTimezoneOffset();
799
749
  constructor() {
800
- w(this, "list", [...e]), w(this, "storage", new D(Oe)), w(this, "location", void 0), w(this, "valueDefault", void 0), w(this, "item", void 0), w(this, "language", void 0), w(this, "timezone", (/* @__PURE__ */ new Date()).getTimezoneOffset()), this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
750
+ this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
801
751
  }
802
752
  get() {
803
753
  return this.item;
@@ -830,24 +780,17 @@ var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
830
780
  return this.list;
831
781
  }
832
782
  getByCode(e) {
833
- var t;
834
- let n;
835
- return e && (/([A-Z]{2}-[a-z]{2})|([a-z]{2}-[A-Z]{2})/.test(e) && (n = this.getByCodeFull(e)), !n && /[A-Z]{2}/.test(e) && (n = this.getByCountry(this.toCountry(e))), !n && /[a-z]{2}/.test(e) && (n = this.getByLanguage(this.toLanguage(e)))), this.toFull((t = n) == null ? this.getList()[0] : t, e);
783
+ let t;
784
+ return e && (/([A-Z]{2}-[a-z]{2})|([a-z]{2}-[A-Z]{2})/.test(e) && (t = this.getByCodeFull(e)), !t && /[A-Z]{2}/.test(e) && (t = this.getByCountry(this.toCountry(e))), !t && /[a-z]{2}/.test(e) && (t = this.getByLanguage(this.toLanguage(e)))), this.toFull(t ?? this.getList()[0], e);
836
785
  }
837
786
  getByCodeFull(e) {
838
- return this.getList().find((t) => x(e, [`${t.language}-${t.country}`, `${t.country}-${t.language}`]));
787
+ return this.getList().find((t) => S(e, [`${t.language}-${t.country}`, `${t.country}-${t.language}`]));
839
788
  }
840
789
  getByCountry(e) {
841
- return this.getList().find((t) => {
842
- var n;
843
- return t.country === e || (t == null || (n = t.countryAlternative) == null ? void 0 : n.includes(e));
844
- });
790
+ return this.getList().find((t) => t.country === e || t?.countryAlternative?.includes(e));
845
791
  }
846
792
  getByLanguage(e) {
847
- return this.getList().find((t) => {
848
- var n;
849
- return t.language === e || (t == null || (n = t.languageAlternative) == null ? void 0 : n.includes(e));
850
- });
793
+ return this.getList().find((t) => t.language === e || t?.languageAlternative?.includes(e));
851
794
  }
852
795
  getTimezone() {
853
796
  return this.timezone;
@@ -861,9 +804,8 @@ var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
861
804
  }
862
805
  toStandard(e, t) {
863
806
  if (t) {
864
- var n;
865
- let r = (n = this.getByLanguage(t)) == null ? void 0 : n.language;
866
- if (r) return `${r}-${e.country}`;
807
+ let n = this.getByLanguage(t)?.language;
808
+ if (n) return `${n}-${e.country}`;
867
809
  }
868
810
  return `${e.language}-${e.country}`;
869
811
  }
@@ -897,14 +839,13 @@ var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
897
839
  }), this;
898
840
  }
899
841
  getCookie() {
900
- return Ee.getInstance(De);
842
+ return Ce.getInstance(we);
901
843
  }
902
844
  findLocation() {
903
845
  return this.getCookie().get() || this.findLocationDom() || m(this.valueDefault) || "en-GB";
904
846
  }
905
847
  findLocationDom() {
906
- var e;
907
- return s() && (this.storage.get() || ((e = document.querySelector("html")) == null ? void 0 : e.lang) || navigator.language || navigator.languages[0] || void 0) || void 0;
848
+ return s() && (this.storage.get() || document.querySelector("html")?.lang || navigator.language || navigator.languages[0] || void 0) || void 0;
908
849
  }
909
850
  findLanguage(e) {
910
851
  if (e) {
@@ -927,15 +868,15 @@ var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
927
868
  return {
928
869
  ...e,
929
870
  standard: r,
930
- firstDay: (e == null ? void 0 : e.firstDay) || "Mo",
931
- location: t == null ? r : t,
871
+ firstDay: e?.firstDay || "Mo",
872
+ location: t ?? r,
932
873
  locationCountry: t && this.toCountry(t) || e.country,
933
874
  locationLanguage: n
934
875
  };
935
876
  }
936
- }, k = class {
877
+ }, O = class {
937
878
  static getObject() {
938
- return E.get("__ui:geo-instance__", () => new ke());
879
+ return E.get("__ui:geo-instance__", () => new Ee());
939
880
  }
940
881
  static get() {
941
882
  return this.getObject().get();
@@ -1009,46 +950,46 @@ var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
1009
950
  };
1010
951
  //#endregion
1011
952
  //#region src/functions/isWindow.ts
1012
- function Ae(e) {
953
+ function De(e) {
1013
954
  return s() && e === window;
1014
955
  }
1015
956
  //#endregion
1016
957
  //#region src/functions/getElement.ts
1017
- function A(e) {
1018
- if (!s()) return d(e) ? void 0 : e;
1019
- if (Ae(e)) return document.body;
1020
- if (d(e)) {
1021
- var t;
1022
- return (t = document.querySelector(e)) == null ? void 0 : t;
1023
- }
1024
- return e;
958
+ function k(e) {
959
+ return s() ? De(e) ? document.body : d(e) ? document.querySelector(e) ?? void 0 : e : d(e) ? void 0 : e;
1025
960
  }
1026
961
  //#endregion
1027
962
  //#region src/functions/getElementOrWindow.ts
1028
- function je(e) {
1029
- return Ae(e) ? e : A(e);
963
+ function Oe(e) {
964
+ return De(e) ? e : k(e);
1030
965
  }
1031
966
  //#endregion
1032
967
  //#region src/functions/isInDom.ts
1033
- function Me(e) {
1034
- var t;
1035
- return (e == null ? void 0 : e.isConnected) || !!((t = A(e)) != null && t.closest("html"));
968
+ function ke(e) {
969
+ return e?.isConnected || !!k(e)?.closest("html");
1036
970
  }
1037
971
  //#endregion
1038
972
  //#region src/functions/toArray.ts
1039
- function j(e) {
973
+ function A(e) {
1040
974
  return Array.isArray(e) ? e : [e];
1041
975
  }
1042
976
  //#endregion
1043
977
  //#region src/classes/EventItem.ts
1044
- var Ne = class {
1045
- constructor(e, n = ["click"], r, i, a) {
1046
- w(this, "listener", void 0), w(this, "options", void 0), w(this, "detail", void 0), w(this, "element", void 0), w(this, "elementControl", void 0), w(this, "elementControlEdit", void 0), w(this, "type", void 0), w(this, "listenerRecent", (e) => {
1047
- if (Me(this.elementControl)) {
1048
- var n, r;
1049
- (n = this.listener) == null || n.call(this.element, e, this.detail), t(this.options) && (r = this.options) != null && r.once && this.stop();
1050
- } else this.stop();
1051
- }), w(this, "activity", !1), w(this, "activityItems", []), this.listener = r, this.options = i, this.detail = a, this.element = je(e), this.elementControl = A(e), this.type = j(n);
978
+ var Ae = class {
979
+ listener;
980
+ options;
981
+ detail;
982
+ element;
983
+ elementControl;
984
+ elementControlEdit;
985
+ type;
986
+ listenerRecent = (e) => {
987
+ ke(this.elementControl) ? (this.listener?.call(this.element, e, this.detail), t(this.options) && this.options?.once && this.stop()) : this.stop();
988
+ };
989
+ activity = !1;
990
+ activityItems = [];
991
+ constructor(e, t = ["click"], n, r, i) {
992
+ this.listener = n, this.options = r, this.detail = i, this.element = Oe(e), this.elementControl = k(e), this.type = A(t);
1052
993
  }
1053
994
  isActive() {
1054
995
  return this.activity;
@@ -1057,14 +998,14 @@ var Ne = class {
1057
998
  return this.element;
1058
999
  }
1059
1000
  setElement(e) {
1060
- let t = je(e);
1061
- return this.elementControlEdit || (this.elementControl = A(e)), this.element = t, this.reset(), this;
1001
+ let t = Oe(e);
1002
+ return this.elementControlEdit || (this.elementControl = k(e)), this.element = t, this.reset(), this;
1062
1003
  }
1063
1004
  setElementControl(e) {
1064
- return this.elementControl = A(e), this.elementControlEdit = !c(this.elementControl), this.elementControlEdit || (this.elementControl = A(this.element)), this;
1005
+ return this.elementControl = k(e), this.elementControlEdit = !c(this.elementControl), this.elementControlEdit || (this.elementControl = k(this.element)), this;
1065
1006
  }
1066
1007
  setType(e) {
1067
- return this.type = j(e), this.reset(), this;
1008
+ return this.type = A(e), this.reset(), this;
1068
1009
  }
1069
1010
  setListener(e) {
1070
1011
  return this.listener = e, this;
@@ -1076,10 +1017,7 @@ var Ne = class {
1076
1017
  return this.detail = e, this;
1077
1018
  }
1078
1019
  dispatch(e = this.detail) {
1079
- return this.type.forEach((t) => {
1080
- var n;
1081
- return (n = this.element) == null ? void 0 : n.dispatchEvent(new CustomEvent(t, { detail: e }));
1082
- }), this;
1020
+ return this.type.forEach((t) => this.element?.dispatchEvent(new CustomEvent(t, { detail: e }))), this;
1083
1021
  }
1084
1022
  start() {
1085
1023
  return !this.activity && s() && (this.activity = !0, this.activityItems = [], this.type.forEach((e) => {
@@ -1091,7 +1029,7 @@ var Ne = class {
1091
1029
  }
1092
1030
  stop() {
1093
1031
  return this.activity && (this.activity = !1, this.activityItems.forEach(({ element: e, type: t, listener: n, observer: r }) => {
1094
- r ? r.disconnect() : n ? e == null || e.removeEventListener(t, n) : e == null || e.removeEventListener(t, this.listenerRecent);
1032
+ r ? r.disconnect() : n ? e?.removeEventListener(t, n) : e?.removeEventListener(t, this.listenerRecent);
1095
1033
  })), this;
1096
1034
  }
1097
1035
  toggle(e) {
@@ -1105,7 +1043,7 @@ var Ne = class {
1105
1043
  }
1106
1044
  makeResize() {
1107
1045
  if (this.element && this.element instanceof HTMLElement && this.element !== document.body && this.isObserver()) {
1108
- let e = new ResizeObserver((e) => this.listenerRecent(e == null ? void 0 : e[0]));
1046
+ let e = new ResizeObserver((e) => this.listenerRecent(e?.[0]));
1109
1047
  return e.observe(this.element), this.activityItems.push({
1110
1048
  element: this.element,
1111
1049
  type: "resize",
@@ -1133,9 +1071,13 @@ var Ne = class {
1133
1071
  }
1134
1072
  return !1;
1135
1073
  }
1136
- }, Pe = "ui-loading", Fe = class {
1137
- constructor(e = Pe) {
1138
- w(this, "eventName", void 0), w(this, "value", 0), w(this, "event", void 0), w(this, "registrationList", []), this.eventName = e, s() && (this.event = new Ne(window, this.eventName));
1074
+ }, je = "ui-loading", Me = class {
1075
+ eventName;
1076
+ value = 0;
1077
+ event;
1078
+ registrationList = [];
1079
+ constructor(e = je) {
1080
+ this.eventName = e, s() && (this.event = new Ae(window, this.eventName));
1139
1081
  }
1140
1082
  is() {
1141
1083
  return this.value > 0;
@@ -1151,7 +1093,7 @@ var Ne = class {
1151
1093
  }
1152
1094
  registrationEvent(e, t) {
1153
1095
  if (s()) {
1154
- let n = new Ne(window, this.eventName, e).setElementControl(t).start();
1096
+ let n = new Ae(window, this.eventName, e).setElementControl(t).start();
1155
1097
  this.registrationList.push({
1156
1098
  item: n,
1157
1099
  listener: e,
@@ -1163,10 +1105,9 @@ var Ne = class {
1163
1105
  this.registrationList = this.registrationList.filter((n) => n.listener === e && n.element === t ? (n.item.stop(), !1) : !0);
1164
1106
  }
1165
1107
  dispatch() {
1166
- var e;
1167
- (e = this.event) == null || e.dispatch({ loading: this.is() });
1108
+ this.event?.dispatch({ loading: this.is() });
1168
1109
  }
1169
- }, M = class {
1110
+ }, j = class {
1170
1111
  static is() {
1171
1112
  return this.getItem().is();
1172
1113
  }
@@ -1174,7 +1115,7 @@ var Ne = class {
1174
1115
  return this.getItem().get();
1175
1116
  }
1176
1117
  static getItem() {
1177
- return E.get("__ui:loading-instance__", () => new Fe());
1118
+ return E.get("__ui:loading-instance__", () => new Me());
1178
1119
  }
1179
1120
  static show() {
1180
1121
  this.getItem().show();
@@ -1188,7 +1129,13 @@ var Ne = class {
1188
1129
  static unregistrationEvent(e, t) {
1189
1130
  this.getItem().unregistrationEvent(e, t);
1190
1131
  }
1191
- }, Ie, Le = 86400, N = class {
1132
+ }, Ne = 86400, Pe = 16384, Fe = class {
1133
+ static items;
1134
+ static getListener;
1135
+ static setListener;
1136
+ static removeListener;
1137
+ static cacheStepAgeClearOld = Pe;
1138
+ static stepAgeClearOld = Pe;
1192
1139
  static init(e, t, n, r) {
1193
1140
  this.getListener = e, this.setListener = t, this.removeListener = n, r && (this.cacheStepAgeClearOld = r, this.stepAgeClearOld = r);
1194
1141
  }
@@ -1198,19 +1145,19 @@ var Ne = class {
1198
1145
  static async get(e) {
1199
1146
  let t = await this.getItemOrListener(e);
1200
1147
  return this.clearOld().catch((e) => {
1201
- T.on({
1148
+ w.on({
1202
1149
  group: "api",
1203
1150
  code: "cacheClear",
1204
1151
  details: e
1205
1152
  });
1206
- }), t == null ? void 0 : t.value;
1153
+ }), t?.value;
1207
1154
  }
1208
1155
  static async getByFetch(e) {
1209
1156
  if (!this.isCache(e)) return;
1210
1157
  let t = this.generateKey(e);
1211
1158
  return await this.get(t);
1212
1159
  }
1213
- static async set(e, t, n = Le) {
1160
+ static async set(e, t, n = Ne) {
1214
1161
  let r = {
1215
1162
  value: t,
1216
1163
  age: n,
@@ -1254,7 +1201,7 @@ var Ne = class {
1254
1201
  if (this.isAge(t)) return t;
1255
1202
  }
1256
1203
  static getList() {
1257
- return this.items || (this.items = {}), this.items;
1204
+ return this.items ||= {}, this.items;
1258
1205
  }
1259
1206
  static async setItemOrListener(e, t) {
1260
1207
  let n = this.setListener ? await this.setListener(e, t) : !1;
@@ -1272,44 +1219,31 @@ var Ne = class {
1272
1219
  this.isAge(t) || await this.removeItemOrListener(e);
1273
1220
  }
1274
1221
  }
1275
- };
1276
- Ie = N, w(N, "items", void 0), w(N, "getListener", void 0), w(N, "setListener", void 0), w(N, "removeListener", void 0), w(N, "cacheStepAgeClearOld", 16384), w(N, "stepAgeClearOld", Ie.cacheStepAgeClearOld);
1277
- //#endregion
1278
- //#region src/classes/ApiStatus.ts
1279
- var Re = class {
1280
- constructor() {
1281
- w(this, "value", void 0);
1282
- }
1222
+ }, Ie = class {
1223
+ value;
1283
1224
  get() {
1284
1225
  return this.value;
1285
1226
  }
1286
1227
  getStatus() {
1287
- var e;
1288
- return (e = this.get()) == null ? void 0 : e.status;
1228
+ return this.get()?.status;
1289
1229
  }
1290
1230
  getStatusText() {
1291
- var e;
1292
- return (e = this.get()) == null ? void 0 : e.statusText;
1231
+ return this.get()?.statusText;
1293
1232
  }
1294
1233
  getStatusType() {
1295
- var e;
1296
- return (e = this.get()) == null ? void 0 : e.lastStatus;
1234
+ return this.get()?.lastStatus;
1297
1235
  }
1298
1236
  getCode() {
1299
- var e;
1300
- return (e = this.get()) == null ? void 0 : e.lastCode;
1237
+ return this.get()?.lastCode;
1301
1238
  }
1302
1239
  getError() {
1303
- var e;
1304
- return (e = this.get()) == null ? void 0 : e.error;
1240
+ return this.get()?.error;
1305
1241
  }
1306
1242
  getResponse() {
1307
- var e;
1308
- return (e = this.get()) == null ? void 0 : e.lastResponse;
1243
+ return this.get()?.lastResponse;
1309
1244
  }
1310
1245
  getMessage() {
1311
- var e;
1312
- return ((e = this.get()) == null ? void 0 : e.lastMessage) || "";
1246
+ return this.get()?.lastMessage || "";
1313
1247
  }
1314
1248
  set(e) {
1315
1249
  return "status" in e && this.setValue("status", e.status), "statusText" in e && this.setValue("statusText", e.statusText), "error" in e && this.setValue("error", e.error), "lastResponse" in e && this.setValue("lastResponse", e.lastResponse), "lastMessage" in e && this.setValue("lastMessage", e.lastMessage), "lastStatus" in e && this.setValue("lastStatus", e.lastStatus), "lastCode" in e && this.setValue("lastCode", e.lastCode), this;
@@ -1336,23 +1270,29 @@ var Re = class {
1336
1270
  return this.set({ lastMessage: e }), this;
1337
1271
  }
1338
1272
  setValue(e, t) {
1339
- this.value || (this.value = {}), this.value[e] = t;
1273
+ this.value ||= {}, this.value[e] = t;
1340
1274
  }
1341
- }, ze = [
1275
+ }, Le = [
1342
1276
  "success",
1343
1277
  "status",
1344
1278
  "code",
1345
1279
  "message",
1346
1280
  "error"
1347
- ], Be = class {
1281
+ ], Re = class {
1282
+ apiFetch;
1283
+ query;
1284
+ end;
1285
+ error;
1286
+ data;
1287
+ dataMod;
1348
1288
  constructor(e, t, n, r) {
1349
- w(this, "apiFetch", void 0), w(this, "query", void 0), w(this, "end", void 0), w(this, "error", void 0), w(this, "data", void 0), w(this, "dataMod", void 0), this.apiFetch = e, this.query = t, this.end = n, this.error = r;
1289
+ this.apiFetch = e, this.query = t, this.end = n, this.error = r;
1350
1290
  }
1351
1291
  async init() {
1352
1292
  return this.data = await this.readData(), this;
1353
1293
  }
1354
1294
  get() {
1355
- return this.dataMod || (this.dataMod = this.initData()), this.dataMod;
1295
+ return this.dataMod ||= this.initData(), this.dataMod;
1356
1296
  }
1357
1297
  getAndStatus(e) {
1358
1298
  let t = this.get();
@@ -1366,9 +1306,8 @@ var Re = class {
1366
1306
  return this.data;
1367
1307
  }
1368
1308
  async readData() {
1369
- var e;
1370
- let { queryReturn: t } = this.apiFetch, n = this.query;
1371
- return t ? await t(n) : "data" in this.end ? this.end.data : ((e = n.headers.get("Content-Type")) == null ? "" : e).includes("application/json") ? await n.json() : { data: await n.text() };
1309
+ let { queryReturn: e } = this.apiFetch, t = this.query;
1310
+ return e ? await e(t) : "data" in this.end ? this.end.data : (t.headers.get("Content-Type") ?? "").includes("application/json") ? await t.json() : { data: await t.text() };
1372
1311
  }
1373
1312
  initData() {
1374
1313
  let { toData: e = !0 } = this.apiFetch, t = this.getData();
@@ -1376,19 +1315,14 @@ var Re = class {
1376
1315
  }
1377
1316
  initItem(e) {
1378
1317
  let t = { ...e.data };
1379
- return ze.forEach((r) => {
1380
- if (r in e && !(r in t) && (t[r] = e[r], r === "error" && n(e[r]))) {
1381
- var i, a, o, s;
1382
- t.code = (i = (a = e[r]) == null ? void 0 : a.code) == null ? e.code : i, t.message = (o = (s = e[r]) == null ? void 0 : s.message) == null ? e.message : o;
1383
- }
1318
+ return Le.forEach((r) => {
1319
+ r in e && !(r in t) && (t[r] = e[r], r === "error" && n(e[r]) && (t.code = e[r]?.code ?? e.code, t.message = e[r]?.message ?? e.message));
1384
1320
  }), t;
1385
1321
  }
1386
- }, P = /* @__PURE__ */ function(e) {
1322
+ }, M = /* @__PURE__ */ function(e) {
1387
1323
  return e.delete = "DELETE", e.get = "GET", e.post = "POST", e.put = "PUT", e.patch = "PATCH", e;
1388
- }({}), Ve = class {
1389
- constructor() {
1390
- w(this, "value", void 0);
1391
- }
1324
+ }({}), ze = class {
1325
+ value;
1392
1326
  is() {
1393
1327
  return !!this.value;
1394
1328
  }
@@ -1414,9 +1348,13 @@ var Re = class {
1414
1348
  e.has(t) || e.set(t, n);
1415
1349
  }), this;
1416
1350
  }
1417
- }, He = class {
1351
+ }, Be = class {
1352
+ method;
1353
+ response;
1354
+ error;
1355
+ jsonResponse;
1418
1356
  constructor(e, t, n) {
1419
- w(this, "method", void 0), w(this, "response", void 0), w(this, "error", void 0), w(this, "jsonResponse", void 0), this.method = e, this.response = t, this.error = n;
1357
+ this.method = e, this.response = t, this.error = n;
1420
1358
  }
1421
1359
  getMethod() {
1422
1360
  return this.method;
@@ -1428,20 +1366,16 @@ var Re = class {
1428
1366
  return this.error;
1429
1367
  }
1430
1368
  getCode() {
1431
- var e;
1432
- return (e = this.error) == null ? void 0 : e.code;
1369
+ return this.error?.code;
1433
1370
  }
1434
1371
  getMessage() {
1435
- var e;
1436
- return m((e = this.error) == null ? void 0 : e.message, this.getResponse());
1372
+ return m(this.error?.message, this.getResponse());
1437
1373
  }
1438
1374
  getStatus() {
1439
1375
  return this.response.status;
1440
1376
  }
1441
- }, Ue = class {
1442
- constructor() {
1443
- w(this, "storage", []);
1444
- }
1377
+ }, Ve = class {
1378
+ storage = [];
1445
1379
  async find(e, t) {
1446
1380
  let n = await this.getBody(t), r = this.getCode(n), i = this.getMessage(n) || t.statusText, a = this.findItem(e, t, r);
1447
1381
  return a ? {
@@ -1457,7 +1391,7 @@ var Re = class {
1457
1391
  };
1458
1392
  }
1459
1393
  add(e, t, n) {
1460
- return j(e).forEach((e) => {
1394
+ return A(e).forEach((e) => {
1461
1395
  let r = e.url || t, i = e.method || n;
1462
1396
  r && i && this.storage.push({
1463
1397
  ...e,
@@ -1467,10 +1401,7 @@ var Re = class {
1467
1401
  }), this;
1468
1402
  }
1469
1403
  findItem(e, t, n) {
1470
- for (let i of this.storage) {
1471
- var r;
1472
- if (!(!i.method.includes(e) || !this.isUrl(t.url, i.url)) && ((r = i.validation) != null && r.call(i, t) || n && i.code && i.code === n || i.status && i.status === t.status)) return i;
1473
- }
1404
+ for (let r of this.storage) if (r.method.includes(e) && this.isUrl(t.url, r.url) && (r.validation?.(t) || n && r.code && r.code === n || r.status && r.status === t.status)) return r;
1474
1405
  }
1475
1406
  isUrl(e, t) {
1476
1407
  return t instanceof RegExp ? t.test(e) : e.includes(t);
@@ -1478,13 +1409,13 @@ var Re = class {
1478
1409
  async getBody(e) {
1479
1410
  try {
1480
1411
  return await e.clone().json();
1481
- } catch (e) {
1412
+ } catch {
1482
1413
  return;
1483
1414
  }
1484
1415
  }
1485
1416
  getDataByKey(e, t) {
1486
- if (d(e == null ? void 0 : e[t])) return e[t];
1487
- if (n(e == null ? void 0 : e.error) && d(e.error[t])) return e.error[t];
1417
+ if (d(e?.[t])) return e[t];
1418
+ if (n(e?.error) && d(e.error[t])) return e.error[t];
1488
1419
  }
1489
1420
  getCode(e) {
1490
1421
  return this.getDataByKey(e, "code");
@@ -1492,20 +1423,18 @@ var Re = class {
1492
1423
  getMessage(e) {
1493
1424
  return this.getDataByKey(e, "message");
1494
1425
  }
1495
- }, We = class {
1426
+ }, He = class {
1496
1427
  static getStorage() {
1497
- return E.get("__ui:api-error-storage__", () => new Ue());
1428
+ return E.get("__ui:api-error-storage__", () => new Ve());
1498
1429
  }
1499
1430
  static add(e, t, n) {
1500
1431
  this.getStorage().add(e, t, n);
1501
1432
  }
1502
1433
  static async getItem(e, t) {
1503
- return new He(e, t, await this.getStorage().find(e, t));
1504
- }
1505
- }, Ge = class {
1506
- constructor() {
1507
- w(this, "headers", {});
1434
+ return new Be(e, t, await this.getStorage().find(e, t));
1508
1435
  }
1436
+ }, Ue = class {
1437
+ headers = {};
1509
1438
  get(e, t = "application/json;charset=UTF-8") {
1510
1439
  if (e === null) return;
1511
1440
  let r = { ...m(this.headers) };
@@ -1518,16 +1447,14 @@ var Re = class {
1518
1447
  set(e) {
1519
1448
  return this.headers = e, this;
1520
1449
  }
1521
- }, Ke = "__ui:api:hydration:id__", qe = class {
1522
- constructor() {
1523
- w(this, "list", []);
1524
- }
1450
+ }, We = "__ui:api:hydration:id__", Ge = class {
1451
+ list = [];
1525
1452
  initResponse(e) {
1526
1453
  s() && e.add(this.getListByClient());
1527
1454
  }
1528
1455
  toClient(e, t) {
1529
- let { path: n, method: r = P.get, request: i, global: a = r === P.get } = e;
1530
- !a || !n || s() || this.list.push({
1456
+ let { path: n, method: r = M.get, request: i, global: a = r === M.get } = e;
1457
+ a && n && !s() && this.list.push({
1531
1458
  path: n,
1532
1459
  method: r,
1533
1460
  request: i,
@@ -1535,15 +1462,15 @@ var Re = class {
1535
1462
  });
1536
1463
  }
1537
1464
  toString() {
1538
- return he(Ke, this.list);
1465
+ return de(We, this.list);
1539
1466
  }
1540
1467
  getListByClient() {
1541
- return ge(Ke, []);
1542
- }
1543
- }, Je = class {
1544
- constructor() {
1545
- w(this, "callback", void 0), w(this, "callbackEnd", void 0), w(this, "loading", !1);
1468
+ return fe(We, []);
1546
1469
  }
1470
+ }, Ke = class {
1471
+ callback;
1472
+ callbackEnd;
1473
+ loading = !1;
1547
1474
  async make(e, t) {
1548
1475
  if (e && this.callback) return this.go(t);
1549
1476
  }
@@ -1568,15 +1495,20 @@ var Re = class {
1568
1495
  };
1569
1496
  //#endregion
1570
1497
  //#region src/functions/executePromise.ts
1571
- async function F(e, ...t) {
1498
+ async function N(e, ...t) {
1572
1499
  let n = m(e, ...t);
1573
1500
  return n instanceof Promise ? await n : n;
1574
1501
  }
1575
1502
  //#endregion
1576
1503
  //#region src/classes/ApiResponse.ts
1577
- var Ye = "d-response-loading", Xe = class {
1504
+ var qe = "d-response-loading", Je = class {
1505
+ requestDefault;
1506
+ first = [];
1507
+ response = [];
1508
+ loading;
1509
+ devMode = !1;
1578
1510
  constructor(e) {
1579
- w(this, "requestDefault", void 0), w(this, "first", []), w(this, "response", []), w(this, "loading", void 0), w(this, "devMode", !1), this.requestDefault = e;
1511
+ this.requestDefault = e;
1580
1512
  }
1581
1513
  get(e = "", t, n, r) {
1582
1514
  return this.response.find((i) => !this.isDisable(i) && this.isPath(i, e) && t === i.method && this.isFirst(i, r) && this.isResponse(i, n) ? (this.isDevMode(r) && console.warn(`Response type: ${i.path}`), this.first.push(i), !0) : !1);
@@ -1585,7 +1517,7 @@ var Ye = "d-response-loading", Xe = class {
1585
1517
  return this.response.filter((e) => e.isForGlobal !== !0);
1586
1518
  }
1587
1519
  add(e) {
1588
- return this.response.push(...j(e)), this;
1520
+ return this.response.push(...A(e)), this;
1589
1521
  }
1590
1522
  setDevMode(e) {
1591
1523
  return this.devMode = e, this;
@@ -1602,7 +1534,7 @@ var Ye = "d-response-loading", Xe = class {
1602
1534
  if (t) return this.fetchAsync(t.response);
1603
1535
  }
1604
1536
  isDisable(e) {
1605
- return !!m(e == null ? void 0 : e.disable);
1537
+ return !!m(e?.disable);
1606
1538
  }
1607
1539
  isPath(e, t) {
1608
1540
  return t === e.path || !!(e.path instanceof RegExp && e.path.test(t));
@@ -1614,12 +1546,12 @@ var Ye = "d-response-loading", Xe = class {
1614
1546
  return this.first.indexOf(e) === -1 || this.isDevMode(t);
1615
1547
  }
1616
1548
  isResponse(e, t) {
1617
- let r = this.requestDefault.request(e == null ? void 0 : e.request);
1618
- return t === r || r === "*any" || l(t) && l(r) && n(t) && n(r) && !(t instanceof FormData) && !(r instanceof FormData) && Object.values(t).length === Object.values(r).length && Object.entries(r).every(([e, n]) => n === (t == null ? void 0 : t[e]) || n === "*any");
1549
+ let r = this.requestDefault.request(e?.request);
1550
+ return t === r || r === "*any" || l(t) && l(r) && n(t) && n(r) && !(t instanceof FormData) && !(r instanceof FormData) && Object.values(t).length === Object.values(r).length && Object.entries(r).every(([e, n]) => n === t?.[e] || n === "*any");
1619
1551
  }
1620
1552
  readData(e) {
1621
1553
  if (!s()) return;
1622
- let { path: t = "", method: n = P.get, global: r = n === P.get, devMode: i = !1 } = e;
1554
+ let { path: t = "", method: n = M.get, global: r = n === M.get, devMode: i = !1 } = e;
1623
1555
  if (r || this.isDevMode(i)) {
1624
1556
  let r = this.requestDefault.request(e.request), a = this.get(t, n, r, i);
1625
1557
  if (a) return {
@@ -1630,9 +1562,9 @@ var Ye = "d-response-loading", Xe = class {
1630
1562
  }
1631
1563
  fetch(e, t) {
1632
1564
  return this.startResponseLoading(), new Promise((n) => {
1633
- F(p(e.response) ? e.response(t) : e.response).then((t) => {
1634
- e != null && e.lag ? (M.show(), setTimeout(() => {
1635
- this.stopResponseLoading(), n(t), M.hide();
1565
+ N(p(e.response) ? e.response(t) : e.response).then((t) => {
1566
+ e?.lag ? (j.show(), setTimeout(() => {
1567
+ this.stopResponseLoading(), n(t), j.hide();
1636
1568
  }, f(0, 2e3))) : (this.stopResponseLoading(), n(t));
1637
1569
  });
1638
1570
  });
@@ -1641,18 +1573,31 @@ var Ye = "d-response-loading", Xe = class {
1641
1573
  return e.response;
1642
1574
  }
1643
1575
  startResponseLoading() {
1644
- this.loading && clearTimeout(this.loading), s() && document.body.classList.add(Ye);
1576
+ this.loading && clearTimeout(this.loading), s() && document.body.classList.add(qe);
1645
1577
  }
1646
1578
  stopResponseLoading() {
1647
1579
  s() && (this.loading = setTimeout(() => {
1648
- this.loading = void 0, document.body.classList.remove(Ye);
1580
+ this.loading = void 0, document.body.classList.remove(qe);
1649
1581
  }, 2400));
1650
1582
  }
1651
- }, Ze = class {
1583
+ }, Ye = class {
1584
+ url;
1585
+ geo;
1586
+ headers;
1587
+ requestDefault;
1588
+ status;
1589
+ response;
1590
+ preparation;
1591
+ loading;
1592
+ errorCenter;
1593
+ hydration;
1594
+ timeout = 16e3;
1595
+ origin;
1596
+ wrapper;
1652
1597
  constructor(e = "/api/", t = {}) {
1653
- w(this, "url", void 0), w(this, "geo", void 0), w(this, "headers", void 0), w(this, "requestDefault", void 0), w(this, "status", void 0), w(this, "response", void 0), w(this, "preparation", void 0), w(this, "loading", void 0), w(this, "errorCenter", void 0), w(this, "hydration", void 0), w(this, "timeout", 16e3), w(this, "origin", void 0), w(this, "wrapper", void 0), this.url = e;
1654
- let { headersClass: n = Ge, requestDefaultClass: r = Ve, statusClass: i = Re, responseClass: a = Xe, preparationClass: o = Je, loadingClass: s = M.getItem(), errorCenterClass: c = T.getItem(), hydrationClass: l = qe, wrapper: u } = t;
1655
- this.geo = k.getObject(), this.headers = new n(), this.requestDefault = new r(), this.status = new i(), this.response = new a(this.requestDefault), this.preparation = new o(), this.loading = s, this.errorCenter = c, this.hydration = new l(), this.wrapper = u, this.hydration.initResponse(this.response);
1598
+ this.url = e;
1599
+ let { headersClass: n = Ue, requestDefaultClass: r = ze, statusClass: i = Ie, responseClass: a = Je, preparationClass: o = Ke, loadingClass: s = j.getItem(), errorCenterClass: c = w.getItem(), hydrationClass: l = Ge, wrapper: u } = t;
1600
+ this.geo = O.getObject(), this.headers = new n(), this.requestDefault = new r(), this.status = new i(), this.response = new a(this.requestDefault), this.preparation = new o(), this.loading = s, this.errorCenter = c, this.hydration = new l(), this.wrapper = u, this.hydration.initResponse(this.response);
1656
1601
  }
1657
1602
  isLocalhost() {
1658
1603
  return s() && typeof location < "u" && location.hostname === "localhost";
@@ -1672,12 +1617,12 @@ var Ye = "d-response-loading", Xe = class {
1672
1617
  getUrl(e, t = !0) {
1673
1618
  return `${t ? this.getOrigin() : ""}${e}`.replace("{locale}", this.geo.getLocation()).replace("{country}", this.geo.getCountry()).replace("{language}", this.geo.getLanguage());
1674
1619
  }
1675
- getBody(e = {}, t = P.get) {
1620
+ getBody(e = {}, t = M.get) {
1676
1621
  if (e instanceof FormData) return e;
1677
- if (t !== P.get && l(e)) return d(e) ? e : JSON.stringify(e);
1622
+ if (t !== M.get && l(e)) return d(e) ? e : JSON.stringify(e);
1678
1623
  }
1679
- getBodyForGet(e, t = "", n = P.get) {
1680
- if (n === P.get) {
1624
+ getBodyForGet(e, t = "", n = M.get) {
1625
+ if (n === M.get) {
1681
1626
  let n = t.match(/\?/) ? "&" : "?", r = typeof e == "object" ? o(e) : e;
1682
1627
  if (l(r)) return `${n}${r}`;
1683
1628
  }
@@ -1711,85 +1656,77 @@ var Ye = "d-response-loading", Xe = class {
1711
1656
  return this.wrapper = e, this;
1712
1657
  }
1713
1658
  async request(e) {
1714
- var t;
1715
- let n = d(e) ? { path: e } : e, r = (t = n.wrapper) == null ? this.wrapper : t;
1716
- return r ? await r(() => this.fetch(n), n) : await this.fetch(n);
1659
+ let t = d(e) ? { path: e } : e, n = t.wrapper ?? this.wrapper;
1660
+ return n ? await n(() => this.fetch(t), t) : await this.fetch(t);
1717
1661
  }
1718
1662
  get(e) {
1719
1663
  return this.request({
1720
1664
  ...e,
1721
- method: P.get
1665
+ method: M.get
1722
1666
  });
1723
1667
  }
1724
1668
  post(e) {
1725
1669
  return this.request({
1726
1670
  ...e,
1727
- method: P.post
1671
+ method: M.post
1728
1672
  });
1729
1673
  }
1730
1674
  put(e) {
1731
1675
  return this.request({
1732
1676
  ...e,
1733
- method: P.put
1677
+ method: M.put
1734
1678
  });
1735
1679
  }
1736
1680
  patch(e) {
1737
1681
  return this.request({
1738
1682
  ...e,
1739
- method: P.patch
1683
+ method: M.patch
1740
1684
  });
1741
1685
  }
1742
1686
  delete(e) {
1743
1687
  return this.request({
1744
1688
  ...e,
1745
- method: P.delete
1689
+ method: M.delete
1746
1690
  });
1747
1691
  }
1748
1692
  getRetryDelay(e, t) {
1749
1693
  return f(t, t + e * t);
1750
1694
  }
1751
1695
  async fetch(e, t = 0) {
1752
- let { method: n = P.get, api: r = !0, path: i = "", hideError: a = !1, hideLoading: o = !1, retry: s = 0, retryDelay: c = 64, globalPreparation: l = !0, globalEnd: u = !0, initError: d = !0, endResetLimit: f = 8 } = e, p = this.getUrl(i, r), m = await this.response.emulator(e);
1696
+ let { method: n = M.get, api: r = !0, path: i = "", hideError: a = !1, hideLoading: o = !1, retry: s = 0, retryDelay: c = 64, globalPreparation: l = !0, globalEnd: u = !0, initError: d = !0, endResetLimit: f = 8 } = e, p = this.getUrl(i, r), m = await this.response.emulator(e);
1753
1697
  if (m) return m;
1754
- let h = await N.getByFetch(e);
1698
+ let h = await Fe.getByFetch(e);
1755
1699
  if (h) return this.hydration.toClient(e, h), h;
1756
- let g = new Re(), _, v;
1700
+ let g = new Ie(), _, v;
1757
1701
  o || this.loading.show();
1758
1702
  try {
1759
1703
  await this.preparation.make(l, e);
1760
1704
  let { query: r, timeoutId: i } = await this.makeQuery(e, p);
1761
1705
  i && clearTimeout(i);
1762
1706
  let m = await this.preparation.makeEnd(u, r, e);
1763
- if (g.setStatus(r.status, r.statusText), this.status.setStatus(r.status, r.statusText), !a && r.status >= 400) {
1764
- var te;
1765
- d && (v = await We.getItem(n, r)), this.makeErrorQuery((te = v) == null ? r : te);
1766
- }
1767
- if (m != null && m.reset && t < f || t < s) return await ee(this.getRetryDelay(t, c)), o || this.loading.hide(), await this.fetch(e, t + 1);
1768
- _ = new Be(e, r, m, v), await _.init();
1707
+ if (g.setStatus(r.status, r.statusText), this.status.setStatus(r.status, r.statusText), !a && r.status >= 400 && (d && (v = await He.getItem(n, r)), this.makeErrorQuery(v ?? r)), m?.reset && t < f || t < s) return await ee(this.getRetryDelay(t, c)), o || this.loading.hide(), await this.fetch(e, t + 1);
1708
+ _ = new Re(e, r, m, v), await _.init();
1769
1709
  } catch (e) {
1770
1710
  throw a || this.makeError(e), g.setError(String(e)), this.status.setError(String(e)), o || this.loading.hide(), e;
1771
1711
  }
1772
1712
  g.setLastResponse(_.getData()), this.status.setLastResponse(_.getData());
1773
1713
  let y = _.getAndStatus(g);
1774
- return o || this.loading.hide(), this.hydration.toClient(e, y), await N.setByFetch(e, y), y;
1714
+ return o || this.loading.hide(), this.hydration.toClient(e, y), await Fe.setByFetch(e, y), y;
1775
1715
  }
1776
1716
  async makeQuery(e, t) {
1777
- let n = this.requestDefault.request(e.request), { pathFull: r = void 0, method: i = P.get, headers: a = {}, type: o = "application/json;charset=UTF-8", init: s = {} } = e, c = r == null ? t : r, l = `${c}${this.getBodyForGet(n, c, i)}`, u = this.headers.getByRequest(e.request, a, o), d = {
1717
+ let n = this.requestDefault.request(e.request), { pathFull: r = void 0, method: i = M.get, headers: a = {}, type: o = "application/json;charset=UTF-8", init: s = {} } = e, c = r ?? t, l = `${c}${this.getBodyForGet(n, c, i)}`, u = this.headers.getByRequest(e.request, a, o), d = {
1778
1718
  ...s,
1779
1719
  method: i,
1780
1720
  body: this.getBody(n, i)
1781
1721
  };
1782
- if (u) {
1783
- var f;
1784
- d.headers = {
1785
- ...u,
1786
- ...(f = s.headers) == null ? {} : f
1787
- };
1788
- }
1789
- let ee = this.initController(e, d);
1722
+ u && (d.headers = {
1723
+ ...u,
1724
+ ...s.headers ?? {}
1725
+ });
1726
+ let f = this.initController(e, d);
1790
1727
  return {
1791
1728
  query: await fetch(l, d),
1792
- timeoutId: ee
1729
+ timeoutId: f
1793
1730
  };
1794
1731
  }
1795
1732
  makeError(e, t = "api") {
@@ -1862,18 +1799,18 @@ var Ye = "d-response-loading", Xe = class {
1862
1799
  return;
1863
1800
  }
1864
1801
  if (n) {
1865
- let e = r == null ? new AbortController() : r;
1802
+ let e = r ?? new AbortController();
1866
1803
  return t.signal = e.signal, setTimeout(() => {
1867
1804
  e.abort(new DOMException("Timeout", "TimeoutError"));
1868
1805
  }, n);
1869
1806
  }
1870
1807
  }
1871
- }, I = class {
1808
+ }, P = class {
1872
1809
  static isLocalhost() {
1873
1810
  return this.getItem().isLocalhost();
1874
1811
  }
1875
1812
  static getItem() {
1876
- return E.get("__ui:api-instance__", () => new Ze());
1813
+ return E.get("__ui:api-instance__", () => new Ye());
1877
1814
  }
1878
1815
  static getStatus() {
1879
1816
  return this.getItem().getStatus();
@@ -1893,10 +1830,10 @@ var Ye = "d-response-loading", Xe = class {
1893
1830
  static getUrl(e, t = !0) {
1894
1831
  return this.getItem().getUrl(e, t);
1895
1832
  }
1896
- static getBody(e = {}, t = P.get) {
1833
+ static getBody(e = {}, t = M.get) {
1897
1834
  return this.getItem().getBody(e, t);
1898
1835
  }
1899
- static getBodyForGet(e, t = "", n = P.get) {
1836
+ static getBodyForGet(e, t = "", n = M.get) {
1900
1837
  return this.getItem().getBodyForGet(e, t, n);
1901
1838
  }
1902
1839
  static setHeaders(e) {
@@ -1944,16 +1881,13 @@ var Ye = "d-response-loading", Xe = class {
1944
1881
  static delete(e) {
1945
1882
  return this.getItem().delete(e);
1946
1883
  }
1947
- }, Qe = class {
1948
- constructor(e, t, n, r = T.getItem()) {
1949
- if (w(this, "callback", void 0), w(this, "callbackError", void 0), w(this, "channel", void 0), w(this, "update", (e) => {
1950
- var t;
1951
- return (t = this.callback) == null || t.call(this, e), this;
1952
- }), w(this, "updateError", (e) => {
1953
- var t;
1954
- return (t = this.callbackError) == null || t.call(this, e), this;
1955
- }), this.callback = t, this.callbackError = n, s()) try {
1956
- this.channel = new BroadcastChannel(`${$e()}__${e}`), this.channel.onmessage = this.update, this.channel.onmessageerror = this.updateError;
1884
+ }, Xe = class {
1885
+ callback;
1886
+ callbackError;
1887
+ channel;
1888
+ constructor(e, t, n, r = w.getItem()) {
1889
+ if (this.callback = t, this.callbackError = n, s()) try {
1890
+ this.channel = new BroadcastChannel(`${Ze()}__${e}`), this.channel.onmessage = this.update, this.channel.onmessageerror = this.updateError;
1957
1891
  } catch (e) {
1958
1892
  r.on({
1959
1893
  group: "broadcast",
@@ -1966,8 +1900,7 @@ var Ye = "d-response-loading", Xe = class {
1966
1900
  return this.channel;
1967
1901
  }
1968
1902
  post(e) {
1969
- var t;
1970
- return (t = this.channel) == null || t.postMessage(e), this;
1903
+ return this.channel?.postMessage(e), this;
1971
1904
  }
1972
1905
  setCallback(e) {
1973
1906
  return this.callback = e, this;
@@ -1976,12 +1909,17 @@ var Ye = "d-response-loading", Xe = class {
1976
1909
  return this.callbackError = e, this;
1977
1910
  }
1978
1911
  destroy() {
1979
- var e;
1980
- return (e = this.channel) == null || e.close(), this.channel = void 0, this;
1981
- }
1982
- }, $e = () => new D("__ui:broadcast-name__").get(() => `name_${f(1e6, 9999999)}`), et = class {
1912
+ return this.channel?.close(), this.channel = void 0, this;
1913
+ }
1914
+ update = (e) => (this.callback?.(e), this);
1915
+ updateError = (e) => (this.callbackError?.(e), this);
1916
+ }, Ze = () => new D("__ui:broadcast-name__").get(() => `name_${f(1e6, 9999999)}`), Qe = class {
1917
+ callback;
1918
+ cache;
1919
+ cacheOld;
1920
+ comparisons = [];
1983
1921
  constructor(e) {
1984
- w(this, "callback", void 0), w(this, "cache", void 0), w(this, "cacheOld", void 0), w(this, "comparisons", []), this.callback = e;
1922
+ this.callback = e;
1985
1923
  }
1986
1924
  getCache(e) {
1987
1925
  return this.isUpdate(e) && (this.cacheOld = this.cache, this.setCache()), this.cache;
@@ -2001,22 +1939,20 @@ var Ye = "d-response-loading", Xe = class {
2001
1939
  isUpdate(e) {
2002
1940
  return this.cache === void 0 || this.comparisons.length !== e.length || this.comparisons.findIndex((t, n) => t !== e[n]) >= 0 ? (this.comparisons = [...e], !0) : !1;
2003
1941
  }
2004
- }, tt = class {
2005
- constructor() {
2006
- w(this, "cache", {});
2007
- }
1942
+ }, $e = class {
1943
+ cache = {};
2008
1944
  get(e, t, n) {
2009
- return this.getCacheItem(e, t).getCache(n == null ? [] : n);
1945
+ return this.getCacheItem(e, t).getCache(n ?? []);
2010
1946
  }
2011
1947
  async getAsync(e, t, n) {
2012
- return await this.getCacheItem(e, t).getCacheAsync(n == null ? [] : n);
1948
+ return await this.getCacheItem(e, t).getCacheAsync(n ?? []);
2013
1949
  }
2014
1950
  getCacheItem(e, t) {
2015
- return e in this.cache || (this.cache[e] = new et(t)), this.cache[e];
1951
+ return e in this.cache || (this.cache[e] = new Qe(t)), this.cache[e];
2016
1952
  }
2017
- }, nt = class {
1953
+ }, et = class {
2018
1954
  static getItem() {
2019
- return E.get("__ui:cache-static__", () => new tt());
1955
+ return E.get("__ui:cache-static__", () => new $e());
2020
1956
  }
2021
1957
  static get(e, t, n) {
2022
1958
  return this.getItem().get(e, t, n);
@@ -2027,41 +1963,42 @@ var Ye = "d-response-loading", Xe = class {
2027
1963
  };
2028
1964
  //#endregion
2029
1965
  //#region src/functions/toDate.ts
2030
- function L(e) {
2031
- var t, n, r, i, a, o, s, l;
1966
+ function F(e) {
2032
1967
  if (e instanceof Date) return e;
2033
1968
  if (c(e)) return /* @__PURE__ */ new Date();
2034
1969
  if (typeof e == "number") return new Date(e);
2035
- let u = e, d = k.getTimezoneFormat().trim();
2036
- e.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (e, t, n) => (u = t, d = n.trim(), e));
2037
- let f = (t = (n = (r = (i = (a = (o = (s = (l = /^\d{4}\d{2}\d{2}$/.exec(u) && `${u.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3")}T00:00:00`) == null ? /^\d{4}\d{2}$/.exec(u) && `${u.replace(/^(\d{4})(\d{2})$/, "$1-$2")}-01T00:00:00` : l) == null ? /^\d{4}\d{2}\d{2} \d{2}:\d{2}:\d{2}$/.exec(u) && u.replace(/^(\d{4})(\d{2})(\d{2}) (\d{2}):(\d{2}):(\d{2})$/, "$1-$2-$3T$4:$5:$6") : s) == null ? /^\d{4}-\d{2}-\d{2}$/.exec(u) && `${u}T00:00:00` : o) == null ? /^\d{4}-\d{2}$/.exec(u) && `${u}-01T00:00:00` : a) == null ? /^\d{4}$/.exec(u) && `${u}-01-01T00:00:00` : i) == null ? /^\d{2}:\d{2}$/.exec(u) && `2000-01-01T${u}:00` : r) == null ? /^\d{2}:\d{2}:\d{2}$/.exec(u) && `2000-01-01T${u}` : n) == null ? u.replace(" ", "T") : t;
2038
- return /* @__PURE__ */ new Date(`${f.trim()}${d}`);
1970
+ let t = e, n = O.getTimezoneFormat().trim();
1971
+ e.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (e, r, i) => (t = r, n = i.trim(), e));
1972
+ let r = (/^\d{4}\d{2}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3")}T00:00:00`) ?? (/^\d{4}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})$/, "$1-$2")}-01T00:00:00`) ?? (/^\d{4}\d{2}\d{2} \d{2}:\d{2}:\d{2}$/.exec(t) && t.replace(/^(\d{4})(\d{2})(\d{2}) (\d{2}):(\d{2}):(\d{2})$/, "$1-$2-$3T$4:$5:$6")) ?? (/^\d{4}-\d{2}-\d{2}$/.exec(t) && `${t}T00:00:00`) ?? (/^\d{4}-\d{2}$/.exec(t) && `${t}-01T00:00:00`) ?? (/^\d{4}$/.exec(t) && `${t}-01-01T00:00:00`) ?? (/^\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}:00`) ?? (/^\d{2}:\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}`) ?? t.replace(" ", "T");
1973
+ return /* @__PURE__ */ new Date(`${r.trim()}${n}`);
2039
1974
  }
2040
1975
  //#endregion
2041
1976
  //#region src/functions/getColumn.ts
2042
- function rt(e, t) {
2043
- return r(e, (e) => e == null ? void 0 : e[t], !0);
1977
+ function tt(e, t) {
1978
+ return r(e, (e) => e?.[t], !0);
2044
1979
  }
2045
1980
  //#endregion
2046
1981
  //#region src/classes/GeoIntl.ts
2047
- var R = class e {
2048
- static isItem(e = k.getLocation()) {
2049
- return this.getLocation(e) in B;
1982
+ var I = class e {
1983
+ errorCenter;
1984
+ static isItem(e = O.getLocation()) {
1985
+ return this.getLocation(e) in R;
2050
1986
  }
2051
- static getLocation(e = k.getLocation()) {
2052
- if (e in z) return z[e];
2053
- let t = k.find(e);
2054
- return z[e] = t.standard, t.standard;
1987
+ static getLocation(e = O.getLocation()) {
1988
+ if (e in L) return L[e];
1989
+ let t = O.find(e);
1990
+ return L[e] = t.standard, t.standard;
2055
1991
  }
2056
- static getInstance(t = k.getLocation()) {
1992
+ static getInstance(t = O.getLocation()) {
2057
1993
  let n = this.getLocation(t);
2058
- return n in B ? B[n] : new e(t);
1994
+ return n in R ? R[n] : new e(t);
2059
1995
  }
2060
- constructor(e = k.getLocation(), t = T.getItem()) {
2061
- w(this, "errorCenter", void 0), w(this, "geo", void 0), this.errorCenter = t, this.geo = k.find(e);
1996
+ geo;
1997
+ constructor(e = O.getLocation(), t = w.getItem()) {
1998
+ this.errorCenter = t, this.geo = O.find(e);
2062
1999
  let n = this.getLocation();
2063
- if (n in B) return B[n];
2064
- z[e] = n, B[n] = this;
2000
+ if (n in R) return R[n];
2001
+ L[e] = n, R[n] = this;
2065
2002
  }
2066
2003
  getLocation() {
2067
2004
  return this.geo.standard;
@@ -2070,14 +2007,13 @@ var R = class e {
2070
2007
  return this.geo.firstDay;
2071
2008
  }
2072
2009
  display(e, t) {
2073
- var n, r;
2074
- let i = { type: "language" }, a;
2075
- t && (typeof t == "string" ? i.type = t : i = {
2076
- ...i,
2010
+ let n = { type: "language" }, r;
2011
+ t && (typeof t == "string" ? n.type = t : n = {
2012
+ ...n,
2077
2013
  ...t
2078
2014
  });
2079
2015
  try {
2080
- typeof Intl < "u" && (e ? a = new Intl.DisplayNames(this.getLocation(), i).of(e) : i.type === "language" ? a = new Intl.DisplayNames(this.getLocation(), i).of(this.geo.language) : i.type === "region" && (a = new Intl.DisplayNames(this.getLocation(), i).of(this.geo.country)));
2016
+ typeof Intl < "u" && (e ? r = new Intl.DisplayNames(this.getLocation(), n).of(e) : n.type === "language" ? r = new Intl.DisplayNames(this.getLocation(), n).of(this.geo.language) : n.type === "region" && (r = new Intl.DisplayNames(this.getLocation(), n).of(this.geo.country)));
2081
2017
  } catch (e) {
2082
2018
  this.errorCenter.on({
2083
2019
  group: "intl",
@@ -2085,14 +2021,14 @@ var R = class e {
2085
2021
  details: e
2086
2022
  });
2087
2023
  }
2088
- return (n = (r = a) == null ? e : r) == null ? "" : n;
2024
+ return r ?? e ?? "";
2089
2025
  }
2090
2026
  languageName(e, t) {
2091
2027
  let n = {
2092
2028
  type: "language",
2093
2029
  style: t
2094
2030
  };
2095
- return this.display(k.getByCode(e).language, n);
2031
+ return this.display(O.getByCode(e).language, n);
2096
2032
  }
2097
2033
  countryName(e, t) {
2098
2034
  let n = {
@@ -2102,29 +2038,26 @@ var R = class e {
2102
2038
  return this.display(e, n);
2103
2039
  }
2104
2040
  fullName(e, t, n, r) {
2105
- var i, a;
2106
- let o = (i = (a = this.geo) == null ? void 0 : a.nameFormat) == null ? "fl" : i, s = r ? t[0].toUpperCase() + "." : t, c = r ? (n == null ? void 0 : n[0].toUpperCase()) + "." : n, l;
2107
- switch (o) {
2041
+ let i = this.geo?.nameFormat ?? "fl", a = r ? t[0].toUpperCase() + "." : t, o = r ? n?.[0].toUpperCase() + "." : n, s;
2042
+ switch (i) {
2108
2043
  case "fsl":
2109
- l = `${s}${c ? ` ${c}` : ""} ${e}`;
2044
+ s = `${a}${o ? ` ${o}` : ""} ${e}`;
2110
2045
  break;
2111
2046
  case "lf":
2112
- l = `${e} ${s}`;
2047
+ s = `${e} ${a}`;
2113
2048
  break;
2114
2049
  case "lsf":
2115
- l = `${e}${c ? ` ${c}` : ""} ${s}`;
2050
+ s = `${e}${o ? ` ${o}` : ""} ${a}`;
2116
2051
  break;
2117
- default: l = `${s} ${e}`;
2052
+ default: s = `${a} ${e}`;
2118
2053
  }
2119
- return l;
2054
+ return s;
2120
2055
  }
2121
2056
  number(e, t) {
2122
- var n, r;
2123
- return ((n = this.numberObject(t)) == null || (r = n.format) == null ? void 0 : r.call(n, b(e))) || e.toString();
2057
+ return this.numberObject(t)?.format?.(x(e)) || e.toString();
2124
2058
  }
2125
2059
  decimal() {
2126
- var e, t, n;
2127
- return ((e = this.numberObject()) == null || (t = e.formatToParts) == null || (t = t.call(e, 1.2)) == null || (n = t.find) == null || (n = n.call(t, (e) => e.type === "decimal")) == null ? void 0 : n.value) || ".";
2060
+ return this.numberObject()?.formatToParts?.(1.2)?.find?.((e) => e.type === "decimal")?.value || ".";
2128
2061
  }
2129
2062
  currency(e, t, n = !1) {
2130
2063
  let r = {
@@ -2134,7 +2067,7 @@ var R = class e {
2134
2067
  }, i = e.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]{3})$/i, (...e) => (r.currency = String(e[2]).toUpperCase(), String(e[1])));
2135
2068
  if (n) {
2136
2069
  let t = this.numberObject(r);
2137
- return t ? rt(t.formatToParts(b(e)).filter((e) => ["literal", "currency"].indexOf(e.type) === -1), "value").join("") : e.toString();
2070
+ return t ? tt(t.formatToParts(x(e)).filter((e) => ["literal", "currency"].indexOf(e.type) === -1), "value").join("") : e.toString();
2138
2071
  }
2139
2072
  return "currency" in r ? this.number(typeof e == "number" ? e : i, r) : this.number(typeof e == "number" ? e : i, {
2140
2073
  ...r,
@@ -2142,12 +2075,11 @@ var R = class e {
2142
2075
  });
2143
2076
  }
2144
2077
  currencySymbol(e, t = "symbol") {
2145
- var n, r, i;
2146
- return ((n = this.numberObject({
2078
+ return this.numberObject({
2147
2079
  style: "currency",
2148
2080
  currencyDisplay: t,
2149
2081
  currency: e
2150
- })) == null || (r = n.formatToParts) == null || (r = r.call(n, 100)) == null || (i = r.find) == null || (i = i.call(r, (e) => e.type === "currency")) == null ? void 0 : i.value) || e;
2082
+ })?.formatToParts?.(100)?.find?.((e) => e.type === "currency")?.value || e;
2151
2083
  }
2152
2084
  unit(e, t) {
2153
2085
  let n = {
@@ -2157,7 +2089,7 @@ var R = class e {
2157
2089
  return this.number(r, n);
2158
2090
  }
2159
2091
  sizeFile(e, t = "byte") {
2160
- let n = b(e);
2092
+ let n = x(e);
2161
2093
  if (n > 1024 && d(t)) switch (t) {
2162
2094
  case "byte": return this.sizeFile(n / 1024, "kilobyte");
2163
2095
  case "kilobyte": return this.sizeFile(n / 1024, "megabyte");
@@ -2174,34 +2106,32 @@ var R = class e {
2174
2106
  });
2175
2107
  }
2176
2108
  percentBy100(e, t) {
2177
- return this.percent(b(e) / 100, t);
2109
+ return this.percent(x(e) / 100, t);
2178
2110
  }
2179
2111
  plural(e, t, n, r) {
2180
- var i;
2181
- let a = b(e), o = t.split("|");
2182
- if (o.length > 1) try {
2112
+ let i = x(e), a = t.split("|");
2113
+ if (a.length > 1) try {
2183
2114
  if (typeof Intl < "u") {
2184
- var s;
2185
- let e = new Intl.PluralRules(this.getLocation(), n).select(a), t;
2115
+ let e = new Intl.PluralRules(this.getLocation(), n).select(i), t;
2186
2116
  switch (e) {
2187
2117
  case "zero":
2188
- t = o[o.length - 1];
2118
+ t = a[a.length - 1];
2189
2119
  break;
2190
2120
  case "one":
2191
- t = o == null ? void 0 : o[0];
2121
+ t = a?.[0];
2192
2122
  break;
2193
2123
  case "two":
2194
- t = o == null ? void 0 : o[1];
2124
+ t = a?.[1];
2195
2125
  break;
2196
2126
  case "few":
2197
- t = o != null && o[3] ? o == null ? void 0 : o[2] : o == null ? void 0 : o[1];
2127
+ t = a?.[3] ? a?.[2] : a?.[1];
2198
2128
  break;
2199
2129
  case "many":
2200
- t = (o == null ? void 0 : o[3]) || (o == null ? void 0 : o[2]) || (o == null ? void 0 : o[1]);
2130
+ t = a?.[3] || a?.[2] || a?.[1];
2201
2131
  break;
2202
- case "other": t = o.length === 6 ? o[o.length - 2] : o[o.length - 1];
2132
+ case "other": t = a.length === 6 ? a[a.length - 2] : a[a.length - 1];
2203
2133
  }
2204
- return `${this.number(a, r)} ${(s = t) == null ? "" : s}`.trim();
2134
+ return `${this.number(i, r)} ${t ?? ""}`.trim();
2205
2135
  }
2206
2136
  } catch (e) {
2207
2137
  this.errorCenter.on({
@@ -2210,21 +2140,21 @@ var R = class e {
2210
2140
  details: e
2211
2141
  });
2212
2142
  }
2213
- return `${this.number(a, r)} ${(i = o == null ? void 0 : o[0]) == null ? "" : i}`.trim();
2143
+ return `${this.number(i, r)} ${a?.[0] ?? ""}`.trim();
2214
2144
  }
2215
2145
  date(e, t, n, r) {
2216
- let i = L(e), a = typeof n == "string", o = this.dateOptions(t, a ? n : "short");
2146
+ let i = F(e), a = typeof n == "string", o = this.dateOptions(t, a ? n : "short");
2217
2147
  return r && (o.hour12 = !1), a || Object.assign(o, n), i.toLocaleString(this.getLocation(), o);
2218
2148
  }
2219
2149
  relative(e, t, n) {
2220
- let r = L(e), i = n || /* @__PURE__ */ new Date(), a = {
2150
+ let r = F(e), i = n || /* @__PURE__ */ new Date(), a = {
2221
2151
  numeric: "auto",
2222
2152
  ...typeof t == "string" ? { style: t } : t || {}
2223
2153
  }, o = "second", s = (r.getTime() - i.getTime()) / 1e3;
2224
2154
  return Math.abs(s) >= 60 && (o = "minute", s /= 60, Math.abs(s) >= 60 && (o = "hour", s /= 60, Math.abs(s) >= 24 && (o = "day", s /= 24, Math.abs(s) >= 30 && (o = "month", s /= 30, Math.abs(s) >= 12 && (o = "year", s /= 12))))), this.relativeByValue(s, o, a);
2225
2155
  }
2226
2156
  relativeLimit(e, t, n, r, i, a, o) {
2227
- let s = L(e), c = n || /* @__PURE__ */ new Date(), l = new Date(c), u = new Date(c);
2157
+ let s = F(e), c = n || /* @__PURE__ */ new Date(), l = new Date(c), u = new Date(c);
2228
2158
  return l.setDate(c.getDate() - t), u.setDate(c.getDate() + t), s >= l && s <= u ? this.relative(s, r, c) : this.date(s, a, i, o);
2229
2159
  }
2230
2160
  relativeByValue(e, t, n) {
@@ -2233,7 +2163,7 @@ var R = class e {
2233
2163
  ...typeof n == "string" ? { style: n } : n || {}
2234
2164
  };
2235
2165
  try {
2236
- if (this.hasIntl() && Intl.RelativeTimeFormat !== void 0) return new Intl.RelativeTimeFormat(this.getLocation(), r).format(Math.round(b(e)), t);
2166
+ if (this.hasIntl() && Intl.RelativeTimeFormat !== void 0) return new Intl.RelativeTimeFormat(this.getLocation(), r).format(Math.round(x(e)), t);
2237
2167
  } catch (e) {
2238
2168
  this.errorCenter.on({
2239
2169
  group: "intl",
@@ -2245,7 +2175,7 @@ var R = class e {
2245
2175
  }
2246
2176
  month(e, t) {
2247
2177
  try {
2248
- if (this.hasIntlDateTimeFormat()) return Intl.DateTimeFormat(this.getLocation(), { month: t || "long" }).format(L(e));
2178
+ if (this.hasIntlDateTimeFormat()) return Intl.DateTimeFormat(this.getLocation(), { month: t || "long" }).format(F(e));
2249
2179
  } catch (e) {
2250
2180
  this.errorCenter.on({
2251
2181
  group: "intl",
@@ -2279,7 +2209,7 @@ var R = class e {
2279
2209
  }
2280
2210
  weekday(e, t) {
2281
2211
  try {
2282
- if (this.hasIntlDateTimeFormat()) return new Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }).format(L(e));
2212
+ if (this.hasIntlDateTimeFormat()) return new Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }).format(F(e));
2283
2213
  } catch (e) {
2284
2214
  this.errorCenter.on({
2285
2215
  group: "intl",
@@ -2381,15 +2311,20 @@ var R = class e {
2381
2311
  "second"
2382
2312
  ].indexOf(e) !== -1 && (n.second = "2-digit")), n;
2383
2313
  }
2384
- }, z = {}, B = {}, it = class e {
2385
- constructor(e, t = "date", n = k.getLocation()) {
2386
- w(this, "type", void 0), w(this, "code", void 0), w(this, "date", void 0), w(this, "hour24", !1), w(this, "watch", void 0), this.type = t, this.code = n, this.date = L(e), isNaN(this.date.getTime()) && T.on({
2314
+ }, L = {}, R = {}, nt = class e {
2315
+ type;
2316
+ code;
2317
+ date;
2318
+ hour24 = !1;
2319
+ watch;
2320
+ constructor(e, t = "date", n = O.getLocation()) {
2321
+ this.type = t, this.code = n, this.date = F(e), isNaN(this.date.getTime()) && w.on({
2387
2322
  group: "intl",
2388
2323
  code: "invalid"
2389
2324
  });
2390
2325
  }
2391
2326
  getIntl() {
2392
- return R.getInstance(this.code);
2327
+ return I.getInstance(this.code);
2393
2328
  }
2394
2329
  getDate() {
2395
2330
  return this.date;
@@ -2492,7 +2427,7 @@ var R = class e {
2492
2427
  ].indexOf(this.type) !== -1 && (i = n.locale("time"))), `${r.join("-")}${i ? `T${i}${t ? n.getTimeZone() : ""}` : ""}`;
2493
2428
  }
2494
2429
  setDate(e) {
2495
- return this.date = L(e), this.update(), this;
2430
+ return this.date = F(e), this.update(), this;
2496
2431
  }
2497
2432
  setType(e) {
2498
2433
  return this.type = e, this.update(), this;
@@ -2638,30 +2573,30 @@ var R = class e {
2638
2573
  return `${e >= 0 ? "+" : "-"}${t}`;
2639
2574
  }
2640
2575
  update() {
2641
- var e;
2642
- return (e = this.watch) == null || e.call(this, this.date, this.type, this.hour24), this;
2576
+ return this.watch?.(this.date, this.type, this.hour24), this;
2643
2577
  }
2644
2578
  };
2645
2579
  //#endregion
2646
2580
  //#region src/functions/getItemByPath.ts
2647
- function V(e, n) {
2648
- var r;
2581
+ function z(e, n) {
2649
2582
  if (!l(n, !0)) return;
2650
- let i = oe(n, ".", 2), a = i[0];
2651
- return a && e != null && e[a] && t(e[a]) && i != null && i[1] ? V(e[a], i[1]) : (r = e == null ? void 0 : e[a]) == null ? void 0 : r;
2583
+ let r = ae(n, ".", 2), i = r[0];
2584
+ return i && e?.[i] && t(e[i]) && r?.[1] ? z(e[i], r[1]) : e?.[i] ?? void 0;
2652
2585
  }
2653
2586
  //#endregion
2654
2587
  //#region src/functions/toCamelCase.ts
2655
- function at(e) {
2588
+ function rt(e) {
2656
2589
  return e.toString().trim().replace(/[^\w-. ]+/g, "").replace(/[ .]+/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (e) => `${e.toLowerCase()}`).replace(/-+([a-zA-Z0-9])/g, (...e) => `${String(e[1]).toUpperCase()}`).replace(/^([A-Z])/, (e) => `${e.toLowerCase()}`);
2657
2590
  }
2658
2591
  //#endregion
2659
2592
  //#region src/types/formattersTypes.ts
2660
- var H = /* @__PURE__ */ function(e) {
2593
+ var B = /* @__PURE__ */ function(e) {
2661
2594
  return e.currency = "currency", e.date = "date", e.name = "name", e.number = "number", e.plural = "plural", e.unit = "unit", e;
2662
- }({}), ot = class {
2595
+ }({}), it = class {
2596
+ options;
2597
+ list;
2663
2598
  constructor(e, t) {
2664
- w(this, "options", void 0), w(this, "list", void 0), this.options = e, this.list = t;
2599
+ this.options = e, this.list = t;
2665
2600
  }
2666
2601
  is() {
2667
2602
  return !!this.list;
@@ -2673,7 +2608,7 @@ var H = /* @__PURE__ */ function(e) {
2673
2608
  return this.list ? this.isArray() ? this.list.length : 1 : 0;
2674
2609
  }
2675
2610
  getList() {
2676
- return this.list ? j(this.list) : [];
2611
+ return this.list ? A(this.list) : [];
2677
2612
  }
2678
2613
  getOptions() {
2679
2614
  return this.options;
@@ -2691,52 +2626,292 @@ var H = /* @__PURE__ */ function(e) {
2691
2626
  getFormatData(e) {
2692
2627
  let t = {};
2693
2628
  return r(this.options, (n, r) => {
2694
- let i = `${at(r)}Format`, a = V(e, r);
2695
- n != null && n.transformation ? l(a) ? t[i] = n.transformation(a, e, n.options) : t[i] = "" : t[i] = this.transformation(a, e, n.type, n.options);
2629
+ let i = `${rt(r)}Format`, a = z(e, r);
2630
+ n?.transformation ? l(a) ? t[i] = n.transformation(a, e, n.options) : t[i] = "" : t[i] = this.transformation(a, e, n.type, n.options);
2696
2631
  }), t;
2697
2632
  }
2698
2633
  transformation(e, t, n, r) {
2699
- if (l(e) || n === H.name) switch (n) {
2700
- case H.currency: return this.formatCurrency(e, t, r);
2701
- case H.date: return this.formatDate(e, r);
2702
- case H.name: return this.formatName(t, r);
2703
- case H.number: return this.formatNumber(e, r);
2704
- case H.plural: return this.formatPlural(e, r);
2705
- case H.unit: return this.formatUnit(e, r);
2634
+ if (l(e) || n === B.name) switch (n) {
2635
+ case B.currency: return this.formatCurrency(e, t, r);
2636
+ case B.date: return this.formatDate(e, r);
2637
+ case B.name: return this.formatName(t, r);
2638
+ case B.number: return this.formatNumber(e, r);
2639
+ case B.plural: return this.formatPlural(e, r);
2640
+ case B.unit: return this.formatUnit(e, r);
2706
2641
  default: return String(e);
2707
2642
  }
2708
2643
  return "";
2709
2644
  }
2710
2645
  formatCurrency(e, t, n) {
2711
- var r;
2712
- let i = n != null && n.currencyPropName ? V(t, n.currencyPropName) : t == null ? void 0 : t.currency;
2713
- return R.getInstance().currency(e, (r = n == null ? void 0 : n.options) == null ? i : r, n == null ? void 0 : n.numberOnly);
2646
+ let r = n?.currencyPropName ? z(t, n.currencyPropName) : t?.currency;
2647
+ return I.getInstance().currency(e, n?.options ?? r, n?.numberOnly);
2714
2648
  }
2715
2649
  formatDate(e, t) {
2716
- return R.getInstance().date(e, t == null ? void 0 : t.type, t == null ? void 0 : t.options, t == null ? void 0 : t.hour24);
2650
+ return I.getInstance().date(e, t?.type, t?.options, t?.hour24);
2717
2651
  }
2718
2652
  formatName(e, t) {
2719
- var n, r, i;
2720
- let a = V(e, (n = t == null ? void 0 : t.lastPropName) == null ? "lastName" : n), o = V(e, (r = t == null ? void 0 : t.firstPropName) == null ? "firstName" : r), s = V(e, (i = t == null ? void 0 : t.surname) == null ? "surname" : i);
2721
- return a && o ? R.getInstance().fullName(a, o, s, t == null ? void 0 : t.short) : "";
2653
+ let n = z(e, t?.lastPropName ?? "lastName"), r = z(e, t?.firstPropName ?? "firstName"), i = z(e, t?.surname ?? "surname");
2654
+ return n && r ? I.getInstance().fullName(n, r, i, t?.short) : "";
2722
2655
  }
2723
2656
  formatNumber(e, t) {
2724
- return R.getInstance().number(e, t == null ? void 0 : t.options);
2657
+ return I.getInstance().number(e, t?.options);
2725
2658
  }
2726
2659
  formatPlural(e, t) {
2727
- return t && t.words ? R.getInstance().plural(e, t == null ? void 0 : t.words, t == null ? void 0 : t.options, t == null ? void 0 : t.optionsNumber) : e;
2660
+ return t && t.words ? I.getInstance().plural(e, t?.words, t?.options, t?.optionsNumber) : e;
2728
2661
  }
2729
2662
  formatUnit(e, t) {
2730
- return t && t.unit ? R.getInstance().unit(e, t.unit) : e;
2731
- }
2732
- }, st = "f", ct = class e {
2733
- constructor(e = k.getLocation()) {
2734
- w(this, "code", void 0), this.code = e;
2663
+ return t && t.unit ? I.getInstance().unit(e, t.unit) : e;
2664
+ }
2665
+ }, at = "f", ot = class e {
2666
+ code;
2667
+ static flags = {
2668
+ RU: "f-ru",
2669
+ FR: "f-fr",
2670
+ GB: "f-gb",
2671
+ US: "f-us",
2672
+ DE: "f-de",
2673
+ ES: "f-es",
2674
+ VN: "f-vn",
2675
+ CN: "f-cn",
2676
+ IT: "f-it",
2677
+ JP: "f-jp",
2678
+ KR: "f-kr",
2679
+ PT: "f-pt",
2680
+ TR: "f-tr",
2681
+ PL: "f-pl",
2682
+ NL: "f-nl",
2683
+ UA: "f-ua",
2684
+ BY: "f-by",
2685
+ KZ: "f-kz",
2686
+ GR: "f-gr",
2687
+ CZ: "f-cz",
2688
+ HU: "f-hu",
2689
+ RO: "f-ro",
2690
+ BG: "f-bg",
2691
+ HR: "f-hr",
2692
+ RS: "f-rs",
2693
+ SK: "f-sk",
2694
+ SI: "f-si",
2695
+ LT: "f-lt",
2696
+ LV: "f-lv",
2697
+ EE: "f-ee",
2698
+ FI: "f-fi",
2699
+ SE: "f-se",
2700
+ NO: "f-no",
2701
+ DK: "f-dk",
2702
+ IL: "f-il",
2703
+ TH: "f-th",
2704
+ ID: "f-id",
2705
+ MY: "f-my",
2706
+ PH: "f-ph",
2707
+ SA: "f-sa",
2708
+ IR: "f-ir",
2709
+ PK: "f-pk",
2710
+ AM: "f-am",
2711
+ GE: "f-ge",
2712
+ AZ: "f-az",
2713
+ TJ: "f-tj",
2714
+ KG: "f-kg",
2715
+ UZ: "f-uz",
2716
+ TM: "f-tm",
2717
+ MN: "f-mn",
2718
+ AD: "f-ad",
2719
+ AE: "f-ae",
2720
+ AF: "f-af",
2721
+ AG: "f-ag",
2722
+ AI: "f-ai",
2723
+ AL: "f-al",
2724
+ AN: "f-an",
2725
+ AO: "f-ao",
2726
+ AQ: "f-aq",
2727
+ AR: "f-ar",
2728
+ AS: "f-as",
2729
+ AT: "f-at",
2730
+ AU: "f-au",
2731
+ AW: "f-aw",
2732
+ BA: "f-ba",
2733
+ BB: "f-bb",
2734
+ BD: "f-bd",
2735
+ BE: "f-be",
2736
+ BF: "f-bf",
2737
+ BH: "f-bh",
2738
+ BI: "f-bi",
2739
+ BJ: "f-bj",
2740
+ BL: "f-bl",
2741
+ BM: "f-bm",
2742
+ BN: "f-bn",
2743
+ BO: "f-bo",
2744
+ BR: "f-br",
2745
+ BS: "f-bs",
2746
+ BT: "f-bt",
2747
+ BW: "f-bw",
2748
+ BZ: "f-bz",
2749
+ CA: "f-ca",
2750
+ CC: "f-cc",
2751
+ CD: "f-cd",
2752
+ CF: "f-cf",
2753
+ CG: "f-cg",
2754
+ CH: "f-ch",
2755
+ CI: "f-ci",
2756
+ CK: "f-ck",
2757
+ CL: "f-cl",
2758
+ CM: "f-cm",
2759
+ CO: "f-co",
2760
+ CR: "f-cr",
2761
+ CU: "f-cu",
2762
+ CV: "f-cv",
2763
+ CW: "f-cw",
2764
+ CX: "f-cx",
2765
+ CY: "f-cy",
2766
+ DJ: "f-dj",
2767
+ DM: "f-dm",
2768
+ DZ: "f-dz",
2769
+ EC: "f-ec",
2770
+ EG: "f-eg",
2771
+ EH: "f-eh",
2772
+ ER: "f-er",
2773
+ ET: "f-et",
2774
+ FJ: "f-fj",
2775
+ FK: "f-fk",
2776
+ FM: "f-fm",
2777
+ FO: "f-fo",
2778
+ GA: "f-ga",
2779
+ GD: "f-gd",
2780
+ GF: "f-gf",
2781
+ GG: "f-gg",
2782
+ GH: "f-gh",
2783
+ GI: "f-gi",
2784
+ GL: "f-gl",
2785
+ GM: "f-gm",
2786
+ GN: "f-gn",
2787
+ GQ: "f-gq",
2788
+ GT: "f-gt",
2789
+ GU: "f-gu",
2790
+ GW: "f-gw",
2791
+ GY: "f-gy",
2792
+ HK: "f-hk",
2793
+ HN: "f-hn",
2794
+ HT: "f-ht",
2795
+ IE: "f-ie",
2796
+ IM: "f-im",
2797
+ IO: "f-io",
2798
+ IQ: "f-iq",
2799
+ IS: "f-is",
2800
+ JE: "f-je",
2801
+ JM: "f-jm",
2802
+ JO: "f-jo",
2803
+ KE: "f-ke",
2804
+ KH: "f-kh",
2805
+ KI: "f-ki",
2806
+ KM: "f-km",
2807
+ KN: "f-kn",
2808
+ KP: "f-kp",
2809
+ KW: "f-kw",
2810
+ KY: "f-ky",
2811
+ LA: "f-la",
2812
+ LB: "f-lb",
2813
+ LC: "f-lc",
2814
+ LI: "f-li",
2815
+ LK: "f-lk",
2816
+ LR: "f-lr",
2817
+ LS: "f-ls",
2818
+ LU: "f-lu",
2819
+ LY: "f-ly",
2820
+ MA: "f-ma",
2821
+ MC: "f-mc",
2822
+ MD: "f-md",
2823
+ ME: "f-me",
2824
+ MF: "f-mf",
2825
+ MG: "f-mg",
2826
+ MH: "f-mh",
2827
+ MK: "f-mk",
2828
+ ML: "f-ml",
2829
+ MM: "f-mm",
2830
+ MO: "f-mo",
2831
+ MP: "f-mp",
2832
+ MQ: "f-mq",
2833
+ MR: "f-mr",
2834
+ MS: "f-ms",
2835
+ MT: "f-mt",
2836
+ MU: "f-mu",
2837
+ MV: "f-mv",
2838
+ MW: "f-mw",
2839
+ MX: "f-mx",
2840
+ MZ: "f-mz",
2841
+ NA: "f-na",
2842
+ NC: "f-nc",
2843
+ NE: "f-ne",
2844
+ NF: "f-nf",
2845
+ NG: "f-ng",
2846
+ NI: "f-ni",
2847
+ NP: "f-np",
2848
+ NR: "f-nr",
2849
+ NU: "f-nu",
2850
+ NZ: "f-nz",
2851
+ OM: "f-om",
2852
+ PA: "f-pa",
2853
+ PE: "f-pe",
2854
+ PF: "f-pf",
2855
+ PG: "f-pg",
2856
+ PM: "f-pm",
2857
+ PN: "f-pn",
2858
+ PR: "f-pr",
2859
+ PS: "f-ps",
2860
+ PW: "f-pw",
2861
+ PY: "f-py",
2862
+ QA: "f-qa",
2863
+ RE: "f-re",
2864
+ RW: "f-rw",
2865
+ SB: "f-sb",
2866
+ SC: "f-sc",
2867
+ SD: "f-sd",
2868
+ SG: "f-sg",
2869
+ SH: "f-sh",
2870
+ SJ: "f-sj",
2871
+ SL: "f-sl",
2872
+ SM: "f-sm",
2873
+ SN: "f-sn",
2874
+ SO: "f-so",
2875
+ SR: "f-sr",
2876
+ SS: "f-ss",
2877
+ ST: "f-st",
2878
+ SV: "f-sv",
2879
+ SX: "f-sx",
2880
+ SY: "f-sy",
2881
+ SZ: "f-sz",
2882
+ TC: "f-tc",
2883
+ TD: "f-td",
2884
+ TG: "f-tg",
2885
+ TK: "f-tk",
2886
+ TL: "f-tl",
2887
+ TN: "f-tn",
2888
+ TO: "f-to",
2889
+ TT: "f-tt",
2890
+ TV: "f-tv",
2891
+ TW: "f-tw",
2892
+ TZ: "f-tz",
2893
+ UG: "f-ug",
2894
+ UY: "f-uy",
2895
+ VA: "f-va",
2896
+ VC: "f-vc",
2897
+ VE: "f-ve",
2898
+ VG: "f-vg",
2899
+ VI: "f-vi",
2900
+ VU: "f-vu",
2901
+ WF: "f-wf",
2902
+ WS: "f-ws",
2903
+ YE: "f-ye",
2904
+ YT: "f-yt",
2905
+ ZA: "f-za",
2906
+ ZM: "f-zm",
2907
+ ZW: "f-zw"
2908
+ };
2909
+ constructor(e = O.getLocation()) {
2910
+ this.code = e;
2735
2911
  }
2736
2912
  get(t = this.getCode()) {
2737
- let n = k.find(t);
2913
+ let n = O.find(t);
2738
2914
  if (n) {
2739
- var r;
2740
2915
  let t = this.getCountry(n);
2741
2916
  return {
2742
2917
  language: this.getLanguageName(n),
@@ -2744,7 +2919,7 @@ var H = /* @__PURE__ */ function(e) {
2744
2919
  country: t,
2745
2920
  countryCode: n.country,
2746
2921
  standard: n.standard,
2747
- icon: (r = e.flags) == null ? void 0 : r[n.country],
2922
+ icon: e.flags?.[n.country],
2748
2923
  label: t,
2749
2924
  value: n.country,
2750
2925
  phoneCode: n.phoneCode
@@ -2760,55 +2935,54 @@ var H = /* @__PURE__ */ function(e) {
2760
2935
  };
2761
2936
  }
2762
2937
  getCode() {
2763
- return this.code || k.getLocation();
2938
+ return this.code || O.getLocation();
2764
2939
  }
2765
2940
  getFlag(e = this.getCode()) {
2766
- var t;
2767
- return (t = this.get(e)) == null ? void 0 : t.icon;
2941
+ return this.get(e)?.icon;
2768
2942
  }
2769
2943
  getList(e, t = !0) {
2770
2944
  let n = r(this.getCodes(e), (e) => this.get(e));
2771
- return t ? new R().sort(n, (e, t) => [e.label, t.label]) : n;
2945
+ return t ? new I().sort(n, (e, t) => [e.label, t.label]) : n;
2772
2946
  }
2773
2947
  getListLanguage(e, t = !0) {
2774
2948
  let n = [], i = /* @__PURE__ */ new Set();
2775
2949
  return r(this.getCodes(e), (e) => {
2776
2950
  let t = this.getLanguage(e);
2777
2951
  t && !i.has(t.value) && (n.push(t), i.add(t.value));
2778
- }), t ? new R().sort(n, (e, t) => [e.label, t.label]) : n;
2952
+ }), t ? new I().sort(n, (e, t) => [e.label, t.label]) : n;
2779
2953
  }
2780
2954
  getNational(t, n = !0) {
2781
2955
  let i = r(this.getList(t, !1), (t) => {
2782
2956
  let n = new e(t.standard).get(t.standard);
2783
2957
  return {
2784
2958
  ...t,
2785
- description: n == null ? void 0 : n.country,
2786
- nationalLanguage: n == null ? void 0 : n.language,
2787
- nationalCountry: n == null ? void 0 : n.country
2959
+ description: n?.country,
2960
+ nationalLanguage: n?.language,
2961
+ nationalCountry: n?.country
2788
2962
  };
2789
2963
  });
2790
- return n ? new R().sort(i, (e, t) => [e.label, t.label]) : i;
2964
+ return n ? new I().sort(i, (e, t) => [e.label, t.label]) : i;
2791
2965
  }
2792
2966
  getNationalLanguage(t, n = !0) {
2793
2967
  let i = r(this.getListLanguage(t, !1), (t) => {
2794
2968
  let n = new e(t.standard).getLanguage(t.standard);
2795
2969
  return {
2796
2970
  ...t,
2797
- description: n == null ? void 0 : n.language,
2798
- nationalLanguage: n == null ? void 0 : n.language,
2799
- nationalCountry: n == null ? void 0 : n.country
2971
+ description: n?.language,
2972
+ nationalLanguage: n?.language,
2973
+ nationalCountry: n?.country
2800
2974
  };
2801
2975
  });
2802
- return n ? new R().sort(i, (e, t) => [e.label, t.label]) : i;
2976
+ return n ? new I().sort(i, (e, t) => [e.label, t.label]) : i;
2803
2977
  }
2804
2978
  setCode(e) {
2805
2979
  return this.code = e, this;
2806
2980
  }
2807
2981
  getLocation() {
2808
- return new R(this.code);
2982
+ return new I(this.code);
2809
2983
  }
2810
2984
  getCodes(t) {
2811
- return t == null ? Object.keys(e.flags) : t;
2985
+ return t ?? Object.keys(e.flags);
2812
2986
  }
2813
2987
  getLanguageName(e) {
2814
2988
  return this.getLocation().languageName(e.language);
@@ -2816,261 +2990,16 @@ var H = /* @__PURE__ */ function(e) {
2816
2990
  getCountry(e) {
2817
2991
  return this.getLocation().countryName(e.country);
2818
2992
  }
2819
- };
2820
- w(ct, "flags", {
2821
- RU: "f-ru",
2822
- FR: "f-fr",
2823
- GB: "f-gb",
2824
- US: "f-us",
2825
- DE: "f-de",
2826
- ES: "f-es",
2827
- VN: "f-vn",
2828
- CN: "f-cn",
2829
- IT: "f-it",
2830
- JP: "f-jp",
2831
- KR: "f-kr",
2832
- PT: "f-pt",
2833
- TR: "f-tr",
2834
- PL: "f-pl",
2835
- NL: "f-nl",
2836
- UA: "f-ua",
2837
- BY: "f-by",
2838
- KZ: "f-kz",
2839
- GR: "f-gr",
2840
- CZ: "f-cz",
2841
- HU: "f-hu",
2842
- RO: "f-ro",
2843
- BG: "f-bg",
2844
- HR: "f-hr",
2845
- RS: "f-rs",
2846
- SK: "f-sk",
2847
- SI: "f-si",
2848
- LT: "f-lt",
2849
- LV: "f-lv",
2850
- EE: "f-ee",
2851
- FI: "f-fi",
2852
- SE: "f-se",
2853
- NO: "f-no",
2854
- DK: "f-dk",
2855
- IL: "f-il",
2856
- TH: "f-th",
2857
- ID: "f-id",
2858
- MY: "f-my",
2859
- PH: "f-ph",
2860
- SA: "f-sa",
2861
- IR: "f-ir",
2862
- PK: "f-pk",
2863
- AM: "f-am",
2864
- GE: "f-ge",
2865
- AZ: "f-az",
2866
- TJ: "f-tj",
2867
- KG: "f-kg",
2868
- UZ: "f-uz",
2869
- TM: "f-tm",
2870
- MN: "f-mn",
2871
- AD: "f-ad",
2872
- AE: "f-ae",
2873
- AF: "f-af",
2874
- AG: "f-ag",
2875
- AI: "f-ai",
2876
- AL: "f-al",
2877
- AN: "f-an",
2878
- AO: "f-ao",
2879
- AQ: "f-aq",
2880
- AR: "f-ar",
2881
- AS: "f-as",
2882
- AT: "f-at",
2883
- AU: "f-au",
2884
- AW: "f-aw",
2885
- BA: "f-ba",
2886
- BB: "f-bb",
2887
- BD: "f-bd",
2888
- BE: "f-be",
2889
- BF: "f-bf",
2890
- BH: "f-bh",
2891
- BI: "f-bi",
2892
- BJ: "f-bj",
2893
- BL: "f-bl",
2894
- BM: "f-bm",
2895
- BN: "f-bn",
2896
- BO: "f-bo",
2897
- BR: "f-br",
2898
- BS: "f-bs",
2899
- BT: "f-bt",
2900
- BW: "f-bw",
2901
- BZ: "f-bz",
2902
- CA: "f-ca",
2903
- CC: "f-cc",
2904
- CD: "f-cd",
2905
- CF: "f-cf",
2906
- CG: "f-cg",
2907
- CH: "f-ch",
2908
- CI: "f-ci",
2909
- CK: "f-ck",
2910
- CL: "f-cl",
2911
- CM: "f-cm",
2912
- CO: "f-co",
2913
- CR: "f-cr",
2914
- CU: "f-cu",
2915
- CV: "f-cv",
2916
- CW: "f-cw",
2917
- CX: "f-cx",
2918
- CY: "f-cy",
2919
- DJ: "f-dj",
2920
- DM: "f-dm",
2921
- DZ: "f-dz",
2922
- EC: "f-ec",
2923
- EG: "f-eg",
2924
- EH: "f-eh",
2925
- ER: "f-er",
2926
- ET: "f-et",
2927
- FJ: "f-fj",
2928
- FK: "f-fk",
2929
- FM: "f-fm",
2930
- FO: "f-fo",
2931
- GA: "f-ga",
2932
- GD: "f-gd",
2933
- GF: "f-gf",
2934
- GG: "f-gg",
2935
- GH: "f-gh",
2936
- GI: "f-gi",
2937
- GL: "f-gl",
2938
- GM: "f-gm",
2939
- GN: "f-gn",
2940
- GQ: "f-gq",
2941
- GT: "f-gt",
2942
- GU: "f-gu",
2943
- GW: "f-gw",
2944
- GY: "f-gy",
2945
- HK: "f-hk",
2946
- HN: "f-hn",
2947
- HT: "f-ht",
2948
- IE: "f-ie",
2949
- IM: "f-im",
2950
- IO: "f-io",
2951
- IQ: "f-iq",
2952
- IS: "f-is",
2953
- JE: "f-je",
2954
- JM: "f-jm",
2955
- JO: "f-jo",
2956
- KE: "f-ke",
2957
- KH: "f-kh",
2958
- KI: "f-ki",
2959
- KM: "f-km",
2960
- KN: "f-kn",
2961
- KP: "f-kp",
2962
- KW: "f-kw",
2963
- KY: "f-ky",
2964
- LA: "f-la",
2965
- LB: "f-lb",
2966
- LC: "f-lc",
2967
- LI: "f-li",
2968
- LK: "f-lk",
2969
- LR: "f-lr",
2970
- LS: "f-ls",
2971
- LU: "f-lu",
2972
- LY: "f-ly",
2973
- MA: "f-ma",
2974
- MC: "f-mc",
2975
- MD: "f-md",
2976
- ME: "f-me",
2977
- MF: "f-mf",
2978
- MG: "f-mg",
2979
- MH: "f-mh",
2980
- MK: "f-mk",
2981
- ML: "f-ml",
2982
- MM: "f-mm",
2983
- MO: "f-mo",
2984
- MP: "f-mp",
2985
- MQ: "f-mq",
2986
- MR: "f-mr",
2987
- MS: "f-ms",
2988
- MT: "f-mt",
2989
- MU: "f-mu",
2990
- MV: "f-mv",
2991
- MW: "f-mw",
2992
- MX: "f-mx",
2993
- MZ: "f-mz",
2994
- NA: "f-na",
2995
- NC: "f-nc",
2996
- NE: "f-ne",
2997
- NF: "f-nf",
2998
- NG: "f-ng",
2999
- NI: "f-ni",
3000
- NP: "f-np",
3001
- NR: "f-nr",
3002
- NU: "f-nu",
3003
- NZ: "f-nz",
3004
- OM: "f-om",
3005
- PA: "f-pa",
3006
- PE: "f-pe",
3007
- PF: "f-pf",
3008
- PG: "f-pg",
3009
- PM: "f-pm",
3010
- PN: "f-pn",
3011
- PR: "f-pr",
3012
- PS: "f-ps",
3013
- PW: "f-pw",
3014
- PY: "f-py",
3015
- QA: "f-qa",
3016
- RE: "f-re",
3017
- RW: "f-rw",
3018
- SB: "f-sb",
3019
- SC: "f-sc",
3020
- SD: "f-sd",
3021
- SG: "f-sg",
3022
- SH: "f-sh",
3023
- SJ: "f-sj",
3024
- SL: "f-sl",
3025
- SM: "f-sm",
3026
- SN: "f-sn",
3027
- SO: "f-so",
3028
- SR: "f-sr",
3029
- SS: "f-ss",
3030
- ST: "f-st",
3031
- SV: "f-sv",
3032
- SX: "f-sx",
3033
- SY: "f-sy",
3034
- SZ: "f-sz",
3035
- TC: "f-tc",
3036
- TD: "f-td",
3037
- TG: "f-tg",
3038
- TK: "f-tk",
3039
- TL: "f-tl",
3040
- TN: "f-tn",
3041
- TO: "f-to",
3042
- TT: "f-tt",
3043
- TV: "f-tv",
3044
- TW: "f-tw",
3045
- TZ: "f-tz",
3046
- UG: "f-ug",
3047
- UY: "f-uy",
3048
- VA: "f-va",
3049
- VC: "f-vc",
3050
- VE: "f-ve",
3051
- VG: "f-vg",
3052
- VI: "f-vi",
3053
- VU: "f-vu",
3054
- WF: "f-wf",
3055
- WS: "f-ws",
3056
- YE: "f-ye",
3057
- YT: "f-yt",
3058
- ZA: "f-za",
3059
- ZM: "f-zm",
3060
- ZW: "f-zw"
3061
- });
3062
- //#endregion
3063
- //#region src/classes/GeoPhone.ts
3064
- var lt = class {
2993
+ }, st = class {
2994
+ static list;
2995
+ static map;
3065
2996
  static get(e) {
3066
2997
  return this.getList().find((t) => e === t.value);
3067
2998
  }
3068
2999
  static getByPhone(e) {
3069
3000
  let t = this.toNumber(e), n = [""], r = this.getMap(), i;
3070
- for (let e of t) if (n[n.length - 1] += e, e in r) {
3071
- var a, o, s;
3072
- (a = r[e]) != null && a.value && (i = r[e], n.push("")), r = (o = (s = r[e]) == null ? void 0 : s.next) == null ? {} : o;
3073
- } else break;
3001
+ for (let e of t) if (n[n.length - 1] += e, e in r) r[e]?.value && (i = r[e], n.push("")), r = r[e]?.next ?? {};
3002
+ else break;
3074
3003
  return i ? (n.pop(), {
3075
3004
  item: i,
3076
3005
  phone: t.join("").slice(n.join("").length)
@@ -3081,18 +3010,13 @@ var lt = class {
3081
3010
  }
3082
3011
  static getByCode(e) {
3083
3012
  let t = this.get(e);
3084
- if (t) {
3085
- var n;
3086
- return (n = this.getByPhone(t.phone.toString())) == null ? void 0 : n.item;
3087
- }
3013
+ if (t) return this.getByPhone(t.phone.toString())?.item;
3088
3014
  }
3089
3015
  static getList() {
3090
- var e;
3091
- return this.list || this.makeList(), (e = this.list) == null ? [] : e;
3016
+ return this.list || this.makeList(), this.list ?? [];
3092
3017
  }
3093
3018
  static getMap() {
3094
- var e;
3095
- return this.map || this.makeMap(), (e = this.map) == null ? {} : e;
3019
+ return this.map || this.makeMap(), this.map ?? {};
3096
3020
  }
3097
3021
  static toMask(e, t) {
3098
3022
  if (l(e) && Array.isArray(t) && t.length > 0) {
@@ -3113,15 +3037,14 @@ var lt = class {
3113
3037
  return "=";
3114
3038
  }
3115
3039
  static getUnnecessaryLength(e) {
3116
- var t, n;
3117
- return (t = (n = e.match(/\*/g)) == null ? void 0 : n.length) == null ? 0 : t;
3040
+ return e.match(/\*/g)?.length ?? 0;
3118
3041
  }
3119
3042
  static makeList() {
3120
- let e = r(k.getList(), (e) => {
3121
- if (e != null && e.phoneMask) return {
3122
- phone: (e == null ? void 0 : e.phoneCode) && Number(e.phoneCode.replace(/[^0-9]+/g, "")) || void 0,
3123
- within: (e == null ? void 0 : e.phoneWithin) || 0,
3124
- mask: j(e.phoneMask),
3043
+ let e = r(O.getList(), (e) => {
3044
+ if (e?.phoneMask) return {
3045
+ phone: e?.phoneCode && Number(e.phoneCode.replace(/[^0-9]+/g, "")) || void 0,
3046
+ within: e?.phoneWithin || 0,
3047
+ mask: A(e.phoneMask),
3125
3048
  value: e.country
3126
3049
  };
3127
3050
  });
@@ -3132,7 +3055,6 @@ var lt = class {
3132
3055
  e.mask.forEach((t) => {
3133
3056
  let n = this.map, r;
3134
3057
  if (this.toNumber(t).forEach((e) => {
3135
- var t;
3136
3058
  e in n || (n[e] = {
3137
3059
  items: [],
3138
3060
  info: void 0,
@@ -3140,7 +3062,7 @@ var lt = class {
3140
3062
  mask: [],
3141
3063
  maskFull: [],
3142
3064
  next: {}
3143
- }), r = n[e], n = (t = r == null ? void 0 : r.next) == null ? {} : t;
3065
+ }), r = n[e], n = r?.next ?? {};
3144
3066
  }), r) {
3145
3067
  r.value === void 0 && (r.info = e, r.value = e.value);
3146
3068
  let n = this.toWithin(t, e.within);
@@ -3159,11 +3081,7 @@ var lt = class {
3159
3081
  static toWithin(e, t) {
3160
3082
  return e.replace(/\*/, this.getWithinSymbol(t));
3161
3083
  }
3162
- };
3163
- w(lt, "list", void 0), w(lt, "map", void 0);
3164
- //#endregion
3165
- //#region src/classes/GeoUnit.ts
3166
- var U = {}, ut = {
3084
+ }, V = {}, ct = {
3167
3085
  "millimeter->inch": .03937007874,
3168
3086
  "centimeter->inch": .3937007874,
3169
3087
  "meter->foot": 3.280839895,
@@ -3176,16 +3094,17 @@ var U = {}, ut = {
3176
3094
  "milliliter->fluid-ounce": .0338140227,
3177
3095
  "liter->gallon": .2641720524,
3178
3096
  "kilometer-per-hour->mile-per-hour": .621371192
3179
- }, dt = class e {
3180
- static getInstance(t = k.getLocation()) {
3181
- let n = k.find(t).standard;
3182
- return n in U ? U[n] : new e(t);
3183
- }
3184
- constructor(e = k.getLocation()) {
3185
- w(this, "geo", void 0), this.geo = k.find(e);
3097
+ }, lt = class e {
3098
+ geo;
3099
+ static getInstance(t = O.getLocation()) {
3100
+ let n = O.find(t).standard;
3101
+ return n in V ? V[n] : new e(t);
3102
+ }
3103
+ constructor(e = O.getLocation()) {
3104
+ this.geo = O.find(e);
3186
3105
  let t = this.getLocation();
3187
- if (t in U) return U[t];
3188
- U[t] = this;
3106
+ if (t in V) return V[t];
3107
+ V[t] = this;
3189
3108
  }
3190
3109
  getLocation() {
3191
3110
  return this.geo.standard;
@@ -3251,12 +3170,11 @@ var U = {}, ut = {
3251
3170
  return e === "celsius" && t === "fahrenheit";
3252
3171
  }
3253
3172
  getTargetUnit(e) {
3254
- var t;
3255
- return ((t = this.geo.unit) == null ? void 0 : t[e]) || e;
3173
+ return this.geo.unit?.[e] || e;
3256
3174
  }
3257
3175
  formatUnit(e, t, n) {
3258
- let r = b(e), i = this.getTargetUnit(t), a = this.convert(r, t, i);
3259
- return R.getInstance(this.getLocation()).unit(a, {
3176
+ let r = x(e), i = this.getTargetUnit(t), a = this.convert(r, t, i);
3177
+ return I.getInstance(this.getLocation()).unit(a, {
3260
3178
  unit: i,
3261
3179
  ...n
3262
3180
  });
@@ -3265,49 +3183,43 @@ var U = {}, ut = {
3265
3183
  if (t !== n) {
3266
3184
  if (this.isCelsiusToFahrenheit(t, n)) return this.celsiusToFahrenheit(e);
3267
3185
  let r = `${t}->${n}`;
3268
- if (r in ut) return e * ut[r];
3186
+ if (r in ct) return e * ct[r];
3269
3187
  }
3270
3188
  return e;
3271
3189
  }
3272
3190
  celsiusToFahrenheit(e) {
3273
3191
  return e * 1.8 + 32;
3274
3192
  }
3275
- }, ft = class {
3193
+ }, ut = class {
3276
3194
  static getItem() {
3277
3195
  return E.get("__ui:global-instance__", () => ({}));
3278
3196
  }
3279
3197
  static get(e) {
3280
- var t;
3281
- return (t = this.getItem()) == null ? void 0 : t[e];
3198
+ return this.getItem()?.[e];
3282
3199
  }
3283
3200
  static add(e) {
3284
3201
  let t = this.getItem();
3285
3202
  Object.keys(t).length > 0 || Object.assign(t, e);
3286
3203
  }
3287
- }, pt = class {
3288
- constructor() {
3289
- w(this, "data", void 0), w(this, "watch", {}), w(this, "block", !1), w(this, "time", void 0);
3290
- }
3204
+ }, dt = class {
3205
+ data;
3206
+ watch = {};
3207
+ block = !1;
3208
+ time;
3291
3209
  get(e, t) {
3292
3210
  let n = this.getData();
3293
3211
  return !(e in n) && t && this.set(e, t), n[e];
3294
3212
  }
3295
3213
  set(e, t) {
3296
- var n;
3297
- let r = m(t);
3298
- return r !== ((n = this.data) == null ? void 0 : n[e]) && (this.getData()[e] = r, this.update()), this;
3214
+ let n = m(t);
3215
+ return n !== this.data?.[e] && (this.getData()[e] = n, this.update()), this;
3299
3216
  }
3300
3217
  addWatch(e, t) {
3301
- if (e in this.watch) {
3302
- var n;
3303
- (n = this.watch[e]) == null || n.push(t);
3304
- } else this.watch[e] = [t];
3305
- return this;
3218
+ return e in this.watch ? this.watch[e]?.push(t) : this.watch[e] = [t], this;
3306
3219
  }
3307
3220
  removeWatch(e, t) {
3308
- var n;
3309
- let r = (n = this.watch) == null ? void 0 : n[e];
3310
- return r && (this.watch[e] = r.filter((e) => e !== t)), this;
3221
+ let n = this.watch?.[e];
3222
+ return n && (this.watch[e] = n.filter((e) => e !== t)), this;
3311
3223
  }
3312
3224
  reload() {
3313
3225
  return this.block ? setTimeout(() => this.reload(), 32) : this.initData(), this;
@@ -3321,11 +3233,10 @@ var U = {}, ut = {
3321
3233
  }
3322
3234
  makeWatch(e) {
3323
3235
  return r(this.watch, (t, n) => {
3324
- var r;
3325
- ((r = this.data) == null ? void 0 : r[n]) !== (e == null ? void 0 : e[n]) && t.forEach((t) => t(e[n]));
3236
+ this.data?.[n] !== e?.[n] && t.forEach((t) => t(e[n]));
3326
3237
  }), this;
3327
3238
  }
3328
- }, mt = class extends pt {
3239
+ }, ft = class extends dt {
3329
3240
  init() {
3330
3241
  return this.initData(), s() && addEventListener("hashchange", () => this.reload()), this;
3331
3242
  }
@@ -3333,7 +3244,7 @@ var U = {}, ut = {
3333
3244
  let e = {};
3334
3245
  if (s()) {
3335
3246
  let t = location.hash.matchAll(/([\w-]+)[:=]([^;]+)/gi);
3336
- for (let n of t) e[n[1]] = fe(n[2]);
3247
+ for (let n of t) e[n[1]] = T(n[2]);
3337
3248
  }
3338
3249
  return e;
3339
3250
  }
@@ -3351,9 +3262,9 @@ var U = {}, ut = {
3351
3262
  }
3352
3263
  return this;
3353
3264
  }
3354
- }, ht = class {
3265
+ }, pt = class {
3355
3266
  static getItem() {
3356
- return E.get("__ui:hash-instance__", () => new mt());
3267
+ return E.get("__ui:hash-instance__", () => new ft());
3357
3268
  }
3358
3269
  static get(e, t) {
3359
3270
  return this.getItem().get(e, t);
@@ -3370,29 +3281,31 @@ var U = {}, ut = {
3370
3281
  static reload() {
3371
3282
  this.getItem().reload();
3372
3283
  }
3373
- }, gt = 320, _t = "--LOAD--", vt = class {
3284
+ }, mt = 320, ht = "--LOAD--", gt = class {
3285
+ static icons = {};
3286
+ static url = "/icons/";
3374
3287
  static is(e) {
3375
3288
  return e in this.icons || this.getName(e) in this.icons;
3376
3289
  }
3377
3290
  static async get(e, t = "", n = 18e4) {
3378
3291
  let r = this.getRaw(e, t);
3379
- return typeof r == "string" ? r === _t && n > 0 ? (await this.wait(), this.get(e, t, n - gt)) : r : p(r) ? await r() : await r;
3292
+ return typeof r == "string" ? r === ht && n > 0 ? (await this.wait(), this.get(e, t, n - mt)) : r : p(r) ? await r() : await r;
3380
3293
  }
3381
3294
  static getAsync(e, t = "") {
3382
3295
  let n = this.getRaw(e, t);
3383
- return typeof n == "string" && n !== _t ? n : "";
3296
+ return typeof n == "string" && n !== ht ? n : "";
3384
3297
  }
3385
3298
  static getNameList() {
3386
3299
  return r(this.icons, (e, t) => t.replace(/^@/, ""));
3387
3300
  }
3388
3301
  static getUrlGlobal() {
3389
- return `${I.isLocalhost(), ""}${this.url}`;
3302
+ return this.url;
3390
3303
  }
3391
3304
  static add(e, t) {
3392
3305
  this.icons[this.getName(e)] = t;
3393
3306
  }
3394
3307
  static addLoad(e) {
3395
- this.icons[this.getName(e)] = _t;
3308
+ this.icons[this.getName(e)] = ht;
3396
3309
  }
3397
3310
  static addGlobal(e, t) {
3398
3311
  this.icons[this.getName(e)] = `${this.getUrlGlobal()}${t}`;
@@ -3410,26 +3323,23 @@ var U = {}, ut = {
3410
3323
  return `@${e}`;
3411
3324
  }
3412
3325
  static getRaw(e, t = "") {
3413
- var n, r, i, a;
3414
- return (n = (r = (i = this.icons) == null ? void 0 : i[this.getName(e)]) == null ? (a = this.icons) == null ? void 0 : a[e] : r) == null ? `${e.replace(/^@/, t || this.url)}.svg` : n;
3326
+ return this.icons?.[this.getName(e)] ?? this.icons?.[e] ?? `${e.replace(/^@/, t || this.url)}.svg`;
3415
3327
  }
3416
3328
  static wait() {
3417
- return new Promise((e) => setTimeout(() => e(), gt));
3329
+ return new Promise((e) => setTimeout(() => e(), mt));
3418
3330
  }
3419
3331
  };
3420
- w(vt, "icons", {}), w(vt, "url", "/icons/");
3421
3332
  //#endregion
3422
3333
  //#region src/functions/getElementItem.ts
3423
- function yt(e, t, n) {
3424
- var r, i;
3425
- return (r = (i = A(e)) == null ? void 0 : i[t]) == null ? n : r;
3334
+ function _t(e, t, n) {
3335
+ return k(e)?.[t] ?? n;
3426
3336
  }
3427
3337
  //#endregion
3428
3338
  //#region src/functions/setElementItem.ts
3429
- function bt(e, n, i) {
3430
- let a = A(e);
3339
+ function vt(e, n, i) {
3340
+ let a = k(e);
3431
3341
  if (a) {
3432
- let e = yt(a, n);
3342
+ let e = _t(a, n);
3433
3343
  if (t(e) && t(i)) r(i, (t, n) => {
3434
3344
  e[n] = m(t);
3435
3345
  });
@@ -3442,40 +3352,39 @@ function bt(e, n, i) {
3442
3352
  }
3443
3353
  //#endregion
3444
3354
  //#region src/functions/createElement.ts
3445
- function W(e, t = "div", i, a) {
3355
+ function H(e, t = "div", i, a) {
3446
3356
  if (!s()) return;
3447
3357
  let o = document.createElement(t);
3448
3358
  return typeof i == "function" ? i(o) : n(i) && r(i, (e, t) => {
3449
- bt(o, t, e);
3450
- }), e == null || e.insertBefore(o, a == null ? null : a), o;
3359
+ vt(o, t, e);
3360
+ }), e?.insertBefore(o, a ?? null), o;
3451
3361
  }
3452
3362
  //#endregion
3453
3363
  //#region src/functions/encodeAttribute.ts
3454
- var xt = {
3364
+ var yt = {
3455
3365
  "&": "&amp;",
3456
3366
  "<": "&lt;",
3457
3367
  ">": "&gt;",
3458
3368
  "\"": "&quot;",
3459
3369
  "'": "&#39;"
3460
3370
  };
3461
- function G(e) {
3462
- return String(e).replace(/[&<>"']/g, (e) => {
3463
- var t;
3464
- return (t = xt == null ? void 0 : xt[e]) == null ? e : t;
3465
- });
3371
+ function U(e) {
3372
+ return String(e).replace(/[&<>"']/g, (e) => yt?.[e] ?? e);
3466
3373
  }
3467
3374
  //#endregion
3468
3375
  //#region src/classes/MetaManager.ts
3469
- var K = class {
3376
+ var W = class {
3377
+ listMeta;
3378
+ isProperty;
3379
+ items = {};
3470
3380
  constructor(e, t = !1) {
3471
- w(this, "listMeta", void 0), w(this, "isProperty", void 0), w(this, "items", {}), this.listMeta = e, this.isProperty = t, this.update();
3381
+ this.listMeta = e, this.isProperty = t, this.update();
3472
3382
  }
3473
3383
  getListMeta() {
3474
3384
  return this.listMeta;
3475
3385
  }
3476
3386
  get(e) {
3477
- var t;
3478
- return (t = this.items[e]) == null ? "" : t;
3387
+ return this.items[e] ?? "";
3479
3388
  }
3480
3389
  getItems() {
3481
3390
  return this.items;
@@ -3501,146 +3410,146 @@ var K = class {
3501
3410
  return this.items[e] = t, this;
3502
3411
  }
3503
3412
  setMeta(e) {
3504
- var t;
3505
3413
  if (!s()) return this;
3506
- let n = (t = this.items[e]) == null ? "" : t;
3507
- if (e === "title") return document.title = n, this;
3508
- let r = this.findMetaElement(e);
3509
- if (r) return r.content = n, this;
3510
- let i = { content: n };
3511
- return this.isProperty ? i.property = e : i.name = e, W(document.head, "meta", i), this;
3414
+ let t = this.items[e] ?? "";
3415
+ if (e === "title") return document.title = t, this;
3416
+ let n = this.findMetaElement(e);
3417
+ if (n) return n.content = t, this;
3418
+ let r = { content: t };
3419
+ return this.isProperty ? r.property = e : r.name = e, H(document.head, "meta", r), this;
3512
3420
  }
3513
3421
  toHtmlString(e) {
3514
- var t;
3515
- let n = (t = this.items[e]) == null ? "" : t;
3422
+ let t = this.items[e] ?? "";
3516
3423
  if (e === "title") return "";
3517
- let r = G(n);
3518
- return r ? `<meta ${this.getAttributeName()}="${e}" content="${r}">` : "";
3424
+ let n = U(t);
3425
+ return n ? `<meta ${this.getAttributeName()}="${e}" content="${n}">` : "";
3519
3426
  }
3520
3427
  toHtmlTitle(e) {
3521
- return me(e);
3428
+ return ue(e);
3522
3429
  }
3523
3430
  update() {
3524
3431
  return this.listMeta.forEach((e) => {
3525
- var t, n;
3526
- this.items[e] = (t = (n = this.findMetaElement(e)) == null ? void 0 : n.content) == null ? "" : t;
3432
+ this.items[e] = this.findMetaElement(e)?.content ?? "";
3527
3433
  }), this;
3528
3434
  }
3529
- }, q = /* @__PURE__ */ function(e) {
3435
+ }, G = /* @__PURE__ */ function(e) {
3530
3436
  return e.title = "title", e.description = "description", e.keywords = "keywords", e.canonical = "canonical", e.robots = "robots", e.author = "author", e;
3531
- }({}), St = /* @__PURE__ */ function(e) {
3437
+ }({}), bt = /* @__PURE__ */ function(e) {
3532
3438
  return e.indexFollow = "index, follow", e.noIndexFollow = "noindex, follow", e.indexNoFollow = "index, nofollow", e.noIndexNoFollow = "noindex, nofollow", e.noArchive = "noarchive", e.noSnippet = "nosnippet", e.noImageIndex = "noimageindex", e.images = "images", e.noTranslate = "notranslate", e.noPreview = "nopreview", e.textOnly = "textonly", e.noIndexSubpages = "noindex, noarchive", e.none = "none", e;
3533
- }({}), J = /* @__PURE__ */ function(e) {
3439
+ }({}), K = /* @__PURE__ */ function(e) {
3534
3440
  return e.title = "og:title", e.type = "og:type", e.url = "og:url", e.image = "og:image", e.description = "og:description", e.locale = "og:locale", e.siteName = "og:site_name", e.localeAlternate = "og:locale:alternate", e.imageUrl = "og:image:url", e.imageSecureUrl = "og:image:secure_url", e.imageType = "og:image:type", e.imageWidth = "og:image:width", e.imageHeight = "og:image:height", e.imageAlt = "og:image:alt", e.video = "og:video", e.videoUrl = "og:video:url", e.videoSecureUrl = "og:video:secure_url", e.videoType = "og:video:type", e.videoWidth = "og:video:width", e.videoHeight = "og:video:height", e.audio = "og:audio", e.audioSecureUrl = "og:audio:secure_url", e.audioType = "og:audio:type", e.articlePublishedTime = "article:published_time", e.articleModifiedTime = "article:modified_time", e.articleExpirationTime = "article:expiration_time", e.articleAuthor = "article:author", e.articleSection = "article:section", e.articleTag = "article:tag", e.bookAuthor = "book:author", e.bookIsbn = "book:isbn", e.bookReleaseDate = "book:release_date", e.bookTag = "book:tag", e.musicDuration = "music:duration", e.musicAlbum = "music:album", e.musicAlbumDisc = "music:album:disc", e.musicAlbumTrack = "music:album:track", e.musicMusician = "music:musician", e.musicSong = "music:song", e.musicSongDisc = "music:song:disc", e.musicSongTrack = "music:song:track", e.musicReleaseDate = "music:release_date", e.musicCreator = "music:creator", e.videoActor = "video:actor", e.videoActorRole = "video:actor:role", e.videoDirector = "video:director", e.videoWriter = "video:writer", e.videoDuration = "video:duration", e.videoReleaseDate = "video:release_date", e.videoTag = "video:tag", e.videoSeries = "video:series", e.profileFirstName = "profile:first_name", e.profileLastName = "profile:last_name", e.profileUsername = "profile:username", e.profileGender = "profile:gender", e.productBrand = "product:brand", e.productAvailability = "product:availability", e.productCondition = "product:condition", e.productPriceAmount = "product:price:amount", e.productPriceCurrency = "product:price:currency", e.productRetailerItemId = "product:retailer_item_id", e.productCategory = "product:category", e.productEan = "product:ean", e.productIsbn = "product:isbn", e.productMfrPartNo = "product:mfr_part_no", e.productUpc = "product:upc", e.productWeightValue = "product:weight:value", e.productWeightUnits = "product:weight:units", e.productColor = "product:color", e.productMaterial = "product:material", e.productPattern = "product:pattern", e.productAgeGroup = "product:age_group", e.productGender = "product:gender", e;
3535
- }({}), Ct = /* @__PURE__ */ function(e) {
3441
+ }({}), xt = /* @__PURE__ */ function(e) {
3536
3442
  return e.website = "website", e.article = "article", e.video = "video.other", e.videoTvShow = "video.tv_show", e.videoEpisode = "video.episode", e.videoMovie = "video.movie", e.musicAlbum = "music.album", e.musicPlaylist = "music.playlist", e.musicSong = "music.song", e.musicRadioStation = "music.radio_station", e.app = "app", e.product = "product", e.business = "business.business", e.place = "place", e.event = "event", e.profile = "profile", e.book = "book", e;
3537
- }({}), wt = /* @__PURE__ */ function(e) {
3443
+ }({}), St = /* @__PURE__ */ function(e) {
3538
3444
  return e.inStock = "in stock", e.outOfStock = "out of stock", e.preorder = "preorder", e.backorder = "backorder", e.discontinued = "discontinued", e.pending = "pending", e;
3539
- }({}), Tt = /* @__PURE__ */ function(e) {
3445
+ }({}), Ct = /* @__PURE__ */ function(e) {
3540
3446
  return e.new = "new", e.used = "used", e.refurbished = "refurbished", e;
3541
- }({}), Et = /* @__PURE__ */ function(e) {
3447
+ }({}), wt = /* @__PURE__ */ function(e) {
3542
3448
  return e.newborn = "newborn", e.infant = "infant", e.toddler = "toddler", e.kids = "kids", e.adult = "adult", e;
3543
- }({}), Dt = /* @__PURE__ */ function(e) {
3449
+ }({}), Tt = /* @__PURE__ */ function(e) {
3544
3450
  return e.female = "female", e.male = "male", e.unisex = "unisex", e;
3545
- }({}), Y = /* @__PURE__ */ function(e) {
3451
+ }({}), q = /* @__PURE__ */ function(e) {
3546
3452
  return e.card = "twitter:card", e.site = "twitter:site", e.creator = "twitter:creator", e.url = "twitter:url", e.title = "twitter:title", e.description = "twitter:description", e.image = "twitter:image", e.imageAlt = "twitter:image:alt", e.imageSrc = "twitter:image:src", e.imageWidth = "twitter:image:width", e.imageHeight = "twitter:image:height", e.label1 = "twitter:label1", e.data1 = "twitter:data1", e.label2 = "twitter:label2", e.data2 = "twitter:data2", e.appNameIphone = "twitter:app:name:iphone", e.appIdIphone = "twitter:app:id:iphone", e.appUrlIphone = "twitter:app:url:iphone", e.appNameIpad = "twitter:app:name:ipad", e.appIdIpad = "twitter:app:id:ipad", e.appUrlIpad = "twitter:app:url:ipad", e.appNameGooglePlay = "twitter:app:name:googleplay", e.appIdGooglePlay = "twitter:app:id:googleplay", e.appUrlGooglePlay = "twitter:app:url:googleplay", e.player = "twitter:player", e.playerWidth = "twitter:player:width", e.playerHeight = "twitter:player:height", e.playerStream = "twitter:player:stream", e.playerStreamContentType = "twitter:player:stream:content_type", e;
3547
- }({}), Ot = /* @__PURE__ */ function(e) {
3453
+ }({}), Et = /* @__PURE__ */ function(e) {
3548
3454
  return e.summary = "summary", e.summaryLargeImage = "summary_large_image", e.app = "app", e.player = "player", e.product = "product", e.gallery = "gallery", e.photo = "photo", e.leadGeneration = "lead_generation", e.audio = "audio", e.poll = "poll", e;
3549
- }({}), kt = class extends K {
3455
+ }({}), Dt = class extends W {
3550
3456
  constructor() {
3551
- super(Object.values(J), !0);
3457
+ super(Object.values(K), !0);
3552
3458
  }
3553
3459
  getTitle() {
3554
- return this.get(J.title);
3460
+ return this.get(K.title);
3555
3461
  }
3556
3462
  getType() {
3557
- return this.get(J.type);
3463
+ return this.get(K.type);
3558
3464
  }
3559
3465
  getUrl() {
3560
- return this.get(J.url);
3466
+ return this.get(K.url);
3561
3467
  }
3562
3468
  getImage() {
3563
- return this.get(J.image);
3469
+ return this.get(K.image);
3564
3470
  }
3565
3471
  getDescription() {
3566
- return this.get(J.description);
3472
+ return this.get(K.description);
3567
3473
  }
3568
3474
  getLocale() {
3569
- return this.get(J.locale);
3475
+ return this.get(K.locale);
3570
3476
  }
3571
3477
  getSiteName() {
3572
- return this.get(J.siteName);
3478
+ return this.get(K.siteName);
3573
3479
  }
3574
3480
  setTitle(e) {
3575
- return this.set(J.title, e);
3481
+ return this.set(K.title, e);
3576
3482
  }
3577
3483
  setType(e) {
3578
- return this.set(J.type, e);
3484
+ return this.set(K.type, e);
3579
3485
  }
3580
3486
  setUrl(e) {
3581
- return this.set(J.url, e);
3487
+ return this.set(K.url, e);
3582
3488
  }
3583
3489
  setImage(e) {
3584
- return this.set(J.image, e);
3490
+ return this.set(K.image, e);
3585
3491
  }
3586
3492
  setDescription(e) {
3587
- return this.set(J.description, e);
3493
+ return this.set(K.description, e);
3588
3494
  }
3589
3495
  setLocale(e) {
3590
- return this.set(J.locale, e);
3496
+ return this.set(K.locale, e);
3591
3497
  }
3592
3498
  setSiteName(e) {
3593
- return this.set(J.siteName, e);
3499
+ return this.set(K.siteName, e);
3594
3500
  }
3595
- }, At = class extends K {
3501
+ }, Ot = class extends W {
3596
3502
  constructor() {
3597
- super(Object.values(Y));
3503
+ super(Object.values(q));
3598
3504
  }
3599
3505
  getCard() {
3600
- return this.get(Y.card);
3506
+ return this.get(q.card);
3601
3507
  }
3602
3508
  getSite() {
3603
- return this.get(Y.site);
3509
+ return this.get(q.site);
3604
3510
  }
3605
3511
  getCreator() {
3606
- return this.get(Y.creator);
3512
+ return this.get(q.creator);
3607
3513
  }
3608
3514
  getUrl() {
3609
- return this.get(Y.url);
3515
+ return this.get(q.url);
3610
3516
  }
3611
3517
  getTitle() {
3612
- return this.get(Y.title);
3518
+ return this.get(q.title);
3613
3519
  }
3614
3520
  getDescription() {
3615
- return this.get(Y.description);
3521
+ return this.get(q.description);
3616
3522
  }
3617
3523
  getImage() {
3618
- return this.get(Y.image);
3524
+ return this.get(q.image);
3619
3525
  }
3620
3526
  setCard(e) {
3621
- return this.set(Y.card, e), this;
3527
+ return this.set(q.card, e), this;
3622
3528
  }
3623
3529
  setSite(e) {
3624
- return this.set(Y.site, e), this;
3530
+ return this.set(q.site, e), this;
3625
3531
  }
3626
3532
  setCreator(e) {
3627
- return this.set(Y.creator, e), this;
3533
+ return this.set(q.creator, e), this;
3628
3534
  }
3629
3535
  setUrl(e) {
3630
- return this.set(Y.url, e), this;
3536
+ return this.set(q.url, e), this;
3631
3537
  }
3632
3538
  setTitle(e) {
3633
- return this.set(Y.title, e), this;
3539
+ return this.set(q.title, e), this;
3634
3540
  }
3635
3541
  setDescription(e) {
3636
- return this.set(Y.description, e), this;
3542
+ return this.set(q.description, e), this;
3637
3543
  }
3638
3544
  setImage(e) {
3639
- return this.set(Y.image, e), this;
3545
+ return this.set(q.image, e), this;
3640
3546
  }
3641
- }, jt = class extends K {
3547
+ }, kt = class extends W {
3548
+ suffix;
3549
+ og;
3550
+ twitter;
3642
3551
  constructor() {
3643
- super(Object.values(q)), w(this, "suffix", void 0), w(this, "og", void 0), w(this, "twitter", void 0), this.og = new kt(), this.twitter = new At();
3552
+ super(Object.values(G)), this.og = new Dt(), this.twitter = new Ot();
3644
3553
  }
3645
3554
  getOg() {
3646
3555
  return this.og;
@@ -3649,26 +3558,26 @@ var K = class {
3649
3558
  return this.twitter;
3650
3559
  }
3651
3560
  getTitle() {
3652
- let e = this.get(q.title);
3561
+ let e = this.get(G.title);
3653
3562
  return !l(e) && s() && (e = document.title), e.replace(this.getSuffix(), "").trim();
3654
3563
  }
3655
3564
  getKeywords() {
3656
- return this.get(q.keywords);
3565
+ return this.get(G.keywords);
3657
3566
  }
3658
3567
  getDescription() {
3659
- return this.get(q.description);
3568
+ return this.get(G.description);
3660
3569
  }
3661
3570
  getImage() {
3662
3571
  return this.og.getImage();
3663
3572
  }
3664
3573
  getCanonical() {
3665
- return this.get(q.canonical);
3574
+ return this.get(G.canonical);
3666
3575
  }
3667
3576
  getRobots() {
3668
- return this.get(q.robots);
3577
+ return this.get(G.robots);
3669
3578
  }
3670
3579
  getAuthor() {
3671
- return this.get(q.author);
3580
+ return this.get(G.author);
3672
3581
  }
3673
3582
  getSiteName() {
3674
3583
  return this.og.getSiteName();
@@ -3678,25 +3587,25 @@ var K = class {
3678
3587
  }
3679
3588
  setTitle(e) {
3680
3589
  let t = l(e) ? `${e}${this.getSuffix()}` : this.suffix ? this.suffix : "";
3681
- return s() && (document.title = t), this.set(q.title, t), this.og.setTitle(t), this.twitter.setTitle(t), this;
3590
+ return s() && (document.title = t), this.set(G.title, t), this.og.setTitle(t), this.twitter.setTitle(t), this;
3682
3591
  }
3683
3592
  setKeywords(e) {
3684
- return this.set(q.keywords, j(e).join(", ")), this;
3593
+ return this.set(G.keywords, A(e).join(", ")), this;
3685
3594
  }
3686
3595
  setDescription(e) {
3687
- return this.set(q.description, e), this;
3596
+ return this.set(G.description, e), this;
3688
3597
  }
3689
3598
  setImage(e) {
3690
3599
  return this.og.setImage(e), this.twitter.setImage(e), this;
3691
3600
  }
3692
3601
  setCanonical(e) {
3693
- return this.set(q.canonical, e), this.og.setUrl(e), this.twitter.setUrl(e), this;
3602
+ return this.set(G.canonical, e), this.og.setUrl(e), this.twitter.setUrl(e), this;
3694
3603
  }
3695
3604
  setRobots(e) {
3696
- return this.set(q.robots, e), this;
3605
+ return this.set(G.robots, e), this;
3697
3606
  }
3698
3607
  setAuthor(e) {
3699
- return this.set(q.author, e), this;
3608
+ return this.set(G.author, e), this;
3700
3609
  }
3701
3610
  setSiteName(e) {
3702
3611
  return this.og.setSiteName(e), this.twitter.setSite(e), this;
@@ -3711,14 +3620,14 @@ var K = class {
3711
3620
  return `${super.html()}${this.og.html()}${this.twitter.html()}`;
3712
3621
  }
3713
3622
  htmlTitle() {
3714
- return this.toHtmlTitle(this.get(q.title));
3623
+ return this.toHtmlTitle(this.get(G.title));
3715
3624
  }
3716
3625
  getSuffix() {
3717
3626
  return l(this.suffix) ? ` - ${this.suffix}` : "";
3718
3627
  }
3719
- }, Mt = class {
3628
+ }, At = class {
3720
3629
  static getItem() {
3721
- return E.get("__ui:meta-instance__", () => new jt());
3630
+ return E.get("__ui:meta-instance__", () => new kt());
3722
3631
  }
3723
3632
  static getOg() {
3724
3633
  return this.getItem().getOg();
@@ -3789,12 +3698,13 @@ var K = class {
3789
3698
  static htmlTitle() {
3790
3699
  return this.getItem().htmlTitle();
3791
3700
  }
3792
- }, X = class e {
3701
+ }, J = class e {
3702
+ url;
3793
3703
  static getInstance() {
3794
3704
  return E.get("__ui:url-item__", () => new e());
3795
3705
  }
3796
3706
  constructor(e) {
3797
- w(this, "url", void 0), this.set(e);
3707
+ this.set(e);
3798
3708
  }
3799
3709
  get href() {
3800
3710
  return this.url.href;
@@ -3836,13 +3746,12 @@ var K = class {
3836
3746
  return this.url.searchParams.has(e);
3837
3747
  }
3838
3748
  getParam(e) {
3839
- var t;
3840
- return (t = this.url.searchParams.get(e)) == null ? void 0 : t;
3749
+ return this.url.searchParams.get(e) ?? void 0;
3841
3750
  }
3842
3751
  getParams() {
3843
3752
  let e = {};
3844
3753
  return this.url.searchParams.forEach((t, n) => {
3845
- e[n] = fe(t);
3754
+ e[n] = T(t);
3846
3755
  }), e;
3847
3756
  }
3848
3757
  set(e) {
@@ -3865,17 +3774,17 @@ var K = class {
3865
3774
  toJSON() {
3866
3775
  return this.url.toJSON();
3867
3776
  }
3868
- }, Nt = class extends pt {
3777
+ }, jt = class extends dt {
3869
3778
  init() {
3870
3779
  return s() && addEventListener("popstate", () => {
3871
- X.getInstance().set(), this.reload();
3780
+ J.getInstance().set(), this.reload();
3872
3781
  }), this.initData(), this;
3873
3782
  }
3874
3783
  getLocation() {
3875
- return s() && X.getInstance().set(), X.getInstance().getParams();
3784
+ return s() && J.getInstance().set(), J.getInstance().getParams();
3876
3785
  }
3877
3786
  update() {
3878
- let e = this.getData(), t = X.getInstance();
3787
+ let e = this.getData(), t = J.getInstance();
3879
3788
  if (t.setParams(e), s()) {
3880
3789
  clearTimeout(this.time), this.block = !0;
3881
3790
  try {
@@ -3889,9 +3798,9 @@ var K = class {
3889
3798
  }
3890
3799
  return this;
3891
3800
  }
3892
- }, Pt = class {
3801
+ }, Mt = class {
3893
3802
  static getItem() {
3894
- return E.get("__ui:query-instance__", () => new Nt());
3803
+ return E.get("__ui:query-instance__", () => new jt());
3895
3804
  }
3896
3805
  static get(e, t) {
3897
3806
  return this.getItem().get(e, t);
@@ -3908,9 +3817,15 @@ var K = class {
3908
3817
  static reload() {
3909
3818
  this.getItem().reload();
3910
3819
  }
3911
- }, Ft = class {
3820
+ }, Nt = class {
3821
+ callback;
3822
+ delay;
3823
+ timerId;
3824
+ startTime;
3825
+ remaining;
3826
+ completed = !1;
3912
3827
  constructor(e, t = 320, n = !1) {
3913
- w(this, "callback", void 0), w(this, "delay", void 0), w(this, "timerId", void 0), w(this, "startTime", void 0), w(this, "remaining", void 0), w(this, "completed", !1), this.callback = e, this.delay = t, n || this.resume();
3828
+ this.callback = e, this.delay = t, n || this.resume();
3914
3829
  }
3915
3830
  resume() {
3916
3831
  if (this.timerId || this.completed) return this;
@@ -3927,12 +3842,10 @@ var K = class {
3927
3842
  return this.stop(), this.startTime = void 0, this.remaining = void 0, this.completed = !1, this;
3928
3843
  }
3929
3844
  getRemaining() {
3930
- var e;
3931
- return (e = this.remaining) == null ? this.delay : e;
3845
+ return this.remaining ?? this.delay;
3932
3846
  }
3933
3847
  getStartTime() {
3934
- var e;
3935
- return (e = this.startTime) == null ? Date.now() : e;
3848
+ return this.startTime ?? Date.now();
3936
3849
  }
3937
3850
  go() {
3938
3851
  return this.callback(), this.timerId = void 0, this.completed = !0, this;
@@ -3944,22 +3857,22 @@ var K = class {
3944
3857
  return this.startTime = Date.now(), this;
3945
3858
  }
3946
3859
  stop() {
3947
- return this.timerId && (clearTimeout(this.timerId), this.timerId = void 0), this;
3860
+ return this.timerId &&= (clearTimeout(this.timerId), void 0), this;
3948
3861
  }
3949
- }, It = class {
3862
+ }, Pt = class {
3863
+ static calculate = !1;
3950
3864
  static async is() {
3951
3865
  let e = await this.get();
3952
3866
  return e !== -1 && e <= 8;
3953
3867
  }
3954
3868
  static async get() {
3955
- var e;
3956
3869
  if (!s()) return 0;
3957
- let t = (e = this.getStorage().get()) == null ? -1 : e;
3958
- if (!this.calculate && t === -1) {
3870
+ let e = this.getStorage().get() ?? -1;
3871
+ if (!this.calculate && e === -1) {
3959
3872
  let e = await this.init();
3960
3873
  return this.getStorage().set(e), e;
3961
3874
  }
3962
- return t;
3875
+ return e;
3963
3876
  }
3964
3877
  static getStorage() {
3965
3878
  return new D("__ui:scrollbar__", !0);
@@ -3968,8 +3881,8 @@ var K = class {
3968
3881
  return this.calculate;
3969
3882
  }
3970
3883
  static createElement() {
3971
- return W(document.body, "div", (e) => {
3972
- e.style.height = "24px", e.style.overflowY = "scroll", e.style.position = "fixed", e.style.width = "100%", W(e, "div", (e) => {
3884
+ return H(document.body, "div", (e) => {
3885
+ e.style.height = "24px", e.style.overflowY = "scroll", e.style.position = "fixed", e.style.width = "100%", H(e, "div", (e) => {
3973
3886
  e.style.height = "100px";
3974
3887
  });
3975
3888
  });
@@ -3984,36 +3897,40 @@ var K = class {
3984
3897
  });
3985
3898
  }
3986
3899
  };
3987
- w(It, "calculate", !1);
3988
3900
  //#endregion
3989
3901
  //#region src/functions/escapeExp.ts
3990
- function Z(e) {
3902
+ function Y(e) {
3991
3903
  return String(e).replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
3992
3904
  }
3993
3905
  //#endregion
3994
3906
  //#region src/functions/getSeparatingSearchExp.ts
3995
- function Lt(e, t = 128) {
3907
+ function Ft(e, t = 128) {
3996
3908
  if (e instanceof RegExp) return e;
3997
3909
  if (!e || e.trim().length === 0 || e.length > t) return /^/;
3998
- let n = String(e).replace(/\s+/g, " ").trim().split(" ").map(Z).join("|");
3910
+ let n = String(e).replace(/\s+/g, " ").trim().split(" ").map(Y).join("|");
3999
3911
  return RegExp(`(${n})`, "ig");
4000
3912
  }
4001
3913
  //#endregion
4002
3914
  //#region src/functions/addTagHighlightMatch.ts
4003
- var Rt = `___HIGHLIGHT_START_${f(1e5, 999999)}___`, zt = `___HIGHLIGHT_END_${f(1e5, 999999)}___`, Bt = RegExp(`${Rt}|${zt}`, "g");
4004
- function Vt(e, t, n = "sys-highlight-match", r = !1) {
3915
+ var It = "___HIGHLIGHT_START___", Lt = "___HIGHLIGHT_END___", Rt = /___HIGHLIGHT_START___|___HIGHLIGHT_END___/g;
3916
+ function zt(e, t, n = "sys-highlight-match", r = !1) {
4005
3917
  let i = a(e);
4006
3918
  if (l(i) && l(t)) {
4007
- let e = i.replace(Lt(t), `${Rt}$1${zt}`);
4008
- return r && (e = G(e)), e.replace(Bt, (e) => e === Rt ? `<span class="${n}">` : "</span>");
3919
+ let e = i.replace(Ft(t), `${It}$1${Lt}`);
3920
+ return r && (e = U(e)), e.replace(Rt, (e) => e === It ? `<span class="${n}">` : "</span>");
4009
3921
  }
4010
- return r ? G(i) : i;
3922
+ return r ? U(i) : i;
4011
3923
  }
4012
3924
  //#endregion
4013
3925
  //#region src/classes/SearchListData.ts
4014
- var Ht = class {
3926
+ var Bt = class {
3927
+ list;
3928
+ columns;
3929
+ item;
3930
+ options;
3931
+ listCache;
4015
3932
  constructor(e, t, n, r) {
4016
- w(this, "list", void 0), w(this, "columns", void 0), w(this, "item", void 0), w(this, "options", void 0), w(this, "listCache", void 0), this.list = e, this.columns = t, this.item = n, this.options = r;
3933
+ this.list = e, this.columns = t, this.item = n, this.options = r;
4017
3934
  }
4018
3935
  is() {
4019
3936
  return !!(this.list && this.columns);
@@ -4028,8 +3945,7 @@ var Ht = class {
4028
3945
  return this.columns;
4029
3946
  }
4030
3947
  getCache() {
4031
- var e;
4032
- return this.listCache || this.initCache(), (e = this.listCache) == null ? [] : e;
3948
+ return this.listCache || this.initCache(), this.listCache ?? [];
4033
3949
  }
4034
3950
  setList(e) {
4035
3951
  return this.list = e, this.resetCache(), this;
@@ -4050,8 +3966,8 @@ var Ht = class {
4050
3966
  toFormatItem(e, t) {
4051
3967
  let n = {};
4052
3968
  return this.columns && this.columns.forEach((r) => {
4053
- let i = this.getColumnName(r), a = V(e, r);
4054
- n[i] = l(a) && t ? this.addTag(a) : S(a);
3969
+ let i = this.getColumnName(r), a = z(e, r);
3970
+ n[i] = l(a) && t ? this.addTag(a) : C(a);
4055
3971
  }), {
4056
3972
  ...e,
4057
3973
  ...n,
@@ -4062,7 +3978,7 @@ var Ht = class {
4062
3978
  return e.replace(/\.([a-z0-9])/gi, (e, t) => t.toUpperCase()) + "Search";
4063
3979
  }
4064
3980
  addTag(e) {
4065
- return Vt(S(e), this.item.get(), this.options.getClassName());
3981
+ return zt(C(e), this.item.get(), this.options.getClassName());
4066
3982
  }
4067
3983
  generateCache() {
4068
3984
  if (!this.isList()) return [];
@@ -4070,8 +3986,8 @@ var Ht = class {
4070
3986
  for (let t of this.list) {
4071
3987
  let n = "";
4072
3988
  if (this.columns) for (let e of this.columns) {
4073
- let r = V(t, e);
4074
- l(r) && (n += ` ${S(r)}`);
3989
+ let r = z(t, e);
3990
+ l(r) && (n += ` ${C(r)}`);
4075
3991
  }
4076
3992
  e.push({
4077
3993
  item: t,
@@ -4086,9 +4002,11 @@ var Ht = class {
4086
4002
  resetCache() {
4087
4003
  this.listCache = void 0;
4088
4004
  }
4089
- }, Ut = class {
4005
+ }, Vt = class {
4006
+ value;
4007
+ options;
4090
4008
  constructor(e, t) {
4091
- w(this, "value", void 0), w(this, "options", void 0), this.value = e, this.options = t;
4009
+ this.value = e, this.options = t;
4092
4010
  }
4093
4011
  is() {
4094
4012
  return !!this.value;
@@ -4097,8 +4015,7 @@ var Ht = class {
4097
4015
  return this.is() && this.value.length >= this.options.getLimit();
4098
4016
  }
4099
4017
  get() {
4100
- var e;
4101
- return (e = this.value) == null ? "" : e;
4018
+ return this.value ?? "";
4102
4019
  }
4103
4020
  set(e) {
4104
4021
  return this.value = e, this;
@@ -4106,30 +4023,33 @@ var Ht = class {
4106
4023
  };
4107
4024
  //#endregion
4108
4025
  //#region src/functions/getExp.ts
4109
- function Wt(e, t = "ig", n = ":value") {
4110
- let r = Z(e);
4026
+ function X(e, t = "ig", n = ":value") {
4027
+ let r = Y(e);
4111
4028
  return new RegExp(n.replace(/:value/g, r), t);
4112
4029
  }
4113
4030
  //#endregion
4114
4031
  //#region src/functions/getExactSearchExp.ts
4115
- function Gt(e) {
4116
- return Wt(e, "i", "(:value)");
4032
+ function Ht(e) {
4033
+ return X(e, "i", "(:value)");
4117
4034
  }
4118
4035
  //#endregion
4119
4036
  //#region src/functions/getSearchExp.ts
4120
- function Kt(e, t = 128) {
4037
+ function Ut(e, t = 128) {
4121
4038
  if (!d(e) || e.trim().length === 0 || e.length > t) return /^/;
4122
4039
  let n = [];
4123
4040
  return a(e).split(" ").forEach((e) => {
4124
- let t = Z(e).trim();
4041
+ let t = Y(e).trim();
4125
4042
  l(t) && n.push(`(?=.*?${t})`);
4126
4043
  }), RegExp(`^${n.join("")}`, "i");
4127
4044
  }
4128
4045
  //#endregion
4129
4046
  //#region src/classes/SearchListMatcher.ts
4130
- var qt = class {
4047
+ var Wt = class {
4048
+ item;
4049
+ options;
4050
+ matcher;
4131
4051
  constructor(e, t) {
4132
- w(this, "item", void 0), w(this, "options", void 0), w(this, "matcher", void 0), this.item = e, this.options = t, this.initMatcher();
4052
+ this.item = e, this.options = t, this.initMatcher();
4133
4053
  }
4134
4054
  is() {
4135
4055
  return !!this.matcher;
@@ -4144,44 +4064,41 @@ var qt = class {
4144
4064
  this.initMatcher();
4145
4065
  }
4146
4066
  initMatcher() {
4147
- this.matcher = this.item.is() ? this.options.getFindExactMatch() ? Gt(this.item.get()) : Kt(this.item.get()) : void 0;
4067
+ this.matcher = this.item.is() ? this.options.getFindExactMatch() ? Ht(this.item.get()) : Ut(this.item.get()) : void 0;
4148
4068
  }
4149
- }, Jt = class {
4069
+ }, Gt = class {
4070
+ options;
4150
4071
  constructor(e) {
4151
- w(this, "options", void 0), this.options = e;
4072
+ this.options = e;
4152
4073
  }
4153
4074
  getOptions() {
4154
4075
  return this.options || {};
4155
4076
  }
4156
4077
  getLimit() {
4157
- var e;
4158
- return (e = this.getOptions().limit) == null ? 2 : e;
4078
+ return this.getOptions().limit ?? 2;
4159
4079
  }
4160
4080
  getReturnEverything() {
4161
- var e;
4162
- return (e = this.getOptions().returnEverything) != null && e;
4081
+ return this.getOptions().returnEverything ?? !1;
4163
4082
  }
4164
4083
  getDelay() {
4165
- var e;
4166
- return (e = this.getOptions().delay) == null ? 0 : e;
4084
+ return this.getOptions().delay ?? 0;
4167
4085
  }
4168
4086
  getFindExactMatch() {
4169
- var e;
4170
- return (e = this.getOptions().findExactMatch) != null && e;
4087
+ return this.getOptions().findExactMatch ?? !1;
4171
4088
  }
4172
4089
  getClassName() {
4173
- var e;
4174
- return (e = this.getOptions().classSearchName) == null ? "sys-search-selection" : e;
4090
+ return this.getOptions().classSearchName ?? "sys-search-selection";
4175
4091
  }
4176
4092
  setOptions(e) {
4177
4093
  return this.options = e, this;
4178
4094
  }
4179
- }, Yt = class {
4095
+ }, Kt = class {
4096
+ options;
4097
+ item;
4098
+ matcher;
4099
+ data;
4180
4100
  constructor(e, t, n, r) {
4181
- w(this, "options", void 0), w(this, "item", void 0), w(this, "matcher", void 0), w(this, "data", void 0), w(this, "callbackToSelection", (e, t) => {
4182
- if (this.matcher.isSelection(t)) return this.data.toFormatItem(e, !0);
4183
- if (this.options.getReturnEverything()) return this.data.toFormatItem(e, !1);
4184
- }), w(this, "callbackToNone", (e) => this.data.toFormatItem(e, !1)), this.options = new Jt(r), this.item = new Ut(n, this.options), this.matcher = new qt(this.item, this.options), this.data = new Ht(e, t, this.item, this.options);
4101
+ this.options = new Gt(r), this.item = new Vt(n, this.options), this.matcher = new Wt(this.item, this.options), this.data = new Bt(e, t, this.item, this.options);
4185
4102
  }
4186
4103
  getData() {
4187
4104
  return this.data;
@@ -4218,13 +4135,22 @@ var qt = class {
4218
4135
  let e = this.data.getList();
4219
4136
  return e ? r(e, this.callbackToNone) : [];
4220
4137
  }
4221
- }, Xt = () => E.get("__ui:storage-callback__", () => ({})), Zt = class e {
4138
+ callbackToSelection = (e, t) => {
4139
+ if (this.matcher.isSelection(t)) return this.data.toFormatItem(e, !0);
4140
+ if (this.options.getReturnEverything()) return this.data.toFormatItem(e, !1);
4141
+ };
4142
+ callbackToNone = (e) => this.data.toFormatItem(e, !1);
4143
+ }, qt = () => E.get("__ui:storage-callback__", () => ({})), Jt = class e {
4144
+ name;
4145
+ group;
4222
4146
  static getInstance(t, n = "main") {
4223
4147
  return new e(t, n);
4224
4148
  }
4149
+ callbacks = [];
4150
+ loading = !1;
4225
4151
  constructor(e, t = "main") {
4226
- w(this, "name", void 0), w(this, "group", void 0), w(this, "callbacks", []), w(this, "loading", !1), this.name = e, this.group = t;
4227
- let n = `${t}:${e}`, r = Xt();
4152
+ this.name = e, this.group = t;
4153
+ let n = `${t}:${e}`, r = qt();
4228
4154
  if (n in r) return r[n];
4229
4155
  r[n] = this;
4230
4156
  }
@@ -4251,10 +4177,10 @@ var qt = class {
4251
4177
  }
4252
4178
  async run(e) {
4253
4179
  this.loading = !1;
4254
- for (let { callback: t, isOnce: n } of this.callbacks) await F(t, e), n && this.removeCallback(t);
4180
+ for (let { callback: t, isOnce: n } of this.callbacks) await N(t, e), n && this.removeCallback(t);
4255
4181
  return this;
4256
4182
  }
4257
- }, Qt = [
4183
+ }, Yt = [
4258
4184
  "d",
4259
4185
  "e",
4260
4186
  "f",
@@ -4274,34 +4200,19 @@ var qt = class {
4274
4200
  "t",
4275
4201
  "u",
4276
4202
  "v"
4277
- ], $t = RegExp(`%(${Qt.join("|")})`, "g"), en = (e, t = {}) => {
4203
+ ], Xt = /%(d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v)/g, Zt = (e, t = {}) => {
4278
4204
  let r = String(e);
4279
- return Array.isArray(t) && e.match(/%[a-z]/) && (r = r.replace($t, (e, n) => {
4280
- let r = Qt.indexOf(n);
4281
- if (r !== -1) {
4282
- var i;
4283
- return String((i = t == null ? void 0 : t[r]) == null ? "" : i);
4284
- }
4285
- return e;
4286
- })), n(t) && (r = r.replace(/[[{](.*?)[\]}](.*?)[[{]\/\1[\]}]/g, (e, n, r) => {
4287
- if (n in t) {
4288
- var i;
4289
- return String((i = t[n]) == null ? "" : i).replace(/[[{]content[\]}]/g, () => r);
4290
- }
4291
- return e;
4292
- }), r = r.replace(/[[{](.*?)[\]}]/g, (e, n) => {
4293
- if (n in t) {
4294
- var r;
4295
- return String((r = t[n]) == null ? "" : r);
4296
- }
4297
- return e;
4298
- })), r;
4299
- }, tn = (e) => {
4300
- var t;
4301
- return i(e) ? !0 : !!(e && n(e) && ((e == null ? void 0 : e.status) === "success" || e != null && e.success || e != null && (t = e.statusObject) != null && t.status && /^2/.test(String(e.statusObject.status)) || !("status" in e) && !("success" in e) && !("statusObject" in e) && /^2/.test(String(I.getStatus().getStatus()))));
4302
- }, nn = "global", rn = 160, an = class {
4303
- constructor(e, t = () => k.getLanguage(), n = () => k.getLocation()) {
4304
- w(this, "language", void 0), w(this, "location", void 0), w(this, "files", {}), w(this, "data", {}), this.language = t, this.location = n, e && this.add(e);
4205
+ return Array.isArray(t) && e.match(/%[a-z]/) && (r = r.replace(Xt, (e, n) => {
4206
+ let r = Yt.indexOf(n);
4207
+ return r === -1 ? e : String(t?.[r] ?? "");
4208
+ })), n(t) && (r = r.replace(/[[{](.*?)[\]}](.*?)[[{]\/\1[\]}]/g, (e, n, r) => n in t ? String(t[n] ?? "").replace(/[[{]content[\]}]/g, () => r) : e), r = r.replace(/[[{](.*?)[\]}]/g, (e, n) => n in t ? String(t[n] ?? "") : e)), r;
4209
+ }, Qt = (e) => i(e) ? !0 : !!(e && n(e) && (e?.status === "success" || e?.success || e?.statusObject?.status && /^2/.test(String(e.statusObject.status)) || !("status" in e) && !("success" in e) && !("statusObject" in e) && /^2/.test(String(P.getStatus().getStatus())))), $t = "global", en = 160, tn = class {
4210
+ language;
4211
+ location;
4212
+ files = {};
4213
+ data = {};
4214
+ constructor(e, t = () => O.getLanguage(), n = () => O.getLocation()) {
4215
+ this.language = t, this.location = n, e && this.add(e);
4305
4216
  }
4306
4217
  isFile() {
4307
4218
  return Object.keys(this.files).length > 0 && this.getIndex() !== void 0;
@@ -4314,10 +4225,7 @@ var qt = class {
4314
4225
  }
4315
4226
  async getList() {
4316
4227
  let e = this.getIndex();
4317
- if (e) {
4318
- var t;
4319
- return (t = this.getByData(e)) == null ? await this.getByFile(e) : t;
4320
- }
4228
+ if (e) return this.getByData(e) ?? await this.getByFile(e);
4321
4229
  }
4322
4230
  add(e) {
4323
4231
  r(e, (e, t) => {
@@ -4329,7 +4237,7 @@ var qt = class {
4329
4237
  if (e in this.files) return e;
4330
4238
  let t = this.getLanguage();
4331
4239
  if (t in this.files) return t;
4332
- if ("global" in this.files) return nn;
4240
+ if ("global" in this.files) return $t;
4333
4241
  }
4334
4242
  getByData(e) {
4335
4243
  if (e in this.data) return this.data[e];
@@ -4340,14 +4248,21 @@ var qt = class {
4340
4248
  return t && (this.data[e] = t), t;
4341
4249
  }
4342
4250
  }
4343
- }, on = class {
4344
- constructor(e = "/api/translate", t = "list", n = new an()) {
4345
- w(this, "url", void 0), w(this, "propsName", void 0), w(this, "files", void 0), w(this, "data", {}), w(this, "cache", []), w(this, "resolveList", []), w(this, "timeout", void 0), w(this, "isReadApi", !0), this.url = e, this.propsName = t, this.files = n;
4251
+ }, nn = class {
4252
+ url;
4253
+ propsName;
4254
+ files;
4255
+ data = {};
4256
+ cache = [];
4257
+ resolveList = [];
4258
+ timeout;
4259
+ isReadApi = !0;
4260
+ constructor(e = "/api/translate", t = "list", n = new tn()) {
4261
+ this.url = e, this.propsName = t, this.files = n;
4346
4262
  }
4347
4263
  async get(e, t) {
4348
- var n;
4349
- let r = this.getText(e);
4350
- return r ? this.replacement(r, t) : (I.isLocalhost() || await this.add(e), this.replacement((n = this.getText(e)) == null ? e : n));
4264
+ let n = this.getText(e);
4265
+ return n ? this.replacement(n, t) : (P.isLocalhost() || await this.add(e), this.replacement(this.getText(e) ?? e));
4351
4266
  }
4352
4267
  getSync(e, t = !1, n) {
4353
4268
  let r = this.getText(e);
@@ -4389,7 +4304,7 @@ var qt = class {
4389
4304
  }
4390
4305
  async addNormalOrSync(e) {
4391
4306
  if (l(e)) {
4392
- if (I.isLocalhost()) this.addSync(e);
4307
+ if (P.isLocalhost()) this.addSync(e);
4393
4308
  else {
4394
4309
  let t = Object.keys(e);
4395
4310
  t.length > 0 && await this.add(t);
@@ -4432,16 +4347,16 @@ var qt = class {
4432
4347
  return `${this.files.getLanguage()}-${e}`;
4433
4348
  }
4434
4349
  getNameByGlobal(e) {
4435
- return `${nn}-${e}`;
4350
+ return `${$t}-${e}`;
4436
4351
  }
4437
4352
  getNamesNone(e) {
4438
4353
  let t = [];
4439
- return j(e).forEach((e) => {
4354
+ return A(e).forEach((e) => {
4440
4355
  e !== "__TRANSLATE_START__" && e !== "__TRANSLATE_END__" && !this.hasName(e) && t.push(e);
4441
4356
  }), t;
4442
4357
  }
4443
4358
  async getResponse() {
4444
- let e = await I.get({
4359
+ let e = await P.get({
4445
4360
  api: !1,
4446
4361
  path: this.url,
4447
4362
  request: { [this.propsName]: this.cache },
@@ -4449,14 +4364,14 @@ var qt = class {
4449
4364
  timeout: 12e3,
4450
4365
  global: !0
4451
4366
  });
4452
- return tn(e) || T.on({
4367
+ return Qt(e) || w.on({
4453
4368
  group: "translate",
4454
4369
  code: "error",
4455
4370
  details: e
4456
- }), e == null ? {} : e;
4371
+ }), e ?? {};
4457
4372
  }
4458
4373
  replacement(e, t) {
4459
- return t ? en(e, t) : e;
4374
+ return t ? Zt(e, t) : e;
4460
4375
  }
4461
4376
  async make() {
4462
4377
  let e;
@@ -4464,16 +4379,16 @@ var qt = class {
4464
4379
  }
4465
4380
  makeList(e) {
4466
4381
  this.cache.forEach((t) => {
4467
- var n;
4468
- this.data[this.getName(t)] = (n = e == null ? void 0 : e[t]) == null ? "" : n;
4382
+ this.data[this.getName(t)] = e?.[t] ?? "";
4469
4383
  }), this.cache = [];
4470
4384
  }
4471
- }, sn = class {
4385
+ }, rn = class {
4386
+ static item;
4472
4387
  static async get(e, t) {
4473
4388
  return this.getItem().get(e, t);
4474
4389
  }
4475
4390
  static getItem() {
4476
- return this.item || (this.item = new on()), this.item;
4391
+ return this.item ||= new nn(), this.item;
4477
4392
  }
4478
4393
  static getSync(e, t = !1, n) {
4479
4394
  return this.getItem().getSync(e, t, n);
@@ -4512,132 +4427,120 @@ var qt = class {
4512
4427
  e.url && this.getItem().setUrl(e.url), e.propsName && this.getItem().setPropsName(e.propsName), typeof e.readApi == "boolean" && this.getItem().setReadApi(e.readApi);
4513
4428
  }
4514
4429
  };
4515
- w(sn, "item", void 0);
4516
4430
  //#endregion
4517
4431
  //#region src/functions/arrFill.ts
4518
- function cn(e, t) {
4432
+ function an(e, t) {
4519
4433
  return Array(t).fill(e);
4520
4434
  }
4521
4435
  //#endregion
4522
4436
  //#region src/functions/blobToBase64.ts
4523
- var ln = () => un() !== void 0, un = () => {
4524
- var e;
4525
- return (e = globalThis) == null ? void 0 : e.Buffer;
4526
- }, dn = async (e) => new Promise((t, n) => {
4437
+ var on = () => sn() !== void 0, sn = () => globalThis?.Buffer, cn = async (e) => new Promise((t, n) => {
4527
4438
  if (typeof FileReader < "u") {
4528
4439
  let r = new FileReader();
4529
4440
  r.onloadend = () => {
4530
- if (!(r != null && r.result)) {
4441
+ if (!r?.result) {
4531
4442
  n(/* @__PURE__ */ Error("Failed to read blob"));
4532
4443
  return;
4533
4444
  }
4534
4445
  t(r.result.replace(/^data:.*?,/, ""));
4535
4446
  }, r.onerror = n, r.readAsDataURL(e);
4536
4447
  } else n();
4537
- }), fn = (e) => {
4538
- var t;
4539
- return ((t = globalThis) == null ? void 0 : t.Buffer).from(e).toString("base64");
4540
- };
4541
- async function pn(e, t = !1) {
4542
- let n = s() ? await dn(e) : ln() ? fn(await e.arrayBuffer()) : void 0;
4448
+ }), ln = (e) => (globalThis?.Buffer).from(e).toString("base64");
4449
+ async function un(e, t = !1) {
4450
+ let n = s() ? await cn(e) : on() ? ln(await e.arrayBuffer()) : void 0;
4543
4451
  if (n) return t ? n : `data:${e.type};base64,${n}`;
4544
4452
  }
4545
4453
  //#endregion
4546
4454
  //#region src/functions/capitalize.ts
4547
- function mn(e, t = !1) {
4455
+ function dn(e, t = !1) {
4548
4456
  let n = String(e);
4549
- return n.length > 0 ? t ? n.charAt(0).toLocaleUpperCase(k.getLocation()) + n.slice(1) : n.charAt(0).toUpperCase() + n.slice(1) : n;
4457
+ return n.length > 0 ? t ? n.charAt(0).toLocaleUpperCase(O.getLocation()) + n.slice(1) : n.charAt(0).toUpperCase() + n.slice(1) : n;
4550
4458
  }
4551
4459
  //#endregion
4552
4460
  //#region src/functions/copyObject.ts
4553
- function Q(e) {
4461
+ function Z(e) {
4554
4462
  return JSON.parse(JSON.stringify(e));
4555
4463
  }
4556
4464
  //#endregion
4557
4465
  //#region src/functions/copyObjectLite.ts
4558
- function hn(e, t) {
4466
+ function fn(e, t) {
4559
4467
  return Object.assign({}, e, t);
4560
4468
  }
4561
4469
  //#endregion
4562
4470
  //#region src/functions/domContentLoaded.ts
4563
- async function gn(e) {
4564
- return !s() || document.readyState !== "loading" ? F(e) : new Promise((t, n) => {
4471
+ async function pn(e) {
4472
+ return !s() || document.readyState !== "loading" ? N(e) : new Promise((t, n) => {
4565
4473
  document.addEventListener("DOMContentLoaded", () => {
4566
- F(e).then(t, n);
4474
+ N(e).then(t, n);
4567
4475
  }, { once: !0 });
4568
4476
  });
4569
4477
  }
4570
4478
  //#endregion
4571
4479
  //#region src/functions/domQuerySelector.ts
4572
- function _n(e) {
4573
- if (s()) {
4574
- var t;
4575
- return (t = document.querySelector(e)) == null ? void 0 : t;
4576
- }
4480
+ function mn(e) {
4481
+ if (s()) return document.querySelector(e) ?? void 0;
4577
4482
  }
4578
4483
  //#endregion
4579
4484
  //#region src/functions/domQuerySelectorAll.ts
4580
- function vn(e) {
4485
+ function hn(e) {
4581
4486
  if (s()) return document.querySelectorAll(e);
4582
4487
  }
4583
4488
  //#endregion
4584
4489
  //#region src/functions/getElementImage.ts
4585
- function yn(e) {
4586
- return d(e) ? W(void 0, "img", { src: e }) : e;
4490
+ function gn(e) {
4491
+ return d(e) ? H(void 0, "img", { src: e }) : e;
4587
4492
  }
4588
4493
  //#endregion
4589
4494
  //#region src/functions/resizeImageByMax.ts
4590
- function bn(e, t = "auto") {
4495
+ function _n(e, t = "auto") {
4591
4496
  switch (t) {
4592
4497
  case "auto": return e.naturalWidth >= e.naturalHeight;
4593
4498
  case "width": return !0;
4594
4499
  case "height": return !1;
4595
4500
  }
4596
4501
  }
4597
- function xn(e, t, n = "auto", r) {
4598
- let i = yn(e);
4502
+ function Q(e, t, n = "auto", r) {
4503
+ let i = gn(e);
4599
4504
  if (s() && i && i.naturalWidth && i.naturalHeight && (i.naturalWidth > t && (n === "auto" || n === "width") || i.naturalHeight > t && (n === "auto" || n === "height"))) {
4600
- var a;
4601
- let e = bn(i, n), o = (a = document.createElement("canvas")) == null ? void 0 : a.getContext("2d");
4602
- if (o) return o.canvas.width = e ? t : i.naturalWidth / i.naturalHeight * t, o.canvas.height = e ? i.naturalHeight / i.naturalWidth * t : t, o.drawImage(i, 0, 0, o.canvas.width, o.canvas.height), o.canvas.toDataURL(r);
4505
+ let e = _n(i, n), a = document.createElement("canvas")?.getContext("2d");
4506
+ if (a) return a.canvas.width = e ? t : i.naturalWidth / i.naturalHeight * t, a.canvas.height = e ? i.naturalHeight / i.naturalWidth * t : t, a.drawImage(i, 0, 0, a.canvas.width, a.canvas.height), a.canvas.toDataURL(r);
4603
4507
  }
4604
4508
  }
4605
4509
  //#endregion
4606
4510
  //#region src/functions/ensureMaxSize.ts
4607
- async function Sn(e, t = .56, n = "image/jpeg") {
4511
+ async function vn(e, t = .56, n = "image/jpeg") {
4608
4512
  return new Promise((r) => {
4609
4513
  if (!s()) {
4610
4514
  r("");
4611
4515
  return;
4612
4516
  }
4613
- let i = new Blob([e], { type: n }), a = URL.createObjectURL(i), o = yn(a);
4517
+ let i = new Blob([e], { type: n }), a = URL.createObjectURL(i), o = gn(a);
4614
4518
  o ? (o.onload = () => {
4615
- let e = xn(o, t * o.naturalWidth, "width", n);
4616
- r(e == null ? "" : e), URL.revokeObjectURL(a);
4519
+ r(Q(o, t * o.naturalWidth, "width", n) ?? ""), URL.revokeObjectURL(a);
4617
4520
  }, o.onerror = () => {
4618
4521
  URL.revokeObjectURL(a), r("");
4619
- }) : pn(i).then((e) => r(String(e == null ? "" : e)));
4522
+ }) : un(i).then((e) => r(String(e ?? "")));
4620
4523
  });
4621
4524
  }
4622
4525
  //#endregion
4623
4526
  //#region src/functions/eventStopPropagation.ts
4624
- function Cn(e) {
4527
+ function yn(e) {
4625
4528
  e.preventDefault(), e.stopPropagation();
4626
4529
  }
4627
4530
  //#endregion
4628
4531
  //#region src/functions/frame.ts
4629
- function wn(e, t, n) {
4532
+ function bn(e, t, n) {
4630
4533
  let r = () => {
4631
- e(), s() && t != null && t() ? wn(e, t, n) : n == null || n();
4534
+ e(), s() && t?.() ? bn(e, t, n) : n?.();
4632
4535
  };
4633
4536
  s() ? requestAnimationFrame(r) : r();
4634
4537
  }
4635
4538
  //#endregion
4636
4539
  //#region src/functions/getArrayHighlightMatch.ts
4637
- function Tn(e, t) {
4540
+ function xn(e, t) {
4638
4541
  let n = a(e);
4639
4542
  if (l(n) && l(t)) {
4640
- let e = [], r = Lt(t), i = 0, a;
4543
+ let e = [], r = Ft(t), i = 0, a;
4641
4544
  for (; (a = r.exec(n)) !== null && a.index !== r.lastIndex;) a.index > i && e.push({
4642
4545
  text: n.substring(i, a.index),
4643
4546
  isMatch: !1
@@ -4657,22 +4560,18 @@ function Tn(e, t) {
4657
4560
  }
4658
4561
  //#endregion
4659
4562
  //#region src/functions/getAttributes.ts
4660
- function En(e) {
4661
- let t = {}, n = A(e);
4662
- if (n) for (let e of n.attributes) {
4663
- var r;
4664
- t[e.name] = (r = (e == null ? void 0 : e.value) || (e == null ? void 0 : e.textContent)) == null ? void 0 : r;
4665
- }
4563
+ function Sn(e) {
4564
+ let t = {}, n = k(e);
4565
+ if (n) for (let e of n.attributes) t[e.name] = (e?.value || e?.textContent) ?? void 0;
4666
4566
  return t;
4667
4567
  }
4668
4568
  //#endregion
4669
4569
  //#region src/functions/getClipboardData.ts
4670
- async function Dn(e) {
4570
+ async function Cn(e) {
4671
4571
  if (s()) try {
4672
- var t, n;
4673
- return (t = e == null || (n = e.clipboardData) == null ? void 0 : n.getData("text")) == null ? await navigator.clipboard.readText() || "" : t;
4572
+ return e?.clipboardData?.getData("text") ?? (await navigator.clipboard.readText() || "");
4674
4573
  } catch (e) {
4675
- T.on({
4574
+ w.on({
4676
4575
  group: "clipboard",
4677
4576
  code: "error",
4678
4577
  details: e
@@ -4682,118 +4581,102 @@ async function Dn(e) {
4682
4581
  }
4683
4582
  //#endregion
4684
4583
  //#region src/functions/getCurrentDate.ts
4685
- function On(e = "datetime") {
4686
- return new it(void 0, e).standard();
4584
+ function wn(e = "datetime") {
4585
+ return new nt(void 0, e).standard();
4687
4586
  }
4688
4587
  //#endregion
4689
4588
  //#region src/functions/getCurrentTime.ts
4690
- function kn() {
4589
+ function Tn() {
4691
4590
  return Date.now();
4692
4591
  }
4693
4592
  //#endregion
4694
4593
  //#region src/functions/getElementId.ts
4695
- var An, jn = () => {
4696
- let e = An == null ? void 0 : An();
4594
+ var En, Dn = () => {
4595
+ let e = En?.();
4697
4596
  if (e) return String(e);
4698
4597
  let t = E.get("__ui:getElementId__", () => ({ id: 1e5 }));
4699
4598
  return `id-${t.id++}`;
4700
4599
  };
4701
- function Mn(e, t) {
4600
+ function On(e, t) {
4702
4601
  if (e) {
4703
- let n = A(e);
4704
- if (n) return l(n.id) || n.setAttribute("id", jn()), t ? `#${n.id}${t}`.trim() : n.id;
4602
+ let n = k(e);
4603
+ if (n) return l(n.id) || n.setAttribute("id", Dn()), t ? `#${n.id}${t}`.trim() : n.id;
4705
4604
  }
4706
- return jn();
4605
+ return Dn();
4707
4606
  }
4708
- function Nn(e) {
4709
- An || (An = e);
4607
+ function kn(e) {
4608
+ En ||= e;
4710
4609
  }
4711
4610
  //#endregion
4712
4611
  //#region src/functions/getFirst.ts
4713
- function Pn(e) {
4714
- if (i(e)) return e == null ? void 0 : e[0];
4715
- if (t(e)) {
4716
- var n;
4717
- return (n = Object.values(e)) == null ? void 0 : n[0];
4718
- }
4719
- return e;
4612
+ function An(e) {
4613
+ return i(e) ? e?.[0] : t(e) ? Object.values(e)?.[0] : e;
4720
4614
  }
4721
4615
  //#endregion
4722
4616
  //#region src/functions/getImageSrc.ts
4723
- function Fn(e) {
4724
- if (d(e)) return e;
4725
- if (e && "src" in e) {
4726
- var t;
4727
- return (t = e.src) == null ? "" : t;
4728
- }
4729
- return "";
4617
+ function jn(e) {
4618
+ return d(e) ? e : e && "src" in e ? e.src ?? "" : "";
4730
4619
  }
4731
4620
  //#endregion
4732
4621
  //#region src/functions/getKey.ts
4733
- function In(e) {
4734
- var t, n, r;
4735
- return (t = (n = e == null ? void 0 : e.key) == null ? e == null ? void 0 : e.code : n) == null ? e == null || (r = e.keyCode) == null ? void 0 : r.toString() : t;
4622
+ function Mn(e) {
4623
+ return e?.key ?? e?.code ?? e?.keyCode?.toString();
4736
4624
  }
4737
4625
  //#endregion
4738
4626
  //#region src/functions/getLast.ts
4739
- function Ln(e) {
4740
- if (i(e)) return e == null ? void 0 : e[e.length - 1];
4627
+ function Nn(e) {
4628
+ if (i(e)) return e?.[e.length - 1];
4741
4629
  if (t(e)) {
4742
4630
  let t = Object.values(e);
4743
- return t == null ? void 0 : t[t.length - 1];
4631
+ return t?.[t.length - 1];
4744
4632
  }
4745
4633
  return e;
4746
4634
  }
4747
4635
  //#endregion
4748
4636
  //#region src/functions/getLength.ts
4749
- function Rn(e) {
4637
+ function Pn(e) {
4750
4638
  return e == null ? 0 : typeof e == "string" || Array.isArray(e) ? e.length : e instanceof Map || e instanceof Set ? e.size : t(e) ? Object.keys(e).length : 0;
4751
4639
  }
4752
4640
  //#endregion
4753
4641
  //#region src/functions/getLengthOfAllArray.ts
4754
- function zn(e) {
4755
- return r(e, (e) => {
4756
- var t;
4757
- return (t = e == null ? void 0 : e.length) == null ? 0 : t;
4758
- });
4642
+ function Fn(e) {
4643
+ return r(e, (e) => e?.length ?? 0);
4759
4644
  }
4760
4645
  //#endregion
4761
4646
  //#region src/functions/getMaxLengthAllArray.ts
4762
- function Bn(e) {
4647
+ function In(e) {
4763
4648
  if (!l(e)) return 0;
4764
- let t = zn(e);
4649
+ let t = Fn(e);
4765
4650
  return t.length > 1e4 ? t.reduce((e, t) => Math.max(e, t)) : Math.max(...t);
4766
4651
  }
4767
4652
  //#endregion
4768
4653
  //#region src/functions/getMinLengthAllArray.ts
4769
- function Vn(e) {
4654
+ function Ln(e) {
4770
4655
  if (!l(e)) return 0;
4771
- let t = zn(e);
4656
+ let t = Fn(e);
4772
4657
  return t.length > 1e4 ? t.reduce((e, t) => Math.min(e, t)) : Math.min(...t);
4773
4658
  }
4774
4659
  //#endregion
4775
4660
  //#region src/functions/getMouseClientX.ts
4776
- function Hn(e) {
4777
- var t, n;
4778
- return "clientX" in e ? e.clientX : (e == null || (t = e.targetTouches) == null || (t = t[0]) == null ? void 0 : t.clientX) || (e == null || (n = e.touches) == null || (n = n[0]) == null ? void 0 : n.clientX) || 0;
4661
+ function Rn(e) {
4662
+ return "clientX" in e ? e.clientX : e?.targetTouches?.[0]?.clientX || e?.touches?.[0]?.clientX || 0;
4779
4663
  }
4780
4664
  //#endregion
4781
4665
  //#region src/functions/getMouseClientY.ts
4782
- function Un(e) {
4783
- var t, n;
4784
- return "clientY" in e ? e.clientY : (e == null || (t = e.targetTouches) == null || (t = t[0]) == null ? void 0 : t.clientY) || (e == null || (n = e.touches) == null || (n = n[0]) == null ? void 0 : n.clientY) || 0;
4666
+ function zn(e) {
4667
+ return "clientY" in e ? e.clientY : e?.targetTouches?.[0]?.clientY || e?.touches?.[0]?.clientY || 0;
4785
4668
  }
4786
4669
  //#endregion
4787
4670
  //#region src/functions/getMouseClient.ts
4788
- function Wn(e) {
4671
+ function Bn(e) {
4789
4672
  return {
4790
- x: Hn(e),
4791
- y: Un(e)
4673
+ x: Rn(e),
4674
+ y: zn(e)
4792
4675
  };
4793
4676
  }
4794
4677
  //#endregion
4795
4678
  //#region src/functions/getObjectByKeys.ts
4796
- function Gn(e, t) {
4679
+ function Vn(e, t) {
4797
4680
  let r = {};
4798
4681
  return n(e) && t.forEach((t) => {
4799
4682
  t in e && e[t] !== void 0 && (r[t] = e[t]);
@@ -4801,7 +4684,7 @@ function Gn(e, t) {
4801
4684
  }
4802
4685
  //#endregion
4803
4686
  //#region src/functions/getObjectNoUndefined.ts
4804
- function Kn(e, t = void 0) {
4687
+ function Hn(e, t = void 0) {
4805
4688
  let n = {};
4806
4689
  return r(e, (e, r) => {
4807
4690
  e !== t && (n[r] = e);
@@ -4809,78 +4692,77 @@ function Kn(e, t = void 0) {
4809
4692
  }
4810
4693
  //#endregion
4811
4694
  //#region src/functions/getObjectOrNone.ts
4812
- function qn(e) {
4695
+ function Un(e) {
4813
4696
  return n(e) ? e : {};
4814
4697
  }
4815
4698
  //#endregion
4816
4699
  //#region src/functions/getOnlyText.ts
4817
- function Jn(e) {
4818
- return S(e).replace(/[^\p{L}\p{N}\s]+/gu, "").trim();
4700
+ function Wn(e) {
4701
+ return C(e).replace(/[^\p{L}\p{N}\s]+/gu, "").trim();
4819
4702
  }
4820
4703
  //#endregion
4821
4704
  //#region src/functions/getRandomItem.ts
4822
- function Yn(e) {
4705
+ function Gn(e) {
4823
4706
  if (i(e)) return e.length === 0 ? void 0 : e[f(0, e.length - 1)];
4824
4707
  if (t(e)) {
4825
4708
  let t = Object.values(e);
4826
4709
  return t.length === 0 ? void 0 : t[f(0, t.length - 1)];
4827
4710
  }
4828
- return e == null ? void 0 : e;
4711
+ return e ?? void 0;
4829
4712
  }
4830
4713
  //#endregion
4831
4714
  //#region src/functions/strFill.ts
4832
- function Xn(e, t) {
4715
+ function Kn(e, t) {
4833
4716
  return String(e).repeat(t);
4834
4717
  }
4835
4718
  //#endregion
4836
4719
  //#region src/functions/getRandomText.ts
4837
- function Zn(e, t, n = "#", r = 2, i = 12) {
4720
+ function qn(e, t, n = "#", r = 2, i = 12) {
4838
4721
  let a = f(e, t), o = [];
4839
- for (let e = 0; e < a; e++) o.push(Xn(n, f(r, i)));
4722
+ for (let e = 0; e < a; e++) o.push(Kn(n, f(r, i)));
4840
4723
  return o.join(" ");
4841
4724
  }
4842
4725
  //#endregion
4843
4726
  //#region src/functions/getStepPercent.ts
4844
- function Qn(e, t) {
4845
- let n = e == null ? 0 : e;
4727
+ function Jn(e, t) {
4728
+ let n = e ?? 0;
4846
4729
  return t > n ? 100 / (t - n) : 0;
4847
4730
  }
4848
4731
  //#endregion
4849
4732
  //#region src/functions/getStepValue.ts
4850
- function $n(e, t) {
4851
- let n = e == null ? 0 : e;
4733
+ function Yn(e, t) {
4734
+ let n = e ?? 0;
4852
4735
  return t > n ? (t - n) / 100 : 0;
4853
4736
  }
4854
4737
  //#endregion
4855
4738
  //#region src/functions/goScroll.ts
4856
- var er = 0;
4857
- function tr(e, t, n) {
4739
+ var Xn = 0;
4740
+ function Zn(e, t, n) {
4858
4741
  if (!s()) return;
4859
- let r = t == null ? void 0 : t.closest(e);
4742
+ let r = t?.closest(e);
4860
4743
  if (t && r && r.scrollHeight !== r.offsetHeight) {
4861
4744
  let e = r.getBoundingClientRect(), i = t.getBoundingClientRect();
4862
4745
  if (n) {
4863
4746
  let a = n.getBoundingClientRect();
4864
4747
  r.scrollTop = t.offsetTop - (a.top - e.top) - (a.height / 2 - i.height / 2), r.scrollTop + r.offsetHeight < t.offsetTop + t.offsetHeight && (r.scrollTop = t.offsetTop + t.offsetHeight - r.offsetHeight);
4865
- } else r.scrollTop > t.offsetTop ? r.scrollTop = i.top - e.top - er : r.scrollTop + r.offsetHeight < t.offsetTop + t.offsetHeight && (r.scrollTop = i.top - e.top + i.height - e.height + er);
4748
+ } else r.scrollTop > t.offsetTop ? r.scrollTop = i.top - e.top - Xn : r.scrollTop + r.offsetHeight < t.offsetTop + t.offsetHeight && (r.scrollTop = i.top - e.top + i.height - e.height + Xn);
4866
4749
  }
4867
4750
  }
4868
4751
  //#endregion
4869
4752
  //#region src/functions/goScrollSmooth.ts
4870
- function nr(e, t, n = 0) {
4753
+ function Qn(e, t, n = 0) {
4871
4754
  if (!s()) return;
4872
- let r = (t == null ? void 0 : t.behavior) || "smooth";
4755
+ let r = t?.behavior || "smooth";
4873
4756
  if ("scrollIntoView" in e && !n) {
4874
4757
  e.scrollIntoView({
4875
4758
  behavior: r,
4876
- block: (t == null ? void 0 : t.block) || "start",
4877
- inline: (t == null ? void 0 : t.inline) || "start"
4759
+ block: t?.block || "start",
4760
+ inline: t?.inline || "start"
4878
4761
  });
4879
4762
  return;
4880
4763
  }
4881
4764
  if ("getBoundingClientRect" in e && "scrollTo" in window) {
4882
- var i;
4883
- let t = (((i = window) == null ? void 0 : i.scrollY) || window.pageYOffset) + e.getBoundingClientRect().top - n;
4765
+ let t = (window?.scrollY || window.pageYOffset) + e.getBoundingClientRect().top - n;
4884
4766
  window.scrollTo({
4885
4767
  top: t,
4886
4768
  behavior: r
@@ -4889,7 +4771,7 @@ function nr(e, t, n = 0) {
4889
4771
  }
4890
4772
  //#endregion
4891
4773
  //#region src/functions/goScrollTo.ts
4892
- function rr(e, t, n = "smooth") {
4774
+ function $n(e, t, n = "smooth") {
4893
4775
  if (!s() || !e || !t) return;
4894
4776
  let r = e.getBoundingClientRect(), i = t.getBoundingClientRect();
4895
4777
  e.scrollBy({
@@ -4900,16 +4782,16 @@ function rr(e, t, n = "smooth") {
4900
4782
  }
4901
4783
  //#endregion
4902
4784
  //#region src/functions/isShare.ts
4903
- function ir() {
4785
+ function er() {
4904
4786
  return s() && typeof navigator < "u" && !!navigator.share;
4905
4787
  }
4906
4788
  //#endregion
4907
4789
  //#region src/functions/handleShare.ts
4908
- async function ar(e) {
4909
- if (ir() && navigator.canShare && navigator.canShare(e)) try {
4790
+ async function tr(e) {
4791
+ if (er() && navigator.canShare && navigator.canShare(e)) try {
4910
4792
  return await navigator.share(e), !0;
4911
4793
  } catch (e) {
4912
- T.on({
4794
+ w.on({
4913
4795
  group: "share",
4914
4796
  code: "error",
4915
4797
  details: e
@@ -4919,20 +4801,20 @@ async function ar(e) {
4919
4801
  }
4920
4802
  //#endregion
4921
4803
  //#region src/functions/inArray.ts
4922
- function or(e, t) {
4804
+ function nr(e, t) {
4923
4805
  return e.includes(t);
4924
4806
  }
4925
4807
  //#endregion
4926
4808
  //#region src/functions/initScrollbarOffset.ts
4927
- async function sr() {
4809
+ async function rr() {
4928
4810
  if (s()) {
4929
- let e = await It.get();
4811
+ let e = await Pt.get();
4930
4812
  document.body.style.setProperty("--sys-scrollbar-offset", `${e}px`);
4931
4813
  }
4932
4814
  }
4933
4815
  //#endregion
4934
4816
  //#region src/functions/intersectKey.ts
4935
- function cr(e, n) {
4817
+ function ir(e, n) {
4936
4818
  let i = {};
4937
4819
  return t(e) && t(n) && r(e, (e, t) => {
4938
4820
  t in n && (i[t] = e);
@@ -4940,33 +4822,33 @@ function cr(e, n) {
4940
4822
  }
4941
4823
  //#endregion
4942
4824
  //#region src/functions/isDifferent.ts
4943
- function lr(e, t) {
4825
+ function ar(e, t) {
4944
4826
  let n = Object.keys(e).length !== Object.keys(t).length;
4945
4827
  return n || r(e, (e, r) => {
4946
- e !== (t == null ? void 0 : t[r]) && (n = !0);
4828
+ e !== t?.[r] && (n = !0);
4947
4829
  }), n;
4948
4830
  }
4949
4831
  //#endregion
4950
4832
  //#region src/functions/isElementVisible.ts
4951
- function ur(e) {
4833
+ function or(e) {
4952
4834
  if (!s()) return !1;
4953
- let t = A(e);
4835
+ let t = k(e);
4954
4836
  if (!t || "isConnected" in t && t.isConnected === !1) return !1;
4955
4837
  let n = window.getComputedStyle(t);
4956
4838
  return n.display !== "none" && n.visibility !== "hidden" && n.opacity !== "0" && t.offsetWidth !== 0 && t.offsetHeight !== 0;
4957
4839
  }
4958
4840
  //#endregion
4959
4841
  //#region src/functions/isInput.ts
4960
- var dr = (e) => {
4842
+ var sr = (e) => {
4961
4843
  if (e instanceof HTMLElement) {
4962
4844
  let t = e.tagName.toLowerCase();
4963
- return !!(t === "input" || t === "textarea" || t === "select" || e.isContentEditable || e.getAttribute("contenteditable") === "true") && !(e != null && e.readOnly) && !(e != null && e.disabled);
4845
+ return !!(t === "input" || t === "textarea" || t === "select" || e.isContentEditable || e.getAttribute("contenteditable") === "true") && !e?.readOnly && !e?.disabled;
4964
4846
  }
4965
4847
  return !1;
4966
- }, fr = (e, t) => e.code !== "Space" && e.code !== "Enter" && e.key !== " " && e.key !== "Spacebar" && e.key !== "Enter" && e.keyCode !== 13 && e.keyCode !== 32 ? !1 : t === void 0 ? !dr(e.target) : !t;
4848
+ }, cr = (e, t) => e.code !== "Space" && e.code !== "Enter" && e.key !== " " && e.key !== "Spacebar" && e.key !== "Enter" && e.keyCode !== 13 && e.keyCode !== 32 ? !1 : t === void 0 ? !sr(e.target) : !t;
4967
4849
  //#endregion
4968
4850
  //#region src/functions/isFloat.ts
4969
- function pr(e) {
4851
+ function lr(e) {
4970
4852
  switch (typeof e) {
4971
4853
  case "number": return !0;
4972
4854
  case "string": return /^-?\d+(\.\d+)?$/.test(e);
@@ -4975,24 +4857,24 @@ function pr(e) {
4975
4857
  }
4976
4858
  //#endregion
4977
4859
  //#region src/functions/isIntegerBetween.ts
4978
- function mr(e, t) {
4860
+ function ur(e, t) {
4979
4861
  let n = Math.floor(t);
4980
4862
  return e >= n && e < n + 1;
4981
4863
  }
4982
4864
  //#endregion
4983
4865
  //#region src/functions/isMetaKey.ts
4984
- var hr = (e) => !!(e.metaKey || e.altKey || e.ctrlKey);
4866
+ var dr = (e) => !!(e.metaKey || e.altKey || e.ctrlKey);
4985
4867
  //#endregion
4986
4868
  //#region src/functions/isSelectedByList.ts
4987
- function gr(e, t) {
4988
- return Array.isArray(e) ? e.every((e) => x(e, t)) : x(e, t);
4869
+ function fr(e, t) {
4870
+ return Array.isArray(e) ? e.every((e) => S(e, t)) : S(e, t);
4989
4871
  }
4990
4872
  //#endregion
4991
4873
  //#region src/functions/isTab.ts
4992
- var _r = (e) => e.key === "Tab" || e.code === "Tab" || e.keyCode === 9;
4874
+ var pr = (e) => e.key === "Tab" || e.code === "Tab" || e.keyCode === 9;
4993
4875
  //#endregion
4994
4876
  //#region src/functions/removeCommonPrefix.ts
4995
- function vr(e, t) {
4877
+ function mr(e, t) {
4996
4878
  if (e.startsWith(t)) return e.slice(t.length).trim();
4997
4879
  let n = 0;
4998
4880
  for (; e[n] === t[n] && n < e.length && n < t.length;) n++;
@@ -5000,53 +4882,44 @@ function vr(e, t) {
5000
4882
  }
5001
4883
  //#endregion
5002
4884
  //#region src/functions/replaceComponentName.ts
5003
- var yr = (e, t, n) => {
5004
- var r;
5005
- return e == null || (r = e.replace(RegExp(`<${t}`, "ig"), `<${n}`)) == null || (r = r.replace(RegExp(`</${t}`, "ig"), `</${n}`)) == null ? void 0 : r.trim();
5006
- };
4885
+ var hr = (e, t, n) => e?.replace(RegExp(`<${t}`, "ig"), `<${n}`)?.replace(RegExp(`</${t}`, "ig"), `</${n}`)?.trim();
5007
4886
  //#endregion
5008
4887
  //#region src/functions/uniqueArray.ts
5009
- function br(e) {
4888
+ function gr(e) {
5010
4889
  return [...new Set(e)];
5011
4890
  }
5012
4891
  //#endregion
5013
4892
  //#region src/functions/replaceRecursive.ts
5014
4893
  function $(e, n, i = !0) {
5015
- let a = Q(e);
4894
+ let a = Z(e);
5016
4895
  return t(e) && t(n) && r(n, (n, r) => {
5017
- let o = e == null ? void 0 : e[r];
5018
- t(o) && t(n) ? i && Array.isArray(o) && Array.isArray(n) ? a[r] = Q(br([...o, ...n])) : a[r] = $(Array.isArray(o) ? { ...o } : o, n, i) : a[r] = t(n) ? Q(n) : n;
4896
+ let o = e?.[r];
4897
+ t(o) && t(n) ? i && Array.isArray(o) && Array.isArray(n) ? a[r] = Z(gr([...o, ...n])) : a[r] = $(Array.isArray(o) ? { ...o } : o, n, i) : a[r] = t(n) ? Z(n) : n;
5019
4898
  }), a;
5020
4899
  }
5021
4900
  //#endregion
5022
4901
  //#region src/functions/replaceTemplate.ts
5023
- function xr(e, t) {
4902
+ function _r(e, t) {
5024
4903
  let n = e;
5025
4904
  return r(t, (e, t) => {
5026
- n = n.replace(Wt(`[${t}]`), m(e));
4905
+ n = n.replace(X(`[${t}]`), m(e));
5027
4906
  }), n;
5028
4907
  }
5029
4908
  //#endregion
5030
4909
  //#region src/functions/resizeImage.ts
5031
- async function Sr(e, t = 1280, n) {
5032
- let r = Fn(e);
5033
- if (!s() || !r || t <= 0) return r;
5034
- if (typeof e != "string" && e.complete && e.naturalWidth) {
5035
- var i;
5036
- return (i = xn(e, t, "auto", n)) == null ? r : i;
5037
- }
5038
- return new Promise((e) => {
4910
+ async function vr(e, t = 1280, n) {
4911
+ let r = jn(e);
4912
+ return !s() || !r || t <= 0 ? r : typeof e != "string" && e.complete && e.naturalWidth ? Q(e, t, "auto", n) ?? r : new Promise((e) => {
5039
4913
  let i = new Image();
5040
4914
  i.onerror = () => e(r), i.onload = () => {
5041
- var a;
5042
- e((a = xn(i, t, "auto", n)) == null ? r : a);
4915
+ e(Q(i, t, "auto", n) ?? r);
5043
4916
  }, i.src = r;
5044
4917
  });
5045
4918
  }
5046
4919
  //#endregion
5047
4920
  //#region src/functions/secondToTime.ts
5048
- function Cr(e, t) {
5049
- let n = b(e);
4921
+ function yr(e, t) {
4922
+ let n = x(e);
5050
4923
  if (n > 0) {
5051
4924
  let e = String(Math.floor(n / 60)).padStart(2, "0"), r = String(n % 60).padStart(2, "0");
5052
4925
  return t && Number(e) >= 60 ? `${String(Math.floor(Number(e) / 60)).padStart(2, "0")}:${String(Number(e) % 60).padStart(2, "0")}:${r}` : `${e}:${r}`;
@@ -5055,7 +4928,7 @@ function Cr(e, t) {
5055
4928
  }
5056
4929
  //#endregion
5057
4930
  //#region src/functions/setValues.ts
5058
- function wr(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, notEmpty: o = !1 }) {
4931
+ function br(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, notEmpty: o = !1 }) {
5059
4932
  if (n) {
5060
4933
  if (i(e)) {
5061
4934
  let n = e.indexOf(t), i = [...e];
@@ -5067,68 +4940,67 @@ function wr(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, no
5067
4940
  }
5068
4941
  //#endregion
5069
4942
  //#region src/functions/sortList.ts
5070
- function Tr(e, t, n) {
5071
- var r;
4943
+ function xr(e, t, n) {
5072
4944
  if (t.length === 0 || e.length < 2) return e;
5073
- let i = ((r = Intl) == null ? void 0 : r.Collator) === void 0 ? void 0 : new Intl.Collator(void 0, {
4945
+ let r = Intl?.Collator === void 0 ? void 0 : new Intl.Collator(void 0, {
5074
4946
  numeric: !0,
5075
4947
  sensitivity: "base"
5076
4948
  });
5077
- return [...e].sort((e, r) => {
4949
+ return [...e].sort((e, i) => {
5078
4950
  for (let { column: a, dir: o } of t) {
5079
4951
  if (!a) continue;
5080
4952
  if (n) {
5081
- let t = n(e, r, a, o);
4953
+ let t = n(e, i, a, o);
5082
4954
  if (t !== 0) return t;
5083
4955
  continue;
5084
4956
  }
5085
- let t = V(e, a), s = V(r, a);
4957
+ let t = z(e, a), s = z(i, a);
5086
4958
  if (t === s) continue;
5087
4959
  if (c(t)) return 1;
5088
4960
  if (c(s)) return -1;
5089
4961
  let l = o === "desc" ? -1 : 1;
5090
- if (g(t) && g(s)) return (b(t) - b(s)) * l;
4962
+ if (g(t) && g(s)) return (x(t) - x(s)) * l;
5091
4963
  if (typeof t == "boolean" && typeof s == "boolean") return (Number(t) - Number(s)) * l;
5092
4964
  let u = String(t), d = String(s);
5093
- return (i ? i.compare(u, d) : u.localeCompare(d)) * l;
4965
+ return (r ? r.compare(u, d) : u.localeCompare(d)) * l;
5094
4966
  }
5095
4967
  return 0;
5096
4968
  });
5097
4969
  }
5098
4970
  //#endregion
5099
4971
  //#region src/functions/splice.ts
5100
- function Er(e, n, i) {
4972
+ function Sr(e, n, i) {
5101
4973
  if (t(e) && t(n)) {
5102
4974
  if (i) {
5103
4975
  let a = {}, o = !1;
5104
4976
  return r(e, (e, r) => {
5105
- !o && (i === r || i === e) ? (o = !0, a = $(a, n)) : o ? a = $(a, { [r]: e }) : a[r] = t(e) ? Q(e) : e;
4977
+ !o && (i === r || i === e) ? (o = !0, a = $(a, n)) : o ? a = $(a, { [r]: e }) : a[r] = t(e) ? Z(e) : e;
5106
4978
  }), o ? a : $(e, n);
5107
4979
  }
5108
4980
  if (t(n)) return $(e, n);
5109
4981
  }
5110
- return Q(e);
4982
+ return Z(e);
5111
4983
  }
5112
4984
  //#endregion
5113
4985
  //#region src/functions/toCamelCaseFirst.ts
5114
- function Dr(e) {
5115
- return at(e).replace(/^([a-z])/, (e) => `${e.toUpperCase()}`);
4986
+ function Cr(e) {
4987
+ return rt(e).replace(/^([a-z])/, (e) => `${e.toUpperCase()}`);
5116
4988
  }
5117
4989
  //#endregion
5118
4990
  //#region src/functions/toKebabCase.ts
5119
- function Or(e) {
4991
+ function wr(e) {
5120
4992
  return e.toString().trim().replace(/[^\w-. ]+/g, "").replace(/[ .]+/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (e) => `${e.toLowerCase()}`).replace(/^[A-Z]/, (e) => e.toLowerCase()).replace(/(?<=[\w ])[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/[A-Z]/g, (e) => e.toLowerCase());
5121
4993
  }
5122
4994
  //#endregion
5123
4995
  //#region src/functions/toNumberByMax.ts
5124
- function kr(e, t, n, r) {
5125
- let i = b(e), a = b(t);
5126
- return t && a < i ? `${Ar(a, n, r)}+` : Ar(i, n, r);
4996
+ function Tr(e, t, n, r) {
4997
+ let i = x(e), a = x(t);
4998
+ return t && a < i ? `${Er(a, n, r)}+` : Er(i, n, r);
5127
4999
  }
5128
- var Ar = (e, t, n) => t ? new R(n).number(e) : e;
5000
+ var Er = (e, t, n) => t ? new I(n).number(e) : e;
5129
5001
  //#endregion
5130
5002
  //#region src/functions/toNumberPositive.ts
5131
- function jr(e, t = 0) {
5003
+ function Dr(e, t = 0) {
5132
5004
  if (l(e)) {
5133
5005
  let t = Number(e);
5134
5006
  if (Number.isFinite(t) && t > 0) return t;
@@ -5137,35 +5009,29 @@ function jr(e, t = 0) {
5137
5009
  }
5138
5010
  //#endregion
5139
5011
  //#region src/functions/toPercent.ts
5140
- function Mr(e, t) {
5012
+ function Or(e, t) {
5141
5013
  return e === 0 ? t : 1 / e * t;
5142
5014
  }
5143
5015
  //#endregion
5144
5016
  //#region src/functions/toPercentBy100.ts
5145
- function Nr(e, t) {
5146
- return Mr(e, t) * 100;
5017
+ function kr(e, t) {
5018
+ return Or(e, t) * 100;
5147
5019
  }
5148
5020
  //#endregion
5149
5021
  //#region src/functions/uint8ArrayToBase64.ts
5150
- function Pr(e) {
5022
+ function Ar(e) {
5151
5023
  let t = "";
5152
5024
  for (let n of e) t += String.fromCharCode(n);
5153
- if (s()) return window.btoa(t);
5154
- if (globalThis && globalThis.Buffer) {
5155
- var n;
5156
- return (n = globalThis) == null ? void 0 : n.Buffer.from(e).toString("base64");
5157
- }
5158
- return "";
5025
+ return s() ? window.btoa(t) : globalThis && globalThis.Buffer ? globalThis?.Buffer.from(e).toString("base64") : "";
5159
5026
  }
5160
5027
  //#endregion
5161
5028
  //#region src/functions/writeClipboardData.ts
5162
- async function Fr(e) {
5029
+ async function jr(e) {
5163
5030
  if (s()) try {
5164
5031
  await navigator.clipboard.writeText(e);
5165
- } catch (n) {
5166
- var t;
5167
- (t = document) == null || t.execCommand("copy", !1, e);
5032
+ } catch {
5033
+ document?.execCommand("copy", !1, e);
5168
5034
  }
5169
5035
  }
5170
5036
  //#endregion
5171
- export { I as Api, N as ApiCache, Be as ApiDataReturn, Ve as ApiDefault, We as ApiError, He as ApiErrorItem, Ue as ApiErrorStorage, Ge as ApiHeaders, qe as ApiHydration, Ze as ApiInstance, P as ApiMethodItem, Je as ApiPreparation, Xe as ApiResponse, Re as ApiStatus, Qe as BroadcastMessage, tt as Cache, et as CacheItem, nt as CacheStatic, Ee as Cookie, Ce as CookieBlock, Se as CookieBlockInstance, O as CookieStorage, D as DataStorage, it as Datetime, T as ErrorCenter, le as ErrorCenterHandler, ue as ErrorCenterInstance, Ne as EventItem, ot as Formatters, H as FormattersType, st as GEO_FLAG_ICON_NAME, k as Geo, ct as GeoFlag, ke as GeoInstance, R as GeoIntl, lt as GeoPhone, dt as GeoUnit, ft as Global, ht as Hash, mt as HashInstance, vt as Icons, M as Loading, Fe as LoadingInstance, jt as Meta, K as MetaManager, kt as MetaOg, Et as MetaOpenGraphAge, wt as MetaOpenGraphAvailability, Tt as MetaOpenGraphCondition, Dt as MetaOpenGraphGender, J as MetaOpenGraphTag, Ct as MetaOpenGraphType, St as MetaRobots, Mt as MetaStatic, q as MetaTag, At as MetaTwitter, Ot as MetaTwitterCard, Y as MetaTwitterTag, Pt as Query, Nt as QueryInstance, Ft as ResumableTimer, It as ScrollbarWidth, Yt as SearchList, Ht as SearchListData, Ut as SearchListItem, qt as SearchListMatcher, Jt as SearchListOptions, E as ServerStorage, Zt as StorageCallback, nn as TRANSLATE_GLOBAL_PREFIX, rn as TRANSLATE_TIME_OUT, sn as Translate, an as TranslateFile, on as TranslateInstance, De as UI_GEO_COOKIE_KEY, pt as UrlInstanceAbstract, X as UrlItem, Vt as addTagHighlightMatch, S as anyToString, en as applyTemplate, cn as arrFill, pn as blobToBase64, mn as capitalize, Q as copyObject, hn as copyObjectLite, W as createElement, gn as domContentLoaded, _n as domQuerySelector, vn as domQuerySelectorAll, G as encodeAttribute, me as encodeLiteAttribute, Sn as ensureMaxSize, Z as escapeExp, Cn as eventStopPropagation, m as executeFunction, F as executePromise, r as forEach, wn as frame, Tn as getArrayHighlightMatch, En as getAttributes, Dn as getClipboardData, rt as getColumn, On as getCurrentDate, kn as getCurrentTime, A as getElement, Mn as getElementId, yn as getElementImage, yt as getElementItem, je as getElementOrWindow, he as getElementSafeScript, Gt as getExactSearchExp, Wt as getExp, Pn as getFirst, ge as getHydrationData, Fn as getImageSrc, V as getItemByPath, In as getKey, Ln as getLast, Rn as getLength, zn as getLengthOfAllArray, Bn as getMaxLengthAllArray, Vn as getMinLengthAllArray, Wn as getMouseClient, Hn as getMouseClientX, Un as getMouseClientY, Gn as getObjectByKeys, Kn as getObjectNoUndefined, qn as getObjectOrNone, Jn as getOnlyText, Yn as getRandomItem, Zn as getRandomText, o as getRequestString, Kt as getSearchExp, Lt as getSeparatingSearchExp, Qn as getStepPercent, $n as getStepValue, tr as goScroll, nr as goScrollSmooth, rr as goScrollTo, ar as handleShare, or as inArray, Nn as initGetElementId, sr as initScrollbarOffset, cr as intersectKey, tn as isApiSuccess, i as isArray, lr as isDifferent, ae as isDomData, s as isDomRuntime, ur as isElementVisible, fr as isEnter, l as isFilled, pr as isFloat, p as isFunction, Me as isInDom, dr as isInput, mr as isIntegerBetween, hr as isMetaKey, c as isNull, g as isNumber, t as isObject, n as isObjectNotArray, u as isOnLine, x as isSelected, gr as isSelectedByList, ir as isShare, d as isString, _r as isTab, Ae as isWindow, f as random, vr as removeCommonPrefix, yr as replaceComponentName, $ as replaceRecursive, xr as replaceTemplate, Sr as resizeImage, xn as resizeImageByMax, Cr as secondToTime, bt as setElementItem, wr as setValues, ee as sleep, Tr as sortList, Er as splice, Xn as strFill, oe as strSplit, j as toArray, at as toCamelCase, Dr as toCamelCaseFirst, L as toDate, Or as toKebabCase, b as toNumber, kr as toNumberByMax, jr as toNumberPositive, Mr as toPercent, Nr as toPercentBy100, a as toString, fe as transformation, Pr as uint8ArrayToBase64, br as uniqueArray, Fr as writeClipboardData };
5037
+ export { P as Api, Fe as ApiCache, Re as ApiDataReturn, ze as ApiDefault, He as ApiError, Be as ApiErrorItem, Ve as ApiErrorStorage, Ue as ApiHeaders, Ge as ApiHydration, Ye as ApiInstance, M as ApiMethodItem, Ke as ApiPreparation, Je as ApiResponse, Ie as ApiStatus, Xe as BroadcastMessage, $e as Cache, Qe as CacheItem, et as CacheStatic, Ce as Cookie, ye as CookieBlock, ve as CookieBlockInstance, xe as CookieStorage, D as DataStorage, nt as Datetime, w as ErrorCenter, oe as ErrorCenterHandler, se as ErrorCenterInstance, Ae as EventItem, it as Formatters, B as FormattersType, at as GEO_FLAG_ICON_NAME, O as Geo, ot as GeoFlag, Ee as GeoInstance, I as GeoIntl, st as GeoPhone, lt as GeoUnit, ut as Global, pt as Hash, ft as HashInstance, gt as Icons, j as Loading, Me as LoadingInstance, kt as Meta, W as MetaManager, Dt as MetaOg, wt as MetaOpenGraphAge, St as MetaOpenGraphAvailability, Ct as MetaOpenGraphCondition, Tt as MetaOpenGraphGender, K as MetaOpenGraphTag, xt as MetaOpenGraphType, bt as MetaRobots, At as MetaStatic, G as MetaTag, Ot as MetaTwitter, Et as MetaTwitterCard, q as MetaTwitterTag, Mt as Query, jt as QueryInstance, Nt as ResumableTimer, Pt as ScrollbarWidth, Kt as SearchList, Bt as SearchListData, Vt as SearchListItem, Wt as SearchListMatcher, Gt as SearchListOptions, E as ServerStorage, Jt as StorageCallback, $t as TRANSLATE_GLOBAL_PREFIX, en as TRANSLATE_TIME_OUT, rn as Translate, tn as TranslateFile, nn as TranslateInstance, we as UI_GEO_COOKIE_KEY, dt as UrlInstanceAbstract, J as UrlItem, zt as addTagHighlightMatch, C as anyToString, Zt as applyTemplate, an as arrFill, un as blobToBase64, dn as capitalize, Z as copyObject, fn as copyObjectLite, H as createElement, pn as domContentLoaded, mn as domQuerySelector, hn as domQuerySelectorAll, U as encodeAttribute, ue as encodeLiteAttribute, vn as ensureMaxSize, Y as escapeExp, yn as eventStopPropagation, m as executeFunction, N as executePromise, r as forEach, bn as frame, xn as getArrayHighlightMatch, Sn as getAttributes, Cn as getClipboardData, tt as getColumn, wn as getCurrentDate, Tn as getCurrentTime, k as getElement, On as getElementId, gn as getElementImage, _t as getElementItem, Oe as getElementOrWindow, de as getElementSafeScript, Ht as getExactSearchExp, X as getExp, An as getFirst, fe as getHydrationData, jn as getImageSrc, z as getItemByPath, Mn as getKey, Nn as getLast, Pn as getLength, Fn as getLengthOfAllArray, In as getMaxLengthAllArray, Ln as getMinLengthAllArray, Bn as getMouseClient, Rn as getMouseClientX, zn as getMouseClientY, Vn as getObjectByKeys, Hn as getObjectNoUndefined, Un as getObjectOrNone, Wn as getOnlyText, Gn as getRandomItem, qn as getRandomText, o as getRequestString, Ut as getSearchExp, Ft as getSeparatingSearchExp, Jn as getStepPercent, Yn as getStepValue, Zn as goScroll, Qn as goScrollSmooth, $n as goScrollTo, tr as handleShare, nr as inArray, kn as initGetElementId, rr as initScrollbarOffset, ir as intersectKey, Qt as isApiSuccess, i as isArray, ar as isDifferent, ie as isDomData, s as isDomRuntime, or as isElementVisible, cr as isEnter, l as isFilled, lr as isFloat, p as isFunction, ke as isInDom, sr as isInput, ur as isIntegerBetween, dr as isMetaKey, c as isNull, g as isNumber, t as isObject, n as isObjectNotArray, u as isOnLine, S as isSelected, fr as isSelectedByList, er as isShare, d as isString, pr as isTab, De as isWindow, f as random, mr as removeCommonPrefix, hr as replaceComponentName, $ as replaceRecursive, _r as replaceTemplate, vr as resizeImage, Q as resizeImageByMax, yr as secondToTime, vt as setElementItem, br as setValues, ee as sleep, xr as sortList, Sr as splice, Kn as strFill, ae as strSplit, A as toArray, rt as toCamelCase, Cr as toCamelCaseFirst, F as toDate, wr as toKebabCase, x as toNumber, Tr as toNumberByMax, Dr as toNumberPositive, Or as toPercent, kr as toPercentBy100, a as toString, T as transformation, Ar as uint8ArrayToBase64, gr as uniqueArray, jr as writeClipboardData };