@sarafapp/iron_core 1.0.43 → 1.0.45
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/IronCore.js +1059 -1611
- package/dist/IronCore.umd.cjs +2 -17
- package/package.json +1 -1
package/dist/IronCore.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { toRaw as
|
|
3
|
-
import { JsonConvert as
|
|
4
|
-
import { defineStore as
|
|
5
|
-
var
|
|
6
|
-
const
|
|
1
|
+
import x from "dayjs";
|
|
2
|
+
import { toRaw as Ee, reactive as Be, ref as M, watch as et, computed as I, onBeforeUnmount as tt } from "vue";
|
|
3
|
+
import { JsonConvert as st, JsonProperty as N, JsonObject as De } from "json2typescript";
|
|
4
|
+
import { defineStore as Ue } from "pinia";
|
|
5
|
+
var be = /* @__PURE__ */ ((t) => (t.BankCard = "####-####-####-####", t.Iban = "##-####-####-####-####-####-##", t))(be || {}), ee = /* @__PURE__ */ ((t) => (t.FullDate = "YYYY/M/D HH:mm", t.SimpleDate = "YYYY/M/D", t.CompactGregorianDate = "YYYYMMDD", t.ShortJalaliDate = "YYMM", t.JustHour = "HH:mm:ss", t))(ee || {});
|
|
6
|
+
const rt = [
|
|
7
7
|
{
|
|
8
8
|
62198619: {
|
|
9
9
|
persian: "بلو",
|
|
@@ -250,7 +250,7 @@ const It = [
|
|
|
250
250
|
english: "agriculture"
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
],
|
|
253
|
+
], at = [
|
|
254
254
|
{
|
|
255
255
|
"010": {
|
|
256
256
|
persian: "بانک مرکزی",
|
|
@@ -414,345 +414,345 @@ const It = [
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
];
|
|
417
|
-
var
|
|
418
|
-
function
|
|
417
|
+
var it = /* @__PURE__ */ ((t) => (t.Normal = "YYYY-MM-DD", t.ContainsHour = "YYYY-MM-DD HH:mm", t.OnlyHour = "HH:mm", t))(it || {});
|
|
418
|
+
function pe(t) {
|
|
419
419
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
420
420
|
}
|
|
421
|
-
var
|
|
422
|
-
function
|
|
423
|
-
return
|
|
424
|
-
(function(
|
|
425
|
-
t.exports =
|
|
426
|
-
})(
|
|
427
|
-
return function(
|
|
428
|
-
|
|
429
|
-
var i = this.$locale().weekStart || 0,
|
|
430
|
-
return this.$utils().u(
|
|
421
|
+
var ce = { exports: {} }, nt = ce.exports, ke;
|
|
422
|
+
function ot() {
|
|
423
|
+
return ke || (ke = 1, function(t, e) {
|
|
424
|
+
(function(s, r) {
|
|
425
|
+
t.exports = r();
|
|
426
|
+
})(nt, function() {
|
|
427
|
+
return function(s, r) {
|
|
428
|
+
r.prototype.weekday = function(a) {
|
|
429
|
+
var i = this.$locale().weekStart || 0, n = this.$W, h = (n < i ? n + 7 : n) - i;
|
|
430
|
+
return this.$utils().u(a) ? h : this.subtract(h, "day").add(a, "day");
|
|
431
431
|
};
|
|
432
432
|
};
|
|
433
433
|
});
|
|
434
|
-
}(
|
|
435
|
-
}
|
|
436
|
-
var
|
|
437
|
-
const
|
|
438
|
-
var
|
|
439
|
-
function
|
|
440
|
-
return
|
|
441
|
-
(function(
|
|
442
|
-
t.exports =
|
|
443
|
-
})(
|
|
444
|
-
var
|
|
445
|
-
return function(
|
|
446
|
-
var
|
|
447
|
-
|
|
448
|
-
if (
|
|
449
|
-
var
|
|
434
|
+
}(ce)), ce.exports;
|
|
435
|
+
}
|
|
436
|
+
var lt = ot();
|
|
437
|
+
const ct = /* @__PURE__ */ pe(lt);
|
|
438
|
+
var ue = { exports: {} }, ut = ue.exports, Te;
|
|
439
|
+
function ht() {
|
|
440
|
+
return Te || (Te = 1, function(t, e) {
|
|
441
|
+
(function(s, r) {
|
|
442
|
+
t.exports = r();
|
|
443
|
+
})(ut, function() {
|
|
444
|
+
var s = "week", r = "year";
|
|
445
|
+
return function(a, i, n) {
|
|
446
|
+
var h = i.prototype;
|
|
447
|
+
h.week = function(c) {
|
|
448
|
+
if (c === void 0 && (c = null), c !== null) return this.add(7 * (c - this.week()), "day");
|
|
449
|
+
var g = this.$locale().yearStart || 1;
|
|
450
450
|
if (this.month() === 11 && this.date() > 25) {
|
|
451
|
-
var f =
|
|
452
|
-
if (f.isBefore(
|
|
451
|
+
var f = n(this).startOf(r).add(1, r).date(g), u = n(this).endOf(s);
|
|
452
|
+
if (f.isBefore(u)) return 1;
|
|
453
453
|
}
|
|
454
|
-
var
|
|
455
|
-
return
|
|
456
|
-
},
|
|
457
|
-
return
|
|
454
|
+
var m = n(this).startOf(r).date(g).startOf(s).subtract(1, "millisecond"), p = this.diff(m, s, !0);
|
|
455
|
+
return p < 0 ? n(this).startOf("week").week() : Math.ceil(p);
|
|
456
|
+
}, h.weeks = function(c) {
|
|
457
|
+
return c === void 0 && (c = null), this.week(c);
|
|
458
458
|
};
|
|
459
459
|
};
|
|
460
460
|
});
|
|
461
|
-
}(
|
|
462
|
-
}
|
|
463
|
-
var
|
|
464
|
-
const
|
|
465
|
-
var
|
|
466
|
-
function
|
|
467
|
-
return
|
|
468
|
-
(function(
|
|
469
|
-
t.exports =
|
|
470
|
-
})(
|
|
471
|
-
return function(
|
|
472
|
-
|
|
473
|
-
var
|
|
474
|
-
return i === 1 &&
|
|
461
|
+
}(ue)), ue.exports;
|
|
462
|
+
}
|
|
463
|
+
var dt = ht();
|
|
464
|
+
const ft = /* @__PURE__ */ pe(dt);
|
|
465
|
+
var he = { exports: {} }, mt = he.exports, Pe;
|
|
466
|
+
function vt() {
|
|
467
|
+
return Pe || (Pe = 1, function(t, e) {
|
|
468
|
+
(function(s, r) {
|
|
469
|
+
t.exports = r();
|
|
470
|
+
})(mt, function() {
|
|
471
|
+
return function(s, r) {
|
|
472
|
+
r.prototype.weekYear = function() {
|
|
473
|
+
var a = this.month(), i = this.week(), n = this.year();
|
|
474
|
+
return i === 1 && a === 11 ? n + 1 : a === 0 && i >= 52 ? n - 1 : n;
|
|
475
475
|
};
|
|
476
476
|
};
|
|
477
477
|
});
|
|
478
|
-
}(
|
|
479
|
-
}
|
|
480
|
-
var
|
|
481
|
-
const
|
|
482
|
-
var
|
|
483
|
-
function
|
|
484
|
-
return
|
|
485
|
-
(function(
|
|
486
|
-
t.exports =
|
|
487
|
-
})(
|
|
488
|
-
function
|
|
489
|
-
return
|
|
478
|
+
}(he)), he.exports;
|
|
479
|
+
}
|
|
480
|
+
var gt = vt();
|
|
481
|
+
const pt = /* @__PURE__ */ pe(gt);
|
|
482
|
+
var de = { exports: {} }, yt = de.exports, $e;
|
|
483
|
+
function St() {
|
|
484
|
+
return $e || ($e = 1, function(t, e) {
|
|
485
|
+
(function(s, r) {
|
|
486
|
+
t.exports = r(x);
|
|
487
|
+
})(yt, function(s) {
|
|
488
|
+
function r(n) {
|
|
489
|
+
return n && typeof n == "object" && "default" in n ? n : { default: n };
|
|
490
490
|
}
|
|
491
|
-
var
|
|
492
|
-
return
|
|
491
|
+
var a = r(s), i = { name: "fa", weekdays: "یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"), weekdaysShort: "یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"), weekdaysMin: "ی_د_س_چ_پ_ج_ش".split("_"), weekStart: 6, months: "ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"), monthsShort: "ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"), ordinal: function(n) {
|
|
492
|
+
return n;
|
|
493
493
|
}, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd, D MMMM YYYY HH:mm" }, relativeTime: { future: "در %s", past: "%s پیش", s: "چند ثانیه", m: "یک دقیقه", mm: "%d دقیقه", h: "یک ساعت", hh: "%d ساعت", d: "یک روز", dd: "%d روز", M: "یک ماه", MM: "%d ماه", y: "یک سال", yy: "%d سال" } };
|
|
494
|
-
return
|
|
494
|
+
return a.default.locale(i, null, !0), i;
|
|
495
495
|
});
|
|
496
|
-
}(
|
|
496
|
+
}(de)), de.exports;
|
|
497
497
|
}
|
|
498
|
-
var
|
|
499
|
-
const
|
|
500
|
-
function
|
|
501
|
-
return
|
|
498
|
+
var It = St();
|
|
499
|
+
const wt = /* @__PURE__ */ pe(It);
|
|
500
|
+
function oe(t, e) {
|
|
501
|
+
return bt(t) || At(t, e) || Dt();
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function bt(t) {
|
|
504
504
|
if (Array.isArray(t)) return t;
|
|
505
505
|
}
|
|
506
|
-
function
|
|
507
|
-
var
|
|
506
|
+
function At(t, e) {
|
|
507
|
+
var s = [], r = !0, a = !1, i = void 0;
|
|
508
508
|
try {
|
|
509
|
-
for (var
|
|
509
|
+
for (var n = t[Symbol.iterator](), h; !(r = (h = n.next()).done) && (s.push(h.value), !(e && s.length === e)); r = !0)
|
|
510
510
|
;
|
|
511
|
-
} catch (
|
|
512
|
-
|
|
511
|
+
} catch (c) {
|
|
512
|
+
a = !0, i = c;
|
|
513
513
|
} finally {
|
|
514
514
|
try {
|
|
515
|
-
!
|
|
515
|
+
!r && n.return != null && n.return();
|
|
516
516
|
} finally {
|
|
517
|
-
if (
|
|
517
|
+
if (a) throw i;
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
return
|
|
520
|
+
return s;
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function Dt() {
|
|
523
523
|
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
524
524
|
}
|
|
525
|
-
function
|
|
525
|
+
function He(t, e, s) {
|
|
526
526
|
e <= 2 && (t -= 1, e += 12);
|
|
527
|
-
var
|
|
527
|
+
var r = Math.floor(t / 100), a = 2 - r + Math.floor(r / 4), i = Math.floor(365.25 * (t + 4716)) + Math.floor(30.6001 * (e + 1)) + s + a - 1524.5;
|
|
528
528
|
return i;
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function Rt(t) {
|
|
531
531
|
t = t + 0.5;
|
|
532
|
-
var e = Math.floor(t),
|
|
532
|
+
var e = Math.floor(t), s = t - e, r = e;
|
|
533
533
|
if (e >= 2299161) {
|
|
534
|
-
var
|
|
535
|
-
|
|
534
|
+
var a = Math.floor((e - 186721625e-2) / 36524.25);
|
|
535
|
+
r = e + 1 + a - Math.floor(a / 4);
|
|
536
536
|
}
|
|
537
|
-
var i =
|
|
538
|
-
return
|
|
537
|
+
var i = r + 1524, n = Math.floor((i - 122.1) / 365.25), h = Math.floor(365.25 * n), c = Math.floor((i - h) / 30.6001), g = i - h - Math.floor(30.6001 * c) + s, f = c < 14 ? c - 1 : c - 13, u = f > 2 ? n - 4716 : n - 4715;
|
|
538
|
+
return Ct(u, f, g);
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function _t(t) {
|
|
541
541
|
t = t + 0.5;
|
|
542
|
-
var e = Math.floor(t),
|
|
542
|
+
var e = Math.floor(t), s = t - e, r = e;
|
|
543
543
|
if (e >= 2299161) {
|
|
544
|
-
var
|
|
545
|
-
|
|
544
|
+
var a = Math.floor((e - 186721625e-2) / 36524.25);
|
|
545
|
+
r = e + 1 + a - Math.floor(a / 4);
|
|
546
546
|
}
|
|
547
|
-
var i =
|
|
548
|
-
return [Math.floor(
|
|
547
|
+
var i = r + 1524, n = Math.floor((i - 122.1) / 365.25), h = Math.floor(365.25 * n), c = Math.floor((i - h) / 30.6001), g = i - h - Math.floor(30.6001 * c) + s, f = c < 14 ? c - 1 : c - 13, u = f > 2 ? n - 4716 : n - 4715;
|
|
548
|
+
return [Math.floor(u), Math.floor(f), Math.floor(g)];
|
|
549
549
|
}
|
|
550
|
-
function
|
|
551
|
-
var
|
|
552
|
-
function i(
|
|
553
|
-
return Math.floor(
|
|
550
|
+
function Mt(t, e, s) {
|
|
551
|
+
var r = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], a = [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29];
|
|
552
|
+
function i(p, b) {
|
|
553
|
+
return Math.floor(p / b);
|
|
554
554
|
}
|
|
555
555
|
t -= 979;
|
|
556
|
-
for (var
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
var
|
|
560
|
-
|
|
556
|
+
for (var n = 365 * t + i(t, 33) * 8 + i(t % 33 + 3, 4), h = 0; h < e - 1; ++h)
|
|
557
|
+
n += a[h];
|
|
558
|
+
n += s - 1;
|
|
559
|
+
var c = n + 79, g = 1600 + 400 * i(c, 146097);
|
|
560
|
+
c = c % 146097;
|
|
561
561
|
var f = !0;
|
|
562
|
-
for (
|
|
563
|
-
|
|
564
|
-
var
|
|
565
|
-
return
|
|
566
|
-
}
|
|
567
|
-
function
|
|
568
|
-
var
|
|
569
|
-
function i(
|
|
570
|
-
return Math.floor(
|
|
571
|
-
}
|
|
572
|
-
for (var
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
var
|
|
576
|
-
|
|
577
|
-
var
|
|
578
|
-
|
|
579
|
-
for (var b = 0; b < 11 &&
|
|
580
|
-
|
|
581
|
-
var
|
|
582
|
-
return [
|
|
583
|
-
}
|
|
584
|
-
var
|
|
585
|
-
J: function(e,
|
|
586
|
-
return
|
|
587
|
-
},
|
|
588
|
-
G: function(e,
|
|
589
|
-
return
|
|
590
|
-
}
|
|
591
|
-
},
|
|
562
|
+
for (c >= 36525 && (c--, g += 100 * i(c, 36524), c = c % 36524, c >= 365 ? c++ : f = !1), g += 4 * i(c, 1461), c %= 1461, c >= 366 && (f = !1, c--, g += i(c, 365), c = c % 365), h = 0; c >= r[h] + (h == 1 && f); h++)
|
|
563
|
+
c -= r[h] + (h == 1 && f);
|
|
564
|
+
var u = h + 1, m = c + 1;
|
|
565
|
+
return He(g, u, m);
|
|
566
|
+
}
|
|
567
|
+
function Ct(t, e, s) {
|
|
568
|
+
var r = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], a = [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29];
|
|
569
|
+
function i(H, q) {
|
|
570
|
+
return Math.floor(H / q);
|
|
571
|
+
}
|
|
572
|
+
for (var n = t - 1600, h = e - 1, c = s - 1, g = 365 * n + i(n + 3, 4) - i(n + 99, 100) + i(n + 399, 400), f = 0; f < h; ++f)
|
|
573
|
+
g += r[f];
|
|
574
|
+
h > 1 && (t % 4 == 0 && t % 100 != 0 || t % 400 == 0) && g++, g += c;
|
|
575
|
+
var u = g - 79, m = i(u, 12053);
|
|
576
|
+
u %= 12053;
|
|
577
|
+
var p = 979 + 33 * m + 4 * i(u, 1461);
|
|
578
|
+
u %= 1461, u >= 366 && (p += i(u - 1, 365), u = (u - 1) % 365);
|
|
579
|
+
for (var b = 0; b < 11 && u >= a[b]; ++b)
|
|
580
|
+
u -= a[b];
|
|
581
|
+
var B = b + 1, U = u + 1;
|
|
582
|
+
return [p, B, U];
|
|
583
|
+
}
|
|
584
|
+
var le = {
|
|
585
|
+
J: function(e, s, r) {
|
|
586
|
+
return Rt(He(e, s, r));
|
|
587
|
+
},
|
|
588
|
+
G: function(e, s, r) {
|
|
589
|
+
return _t(Mt(e, s, r));
|
|
590
|
+
}
|
|
591
|
+
}, Lt = /^(\d{4})[-/]?(\d{1,2})[-/]?(\d{0,2})(.*)?$/, xt = /\[.*?\]|jY{2,4}|jM{1,4}|jD{1,2}|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, we = "date", J = "day", T = "month", P = "year", Ve = "week", Ot = "YYYY-MM-DDTHH:mm:ssZ", Et = {
|
|
592
592
|
jmonths: "فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_")
|
|
593
|
-
},
|
|
594
|
-
var
|
|
595
|
-
return
|
|
596
|
-
},
|
|
593
|
+
}, kt = function(t, e, s) {
|
|
594
|
+
var r = e.prototype, a = r.$utils(), i = function(l) {
|
|
595
|
+
return l.$C === "jalali";
|
|
596
|
+
}, n = a.prettyUnit || a.p, h = a.isUndefined || a.u, c = a.padStart || a.s, g = a.monthDiff || a.m, f = a.absFloor || a.a, u = function(l) {
|
|
597
597
|
return function() {
|
|
598
|
-
var
|
|
599
|
-
return
|
|
598
|
+
var d = l.bind(this).apply(void 0, arguments);
|
|
599
|
+
return d.$C = this.$C, d.isJalali() && d.InitJalali(), d;
|
|
600
600
|
};
|
|
601
601
|
};
|
|
602
|
-
|
|
603
|
-
var
|
|
604
|
-
|
|
605
|
-
return
|
|
606
|
-
},
|
|
607
|
-
var
|
|
608
|
-
return
|
|
609
|
-
},
|
|
602
|
+
r.startOf = u(r.startOf), r.endOf = u(r.endOf), r.add = u(r.add), r.subtract = u(r.subtract), r.set = u(r.set);
|
|
603
|
+
var m = r.parse, p = r.init, b = r.startOf, B = r.$set, U = r.add, H = r.format, q = r.diff, ye = r.year, Se = r.month, re = r.date, Ie = r.daysInMonth, X = r.toArray;
|
|
604
|
+
s.$C = "gregory", s.$fdow = 6, s.calendar = function(o) {
|
|
605
|
+
return s.$C = o, s;
|
|
606
|
+
}, r.calendar = function(o) {
|
|
607
|
+
var l = this.clone();
|
|
608
|
+
return l.$C = o, l.isJalali() && l.InitJalali(), l;
|
|
609
|
+
}, r.isJalali = function() {
|
|
610
610
|
return i(this);
|
|
611
|
-
},
|
|
612
|
-
var
|
|
613
|
-
return
|
|
614
|
-
locale:
|
|
615
|
-
utc:
|
|
616
|
-
calendar:
|
|
611
|
+
}, s.en.jmonths = "Farvardin_Ordibehesht_Khordaad_Tir_Mordaad_Shahrivar_Mehr_Aabaan_Aazar_Dey_Bahman_Esfand".split("_"), s.locale("fa", Object.assign({}, wt, {}, Et), !0);
|
|
612
|
+
var z = function(l, d) {
|
|
613
|
+
return s(l, {
|
|
614
|
+
locale: d.$L,
|
|
615
|
+
utc: d.$u,
|
|
616
|
+
calendar: d.$C
|
|
617
617
|
});
|
|
618
618
|
};
|
|
619
|
-
|
|
620
|
-
var
|
|
621
|
-
|
|
622
|
-
},
|
|
623
|
-
var
|
|
624
|
-
if (this.$C =
|
|
625
|
-
var
|
|
626
|
-
|
|
627
|
-
}
|
|
628
|
-
return
|
|
629
|
-
},
|
|
630
|
-
var
|
|
631
|
-
this.$jy =
|
|
632
|
-
},
|
|
633
|
-
var
|
|
619
|
+
r.init = function() {
|
|
620
|
+
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
621
|
+
p.bind(this)(o), this.isJalali() && this.InitJalali();
|
|
622
|
+
}, r.parse = function(o) {
|
|
623
|
+
var l;
|
|
624
|
+
if (this.$C = o.calendar || this.$C || s.$C, o.jalali && typeof o.date == "string" && /.*[^Z]$/i.test(o.date) && (l = o.date.match(Lt))) {
|
|
625
|
+
var d = le.G(parseInt(l[1], 10), parseInt(l[2], 10), parseInt(l[3] || 1, 10)), S = oe(d, 3), w = S[0], y = S[1], A = S[2];
|
|
626
|
+
o.date = "".concat(w, "-").concat(y, "-").concat(A).concat(l[4] || "");
|
|
627
|
+
}
|
|
628
|
+
return m.bind(this)(o);
|
|
629
|
+
}, r.InitJalali = function() {
|
|
630
|
+
var o = le.J(this.$y, this.$M + 1, this.$D), l = oe(o, 3), d = l[0], S = l[1], w = l[2];
|
|
631
|
+
this.$jy = d, this.$jM = S - 1, this.$jD = w;
|
|
632
|
+
}, r.startOf = function(o, l) {
|
|
633
|
+
var d = this;
|
|
634
634
|
if (!i(this))
|
|
635
|
-
return b.bind(this)(
|
|
636
|
-
var S = l
|
|
637
|
-
var
|
|
638
|
-
return (S ?
|
|
639
|
-
},
|
|
640
|
-
switch (
|
|
641
|
-
case
|
|
635
|
+
return b.bind(this)(o, l);
|
|
636
|
+
var S = h(l) ? !0 : l, w = n(o), y = function(G, E) {
|
|
637
|
+
var L = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : d.$jy, ie = le.G(L, E + 1, G), k = oe(ie, 3), Q = k[0], ne = k[1], Qe = k[2], Oe = z(new Date(Q, ne - 1, Qe), d);
|
|
638
|
+
return (S ? Oe : Oe.endOf(J)).$set("hour", 1);
|
|
639
|
+
}, A = (this.$W + (7 - s.$fdow)) % 7;
|
|
640
|
+
switch (w) {
|
|
641
|
+
case P:
|
|
642
642
|
return S ? y(1, 0) : y(0, 0, this.$jy + 1);
|
|
643
|
-
case
|
|
643
|
+
case T:
|
|
644
644
|
return S ? y(1, this.$jM) : y(0, (this.$jM + 1) % 12, this.$jy + parseInt((this.$jM + 1) / 12, 10));
|
|
645
|
-
case
|
|
646
|
-
return S ? y(this.$jD -
|
|
645
|
+
case Ve:
|
|
646
|
+
return S ? y(this.$jD - A, this.$jM) : y(this.$jD + (6 - A), this.$jM);
|
|
647
647
|
default:
|
|
648
|
-
return b.bind(this)(
|
|
648
|
+
return b.bind(this)(o, l);
|
|
649
649
|
}
|
|
650
|
-
},
|
|
651
|
-
var
|
|
650
|
+
}, r.$set = function(o, l) {
|
|
651
|
+
var d = this;
|
|
652
652
|
if (!i(this))
|
|
653
|
-
return
|
|
654
|
-
var S =
|
|
655
|
-
var
|
|
656
|
-
return
|
|
653
|
+
return B.bind(this)(o, l);
|
|
654
|
+
var S = n(o), w = function(A, ae) {
|
|
655
|
+
var G = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : d.$jy, E = le.G(G, ae + 1, A), L = oe(E, 3), ie = L[0], k = L[1], Q = L[2];
|
|
656
|
+
return d.$d.setFullYear(ie), d.$d.setMonth(k - 1), d.$d.setDate(Q), d;
|
|
657
657
|
};
|
|
658
658
|
switch (S) {
|
|
659
|
-
case
|
|
660
|
-
case
|
|
661
|
-
|
|
659
|
+
case we:
|
|
660
|
+
case J:
|
|
661
|
+
w(l, this.$jM);
|
|
662
662
|
break;
|
|
663
|
-
case
|
|
664
|
-
|
|
663
|
+
case T:
|
|
664
|
+
w(this.$jD, l);
|
|
665
665
|
break;
|
|
666
|
-
case
|
|
667
|
-
|
|
666
|
+
case P:
|
|
667
|
+
w(this.$jD, this.$jM, l);
|
|
668
668
|
break;
|
|
669
669
|
default:
|
|
670
|
-
return
|
|
670
|
+
return B.bind(this)(o, l);
|
|
671
671
|
}
|
|
672
672
|
return this.init(), this;
|
|
673
|
-
},
|
|
674
|
-
var
|
|
673
|
+
}, r.add = function(o, l) {
|
|
674
|
+
var d = this;
|
|
675
675
|
if (!i(this))
|
|
676
|
-
return
|
|
677
|
-
|
|
678
|
-
var S =
|
|
679
|
-
var
|
|
680
|
-
return
|
|
676
|
+
return U.bind(this)(o, l);
|
|
677
|
+
o = Number(o);
|
|
678
|
+
var S = l && (l.length === 1 || l === "ms") ? l : n(l), w = function(k, Q) {
|
|
679
|
+
var ne = d.set(we, 1).set(k, Q + o);
|
|
680
|
+
return ne.set(we, Math.min(d.$jD, ne.daysInMonth()));
|
|
681
681
|
};
|
|
682
|
-
if (["M",
|
|
683
|
-
var y = this.$jM +
|
|
684
|
-
return
|
|
685
|
-
}
|
|
686
|
-
if (["y",
|
|
687
|
-
return
|
|
688
|
-
if (["d",
|
|
689
|
-
var
|
|
690
|
-
return
|
|
691
|
-
}
|
|
692
|
-
if (["w",
|
|
693
|
-
var
|
|
694
|
-
return
|
|
695
|
-
}
|
|
696
|
-
return
|
|
697
|
-
},
|
|
698
|
-
var
|
|
682
|
+
if (["M", T].indexOf(S) > -1) {
|
|
683
|
+
var y = this.$jM + o, A = y < 0 ? -Math.ceil(-y / 12) : Math.floor(y / 12), ae = this.$jD, G = this.set(J, 1).add(A, P).set(T, y - A * 12);
|
|
684
|
+
return G.set(J, Math.min(G.daysInMonth(), ae));
|
|
685
|
+
}
|
|
686
|
+
if (["y", P].indexOf(S) > -1)
|
|
687
|
+
return w(P, this.$jy);
|
|
688
|
+
if (["d", J].indexOf(S) > -1) {
|
|
689
|
+
var E = new Date(this.$d);
|
|
690
|
+
return E.setDate(E.getDate() + o), z(E, this);
|
|
691
|
+
}
|
|
692
|
+
if (["w", Ve].indexOf(S) > -1) {
|
|
693
|
+
var L = new Date(this.$d);
|
|
694
|
+
return L.setDate(L.getDate() + o * 7), z(L, this);
|
|
695
|
+
}
|
|
696
|
+
return U.bind(this)(o, l);
|
|
697
|
+
}, r.format = function(o, l) {
|
|
698
|
+
var d = this;
|
|
699
699
|
if (!i(this))
|
|
700
|
-
return
|
|
701
|
-
var S =
|
|
702
|
-
return S.replace(
|
|
703
|
-
if (
|
|
704
|
-
switch (
|
|
700
|
+
return H.bind(this)(o, l);
|
|
701
|
+
var S = o || Ot, w = l || this.$locale(), y = w.jmonths;
|
|
702
|
+
return S.replace(xt, function(A) {
|
|
703
|
+
if (A.indexOf("[") > -1) return A.replace(/\[|\]/g, "");
|
|
704
|
+
switch (A) {
|
|
705
705
|
case "YY":
|
|
706
|
-
return String(
|
|
706
|
+
return String(d.$jy).slice(-2);
|
|
707
707
|
case "YYYY":
|
|
708
|
-
return String(
|
|
708
|
+
return String(d.$jy);
|
|
709
709
|
case "M":
|
|
710
|
-
return String(
|
|
710
|
+
return String(d.$jM + 1);
|
|
711
711
|
case "MM":
|
|
712
|
-
return
|
|
712
|
+
return c(d.$jM + 1, 2, "0");
|
|
713
713
|
case "MMM":
|
|
714
|
-
return y[
|
|
714
|
+
return y[d.$jM].slice(0, 3);
|
|
715
715
|
case "MMMM":
|
|
716
|
-
return y[
|
|
716
|
+
return y[d.$jM];
|
|
717
717
|
case "D":
|
|
718
|
-
return String(
|
|
718
|
+
return String(d.$jD);
|
|
719
719
|
case "DD":
|
|
720
|
-
return
|
|
720
|
+
return c(d.$jD, 2, "0");
|
|
721
721
|
default:
|
|
722
|
-
return
|
|
722
|
+
return H.bind(d)(A, l);
|
|
723
723
|
}
|
|
724
724
|
});
|
|
725
|
-
},
|
|
725
|
+
}, r.diff = function(o, l, d) {
|
|
726
726
|
if (!i(this))
|
|
727
|
-
return
|
|
728
|
-
var S =
|
|
727
|
+
return q.bind(this)(o, l, d);
|
|
728
|
+
var S = n(l), w = s(o), y = g(this, w);
|
|
729
729
|
switch (S) {
|
|
730
|
-
case
|
|
730
|
+
case P:
|
|
731
731
|
y /= 12;
|
|
732
732
|
break;
|
|
733
|
-
case
|
|
733
|
+
case T:
|
|
734
734
|
break;
|
|
735
735
|
default:
|
|
736
|
-
return
|
|
737
|
-
}
|
|
738
|
-
return
|
|
739
|
-
},
|
|
740
|
-
return
|
|
741
|
-
},
|
|
742
|
-
return i(this) ? this.$g(
|
|
743
|
-
},
|
|
744
|
-
return i(this) ? this.$g(
|
|
745
|
-
},
|
|
746
|
-
return i(this) ? this.$g(
|
|
747
|
-
},
|
|
748
|
-
return i(this) ? this.endOf(
|
|
749
|
-
},
|
|
750
|
-
return i(this) ? [this.$jy, this.$jM, this.$jD, this.$H, this.$m, this.$s, this.$ms] :
|
|
751
|
-
}),
|
|
752
|
-
return
|
|
736
|
+
return q.bind(this)(o, l, d);
|
|
737
|
+
}
|
|
738
|
+
return d ? y : f(y);
|
|
739
|
+
}, r.$g = function(o, l, d) {
|
|
740
|
+
return h(o) ? this[l] : this.set(d, o);
|
|
741
|
+
}, r.year = function(o) {
|
|
742
|
+
return i(this) ? this.$g(o, "$jy", P) : ye.bind(this)(o);
|
|
743
|
+
}, r.month = function(o) {
|
|
744
|
+
return i(this) ? this.$g(o, "$jM", T) : Se.bind(this)(o);
|
|
745
|
+
}, r.date = function(o) {
|
|
746
|
+
return i(this) ? this.$g(o, "$jD", J) : re.bind(this)(o);
|
|
747
|
+
}, r.daysInMonth = function() {
|
|
748
|
+
return i(this) ? this.endOf(T).$jD : Ie.bind(this)();
|
|
749
|
+
}, X && (r.toArray = function() {
|
|
750
|
+
return i(this) ? [this.$jy, this.$jM, this.$jD, this.$H, this.$m, this.$s, this.$ms] : X.bind(this)();
|
|
751
|
+
}), r.clone = function() {
|
|
752
|
+
return z(this.toDate(), this);
|
|
753
753
|
};
|
|
754
754
|
};
|
|
755
|
-
const
|
|
755
|
+
const Tt = {
|
|
756
756
|
ordinal(t) {
|
|
757
757
|
},
|
|
758
758
|
relativeTime: void 0,
|
|
@@ -774,20 +774,20 @@ const Xt = {
|
|
|
774
774
|
LLLL: "dddd, D MMMM YYYY HH:mm"
|
|
775
775
|
}
|
|
776
776
|
};
|
|
777
|
-
function
|
|
778
|
-
|
|
777
|
+
function Pt() {
|
|
778
|
+
x.extend(kt), x.calendar("jalali"), x.extend(ct), x.extend(ft), x.extend(pt), x.locale(Tt, {}, !0);
|
|
779
779
|
}
|
|
780
|
-
class
|
|
781
|
-
constructor(e,
|
|
782
|
-
this.start = e, this.end =
|
|
780
|
+
class ss {
|
|
781
|
+
constructor(e, s) {
|
|
782
|
+
this.start = e, this.end = s;
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
|
-
class
|
|
786
|
-
constructor(e,
|
|
787
|
-
this.maxDate = e, this.minDate =
|
|
785
|
+
class rs {
|
|
786
|
+
constructor(e, s, r) {
|
|
787
|
+
this.maxDate = e, this.minDate = s, this.disabledDates = r;
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
|
-
class
|
|
790
|
+
class W {
|
|
791
791
|
static standardToUnix(e) {
|
|
792
792
|
return Math.floor(new Date(e).getTime() / 1e3);
|
|
793
793
|
}
|
|
@@ -795,115 +795,115 @@ class Z {
|
|
|
795
795
|
return new Date(e * 1e3).toString();
|
|
796
796
|
}
|
|
797
797
|
static getUnixEndOfDayInUnix(e) {
|
|
798
|
-
return
|
|
798
|
+
return x.unix(e).endOf("day").unix();
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
|
-
class
|
|
802
|
-
static isDateDisabled(e,
|
|
803
|
-
for (const
|
|
804
|
-
if (
|
|
805
|
-
return !!(e.maxDate &&
|
|
801
|
+
class fe {
|
|
802
|
+
static isDateDisabled(e, s) {
|
|
803
|
+
for (const r of e.disabledDates)
|
|
804
|
+
if (fe.areUnixesInSameDate(r, s.unix())) return !0;
|
|
805
|
+
return !!(e.maxDate && fe.isDateGraterOrSame(e.maxDate, s.unix()) || e.minDate && fe.isDateLowerOrSame(e.minDate, s.unix()));
|
|
806
806
|
}
|
|
807
|
-
static areUnixesInSameDate(e,
|
|
808
|
-
return
|
|
807
|
+
static areUnixesInSameDate(e, s) {
|
|
808
|
+
return W.getUnixEndOfDayInUnix(e) === W.getUnixEndOfDayInUnix(s);
|
|
809
809
|
}
|
|
810
|
-
static isDateGraterOrSame(e,
|
|
811
|
-
return
|
|
810
|
+
static isDateGraterOrSame(e, s) {
|
|
811
|
+
return W.getUnixEndOfDayInUnix(s) >= W.getUnixEndOfDayInUnix(e);
|
|
812
812
|
}
|
|
813
|
-
static isDateLowerOrSame(e,
|
|
814
|
-
return
|
|
813
|
+
static isDateLowerOrSame(e, s) {
|
|
814
|
+
return W.getUnixEndOfDayInUnix(s) <= W.getUnixEndOfDayInUnix(e);
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
|
-
|
|
818
|
-
class
|
|
819
|
-
static toCurrency(e,
|
|
820
|
-
return e.toLocaleString("en-US",
|
|
817
|
+
Pt();
|
|
818
|
+
class _ {
|
|
819
|
+
static toCurrency(e, s) {
|
|
820
|
+
return e.toLocaleString("en-US", s);
|
|
821
821
|
}
|
|
822
822
|
static toCurrencyWithDotSeparator(e) {
|
|
823
|
-
return
|
|
823
|
+
return _.toCurrency(e).replaceAll(",", ".");
|
|
824
824
|
}
|
|
825
|
-
static applyMask(e,
|
|
826
|
-
let
|
|
827
|
-
for (;
|
|
828
|
-
if (e[
|
|
829
|
-
if (i >=
|
|
825
|
+
static applyMask(e, s) {
|
|
826
|
+
let r = "", a = 0, i = 0;
|
|
827
|
+
for (; a < e.length; ) {
|
|
828
|
+
if (e[a] === "#") {
|
|
829
|
+
if (i >= s.length)
|
|
830
830
|
throw new Error("Value length does not match the format.");
|
|
831
|
-
|
|
831
|
+
r += s[i], i++;
|
|
832
832
|
} else
|
|
833
|
-
|
|
834
|
-
|
|
833
|
+
r += e[a];
|
|
834
|
+
a++;
|
|
835
835
|
}
|
|
836
|
-
if (i !==
|
|
836
|
+
if (i !== s.length)
|
|
837
837
|
throw new Error("Value length does not match the format.");
|
|
838
|
-
return
|
|
838
|
+
return r;
|
|
839
839
|
}
|
|
840
840
|
static applyBankCardMask(e) {
|
|
841
|
-
return
|
|
841
|
+
return _.applyMask(be.BankCard, String(e));
|
|
842
842
|
}
|
|
843
843
|
static applyIbanMask(e) {
|
|
844
|
-
return
|
|
844
|
+
return _.applyMask(be.Iban, String(e));
|
|
845
845
|
}
|
|
846
846
|
static toEnglishDigits(e) {
|
|
847
|
-
const
|
|
847
|
+
const s = ["۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹", "۰"], r = ["١", "٢", "٣", "٤", "٥", "٦", "٧", "٨", "٩", "٠"], a = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"];
|
|
848
848
|
return e.split("").map(
|
|
849
|
-
(i) =>
|
|
849
|
+
(i) => a[s.indexOf(i)] || a[r.indexOf(i)] || i
|
|
850
850
|
).join("");
|
|
851
851
|
}
|
|
852
|
-
static mapUnixToDate(e,
|
|
853
|
-
return
|
|
852
|
+
static mapUnixToDate(e, s) {
|
|
853
|
+
return x(new Date(e)).subtract(1, "day").format(s);
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
|
-
var
|
|
857
|
-
class
|
|
858
|
-
static getBankImageBaseOnCardInfo(e,
|
|
859
|
-
return e === void 0 ? "/img/banks/shetab.png" :
|
|
856
|
+
var v = /* @__PURE__ */ ((t) => (t.FetchList = "fetchList", t.AutoRefresh = "autoRefresh", t.FetchItem = "fetchItem", t.FetchLastItems = "fetchLastItems", t.FetchPreviousItems = "fetchPreviousItems", t.Create = "CREATE", t.Update = "UPDATE", t.Delete = "DELETE", t.Search = "SEARCH", t.Sort = "SORT", t.Success = "SUCCESS", t.Error = "ERROR", t.Idle = "IDLE", t))(v || {}), $ = /* @__PURE__ */ ((t) => (t.Width = "width", t.Height = "height", t[t.DefaultWidth = 500] = "DefaultWidth", t[t.DefaultHeight = 350] = "DefaultHeight", t[t.MinimalAvailableSize = 0] = "MinimalAvailableSize", t))($ || {}), O = /* @__PURE__ */ ((t) => (t.ASC = "ASC", t.DESC = "DESC", t))(O || {}), $t = /* @__PURE__ */ ((t) => (t.ASC = "ascend", t.DESC = "descend", t))($t || {}), Re = /* @__PURE__ */ ((t) => (t.Left = "left", t.Right = "right", t.Center = "center", t))(Re || {}), _e = /* @__PURE__ */ ((t) => (t.Text = "text", t))(_e || {}), Me = /* @__PURE__ */ ((t) => (t.Text = "text", t.ACTION = "action", t.Tag = "tag", t.Iban = "iban", t.BankCard = "bankCard", t.Symbol = "symbol", t.TradeDetail = "tradeDetail", t.SymbolPrice = "symbolPrice", t.TradeSymbol = "tradeSymbol", t.Price = "price", t.DynamicCurrencyPrice = "dynamicCurrencyPrice", t.TradeDate = "tradeDate", t.RequestResponseIdentity = "requestResponseIdentity", t.Image = "image", t))(Me || {}), qe = /* @__PURE__ */ ((t) => (t[t.MINIMAL_LOADABLE_HEADER_COUNT = 0] = "MINIMAL_LOADABLE_HEADER_COUNT", t[t.DEFAULT_ITEM_COUNT_PER_PAGE = 20] = "DEFAULT_ITEM_COUNT_PER_PAGE", t.PAGINATION_POSITION = "bottomCenter", t))(qe || {}), Ce = /* @__PURE__ */ ((t) => (t.FontFamily = "IRANSansX", t))(Ce || {}), te = /* @__PURE__ */ ((t) => (t.Open = "open", t.Close = "close", t))(te || {}), Vt = /* @__PURE__ */ ((t) => (t[t.NotFound = 404] = "NotFound", t[t.Unauthorized = 401] = "Unauthorized", t[t.ServerError = 500] = "ServerError", t))(Vt || {}), me = /* @__PURE__ */ ((t) => (t[t.Invalid = 0] = "Invalid", t[t.Valid = 1] = "Valid", t))(me || {}), Y = /* @__PURE__ */ ((t) => (t.Theme = "theme", t.AccessList = "accessList", t.Token = "token", t.SSO_ACCESS_LIST = "ssoAccessList", t))(Y || {}), Ce = /* @__PURE__ */ ((t) => (t.Light = "light", t.Dark = "dark", t))(Ce || {}), Le = /* @__PURE__ */ ((t) => (t.Dialog = "dialog", t.Drawer = "drawer", t.Module = "module", t.Toast = "toast", t))(Le || {}), Ft = /* @__PURE__ */ ((t) => (t.USDT = "USDT", t))(Ft || {});
|
|
857
|
+
class Z {
|
|
858
|
+
static getBankImageBaseOnCardInfo(e, s) {
|
|
859
|
+
return e === void 0 ? "/img/banks/shetab.png" : s === "IBAN" ? (e = _.toEnglishDigits(
|
|
860
860
|
e.replace(/IR/g, "").split(" ").join("")
|
|
861
|
-
), `/img/banks/${
|
|
861
|
+
), `/img/banks/${Z.iban(e).english}.png`) : (e = _.toEnglishDigits(
|
|
862
862
|
e.replace(/ /g, "")
|
|
863
|
-
), `/img/banks/${
|
|
863
|
+
), `/img/banks/${Z.card(e).english}.png`);
|
|
864
864
|
}
|
|
865
865
|
static card(e) {
|
|
866
|
-
const
|
|
867
|
-
if (e == null) return
|
|
866
|
+
const s = { persian: "نامشخص", english: "shetab" };
|
|
867
|
+
if (e == null) return s;
|
|
868
868
|
e = e.substring(0, 6);
|
|
869
869
|
try {
|
|
870
|
-
const
|
|
871
|
-
return
|
|
870
|
+
const r = rt.find((a) => Object.keys(a)[0] === e);
|
|
871
|
+
return r === void 0 ? s : Object.values(r)[0];
|
|
872
872
|
} catch {
|
|
873
|
-
return
|
|
873
|
+
return s;
|
|
874
874
|
}
|
|
875
875
|
}
|
|
876
876
|
// Args: number -> string
|
|
877
877
|
// Returns: Object { persian: "string", english: "string" } || {}
|
|
878
878
|
static iban(e) {
|
|
879
|
-
const
|
|
880
|
-
if (e == null) return
|
|
879
|
+
const s = { persian: "نامشخص", english: "shetab" };
|
|
880
|
+
if (e == null) return s;
|
|
881
881
|
e = e.substring(2, 5);
|
|
882
882
|
try {
|
|
883
|
-
const
|
|
884
|
-
return
|
|
883
|
+
const r = at.find((a) => Object.keys(a)[0] === e);
|
|
884
|
+
return r === void 0 ? s : Object.values(r)[0];
|
|
885
885
|
} catch {
|
|
886
|
-
return
|
|
886
|
+
return s;
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
889
|
static async copyValueToClipboard(e) {
|
|
890
890
|
await navigator.clipboard.writeText(String(e));
|
|
891
891
|
}
|
|
892
|
-
static downloadBlob(e,
|
|
893
|
-
const
|
|
894
|
-
|
|
892
|
+
static downloadBlob(e, s = Z.extractFileNameFromHeader(e)) {
|
|
893
|
+
const r = document.createElement("a");
|
|
894
|
+
r.href = URL.createObjectURL(e.data), r.download = s, r.dispatchEvent(
|
|
895
895
|
new MouseEvent("click", {
|
|
896
896
|
bubbles: !0,
|
|
897
897
|
cancelable: !0,
|
|
898
898
|
composed: !0
|
|
899
899
|
})
|
|
900
|
-
),
|
|
900
|
+
), r.remove();
|
|
901
901
|
}
|
|
902
902
|
static extractFileNameFromHeader(e) {
|
|
903
|
-
var
|
|
904
|
-
return ((
|
|
903
|
+
var r, a, i, n;
|
|
904
|
+
return ((n = (r = e.headers["content-disposition"]) == null ? void 0 : r.split("filename=")[1]) == null ? void 0 : n.slice(
|
|
905
905
|
1,
|
|
906
|
-
((i = (
|
|
906
|
+
((i = (a = e.headers["content-disposition"]) == null ? void 0 : a.split("filename=")) == null ? void 0 : i[1].length) - 1
|
|
907
907
|
)) || "Saraf-File";
|
|
908
908
|
}
|
|
909
909
|
static removeSpacesFromString(e) {
|
|
@@ -912,63 +912,63 @@ class Q {
|
|
|
912
912
|
""
|
|
913
913
|
);
|
|
914
914
|
}
|
|
915
|
-
static isArraySorted(e,
|
|
916
|
-
return e.every((
|
|
915
|
+
static isArraySorted(e, s = (a) => a, r = O.ASC) {
|
|
916
|
+
return e.every((a, i) => e.length - 1 === i ? !0 : r === O.ASC ? s(a) <= s(e[i + 1]) : s(a) >= s(e[i + 1]));
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
|
-
const
|
|
919
|
+
const V = class V {
|
|
920
920
|
constructor() {
|
|
921
921
|
this.availableAccesses = /* @__PURE__ */ new Set();
|
|
922
922
|
}
|
|
923
923
|
setAvailableAccesses(e) {
|
|
924
924
|
this.setAccessListToStorage(e);
|
|
925
|
-
for (const
|
|
926
|
-
this.availableAccesses.add(
|
|
925
|
+
for (const s of e)
|
|
926
|
+
this.availableAccesses.add(s);
|
|
927
927
|
}
|
|
928
928
|
setAccessListToStorage(e) {
|
|
929
|
-
localStorage.setItem(
|
|
929
|
+
localStorage.setItem(Y.AccessList, JSON.stringify(e));
|
|
930
930
|
}
|
|
931
931
|
everyAccess(e) {
|
|
932
|
-
return e.every((
|
|
932
|
+
return e.every((s) => this.availableAccesses.has(s));
|
|
933
933
|
}
|
|
934
934
|
someAccess(e) {
|
|
935
|
-
return e.some((
|
|
935
|
+
return e.some((s) => this.availableAccesses.has(s));
|
|
936
936
|
}
|
|
937
937
|
clearAvailableAccesses() {
|
|
938
|
-
this.availableAccesses.clear(), localStorage.removeItem(
|
|
938
|
+
this.availableAccesses.clear(), localStorage.removeItem(Y.AccessList);
|
|
939
939
|
}
|
|
940
940
|
initialize() {
|
|
941
|
-
const e = localStorage.getItem(
|
|
941
|
+
const e = localStorage.getItem(Y.AccessList);
|
|
942
942
|
e !== null && this.setAvailableAccesses(JSON.parse(e));
|
|
943
943
|
}
|
|
944
944
|
static GetInstance() {
|
|
945
|
-
return
|
|
945
|
+
return V.Instance || (V.Instance = new V()), V.Instance;
|
|
946
946
|
}
|
|
947
947
|
};
|
|
948
|
-
|
|
949
|
-
let
|
|
950
|
-
class
|
|
948
|
+
V.Instance = null;
|
|
949
|
+
let se = V;
|
|
950
|
+
class ze {
|
|
951
951
|
constructor() {
|
|
952
|
-
this.mounted = (e,
|
|
953
|
-
this.checkAccess(e,
|
|
954
|
-
}, this.updated = (e,
|
|
955
|
-
this.checkAccess(e,
|
|
956
|
-
}, this.checkAccess = (e,
|
|
957
|
-
this.hasAccess(
|
|
958
|
-
}, this.accessService =
|
|
952
|
+
this.mounted = (e, s) => {
|
|
953
|
+
this.checkAccess(e, s.value);
|
|
954
|
+
}, this.updated = (e, s) => {
|
|
955
|
+
this.checkAccess(e, s.value);
|
|
956
|
+
}, this.checkAccess = (e, s) => {
|
|
957
|
+
this.hasAccess(s) || e.remove();
|
|
958
|
+
}, this.accessService = se.GetInstance();
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
|
-
class
|
|
961
|
+
class as extends ze {
|
|
962
962
|
hasAccess(e) {
|
|
963
963
|
return this.accessService.everyAccess(e);
|
|
964
964
|
}
|
|
965
965
|
}
|
|
966
|
-
class
|
|
966
|
+
class is extends ze {
|
|
967
967
|
hasAccess(e) {
|
|
968
968
|
return this.accessService.someAccess(e);
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
|
-
const
|
|
971
|
+
const F = class F {
|
|
972
972
|
constructor() {
|
|
973
973
|
this._accessLevels = /* @__PURE__ */ new Map();
|
|
974
974
|
}
|
|
@@ -976,15 +976,15 @@ const j = class j {
|
|
|
976
976
|
this.setAccessLevelFromStorage();
|
|
977
977
|
}
|
|
978
978
|
setAccessLevels(e) {
|
|
979
|
-
for (const
|
|
980
|
-
this._accessLevels.set(
|
|
979
|
+
for (const s in e)
|
|
980
|
+
this._accessLevels.set(s, new Set(e[s]));
|
|
981
981
|
this.setAccessLevelsToStorage(e);
|
|
982
982
|
}
|
|
983
983
|
setAccessLevelsToStorage(e) {
|
|
984
|
-
localStorage.setItem(
|
|
984
|
+
localStorage.setItem(Y.SSO_ACCESS_LIST, JSON.stringify(e));
|
|
985
985
|
}
|
|
986
986
|
getAccessLevelsFromStorage() {
|
|
987
|
-
let e = localStorage.getItem(
|
|
987
|
+
let e = localStorage.getItem(Y.SSO_ACCESS_LIST);
|
|
988
988
|
return e !== null ? JSON.parse(e) : e;
|
|
989
989
|
}
|
|
990
990
|
getAccessLevelsOfScope(e) {
|
|
@@ -996,108 +996,108 @@ const j = class j {
|
|
|
996
996
|
const e = this.getAccessLevelsFromStorage();
|
|
997
997
|
e && this.setAccessLevels(e);
|
|
998
998
|
}
|
|
999
|
-
everyAccess(e,
|
|
1000
|
-
const
|
|
1001
|
-
return
|
|
999
|
+
everyAccess(e, s) {
|
|
1000
|
+
const r = this.getAccessLevelsOfScope(e);
|
|
1001
|
+
return r ? s.every((a) => r.has(a)) : !1;
|
|
1002
1002
|
}
|
|
1003
|
-
someAccess(e,
|
|
1004
|
-
const
|
|
1005
|
-
return
|
|
1003
|
+
someAccess(e, s) {
|
|
1004
|
+
const r = this.getAccessLevelsOfScope(e);
|
|
1005
|
+
return r ? s.some((a) => r.has(a)) : !1;
|
|
1006
1006
|
}
|
|
1007
1007
|
hasScope(e) {
|
|
1008
1008
|
return this._accessLevels.has(e);
|
|
1009
1009
|
}
|
|
1010
1010
|
clear() {
|
|
1011
|
-
localStorage.removeItem(
|
|
1011
|
+
localStorage.removeItem(Y.SSO_ACCESS_LIST), this._accessLevels = /* @__PURE__ */ new Map();
|
|
1012
1012
|
}
|
|
1013
1013
|
static GetInstance() {
|
|
1014
|
-
return
|
|
1014
|
+
return F._instance || (F._instance = new F()), F._instance;
|
|
1015
1015
|
}
|
|
1016
1016
|
};
|
|
1017
|
-
|
|
1018
|
-
let
|
|
1019
|
-
class
|
|
1017
|
+
F._instance = null;
|
|
1018
|
+
let Ae = F;
|
|
1019
|
+
class Ge {
|
|
1020
1020
|
constructor() {
|
|
1021
|
-
this._authorizationService =
|
|
1021
|
+
this._authorizationService = Ae.GetInstance(), this.mounted = this.mounted.bind(this), this.updated = this.updated.bind(this), this.hasAccess = this.hasAccess.bind(this), this.manageElement = this.manageElement.bind(this);
|
|
1022
1022
|
}
|
|
1023
|
-
mounted(e,
|
|
1024
|
-
this.manageElement(e,
|
|
1023
|
+
mounted(e, s, r) {
|
|
1024
|
+
this.manageElement(e, s.arg, s.modifiers);
|
|
1025
1025
|
}
|
|
1026
|
-
updated(e,
|
|
1027
|
-
this.manageElement(e,
|
|
1026
|
+
updated(e, s, r) {
|
|
1027
|
+
this.manageElement(e, s.arg, s.modifiers);
|
|
1028
1028
|
}
|
|
1029
|
-
manageElement(e,
|
|
1030
|
-
if (!this._authorizationService.hasScope(
|
|
1029
|
+
manageElement(e, s, r) {
|
|
1030
|
+
if (!this._authorizationService.hasScope(s)) {
|
|
1031
1031
|
e.remove();
|
|
1032
1032
|
return;
|
|
1033
1033
|
}
|
|
1034
|
-
const
|
|
1035
|
-
this.hasAccess(
|
|
1034
|
+
const a = this.getAccessLevels(s, r);
|
|
1035
|
+
this.hasAccess(s, a) || e.remove();
|
|
1036
1036
|
}
|
|
1037
|
-
getAccessLevels(e,
|
|
1038
|
-
var
|
|
1039
|
-
let
|
|
1040
|
-
return
|
|
1037
|
+
getAccessLevels(e, s) {
|
|
1038
|
+
var a;
|
|
1039
|
+
let r = Object.keys(s);
|
|
1040
|
+
return r.length || (r = Array.from(((a = this._authorizationService.getAccessLevelsOfScope(e)) == null ? void 0 : a.values()) ?? [])), r;
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
|
-
class
|
|
1044
|
-
hasAccess(e,
|
|
1045
|
-
return this._authorizationService.everyAccess(e,
|
|
1043
|
+
class ns extends Ge {
|
|
1044
|
+
hasAccess(e, s) {
|
|
1045
|
+
return this._authorizationService.everyAccess(e, s);
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
-
class
|
|
1049
|
-
hasAccess(e,
|
|
1050
|
-
return this._authorizationService.someAccess(e,
|
|
1048
|
+
class os extends Ge {
|
|
1049
|
+
hasAccess(e, s) {
|
|
1050
|
+
return this._authorizationService.someAccess(e, s);
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
1053
|
-
class
|
|
1053
|
+
class jt {
|
|
1054
1054
|
constructor() {
|
|
1055
1055
|
this.value = null, this.initialValue = null, this.name = "", this.isValid = !1, this.isBlurSensitive = !1, this.isRequired = !1, this.isIncludeInRequestBody = !0, this.isChangeSensitive = !1, this.notValidMessage = "", this.isEmptySensitive = !0, this.hasCustomValidationCheck = !1, this.shouldRemoveValidationMessageOnInteract = !1;
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
|
-
function
|
|
1058
|
+
function ls(t) {
|
|
1059
1059
|
return t === 1;
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1061
|
+
function cs(t, e) {
|
|
1062
1062
|
return t - 1 === e;
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function Yt(t) {
|
|
1065
1065
|
return String(t).length === 0 || t === null || t === void 0;
|
|
1066
1066
|
}
|
|
1067
|
-
function
|
|
1067
|
+
function us(t) {
|
|
1068
1068
|
t();
|
|
1069
1069
|
}
|
|
1070
|
-
class
|
|
1071
|
-
constructor(e,
|
|
1072
|
-
this.initialData = null, this.data = new
|
|
1070
|
+
class hs {
|
|
1071
|
+
constructor(e, s) {
|
|
1072
|
+
this.initialData = null, this.data = new jt(), this._validators = [], this._id = Math.random(), this.data.value = s, this.data.name = e, this.shouldRunValidation() && this.runValidation(!0);
|
|
1073
1073
|
}
|
|
1074
1074
|
shouldRunValidation() {
|
|
1075
|
-
return this.data.hasCustomValidationCheck ? !1 : this.data.isRequired ? !0 : !
|
|
1075
|
+
return this.data.hasCustomValidationCheck ? !1 : this.data.isRequired ? !0 : !Yt(this.data.value);
|
|
1076
1076
|
}
|
|
1077
1077
|
async runValidation(e = !1) {
|
|
1078
|
-
for (const
|
|
1079
|
-
const
|
|
1080
|
-
if (
|
|
1081
|
-
this.setFormToInvalidState(e,
|
|
1078
|
+
for (const s of this._validators) {
|
|
1079
|
+
const r = await s.validate(this.data.value);
|
|
1080
|
+
if (r) {
|
|
1081
|
+
this.setFormToInvalidState(e, r);
|
|
1082
1082
|
return;
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
|
1085
1085
|
this.setFormToValidState();
|
|
1086
1086
|
}
|
|
1087
|
-
setFormToInvalidState(e,
|
|
1088
|
-
this.data.isValid = !1, (this.data.isChangeSensitive || e) && this.setNotValidMessage(
|
|
1087
|
+
setFormToInvalidState(e, s) {
|
|
1088
|
+
this.data.isValid = !1, (this.data.isChangeSensitive || e) && this.setNotValidMessage(s);
|
|
1089
1089
|
}
|
|
1090
1090
|
setFormToValidState() {
|
|
1091
1091
|
this.data.isValid = !0, this.setNotValidMessage("");
|
|
1092
1092
|
}
|
|
1093
1093
|
reset() {
|
|
1094
|
-
this.initialData ? this.data = structuredClone(
|
|
1094
|
+
this.initialData ? this.data = structuredClone(Ee(this.initialData)) : console.warn(
|
|
1095
1095
|
"The " + this.data.name + `input control has no initial data,
|
|
1096
1096
|
the initial data will be available after calling the [markAsInitial] method on this instance`
|
|
1097
1097
|
);
|
|
1098
1098
|
}
|
|
1099
1099
|
markAsInitial() {
|
|
1100
|
-
this.initialData = structuredClone(
|
|
1100
|
+
this.initialData = structuredClone(Ee(this.data));
|
|
1101
1101
|
}
|
|
1102
1102
|
setValidators(e) {
|
|
1103
1103
|
this._validators = e;
|
|
@@ -1179,7 +1179,7 @@ class Kr {
|
|
|
1179
1179
|
return this.data.value;
|
|
1180
1180
|
}
|
|
1181
1181
|
}
|
|
1182
|
-
class
|
|
1182
|
+
class ds {
|
|
1183
1183
|
constructor(e) {
|
|
1184
1184
|
this._inputControl = e;
|
|
1185
1185
|
}
|
|
@@ -1214,19 +1214,19 @@ class Zr {
|
|
|
1214
1214
|
return this._inputControl;
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
|
1217
|
-
class
|
|
1217
|
+
class fs {
|
|
1218
1218
|
constructor() {
|
|
1219
|
-
this.mounted = (e,
|
|
1220
|
-
|
|
1219
|
+
this.mounted = (e, s) => {
|
|
1220
|
+
s.value && s.value.getIsBlurSensitive() && (e.addEventListener("click", this.handleFocus.bind(this, s.value)), e.addEventListener(
|
|
1221
1221
|
"blur",
|
|
1222
|
-
this.handleBlur.bind(this,
|
|
1222
|
+
this.handleBlur.bind(this, s.value),
|
|
1223
1223
|
!0
|
|
1224
1224
|
));
|
|
1225
|
-
}, this.beforeUnMount = (e,
|
|
1225
|
+
}, this.beforeUnMount = (e, s) => {
|
|
1226
1226
|
e.removeEventListener(
|
|
1227
1227
|
"blur",
|
|
1228
|
-
this.handleBlur.bind(this,
|
|
1229
|
-
), e.removeEventListener("click", this.handleFocus.bind(this,
|
|
1228
|
+
this.handleBlur.bind(this, s.value)
|
|
1229
|
+
), e.removeEventListener("click", this.handleFocus.bind(this, s.value));
|
|
1230
1230
|
};
|
|
1231
1231
|
}
|
|
1232
1232
|
handleBlur(e) {
|
|
@@ -1236,7 +1236,7 @@ class Xr {
|
|
|
1236
1236
|
e.value || e.getIsEmptySensitive() || e.setNotValidMessage("");
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
1239
|
-
class
|
|
1239
|
+
class ms {
|
|
1240
1240
|
constructor() {
|
|
1241
1241
|
this._inputControls = /* @__PURE__ */ new Map(), this._isValid = !1, this._id = Math.random();
|
|
1242
1242
|
}
|
|
@@ -1244,28 +1244,28 @@ class Qr {
|
|
|
1244
1244
|
return Array.from(this._inputControls.values());
|
|
1245
1245
|
}
|
|
1246
1246
|
async runValidation(e) {
|
|
1247
|
-
let
|
|
1248
|
-
for (const
|
|
1249
|
-
if (e && await
|
|
1247
|
+
let s = !0;
|
|
1248
|
+
for (const r of this.getInputControlsAsArray())
|
|
1249
|
+
if (e && await r.runValidation(!0), !r.getIsValid() && (s = !1, !e)) {
|
|
1250
1250
|
this._isValid = !1;
|
|
1251
1251
|
return;
|
|
1252
1252
|
}
|
|
1253
|
-
this._isValid =
|
|
1253
|
+
this._isValid = s;
|
|
1254
1254
|
}
|
|
1255
1255
|
addInputControls(e) {
|
|
1256
|
-
for (const
|
|
1257
|
-
this._inputControls.set(
|
|
1256
|
+
for (const s of e)
|
|
1257
|
+
this._inputControls.set(s.getName(), s);
|
|
1258
1258
|
}
|
|
1259
1259
|
getInputControl(e) {
|
|
1260
|
-
const
|
|
1261
|
-
if (!
|
|
1260
|
+
const s = this._inputControls.get(e);
|
|
1261
|
+
if (!s)
|
|
1262
1262
|
throw new Error(`The provided input name (${e}}) has no controls.`);
|
|
1263
|
-
return
|
|
1263
|
+
return s;
|
|
1264
1264
|
}
|
|
1265
1265
|
resetControls(e) {
|
|
1266
|
-
for (const
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1266
|
+
for (const s of e) {
|
|
1267
|
+
const r = this._inputControls.get(s);
|
|
1268
|
+
r ? r.reset() : console.warn(`Provided input name ${s} has no controllers in this form`);
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
1271
|
resetAll() {
|
|
@@ -1274,8 +1274,8 @@ class Qr {
|
|
|
1274
1274
|
}
|
|
1275
1275
|
createRequestBody() {
|
|
1276
1276
|
const e = {};
|
|
1277
|
-
for (const
|
|
1278
|
-
|
|
1277
|
+
for (const s of this.getInputControlsAsArray())
|
|
1278
|
+
s.getIsIncludeInRequestBody() && (e[s.getName()] = s.value);
|
|
1279
1279
|
return e;
|
|
1280
1280
|
}
|
|
1281
1281
|
setIsValid(e) {
|
|
@@ -1291,33 +1291,33 @@ class Qr {
|
|
|
1291
1291
|
return this._id;
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1295
|
-
const
|
|
1296
|
-
|
|
1294
|
+
function vs(t, e = !1) {
|
|
1295
|
+
const s = Be(t), r = M(
|
|
1296
|
+
me.Invalid
|
|
1297
1297
|
);
|
|
1298
|
-
return
|
|
1299
|
-
() =>
|
|
1298
|
+
return et(
|
|
1299
|
+
() => s.getInputControlsAsArray(),
|
|
1300
1300
|
() => {
|
|
1301
|
-
e || (
|
|
1301
|
+
e || (s.runValidation(), s.getIsValid() ? r.value = me.Valid : r.value = me.Invalid);
|
|
1302
1302
|
},
|
|
1303
1303
|
{
|
|
1304
1304
|
immediate: !0,
|
|
1305
1305
|
deep: !0
|
|
1306
1306
|
}
|
|
1307
1307
|
), {
|
|
1308
|
-
reactiveForm:
|
|
1309
|
-
validationStatus:
|
|
1308
|
+
reactiveForm: s,
|
|
1309
|
+
validationStatus: r
|
|
1310
1310
|
};
|
|
1311
1311
|
}
|
|
1312
|
-
class
|
|
1312
|
+
class Je {
|
|
1313
1313
|
constructor(e) {
|
|
1314
1314
|
this.timerId = null, this.setupInterval = this.setupInterval.bind(this), this.schedule = e;
|
|
1315
1315
|
}
|
|
1316
1316
|
setupInterval(e) {
|
|
1317
|
-
const
|
|
1318
|
-
this.timerId = setTimeout(async function
|
|
1319
|
-
await
|
|
1320
|
-
|
|
1317
|
+
const s = this;
|
|
1318
|
+
this.timerId = setTimeout(async function r() {
|
|
1319
|
+
await s.schedule.runAction(), s.timerId = setTimeout(() => {
|
|
1320
|
+
r();
|
|
1321
1321
|
}, e);
|
|
1322
1322
|
}, e);
|
|
1323
1323
|
}
|
|
@@ -1325,64 +1325,64 @@ class ut {
|
|
|
1325
1325
|
this.timerId && clearInterval(this.timerId);
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
|
-
const
|
|
1328
|
+
const We = "150px", Ze = 2, gs = {
|
|
1329
1329
|
path: "id",
|
|
1330
1330
|
key: "id",
|
|
1331
1331
|
title: "عملیات",
|
|
1332
|
-
colspan:
|
|
1333
|
-
width:
|
|
1334
|
-
cellType:
|
|
1335
|
-
align:
|
|
1336
|
-
headerType:
|
|
1332
|
+
colspan: Ze,
|
|
1333
|
+
width: We,
|
|
1334
|
+
cellType: Me.ACTION,
|
|
1335
|
+
align: Re.Center,
|
|
1336
|
+
headerType: _e.Text,
|
|
1337
1337
|
accessLevel: null
|
|
1338
|
-
},
|
|
1339
|
-
width:
|
|
1340
|
-
align:
|
|
1341
|
-
headerType:
|
|
1342
|
-
cellType:
|
|
1343
|
-
colspan:
|
|
1338
|
+
}, Nt = {
|
|
1339
|
+
width: We,
|
|
1340
|
+
align: Re.Center,
|
|
1341
|
+
headerType: _e.Text,
|
|
1342
|
+
cellType: Me.Text,
|
|
1343
|
+
colspan: Ze
|
|
1344
1344
|
};
|
|
1345
|
-
class
|
|
1346
|
-
constructor(e,
|
|
1347
|
-
this.key = e, this.order =
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
class
|
|
1351
|
-
aSort(e,
|
|
1352
|
-
return e.sort((
|
|
1353
|
-
const i = s
|
|
1354
|
-
if (typeof i == "string" && typeof
|
|
1355
|
-
return i.localeCompare(
|
|
1356
|
-
if (typeof i == "number" && typeof
|
|
1357
|
-
return i -
|
|
1345
|
+
class xe {
|
|
1346
|
+
constructor(e, s) {
|
|
1347
|
+
this.key = e, this.order = s;
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
class Fe {
|
|
1351
|
+
aSort(e, s) {
|
|
1352
|
+
return e.sort((r, a) => {
|
|
1353
|
+
const i = r[s] ?? r, n = a[s] ?? a;
|
|
1354
|
+
if (typeof i == "string" && typeof n == "string")
|
|
1355
|
+
return i.localeCompare(n);
|
|
1356
|
+
if (typeof i == "number" && typeof n == "number")
|
|
1357
|
+
return i - n;
|
|
1358
1358
|
throw new Error("Not supported data type");
|
|
1359
1359
|
});
|
|
1360
1360
|
}
|
|
1361
|
-
bSort(e,
|
|
1362
|
-
return e.sort((
|
|
1363
|
-
const i = s
|
|
1364
|
-
if (typeof i == "string" && typeof
|
|
1365
|
-
return
|
|
1366
|
-
if (typeof i == "number" && typeof
|
|
1367
|
-
return
|
|
1361
|
+
bSort(e, s) {
|
|
1362
|
+
return e.sort((r, a) => {
|
|
1363
|
+
const i = r[s] ?? r, n = a[s] ?? a;
|
|
1364
|
+
if (typeof i == "string" && typeof n == "string")
|
|
1365
|
+
return n.localeCompare(i);
|
|
1366
|
+
if (typeof i == "number" && typeof n == "number")
|
|
1367
|
+
return n - i;
|
|
1368
1368
|
throw new Error("Not supported data type");
|
|
1369
1369
|
});
|
|
1370
1370
|
}
|
|
1371
1371
|
}
|
|
1372
|
-
class
|
|
1373
|
-
arrayOfObjectSort(e,
|
|
1374
|
-
return
|
|
1372
|
+
class ps {
|
|
1373
|
+
arrayOfObjectSort(e, s, r, a = new Fe()) {
|
|
1374
|
+
return r === O.ASC ? a.aSort(e, s) : a.bSort(e, s);
|
|
1375
1375
|
}
|
|
1376
|
-
arraySort(e,
|
|
1377
|
-
return
|
|
1376
|
+
arraySort(e, s, r = new Fe()) {
|
|
1377
|
+
return s === O.ASC ? r.aSort(e) : r.bSort(e);
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
|
-
class
|
|
1380
|
+
class Bt {
|
|
1381
1381
|
constructor(e) {
|
|
1382
|
-
this.currentPage = 1, this.currentPageSize = 20, this.currentSortDetail = new
|
|
1382
|
+
this.currentPage = 1, this.currentPageSize = 20, this.currentSortDetail = new xe(
|
|
1383
1383
|
"id",
|
|
1384
|
-
|
|
1385
|
-
), this.loadedRows = [], this.headerSchema = [], this.service = e, this.accessService =
|
|
1384
|
+
O.DESC
|
|
1385
|
+
), this.loadedRows = [], this.headerSchema = [], this.service = e, this.accessService = se.GetInstance();
|
|
1386
1386
|
}
|
|
1387
1387
|
addHeader(e) {
|
|
1388
1388
|
this.headerSchema.push(e);
|
|
@@ -1393,7 +1393,7 @@ class ar {
|
|
|
1393
1393
|
), await this.loadRows();
|
|
1394
1394
|
}
|
|
1395
1395
|
filterItemsBaseOnAccessLevel(e) {
|
|
1396
|
-
return e.filter((
|
|
1396
|
+
return e.filter((s) => s.hasAccess ? s.hasAccess() : !0);
|
|
1397
1397
|
}
|
|
1398
1398
|
async sort(e) {
|
|
1399
1399
|
this.shouldSendSortRequest(e) && (this.currentSortDetail = e, this.loadedRows = (await this.handleSort(this.currentSortDetail)).items);
|
|
@@ -1401,11 +1401,11 @@ class ar {
|
|
|
1401
1401
|
shouldSendSortRequest(e) {
|
|
1402
1402
|
return e.key !== this.currentSortDetail.key || e.order !== this.currentSortDetail.order;
|
|
1403
1403
|
}
|
|
1404
|
-
async paginate(e,
|
|
1405
|
-
this.shouldSendPaginationRequest(e,
|
|
1404
|
+
async paginate(e, s) {
|
|
1405
|
+
this.shouldSendPaginationRequest(e, s) && (this.currentPage = e, this.currentPageSize = s, this.loadedRows = (await this.handlePagination(this.currentPage, this.currentPageSize)).items);
|
|
1406
1406
|
}
|
|
1407
|
-
shouldSendPaginationRequest(e,
|
|
1408
|
-
return this.currentPage !== e || this.currentPageSize !==
|
|
1407
|
+
shouldSendPaginationRequest(e, s) {
|
|
1408
|
+
return this.currentPage !== e || this.currentPageSize !== s;
|
|
1409
1409
|
}
|
|
1410
1410
|
async loadRows() {
|
|
1411
1411
|
return this.loadedRows = (await this.service.fetchRows()).items, this.loadedRows;
|
|
@@ -1416,15 +1416,15 @@ class ar {
|
|
|
1416
1416
|
async handleSort(e) {
|
|
1417
1417
|
return await this.service.sort(e);
|
|
1418
1418
|
}
|
|
1419
|
-
async handlePagination(e,
|
|
1420
|
-
return await this.service.paginate(e,
|
|
1419
|
+
async handlePagination(e, s) {
|
|
1420
|
+
return await this.service.paginate(e, s);
|
|
1421
1421
|
}
|
|
1422
1422
|
getItemCountPerPage() {
|
|
1423
|
-
return
|
|
1423
|
+
return qe.DEFAULT_ITEM_COUNT_PER_PAGE;
|
|
1424
1424
|
}
|
|
1425
1425
|
isLoading() {
|
|
1426
1426
|
const e = this.getLoadingStatuses();
|
|
1427
|
-
return e.has(
|
|
1427
|
+
return e.has(v.Search) || e.has(v.FetchList) || e.has(v.Sort) || e.has(v.FetchLastItems) || e.has(v.FetchPreviousItems);
|
|
1428
1428
|
}
|
|
1429
1429
|
getLoadingStatuses() {
|
|
1430
1430
|
return this.getData().loadingStatus;
|
|
@@ -1472,7 +1472,7 @@ class D {
|
|
|
1472
1472
|
this.observers.push(e), this.notifyObject(e);
|
|
1473
1473
|
}
|
|
1474
1474
|
detach(e) {
|
|
1475
|
-
this.observers = this.observers.filter((
|
|
1475
|
+
this.observers = this.observers.filter((s) => s !== e);
|
|
1476
1476
|
}
|
|
1477
1477
|
notify() {
|
|
1478
1478
|
for (const e of this.observers)
|
|
@@ -1488,7 +1488,7 @@ class D {
|
|
|
1488
1488
|
return this._value;
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
|
-
class
|
|
1491
|
+
class ys extends Bt {
|
|
1492
1492
|
constructor(e) {
|
|
1493
1493
|
super(e), this.selectedRows = new D(/* @__PURE__ */ new Map()), this.rowSelect = this.rowSelect.bind(this), this.selectAll = this.selectAll.bind(this), this.isEveryRowSelected = this.isEveryRowSelected.bind(this), this.handlePagination = this.handlePagination.bind(this), this.clearAllSelectedItems = this.clearAllSelectedItems.bind(this), this.getSelectedRows = this.getSelectedRows.bind(this), this.getSelectedRowsAsArray = this.getSelectedRowsAsArray.bind(this), this.getSelectedRowIds = this.getSelectedRowIds.bind(this);
|
|
1494
1494
|
}
|
|
@@ -1505,8 +1505,8 @@ class ss extends ar {
|
|
|
1505
1505
|
isEveryRowSelected() {
|
|
1506
1506
|
return this.getSelectedRowsValue().size === this.currentPageSize || this.loadedRows.length === this.getSelectedRowsValue().size;
|
|
1507
1507
|
}
|
|
1508
|
-
async handlePagination(e,
|
|
1509
|
-
return this.clearAllSelectedItems(), await super.handlePagination(e,
|
|
1508
|
+
async handlePagination(e, s) {
|
|
1509
|
+
return this.clearAllSelectedItems(), await super.handlePagination(e, s);
|
|
1510
1510
|
}
|
|
1511
1511
|
async handleSort(e) {
|
|
1512
1512
|
return this.clearAllSelectedItems(), await super.handleSort(e);
|
|
@@ -1527,60 +1527,60 @@ class ss extends ar {
|
|
|
1527
1527
|
return this.selectedRows.getValue();
|
|
1528
1528
|
}
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1530
|
+
function Ss(t) {
|
|
1531
1531
|
return {
|
|
1532
|
-
...
|
|
1532
|
+
...Nt,
|
|
1533
1533
|
...t
|
|
1534
1534
|
};
|
|
1535
1535
|
}
|
|
1536
|
-
function
|
|
1537
|
-
return function(
|
|
1538
|
-
|
|
1536
|
+
function Is(t) {
|
|
1537
|
+
return function(s, r) {
|
|
1538
|
+
s.constructor.prototype.headers || (s.constructor.prototype.headers = []), s.constructor.prototype.headers.push({ path: r, ...t });
|
|
1539
1539
|
};
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1542
|
-
return function(
|
|
1543
|
-
async function
|
|
1544
|
-
return
|
|
1545
|
-
}
|
|
1546
|
-
function
|
|
1547
|
-
const
|
|
1548
|
-
for (const f of
|
|
1549
|
-
if (!f.isAvailable(
|
|
1550
|
-
const
|
|
1551
|
-
handler: f.handler.bind(
|
|
1541
|
+
function ws(t) {
|
|
1542
|
+
return function(s) {
|
|
1543
|
+
async function r() {
|
|
1544
|
+
return s.prototype._table = this, s.prototype.headers;
|
|
1545
|
+
}
|
|
1546
|
+
function a(h) {
|
|
1547
|
+
const c = [], g = s.prototype.actions || [];
|
|
1548
|
+
for (const f of g) {
|
|
1549
|
+
if (!f.isAvailable(h)) continue;
|
|
1550
|
+
const u = {
|
|
1551
|
+
handler: f.handler.bind(h),
|
|
1552
1552
|
accessLevel: f.accessLevel,
|
|
1553
1553
|
actionName: f.actionName
|
|
1554
1554
|
};
|
|
1555
|
-
|
|
1555
|
+
c.push(u);
|
|
1556
1556
|
}
|
|
1557
|
-
return
|
|
1557
|
+
return c;
|
|
1558
1558
|
}
|
|
1559
|
-
async function i(
|
|
1560
|
-
|
|
1559
|
+
async function i(h) {
|
|
1560
|
+
s.prototype.rowClick && await s.prototype.rowClick.call(h);
|
|
1561
1561
|
}
|
|
1562
|
-
async function
|
|
1563
|
-
|
|
1562
|
+
async function n() {
|
|
1563
|
+
s.prototype.tableDestroy && await s.prototype.tableDestroy();
|
|
1564
1564
|
}
|
|
1565
|
-
t.prototype.loadHeader =
|
|
1565
|
+
t.prototype.loadHeader = r, t.prototype.getActions = a, t.prototype.handleClick = i, t.prototype.onDestroy = n;
|
|
1566
1566
|
};
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1569
|
-
return function(
|
|
1570
|
-
|
|
1568
|
+
function bs(t) {
|
|
1569
|
+
return function(s, r, a) {
|
|
1570
|
+
s.constructor.prototype.actions || (s.constructor.prototype.actions = []), t.handler = a.value, s.constructor.prototype.actions.push(t);
|
|
1571
1571
|
};
|
|
1572
1572
|
}
|
|
1573
|
-
function
|
|
1574
|
-
return function(e,
|
|
1575
|
-
e.constructor.prototype.tableDestroy =
|
|
1573
|
+
function As() {
|
|
1574
|
+
return function(e, s, r) {
|
|
1575
|
+
e.constructor.prototype.tableDestroy = r.value;
|
|
1576
1576
|
};
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1579
|
-
return function(e,
|
|
1580
|
-
e.constructor.prototype.rowClick =
|
|
1578
|
+
function Ds() {
|
|
1579
|
+
return function(e, s, r) {
|
|
1580
|
+
e.constructor.prototype.rowClick = r.value;
|
|
1581
1581
|
};
|
|
1582
1582
|
}
|
|
1583
|
-
class
|
|
1583
|
+
class Rs {
|
|
1584
1584
|
constructor() {
|
|
1585
1585
|
this.observers = [];
|
|
1586
1586
|
}
|
|
@@ -1589,7 +1589,7 @@ class cs {
|
|
|
1589
1589
|
}
|
|
1590
1590
|
detach(e) {
|
|
1591
1591
|
this.observers = this.observers.filter(
|
|
1592
|
-
(
|
|
1592
|
+
(s) => s !== e
|
|
1593
1593
|
);
|
|
1594
1594
|
}
|
|
1595
1595
|
notify() {
|
|
@@ -1597,9 +1597,9 @@ class cs {
|
|
|
1597
1597
|
e.update(this);
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
|
-
class
|
|
1600
|
+
class Ut {
|
|
1601
1601
|
constructor(e) {
|
|
1602
|
-
this.rows = new D([]), this.headerSchema = new D([]), this.currentPage = new D(1), this.currentPageSize = new D(20), this.totalItems = new D(0), this.currentSortDetail = new D(new
|
|
1602
|
+
this.rows = new D([]), this.headerSchema = new D([]), this.currentPage = new D(1), this.currentPageSize = new D(20), this.totalItems = new D(0), this.currentSortDetail = new D(new xe("id", O.DESC)), this.scrollDetail = new D(null), this.isExpandable = new D(!1), this.tableSource = e, this.accessService = se.GetInstance();
|
|
1603
1603
|
}
|
|
1604
1604
|
async load() {
|
|
1605
1605
|
this.rows.next(await this.tableSource.loadRows()), this.headerSchema.next(
|
|
@@ -1608,11 +1608,11 @@ class or {
|
|
|
1608
1608
|
)
|
|
1609
1609
|
);
|
|
1610
1610
|
}
|
|
1611
|
-
async paginate(e,
|
|
1612
|
-
this.shouldSendPaginationRequest(e,
|
|
1611
|
+
async paginate(e, s) {
|
|
1612
|
+
this.shouldSendPaginationRequest(e, s) && (this.currentPage.next(e), this.currentPageSize.next(s), this.rows.next(await this.tableSource.paginate(e, s)));
|
|
1613
1613
|
}
|
|
1614
|
-
shouldSendPaginationRequest(e,
|
|
1615
|
-
return this.currentPage.getValue() !== e || this.currentPageSize.getValue() !==
|
|
1614
|
+
shouldSendPaginationRequest(e, s) {
|
|
1615
|
+
return this.currentPage.getValue() !== e || this.currentPageSize.getValue() !== s;
|
|
1616
1616
|
}
|
|
1617
1617
|
async sort(e) {
|
|
1618
1618
|
this.shouldSendSortRequest(e) && (this.currentSortDetail.next(e), this.rows.next(await this.tableSource.sort(e)));
|
|
@@ -1646,21 +1646,21 @@ class or {
|
|
|
1646
1646
|
};
|
|
1647
1647
|
}
|
|
1648
1648
|
filterItemsBaseOnAccessLevel(e) {
|
|
1649
|
-
return e.filter((
|
|
1649
|
+
return e.filter((s) => s.hasAccess ? s.hasAccess() : !0);
|
|
1650
1650
|
}
|
|
1651
1651
|
async onDestroy() {
|
|
1652
1652
|
this.tableSource.onTableDestroy();
|
|
1653
1653
|
}
|
|
1654
1654
|
}
|
|
1655
|
-
class
|
|
1655
|
+
class _s extends Ut {
|
|
1656
1656
|
constructor(e) {
|
|
1657
1657
|
super(e), this.selectedRows = new D(
|
|
1658
1658
|
/* @__PURE__ */ new Map()
|
|
1659
1659
|
), this.selectRow = this.selectRow.bind(this), this.selectAll = this.selectAll.bind(this), this.isEveryRowSelected = this.isEveryRowSelected.bind(this), this.clearAllSelectedItems = this.clearAllSelectedItems.bind(this), this.getSelectedRowsAsArray = this.getSelectedRowsAsArray.bind(this), this.getSelectedRowIds = this.getSelectedRowIds.bind(this);
|
|
1660
1660
|
}
|
|
1661
1661
|
selectRow(e) {
|
|
1662
|
-
const
|
|
1663
|
-
|
|
1662
|
+
const s = this.getSelectedRows();
|
|
1663
|
+
s.has(e.id) ? (s.delete(e.id), this.selectedRows.next(this.selectedRows.getValue())) : (s.set(e.id, e), this.selectedRows.next(this.selectedRows.getValue()));
|
|
1664
1664
|
}
|
|
1665
1665
|
selectAll() {
|
|
1666
1666
|
if (this.isEveryRowSelected())
|
|
@@ -1685,570 +1685,18 @@ class hs extends or {
|
|
|
1685
1685
|
return Array.from(this.selectedRows.getValue().keys());
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
|
-
|
|
1689
|
-
(function(t) {
|
|
1690
|
-
t[t.Transient = 0] = "Transient", t[t.Singleton = 1] = "Singleton", t[t.ResolutionScoped = 2] = "ResolutionScoped", t[t.ContainerScoped = 3] = "ContainerScoped";
|
|
1691
|
-
})(Le || (Le = {}));
|
|
1692
|
-
const A = Le;
|
|
1693
|
-
/*! *****************************************************************************
|
|
1694
|
-
Copyright (c) Microsoft Corporation.
|
|
1695
|
-
|
|
1696
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1697
|
-
purpose with or without fee is hereby granted.
|
|
1698
|
-
|
|
1699
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1700
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1701
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1702
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1703
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1704
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1705
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1706
|
-
***************************************************************************** */
|
|
1707
|
-
var Te = function(t, e) {
|
|
1708
|
-
return Te = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, s) {
|
|
1709
|
-
r.__proto__ = s;
|
|
1710
|
-
} || function(r, s) {
|
|
1711
|
-
for (var n in s) s.hasOwnProperty(n) && (r[n] = s[n]);
|
|
1712
|
-
}, Te(t, e);
|
|
1713
|
-
};
|
|
1714
|
-
function Be(t, e) {
|
|
1715
|
-
Te(t, e);
|
|
1716
|
-
function r() {
|
|
1717
|
-
this.constructor = t;
|
|
1718
|
-
}
|
|
1719
|
-
t.prototype = e === null ? Object.create(e) : (r.prototype = e.prototype, new r());
|
|
1720
|
-
}
|
|
1721
|
-
function lr(t, e, r, s) {
|
|
1722
|
-
function n(i) {
|
|
1723
|
-
return i instanceof r ? i : new r(function(a) {
|
|
1724
|
-
a(i);
|
|
1725
|
-
});
|
|
1726
|
-
}
|
|
1727
|
-
return new (r || (r = Promise))(function(i, a) {
|
|
1728
|
-
function l(f) {
|
|
1729
|
-
try {
|
|
1730
|
-
u(s.next(f));
|
|
1731
|
-
} catch (d) {
|
|
1732
|
-
a(d);
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
function o(f) {
|
|
1736
|
-
try {
|
|
1737
|
-
u(s.throw(f));
|
|
1738
|
-
} catch (d) {
|
|
1739
|
-
a(d);
|
|
1740
|
-
}
|
|
1741
|
-
}
|
|
1742
|
-
function u(f) {
|
|
1743
|
-
f.done ? i(f.value) : n(f.value).then(l, o);
|
|
1744
|
-
}
|
|
1745
|
-
u((s = s.apply(t, [])).next());
|
|
1746
|
-
});
|
|
1747
|
-
}
|
|
1748
|
-
function ur(t, e) {
|
|
1749
|
-
var r = { label: 0, sent: function() {
|
|
1750
|
-
if (i[0] & 1) throw i[1];
|
|
1751
|
-
return i[1];
|
|
1752
|
-
}, trys: [], ops: [] }, s, n, i, a;
|
|
1753
|
-
return a = { next: l(0), throw: l(1), return: l(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
|
|
1754
|
-
return this;
|
|
1755
|
-
}), a;
|
|
1756
|
-
function l(u) {
|
|
1757
|
-
return function(f) {
|
|
1758
|
-
return o([u, f]);
|
|
1759
|
-
};
|
|
1760
|
-
}
|
|
1761
|
-
function o(u) {
|
|
1762
|
-
if (s) throw new TypeError("Generator is already executing.");
|
|
1763
|
-
for (; r; ) try {
|
|
1764
|
-
if (s = 1, n && (i = u[0] & 2 ? n.return : u[0] ? n.throw || ((i = n.return) && i.call(n), 0) : n.next) && !(i = i.call(n, u[1])).done) return i;
|
|
1765
|
-
switch (n = 0, i && (u = [u[0] & 2, i.value]), u[0]) {
|
|
1766
|
-
case 0:
|
|
1767
|
-
case 1:
|
|
1768
|
-
i = u;
|
|
1769
|
-
break;
|
|
1770
|
-
case 4:
|
|
1771
|
-
return r.label++, { value: u[1], done: !1 };
|
|
1772
|
-
case 5:
|
|
1773
|
-
r.label++, n = u[1], u = [0];
|
|
1774
|
-
continue;
|
|
1775
|
-
case 7:
|
|
1776
|
-
u = r.ops.pop(), r.trys.pop();
|
|
1777
|
-
continue;
|
|
1778
|
-
default:
|
|
1779
|
-
if (i = r.trys, !(i = i.length > 0 && i[i.length - 1]) && (u[0] === 6 || u[0] === 2)) {
|
|
1780
|
-
r = 0;
|
|
1781
|
-
continue;
|
|
1782
|
-
}
|
|
1783
|
-
if (u[0] === 3 && (!i || u[1] > i[0] && u[1] < i[3])) {
|
|
1784
|
-
r.label = u[1];
|
|
1785
|
-
break;
|
|
1786
|
-
}
|
|
1787
|
-
if (u[0] === 6 && r.label < i[1]) {
|
|
1788
|
-
r.label = i[1], i = u;
|
|
1789
|
-
break;
|
|
1790
|
-
}
|
|
1791
|
-
if (i && r.label < i[2]) {
|
|
1792
|
-
r.label = i[2], r.ops.push(u);
|
|
1793
|
-
break;
|
|
1794
|
-
}
|
|
1795
|
-
i[2] && r.ops.pop(), r.trys.pop();
|
|
1796
|
-
continue;
|
|
1797
|
-
}
|
|
1798
|
-
u = e.call(t, r);
|
|
1799
|
-
} catch (f) {
|
|
1800
|
-
u = [6, f], n = 0;
|
|
1801
|
-
} finally {
|
|
1802
|
-
s = i = 0;
|
|
1803
|
-
}
|
|
1804
|
-
if (u[0] & 5) throw u[1];
|
|
1805
|
-
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
1806
|
-
}
|
|
1807
|
-
}
|
|
1808
|
-
function de(t) {
|
|
1809
|
-
var e = typeof Symbol == "function" && Symbol.iterator, r = e && t[e], s = 0;
|
|
1810
|
-
if (r) return r.call(t);
|
|
1811
|
-
if (t && typeof t.length == "number") return {
|
|
1812
|
-
next: function() {
|
|
1813
|
-
return t && s >= t.length && (t = void 0), { value: t && t[s++], done: !t };
|
|
1814
|
-
}
|
|
1815
|
-
};
|
|
1816
|
-
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1817
|
-
}
|
|
1818
|
-
function be(t, e) {
|
|
1819
|
-
var r = typeof Symbol == "function" && t[Symbol.iterator];
|
|
1820
|
-
if (!r) return t;
|
|
1821
|
-
var s = r.call(t), n, i = [], a;
|
|
1822
|
-
try {
|
|
1823
|
-
for (; (e === void 0 || e-- > 0) && !(n = s.next()).done; ) i.push(n.value);
|
|
1824
|
-
} catch (l) {
|
|
1825
|
-
a = { error: l };
|
|
1826
|
-
} finally {
|
|
1827
|
-
try {
|
|
1828
|
-
n && !n.done && (r = s.return) && r.call(s);
|
|
1829
|
-
} finally {
|
|
1830
|
-
if (a) throw a.error;
|
|
1831
|
-
}
|
|
1832
|
-
}
|
|
1833
|
-
return i;
|
|
1834
|
-
}
|
|
1835
|
-
function N() {
|
|
1836
|
-
for (var t = [], e = 0; e < arguments.length; e++)
|
|
1837
|
-
t = t.concat(be(arguments[e]));
|
|
1838
|
-
return t;
|
|
1839
|
-
}
|
|
1840
|
-
var cr = "injectionTokens";
|
|
1841
|
-
function hr(t) {
|
|
1842
|
-
var e = Reflect.getMetadata("design:paramtypes", t) || [], r = Reflect.getOwnMetadata(cr, t) || {};
|
|
1843
|
-
return Object.keys(r).forEach(function(s) {
|
|
1844
|
-
e[+s] = r[s];
|
|
1845
|
-
}), e;
|
|
1846
|
-
}
|
|
1847
|
-
function dt(t) {
|
|
1848
|
-
return !!t.useClass;
|
|
1849
|
-
}
|
|
1850
|
-
function Pe(t) {
|
|
1851
|
-
return !!t.useFactory;
|
|
1852
|
-
}
|
|
1853
|
-
var ft = function() {
|
|
1854
|
-
function t(e) {
|
|
1855
|
-
this.wrap = e, this.reflectMethods = [
|
|
1856
|
-
"get",
|
|
1857
|
-
"getPrototypeOf",
|
|
1858
|
-
"setPrototypeOf",
|
|
1859
|
-
"getOwnPropertyDescriptor",
|
|
1860
|
-
"defineProperty",
|
|
1861
|
-
"has",
|
|
1862
|
-
"set",
|
|
1863
|
-
"deleteProperty",
|
|
1864
|
-
"apply",
|
|
1865
|
-
"construct",
|
|
1866
|
-
"ownKeys"
|
|
1867
|
-
];
|
|
1868
|
-
}
|
|
1869
|
-
return t.prototype.createProxy = function(e) {
|
|
1870
|
-
var r = this, s = {}, n = !1, i, a = function() {
|
|
1871
|
-
return n || (i = e(r.wrap()), n = !0), i;
|
|
1872
|
-
};
|
|
1873
|
-
return new Proxy(s, this.createHandler(a));
|
|
1874
|
-
}, t.prototype.createHandler = function(e) {
|
|
1875
|
-
var r = {}, s = function(n) {
|
|
1876
|
-
r[n] = function() {
|
|
1877
|
-
for (var i = [], a = 0; a < arguments.length; a++)
|
|
1878
|
-
i[a] = arguments[a];
|
|
1879
|
-
i[0] = e();
|
|
1880
|
-
var l = Reflect[n];
|
|
1881
|
-
return l.apply(void 0, N(i));
|
|
1882
|
-
};
|
|
1883
|
-
};
|
|
1884
|
-
return this.reflectMethods.forEach(s), r;
|
|
1885
|
-
}, t;
|
|
1886
|
-
}();
|
|
1887
|
-
function X(t) {
|
|
1888
|
-
return typeof t == "string" || typeof t == "symbol";
|
|
1889
|
-
}
|
|
1890
|
-
function dr(t) {
|
|
1891
|
-
return typeof t == "object" && "token" in t && "multiple" in t;
|
|
1892
|
-
}
|
|
1893
|
-
function Xe(t) {
|
|
1894
|
-
return typeof t == "object" && "token" in t && "transform" in t;
|
|
1895
|
-
}
|
|
1896
|
-
function fr(t) {
|
|
1897
|
-
return typeof t == "function" || t instanceof ft;
|
|
1898
|
-
}
|
|
1899
|
-
function we(t) {
|
|
1900
|
-
return !!t.useToken;
|
|
1901
|
-
}
|
|
1902
|
-
function Ie(t) {
|
|
1903
|
-
return t.useValue != null;
|
|
1904
|
-
}
|
|
1905
|
-
function pr(t) {
|
|
1906
|
-
return dt(t) || Ie(t) || we(t) || Pe(t);
|
|
1907
|
-
}
|
|
1908
|
-
var Ue = function() {
|
|
1909
|
-
function t() {
|
|
1910
|
-
this._registryMap = /* @__PURE__ */ new Map();
|
|
1911
|
-
}
|
|
1912
|
-
return t.prototype.entries = function() {
|
|
1913
|
-
return this._registryMap.entries();
|
|
1914
|
-
}, t.prototype.getAll = function(e) {
|
|
1915
|
-
return this.ensure(e), this._registryMap.get(e);
|
|
1916
|
-
}, t.prototype.get = function(e) {
|
|
1917
|
-
this.ensure(e);
|
|
1918
|
-
var r = this._registryMap.get(e);
|
|
1919
|
-
return r[r.length - 1] || null;
|
|
1920
|
-
}, t.prototype.set = function(e, r) {
|
|
1921
|
-
this.ensure(e), this._registryMap.get(e).push(r);
|
|
1922
|
-
}, t.prototype.setAll = function(e, r) {
|
|
1923
|
-
this._registryMap.set(e, r);
|
|
1924
|
-
}, t.prototype.has = function(e) {
|
|
1925
|
-
return this.ensure(e), this._registryMap.get(e).length > 0;
|
|
1926
|
-
}, t.prototype.clear = function() {
|
|
1927
|
-
this._registryMap.clear();
|
|
1928
|
-
}, t.prototype.ensure = function(e) {
|
|
1929
|
-
this._registryMap.has(e) || this._registryMap.set(e, []);
|
|
1930
|
-
}, t;
|
|
1931
|
-
}(), vr = function(t) {
|
|
1932
|
-
Be(e, t);
|
|
1933
|
-
function e() {
|
|
1934
|
-
return t !== null && t.apply(this, arguments) || this;
|
|
1935
|
-
}
|
|
1936
|
-
return e;
|
|
1937
|
-
}(Ue), fe = /* @__PURE__ */ function() {
|
|
1938
|
-
function t() {
|
|
1939
|
-
this.scopedResolutions = /* @__PURE__ */ new Map();
|
|
1940
|
-
}
|
|
1941
|
-
return t;
|
|
1942
|
-
}();
|
|
1943
|
-
function gr(t, e) {
|
|
1944
|
-
if (t === null)
|
|
1945
|
-
return "at position #" + e;
|
|
1946
|
-
var r = t.split(",")[e].trim();
|
|
1947
|
-
return '"' + r + '" at position #' + e;
|
|
1948
|
-
}
|
|
1949
|
-
function mr(t, e, r) {
|
|
1950
|
-
return r === void 0 && (r = " "), N([t], e.message.split(`
|
|
1951
|
-
`).map(function(s) {
|
|
1952
|
-
return r + s;
|
|
1953
|
-
})).join(`
|
|
1954
|
-
`);
|
|
1955
|
-
}
|
|
1956
|
-
function yr(t, e, r) {
|
|
1957
|
-
var s = be(t.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), n = s[1], i = n === void 0 ? null : n, a = gr(i, e);
|
|
1958
|
-
return mr("Cannot inject the dependency " + a + ' of "' + t.name + '" constructor. Reason:', r);
|
|
1959
|
-
}
|
|
1960
|
-
function Sr(t) {
|
|
1961
|
-
if (typeof t.dispose != "function")
|
|
1962
|
-
return !1;
|
|
1963
|
-
var e = t.dispose;
|
|
1964
|
-
return !(e.length > 0);
|
|
1965
|
-
}
|
|
1966
|
-
var wr = function(t) {
|
|
1967
|
-
Be(e, t);
|
|
1968
|
-
function e() {
|
|
1969
|
-
return t !== null && t.apply(this, arguments) || this;
|
|
1970
|
-
}
|
|
1971
|
-
return e;
|
|
1972
|
-
}(Ue), Ir = function(t) {
|
|
1973
|
-
Be(e, t);
|
|
1974
|
-
function e() {
|
|
1975
|
-
return t !== null && t.apply(this, arguments) || this;
|
|
1976
|
-
}
|
|
1977
|
-
return e;
|
|
1978
|
-
}(Ue), br = /* @__PURE__ */ function() {
|
|
1979
|
-
function t() {
|
|
1980
|
-
this.preResolution = new wr(), this.postResolution = new Ir();
|
|
1981
|
-
}
|
|
1982
|
-
return t;
|
|
1983
|
-
}(), pt = /* @__PURE__ */ new Map(), Rr = function() {
|
|
1984
|
-
function t(e) {
|
|
1985
|
-
this.parent = e, this._registry = new vr(), this.interceptors = new br(), this.disposed = !1, this.disposables = /* @__PURE__ */ new Set();
|
|
1986
|
-
}
|
|
1987
|
-
return t.prototype.register = function(e, r, s) {
|
|
1988
|
-
s === void 0 && (s = { lifecycle: A.Transient }), this.ensureNotDisposed();
|
|
1989
|
-
var n;
|
|
1990
|
-
if (pr(r) ? n = r : n = { useClass: r }, we(n))
|
|
1991
|
-
for (var i = [e], a = n; a != null; ) {
|
|
1992
|
-
var l = a.useToken;
|
|
1993
|
-
if (i.includes(l))
|
|
1994
|
-
throw new Error("Token registration cycle detected! " + N(i, [l]).join(" -> "));
|
|
1995
|
-
i.push(l);
|
|
1996
|
-
var o = this._registry.get(l);
|
|
1997
|
-
o && we(o.provider) ? a = o.provider : a = null;
|
|
1998
|
-
}
|
|
1999
|
-
if ((s.lifecycle === A.Singleton || s.lifecycle == A.ContainerScoped || s.lifecycle == A.ResolutionScoped) && (Ie(n) || Pe(n)))
|
|
2000
|
-
throw new Error('Cannot use lifecycle "' + A[s.lifecycle] + '" with ValueProviders or FactoryProviders');
|
|
2001
|
-
return this._registry.set(e, { provider: n, options: s }), this;
|
|
2002
|
-
}, t.prototype.registerType = function(e, r) {
|
|
2003
|
-
return this.ensureNotDisposed(), X(r) ? this.register(e, {
|
|
2004
|
-
useToken: r
|
|
2005
|
-
}) : this.register(e, {
|
|
2006
|
-
useClass: r
|
|
2007
|
-
});
|
|
2008
|
-
}, t.prototype.registerInstance = function(e, r) {
|
|
2009
|
-
return this.ensureNotDisposed(), this.register(e, {
|
|
2010
|
-
useValue: r
|
|
2011
|
-
});
|
|
2012
|
-
}, t.prototype.registerSingleton = function(e, r) {
|
|
2013
|
-
if (this.ensureNotDisposed(), X(e)) {
|
|
2014
|
-
if (X(r))
|
|
2015
|
-
return this.register(e, {
|
|
2016
|
-
useToken: r
|
|
2017
|
-
}, { lifecycle: A.Singleton });
|
|
2018
|
-
if (r)
|
|
2019
|
-
return this.register(e, {
|
|
2020
|
-
useClass: r
|
|
2021
|
-
}, { lifecycle: A.Singleton });
|
|
2022
|
-
throw new Error('Cannot register a type name as a singleton without a "to" token');
|
|
2023
|
-
}
|
|
2024
|
-
var s = e;
|
|
2025
|
-
return r && !X(r) && (s = r), this.register(e, {
|
|
2026
|
-
useClass: s
|
|
2027
|
-
}, { lifecycle: A.Singleton });
|
|
2028
|
-
}, t.prototype.resolve = function(e, r, s) {
|
|
2029
|
-
r === void 0 && (r = new fe()), s === void 0 && (s = !1), this.ensureNotDisposed();
|
|
2030
|
-
var n = this.getRegistration(e);
|
|
2031
|
-
if (!n && X(e)) {
|
|
2032
|
-
if (s)
|
|
2033
|
-
return;
|
|
2034
|
-
throw new Error('Attempted to resolve unregistered dependency token: "' + e.toString() + '"');
|
|
2035
|
-
}
|
|
2036
|
-
if (this.executePreResolutionInterceptor(e, "Single"), n) {
|
|
2037
|
-
var i = this.resolveRegistration(n, r);
|
|
2038
|
-
return this.executePostResolutionInterceptor(e, i, "Single"), i;
|
|
2039
|
-
}
|
|
2040
|
-
if (fr(e)) {
|
|
2041
|
-
var i = this.construct(e, r);
|
|
2042
|
-
return this.executePostResolutionInterceptor(e, i, "Single"), i;
|
|
2043
|
-
}
|
|
2044
|
-
throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.");
|
|
2045
|
-
}, t.prototype.executePreResolutionInterceptor = function(e, r) {
|
|
2046
|
-
var s, n;
|
|
2047
|
-
if (this.interceptors.preResolution.has(e)) {
|
|
2048
|
-
var i = [];
|
|
2049
|
-
try {
|
|
2050
|
-
for (var a = de(this.interceptors.preResolution.getAll(e)), l = a.next(); !l.done; l = a.next()) {
|
|
2051
|
-
var o = l.value;
|
|
2052
|
-
o.options.frequency != "Once" && i.push(o), o.callback(e, r);
|
|
2053
|
-
}
|
|
2054
|
-
} catch (u) {
|
|
2055
|
-
s = { error: u };
|
|
2056
|
-
} finally {
|
|
2057
|
-
try {
|
|
2058
|
-
l && !l.done && (n = a.return) && n.call(a);
|
|
2059
|
-
} finally {
|
|
2060
|
-
if (s) throw s.error;
|
|
2061
|
-
}
|
|
2062
|
-
}
|
|
2063
|
-
this.interceptors.preResolution.setAll(e, i);
|
|
2064
|
-
}
|
|
2065
|
-
}, t.prototype.executePostResolutionInterceptor = function(e, r, s) {
|
|
2066
|
-
var n, i;
|
|
2067
|
-
if (this.interceptors.postResolution.has(e)) {
|
|
2068
|
-
var a = [];
|
|
2069
|
-
try {
|
|
2070
|
-
for (var l = de(this.interceptors.postResolution.getAll(e)), o = l.next(); !o.done; o = l.next()) {
|
|
2071
|
-
var u = o.value;
|
|
2072
|
-
u.options.frequency != "Once" && a.push(u), u.callback(e, r, s);
|
|
2073
|
-
}
|
|
2074
|
-
} catch (f) {
|
|
2075
|
-
n = { error: f };
|
|
2076
|
-
} finally {
|
|
2077
|
-
try {
|
|
2078
|
-
o && !o.done && (i = l.return) && i.call(l);
|
|
2079
|
-
} finally {
|
|
2080
|
-
if (n) throw n.error;
|
|
2081
|
-
}
|
|
2082
|
-
}
|
|
2083
|
-
this.interceptors.postResolution.setAll(e, a);
|
|
2084
|
-
}
|
|
2085
|
-
}, t.prototype.resolveRegistration = function(e, r) {
|
|
2086
|
-
if (this.ensureNotDisposed(), e.options.lifecycle === A.ResolutionScoped && r.scopedResolutions.has(e))
|
|
2087
|
-
return r.scopedResolutions.get(e);
|
|
2088
|
-
var s = e.options.lifecycle === A.Singleton, n = e.options.lifecycle === A.ContainerScoped, i = s || n, a;
|
|
2089
|
-
return Ie(e.provider) ? a = e.provider.useValue : we(e.provider) ? a = i ? e.instance || (e.instance = this.resolve(e.provider.useToken, r)) : this.resolve(e.provider.useToken, r) : dt(e.provider) ? a = i ? e.instance || (e.instance = this.construct(e.provider.useClass, r)) : this.construct(e.provider.useClass, r) : Pe(e.provider) ? a = e.provider.useFactory(this) : a = this.construct(e.provider, r), e.options.lifecycle === A.ResolutionScoped && r.scopedResolutions.set(e, a), a;
|
|
2090
|
-
}, t.prototype.resolveAll = function(e, r, s) {
|
|
2091
|
-
var n = this;
|
|
2092
|
-
r === void 0 && (r = new fe()), s === void 0 && (s = !1), this.ensureNotDisposed();
|
|
2093
|
-
var i = this.getAllRegistrations(e);
|
|
2094
|
-
if (!i && X(e)) {
|
|
2095
|
-
if (s)
|
|
2096
|
-
return [];
|
|
2097
|
-
throw new Error('Attempted to resolve unregistered dependency token: "' + e.toString() + '"');
|
|
2098
|
-
}
|
|
2099
|
-
if (this.executePreResolutionInterceptor(e, "All"), i) {
|
|
2100
|
-
var a = i.map(function(o) {
|
|
2101
|
-
return n.resolveRegistration(o, r);
|
|
2102
|
-
});
|
|
2103
|
-
return this.executePostResolutionInterceptor(e, a, "All"), a;
|
|
2104
|
-
}
|
|
2105
|
-
var l = [this.construct(e, r)];
|
|
2106
|
-
return this.executePostResolutionInterceptor(e, l, "All"), l;
|
|
2107
|
-
}, t.prototype.isRegistered = function(e, r) {
|
|
2108
|
-
return r === void 0 && (r = !1), this.ensureNotDisposed(), this._registry.has(e) || r && (this.parent || !1) && this.parent.isRegistered(e, !0);
|
|
2109
|
-
}, t.prototype.reset = function() {
|
|
2110
|
-
this.ensureNotDisposed(), this._registry.clear(), this.interceptors.preResolution.clear(), this.interceptors.postResolution.clear();
|
|
2111
|
-
}, t.prototype.clearInstances = function() {
|
|
2112
|
-
var e, r;
|
|
2113
|
-
this.ensureNotDisposed();
|
|
2114
|
-
try {
|
|
2115
|
-
for (var s = de(this._registry.entries()), n = s.next(); !n.done; n = s.next()) {
|
|
2116
|
-
var i = be(n.value, 2), a = i[0], l = i[1];
|
|
2117
|
-
this._registry.setAll(a, l.filter(function(o) {
|
|
2118
|
-
return !Ie(o.provider);
|
|
2119
|
-
}).map(function(o) {
|
|
2120
|
-
return o.instance = void 0, o;
|
|
2121
|
-
}));
|
|
2122
|
-
}
|
|
2123
|
-
} catch (o) {
|
|
2124
|
-
e = { error: o };
|
|
2125
|
-
} finally {
|
|
2126
|
-
try {
|
|
2127
|
-
n && !n.done && (r = s.return) && r.call(s);
|
|
2128
|
-
} finally {
|
|
2129
|
-
if (e) throw e.error;
|
|
2130
|
-
}
|
|
2131
|
-
}
|
|
2132
|
-
}, t.prototype.createChildContainer = function() {
|
|
2133
|
-
var e, r;
|
|
2134
|
-
this.ensureNotDisposed();
|
|
2135
|
-
var s = new t(this);
|
|
2136
|
-
try {
|
|
2137
|
-
for (var n = de(this._registry.entries()), i = n.next(); !i.done; i = n.next()) {
|
|
2138
|
-
var a = be(i.value, 2), l = a[0], o = a[1];
|
|
2139
|
-
o.some(function(u) {
|
|
2140
|
-
var f = u.options;
|
|
2141
|
-
return f.lifecycle === A.ContainerScoped;
|
|
2142
|
-
}) && s._registry.setAll(l, o.map(function(u) {
|
|
2143
|
-
return u.options.lifecycle === A.ContainerScoped ? {
|
|
2144
|
-
provider: u.provider,
|
|
2145
|
-
options: u.options
|
|
2146
|
-
} : u;
|
|
2147
|
-
}));
|
|
2148
|
-
}
|
|
2149
|
-
} catch (u) {
|
|
2150
|
-
e = { error: u };
|
|
2151
|
-
} finally {
|
|
2152
|
-
try {
|
|
2153
|
-
i && !i.done && (r = n.return) && r.call(n);
|
|
2154
|
-
} finally {
|
|
2155
|
-
if (e) throw e.error;
|
|
2156
|
-
}
|
|
2157
|
-
}
|
|
2158
|
-
return s;
|
|
2159
|
-
}, t.prototype.beforeResolution = function(e, r, s) {
|
|
2160
|
-
s === void 0 && (s = { frequency: "Always" }), this.interceptors.preResolution.set(e, {
|
|
2161
|
-
callback: r,
|
|
2162
|
-
options: s
|
|
2163
|
-
});
|
|
2164
|
-
}, t.prototype.afterResolution = function(e, r, s) {
|
|
2165
|
-
s === void 0 && (s = { frequency: "Always" }), this.interceptors.postResolution.set(e, {
|
|
2166
|
-
callback: r,
|
|
2167
|
-
options: s
|
|
2168
|
-
});
|
|
2169
|
-
}, t.prototype.dispose = function() {
|
|
2170
|
-
return lr(this, void 0, void 0, function() {
|
|
2171
|
-
var e;
|
|
2172
|
-
return ur(this, function(r) {
|
|
2173
|
-
switch (r.label) {
|
|
2174
|
-
case 0:
|
|
2175
|
-
return this.disposed = !0, e = [], this.disposables.forEach(function(s) {
|
|
2176
|
-
var n = s.dispose();
|
|
2177
|
-
n && e.push(n);
|
|
2178
|
-
}), [4, Promise.all(e)];
|
|
2179
|
-
case 1:
|
|
2180
|
-
return r.sent(), [2];
|
|
2181
|
-
}
|
|
2182
|
-
});
|
|
2183
|
-
});
|
|
2184
|
-
}, t.prototype.getRegistration = function(e) {
|
|
2185
|
-
return this.isRegistered(e) ? this._registry.get(e) : this.parent ? this.parent.getRegistration(e) : null;
|
|
2186
|
-
}, t.prototype.getAllRegistrations = function(e) {
|
|
2187
|
-
return this.isRegistered(e) ? this._registry.getAll(e) : this.parent ? this.parent.getAllRegistrations(e) : null;
|
|
2188
|
-
}, t.prototype.construct = function(e, r) {
|
|
2189
|
-
var s = this;
|
|
2190
|
-
if (e instanceof ft)
|
|
2191
|
-
return e.createProxy(function(i) {
|
|
2192
|
-
return s.resolve(i, r);
|
|
2193
|
-
});
|
|
2194
|
-
var n = function() {
|
|
2195
|
-
var i = pt.get(e);
|
|
2196
|
-
if (!i || i.length === 0) {
|
|
2197
|
-
if (e.length === 0)
|
|
2198
|
-
return new e();
|
|
2199
|
-
throw new Error('TypeInfo not known for "' + e.name + '"');
|
|
2200
|
-
}
|
|
2201
|
-
var a = i.map(s.resolveParams(r, e));
|
|
2202
|
-
return new (e.bind.apply(e, N([void 0], a)))();
|
|
2203
|
-
}();
|
|
2204
|
-
return Sr(n) && this.disposables.add(n), n;
|
|
2205
|
-
}, t.prototype.resolveParams = function(e, r) {
|
|
2206
|
-
var s = this;
|
|
2207
|
-
return function(n, i) {
|
|
2208
|
-
var a, l, o;
|
|
2209
|
-
try {
|
|
2210
|
-
return dr(n) ? Xe(n) ? n.multiple ? (a = s.resolve(n.transform)).transform.apply(a, N([s.resolveAll(n.token, new fe(), n.isOptional)], n.transformArgs)) : (l = s.resolve(n.transform)).transform.apply(l, N([s.resolve(n.token, e, n.isOptional)], n.transformArgs)) : n.multiple ? s.resolveAll(n.token, new fe(), n.isOptional) : s.resolve(n.token, e, n.isOptional) : Xe(n) ? (o = s.resolve(n.transform, e)).transform.apply(o, N([s.resolve(n.token, e)], n.transformArgs)) : s.resolve(n, e);
|
|
2211
|
-
} catch (u) {
|
|
2212
|
-
throw new Error(yr(r, i, u));
|
|
2213
|
-
}
|
|
2214
|
-
};
|
|
2215
|
-
}, t.prototype.ensureNotDisposed = function() {
|
|
2216
|
-
if (this.disposed)
|
|
2217
|
-
throw new Error("This container has been disposed, you cannot interact with a disposed container");
|
|
2218
|
-
}, t;
|
|
2219
|
-
}(), Ar = new Rr();
|
|
2220
|
-
function Dr(t) {
|
|
2221
|
-
return function(e) {
|
|
2222
|
-
pt.set(e, hr(e));
|
|
2223
|
-
};
|
|
2224
|
-
}
|
|
2225
|
-
function _r() {
|
|
2226
|
-
return function(t) {
|
|
2227
|
-
Dr()(t), Ar.registerSingleton(t);
|
|
2228
|
-
};
|
|
2229
|
-
}
|
|
2230
|
-
if (typeof Reflect > "u" || !Reflect.getMetadata)
|
|
2231
|
-
throw new Error(`tsyringe requires a reflect polyfill. Please add 'import "reflect-metadata"' to the top of your entry point.`);
|
|
2232
|
-
var Cr = Object.getOwnPropertyDescriptor, Mr = (t, e, r, s) => {
|
|
2233
|
-
for (var n = s > 1 ? void 0 : s ? Cr(e, r) : e, i = t.length - 1, a; i >= 0; i--)
|
|
2234
|
-
(a = t[i]) && (n = a(n) || n);
|
|
2235
|
-
return n;
|
|
2236
|
-
};
|
|
2237
|
-
let Qe = class {
|
|
1688
|
+
class Ms {
|
|
2238
1689
|
constructor() {
|
|
2239
1690
|
this.setCellComponentRegistry = this.setCellComponentRegistry.bind(this), this.getCellComponentRegistry = this.getCellComponentRegistry.bind(this);
|
|
2240
1691
|
}
|
|
2241
|
-
setCellComponentRegistry(
|
|
2242
|
-
this.cellComponentRegistry =
|
|
1692
|
+
setCellComponentRegistry(e) {
|
|
1693
|
+
this.cellComponentRegistry = e;
|
|
2243
1694
|
}
|
|
2244
1695
|
getCellComponentRegistry() {
|
|
2245
1696
|
return this.cellComponentRegistry;
|
|
2246
1697
|
}
|
|
2247
|
-
}
|
|
2248
|
-
|
|
2249
|
-
_r()
|
|
2250
|
-
], Qe);
|
|
2251
|
-
class ds {
|
|
1698
|
+
}
|
|
1699
|
+
class Cs {
|
|
2252
1700
|
constructor() {
|
|
2253
1701
|
this.registeredComponents = /* @__PURE__ */ new Map();
|
|
2254
1702
|
}
|
|
@@ -2259,281 +1707,281 @@ class ds {
|
|
|
2259
1707
|
return this.registeredComponents;
|
|
2260
1708
|
}
|
|
2261
1709
|
}
|
|
2262
|
-
function
|
|
2263
|
-
return function(
|
|
2264
|
-
|
|
1710
|
+
function Ls(t) {
|
|
1711
|
+
return function(s, r) {
|
|
1712
|
+
s.constructor.prototype.headers || (s.constructor.prototype.headers = []), s.constructor.prototype.headers.push({ path: r, ...t });
|
|
2265
1713
|
};
|
|
2266
1714
|
}
|
|
2267
|
-
function
|
|
2268
|
-
return function(
|
|
2269
|
-
async function
|
|
2270
|
-
return
|
|
1715
|
+
function xs(t) {
|
|
1716
|
+
return function(s) {
|
|
1717
|
+
async function r() {
|
|
1718
|
+
return s.prototype.headers || [];
|
|
2271
1719
|
}
|
|
2272
|
-
t.loadHeaderSchema =
|
|
1720
|
+
t.loadHeaderSchema = r;
|
|
2273
1721
|
};
|
|
2274
1722
|
}
|
|
2275
|
-
function
|
|
1723
|
+
function Ht() {
|
|
2276
1724
|
const t = M(
|
|
2277
1725
|
/* @__PURE__ */ new Map()
|
|
2278
|
-
), e = M(0),
|
|
2279
|
-
function
|
|
2280
|
-
e.value =
|
|
1726
|
+
), e = M(0), s = M(null), r = I(() => Array.from(t.value.values()));
|
|
1727
|
+
function a(m) {
|
|
1728
|
+
e.value = m;
|
|
2281
1729
|
}
|
|
2282
|
-
function i(
|
|
2283
|
-
for (const
|
|
2284
|
-
|
|
1730
|
+
function i(m) {
|
|
1731
|
+
for (const p of m)
|
|
1732
|
+
n(p);
|
|
2285
1733
|
}
|
|
2286
|
-
function
|
|
2287
|
-
t.value.set(
|
|
1734
|
+
function n(m) {
|
|
1735
|
+
t.value.set(m.id, m);
|
|
2288
1736
|
}
|
|
2289
|
-
function
|
|
2290
|
-
return
|
|
1737
|
+
function h(m) {
|
|
1738
|
+
return s.value = t.value.get(m) || null, s.value;
|
|
2291
1739
|
}
|
|
2292
|
-
function
|
|
2293
|
-
const
|
|
2294
|
-
return
|
|
1740
|
+
function c(m) {
|
|
1741
|
+
const p = h(m);
|
|
1742
|
+
return p && t.value.delete(m), !!p;
|
|
2295
1743
|
}
|
|
2296
|
-
function
|
|
1744
|
+
function g() {
|
|
2297
1745
|
t.value.clear();
|
|
2298
1746
|
}
|
|
2299
|
-
function f(
|
|
2300
|
-
|
|
1747
|
+
function f(m) {
|
|
1748
|
+
s.value = m;
|
|
2301
1749
|
}
|
|
2302
|
-
function
|
|
2303
|
-
|
|
1750
|
+
function u() {
|
|
1751
|
+
s.value = null;
|
|
2304
1752
|
}
|
|
2305
1753
|
return {
|
|
2306
|
-
itemsAsArray:
|
|
1754
|
+
itemsAsArray: r,
|
|
2307
1755
|
totalCount: e,
|
|
2308
|
-
currentItem:
|
|
2309
|
-
setTotalCount:
|
|
1756
|
+
currentItem: s,
|
|
1757
|
+
setTotalCount: a,
|
|
2310
1758
|
addOrReplaceItems: i,
|
|
2311
|
-
getById:
|
|
2312
|
-
removeById:
|
|
2313
|
-
clearItems:
|
|
1759
|
+
getById: h,
|
|
1760
|
+
removeById: c,
|
|
1761
|
+
clearItems: g,
|
|
2314
1762
|
setCurrentItem: f,
|
|
2315
|
-
clearCurrentItem:
|
|
1763
|
+
clearCurrentItem: u
|
|
2316
1764
|
};
|
|
2317
1765
|
}
|
|
2318
|
-
class
|
|
1766
|
+
class qt {
|
|
2319
1767
|
constructor() {
|
|
2320
|
-
this.pageNumber = 1, this.itemCount = 20, this.sortDetail = new
|
|
1768
|
+
this.pageNumber = 1, this.itemCount = 20, this.sortDetail = new xe("id", O.DESC), this.filters = [];
|
|
2321
1769
|
}
|
|
2322
1770
|
}
|
|
2323
|
-
class
|
|
2324
|
-
constructor(e,
|
|
2325
|
-
this.items = e, this.totalItems =
|
|
1771
|
+
class Os {
|
|
1772
|
+
constructor(e, s) {
|
|
1773
|
+
this.items = e, this.totalItems = s;
|
|
2326
1774
|
}
|
|
2327
1775
|
}
|
|
2328
|
-
class
|
|
2329
|
-
constructor(e,
|
|
2330
|
-
this.shouldKeepSync = e, this.intervalInMillisecond =
|
|
1776
|
+
class Es {
|
|
1777
|
+
constructor(e, s) {
|
|
1778
|
+
this.shouldKeepSync = e, this.intervalInMillisecond = s;
|
|
2331
1779
|
}
|
|
2332
1780
|
}
|
|
2333
|
-
const
|
|
2334
|
-
function
|
|
2335
|
-
const t = M(structuredClone(
|
|
1781
|
+
const je = new qt();
|
|
1782
|
+
function zt() {
|
|
1783
|
+
const t = M(structuredClone(je));
|
|
2336
1784
|
function e() {
|
|
2337
1785
|
t.value.pageNumber = t.value.pageNumber + 1;
|
|
2338
1786
|
}
|
|
2339
|
-
function
|
|
1787
|
+
function s() {
|
|
2340
1788
|
t.value.pageNumber = t.value.pageNumber - 1;
|
|
2341
1789
|
}
|
|
2342
|
-
function
|
|
2343
|
-
t.value.pageNumber =
|
|
1790
|
+
function r(u) {
|
|
1791
|
+
t.value.pageNumber = u;
|
|
2344
1792
|
}
|
|
2345
|
-
function
|
|
2346
|
-
t.value.itemCount =
|
|
1793
|
+
function a(u) {
|
|
1794
|
+
t.value.itemCount = u;
|
|
2347
1795
|
}
|
|
2348
|
-
function i(
|
|
2349
|
-
t.value.sortDetail.key =
|
|
1796
|
+
function i(u) {
|
|
1797
|
+
t.value.sortDetail.key = u.key, t.value.sortDetail.order = u.order;
|
|
2350
1798
|
}
|
|
2351
|
-
function
|
|
2352
|
-
for (const
|
|
2353
|
-
|
|
1799
|
+
function n(u) {
|
|
1800
|
+
for (const m in u)
|
|
1801
|
+
h(m, u[m]);
|
|
2354
1802
|
}
|
|
2355
|
-
function
|
|
2356
|
-
const
|
|
2357
|
-
(b) => b.key ===
|
|
1803
|
+
function h(u, m) {
|
|
1804
|
+
const p = t.value.filters.findIndex(
|
|
1805
|
+
(b) => b.key === u
|
|
2358
1806
|
);
|
|
2359
|
-
|
|
1807
|
+
p > -1 ? t.value.filters[p].value = m : t.value.filters.push({ key: u, value: m });
|
|
2360
1808
|
}
|
|
2361
|
-
function
|
|
2362
|
-
let
|
|
2363
|
-
|
|
1809
|
+
function c(u) {
|
|
1810
|
+
let m = t.value.filters;
|
|
1811
|
+
m = m.filter((p) => p.key !== u), t.value.filters = m;
|
|
2364
1812
|
}
|
|
2365
|
-
function
|
|
2366
|
-
const
|
|
1813
|
+
function g() {
|
|
1814
|
+
const u = {
|
|
2367
1815
|
page: t.value.pageNumber,
|
|
2368
1816
|
count: t.value.itemCount
|
|
2369
1817
|
};
|
|
2370
|
-
t.value.sortDetail && (
|
|
2371
|
-
for (const
|
|
2372
|
-
if (
|
|
2373
|
-
if (typeof
|
|
2374
|
-
|
|
1818
|
+
t.value.sortDetail && (u.by = t.value.sortDetail.key, u.order = t.value.sortDetail.order);
|
|
1819
|
+
for (const m of t.value.filters)
|
|
1820
|
+
if (m.value)
|
|
1821
|
+
if (typeof m.value == "string" || typeof m.value == "number")
|
|
1822
|
+
u[m.key] = m.value;
|
|
2375
1823
|
else {
|
|
2376
|
-
const
|
|
2377
|
-
|
|
1824
|
+
const p = JSON.stringify(m.value);
|
|
1825
|
+
p !== "[]" && p !== "{}" && (u[m.key] = p);
|
|
2378
1826
|
}
|
|
2379
|
-
return
|
|
1827
|
+
return u;
|
|
2380
1828
|
}
|
|
2381
1829
|
function f() {
|
|
2382
|
-
t.value = structuredClone(
|
|
1830
|
+
t.value = structuredClone(je);
|
|
2383
1831
|
}
|
|
2384
1832
|
return {
|
|
2385
1833
|
params: t,
|
|
2386
1834
|
setNextPage: e,
|
|
2387
|
-
setPreventPage:
|
|
2388
|
-
setPageNumber:
|
|
2389
|
-
setItemCount:
|
|
1835
|
+
setPreventPage: s,
|
|
1836
|
+
setPageNumber: r,
|
|
1837
|
+
setItemCount: a,
|
|
2390
1838
|
setSortDetail: i,
|
|
2391
|
-
setFilter:
|
|
2392
|
-
removeFilter:
|
|
2393
|
-
getRequestParams:
|
|
1839
|
+
setFilter: h,
|
|
1840
|
+
removeFilter: c,
|
|
1841
|
+
getRequestParams: g,
|
|
2394
1842
|
clearParam: f,
|
|
2395
|
-
setFiltersBaseOnRequestBody:
|
|
1843
|
+
setFiltersBaseOnRequestBody: n
|
|
2396
1844
|
};
|
|
2397
1845
|
}
|
|
2398
|
-
function
|
|
2399
|
-
const t = M(/* @__PURE__ */ new Set()), e =
|
|
2400
|
-
function f(
|
|
2401
|
-
t.value.add(
|
|
1846
|
+
function Gt() {
|
|
1847
|
+
const t = M(/* @__PURE__ */ new Set()), e = I(() => t.value.has(v.FetchList)), s = I(() => t.value.has(v.FetchItem)), r = I(() => t.value.has(v.FetchLastItems)), a = I(() => t.value.has(v.FetchPreviousItems)), i = I(() => t.value.has(v.Create)), n = I(() => t.value.has(v.Update)), h = I(() => t.value.has(v.Delete)), c = I(() => t.value.has(v.Search)), g = I(() => t.value.has(v.Sort));
|
|
1848
|
+
function f(m) {
|
|
1849
|
+
t.value.add(m);
|
|
2402
1850
|
}
|
|
2403
|
-
function
|
|
2404
|
-
t.value.delete(
|
|
1851
|
+
function u(m) {
|
|
1852
|
+
t.value.delete(m);
|
|
2405
1853
|
}
|
|
2406
1854
|
return {
|
|
2407
1855
|
loadingStatus: t,
|
|
2408
1856
|
isFetchingList: e,
|
|
2409
|
-
isFetchingItem:
|
|
2410
|
-
isFetchingLastItems:
|
|
2411
|
-
isFetchingPreviousItems:
|
|
1857
|
+
isFetchingItem: s,
|
|
1858
|
+
isFetchingLastItems: r,
|
|
1859
|
+
isFetchingPreviousItems: a,
|
|
2412
1860
|
isCreating: i,
|
|
2413
|
-
isUpdating:
|
|
2414
|
-
isDeleting:
|
|
2415
|
-
isSearching:
|
|
2416
|
-
isSorting:
|
|
1861
|
+
isUpdating: n,
|
|
1862
|
+
isDeleting: h,
|
|
1863
|
+
isSearching: c,
|
|
1864
|
+
isSorting: g,
|
|
2417
1865
|
setStatus: f,
|
|
2418
|
-
removeStatus:
|
|
1866
|
+
removeStatus: u
|
|
2419
1867
|
};
|
|
2420
1868
|
}
|
|
2421
|
-
function
|
|
2422
|
-
const e =
|
|
2423
|
-
runAction: async () =>
|
|
2424
|
-
}), i =
|
|
2425
|
-
const
|
|
2426
|
-
for (let y =
|
|
2427
|
-
|
|
2428
|
-
return
|
|
2429
|
-
}),
|
|
1869
|
+
function ks(t) {
|
|
1870
|
+
const e = Ht(), s = zt(), r = Gt(), a = new Je({
|
|
1871
|
+
runAction: async () => u(v.AutoRefresh)
|
|
1872
|
+
}), i = I(() => {
|
|
1873
|
+
const o = s.params.value.pageNumber, l = s.params.value.itemCount, d = o * l - l, S = o * l - 1, w = [];
|
|
1874
|
+
for (let y = d; y <= S && e.itemsAsArray.value[y]; y++)
|
|
1875
|
+
w.push(e.itemsAsArray.value[y]);
|
|
1876
|
+
return w;
|
|
1877
|
+
}), n = I(() => ({
|
|
2430
1878
|
totalItems: e.totalCount.value,
|
|
2431
|
-
currentPage:
|
|
1879
|
+
currentPage: s.params.value.pageNumber,
|
|
2432
1880
|
rows: e.itemsAsArray.value,
|
|
2433
|
-
loadingStatus:
|
|
1881
|
+
loadingStatus: r.loadingStatus.value,
|
|
2434
1882
|
currentPageItems: i.value
|
|
2435
|
-
})),
|
|
2436
|
-
getData:
|
|
2437
|
-
sort:
|
|
2438
|
-
paginate:
|
|
2439
|
-
fetchRows:
|
|
2440
|
-
})),
|
|
2441
|
-
function
|
|
2442
|
-
return
|
|
2443
|
-
}
|
|
2444
|
-
async function f(
|
|
2445
|
-
const
|
|
2446
|
-
return e.clearItems(), e.addOrReplaceItems(
|
|
2447
|
-
}
|
|
2448
|
-
async function
|
|
2449
|
-
|
|
2450
|
-
const
|
|
2451
|
-
return
|
|
2452
|
-
}
|
|
2453
|
-
async function
|
|
2454
|
-
|
|
2455
|
-
}
|
|
2456
|
-
function
|
|
2457
|
-
if (!
|
|
1883
|
+
})), h = I(() => ({
|
|
1884
|
+
getData: g,
|
|
1885
|
+
sort: X,
|
|
1886
|
+
paginate: re,
|
|
1887
|
+
fetchRows: u
|
|
1888
|
+
})), c = I(() => t.getSyncDetail());
|
|
1889
|
+
function g() {
|
|
1890
|
+
return n.value;
|
|
1891
|
+
}
|
|
1892
|
+
async function f(o) {
|
|
1893
|
+
const l = await t.fetchList(o);
|
|
1894
|
+
return e.clearItems(), e.addOrReplaceItems(l.items), e.setTotalCount(l.totalItems), l;
|
|
1895
|
+
}
|
|
1896
|
+
async function u(o = v.FetchList) {
|
|
1897
|
+
r.setStatus(o);
|
|
1898
|
+
const l = await f(s.getRequestParams());
|
|
1899
|
+
return r.removeStatus(o), l;
|
|
1900
|
+
}
|
|
1901
|
+
async function m() {
|
|
1902
|
+
p(), await u();
|
|
1903
|
+
}
|
|
1904
|
+
function p() {
|
|
1905
|
+
if (!c.value.shouldKeepSync)
|
|
2458
1906
|
throw new Error("The provided repository does not support auto refresh");
|
|
2459
|
-
|
|
1907
|
+
a.setupInterval(c.value.intervalInMillisecond);
|
|
2460
1908
|
}
|
|
2461
1909
|
function b() {
|
|
2462
|
-
|
|
2463
|
-
}
|
|
2464
|
-
async function
|
|
2465
|
-
|
|
2466
|
-
const
|
|
2467
|
-
return e.setCurrentItem(
|
|
2468
|
-
}
|
|
2469
|
-
async function
|
|
2470
|
-
|
|
2471
|
-
const
|
|
2472
|
-
return
|
|
2473
|
-
}
|
|
2474
|
-
async function
|
|
2475
|
-
|
|
2476
|
-
const
|
|
2477
|
-
return
|
|
2478
|
-
}
|
|
2479
|
-
async function
|
|
2480
|
-
return
|
|
2481
|
-
}
|
|
2482
|
-
async function
|
|
2483
|
-
|
|
2484
|
-
const
|
|
2485
|
-
return
|
|
2486
|
-
}
|
|
2487
|
-
async function
|
|
2488
|
-
|
|
2489
|
-
const
|
|
2490
|
-
return
|
|
2491
|
-
}
|
|
2492
|
-
async function
|
|
2493
|
-
|
|
2494
|
-
const
|
|
2495
|
-
return
|
|
2496
|
-
}
|
|
2497
|
-
async function
|
|
2498
|
-
|
|
2499
|
-
const
|
|
2500
|
-
return
|
|
2501
|
-
}
|
|
2502
|
-
async function
|
|
2503
|
-
|
|
2504
|
-
const
|
|
2505
|
-
return
|
|
2506
|
-
}
|
|
2507
|
-
async function
|
|
2508
|
-
return
|
|
2509
|
-
}
|
|
2510
|
-
return
|
|
1910
|
+
a.clearInterval();
|
|
1911
|
+
}
|
|
1912
|
+
async function B(o, l = !0) {
|
|
1913
|
+
r.setStatus(v.FetchItem), l && e.clearCurrentItem();
|
|
1914
|
+
const d = await t.fetchItemById(o);
|
|
1915
|
+
return e.setCurrentItem(d), r.removeStatus(v.FetchItem), d;
|
|
1916
|
+
}
|
|
1917
|
+
async function U(o) {
|
|
1918
|
+
r.setStatus(v.Create);
|
|
1919
|
+
const l = await t.createItem(o);
|
|
1920
|
+
return l && e.addOrReplaceItems([l]), r.removeStatus(v.Create), l;
|
|
1921
|
+
}
|
|
1922
|
+
async function H(o, l) {
|
|
1923
|
+
r.setStatus(v.Update);
|
|
1924
|
+
const d = await t.updateItem(o, l);
|
|
1925
|
+
return d && e.addOrReplaceItems([d]), r.removeStatus(v.Update), d;
|
|
1926
|
+
}
|
|
1927
|
+
async function q(o) {
|
|
1928
|
+
return r.setStatus(v.Delete), await t.deleteItem(o), r.removeStatus(v.Delete), e.removeById(o);
|
|
1929
|
+
}
|
|
1930
|
+
async function ye() {
|
|
1931
|
+
s.setNextPage(), r.setStatus(v.FetchLastItems);
|
|
1932
|
+
const o = await f(s.getRequestParams());
|
|
1933
|
+
return r.removeStatus(v.FetchLastItems), o;
|
|
1934
|
+
}
|
|
1935
|
+
async function Se() {
|
|
1936
|
+
s.setPreventPage(), r.setStatus(v.FetchPreviousItems);
|
|
1937
|
+
const o = await f(s.getRequestParams());
|
|
1938
|
+
return r.removeStatus(v.FetchPreviousItems), o;
|
|
1939
|
+
}
|
|
1940
|
+
async function re(o) {
|
|
1941
|
+
s.setPageNumber(o), r.setStatus(v.FetchList);
|
|
1942
|
+
const l = await f(s.getRequestParams());
|
|
1943
|
+
return r.removeStatus(v.FetchList), l;
|
|
1944
|
+
}
|
|
1945
|
+
async function Ie(o) {
|
|
1946
|
+
s.setFilter("search", o), r.setStatus(v.Search), e.clearItems();
|
|
1947
|
+
const l = await f(s.getRequestParams());
|
|
1948
|
+
return r.removeStatus(v.Search), l;
|
|
1949
|
+
}
|
|
1950
|
+
async function X(o) {
|
|
1951
|
+
s.setSortDetail(o), r.setStatus(v.Sort), e.clearItems();
|
|
1952
|
+
const l = await f(s.getRequestParams());
|
|
1953
|
+
return r.removeStatus(v.Sort), l;
|
|
1954
|
+
}
|
|
1955
|
+
async function z() {
|
|
1956
|
+
return s.clearParam(), await u();
|
|
1957
|
+
}
|
|
1958
|
+
return tt(() => {
|
|
2511
1959
|
b();
|
|
2512
1960
|
}), {
|
|
2513
|
-
loadingStatusManager:
|
|
1961
|
+
loadingStatusManager: r,
|
|
2514
1962
|
dataManger: e,
|
|
2515
|
-
paramsManager:
|
|
2516
|
-
tableRenderingData:
|
|
2517
|
-
fetchList:
|
|
2518
|
-
fetchWithAutoRefresh:
|
|
2519
|
-
setupAutoRefresh:
|
|
1963
|
+
paramsManager: s,
|
|
1964
|
+
tableRenderingData: n,
|
|
1965
|
+
fetchList: u,
|
|
1966
|
+
fetchWithAutoRefresh: m,
|
|
1967
|
+
setupAutoRefresh: p,
|
|
2520
1968
|
stopAutoRefresh: b,
|
|
2521
|
-
fetchItemById:
|
|
2522
|
-
createItem:
|
|
2523
|
-
updateItem:
|
|
2524
|
-
deleteItem:
|
|
2525
|
-
fetchLastItems:
|
|
2526
|
-
fetchPreviousItems:
|
|
2527
|
-
fetchItemsByPageNumber:
|
|
2528
|
-
search:
|
|
2529
|
-
sort:
|
|
2530
|
-
clearFilters:
|
|
2531
|
-
tableService:
|
|
1969
|
+
fetchItemById: B,
|
|
1970
|
+
createItem: U,
|
|
1971
|
+
updateItem: H,
|
|
1972
|
+
deleteItem: q,
|
|
1973
|
+
fetchLastItems: ye,
|
|
1974
|
+
fetchPreviousItems: Se,
|
|
1975
|
+
fetchItemsByPageNumber: re,
|
|
1976
|
+
search: Ie,
|
|
1977
|
+
sort: X,
|
|
1978
|
+
clearFilters: z,
|
|
1979
|
+
tableService: h,
|
|
2532
1980
|
currentPageItems: i
|
|
2533
1981
|
};
|
|
2534
1982
|
}
|
|
2535
|
-
function
|
|
2536
|
-
const e = M(t),
|
|
1983
|
+
function Ts(t) {
|
|
1984
|
+
const e = M(t), s = I(() => ({
|
|
2537
1985
|
getData() {
|
|
2538
1986
|
return {
|
|
2539
1987
|
totalItems: e.value.length,
|
|
@@ -2543,7 +1991,7 @@ function ys(t) {
|
|
|
2543
1991
|
currentPage: 1
|
|
2544
1992
|
};
|
|
2545
1993
|
},
|
|
2546
|
-
async sort(
|
|
1994
|
+
async sort(r) {
|
|
2547
1995
|
return {
|
|
2548
1996
|
totalItems: e.value.length,
|
|
2549
1997
|
items: e.value
|
|
@@ -2555,7 +2003,7 @@ function ys(t) {
|
|
|
2555
2003
|
items: e.value
|
|
2556
2004
|
};
|
|
2557
2005
|
},
|
|
2558
|
-
async paginate(
|
|
2006
|
+
async paginate(r, a) {
|
|
2559
2007
|
return {
|
|
2560
2008
|
totalItems: e.value.length,
|
|
2561
2009
|
items: e.value
|
|
@@ -2564,44 +2012,44 @@ function ys(t) {
|
|
|
2564
2012
|
}));
|
|
2565
2013
|
return {
|
|
2566
2014
|
tableRows: e,
|
|
2567
|
-
staticTableService:
|
|
2015
|
+
staticTableService: s
|
|
2568
2016
|
};
|
|
2569
2017
|
}
|
|
2570
|
-
function
|
|
2571
|
-
const t = M(/* @__PURE__ */ new Map()), e = M(0),
|
|
2572
|
-
function
|
|
2018
|
+
function Ps() {
|
|
2019
|
+
const t = M(/* @__PURE__ */ new Map()), e = M(0), s = I(() => e.value), r = I(() => Array.from(t.value.values()));
|
|
2020
|
+
function a(f) {
|
|
2573
2021
|
e.value = f;
|
|
2574
2022
|
}
|
|
2575
2023
|
function i(f) {
|
|
2576
|
-
for (const
|
|
2577
|
-
|
|
2024
|
+
for (const u of f)
|
|
2025
|
+
n(u);
|
|
2578
2026
|
}
|
|
2579
|
-
function
|
|
2027
|
+
function n(f) {
|
|
2580
2028
|
t.value.set(String(f.id), f);
|
|
2581
2029
|
}
|
|
2582
|
-
function
|
|
2583
|
-
const
|
|
2584
|
-
return t.value.delete(String(f)),
|
|
2030
|
+
function h(f) {
|
|
2031
|
+
const u = c(f);
|
|
2032
|
+
return t.value.delete(String(f)), u;
|
|
2585
2033
|
}
|
|
2586
|
-
function
|
|
2034
|
+
function c(f) {
|
|
2587
2035
|
return t.value.get(String(f)) || null;
|
|
2588
2036
|
}
|
|
2589
|
-
function
|
|
2037
|
+
function g() {
|
|
2590
2038
|
t.value.clear();
|
|
2591
2039
|
}
|
|
2592
2040
|
return {
|
|
2593
|
-
entityItemsAsArray:
|
|
2041
|
+
entityItemsAsArray: r,
|
|
2594
2042
|
addOrReplaceItems: i,
|
|
2595
|
-
removeById:
|
|
2596
|
-
getItemById:
|
|
2597
|
-
clearItems:
|
|
2598
|
-
setTotalCount:
|
|
2599
|
-
getTotalCount:
|
|
2043
|
+
removeById: h,
|
|
2044
|
+
getItemById: c,
|
|
2045
|
+
clearItems: g,
|
|
2046
|
+
setTotalCount: a,
|
|
2047
|
+
getTotalCount: s
|
|
2600
2048
|
};
|
|
2601
2049
|
}
|
|
2602
|
-
class
|
|
2603
|
-
constructor(e,
|
|
2604
|
-
this.timerId = null, this.debounceTimeout =
|
|
2050
|
+
class $s {
|
|
2051
|
+
constructor(e, s = 500) {
|
|
2052
|
+
this.timerId = null, this.debounceTimeout = s, this.action = e;
|
|
2605
2053
|
}
|
|
2606
2054
|
runAction() {
|
|
2607
2055
|
this.cancelDebounce(), this.action.runImmediate(), this.timerId = setTimeout(() => {
|
|
@@ -2612,38 +2060,38 @@ class ws {
|
|
|
2612
2060
|
this.timerId && clearTimeout(this.timerId);
|
|
2613
2061
|
}
|
|
2614
2062
|
}
|
|
2615
|
-
function
|
|
2616
|
-
return function(e,
|
|
2617
|
-
const
|
|
2618
|
-
|
|
2063
|
+
function Vs(t) {
|
|
2064
|
+
return function(e, s, r) {
|
|
2065
|
+
const a = r.value;
|
|
2066
|
+
r.value = async function(...i) {
|
|
2619
2067
|
try {
|
|
2620
|
-
return await
|
|
2621
|
-
} catch (
|
|
2622
|
-
for (const
|
|
2623
|
-
await
|
|
2068
|
+
return await a.apply(this, i);
|
|
2069
|
+
} catch (n) {
|
|
2070
|
+
for (const h of t)
|
|
2071
|
+
await h.handleError(n);
|
|
2624
2072
|
}
|
|
2625
2073
|
};
|
|
2626
2074
|
};
|
|
2627
2075
|
}
|
|
2628
|
-
function
|
|
2629
|
-
return function(e,
|
|
2630
|
-
const
|
|
2631
|
-
|
|
2076
|
+
function Fs(t) {
|
|
2077
|
+
return function(e, s, r) {
|
|
2078
|
+
const a = r.value;
|
|
2079
|
+
r.value = async function(...i) {
|
|
2632
2080
|
try {
|
|
2633
|
-
const
|
|
2634
|
-
for (const
|
|
2635
|
-
|
|
2636
|
-
return
|
|
2637
|
-
} catch (
|
|
2638
|
-
for (const
|
|
2639
|
-
|
|
2081
|
+
const n = await a.apply(this, i);
|
|
2082
|
+
for (const h of t)
|
|
2083
|
+
h.shouldResolveSuccess(n) && await h.handleSuccess(n);
|
|
2084
|
+
return n;
|
|
2085
|
+
} catch (n) {
|
|
2086
|
+
for (const h of t)
|
|
2087
|
+
h.shouldResolveFailure(n) && await h.handleFailure(n);
|
|
2640
2088
|
}
|
|
2641
2089
|
};
|
|
2642
2090
|
};
|
|
2643
2091
|
}
|
|
2644
|
-
class
|
|
2645
|
-
constructor(e,
|
|
2646
|
-
this.successMessageResolver = e, this.failureMessageResolver =
|
|
2092
|
+
class js {
|
|
2093
|
+
constructor(e, s, r = () => !0, a = () => !0) {
|
|
2094
|
+
this.successMessageResolver = e, this.failureMessageResolver = s, this.shouldResolveSuccess = r, this.shouldResolveFailure = a;
|
|
2647
2095
|
}
|
|
2648
2096
|
async handleSuccess(e) {
|
|
2649
2097
|
}
|
|
@@ -2654,24 +2102,24 @@ class Rs {
|
|
|
2654
2102
|
async handleWarning() {
|
|
2655
2103
|
}
|
|
2656
2104
|
}
|
|
2657
|
-
const
|
|
2105
|
+
const R = class R {
|
|
2658
2106
|
constructor() {
|
|
2659
2107
|
}
|
|
2660
2108
|
static GetInstance() {
|
|
2661
|
-
return
|
|
2109
|
+
return R.instance || (R.instance = new R()), R.instance;
|
|
2662
2110
|
}
|
|
2663
|
-
static registerHandler(e,
|
|
2664
|
-
|
|
2111
|
+
static registerHandler(e, s) {
|
|
2112
|
+
R.handlers.set(e, s);
|
|
2665
2113
|
}
|
|
2666
2114
|
handle(e) {
|
|
2667
|
-
var
|
|
2668
|
-
const
|
|
2669
|
-
|
|
2115
|
+
var a;
|
|
2116
|
+
const s = ((a = e.response) == null ? void 0 : a.status) ?? 0, r = R.handlers.get(s);
|
|
2117
|
+
r && r.handleError(e);
|
|
2670
2118
|
}
|
|
2671
2119
|
};
|
|
2672
|
-
|
|
2673
|
-
let
|
|
2674
|
-
class
|
|
2120
|
+
R.handlers = /* @__PURE__ */ new Map(), R.instance = null;
|
|
2121
|
+
let Ye = R;
|
|
2122
|
+
class Ys {
|
|
2675
2123
|
constructor(e) {
|
|
2676
2124
|
this.axiosInstance = e;
|
|
2677
2125
|
}
|
|
@@ -2686,19 +2134,19 @@ class As {
|
|
|
2686
2134
|
}
|
|
2687
2135
|
attachRequestInterceptors(e) {
|
|
2688
2136
|
return this.axiosInstance.interceptors.request.use(
|
|
2689
|
-
(
|
|
2690
|
-
for (const
|
|
2691
|
-
|
|
2692
|
-
return
|
|
2137
|
+
(s) => {
|
|
2138
|
+
for (const r of e)
|
|
2139
|
+
r.intercept(s);
|
|
2140
|
+
return s;
|
|
2693
2141
|
},
|
|
2694
|
-
(
|
|
2142
|
+
(s) => Promise.reject(s)
|
|
2695
2143
|
), this;
|
|
2696
2144
|
}
|
|
2697
2145
|
attachResponseInterceptors(e) {
|
|
2698
2146
|
return this.axiosInstance.interceptors.response.use(
|
|
2699
|
-
(
|
|
2700
|
-
(
|
|
2701
|
-
throw e.handle(
|
|
2147
|
+
(s) => s,
|
|
2148
|
+
(s) => {
|
|
2149
|
+
throw e.handle(s), s;
|
|
2702
2150
|
}
|
|
2703
2151
|
), this;
|
|
2704
2152
|
}
|
|
@@ -2706,45 +2154,45 @@ class As {
|
|
|
2706
2154
|
return this.axiosInstance;
|
|
2707
2155
|
}
|
|
2708
2156
|
}
|
|
2709
|
-
class
|
|
2157
|
+
class Ns {
|
|
2710
2158
|
constructor(e) {
|
|
2711
2159
|
this.axiosInstance = e;
|
|
2712
2160
|
}
|
|
2713
|
-
async get(e,
|
|
2161
|
+
async get(e, s) {
|
|
2714
2162
|
return await this.axiosInstance.get(
|
|
2715
2163
|
e,
|
|
2716
|
-
|
|
2164
|
+
s
|
|
2717
2165
|
);
|
|
2718
2166
|
}
|
|
2719
|
-
async post(e,
|
|
2167
|
+
async post(e, s, r) {
|
|
2720
2168
|
return await this.axiosInstance.post(
|
|
2721
2169
|
e,
|
|
2722
|
-
|
|
2723
|
-
|
|
2170
|
+
s,
|
|
2171
|
+
r
|
|
2724
2172
|
);
|
|
2725
2173
|
}
|
|
2726
|
-
async patch(e,
|
|
2174
|
+
async patch(e, s, r) {
|
|
2727
2175
|
return await this.axiosInstance.patch(
|
|
2728
2176
|
e,
|
|
2729
|
-
|
|
2730
|
-
|
|
2177
|
+
s,
|
|
2178
|
+
r
|
|
2731
2179
|
);
|
|
2732
2180
|
}
|
|
2733
|
-
async put(e,
|
|
2181
|
+
async put(e, s, r) {
|
|
2734
2182
|
return await this.axiosInstance.put(
|
|
2735
2183
|
e,
|
|
2736
|
-
|
|
2737
|
-
|
|
2184
|
+
s,
|
|
2185
|
+
r
|
|
2738
2186
|
);
|
|
2739
2187
|
}
|
|
2740
|
-
async delete(e,
|
|
2188
|
+
async delete(e, s) {
|
|
2741
2189
|
return await this.axiosInstance.delete(
|
|
2742
2190
|
e,
|
|
2743
|
-
|
|
2191
|
+
s
|
|
2744
2192
|
);
|
|
2745
2193
|
}
|
|
2746
2194
|
}
|
|
2747
|
-
class
|
|
2195
|
+
class Bs {
|
|
2748
2196
|
constructor() {
|
|
2749
2197
|
this._initializer = [];
|
|
2750
2198
|
}
|
|
@@ -2756,93 +2204,93 @@ class _s {
|
|
|
2756
2204
|
e.initialize();
|
|
2757
2205
|
}
|
|
2758
2206
|
}
|
|
2759
|
-
const
|
|
2207
|
+
const j = class j {
|
|
2760
2208
|
constructor() {
|
|
2761
|
-
this.jsonConverter = new
|
|
2209
|
+
this.jsonConverter = new st();
|
|
2762
2210
|
}
|
|
2763
|
-
serializeObject(e,
|
|
2764
|
-
return this.jsonConverter.serializeObject(e,
|
|
2211
|
+
serializeObject(e, s) {
|
|
2212
|
+
return this.jsonConverter.serializeObject(e, s);
|
|
2765
2213
|
}
|
|
2766
|
-
deserializeObject(e,
|
|
2767
|
-
return this.jsonConverter.deserializeObject(e,
|
|
2214
|
+
deserializeObject(e, s) {
|
|
2215
|
+
return this.jsonConverter.deserializeObject(e, s);
|
|
2768
2216
|
}
|
|
2769
|
-
deserializeArray(e,
|
|
2770
|
-
return this.jsonConverter.deserializeArray(e,
|
|
2217
|
+
deserializeArray(e, s) {
|
|
2218
|
+
return this.jsonConverter.deserializeArray(e, s);
|
|
2771
2219
|
}
|
|
2772
|
-
tryDeserialize(e,
|
|
2773
|
-
for (const
|
|
2220
|
+
tryDeserialize(e, s) {
|
|
2221
|
+
for (const r of s)
|
|
2774
2222
|
try {
|
|
2775
|
-
return this.deserializeObject(e,
|
|
2223
|
+
return this.deserializeObject(e, r);
|
|
2776
2224
|
} catch {
|
|
2777
2225
|
}
|
|
2778
2226
|
throw new Error("Unable to deserialize object");
|
|
2779
2227
|
}
|
|
2780
2228
|
static GetInstance() {
|
|
2781
|
-
return
|
|
2229
|
+
return j.Instance || (j.Instance = new j()), j.Instance;
|
|
2782
2230
|
}
|
|
2783
2231
|
};
|
|
2784
|
-
|
|
2785
|
-
let
|
|
2786
|
-
var
|
|
2787
|
-
class
|
|
2788
|
-
constructor(e,
|
|
2789
|
-
this.placement =
|
|
2232
|
+
j.Instance = null;
|
|
2233
|
+
let Ne = j;
|
|
2234
|
+
var Jt = /* @__PURE__ */ ((t) => (t.Success = "success", t.Failure = "error", t.Info = "info", t.Warning = "warning", t))(Jt || {}), Ke = /* @__PURE__ */ ((t) => (t.BottomLeft = "bottomLeft", t.TopLeft = "topLeft", t))(Ke || {});
|
|
2235
|
+
class Us {
|
|
2236
|
+
constructor(e, s, r) {
|
|
2237
|
+
this.placement = Ke.BottomLeft, this.type = e, this.message = s, this.description = r;
|
|
2790
2238
|
}
|
|
2791
2239
|
}
|
|
2792
|
-
const
|
|
2793
|
-
const t =
|
|
2240
|
+
const Hs = Ue(Le.Dialog, () => {
|
|
2241
|
+
const t = Be({
|
|
2794
2242
|
dialogComponent: null,
|
|
2795
|
-
width:
|
|
2796
|
-
height:
|
|
2243
|
+
width: $.DefaultWidth,
|
|
2244
|
+
height: $.DefaultHeight,
|
|
2797
2245
|
props: null,
|
|
2798
2246
|
header: ""
|
|
2799
|
-
}), e =
|
|
2800
|
-
function
|
|
2801
|
-
t.dialogComponent =
|
|
2247
|
+
}), e = I(() => !!t.dialogComponent), s = I(() => !!t.header);
|
|
2248
|
+
function r(c) {
|
|
2249
|
+
t.dialogComponent = c;
|
|
2802
2250
|
}
|
|
2803
|
-
function
|
|
2804
|
-
t.header =
|
|
2251
|
+
function a(c) {
|
|
2252
|
+
t.header = c;
|
|
2805
2253
|
}
|
|
2806
|
-
function i(
|
|
2254
|
+
function i(c) {
|
|
2807
2255
|
if (!e.value)
|
|
2808
2256
|
throw new Error("there is no dialog to set props on");
|
|
2809
|
-
t.props =
|
|
2257
|
+
t.props = c;
|
|
2810
2258
|
}
|
|
2811
|
-
function
|
|
2259
|
+
function n(c, g) {
|
|
2812
2260
|
if (!e.value)
|
|
2813
2261
|
throw new Error("there is no dialog to set size on");
|
|
2814
|
-
if (
|
|
2262
|
+
if (c < $.MinimalAvailableSize)
|
|
2815
2263
|
throw new Error("negative size not supported");
|
|
2816
|
-
|
|
2264
|
+
g === $.Width ? t.width = c : t.height = c;
|
|
2817
2265
|
}
|
|
2818
|
-
function
|
|
2819
|
-
t.props = null, t.height =
|
|
2266
|
+
function h() {
|
|
2267
|
+
t.props = null, t.height = $.DefaultHeight, t.width = $.DefaultWidth, t.header = "", t.dialogComponent = null;
|
|
2820
2268
|
}
|
|
2821
2269
|
return {
|
|
2822
2270
|
dialogData: t,
|
|
2823
|
-
openDialog:
|
|
2824
|
-
clearDialog:
|
|
2825
|
-
setSize:
|
|
2826
|
-
setDialogHeader:
|
|
2271
|
+
openDialog: r,
|
|
2272
|
+
clearDialog: h,
|
|
2273
|
+
setSize: n,
|
|
2274
|
+
setDialogHeader: a,
|
|
2827
2275
|
setProps: i,
|
|
2828
2276
|
isDialogExists: e,
|
|
2829
|
-
hasDefaultHeader:
|
|
2277
|
+
hasDefaultHeader: s
|
|
2830
2278
|
};
|
|
2831
|
-
}),
|
|
2832
|
-
const t = M(
|
|
2833
|
-
function r() {
|
|
2834
|
-
t.value = ne.Close;
|
|
2835
|
-
}
|
|
2279
|
+
}), qs = Ue(Le.Drawer, () => {
|
|
2280
|
+
const t = M(te.Close), e = I(() => t.value === te.Open);
|
|
2836
2281
|
function s() {
|
|
2837
|
-
t.value =
|
|
2282
|
+
t.value = te.Close;
|
|
2283
|
+
}
|
|
2284
|
+
function r() {
|
|
2285
|
+
t.value = te.Open;
|
|
2838
2286
|
}
|
|
2839
2287
|
return {
|
|
2840
|
-
closeDrawer:
|
|
2841
|
-
openDrawer:
|
|
2288
|
+
closeDrawer: s,
|
|
2289
|
+
openDrawer: r,
|
|
2842
2290
|
isDrawerOpen: e
|
|
2843
2291
|
};
|
|
2844
2292
|
});
|
|
2845
|
-
class
|
|
2293
|
+
class zs {
|
|
2846
2294
|
constructor(e) {
|
|
2847
2295
|
this.mapProcesses = /* @__PURE__ */ new Map(), this.processes = e, this.assignProcessManager();
|
|
2848
2296
|
}
|
|
@@ -2856,65 +2304,65 @@ class xs {
|
|
|
2856
2304
|
await this.processes.execute();
|
|
2857
2305
|
}
|
|
2858
2306
|
async startFrom(e) {
|
|
2859
|
-
const
|
|
2860
|
-
if (!
|
|
2307
|
+
const s = this.mapProcesses.get(e);
|
|
2308
|
+
if (!s)
|
|
2861
2309
|
throw new Error(`Process ${e} not found`);
|
|
2862
|
-
await
|
|
2310
|
+
await s.execute();
|
|
2863
2311
|
}
|
|
2864
2312
|
}
|
|
2865
|
-
class
|
|
2866
|
-
constructor(e,
|
|
2867
|
-
this.next = null, this.name = e, this.next =
|
|
2313
|
+
class Gs {
|
|
2314
|
+
constructor(e, s) {
|
|
2315
|
+
this.next = null, this.name = e, this.next = s;
|
|
2868
2316
|
}
|
|
2869
2317
|
addToManager(e) {
|
|
2870
2318
|
e.setProcessToMap(this), this.next && this.next.addToManager(e);
|
|
2871
2319
|
}
|
|
2872
2320
|
}
|
|
2873
|
-
class
|
|
2321
|
+
class Js {
|
|
2874
2322
|
constructor() {
|
|
2875
2323
|
this.checkAccessibility = this.checkAccessibility.bind(this), this.isAccessible = this.isAccessible.bind(this), this.getDestinationRouteName = this.getDestinationRouteName.bind(this);
|
|
2876
2324
|
}
|
|
2877
|
-
async checkAccessibility(e,
|
|
2878
|
-
if (await this.isAccessible(e,
|
|
2879
|
-
|
|
2325
|
+
async checkAccessibility(e, s, r) {
|
|
2326
|
+
if (await this.isAccessible(e, s)) {
|
|
2327
|
+
r();
|
|
2880
2328
|
return;
|
|
2881
2329
|
}
|
|
2882
2330
|
if (await this.getDestinationRouteName()) {
|
|
2883
|
-
|
|
2331
|
+
r({ name: await this.getDestinationRouteName() });
|
|
2884
2332
|
return;
|
|
2885
2333
|
}
|
|
2886
|
-
if (await this.getDestinationRouteLocation(e,
|
|
2887
|
-
|
|
2334
|
+
if (await this.getDestinationRouteLocation(e, s)) {
|
|
2335
|
+
r(await this.getDestinationRouteLocation(e, s));
|
|
2888
2336
|
return;
|
|
2889
2337
|
}
|
|
2890
|
-
|
|
2338
|
+
r(!1);
|
|
2891
2339
|
}
|
|
2892
2340
|
async getDestinationRouteName() {
|
|
2893
2341
|
return "";
|
|
2894
2342
|
}
|
|
2895
|
-
async getDestinationRouteLocation(e,
|
|
2343
|
+
async getDestinationRouteLocation(e, s) {
|
|
2896
2344
|
return null;
|
|
2897
2345
|
}
|
|
2898
2346
|
}
|
|
2899
|
-
class
|
|
2900
|
-
constructor(e,
|
|
2901
|
-
this.scheduler = new
|
|
2347
|
+
class Ws {
|
|
2348
|
+
constructor(e, s, r) {
|
|
2349
|
+
this.scheduler = new Je({
|
|
2902
2350
|
runAction: async () => {
|
|
2903
2351
|
await this.fetchList();
|
|
2904
2352
|
}
|
|
2905
|
-
}), this.repository = e, this.crudDataManagement =
|
|
2353
|
+
}), this.repository = e, this.crudDataManagement = s, this.syncDetail = this.repository.getSyncDetail(), this.paramManager = r, this.syncListWithApi();
|
|
2906
2354
|
}
|
|
2907
2355
|
async fetchList() {
|
|
2908
2356
|
const e = await this.repository.fetchList(this.paramManager.getRequestParams());
|
|
2909
2357
|
return this.crudDataManagement.addOrReplaceItems(e.items), this.crudDataManagement.setTotalCount(e.totalItems), e;
|
|
2910
2358
|
}
|
|
2911
2359
|
async fetchItemById(e) {
|
|
2912
|
-
const
|
|
2913
|
-
return
|
|
2360
|
+
const s = await this.repository.fetchItemById(e);
|
|
2361
|
+
return s && this.crudDataManagement.addOrReplaceItems([s]), s;
|
|
2914
2362
|
}
|
|
2915
2363
|
async createItem(e) {
|
|
2916
|
-
const
|
|
2917
|
-
return
|
|
2364
|
+
const s = await this.repository.createItem(e);
|
|
2365
|
+
return s && !this.shouldRefreshListAfterCreate() && this.crudDataManagement.addOrReplaceItems([s]), s && this.shouldRefreshListAfterCreate() && await this.fetchList(), s;
|
|
2918
2366
|
}
|
|
2919
2367
|
shouldRefreshListAfterCreate() {
|
|
2920
2368
|
return !0;
|
|
@@ -2922,16 +2370,16 @@ class Ts {
|
|
|
2922
2370
|
async deleteItem(e) {
|
|
2923
2371
|
return await this.repository.deleteItem(e) ? this.crudDataManagement.removeById(e) : null;
|
|
2924
2372
|
}
|
|
2925
|
-
async updateItem(e,
|
|
2926
|
-
const
|
|
2927
|
-
return this.shouldRefreshListAfterUpdate() &&
|
|
2373
|
+
async updateItem(e, s) {
|
|
2374
|
+
const r = await this.repository.updateItem(e, s);
|
|
2375
|
+
return this.shouldRefreshListAfterUpdate() && r ? (await this.fetchList(), this.crudDataManagement.getItemById(e)) : r;
|
|
2928
2376
|
}
|
|
2929
2377
|
shouldRefreshListAfterUpdate() {
|
|
2930
2378
|
return !0;
|
|
2931
2379
|
}
|
|
2932
2380
|
async removeItem(e) {
|
|
2933
|
-
const
|
|
2934
|
-
return
|
|
2381
|
+
const s = await this.repository.deleteItem(e);
|
|
2382
|
+
return s && this.shouldRefreshListAfterDelete() && await this.fetchList(), s ? this.crudDataManagement.removeById(e) : null;
|
|
2935
2383
|
}
|
|
2936
2384
|
shouldRefreshListAfterDelete() {
|
|
2937
2385
|
return !1;
|
|
@@ -2946,37 +2394,37 @@ class Ts {
|
|
|
2946
2394
|
this.scheduler.clearInterval();
|
|
2947
2395
|
}
|
|
2948
2396
|
}
|
|
2949
|
-
class
|
|
2397
|
+
class Wt {
|
|
2950
2398
|
}
|
|
2951
|
-
class
|
|
2952
|
-
search(e,
|
|
2953
|
-
const
|
|
2399
|
+
class Zs extends Wt {
|
|
2400
|
+
search(e, s, r) {
|
|
2401
|
+
const a = [];
|
|
2954
2402
|
e: for (const i of e)
|
|
2955
|
-
for (const
|
|
2956
|
-
if (
|
|
2957
|
-
|
|
2403
|
+
for (const n of r(i))
|
|
2404
|
+
if (Z.removeSpacesFromString(String(n).toLowerCase()).indexOf(Z.removeSpacesFromString(String(s).toLowerCase())) > -1) {
|
|
2405
|
+
a.push(i);
|
|
2958
2406
|
continue e;
|
|
2959
2407
|
}
|
|
2960
|
-
return
|
|
2408
|
+
return a;
|
|
2961
2409
|
}
|
|
2962
2410
|
}
|
|
2963
|
-
var
|
|
2964
|
-
class
|
|
2411
|
+
var Xe = /* @__PURE__ */ ((t) => (t.Hidden = "hidden", t.Visible = "visible", t))(Xe || {});
|
|
2412
|
+
class Ks {
|
|
2965
2413
|
constructor(e) {
|
|
2966
2414
|
this._visibilityControl = e, this.mangeVisibilityEvent();
|
|
2967
2415
|
}
|
|
2968
2416
|
mangeVisibilityEvent() {
|
|
2969
2417
|
document.addEventListener("visibilitychange", (e) => {
|
|
2970
|
-
document.visibilityState ===
|
|
2418
|
+
document.visibilityState === Xe.Hidden ? this._visibilityControl.screenInvisible(e) : this._visibilityControl.screenVisible(e);
|
|
2971
2419
|
});
|
|
2972
2420
|
}
|
|
2973
2421
|
}
|
|
2974
|
-
var
|
|
2975
|
-
for (var
|
|
2976
|
-
(
|
|
2977
|
-
return
|
|
2422
|
+
var Zt = Object.defineProperty, Kt = Object.getOwnPropertyDescriptor, C = (t, e, s, r) => {
|
|
2423
|
+
for (var a = r > 1 ? void 0 : r ? Kt(e, s) : e, i = t.length - 1, n; i >= 0; i--)
|
|
2424
|
+
(n = t[i]) && (a = (r ? n(e, s, a) : n(a)) || a);
|
|
2425
|
+
return r && a && Zt(e, s, a), a;
|
|
2978
2426
|
};
|
|
2979
|
-
let
|
|
2427
|
+
let ve = class {
|
|
2980
2428
|
constructor() {
|
|
2981
2429
|
this.value = "", this.symbol = "";
|
|
2982
2430
|
}
|
|
@@ -2989,16 +2437,16 @@ let Re = class {
|
|
|
2989
2437
|
});
|
|
2990
2438
|
}
|
|
2991
2439
|
};
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
],
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
],
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
],
|
|
3001
|
-
let
|
|
2440
|
+
C([
|
|
2441
|
+
N("value", String, !0)
|
|
2442
|
+
], ve.prototype, "value", 2);
|
|
2443
|
+
C([
|
|
2444
|
+
N("symbol", String)
|
|
2445
|
+
], ve.prototype, "symbol", 2);
|
|
2446
|
+
ve = C([
|
|
2447
|
+
De("Amount")
|
|
2448
|
+
], ve);
|
|
2449
|
+
let ge = class {
|
|
3002
2450
|
getTable() {
|
|
3003
2451
|
const t = Object.getPrototypeOf(this)._table;
|
|
3004
2452
|
if (!t)
|
|
@@ -3008,54 +2456,54 @@ let Ae = class {
|
|
|
3008
2456
|
return t;
|
|
3009
2457
|
}
|
|
3010
2458
|
};
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
],
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
],
|
|
3017
|
-
let
|
|
2459
|
+
C([
|
|
2460
|
+
N("id", Object)
|
|
2461
|
+
], ge.prototype, "id", 2);
|
|
2462
|
+
ge = C([
|
|
2463
|
+
De("BaseModel")
|
|
2464
|
+
], ge);
|
|
2465
|
+
let K = class extends ge {
|
|
3018
2466
|
};
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
],
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
],
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
],
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
],
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
],
|
|
3034
|
-
class
|
|
3035
|
-
constructor(e,
|
|
3036
|
-
this.requestedDate = e, this.executedDate =
|
|
2467
|
+
C([
|
|
2468
|
+
N("symbol", String)
|
|
2469
|
+
], K.prototype, "symbol", 2);
|
|
2470
|
+
C([
|
|
2471
|
+
N("enName", String)
|
|
2472
|
+
], K.prototype, "enName", 2);
|
|
2473
|
+
C([
|
|
2474
|
+
N("faName", String)
|
|
2475
|
+
], K.prototype, "faName", 2);
|
|
2476
|
+
C([
|
|
2477
|
+
N("image", String)
|
|
2478
|
+
], K.prototype, "image", 2);
|
|
2479
|
+
K = C([
|
|
2480
|
+
De("MinifiedSymbolModel")
|
|
2481
|
+
], K);
|
|
2482
|
+
class Xs {
|
|
2483
|
+
constructor(e, s) {
|
|
2484
|
+
this.requestedDate = e, this.executedDate = s;
|
|
3037
2485
|
}
|
|
3038
2486
|
get requestedDateInJalali() {
|
|
3039
|
-
return
|
|
2487
|
+
return _.mapUnixToDate(this.requestedDate, ee.SimpleDate);
|
|
3040
2488
|
}
|
|
3041
2489
|
get requestedTime() {
|
|
3042
|
-
return
|
|
2490
|
+
return _.mapUnixToDate(this.requestedDate, ee.JustHour);
|
|
3043
2491
|
}
|
|
3044
2492
|
get executedDateInJalali() {
|
|
3045
|
-
return
|
|
2493
|
+
return _.mapUnixToDate(this.executedDate, ee.SimpleDate);
|
|
3046
2494
|
}
|
|
3047
2495
|
get executedDateTime() {
|
|
3048
|
-
return
|
|
2496
|
+
return _.mapUnixToDate(this.executedDate, ee.JustHour);
|
|
3049
2497
|
}
|
|
3050
2498
|
}
|
|
3051
|
-
class
|
|
3052
|
-
constructor(e,
|
|
3053
|
-
this.requestedAmount = e, this.executedAmount =
|
|
2499
|
+
class Qs {
|
|
2500
|
+
constructor(e, s) {
|
|
2501
|
+
this.requestedAmount = e, this.executedAmount = s;
|
|
3054
2502
|
}
|
|
3055
2503
|
}
|
|
3056
|
-
class
|
|
3057
|
-
constructor(e,
|
|
3058
|
-
this.symbolPrice = e, this.USDTPrice =
|
|
2504
|
+
class er {
|
|
2505
|
+
constructor(e, s, r, a, i) {
|
|
2506
|
+
this.symbolPrice = e, this.USDTPrice = s, this.symobl = r, this.symbolImage = a, this.USDTImage = i;
|
|
3059
2507
|
}
|
|
3060
2508
|
get truncatedSymbolPrice() {
|
|
3061
2509
|
return this.symbolPrice.toLocaleString("en-US", {
|
|
@@ -3068,117 +2516,117 @@ class Ns {
|
|
|
3068
2516
|
});
|
|
3069
2517
|
}
|
|
3070
2518
|
}
|
|
3071
|
-
class
|
|
3072
|
-
constructor(e,
|
|
3073
|
-
this.soldSymbol = e, this.buySymbol =
|
|
2519
|
+
class tr {
|
|
2520
|
+
constructor(e, s) {
|
|
2521
|
+
this.soldSymbol = e, this.buySymbol = s;
|
|
3074
2522
|
}
|
|
3075
2523
|
}
|
|
3076
2524
|
export {
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
2525
|
+
Ye as APIErrorHandlerRegistry,
|
|
2526
|
+
Rs as AbstractSubject,
|
|
2527
|
+
ze as AccessControl,
|
|
2528
|
+
se as AccessLevel,
|
|
2529
|
+
bs as Action,
|
|
2530
|
+
ve as Amount,
|
|
2531
|
+
Ys as ApiBuilder,
|
|
2532
|
+
te as ApplicationDrawerStatus,
|
|
2533
|
+
Bs as ApplicationInitializer,
|
|
2534
|
+
Ce as ApplicationTheme,
|
|
2535
|
+
Ge as AuthorizationDirective,
|
|
2536
|
+
Ae as AuthorizationService,
|
|
2537
|
+
ge as BaseModel,
|
|
2538
|
+
Bt as BaseTable,
|
|
3091
2539
|
D as BehaviorSubject,
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
2540
|
+
Me as CellType,
|
|
2541
|
+
Zs as ClientArraySearch,
|
|
2542
|
+
Wt as ClientSearch,
|
|
2543
|
+
Is as Column,
|
|
2544
|
+
be as CommonMaskFormats,
|
|
2545
|
+
Ws as CrudService,
|
|
2546
|
+
W as DateConverter,
|
|
2547
|
+
rs as DateDisabledOptions,
|
|
2548
|
+
ee as DateFormat,
|
|
2549
|
+
it as DateFormats,
|
|
2550
|
+
fe as DateTools,
|
|
2551
|
+
$s as DebounceService,
|
|
2552
|
+
$ as DialogDimensions,
|
|
2553
|
+
as as EveryAccess,
|
|
2554
|
+
ns as EveryLevelAuthorizationDirective,
|
|
2555
|
+
js as Feedback,
|
|
2556
|
+
Os as FetchListResponse,
|
|
2557
|
+
ms as FormManager,
|
|
2558
|
+
me as FormValidationStatus,
|
|
2559
|
+
_ as Formatter,
|
|
2560
|
+
Ls as GColumn,
|
|
2561
|
+
xs as GTable,
|
|
2562
|
+
Vs as HandleError,
|
|
2563
|
+
Fs as HandleFeedback,
|
|
2564
|
+
_e as HeaderType,
|
|
2565
|
+
Ns as HttpClient,
|
|
2566
|
+
hs as InputControl,
|
|
2567
|
+
ds as InputControlBuilder,
|
|
2568
|
+
jt as InputControlData,
|
|
2569
|
+
Ne as JsonMapper,
|
|
2570
|
+
v as LoadingStatus,
|
|
2571
|
+
K as MinifiedSymbolModel,
|
|
2572
|
+
qt as Params,
|
|
2573
|
+
Gs as Process,
|
|
2574
|
+
zs as ProcessManager,
|
|
2575
|
+
ss as RangeValue,
|
|
2576
|
+
Js as RouteGuard,
|
|
2577
|
+
Je as Scheduler,
|
|
2578
|
+
ys as SelectableTable,
|
|
2579
|
+
_s as SelectableTableGenerator,
|
|
2580
|
+
Fe as SimpleSort,
|
|
2581
|
+
is as SomeAccess,
|
|
2582
|
+
os as SomeLevelsAuthorizationDirective,
|
|
2583
|
+
xe as SortDetail,
|
|
2584
|
+
O as SortOrder,
|
|
2585
|
+
$t as SortOrderTableHeader,
|
|
2586
|
+
ps as Sorter,
|
|
2587
|
+
Vt as StatusCode,
|
|
2588
|
+
Y as StorageKeys,
|
|
2589
|
+
Le as StoreNames,
|
|
2590
|
+
tr as SymbolInTrade,
|
|
2591
|
+
er as SymbolPriceInTrade,
|
|
2592
|
+
Ft as Symbols,
|
|
2593
|
+
Es as SyncDetail,
|
|
2594
|
+
gs as TABLE_ACTION_COLUMN,
|
|
2595
|
+
Ze as TABLE_COLUMN_DEFAULT_COLSPAN,
|
|
2596
|
+
Nt as TABLE_COLUMN_DEFAULT_VALUES,
|
|
2597
|
+
We as TABLE_COLUMN_DEFAULT_WIDTH,
|
|
2598
|
+
ws as Table,
|
|
2599
|
+
Cs as TableCellComponentRegistry,
|
|
2600
|
+
Ms as TableConfig,
|
|
2601
|
+
qe as TableConstants,
|
|
2602
|
+
As as TableDestroy,
|
|
2603
|
+
Ut as TableGenerator,
|
|
2604
|
+
Re as TableHeaderAlign,
|
|
2605
|
+
Ds as TableRowClick,
|
|
2606
|
+
Ke as ToastLocation,
|
|
2607
|
+
Us as ToastMessage,
|
|
2608
|
+
Jt as ToastType,
|
|
2609
|
+
fs as TouchSensitiveControl,
|
|
2610
|
+
Qs as TradeAmount,
|
|
2611
|
+
Xs as TradeDate,
|
|
2612
|
+
Z as Util,
|
|
2613
|
+
Ks as VisibilityManager,
|
|
2614
|
+
Xe as VisibilityState,
|
|
2615
|
+
rt as cards,
|
|
2616
|
+
Ss as generateHeader,
|
|
2617
|
+
at as ibans,
|
|
2618
|
+
Yt as isEmpty,
|
|
2619
|
+
cs as isLastItem,
|
|
2620
|
+
ls as isOnlyOneItem,
|
|
2621
|
+
Pt as setupJalaliDate,
|
|
2622
|
+
us as setupStore,
|
|
2623
|
+
Ps as useCrud,
|
|
2624
|
+
Ht as useData,
|
|
2625
|
+
Hs as useDialogService,
|
|
2626
|
+
qs as useDrawerService,
|
|
2627
|
+
vs as useForm,
|
|
2628
|
+
Gt as useLoadingStatus,
|
|
2629
|
+
zt as useParams,
|
|
2630
|
+
ks as useRepository,
|
|
2631
|
+
Ts as useStaticTableService
|
|
3184
2632
|
};
|