sprof 1.22.6 → 1.22.8
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/sprof.js
CHANGED
|
@@ -2,7 +2,7 @@ var $c = Object.defineProperty;
|
|
|
2
2
|
var Tc = (t, e, n) => e in t ? $c(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var u = (t, e, n) => Tc(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
import { Notify as sa, Dialog as oa, QBtn as vn, QItemLabel as qs, QTooltip as xr, QInput as as, QMenu as Ta, QList as Ei, QItem as Bn, QItemSection as hn, QIcon as re, QSeparator as Zi, QDialog as Pc, QCard as Xt, QCardSection as kt, QCardActions as ti, ClosePopup as Wn, QSpace as _n, QSlideTransition as Rc, QCheckbox as Ic, QPopupProxy as Ci, QDate as Ks, date as Jn, QSelect as Mc, QToggle as gl, QRadio as Ac, QUploader as Ec, QUploaderAddTrigger as Fc, QImg as Oc, QSpinner as vl, QBadge as yl, QTime as bl, QTabs as wl, QTab as Sl, QTd as wn, QScrollArea as Dc, QSpinnerDots as zc, QTable as Lc, QTr as $r, QInnerLoading as Vc, QTh as Tr, QTabPanels as Cl, QTabPanel as kl, QSplitter as _c, QChip as Uc, QForm as Bc, QCarousel as qc, QCarouselSlide as Nc, Ripple as Hc, Quasar as jc } from "quasar";
|
|
5
|
-
import { reactive as ht, ref as O, openBlock as m, createElementBlock as S, createElementVNode as y, onBeforeMount as Sn, computed as D, defineComponent as j, useAttrs as an, createBlock as z, unref as f, mergeProps as at, withCtx as C, renderSlot as N, createTextVNode as be, toDisplayString as U, normalizeClass as ve, createVNode as g, normalizeStyle as J, useModel as
|
|
5
|
+
import { reactive as ht, ref as O, openBlock as m, createElementBlock as S, createElementVNode as y, onBeforeMount as Sn, computed as D, defineComponent as j, useAttrs as an, createBlock as z, unref as f, mergeProps as at, withCtx as C, renderSlot as N, createTextVNode as be, toDisplayString as U, normalizeClass as ve, createVNode as g, normalizeStyle as J, useModel as vt, createSlots as di, mergeModels as De, resolveDirective as Pa, withDirectives as Je, Fragment as K, createCommentVNode as G, watch as Ae, isRef as Ie, TransitionGroup as xl, renderList as we, withModifiers as Ye, vShow as eo, inject as Gc, getCurrentInstance as Wc, provide as Yc, normalizeProps as Os, guardReactiveProps as Ds, nextTick as Ji, resolveComponent as Me, resolveDynamicComponent as Rn, onMounted as Fi, onBeforeUnmount as rs, withKeys as Ns, mergeDefaults as Qc, markRaw as Xc, useCssVars as $l, createStaticVNode as Tl, onUpdated as Zc, useTemplateRef as Jc, onUnmounted as Kc, defineAsyncComponent as ef, getCurrentScope as Pl, onScopeDispose as Rl } from "vue";
|
|
6
6
|
import { onBeforeRouteLeave as tf, useRouter as nf } from "vue-router";
|
|
7
7
|
import si from "vuedraggable";
|
|
8
8
|
var Et = /* @__PURE__ */ ((t) => (t.Login = "login", t.Register = "register", t.Restore = "restore", t.Refresh = "refresh", t))(Et || {}), Be = /* @__PURE__ */ ((t) => (t.Primary = "primary", t.Success = "success", t.Warning = "warning", t.Error = "error", t.Info = "info", t))(Be || {});
|
|
@@ -687,19 +687,19 @@ var Mr;
|
|
|
687
687
|
}, h = Object.getPrototypeOf(Function), p = typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : Ro(), b = typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : Io(), k = typeof WeakMap == "function" ? WeakMap : ws(), P = s ? Symbol.for("@reflect-metadata:registry") : void 0, E = Ui(), T = ci(E);
|
|
688
688
|
function M(F, _, H, ne) {
|
|
689
689
|
if (oe(H)) {
|
|
690
|
-
if (!
|
|
690
|
+
if (!pt(F))
|
|
691
691
|
throw new TypeError();
|
|
692
692
|
if (!An(_))
|
|
693
693
|
throw new TypeError();
|
|
694
|
-
return
|
|
694
|
+
return Ke(F, _);
|
|
695
695
|
} else {
|
|
696
|
-
if (!
|
|
696
|
+
if (!pt(F))
|
|
697
697
|
throw new TypeError();
|
|
698
698
|
if (!We(_))
|
|
699
699
|
throw new TypeError();
|
|
700
700
|
if (!We(ne) && !oe(ne) && !ut(ne))
|
|
701
701
|
throw new TypeError();
|
|
702
|
-
return ut(ne) && (ne = void 0), H = Oe(H),
|
|
702
|
+
return ut(ne) && (ne = void 0), H = Oe(H), mt(F, _, H, ne);
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
705
|
e("decorate", M);
|
|
@@ -723,7 +723,7 @@ var Mr;
|
|
|
723
723
|
function $(F, _, H) {
|
|
724
724
|
if (!We(_))
|
|
725
725
|
throw new TypeError();
|
|
726
|
-
return oe(H) || (H = Oe(H)),
|
|
726
|
+
return oe(H) || (H = Oe(H)), Xe(F, _, H);
|
|
727
727
|
}
|
|
728
728
|
e("hasMetadata", $);
|
|
729
729
|
function B(F, _, H) {
|
|
@@ -741,7 +741,7 @@ var Mr;
|
|
|
741
741
|
function L(F, _, H) {
|
|
742
742
|
if (!We(_))
|
|
743
743
|
throw new TypeError();
|
|
744
|
-
return oe(H) || (H = Oe(H)),
|
|
744
|
+
return oe(H) || (H = Oe(H)), Vt(F, _, H);
|
|
745
745
|
}
|
|
746
746
|
e("getOwnMetadata", L);
|
|
747
747
|
function Q(F, _) {
|
|
@@ -762,7 +762,7 @@ var Mr;
|
|
|
762
762
|
if (oe(H) || (H = Oe(H)), !We(_))
|
|
763
763
|
throw new TypeError();
|
|
764
764
|
oe(H) || (H = Oe(H));
|
|
765
|
-
var ne =
|
|
765
|
+
var ne = Ze(
|
|
766
766
|
_,
|
|
767
767
|
H,
|
|
768
768
|
/*Create*/
|
|
@@ -771,7 +771,7 @@ var Mr;
|
|
|
771
771
|
return oe(ne) ? !1 : ne.OrdinaryDeleteMetadata(F, _, H);
|
|
772
772
|
}
|
|
773
773
|
e("deleteMetadata", ke);
|
|
774
|
-
function
|
|
774
|
+
function Ke(F, _) {
|
|
775
775
|
for (var H = F.length - 1; H >= 0; --H) {
|
|
776
776
|
var ne = F[H], pe = ne(_);
|
|
777
777
|
if (!oe(pe) && !ut(pe)) {
|
|
@@ -782,26 +782,26 @@ var Mr;
|
|
|
782
782
|
}
|
|
783
783
|
return _;
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function mt(F, _, H, ne) {
|
|
786
786
|
for (var pe = F.length - 1; pe >= 0; --pe) {
|
|
787
|
-
var ot = F[pe],
|
|
788
|
-
if (!oe(
|
|
789
|
-
if (!We(
|
|
787
|
+
var ot = F[pe], et = ot(_, H, ne);
|
|
788
|
+
if (!oe(et) && !ut(et)) {
|
|
789
|
+
if (!We(et))
|
|
790
790
|
throw new TypeError();
|
|
791
|
-
ne =
|
|
791
|
+
ne = et;
|
|
792
792
|
}
|
|
793
793
|
}
|
|
794
794
|
return ne;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function Xe(F, _, H) {
|
|
797
797
|
var ne = rt(F, _, H);
|
|
798
798
|
if (ne)
|
|
799
799
|
return !0;
|
|
800
800
|
var pe = Qn(_);
|
|
801
|
-
return ut(pe) ? !1 :
|
|
801
|
+
return ut(pe) ? !1 : Xe(F, pe, H);
|
|
802
802
|
}
|
|
803
803
|
function rt(F, _, H) {
|
|
804
|
-
var ne =
|
|
804
|
+
var ne = Ze(
|
|
805
805
|
_,
|
|
806
806
|
H,
|
|
807
807
|
/*Create*/
|
|
@@ -812,13 +812,13 @@ var Mr;
|
|
|
812
812
|
function lt(F, _, H) {
|
|
813
813
|
var ne = rt(F, _, H);
|
|
814
814
|
if (ne)
|
|
815
|
-
return
|
|
815
|
+
return Vt(F, _, H);
|
|
816
816
|
var pe = Qn(_);
|
|
817
817
|
if (!ut(pe))
|
|
818
818
|
return lt(F, pe, H);
|
|
819
819
|
}
|
|
820
|
-
function
|
|
821
|
-
var ne =
|
|
820
|
+
function Vt(F, _, H) {
|
|
821
|
+
var ne = Ze(
|
|
822
822
|
_,
|
|
823
823
|
H,
|
|
824
824
|
/*Create*/
|
|
@@ -828,7 +828,7 @@ var Mr;
|
|
|
828
828
|
return ne.OrdinaryGetOwnMetadata(F, _, H);
|
|
829
829
|
}
|
|
830
830
|
function yt(F, _, H, ne) {
|
|
831
|
-
var pe =
|
|
831
|
+
var pe = Ze(
|
|
832
832
|
H,
|
|
833
833
|
ne,
|
|
834
834
|
/*Create*/
|
|
@@ -845,18 +845,18 @@ var Mr;
|
|
|
845
845
|
return H;
|
|
846
846
|
if (H.length <= 0)
|
|
847
847
|
return pe;
|
|
848
|
-
for (var ot = new b(),
|
|
848
|
+
for (var ot = new b(), et = [], $e = 0, ie = H; $e < ie.length; $e++) {
|
|
849
849
|
var ae = ie[$e], le = ot.has(ae);
|
|
850
|
-
le || (ot.add(ae),
|
|
850
|
+
le || (ot.add(ae), et.push(ae));
|
|
851
851
|
}
|
|
852
852
|
for (var de = 0, Te = pe; de < Te.length; de++) {
|
|
853
853
|
var ae = Te[de], le = ot.has(ae);
|
|
854
|
-
le || (ot.add(ae),
|
|
854
|
+
le || (ot.add(ae), et.push(ae));
|
|
855
855
|
}
|
|
856
|
-
return
|
|
856
|
+
return et;
|
|
857
857
|
}
|
|
858
858
|
function Dt(F, _) {
|
|
859
|
-
var H =
|
|
859
|
+
var H = Ze(
|
|
860
860
|
F,
|
|
861
861
|
_,
|
|
862
862
|
/*create*/
|
|
@@ -864,7 +864,7 @@ var Mr;
|
|
|
864
864
|
);
|
|
865
865
|
return H ? H.OrdinaryOwnMetadataKeys(F, _) : [];
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function Ue(F) {
|
|
868
868
|
if (F === null)
|
|
869
869
|
return 1;
|
|
870
870
|
switch (typeof F) {
|
|
@@ -897,7 +897,7 @@ var Mr;
|
|
|
897
897
|
return typeof F == "object" ? F !== null : typeof F == "function";
|
|
898
898
|
}
|
|
899
899
|
function Z(F, _) {
|
|
900
|
-
switch (
|
|
900
|
+
switch (Ue(F)) {
|
|
901
901
|
case 0:
|
|
902
902
|
return F;
|
|
903
903
|
case 1:
|
|
@@ -948,7 +948,7 @@ var Mr;
|
|
|
948
948
|
var _ = Z(F);
|
|
949
949
|
return en(_) ? _ : me(_);
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function pt(F) {
|
|
952
952
|
return Array.isArray ? Array.isArray(F) : F instanceof Object ? F instanceof Array : Object.prototype.toString.call(F) === "[object Array]";
|
|
953
953
|
}
|
|
954
954
|
function bt(F) {
|
|
@@ -958,7 +958,7 @@ var Mr;
|
|
|
958
958
|
return typeof F == "function";
|
|
959
959
|
}
|
|
960
960
|
function En(F) {
|
|
961
|
-
switch (
|
|
961
|
+
switch (Ue(F)) {
|
|
962
962
|
case 3:
|
|
963
963
|
return !0;
|
|
964
964
|
case 4:
|
|
@@ -987,14 +987,14 @@ var Mr;
|
|
|
987
987
|
throw new TypeError();
|
|
988
988
|
return H;
|
|
989
989
|
}
|
|
990
|
-
function
|
|
990
|
+
function _t(F) {
|
|
991
991
|
return F.value;
|
|
992
992
|
}
|
|
993
993
|
function jt(F) {
|
|
994
994
|
var _ = F.next();
|
|
995
995
|
return _.done ? !1 : _;
|
|
996
996
|
}
|
|
997
|
-
function
|
|
997
|
+
function Ut(F) {
|
|
998
998
|
var _ = F.return;
|
|
999
999
|
_ && _.call(F);
|
|
1000
1000
|
}
|
|
@@ -1012,12 +1012,12 @@ var Mr;
|
|
|
1012
1012
|
var F;
|
|
1013
1013
|
!oe(P) && typeof n.Reflect < "u" && !(P in n.Reflect) && typeof n.Reflect.defineMetadata == "function" && (F = Po(n.Reflect));
|
|
1014
1014
|
var _, H, ne, pe = new k(), ot = {
|
|
1015
|
-
registerProvider:
|
|
1015
|
+
registerProvider: et,
|
|
1016
1016
|
getProvider: ie,
|
|
1017
1017
|
setProvider: le
|
|
1018
1018
|
};
|
|
1019
1019
|
return ot;
|
|
1020
|
-
function
|
|
1020
|
+
function et(de) {
|
|
1021
1021
|
if (!Object.isExtensible(ot))
|
|
1022
1022
|
throw new Error("Cannot add provider to a frozen registry.");
|
|
1023
1023
|
switch (!0) {
|
|
@@ -1050,9 +1050,9 @@ var Mr;
|
|
|
1050
1050
|
var je = jt(He);
|
|
1051
1051
|
if (!je)
|
|
1052
1052
|
return;
|
|
1053
|
-
var St =
|
|
1053
|
+
var St = _t(je);
|
|
1054
1054
|
if (St.isProviderFor(de, Te))
|
|
1055
|
-
return
|
|
1055
|
+
return Ut(He), St;
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
@@ -1096,7 +1096,7 @@ var Mr;
|
|
|
1096
1096
|
var de = _.get(ae);
|
|
1097
1097
|
return oe(de) ? !1 : de.has(le);
|
|
1098
1098
|
},
|
|
1099
|
-
OrdinaryDefineOwnMetadata:
|
|
1099
|
+
OrdinaryDefineOwnMetadata: et,
|
|
1100
1100
|
OrdinaryHasOwnMetadata: pe,
|
|
1101
1101
|
OrdinaryGetOwnMetadata: ot,
|
|
1102
1102
|
OrdinaryOwnMetadataKeys: $e,
|
|
@@ -1138,7 +1138,7 @@ var Mr;
|
|
|
1138
1138
|
if (!oe(Te))
|
|
1139
1139
|
return Te.get(ae);
|
|
1140
1140
|
}
|
|
1141
|
-
function
|
|
1141
|
+
function et(ae, le, de, Te) {
|
|
1142
1142
|
var He = ne(
|
|
1143
1143
|
de,
|
|
1144
1144
|
Te,
|
|
@@ -1160,12 +1160,12 @@ var Mr;
|
|
|
1160
1160
|
var Ss = jt(je);
|
|
1161
1161
|
if (!Ss)
|
|
1162
1162
|
return de.length = St, de;
|
|
1163
|
-
var Cs =
|
|
1163
|
+
var Cs = _t(Ss);
|
|
1164
1164
|
try {
|
|
1165
1165
|
de[St] = Cs;
|
|
1166
1166
|
} catch (Mo) {
|
|
1167
1167
|
try {
|
|
1168
|
-
|
|
1168
|
+
Ut(je);
|
|
1169
1169
|
} finally {
|
|
1170
1170
|
throw Mo;
|
|
1171
1171
|
}
|
|
@@ -1190,10 +1190,10 @@ var Mr;
|
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
1192
1192
|
function Po(F) {
|
|
1193
|
-
var _ = F.defineMetadata, H = F.hasOwnMetadata, ne = F.getOwnMetadata, pe = F.getOwnMetadataKeys, ot = F.deleteMetadata,
|
|
1193
|
+
var _ = F.defineMetadata, H = F.hasOwnMetadata, ne = F.getOwnMetadata, pe = F.getOwnMetadataKeys, ot = F.deleteMetadata, et = new k(), $e = {
|
|
1194
1194
|
isProviderFor: function(ie, ae) {
|
|
1195
|
-
var le =
|
|
1196
|
-
return !oe(le) && le.has(ae) ? !0 : pe(ie, ae).length ? (oe(le) && (le = new b(),
|
|
1195
|
+
var le = et.get(ie);
|
|
1196
|
+
return !oe(le) && le.has(ae) ? !0 : pe(ie, ae).length ? (oe(le) && (le = new b(), et.set(ie, le)), le.add(ae), !0) : !1;
|
|
1197
1197
|
},
|
|
1198
1198
|
OrdinaryDefineOwnMetadata: _,
|
|
1199
1199
|
OrdinaryHasOwnMetadata: H,
|
|
@@ -1203,7 +1203,7 @@ var Mr;
|
|
|
1203
1203
|
};
|
|
1204
1204
|
return $e;
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1206
|
+
function Ze(F, _, H) {
|
|
1207
1207
|
var ne = E.getProvider(F, _);
|
|
1208
1208
|
if (!oe(ne))
|
|
1209
1209
|
return ne;
|
|
@@ -1288,7 +1288,7 @@ var Mr;
|
|
|
1288
1288
|
}, $e.prototype.values = function() {
|
|
1289
1289
|
return new H(this._keys, this._values, ot);
|
|
1290
1290
|
}, $e.prototype.entries = function() {
|
|
1291
|
-
return new H(this._keys, this._values,
|
|
1291
|
+
return new H(this._keys, this._values, et);
|
|
1292
1292
|
}, $e.prototype["@@iterator"] = function() {
|
|
1293
1293
|
return this.entries();
|
|
1294
1294
|
}, $e.prototype[a] = function() {
|
|
@@ -1313,7 +1313,7 @@ var Mr;
|
|
|
1313
1313
|
function ot($e, ie) {
|
|
1314
1314
|
return ie;
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1316
|
+
function et($e, ie) {
|
|
1317
1317
|
return [$e, ie];
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
@@ -1414,7 +1414,7 @@ var Mr;
|
|
|
1414
1414
|
ie[le] = Math.random() * 255 | 0;
|
|
1415
1415
|
return ie;
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1417
|
+
function et(ie) {
|
|
1418
1418
|
if (typeof Uint8Array == "function") {
|
|
1419
1419
|
var ae = new Uint8Array(ie);
|
|
1420
1420
|
return typeof crypto < "u" ? crypto.getRandomValues(ae) : typeof msCrypto < "u" ? msCrypto.getRandomValues(ae) : ot(ae, ie), ae;
|
|
@@ -1422,7 +1422,7 @@ var Mr;
|
|
|
1422
1422
|
return ot(new Array(ie), ie);
|
|
1423
1423
|
}
|
|
1424
1424
|
function $e() {
|
|
1425
|
-
var ie =
|
|
1425
|
+
var ie = et(F);
|
|
1426
1426
|
ie[6] = ie[6] & 79 | 64, ie[8] = ie[8] & 191 | 128;
|
|
1427
1427
|
for (var ae = "", le = 0; le < F; ++le) {
|
|
1428
1428
|
var de = ie[le];
|
|
@@ -1457,7 +1457,7 @@ function Cf(t, e, n) {
|
|
|
1457
1457
|
throw new Error("Random bytes length must be >= 16");
|
|
1458
1458
|
return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, bf(i);
|
|
1459
1459
|
}
|
|
1460
|
-
class
|
|
1460
|
+
class Lt {
|
|
1461
1461
|
static UUID() {
|
|
1462
1462
|
return Hn();
|
|
1463
1463
|
}
|
|
@@ -1672,7 +1672,7 @@ const Tn = class Tn {
|
|
|
1672
1672
|
}
|
|
1673
1673
|
static InitClassInstance(e, n) {
|
|
1674
1674
|
const i = e.constructor(n);
|
|
1675
|
-
return Tn.BuildClass(i), i.id =
|
|
1675
|
+
return Tn.BuildClass(i), i.id = Lt.UUID(), i;
|
|
1676
1676
|
}
|
|
1677
1677
|
static ExistsWithId(e, n) {
|
|
1678
1678
|
return e.some((i) => i.id === n);
|
|
@@ -1708,7 +1708,7 @@ let Ce = Tn, es = class Fl {
|
|
|
1708
1708
|
}
|
|
1709
1709
|
static Create() {
|
|
1710
1710
|
const e = new Fl();
|
|
1711
|
-
return e.id =
|
|
1711
|
+
return e.id = Lt.UUID(), e;
|
|
1712
1712
|
}
|
|
1713
1713
|
};
|
|
1714
1714
|
const Bo = "/api/static";
|
|
@@ -1776,10 +1776,10 @@ class Nt {
|
|
|
1776
1776
|
}
|
|
1777
1777
|
static CreatePreviewFile(e, n) {
|
|
1778
1778
|
const i = new Nt();
|
|
1779
|
-
return i.id = n ??
|
|
1779
|
+
return i.id = n ?? Lt.UUID(), i.originalName = e.name, i.file = e.blob, i.fileSystemPath = Lt.UUID(), i;
|
|
1780
1780
|
}
|
|
1781
1781
|
setFile(e) {
|
|
1782
|
-
this.id || (this.id =
|
|
1782
|
+
this.id || (this.id = Lt.UUID()), this.originalName = e.name, this.file = e, this.fileSystemPath = Lt.UUID(), this.url = e.src;
|
|
1783
1783
|
}
|
|
1784
1784
|
clearFile() {
|
|
1785
1785
|
this.url = "", this.file = void 0, this.fileSystemPath = "", this.originalName = "";
|
|
@@ -1851,7 +1851,7 @@ class oi {
|
|
|
1851
1851
|
}
|
|
1852
1852
|
static Create() {
|
|
1853
1853
|
const e = new oi();
|
|
1854
|
-
return e.id =
|
|
1854
|
+
return e.id = Lt.UUID(), e;
|
|
1855
1855
|
}
|
|
1856
1856
|
}
|
|
1857
1857
|
class js {
|
|
@@ -1872,7 +1872,7 @@ class so {
|
|
|
1872
1872
|
}
|
|
1873
1873
|
static Create() {
|
|
1874
1874
|
const e = new so();
|
|
1875
|
-
return e.id =
|
|
1875
|
+
return e.id = Lt.UUID(), e;
|
|
1876
1876
|
}
|
|
1877
1877
|
}
|
|
1878
1878
|
class Ia {
|
|
@@ -1931,7 +1931,7 @@ class yn {
|
|
|
1931
1931
|
e[n].order = n + 1, e[n + 1] && (e[n + 1].order = n), [e[n], e[n + 1]] = [e[n + 1], e[n]];
|
|
1932
1932
|
}
|
|
1933
1933
|
}
|
|
1934
|
-
var
|
|
1934
|
+
var Ee = /* @__PURE__ */ ((t) => (t.Date = "date", t.String = "string", t.Boolean = "boolean", t.Number = "number", t.Set = "set", t.Join = "join", t.ArrayString = "arrayString", t.ArrayNumber = "arrayNumber", t))(Ee || {}), Qe = /* @__PURE__ */ ((t) => (t.Eq = "=", t.Ne = "!=", t.Gt = ">", t.Lt = "<", t.Btw = "between", t.In = "in", t.Like = "like", t.Null = "is null", t.NotNull = "is not null", t))(Qe || {}), $f = Object.defineProperty, Tf = (t, e, n, i) => {
|
|
1935
1935
|
for (var s = void 0, o = t.length - 1, a; o >= 0; o--)
|
|
1936
1936
|
(a = t[o]) && (s = a(e, n, s) || s);
|
|
1937
1937
|
return s && $f(e, n, s), s;
|
|
@@ -1942,13 +1942,13 @@ const Dl = class Hi {
|
|
|
1942
1942
|
u(this, "model", "");
|
|
1943
1943
|
u(this, "label", "");
|
|
1944
1944
|
u(this, "col", "");
|
|
1945
|
-
u(this, "operator",
|
|
1945
|
+
u(this, "operator", Qe.Eq);
|
|
1946
1946
|
u(this, "date1");
|
|
1947
1947
|
u(this, "date2");
|
|
1948
1948
|
u(this, "value1", "");
|
|
1949
1949
|
u(this, "boolean", !1);
|
|
1950
1950
|
u(this, "number", 0);
|
|
1951
|
-
u(this, "type",
|
|
1951
|
+
u(this, "type", Ee.String);
|
|
1952
1952
|
u(this, "set", []);
|
|
1953
1953
|
u(this, "isSet", !1);
|
|
1954
1954
|
/**
|
|
@@ -1967,17 +1967,17 @@ const Dl = class Hi {
|
|
|
1967
1967
|
eq(e) {
|
|
1968
1968
|
if (!e)
|
|
1969
1969
|
return !1;
|
|
1970
|
-
if (this.type ===
|
|
1970
|
+
if (this.type === Ee.Join) {
|
|
1971
1971
|
const n = e.model === this.model && e.operator === this.operator && this.joinTableModel === e.joinTableModel;
|
|
1972
|
-
return e.operator ===
|
|
1972
|
+
return e.operator === Qe.In ? n && yn.Eq(this.set, e.set) : n;
|
|
1973
1973
|
}
|
|
1974
1974
|
return e.model === this.model && e.col === this.col && e.operator === this.operator;
|
|
1975
1975
|
}
|
|
1976
1976
|
valueEq(e) {
|
|
1977
|
-
return !this || !e || !this.eq(e) ? !1 : this.type ===
|
|
1977
|
+
return !this || !e || !this.eq(e) ? !1 : this.type === Ee.Boolean ? this.boolean === (e == null ? void 0 : e.boolean) : this.type === Ee.String ? this.value1 === (e == null ? void 0 : e.value1) : this.type === Ee.Join && this.set.length ? yn.Eq(this.set, e.set) : !1;
|
|
1978
1978
|
}
|
|
1979
1979
|
toUrlQuery() {
|
|
1980
|
-
const e = this.type ? `"type":"${this.type}"` : "", n = this.group ? `"group":${this.group}` : "", i = this.model ? `"model":"${this.model}"` : "", s = this.col ? `"col":"${this.col}"` : "", o = this.operator ? `"operator":"${this.operator}"` : "", a = this.value1 ? `"value1":"${this.value1}"` : "", l = this.type ===
|
|
1980
|
+
const e = this.type ? `"type":"${this.type}"` : "", n = this.group ? `"group":${this.group}` : "", i = this.model ? `"model":"${this.model}"` : "", s = this.col ? `"col":"${this.col}"` : "", o = this.operator ? `"operator":"${this.operator}"` : "", a = this.value1 ? `"value1":"${this.value1}"` : "", l = this.type === Ee.Boolean ? `"boolean":${this.boolean}` : "", r = this.type === Ee.Date && this.date1 ? `"date1":"${this.date1.toISOString()}"` : "", d = this.type === Ee.Date && this.date2 ? `"date2":"${this.date2.toISOString()}"` : "", c = this.type === Ee.Number ? `"number":${this.number}` : "", h = this.type === Ee.Set || this.operator === Qe.In ? `"set":${JSON.stringify(this.set)}` : "", p = this.type === Ee.Join ? `"joinTableModel":"${this.joinTableModel}"` : "";
|
|
1981
1981
|
return [e, i, s, o, a, l, r, d, c, h, p, n].filter((b) => b !== "").toString();
|
|
1982
1982
|
}
|
|
1983
1983
|
/**
|
|
@@ -1987,17 +1987,17 @@ const Dl = class Hi {
|
|
|
1987
1987
|
* (это использует `SearchStore`).
|
|
1988
1988
|
*/
|
|
1989
1989
|
isUnaryFilter() {
|
|
1990
|
-
return this.operator ===
|
|
1990
|
+
return this.operator === Qe.Eq || this.operator === Qe.Gt || this.operator === Qe.Lt;
|
|
1991
1991
|
}
|
|
1992
1992
|
isBetweenFilter() {
|
|
1993
|
-
return this.operator ===
|
|
1993
|
+
return this.operator === Qe.Btw;
|
|
1994
1994
|
}
|
|
1995
1995
|
isSetFilter() {
|
|
1996
|
-
return this.operator ===
|
|
1996
|
+
return this.operator === Qe.In;
|
|
1997
1997
|
}
|
|
1998
1998
|
static Create(e, n, i) {
|
|
1999
1999
|
const s = new Hi();
|
|
2000
|
-
return s.model = e.GetClassName(), s.col = n ?? "", s.type = i, s.type ===
|
|
2000
|
+
return s.model = e.GetClassName(), s.col = n ?? "", s.type = i, s.type === Ee.Number && (s.value1 = "0"), s.type === Ee.String && (s.value1 = ""), s.type === Ee.Boolean && (s.value1 = "false", s.operator = Qe.Eq), s;
|
|
2001
2001
|
}
|
|
2002
2002
|
static CreateFilterModelWithJoin(e, n, i, s, o, a, l, r) {
|
|
2003
2003
|
const d = new Hi();
|
|
@@ -2005,11 +2005,11 @@ const Dl = class Hi {
|
|
|
2005
2005
|
}
|
|
2006
2006
|
static CreateFilterModelWithJoinV2(e, n, i, s, o, a, l) {
|
|
2007
2007
|
const r = new Hi();
|
|
2008
|
-
return r.model = e, r.joinTableModel = i, r.joinTablePk = s, r.joinTableFk = o, r.col = n, r.type =
|
|
2008
|
+
return r.model = e, r.joinTableModel = i, r.joinTablePk = s, r.joinTableFk = o, r.col = n, r.type = Ee.Join, a && (r.joinTableId = a), l && (r.joinTableIdCol = l), r;
|
|
2009
2009
|
}
|
|
2010
2010
|
static OnlyIfSecondModelExists(e, n) {
|
|
2011
2011
|
const i = new Hi();
|
|
2012
|
-
return i.id = Hn(), i.model = nt.ToCamelCase(e.GetClassName()), i.joinTableModel = nt.ToCamelCase(n.GetClassName()), i.type =
|
|
2012
|
+
return i.id = Hn(), i.model = nt.ToCamelCase(e.GetClassName()), i.joinTableModel = nt.ToCamelCase(n.GetClassName()), i.type = Ee.Join, i;
|
|
2013
2013
|
}
|
|
2014
2014
|
addToSet(...e) {
|
|
2015
2015
|
e.forEach((n) => {
|
|
@@ -2049,10 +2049,10 @@ const Dl = class Hi {
|
|
|
2049
2049
|
return;
|
|
2050
2050
|
}
|
|
2051
2051
|
if (!n) {
|
|
2052
|
-
this.setDate1(e), this.operator =
|
|
2052
|
+
this.setDate1(e), this.operator = Qe.Eq;
|
|
2053
2053
|
return;
|
|
2054
2054
|
}
|
|
2055
|
-
this.setDate2(n), this.operator =
|
|
2055
|
+
this.setDate2(n), this.operator = Qe.Btw;
|
|
2056
2056
|
}
|
|
2057
2057
|
};
|
|
2058
2058
|
Tf([
|
|
@@ -2061,7 +2061,7 @@ Tf([
|
|
|
2061
2061
|
let Ma = Dl;
|
|
2062
2062
|
class Pf {
|
|
2063
2063
|
constructor() {
|
|
2064
|
-
u(this, "operation",
|
|
2064
|
+
u(this, "operation", Qe.Lt);
|
|
2065
2065
|
u(this, "column", "");
|
|
2066
2066
|
u(this, "value");
|
|
2067
2067
|
u(this, "initial", !0);
|
|
@@ -2100,10 +2100,10 @@ class ts {
|
|
|
2100
2100
|
Ce.BuildClass(this, e);
|
|
2101
2101
|
}
|
|
2102
2102
|
setLoadMore(e, n, i) {
|
|
2103
|
-
this.cursor.value = e, this.cursor.initial = !1, this.cursor.operation =
|
|
2103
|
+
this.cursor.value = e, this.cursor.initial = !1, this.cursor.operation = Qe.Gt, this.cursor.column = n, this.cursor.tableName = i, this.cursorMode = !0;
|
|
2104
2104
|
}
|
|
2105
2105
|
setLoadMoreV2(e, n, i) {
|
|
2106
|
-
this.cursor.value = e, this.cursor.initial = !1, this.cursor.operation =
|
|
2106
|
+
this.cursor.value = e, this.cursor.initial = !1, this.cursor.operation = Qe.Gt, this.cursor.column = n, this.cursor.model = i, this.cursorMode = !0, this.version = "v2";
|
|
2107
2107
|
}
|
|
2108
2108
|
setOffset(e) {
|
|
2109
2109
|
this.offset = e;
|
|
@@ -2186,8 +2186,8 @@ var Rf = Object.defineProperty, ao = (t, e, n, i) => {
|
|
|
2186
2186
|
for (var s = void 0, o = t.length - 1, a; o >= 0; o--)
|
|
2187
2187
|
(a = t[o]) && (s = a(e, n, s) || s);
|
|
2188
2188
|
return s && Rf(e, n, s), s;
|
|
2189
|
-
},
|
|
2190
|
-
const us = (
|
|
2189
|
+
}, zt;
|
|
2190
|
+
const us = (zt = class {
|
|
2191
2191
|
constructor(e) {
|
|
2192
2192
|
u(this, "id");
|
|
2193
2193
|
u(this, "f", []);
|
|
@@ -2197,7 +2197,7 @@ const us = (Ut = class {
|
|
|
2197
2197
|
Ce.BuildClass(this, e);
|
|
2198
2198
|
}
|
|
2199
2199
|
static Get() {
|
|
2200
|
-
return this.instance || (this.instance =
|
|
2200
|
+
return this.instance || (this.instance = zt.create()), this.instance;
|
|
2201
2201
|
}
|
|
2202
2202
|
/**
|
|
2203
2203
|
* Фабрика (Т1 TECH_DEBT): реактивный экземпляр на страницу/компонент.
|
|
@@ -2207,15 +2207,26 @@ const us = (Ut = class {
|
|
|
2207
2207
|
* чтобы фильтры/пагинация не «перетекали» между разделами.
|
|
2208
2208
|
*/
|
|
2209
2209
|
static create() {
|
|
2210
|
-
return ht(new
|
|
2210
|
+
return ht(new zt());
|
|
2211
2211
|
}
|
|
2212
2212
|
createFrom(e) {
|
|
2213
|
-
const n = new
|
|
2213
|
+
const n = new zt(JSON.parse(e));
|
|
2214
2214
|
this.f = n.f;
|
|
2215
2215
|
}
|
|
2216
2216
|
clearForHTTP() {
|
|
2217
|
-
const e = new
|
|
2218
|
-
return e.f = this.f.map((n) =>
|
|
2217
|
+
const e = new zt(this);
|
|
2218
|
+
return e.f = this.f.filter((n) => !!n && !zt.isEmptyFilter(n)).map((n) => zt.EmptyEntiries(n)), e.s = this.s.map((n) => zt.EmptyEntiries(n)), e.p = zt.EmptyEntiries(this.p), e.t = zt.EmptyEntiries(this.t), e;
|
|
2219
|
+
}
|
|
2220
|
+
/**
|
|
2221
|
+
* Фильтр ничего не отбирает — в запрос не идёт.
|
|
2222
|
+
*
|
|
2223
|
+
* `is null` / `is not null` — значимы ВСЕГДА (у них нет значения). Остальные:
|
|
2224
|
+
* boolean — только `true` (дефолт `false` = «не фильтруем»; тумблеры с
|
|
2225
|
+
* инвертированной логикой помечают модель и передают `true`), строки/числа —
|
|
2226
|
+
* непустое значение, `in`/join — непустой набор.
|
|
2227
|
+
*/
|
|
2228
|
+
static isEmptyFilter(e) {
|
|
2229
|
+
return e ? e.operator === Qe.Null || e.operator === Qe.NotNull ? !1 : e.type === Ee.Boolean ? e.boolean !== !0 : e.type === Ee.Join || e.operator === Qe.In ? e.set.length === 0 : e.type === Ee.Date ? !e.date1 && !e.date2 : e.value1 === void 0 || e.value1 === null || e.value1 === "" : !0;
|
|
2219
2230
|
}
|
|
2220
2231
|
static EmptyEntiries(e) {
|
|
2221
2232
|
if (!e)
|
|
@@ -2251,7 +2262,7 @@ const us = (Ut = class {
|
|
|
2251
2262
|
resetF() {
|
|
2252
2263
|
this.f = [];
|
|
2253
2264
|
}
|
|
2254
|
-
}, u(
|
|
2265
|
+
}, u(zt, "instance"), zt);
|
|
2255
2266
|
ao([
|
|
2256
2267
|
Ce.GetClassConstructor(Ma)
|
|
2257
2268
|
], us.prototype, "f");
|
|
@@ -2265,20 +2276,20 @@ ao([
|
|
|
2265
2276
|
Ce.GetClassConstructor(oo)
|
|
2266
2277
|
], us.prototype, "t");
|
|
2267
2278
|
let Ht = us;
|
|
2268
|
-
const If = "ftsp", Mf = [
|
|
2269
|
-
[
|
|
2270
|
-
[
|
|
2271
|
-
[
|
|
2272
|
-
[
|
|
2273
|
-
[
|
|
2274
|
-
[
|
|
2279
|
+
const If = "ftsp", Mf = [Qe.NotNull, Qe.Null], la = {
|
|
2280
|
+
[Ee.String]: "s",
|
|
2281
|
+
[Ee.Number]: "n",
|
|
2282
|
+
[Ee.Boolean]: "b",
|
|
2283
|
+
[Ee.Date]: "d",
|
|
2284
|
+
[Ee.Set]: "e",
|
|
2285
|
+
[Ee.Join]: "j"
|
|
2275
2286
|
};
|
|
2276
2287
|
function Ar(t) {
|
|
2277
|
-
return Mf.includes(t.operator) ? !0 : t.type ===
|
|
2288
|
+
return Mf.includes(t.operator) ? !0 : t.type === Ee.Boolean ? t.boolean === !0 : t.type === Ee.Date ? !!(t.date1 || t.date2) : t.type === Ee.Number ? t.value1 !== void 0 && t.value1 !== "" : t.type === Ee.Join || t.operator === Qe.In ? t.set.length > 0 : !!t.value1;
|
|
2278
2289
|
}
|
|
2279
2290
|
function Af(t) {
|
|
2280
2291
|
const e = {};
|
|
2281
|
-
return t.model && (e.model = t.model), t.col && (e.col = t.col), e.t = la[t.type] ?? t.type, e.operator = t.operator, t.group && (e.group = t.group), t.joinTableModel && (e.joinTableModel = t.joinTableModel), t.type ===
|
|
2292
|
+
return t.model && (e.model = t.model), t.col && (e.col = t.col), e.t = la[t.type] ?? t.type, e.operator = t.operator, t.group && (e.group = t.group), t.joinTableModel && (e.joinTableModel = t.joinTableModel), t.type === Ee.Boolean ? e.boolean = t.boolean : t.type === Ee.Date ? (t.date1 && (e.date1 = t.date1), t.date2 && (e.date2 = t.date2)) : t.type === Ee.Join || t.operator === Qe.In ? e.set = t.set : t.value1 !== void 0 && (e.value1 = t.value1), e;
|
|
2282
2293
|
}
|
|
2283
2294
|
function Ef(t) {
|
|
2284
2295
|
const e = new TextEncoder().encode(t);
|
|
@@ -2299,7 +2310,7 @@ function ua(t) {
|
|
|
2299
2310
|
function Of(t) {
|
|
2300
2311
|
return Array.isArray(t) ? t.filter(ua).map((e) => {
|
|
2301
2312
|
const { t: n, ...i } = e, s = new Ma();
|
|
2302
|
-
return s.model = i.model ?? "", s.col = i.col ?? "", s.operator = i.operator ??
|
|
2313
|
+
return s.model = i.model ?? "", s.col = i.col ?? "", s.operator = i.operator ?? Qe.Eq, s.type = n && Object.keys(la).find((o) => la[o] === n) || s.type, s.group = i.group ?? 0, s.joinTableModel = i.joinTableModel ?? "", s.boolean = i.boolean ?? !1, s.value1 = i.value1 ?? "", s.set = Array.isArray(i.set) ? i.set : [], s.date1 = i.date1 ? new Date(i.date1) : void 0, s.date2 = i.date2 ? new Date(i.date2) : void 0, s;
|
|
2303
2314
|
}) : [];
|
|
2304
2315
|
}
|
|
2305
2316
|
let yi = null;
|
|
@@ -3973,18 +3984,18 @@ const za = "1.18.1", Hr = 64 * 1024, { isFunction: Ps } = A, $m = (t) => encodeU
|
|
|
3973
3984
|
onUploadProgress: Q,
|
|
3974
3985
|
responseType: xe,
|
|
3975
3986
|
headers: ke,
|
|
3976
|
-
withCredentials:
|
|
3977
|
-
fetchOptions:
|
|
3978
|
-
maxContentLength:
|
|
3987
|
+
withCredentials: Ke = "same-origin",
|
|
3988
|
+
fetchOptions: mt,
|
|
3989
|
+
maxContentLength: Xe,
|
|
3979
3990
|
maxBodyLength: rt
|
|
3980
3991
|
} = nu(T);
|
|
3981
|
-
const lt = A.isNumber(
|
|
3992
|
+
const lt = A.isNumber(Xe) && Xe > -1, Vt = A.isNumber(rt) && rt > -1, yt = (Z) => A.hasOwnProp(T, Z) ? T[Z] : void 0;
|
|
3982
3993
|
let un = s || fetch;
|
|
3983
3994
|
xe = xe ? (xe + "").toLowerCase() : "text";
|
|
3984
3995
|
let Dt = bm(
|
|
3985
3996
|
[$, B && B.toAbortSignal()],
|
|
3986
3997
|
I
|
|
3987
|
-
),
|
|
3998
|
+
), Ue = null;
|
|
3988
3999
|
const oe = Dt && Dt.unsubscribe && (() => {
|
|
3989
4000
|
Dt.unsubscribe();
|
|
3990
4001
|
});
|
|
@@ -3993,7 +4004,7 @@ const za = "1.18.1", Hr = 64 * 1024, { isFunction: Ps } = A, $m = (t) => encodeU
|
|
|
3993
4004
|
"Request body larger than maxBodyLength limit",
|
|
3994
4005
|
se.ERR_BAD_REQUEST,
|
|
3995
4006
|
T,
|
|
3996
|
-
|
|
4007
|
+
Ue
|
|
3997
4008
|
);
|
|
3998
4009
|
try {
|
|
3999
4010
|
let Z;
|
|
@@ -4008,10 +4019,10 @@ const za = "1.18.1", Hr = 64 * 1024, { isFunction: Ps } = A, $m = (t) => encodeU
|
|
|
4008
4019
|
if (Tm(M)) {
|
|
4009
4020
|
const Se = new URL(M, $t.origin);
|
|
4010
4021
|
if (!Z && (Se.username || Se.password)) {
|
|
4011
|
-
const dt = jr(Se.username),
|
|
4022
|
+
const dt = jr(Se.username), _t = jr(Se.password);
|
|
4012
4023
|
Z = {
|
|
4013
4024
|
username: dt,
|
|
4014
|
-
password:
|
|
4025
|
+
password: _t
|
|
4015
4026
|
};
|
|
4016
4027
|
}
|
|
4017
4028
|
(Se.username || Se.password) && (Se.username = "", Se.password = "", M = Se.href);
|
|
@@ -4019,27 +4030,27 @@ const za = "1.18.1", Hr = 64 * 1024, { isFunction: Ps } = A, $m = (t) => encodeU
|
|
|
4019
4030
|
if (Z && (ke.delete("authorization"), ke.set(
|
|
4020
4031
|
"Authorization",
|
|
4021
4032
|
"Basic " + btoa($m((Z.username || "") + ":" + (Z.password || "")))
|
|
4022
|
-
)), lt && typeof M == "string" && M.startsWith("data:") && xm(M) >
|
|
4033
|
+
)), lt && typeof M == "string" && M.startsWith("data:") && xm(M) > Xe)
|
|
4023
4034
|
throw new se(
|
|
4024
|
-
"maxContentLength size of " +
|
|
4035
|
+
"maxContentLength size of " + Xe + " exceeded",
|
|
4025
4036
|
se.ERR_BAD_RESPONSE,
|
|
4026
4037
|
T,
|
|
4027
|
-
|
|
4038
|
+
Ue
|
|
4028
4039
|
);
|
|
4029
|
-
if (
|
|
4040
|
+
if (Vt && x !== "get" && x !== "head") {
|
|
4030
4041
|
const Se = await P(V);
|
|
4031
4042
|
if (typeof Se == "number" && isFinite(Se) && (ut = Se, Se > rt))
|
|
4032
4043
|
throw We();
|
|
4033
4044
|
}
|
|
4034
|
-
const Fe =
|
|
4045
|
+
const Fe = Vt && (A.isReadableStream(V) || A.isStream(V)), me = (Se, dt, _t) => Nr(
|
|
4035
4046
|
Se,
|
|
4036
4047
|
Hr,
|
|
4037
4048
|
(jt) => {
|
|
4038
|
-
if (
|
|
4049
|
+
if (Vt && jt > rt)
|
|
4039
4050
|
throw en = We();
|
|
4040
4051
|
dt && dt(jt);
|
|
4041
4052
|
},
|
|
4042
|
-
|
|
4053
|
+
_t
|
|
4043
4054
|
);
|
|
4044
4055
|
if (p && x !== "get" && x !== "head" && (Q || Fe)) {
|
|
4045
4056
|
if (ut = ut ?? await E(ke, V), ut !== 0 || Fe) {
|
|
@@ -4049,11 +4060,11 @@ const za = "1.18.1", Hr = 64 * 1024, { isFunction: Ps } = A, $m = (t) => encodeU
|
|
|
4049
4060
|
duplex: "half"
|
|
4050
4061
|
}), dt;
|
|
4051
4062
|
if (A.isFormData(V) && (dt = Se.headers.get("content-type")) && ke.setContentType(dt), Se.body) {
|
|
4052
|
-
const [
|
|
4063
|
+
const [_t, jt] = Q && _r(
|
|
4053
4064
|
ut,
|
|
4054
4065
|
Ws(Ur(Q))
|
|
4055
4066
|
) || [];
|
|
4056
|
-
V = me(Se.body,
|
|
4067
|
+
V = me(Se.body, _t, jt);
|
|
4057
4068
|
}
|
|
4058
4069
|
}
|
|
4059
4070
|
} else if (Fe && !r && c && x !== "get" && x !== "head")
|
|
@@ -4063,35 +4074,35 @@ const za = "1.18.1", Hr = 64 * 1024, { isFunction: Ps } = A, $m = (t) => encodeU
|
|
|
4063
4074
|
"Stream request bodies are not supported by the current fetch implementation",
|
|
4064
4075
|
se.ERR_NOT_SUPPORT,
|
|
4065
4076
|
T,
|
|
4066
|
-
|
|
4077
|
+
Ue
|
|
4067
4078
|
);
|
|
4068
|
-
A.isString(
|
|
4079
|
+
A.isString(Ke) || (Ke = Ke ? "include" : "omit");
|
|
4069
4080
|
const Oe = r && "credentials" in o.prototype;
|
|
4070
4081
|
if (A.isFormData(V)) {
|
|
4071
4082
|
const Se = ke.getContentType();
|
|
4072
4083
|
Se && /^multipart\/form-data/i.test(Se) && !/boundary=/i.test(Se) && ke.delete("content-type");
|
|
4073
4084
|
}
|
|
4074
4085
|
ke.set("User-Agent", "axios/" + za, !1);
|
|
4075
|
-
const
|
|
4076
|
-
...
|
|
4086
|
+
const pt = {
|
|
4087
|
+
...mt,
|
|
4077
4088
|
signal: Dt,
|
|
4078
4089
|
method: x.toUpperCase(),
|
|
4079
4090
|
headers: jl(ke.normalize()),
|
|
4080
4091
|
body: V,
|
|
4081
4092
|
duplex: "half",
|
|
4082
|
-
credentials: Oe ?
|
|
4093
|
+
credentials: Oe ? Ke : void 0
|
|
4083
4094
|
};
|
|
4084
|
-
|
|
4085
|
-
let bt = await (r ? un(
|
|
4095
|
+
Ue = r && new o(M, pt);
|
|
4096
|
+
let bt = await (r ? un(Ue, mt) : un(M, pt));
|
|
4086
4097
|
const An = Ot.from(bt.headers);
|
|
4087
4098
|
if (lt) {
|
|
4088
4099
|
const Se = A.toFiniteNumber(An.getContentLength());
|
|
4089
|
-
if (Se != null && Se >
|
|
4100
|
+
if (Se != null && Se > Xe)
|
|
4090
4101
|
throw new se(
|
|
4091
|
-
"maxContentLength size of " +
|
|
4102
|
+
"maxContentLength size of " + Xe + " exceeded",
|
|
4092
4103
|
se.ERR_BAD_RESPONSE,
|
|
4093
4104
|
T,
|
|
4094
|
-
|
|
4105
|
+
Ue
|
|
4095
4106
|
);
|
|
4096
4107
|
}
|
|
4097
4108
|
const En = b && (xe === "stream" || xe === "response");
|
|
@@ -4100,20 +4111,20 @@ const za = "1.18.1", Hr = 64 * 1024, { isFunction: Ps } = A, $m = (t) => encodeU
|
|
|
4100
4111
|
["status", "statusText", "headers"].forEach((dn) => {
|
|
4101
4112
|
Se[dn] = bt[dn];
|
|
4102
4113
|
});
|
|
4103
|
-
const dt = A.toFiniteNumber(An.getContentLength()), [
|
|
4114
|
+
const dt = A.toFiniteNumber(An.getContentLength()), [_t, jt] = L && _r(
|
|
4104
4115
|
dt,
|
|
4105
4116
|
Ws(Ur(L), !0)
|
|
4106
4117
|
) || [];
|
|
4107
|
-
let
|
|
4118
|
+
let Ut = 0;
|
|
4108
4119
|
const Qn = (dn) => {
|
|
4109
|
-
if (lt && (
|
|
4120
|
+
if (lt && (Ut = dn, Ut > Xe))
|
|
4110
4121
|
throw new se(
|
|
4111
|
-
"maxContentLength size of " +
|
|
4122
|
+
"maxContentLength size of " + Xe + " exceeded",
|
|
4112
4123
|
se.ERR_BAD_RESPONSE,
|
|
4113
4124
|
T,
|
|
4114
|
-
|
|
4125
|
+
Ue
|
|
4115
4126
|
);
|
|
4116
|
-
|
|
4127
|
+
_t && _t(dn);
|
|
4117
4128
|
};
|
|
4118
4129
|
bt = new a(
|
|
4119
4130
|
Nr(bt.body, Hr, Qn, () => {
|
|
@@ -4129,12 +4140,12 @@ const za = "1.18.1", Hr = 64 * 1024, { isFunction: Ps } = A, $m = (t) => encodeU
|
|
|
4129
4140
|
);
|
|
4130
4141
|
if (lt && !b && !En) {
|
|
4131
4142
|
let Se;
|
|
4132
|
-
if (wt != null && (typeof wt.byteLength == "number" ? Se = wt.byteLength : typeof wt.size == "number" ? Se = wt.size : typeof wt == "string" && (Se = typeof i == "function" ? new i().encode(wt).byteLength : wt.length)), typeof Se == "number" && Se >
|
|
4143
|
+
if (wt != null && (typeof wt.byteLength == "number" ? Se = wt.byteLength : typeof wt.size == "number" ? Se = wt.size : typeof wt == "string" && (Se = typeof i == "function" ? new i().encode(wt).byteLength : wt.length)), typeof Se == "number" && Se > Xe)
|
|
4133
4144
|
throw new se(
|
|
4134
|
-
"maxContentLength size of " +
|
|
4145
|
+
"maxContentLength size of " + Xe + " exceeded",
|
|
4135
4146
|
se.ERR_BAD_RESPONSE,
|
|
4136
4147
|
T,
|
|
4137
|
-
|
|
4148
|
+
Ue
|
|
4138
4149
|
);
|
|
4139
4150
|
}
|
|
4140
4151
|
return !En && oe && oe(), await new Promise((Se, dt) => {
|
|
@@ -4144,13 +4155,13 @@ const za = "1.18.1", Hr = 64 * 1024, { isFunction: Ps } = A, $m = (t) => encodeU
|
|
|
4144
4155
|
status: bt.status,
|
|
4145
4156
|
statusText: bt.statusText,
|
|
4146
4157
|
config: T,
|
|
4147
|
-
request:
|
|
4158
|
+
request: Ue
|
|
4148
4159
|
});
|
|
4149
4160
|
});
|
|
4150
4161
|
} catch (Z) {
|
|
4151
4162
|
if (oe && oe(), Dt && Dt.aborted && Dt.reason instanceof se) {
|
|
4152
4163
|
const te = Dt.reason;
|
|
4153
|
-
throw te.config = T,
|
|
4164
|
+
throw te.config = T, Ue && (te.request = Ue), Z !== te && Object.defineProperty(te, "cause", {
|
|
4154
4165
|
__proto__: null,
|
|
4155
4166
|
value: Z,
|
|
4156
4167
|
writable: !0,
|
|
@@ -4159,15 +4170,15 @@ const za = "1.18.1", Hr = 64 * 1024, { isFunction: Ps } = A, $m = (t) => encodeU
|
|
|
4159
4170
|
}), te;
|
|
4160
4171
|
}
|
|
4161
4172
|
if (en)
|
|
4162
|
-
throw
|
|
4173
|
+
throw Ue && !en.request && (en.request = Ue), en;
|
|
4163
4174
|
if (Z instanceof se)
|
|
4164
|
-
throw
|
|
4175
|
+
throw Ue && !Z.request && (Z.request = Ue), Z;
|
|
4165
4176
|
if (Z && Z.name === "TypeError" && /Load failed|fetch/i.test(Z.message)) {
|
|
4166
4177
|
const te = new se(
|
|
4167
4178
|
"Network Error",
|
|
4168
4179
|
se.ERR_NETWORK,
|
|
4169
4180
|
T,
|
|
4170
|
-
|
|
4181
|
+
Ue,
|
|
4171
4182
|
Z && Z.response
|
|
4172
4183
|
);
|
|
4173
4184
|
throw Object.defineProperty(te, "cause", {
|
|
@@ -4178,7 +4189,7 @@ const za = "1.18.1", Hr = 64 * 1024, { isFunction: Ps } = A, $m = (t) => encodeU
|
|
|
4178
4189
|
configurable: !0
|
|
4179
4190
|
}), te;
|
|
4180
4191
|
}
|
|
4181
|
-
throw se.from(Z, Z && Z.code, T,
|
|
4192
|
+
throw se.from(Z, Z && Z.code, T, Ue, Z && Z.response);
|
|
4182
4193
|
}
|
|
4183
4194
|
};
|
|
4184
4195
|
}, Rm = /* @__PURE__ */ new Map(), iu = (t) => {
|
|
@@ -5981,7 +5992,7 @@ var Pe;
|
|
|
5981
5992
|
let Cp = (Pe = class {
|
|
5982
5993
|
}, u(Pe, "Arrays", yn), u(Pe, "Axios", Gi), u(Pe, "BaseStore", st), // static Phone = Phone;
|
|
5983
5994
|
u(Pe, "Cache", Un), u(Pe, "Classes", Ce), u(Pe, "CarouselSwipe", Bm), u(Pe, "Color", Nm), u(Pe, "CreateSortModels", uu), u(Pe, "Cursor", Hm), u(Pe, "DateMask", Xm), u(Pe, "Dates", At), u(Pe, "Dragger", Km), u(Pe, "Extension", du), u(Pe, "Favourite", ep), // static FTSP = FTSP;
|
|
5984
|
-
u(Pe, "Hooks", cu), u(Pe, "HttpClient", qe), u(Pe, "Id",
|
|
5995
|
+
u(Pe, "Hooks", cu), u(Pe, "HttpClient", qe), u(Pe, "Id", Lt), u(Pe, "MakeCarousel", sp), u(Pe, "Period", aa), u(Pe, "PhoneService", ga), u(Pe, "Rating", op), u(Pe, "Router", Kt), u(Pe, "RouterGuard", ap), u(Pe, "Scheduler", rp), u(Pe, "Scroll", up), // static Sizes = Sizes;
|
|
5985
5996
|
u(Pe, "Sorter", dp), u(Pe, "Static", io), // static Statuses = Statuses;
|
|
5986
5997
|
u(Pe, "Strings", nt), u(Pe, "Time", Re), u(Pe, "Timer", Qs), u(Pe, "Token", is), u(Pe, "Try", Pi), u(Pe, "Menus", _a), // static useConfirmLeavePage = useConfirmLeavePage();
|
|
5987
5998
|
u(Pe, "Validate", yp), u(Pe, "WaitElement", bp), u(Pe, "WebSocketClient", Sp), Pe);
|
|
@@ -6113,7 +6124,7 @@ const ms = class yu {
|
|
|
6113
6124
|
}
|
|
6114
6125
|
static Create() {
|
|
6115
6126
|
const e = new yu();
|
|
6116
|
-
return e.id =
|
|
6127
|
+
return e.id = Lt.UUID(), e;
|
|
6117
6128
|
}
|
|
6118
6129
|
removeEmail(e) {
|
|
6119
6130
|
Ce.RemoveFromClassById(e, this.emails);
|
|
@@ -6403,7 +6414,7 @@ let nn = (Gt = class {
|
|
|
6403
6414
|
}, u(Gt, "Auth", Rp), u(Gt, "Contacts", Ep), u(Gt, "Emails", Op), u(Gt, "FileInfos", new st(Nt, "file-infos")), u(Gt, "Humans", zp), u(Gt, "Phones", Vp), u(Gt, "Schemas", Np), u(Gt, "UserAccounts", Yp), u(Gt, "ValueTypes", Xp), u(Gt, "Search", va), Gt);
|
|
6404
6415
|
var Ft = /* @__PURE__ */ ((t) => (t.XS = "xs", t.S = "s", t.M = "m", t.L = "l", t.XL = "xl", t))(Ft || {}), zn;
|
|
6405
6416
|
let Zp = (zn = class {
|
|
6406
|
-
}, u(zn, "Orders", Qt), u(zn, "Sizes", Ft), u(zn, "Statuses", Be), u(zn, "DataTypes",
|
|
6417
|
+
}, u(zn, "Orders", Qt), u(zn, "Sizes", Ft), u(zn, "Statuses", Be), u(zn, "DataTypes", Ee), u(zn, "ValueTypes", Mt), u(zn, "Operators", Qe), zn);
|
|
6407
6418
|
class Jp {
|
|
6408
6419
|
constructor() {
|
|
6409
6420
|
u(this, "title", "");
|
|
@@ -6800,7 +6811,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
6800
6811
|
}, mg = /* @__PURE__ */ j({
|
|
6801
6812
|
inheritAttrs: !1,
|
|
6802
6813
|
__name: "PInput",
|
|
6803
|
-
props: /* @__PURE__ */
|
|
6814
|
+
props: /* @__PURE__ */ De({
|
|
6804
6815
|
label: { type: String, default: "", required: !1 },
|
|
6805
6816
|
margin: { type: String, required: !1, default: "" },
|
|
6806
6817
|
disabled: { type: Boolean, required: !1, default: !1 },
|
|
@@ -6829,9 +6840,9 @@ const ue = /* @__PURE__ */ j({
|
|
|
6829
6840
|
modelValue: {},
|
|
6830
6841
|
modelModifiers: {}
|
|
6831
6842
|
}),
|
|
6832
|
-
emits: /* @__PURE__ */
|
|
6843
|
+
emits: /* @__PURE__ */ De(["blur", "input", "focus", "clear"], ["update:modelValue"]),
|
|
6833
6844
|
setup(t, { expose: e, emit: n }) {
|
|
6834
|
-
const i = n, s =
|
|
6845
|
+
const i = n, s = vt(t, "modelValue"), o = an(), a = D(() => typeof o.id == "string" ? o.id : void 0), l = D(() => {
|
|
6835
6846
|
const $ = {};
|
|
6836
6847
|
for (const B of Object.keys(o))
|
|
6837
6848
|
B !== "id" && B !== "disable" && ($[B] = o[B]);
|
|
@@ -6990,7 +7001,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
6990
7001
|
default: C(() => [
|
|
6991
7002
|
g(f(Ei), { dense: "" }, {
|
|
6992
7003
|
default: C(() => [
|
|
6993
|
-
|
|
7004
|
+
Je((m(), z(f(Bn), {
|
|
6994
7005
|
clickable: "",
|
|
6995
7006
|
onClick: s[0] || (s[0] = (a) => n("copy"))
|
|
6996
7007
|
}, {
|
|
@@ -7015,7 +7026,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
7015
7026
|
})), [
|
|
7016
7027
|
[o]
|
|
7017
7028
|
]),
|
|
7018
|
-
|
|
7029
|
+
Je((m(), z(f(Bn), {
|
|
7019
7030
|
clickable: "",
|
|
7020
7031
|
onClick: s[1] || (s[1] = (a) => n("edit"))
|
|
7021
7032
|
}, {
|
|
@@ -7042,7 +7053,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
7042
7053
|
]),
|
|
7043
7054
|
t.canRemove ? (m(), S(K, { key: 0 }, [
|
|
7044
7055
|
g(f(Zi)),
|
|
7045
|
-
|
|
7056
|
+
Je((m(), z(f(Bn), {
|
|
7046
7057
|
clickable: "",
|
|
7047
7058
|
onClick: s[2] || (s[2] = (a) => n("remove"))
|
|
7048
7059
|
}, {
|
|
@@ -7158,7 +7169,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
7158
7169
|
}
|
|
7159
7170
|
}), vg = { class: "q-mb-md" }, yg = { class: "text-subtitle1 text-weight-medium text-grey-9" }, bg = { class: "text-caption text-grey-6 q-mt-xs" }, fo = /* @__PURE__ */ j({
|
|
7160
7171
|
__name: "PContactFormDeleteDialog",
|
|
7161
|
-
props: /* @__PURE__ */
|
|
7172
|
+
props: /* @__PURE__ */ De({
|
|
7162
7173
|
title: { type: String, default: "Удалить элемент?" },
|
|
7163
7174
|
subtitle: { type: String, default: "Это действие нельзя отменить." },
|
|
7164
7175
|
loading: { type: Boolean, default: !1 }
|
|
@@ -7166,9 +7177,9 @@ const ue = /* @__PURE__ */ j({
|
|
|
7166
7177
|
modelValue: { type: Boolean, default: !1 },
|
|
7167
7178
|
modelModifiers: {}
|
|
7168
7179
|
}),
|
|
7169
|
-
emits: /* @__PURE__ */
|
|
7180
|
+
emits: /* @__PURE__ */ De(["confirm"], ["update:modelValue"]),
|
|
7170
7181
|
setup(t) {
|
|
7171
|
-
const e = Wn, n =
|
|
7182
|
+
const e = Wn, n = vt(t, "modelValue");
|
|
7172
7183
|
return (i, s) => (m(), z(on, {
|
|
7173
7184
|
modelValue: n.value,
|
|
7174
7185
|
"onUpdate:modelValue": s[1] || (s[1] = (o) => n.value = o),
|
|
@@ -7193,7 +7204,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
7193
7204
|
}),
|
|
7194
7205
|
g(f(ti), { class: "q-px-lg q-pb-lg justify-between" }, {
|
|
7195
7206
|
default: C(() => [
|
|
7196
|
-
|
|
7207
|
+
Je(g(ue, {
|
|
7197
7208
|
flat: "",
|
|
7198
7209
|
label: "Отмена",
|
|
7199
7210
|
color: "grey-7",
|
|
@@ -7221,7 +7232,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
7221
7232
|
}
|
|
7222
7233
|
}), wg = { class: "q-mr-md" }, Sg = { class: "text-subtitle1 text-weight-medium text-grey-9" }, ho = /* @__PURE__ */ j({
|
|
7223
7234
|
__name: "PContactFormEditDialog",
|
|
7224
|
-
props: /* @__PURE__ */
|
|
7235
|
+
props: /* @__PURE__ */ De({
|
|
7225
7236
|
icon: { type: String, default: "edit" },
|
|
7226
7237
|
title: { type: String, default: "Редактирование" },
|
|
7227
7238
|
saving: { type: Boolean, default: !1 }
|
|
@@ -7229,9 +7240,9 @@ const ue = /* @__PURE__ */ j({
|
|
|
7229
7240
|
modelValue: { type: Boolean, default: !1 },
|
|
7230
7241
|
modelModifiers: {}
|
|
7231
7242
|
}),
|
|
7232
|
-
emits: /* @__PURE__ */
|
|
7243
|
+
emits: /* @__PURE__ */ De(["save"], ["update:modelValue"]),
|
|
7233
7244
|
setup(t) {
|
|
7234
|
-
const e = Wn, n =
|
|
7245
|
+
const e = Wn, n = vt(t, "modelValue");
|
|
7235
7246
|
return (i, s) => (m(), z(on, {
|
|
7236
7247
|
modelValue: n.value,
|
|
7237
7248
|
"onUpdate:modelValue": s[1] || (s[1] = (o) => n.value = o),
|
|
@@ -7255,7 +7266,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
7255
7266
|
]),
|
|
7256
7267
|
y("div", Sg, U(t.title), 1),
|
|
7257
7268
|
g(f(_n)),
|
|
7258
|
-
|
|
7269
|
+
Je(g(ue, {
|
|
7259
7270
|
flat: "",
|
|
7260
7271
|
round: "",
|
|
7261
7272
|
dense: "",
|
|
@@ -7276,7 +7287,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
7276
7287
|
}),
|
|
7277
7288
|
g(f(ti), { class: "q-px-lg q-pb-lg justify-between" }, {
|
|
7278
7289
|
default: C(() => [
|
|
7279
|
-
|
|
7290
|
+
Je(g(ue, {
|
|
7280
7291
|
flat: "",
|
|
7281
7292
|
label: "Отмена",
|
|
7282
7293
|
color: "grey-7",
|
|
@@ -7394,7 +7405,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
7394
7405
|
}, {
|
|
7395
7406
|
default: C(() => [
|
|
7396
7407
|
(m(!0), S(K, null, we(f(s), (I, L) => {
|
|
7397
|
-
var Q, xe, ke,
|
|
7408
|
+
var Q, xe, ke, Ke, mt, Xe;
|
|
7398
7409
|
return m(), S("div", {
|
|
7399
7410
|
key: ((xe = (Q = t.adapter).emailId) == null ? void 0 : xe.call(Q, I)) ?? L,
|
|
7400
7411
|
class: ve(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders", $.$q.dark.isActive ? "" : "hover-item"]),
|
|
@@ -7403,7 +7414,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
7403
7414
|
y("div", Pg, [
|
|
7404
7415
|
y("div", Rg, [
|
|
7405
7416
|
y("div", Ig, U(t.adapter.emailValue(I)), 1),
|
|
7406
|
-
(
|
|
7417
|
+
(Ke = (ke = t.adapter).emailDescription) != null && Ke.call(ke, I) ? (m(), S("div", Mg, U((Xe = (mt = t.adapter).emailDescription) == null ? void 0 : Xe.call(mt, I)), 1)) : G("", !0)
|
|
7407
7418
|
])
|
|
7408
7419
|
]),
|
|
7409
7420
|
g(ku, {
|
|
@@ -7594,7 +7605,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
7594
7605
|
}, {
|
|
7595
7606
|
default: C(() => [
|
|
7596
7607
|
(m(!0), S(K, null, we(f(s), (L, Q) => {
|
|
7597
|
-
var xe, ke,
|
|
7608
|
+
var xe, ke, Ke, mt, Xe, rt;
|
|
7598
7609
|
return m(), S("div", {
|
|
7599
7610
|
key: ((ke = (xe = t.adapter).phoneId) == null ? void 0 : ke.call(xe, L)) ?? Q,
|
|
7600
7611
|
class: ve(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders", B.$q.dark.isActive ? "" : "hover-item"]),
|
|
@@ -7603,7 +7614,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
7603
7614
|
y("div", _g, [
|
|
7604
7615
|
y("div", Ug, [
|
|
7605
7616
|
y("div", Bg, U(t.adapter.phoneNumber(L)), 1),
|
|
7606
|
-
(
|
|
7617
|
+
(mt = (Ke = t.adapter).phoneDescription) != null && mt.call(Ke, L) ? (m(), S("div", qg, U((rt = (Xe = t.adapter).phoneDescription) == null ? void 0 : rt.call(Xe, L)), 1)) : G("", !0)
|
|
7607
7618
|
])
|
|
7608
7619
|
]),
|
|
7609
7620
|
g(ku, {
|
|
@@ -7771,7 +7782,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
7771
7782
|
]),
|
|
7772
7783
|
g(f(Rc), null, {
|
|
7773
7784
|
default: C(() => [
|
|
7774
|
-
|
|
7785
|
+
Je(y("div", null, [
|
|
7775
7786
|
g(f(Zi)),
|
|
7776
7787
|
g(f(kt), { class: "q-pt-xs q-pb-md q-px-md" }, {
|
|
7777
7788
|
default: C(() => [
|
|
@@ -7909,7 +7920,7 @@ const sv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7909
7920
|
}, Symbol.toStringTag, { value: "Module" })), ss = /* @__PURE__ */ j({
|
|
7910
7921
|
inheritAttrs: !1,
|
|
7911
7922
|
__name: "PCheckBox",
|
|
7912
|
-
props: /* @__PURE__ */
|
|
7923
|
+
props: /* @__PURE__ */ De({
|
|
7913
7924
|
label: { type: String, default: "" },
|
|
7914
7925
|
fontSize: { type: String, default: "" },
|
|
7915
7926
|
value: { type: [String, Boolean], default: void 0 },
|
|
@@ -7922,9 +7933,9 @@ const sv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7922
7933
|
modelValue: { type: Boolean },
|
|
7923
7934
|
modelModifiers: {}
|
|
7924
7935
|
}),
|
|
7925
|
-
emits: /* @__PURE__ */
|
|
7936
|
+
emits: /* @__PURE__ */ De(["change"], ["update:modelValue"]),
|
|
7926
7937
|
setup(t, { emit: e }) {
|
|
7927
|
-
const n =
|
|
7938
|
+
const n = vt(t, "modelValue"), i = e, s = an(), o = D(() => {
|
|
7928
7939
|
const l = {};
|
|
7929
7940
|
for (const r of Object.keys(s))
|
|
7930
7941
|
l[r] = s[r];
|
|
@@ -7975,14 +7986,19 @@ const Au = /* @__PURE__ */ j({
|
|
|
7975
7986
|
},
|
|
7976
7987
|
emits: ["load"],
|
|
7977
7988
|
setup(t, { emit: e }) {
|
|
7978
|
-
const n = t, i = e, s = Cn(), o = O(!1), a = (
|
|
7979
|
-
|
|
7989
|
+
const n = t, i = e, s = Cn(), o = O(!1), a = () => {
|
|
7990
|
+
const r = s.f.find((d) => d.model === n.model.model && d.col === n.model.col);
|
|
7991
|
+
o.value = r ? r.boolean : !1;
|
|
7992
|
+
};
|
|
7993
|
+
Ae(s.f, a, { immediate: !0, deep: !0 });
|
|
7994
|
+
const l = (r) => {
|
|
7995
|
+
o.value = !!r, n.model.setBoolean(!!r), r ? s.setF(n.model) : s.removeF(n.model), i("load");
|
|
7980
7996
|
};
|
|
7981
|
-
return (
|
|
7997
|
+
return (r, d) => (m(), z(ss, at(r.$attrs, {
|
|
7982
7998
|
"model-value": f(o),
|
|
7983
7999
|
label: t.model.label,
|
|
7984
8000
|
size: "mini",
|
|
7985
|
-
"onUpdate:modelValue":
|
|
8001
|
+
"onUpdate:modelValue": l
|
|
7986
8002
|
}), null, 16, ["model-value", "label"]));
|
|
7987
8003
|
}
|
|
7988
8004
|
}), lv = { class: "p-filter-code-toggle row items-center no-wrap" }, uv = /* @__PURE__ */ j({
|
|
@@ -8078,14 +8094,14 @@ const Au = /* @__PURE__ */ j({
|
|
|
8078
8094
|
}, {
|
|
8079
8095
|
default: C(() => [
|
|
8080
8096
|
y("div", dv, [
|
|
8081
|
-
|
|
8097
|
+
Je(g(ue, {
|
|
8082
8098
|
label: "Закрыть",
|
|
8083
8099
|
color: "primary",
|
|
8084
8100
|
flat: ""
|
|
8085
8101
|
}, null, 512), [
|
|
8086
8102
|
[b]
|
|
8087
8103
|
]),
|
|
8088
|
-
|
|
8104
|
+
Je(g(ue, {
|
|
8089
8105
|
label: "Очистить",
|
|
8090
8106
|
color: "negative",
|
|
8091
8107
|
flat: "",
|
|
@@ -8220,7 +8236,7 @@ const Au = /* @__PURE__ */ j({
|
|
|
8220
8236
|
}), sn = /* @__PURE__ */ j({
|
|
8221
8237
|
inheritAttrs: !1,
|
|
8222
8238
|
__name: "PSelect",
|
|
8223
|
-
props: /* @__PURE__ */
|
|
8239
|
+
props: /* @__PURE__ */ De({
|
|
8224
8240
|
label: { type: String, default: "", required: !1 },
|
|
8225
8241
|
placeholder: { type: String, default: "", required: !1 },
|
|
8226
8242
|
value: { type: String, default: "", required: !1 },
|
|
@@ -8260,9 +8276,9 @@ const Au = /* @__PURE__ */ j({
|
|
|
8260
8276
|
modelValue: {},
|
|
8261
8277
|
modelModifiers: {}
|
|
8262
8278
|
}),
|
|
8263
|
-
emits: /* @__PURE__ */
|
|
8279
|
+
emits: /* @__PURE__ */ De(["change", "clear"], ["update:modelValue"]),
|
|
8264
8280
|
setup(t, { expose: e, emit: n }) {
|
|
8265
|
-
const i =
|
|
8281
|
+
const i = vt(t, "modelValue"), s = n, o = O(null);
|
|
8266
8282
|
function a() {
|
|
8267
8283
|
var $;
|
|
8268
8284
|
($ = o.value) == null || $.focus();
|
|
@@ -8538,40 +8554,41 @@ const Au = /* @__PURE__ */ j({
|
|
|
8538
8554
|
}), mo = /* @__PURE__ */ j({
|
|
8539
8555
|
inheritAttrs: !1,
|
|
8540
8556
|
__name: "PToggle",
|
|
8541
|
-
props:
|
|
8557
|
+
props: {
|
|
8558
|
+
// ⚠️ `type: undefined` — намеренно: без него компилятор выводит `Boolean`
|
|
8559
|
+
// из TS-типа `boolean | undefined`, а Vue с типом `Boolean` приводит
|
|
8560
|
+
// отсутствующее значение к `false`.
|
|
8561
|
+
modelValue: { type: void 0, default: void 0 },
|
|
8542
8562
|
label: { type: String, default: "" },
|
|
8543
8563
|
fontSize: { type: String, default: "" },
|
|
8544
8564
|
size: { type: String, default: "md" },
|
|
8545
8565
|
padding: { type: String, default: "" },
|
|
8546
8566
|
margin: { type: String, default: "" },
|
|
8547
8567
|
width: { type: String, default: "" }
|
|
8548
|
-
},
|
|
8549
|
-
|
|
8550
|
-
modelModifiers: {}
|
|
8551
|
-
}),
|
|
8552
|
-
emits: /* @__PURE__ */ Ee(["change"], ["update:modelValue"]),
|
|
8568
|
+
},
|
|
8569
|
+
emits: ["update:modelValue", "change"],
|
|
8553
8570
|
setup(t, { emit: e }) {
|
|
8554
|
-
const n =
|
|
8571
|
+
const n = t, i = e, s = an(), o = D(() => {
|
|
8555
8572
|
const l = {};
|
|
8556
8573
|
for (const r of Object.keys(s))
|
|
8557
8574
|
l[r] = s[r];
|
|
8558
8575
|
return l;
|
|
8559
|
-
}), a = () => {
|
|
8560
|
-
|
|
8576
|
+
}), a = (l) => {
|
|
8577
|
+
const r = l ?? void 0;
|
|
8578
|
+
i("update:modelValue", r), i("change", r);
|
|
8561
8579
|
};
|
|
8562
8580
|
return (l, r) => (m(), S("div", {
|
|
8563
8581
|
class: "p-toggle",
|
|
8564
|
-
style: J({ padding:
|
|
8582
|
+
style: J({ padding: n.padding, margin: n.margin, maxWidth: n.width })
|
|
8565
8583
|
}, [
|
|
8566
8584
|
g(f(gl), at({
|
|
8567
|
-
|
|
8568
|
-
"onUpdate:modelValue": r[0] || (r[0] = (d) => n.value = d)
|
|
8585
|
+
"model-value": n.modelValue
|
|
8569
8586
|
}, f(o), {
|
|
8570
|
-
label:
|
|
8571
|
-
size:
|
|
8572
|
-
style: { fontSize:
|
|
8587
|
+
label: n.label || void 0,
|
|
8588
|
+
size: n.size,
|
|
8589
|
+
style: { fontSize: n.fontSize },
|
|
8573
8590
|
"onUpdate:modelValue": a
|
|
8574
|
-
}), null, 16, ["
|
|
8591
|
+
}), null, 16, ["model-value", "label", "size", "style"])
|
|
8575
8592
|
], 4));
|
|
8576
8593
|
}
|
|
8577
8594
|
}), Vu = /* @__PURE__ */ j({
|
|
@@ -8596,7 +8613,6 @@ const Au = /* @__PURE__ */ j({
|
|
|
8596
8613
|
"checked-icon": "check",
|
|
8597
8614
|
"unchecked-icon": "clear",
|
|
8598
8615
|
"keep-color": !0,
|
|
8599
|
-
"toggle-indeterminate": "",
|
|
8600
8616
|
label: t.model.label,
|
|
8601
8617
|
"onUpdate:modelValue": r
|
|
8602
8618
|
}), null, 16, ["model-value", "label"]));
|
|
@@ -8654,7 +8670,7 @@ const wv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8654
8670
|
default: Uu
|
|
8655
8671
|
}, Symbol.toStringTag, { value: "Module" })), Sv = { class: "row items-center justify-end" }, Kr = "DD.MM.YYYY", qa = /* @__PURE__ */ j({
|
|
8656
8672
|
__name: "PDateInput",
|
|
8657
|
-
props: /* @__PURE__ */
|
|
8673
|
+
props: /* @__PURE__ */ De({
|
|
8658
8674
|
label: { type: String, default: "", required: !1 },
|
|
8659
8675
|
placeholder: { type: String, default: "", required: !1 },
|
|
8660
8676
|
dense: { type: Boolean, default: !1 },
|
|
@@ -8675,9 +8691,9 @@ const wv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8675
8691
|
modelValue: { default: null },
|
|
8676
8692
|
modelModifiers: {}
|
|
8677
8693
|
}),
|
|
8678
|
-
emits: /* @__PURE__ */
|
|
8694
|
+
emits: /* @__PURE__ */ De(["blur", "input"], ["update:modelValue"]),
|
|
8679
8695
|
setup(t, { emit: e }) {
|
|
8680
|
-
const n = Wn, i = t, s = e, o =
|
|
8696
|
+
const n = Wn, i = t, s = e, o = vt(t, "modelValue"), a = Kr.replace(/[DMY]/g, "#"), l = O(null), r = (x) => {
|
|
8681
8697
|
if (i.modelType) {
|
|
8682
8698
|
l.value = i.modelType;
|
|
8683
8699
|
return;
|
|
@@ -8781,7 +8797,7 @@ const wv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8781
8797
|
}, {
|
|
8782
8798
|
default: C(() => [
|
|
8783
8799
|
y("div", Sv, [
|
|
8784
|
-
|
|
8800
|
+
Je(g(ue, {
|
|
8785
8801
|
label: "Готово",
|
|
8786
8802
|
color: "primary",
|
|
8787
8803
|
flat: ""
|
|
@@ -8887,7 +8903,7 @@ const wv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8887
8903
|
}), $v = /* @__PURE__ */ X(xv, [["__scopeId", "data-v-1f1f064c"]]), Tv = /* @__PURE__ */ j({
|
|
8888
8904
|
inheritAttrs: !1,
|
|
8889
8905
|
__name: "PInputNumber",
|
|
8890
|
-
props: /* @__PURE__ */
|
|
8906
|
+
props: /* @__PURE__ */ De({
|
|
8891
8907
|
label: { type: String, default: "", required: !1 },
|
|
8892
8908
|
margin: { type: String, required: !1, default: "" },
|
|
8893
8909
|
padding: { type: String, default: "", required: !1 },
|
|
@@ -8902,7 +8918,7 @@ const wv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8902
8918
|
modelValue: { default: 0 },
|
|
8903
8919
|
modelModifiers: {}
|
|
8904
8920
|
}),
|
|
8905
|
-
emits: /* @__PURE__ */
|
|
8921
|
+
emits: /* @__PURE__ */ De(["blur", "input", "change"], ["update:modelValue"]),
|
|
8906
8922
|
setup(t, { emit: e }) {
|
|
8907
8923
|
const n = e, i = an(), s = D(() => typeof i.id == "string" ? i.id : void 0), o = D(() => {
|
|
8908
8924
|
const $ = {};
|
|
@@ -8912,7 +8928,7 @@ const wv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8912
8928
|
}), a = t, l = () => {
|
|
8913
8929
|
const $ = a.step.toString();
|
|
8914
8930
|
return $.includes(".") ? $.split(".")[1].length : 0;
|
|
8915
|
-
}, r = l(), d =
|
|
8931
|
+
}, r = l(), d = vt(t, "modelValue"), h = (($) => Math.min(Math.max($, a.min), a.max))(d.value);
|
|
8916
8932
|
h !== d.value && (d.value = h);
|
|
8917
8933
|
const p = O(h.toFixed(l())), b = D(() => {
|
|
8918
8934
|
const $ = {};
|
|
@@ -8976,7 +8992,7 @@ const wv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8976
8992
|
}
|
|
8977
8993
|
}), Bu = /* @__PURE__ */ X(Tv, [["__scopeId", "data-v-d5544390"]]), qu = /* @__PURE__ */ j({
|
|
8978
8994
|
__name: "PRadio",
|
|
8979
|
-
props: /* @__PURE__ */
|
|
8995
|
+
props: /* @__PURE__ */ De({
|
|
8980
8996
|
label: { type: String, default: "" },
|
|
8981
8997
|
name: { type: String, default: "group" },
|
|
8982
8998
|
fontSize: { type: String, default: "" },
|
|
@@ -8990,9 +9006,9 @@ const wv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8990
9006
|
modelValue: {},
|
|
8991
9007
|
modelModifiers: {}
|
|
8992
9008
|
}),
|
|
8993
|
-
emits: /* @__PURE__ */
|
|
9009
|
+
emits: /* @__PURE__ */ De(["change"], ["update:modelValue"]),
|
|
8994
9010
|
setup(t, { emit: e }) {
|
|
8995
|
-
const n =
|
|
9011
|
+
const n = vt(t, "modelValue"), i = e, s = t, o = () => {
|
|
8996
9012
|
i("change", s.value);
|
|
8997
9013
|
};
|
|
8998
9014
|
return (a, l) => (m(), S("div", {
|
|
@@ -9016,7 +9032,7 @@ const wv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9016
9032
|
}), Pv = /* @__PURE__ */ j({
|
|
9017
9033
|
inheritAttrs: !1,
|
|
9018
9034
|
__name: "PTextarea",
|
|
9019
|
-
props: /* @__PURE__ */
|
|
9035
|
+
props: /* @__PURE__ */ De({
|
|
9020
9036
|
label: { type: String, default: "", required: !1 },
|
|
9021
9037
|
margin: { type: String, required: !1, default: "0" },
|
|
9022
9038
|
padding: { type: String, default: "0", required: !1 },
|
|
@@ -9030,9 +9046,9 @@ const wv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9030
9046
|
modelValue: {},
|
|
9031
9047
|
modelModifiers: {}
|
|
9032
9048
|
}),
|
|
9033
|
-
emits: /* @__PURE__ */
|
|
9049
|
+
emits: /* @__PURE__ */ De(["blur", "input", "focus"], ["update:modelValue"]),
|
|
9034
9050
|
setup(t) {
|
|
9035
|
-
const e =
|
|
9051
|
+
const e = vt(t, "modelValue"), n = an(), i = D(() => typeof n.id == "string" ? n.id : void 0), s = D(() => {
|
|
9036
9052
|
const r = {};
|
|
9037
9053
|
for (const d of Object.keys(n))
|
|
9038
9054
|
d !== "id" && (r[d] = n[d]);
|
|
@@ -9091,7 +9107,7 @@ class Mn {
|
|
|
9091
9107
|
}
|
|
9092
9108
|
const Rv = { class: "p-form-field" }, Iv = { key: 5 }, Mv = { key: 6 }, po = /* @__PURE__ */ j({
|
|
9093
9109
|
__name: "PFieldInput",
|
|
9094
|
-
props: /* @__PURE__ */
|
|
9110
|
+
props: /* @__PURE__ */ De({
|
|
9095
9111
|
field: {}
|
|
9096
9112
|
}, {
|
|
9097
9113
|
fill: { required: !0 },
|
|
@@ -9099,7 +9115,7 @@ const Rv = { class: "p-form-field" }, Iv = { key: 5 }, Mv = { key: 6 }, po = /*
|
|
|
9099
9115
|
}),
|
|
9100
9116
|
emits: ["update:fill"],
|
|
9101
9117
|
setup(t) {
|
|
9102
|
-
const e = t, n =
|
|
9118
|
+
const e = t, n = vt(t, "fill"), i = D(() => {
|
|
9103
9119
|
var b;
|
|
9104
9120
|
return String(((b = e.field.valueType) == null ? void 0 : b.name) || "string");
|
|
9105
9121
|
}), s = D(() => i.value === "string"), o = D(() => i.value === "text"), a = D(() => i.value === "number"), l = D(() => i.value === "date" || i.value === "dateTime"), r = D(() => i.value === "boolean"), d = D(() => i.value === "radio"), c = D(() => i.value === "set"), h = (b) => {
|
|
@@ -9165,7 +9181,7 @@ function el(t, e) {
|
|
|
9165
9181
|
}
|
|
9166
9182
|
return n;
|
|
9167
9183
|
}
|
|
9168
|
-
function
|
|
9184
|
+
function Le(t) {
|
|
9169
9185
|
for (var e = 1; e < arguments.length; e++) {
|
|
9170
9186
|
var n = arguments[e] != null ? arguments[e] : {};
|
|
9171
9187
|
e % 2 ? el(Object(n), !0).forEach(function(i) {
|
|
@@ -9312,7 +9328,7 @@ function nl(t) {
|
|
|
9312
9328
|
function mi(t) {
|
|
9313
9329
|
return !!(t && t.constructor && t.call && t.apply);
|
|
9314
9330
|
}
|
|
9315
|
-
function
|
|
9331
|
+
function gt(t) {
|
|
9316
9332
|
return t === void 0;
|
|
9317
9333
|
}
|
|
9318
9334
|
function _s(t) {
|
|
@@ -9321,7 +9337,7 @@ function _s(t) {
|
|
|
9321
9337
|
function wa(t, e, n) {
|
|
9322
9338
|
var i = {};
|
|
9323
9339
|
return _s(t) ? (Object.keys(e).forEach(function(s) {
|
|
9324
|
-
|
|
9340
|
+
gt(t[s]) ? i[s] = e[s] : _s(e[s]) ? _s(t[s]) ? i[s] = wa(t[s], e[s], n[s]) : i[s] = t[s] ? e[s] : n[s] : e[s] === !0 || e[s] === !1 ? i[s] = !!t[s] : i[s] = t[s];
|
|
9325
9341
|
}), i) : t ? e : n;
|
|
9326
9342
|
}
|
|
9327
9343
|
function Is(t) {
|
|
@@ -9492,7 +9508,7 @@ function Jt(t, e, n, i) {
|
|
|
9492
9508
|
}
|
|
9493
9509
|
return t;
|
|
9494
9510
|
}
|
|
9495
|
-
function
|
|
9511
|
+
function _e(t) {
|
|
9496
9512
|
return t.width / t.height;
|
|
9497
9513
|
}
|
|
9498
9514
|
function Ii(t, e) {
|
|
@@ -9507,7 +9523,7 @@ function Xo(t, e) {
|
|
|
9507
9523
|
return e.minimum && t < e.minimum ? n = e.minimum : e.maximum && t > e.maximum && (n = e.maximum), n;
|
|
9508
9524
|
}
|
|
9509
9525
|
function Xu(t, e) {
|
|
9510
|
-
var n =
|
|
9526
|
+
var n = _e(t), i = _e(e);
|
|
9511
9527
|
return e.width < 1 / 0 && e.height < 1 / 0 ? n > i ? { width: e.width, height: e.width / n } : { width: e.height * n, height: e.height } : e.width < 1 / 0 ? { width: e.width, height: e.width / n } : e.height < 1 / 0 ? { width: e.height * n, height: e.height } : t;
|
|
9512
9528
|
}
|
|
9513
9529
|
function Zu(t, e) {
|
|
@@ -9546,7 +9562,7 @@ function yo(t, e) {
|
|
|
9546
9562
|
}
|
|
9547
9563
|
function al(t) {
|
|
9548
9564
|
var e = t.size, n = t.aspectRatio, i = t.ignoreMinimum, s = t.sizeRestrictions;
|
|
9549
|
-
return !!((e.correctRatio ||
|
|
9565
|
+
return !!((e.correctRatio || _e(e) >= n.minimum && _e(e) <= n.maximum) && e.height <= s.maxHeight && e.width <= s.maxWidth && e.width && e.height && (i || e.height >= s.minHeight && e.width >= s.minWidth));
|
|
9550
9566
|
}
|
|
9551
9567
|
function rl(t, e) {
|
|
9552
9568
|
return Math.pow(t.width - e.width, 2) + Math.pow(t.height - e.height, 2);
|
|
@@ -9575,10 +9591,10 @@ function Bv(t) {
|
|
|
9575
9591
|
}, d = ge({}, e);
|
|
9576
9592
|
return (Array.isArray(n) ? n : [n]).forEach(function(c) {
|
|
9577
9593
|
var h = {};
|
|
9578
|
-
|
|
9594
|
+
gt((h = typeof c == "function" ? c({ coordinates: d, imageSize: i, visibleArea: l }) : c).width) && gt(h.height) || (d = function(p, b) {
|
|
9579
9595
|
var k = ge(ge(ge({}, p), Pn({ width: b.width, height: b.height, sizeRestrictions: s, aspectRatio: a })), { left: 0, top: 0 });
|
|
9580
9596
|
return r(k, { left: p.left, top: p.top });
|
|
9581
|
-
}(d, ge(ge({}, d), h))),
|
|
9597
|
+
}(d, ge(ge({}, d), h))), gt(h.left) && gt(h.top) || (d = r(d, ge(ge({}, d), h)));
|
|
9582
9598
|
}), d;
|
|
9583
9599
|
}
|
|
9584
9600
|
function qv(t) {
|
|
@@ -9588,7 +9604,7 @@ function qv(t) {
|
|
|
9588
9604
|
var o = t.stencilSize, a = t.sizeRestrictions, l = t.positionRestrictions;
|
|
9589
9605
|
t.stencilReference;
|
|
9590
9606
|
var r, d, c, h = ge({}, i), p = ge({}, s), b = ge({}, o);
|
|
9591
|
-
r =
|
|
9607
|
+
r = _e(b), d = _e(h), c === void 0 && (c = 1e-3), (r === 0 || d === 0 ? Math.abs(d - r) < c : Math.abs(d / r) < 1 + c && Math.abs(d / r) > 1 - c) || (h = ge(ge({}, h), Pn({ sizeRestrictions: a, width: h.width, height: h.height, aspectRatio: { minimum: _e(b), maximum: _e(b) } })));
|
|
9592
9608
|
var k = vo(p = Jt(p, h.width * n.width / (p.width * b.width)), e({ visibleArea: p, type: "resize" }));
|
|
9593
9609
|
return k !== 1 && (p = Jt(p, k), h = Jt(h, k)), p = Pt(p = qt(p, Ri(Tt(h), Tt(p))), e({ visibleArea: p, type: "move" })), { coordinates: h = Pt(h, yo(bn(p), l)), visibleArea: p };
|
|
9594
9610
|
}
|
|
@@ -9600,7 +9616,7 @@ function Nv(t) {
|
|
|
9600
9616
|
var l = ge({}, s), r = ge({}, o);
|
|
9601
9617
|
if (s && o && e.type !== "manipulateImage") {
|
|
9602
9618
|
var d = { width: 0, height: 0 };
|
|
9603
|
-
r.width, i.width,
|
|
9619
|
+
r.width, i.width, _e(i) > _e(l) ? (d.height = 0.8 * i.height, d.width = d.height * _e(l)) : (d.width = 0.8 * i.width, d.height = d.width * _e(l));
|
|
9604
9620
|
var c = vo(r = Jt(r, l.width * i.width / (r.width * d.width)), n({ visibleArea: r, type: "resize" }));
|
|
9605
9621
|
r = Jt(r, c), c !== 1 && (d.height /= c, d.width /= c), r = Pt(r = qt(r, Ri(Tt(l), Tt(r))), n({ visibleArea: r, type: "move" })), l = Pt(l, yo(bn(r), a));
|
|
9606
9622
|
}
|
|
@@ -9619,20 +9635,20 @@ function jv(t) {
|
|
|
9619
9635
|
return { left: (n ? n.left : 0) + s.width / 2 - i.width / 2, top: (n ? n.top : 0) + s.height / 2 - i.height / 2 };
|
|
9620
9636
|
}
|
|
9621
9637
|
function Gv(t) {
|
|
9622
|
-
var e = t.imageSize, n = t.visibleArea, i = t.aspectRatio, s = t.sizeRestrictions, o = n || e, a = Math.min(i.maximum || 1 / 0, Math.max(i.minimum || 0,
|
|
9638
|
+
var e = t.imageSize, n = t.visibleArea, i = t.aspectRatio, s = t.sizeRestrictions, o = n || e, a = Math.min(i.maximum || 1 / 0, Math.max(i.minimum || 0, _e(o))), l = o.width < o.height ? { width: 0.8 * o.width, height: 0.8 * o.width / a } : { height: 0.8 * o.height, width: 0.8 * o.height * a };
|
|
9623
9639
|
return Pn(ge(ge({}, l), { aspectRatio: i, sizeRestrictions: s }));
|
|
9624
9640
|
}
|
|
9625
9641
|
function Wv(t) {
|
|
9626
9642
|
var e, n, i = t.imageSize, s = t.visibleArea, o = t.boundaries, a = t.aspectRatio, l = t.sizeRestrictions, r = t.stencilSize, d = s || i;
|
|
9627
|
-
return
|
|
9643
|
+
return _e(d) > _e(o) ? n = (e = r.height * d.height / o.height) * _e(r) : e = (n = r.width * d.width / o.width) / _e(r), Pn({ width: n, height: e, aspectRatio: a, sizeRestrictions: l });
|
|
9628
9644
|
}
|
|
9629
9645
|
function Yv(t) {
|
|
9630
|
-
var e = t.getAreaRestrictions, n = t.coordinates, i = t.imageSize, s =
|
|
9646
|
+
var e = t.getAreaRestrictions, n = t.coordinates, i = t.imageSize, s = _e(t.boundaries);
|
|
9631
9647
|
if (n) {
|
|
9632
|
-
var o = { height: Math.max(n.height, i.height), width: Math.max(n.width, i.width) }, a = Xu({ width:
|
|
9648
|
+
var o = { height: Math.max(n.height, i.height), width: Math.max(n.width, i.width) }, a = Xu({ width: _e(o) > s ? o.width : o.height * s, height: _e(o) > s ? o.width / s : o.height }, Sa(e())), l = { left: n.left + n.width / 2 - a.width / 2, top: n.top + n.height / 2 - a.height / 2, width: a.width, height: a.height }, r = os(n, bn(ge({ left: 0, top: 0 }, i))), d = {};
|
|
9633
9649
|
return !r.left && !r.right && l.width <= i.width && (d.left = 0, d.right = i.width), !r.top && !r.bottom && l.height <= i.height && (d.top = 0, d.bottom = i.height), Pt(l, d);
|
|
9634
9650
|
}
|
|
9635
|
-
var c =
|
|
9651
|
+
var c = _e(i);
|
|
9636
9652
|
return a = { height: c > s ? i.height : i.width / s, width: c > s ? i.height * s : i.width }, { left: i.width / 2 - a.width / 2, top: i.height / 2 - a.height / 2, width: a.width, height: a.height };
|
|
9637
9653
|
}
|
|
9638
9654
|
function Ms(t, e) {
|
|
@@ -10024,7 +10040,7 @@ var Es = ln("vue-preview"), id = { props: { coordinates: { type: Object }, trans
|
|
|
10024
10040
|
return this.transitions && this.transitions.enabled && (t.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), t;
|
|
10025
10041
|
}, imageStyle: function() {
|
|
10026
10042
|
if (this.coordinates && this.image) {
|
|
10027
|
-
var t = this.coordinates.width / this.size.width, e =
|
|
10043
|
+
var t = this.coordinates.width / this.size.width, e = Le(Le({ rotate: 0, flip: { horizontal: !1, vertical: !1 } }, this.image.transforms), {}, { scaleX: 1 / t, scaleY: 1 / t }), n = this.imageSize.width, i = this.imageSize.height, s = Zu({ width: n, height: i }, e.rotate), o = { width: "".concat(n, "px"), height: "".concat(i, "px"), left: "0px", top: "0px" }, a = { rotate: { left: (n - s.width) * e.scaleX / 2, top: (i - s.height) * e.scaleY / 2 }, scale: { left: (1 - e.scaleX) * n / 2, top: (1 - e.scaleY) * i / 2 } };
|
|
10028
10044
|
return o.transform = `translate(
|
|
10029
10045
|
`.concat(-this.coordinates.left / t - a.rotate.left - a.scale.left, "px,").concat(-this.coordinates.top / t - a.rotate.top - a.scale.top, "px) ") + td(e), this.transitions && this.transitions.enabled && (o.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), o;
|
|
10030
10046
|
}
|
|
@@ -10053,7 +10069,7 @@ var Es = ln("vue-preview"), id = { props: { coordinates: { type: Object }, trans
|
|
|
10053
10069
|
t && t.complete && this.refreshImage(), this.refresh();
|
|
10054
10070
|
} } };
|
|
10055
10071
|
id.render = function(t, e, n, i, s, o) {
|
|
10056
|
-
return m(), z("div", { ref: "root", class: o.classes.root, style: o.style }, [g("div", { ref: "wrapper", class: o.classes.wrapper, style: o.wrapperStyle }, [
|
|
10072
|
+
return m(), z("div", { ref: "root", class: o.classes.root, style: o.style }, [g("div", { ref: "wrapper", class: o.classes.wrapper, style: o.wrapperStyle }, [Je(g("img", { ref: "image", src: n.image && n.image.src, class: o.classes.image, style: o.imageStyle }, null, 14, ["src"]), [[eo, n.image && n.image.src]])], 6)], 6);
|
|
10057
10073
|
};
|
|
10058
10074
|
var sd = { components: { Preview: id }, inheritAttrs: !1 };
|
|
10059
10075
|
sd.render = function(t, e, n, i, s, o) {
|
|
@@ -10113,7 +10129,7 @@ var r1 = ["transitions"], xn = ln("vue-advanced-cropper"), ad = { name: "Cropper
|
|
|
10113
10129
|
o.widthFrozen && (r.left = 0, r.right = 0), o.heightFrozen && (r.top = 0, r.bottom = 0), gn.forEach(function(V) {
|
|
10114
10130
|
d[V] || (r[V] = 0);
|
|
10115
10131
|
});
|
|
10116
|
-
var c = pn(a, r = ll({ coordinates: a, directions: r, sizeRestrictions: o, positionRestrictions: s })).width, h = pn(a, r).height, p = l.preserveRatio ?
|
|
10132
|
+
var c = pn(a, r = ll({ coordinates: a, directions: r, sizeRestrictions: o, positionRestrictions: s })).width, h = pn(a, r).height, p = l.preserveRatio ? _e(a) : Xo(c / h, i);
|
|
10117
10133
|
if (p) {
|
|
10118
10134
|
var b = l.respectDirection;
|
|
10119
10135
|
if (b || (b = a.width >= a.height || p === 1 ? "width" : "height"), b === "width") {
|
|
@@ -10131,30 +10147,30 @@ var r1 = ["transitions"], xn = ln("vue-advanced-cropper"), ad = { name: "Cropper
|
|
|
10131
10147
|
}
|
|
10132
10148
|
r = ll({ directions: r, coordinates: a, sizeRestrictions: o, positionRestrictions: s, preserveRatio: !0, compensate: l.compensate });
|
|
10133
10149
|
}
|
|
10134
|
-
return c = pn(a, r).width, h = pn(a, r).height, (p = l.preserveRatio ?
|
|
10150
|
+
return c = pn(a, r).width, h = pn(a, r).height, (p = l.preserveRatio ? _e(a) : Xo(c / h, i)) && Math.abs(p - c / h) > 1e-3 && gn.forEach(function(V) {
|
|
10135
10151
|
d[V] || (r[V] = 0);
|
|
10136
10152
|
}), Ca({ event: new Na({ left: -r.left, top: -r.top }), coordinates: { width: n.width + r.right + r.left, height: n.height + r.top + r.bottom, left: n.left, top: n.top }, positionRestrictions: s });
|
|
10137
10153
|
} }, moveAlgorithm: { type: Function, default: Ca }, initStretcher: { type: Function, default: function(t) {
|
|
10138
|
-
var e = t.stretcher, n = t.imageSize, i =
|
|
10154
|
+
var e = t.stretcher, n = t.imageSize, i = _e(n);
|
|
10139
10155
|
e.style.width = n.width + "px", e.style.height = e.clientWidth / i + "px", e.style.width = e.clientWidth + "px";
|
|
10140
10156
|
} }, fitCoordinates: { type: Function, default: function(t) {
|
|
10141
10157
|
var e = t.visibleArea, n = t.coordinates, i = t.aspectRatio, s = t.sizeRestrictions, o = t.positionRestrictions, a = ge(ge({}, n), Pn({ width: n.width, height: n.height, aspectRatio: i, sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minHeight: Math.min(e.height, s.minHeight), minWidth: Math.min(e.width, s.minWidth) } }));
|
|
10142
10158
|
return a = Pt(a = qt(a, Ri(Tt(n), Tt(a))), yo(bn(e), o));
|
|
10143
10159
|
} }, fitVisibleArea: { type: Function, default: function(t) {
|
|
10144
10160
|
var e = t.visibleArea, n = t.boundaries, i = t.getAreaRestrictions, s = t.coordinates, o = ge({}, e);
|
|
10145
|
-
o.height = o.width /
|
|
10161
|
+
o.height = o.width / _e(n), o.top += (e.height - o.height) / 2, (s.height - o.height > 0 || s.width - o.width > 0) && (o = Jt(o, Math.max(s.height / o.height, s.width / o.width)));
|
|
10146
10162
|
var a = go(Mi(s, bn(o = Jt(o, vo(o, i({ visibleArea: o, type: "resize" }))))));
|
|
10147
10163
|
return o.width < s.width && (a.left = 0), o.height < s.height && (a.top = 0), o = Pt(o = qt(o, a), i({ visibleArea: o, type: "move" }));
|
|
10148
10164
|
} }, areaRestrictionsAlgorithm: { type: Function, default: function(t) {
|
|
10149
10165
|
var e = t.visibleArea, n = t.boundaries, i = t.imageSize, s = t.imageRestriction, o = t.type, a = {};
|
|
10150
|
-
return s === "fill-area" ? a = { left: 0, top: 0, right: i.width, bottom: i.height } : s === "fit-area" && (
|
|
10166
|
+
return s === "fill-area" ? a = { left: 0, top: 0, right: i.width, bottom: i.height } : s === "fit-area" && (_e(n) > _e(i) ? (a = { top: 0, bottom: i.height }, e && o === "move" && (e.width > i.width ? (a.left = -(e.width - i.width) / 2, a.right = i.width - a.left) : (a.left = 0, a.right = i.width))) : (a = { left: 0, right: i.width }, e && o === "move" && (e.height > i.height ? (a.top = -(e.height - i.height) / 2, a.bottom = i.height - a.top) : (a.top = 0, a.bottom = i.height)))), a;
|
|
10151
10167
|
} }, sizeRestrictionsAlgorithm: { type: Function, default: function(t) {
|
|
10152
10168
|
return { minWidth: t.minWidth, minHeight: t.minHeight, maxWidth: t.maxWidth, maxHeight: t.maxHeight };
|
|
10153
10169
|
} }, positionRestrictionsAlgorithm: { type: Function, default: function(t) {
|
|
10154
10170
|
var e = t.imageSize, n = {};
|
|
10155
10171
|
return t.imageRestriction !== "none" && (n = { left: 0, top: 0, right: e.width, bottom: e.height }), n;
|
|
10156
10172
|
} } }, data: function() {
|
|
10157
|
-
return { transitionsActive: !1, imageLoaded: !1, imageAttributes: { width: null, height: null, crossOrigin: null, src: null }, defaultImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, appliedImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, boundaries: { width: 0, height: 0 }, visibleArea: null, coordinates:
|
|
10173
|
+
return { transitionsActive: !1, imageLoaded: !1, imageAttributes: { width: null, height: null, crossOrigin: null, src: null }, defaultImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, appliedImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, boundaries: { width: 0, height: 0 }, visibleArea: null, coordinates: Le({}, sl) };
|
|
10158
10174
|
}, computed: { image: function() {
|
|
10159
10175
|
return { src: this.imageAttributes.src, width: this.imageAttributes.width, height: this.imageAttributes.height, transforms: this.imageTransforms };
|
|
10160
10176
|
}, imageTransforms: function() {
|
|
@@ -10177,7 +10193,7 @@ var r1 = ["transitions"], xn = ln("vue-advanced-cropper"), ad = { name: "Cropper
|
|
|
10177
10193
|
return { enabled: this.transitionsActive, timingFunction: "ease-in-out", time: 350 };
|
|
10178
10194
|
}, sizeRestrictions: function() {
|
|
10179
10195
|
if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
|
|
10180
|
-
var t = this.sizeRestrictionsAlgorithm({ imageSize: this.imageSize, minWidth:
|
|
10196
|
+
var t = this.sizeRestrictionsAlgorithm({ imageSize: this.imageSize, minWidth: gt(this.minWidth) ? 0 : Is(this.minWidth), minHeight: gt(this.minHeight) ? 0 : Is(this.minHeight), maxWidth: gt(this.maxWidth) ? 1 / 0 : Is(this.maxWidth), maxHeight: gt(this.maxHeight) ? 1 / 0 : Is(this.maxHeight) });
|
|
10181
10197
|
if (t = function(i) {
|
|
10182
10198
|
var s = i.areaRestrictions, o = i.sizeRestrictions, a = i.boundaries, l = i.positionRestrictions, r = ge(ge({}, o), { minWidth: o.minWidth !== void 0 ? o.minWidth : 0, minHeight: o.minHeight !== void 0 ? o.minHeight : 0, maxWidth: o.maxWidth !== void 0 ? o.maxWidth : 1 / 0, maxHeight: o.maxHeight !== void 0 ? o.maxHeight : 1 / 0 });
|
|
10183
10199
|
l.left !== void 0 && l.right !== void 0 && (r.maxWidth = Math.min(r.maxWidth, l.right - l.left)), l.bottom !== void 0 && l.top !== void 0 && (r.maxHeight = Math.min(r.maxHeight, l.bottom - l.top));
|
|
@@ -10204,7 +10220,7 @@ var r1 = ["transitions"], xn = ln("vue-advanced-cropper"), ad = { name: "Cropper
|
|
|
10204
10220
|
var t = { width: this.boundaries.width ? "".concat(Math.round(this.boundaries.width), "px") : "auto", height: this.boundaries.height ? "".concat(Math.round(this.boundaries.height), "px") : "auto", transition: "opacity ".concat(this.transitionTime, "ms"), pointerEvents: this.imageLoaded ? "all" : "none" };
|
|
10205
10221
|
return this.imageLoaded || (t.opacity = "0"), t;
|
|
10206
10222
|
}, imageStyle: function() {
|
|
10207
|
-
var t = this.imageAttributes.width > this.imageAttributes.height ? { width: Math.min(1024, this.imageAttributes.width), height: Math.min(1024, this.imageAttributes.width) / (this.imageAttributes.width / this.imageAttributes.height) } : { height: Math.min(1024, this.imageAttributes.height), width: Math.min(1024, this.imageAttributes.height) * (this.imageAttributes.width / this.imageAttributes.height) }, e = { left: (t.width - this.imageSize.width) / (2 * this.coefficient), top: (t.height - this.imageSize.height) / (2 * this.coefficient) }, n = { left: (1 - 1 / this.coefficient) * t.width / 2, top: (1 - 1 / this.coefficient) * t.height / 2 }, i =
|
|
10223
|
+
var t = this.imageAttributes.width > this.imageAttributes.height ? { width: Math.min(1024, this.imageAttributes.width), height: Math.min(1024, this.imageAttributes.width) / (this.imageAttributes.width / this.imageAttributes.height) } : { height: Math.min(1024, this.imageAttributes.height), width: Math.min(1024, this.imageAttributes.height) * (this.imageAttributes.width / this.imageAttributes.height) }, e = { left: (t.width - this.imageSize.width) / (2 * this.coefficient), top: (t.height - this.imageSize.height) / (2 * this.coefficient) }, n = { left: (1 - 1 / this.coefficient) * t.width / 2, top: (1 - 1 / this.coefficient) * t.height / 2 }, i = Le(Le({}, this.imageTransforms), {}, { scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / t.width), scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / t.height) }), s = { width: "".concat(t.width, "px"), height: "".concat(t.height, "px"), left: "0px", top: "0px", transform: "translate(".concat(-e.left - n.left - this.imageTransforms.translateX, "px, ").concat(-e.top - n.top - this.imageTransforms.translateY, "px)") + td(i) };
|
|
10208
10224
|
return this.transitionsOptions.enabled && (s.transition = "".concat(this.transitionsOptions.time, "ms ").concat(this.transitionsOptions.timingFunction)), s;
|
|
10209
10225
|
} }, watch: { src: function() {
|
|
10210
10226
|
this.onChangeImage();
|
|
@@ -10234,14 +10250,14 @@ var r1 = ["transitions"], xn = ln("vue-advanced-cropper"), ad = { name: "Cropper
|
|
|
10234
10250
|
}, unmounted: function() {
|
|
10235
10251
|
window.removeEventListener("resize", this.refresh), window.removeEventListener("orientationchange", this.refresh), this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.debouncedUpdate.clear(), this.debouncedDisableTransitions.clear();
|
|
10236
10252
|
}, methods: { getResult: function() {
|
|
10237
|
-
var t = this.initialized ? this.prepareResult(
|
|
10253
|
+
var t = this.initialized ? this.prepareResult(Le({}, this.coordinates)) : this.defaultCoordinates(), e = { rotate: this.imageTransforms.rotate % 360, flip: Le({}, this.imageTransforms.flip) };
|
|
10238
10254
|
if (this.src && this.imageLoaded) {
|
|
10239
10255
|
var n = this;
|
|
10240
|
-
return { image: this.image, coordinates: t, visibleArea: this.visibleArea ?
|
|
10256
|
+
return { image: this.image, coordinates: t, visibleArea: this.visibleArea ? Le({}, this.visibleArea) : null, imageTransforms: e, get canvas() {
|
|
10241
10257
|
return n.canvas ? n.getCanvas() : void 0;
|
|
10242
10258
|
} };
|
|
10243
10259
|
}
|
|
10244
|
-
return { image: this.image, coordinates: t, visibleArea: this.visibleArea ?
|
|
10260
|
+
return { image: this.image, coordinates: t, visibleArea: this.visibleArea ? Le({}, this.visibleArea) : null, canvas: void 0, imageTransforms: e };
|
|
10245
10261
|
}, zoom: function(t, e) {
|
|
10246
10262
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = n.transitions, s = i === void 0 || i;
|
|
10247
10263
|
this.onManipulateImage(new Qi({}, { factor: 1 / t, center: e }), { normalize: !1, transitions: s });
|
|
@@ -10274,12 +10290,12 @@ var r1 = ["transitions"], xn = ln("vue-advanced-cropper"), ad = { name: "Cropper
|
|
|
10274
10290
|
return this.roundResult ? function(e) {
|
|
10275
10291
|
var n = e.coordinates, i = e.sizeRestrictions, s = e.positionRestrictions, o = { width: Math.round(n.width), height: Math.round(n.height), left: Math.round(n.left), top: Math.round(n.top) };
|
|
10276
10292
|
return o.width > i.maxWidth ? o.width = Math.floor(n.width) : o.width < i.minWidth && (o.width = Math.ceil(n.width)), o.height > i.maxHeight ? o.height = Math.floor(n.height) : o.height < i.minHeight && (o.height = Math.ceil(n.height)), Pt(o, s);
|
|
10277
|
-
}(
|
|
10293
|
+
}(Le(Le({}, this.getPublicProperties()), {}, { positionRestrictions: Ms(this.positionRestrictions, this.visibleArea), coordinates: t })) : t;
|
|
10278
10294
|
}, processAutoZoom: function(t, e, n, i) {
|
|
10279
10295
|
var s = this.autoZoomAlgorithm;
|
|
10280
10296
|
s || (s = this.stencilSize ? qv : this.autoZoom ? Nv : Hv);
|
|
10281
10297
|
var o = s({ event: { type: t, params: i }, visibleArea: e, coordinates: n, boundaries: this.boundaries, aspectRatio: this.getAspectRatio(), positionRestrictions: this.positionRestrictions, getAreaRestrictions: this.getAreaRestrictions, sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize() });
|
|
10282
|
-
return
|
|
10298
|
+
return Le(Le({}, o), {}, { changed: !ol(o.visibleArea, e) || !ol(o.coordinates, n) });
|
|
10283
10299
|
}, runAutoZoom: function(t) {
|
|
10284
10300
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = e.transitions, i = n !== void 0 && n, s = Av(e, r1), o = this.processAutoZoom(t, this.visibleArea, this.coordinates, s), a = o.visibleArea, l = o.coordinates, r = o.changed;
|
|
10285
10301
|
i && r && this.enableTransitions(), this.visibleArea = a, this.coordinates = l, i && r && this.debouncedDisableTransitions();
|
|
@@ -10300,7 +10316,7 @@ var r1 = ["transitions"], xn = ln("vue-advanced-cropper"), ad = { name: "Cropper
|
|
|
10300
10316
|
}), a;
|
|
10301
10317
|
}
|
|
10302
10318
|
return n;
|
|
10303
|
-
}(
|
|
10319
|
+
}(Le(Le({}, this.getPublicProperties()), {}, { event: t }));
|
|
10304
10320
|
}, getCanvas: function() {
|
|
10305
10321
|
if (this.$refs.canvas) {
|
|
10306
10322
|
var t = this.$refs.canvas, e = this.$refs.image, n = this.imageTransforms.rotate !== 0 || this.imageTransforms.flip.horizontal || this.imageTransforms.flip.vertical ? function(l, r, d) {
|
|
@@ -10308,7 +10324,7 @@ var r1 = ["transitions"], xn = ln("vue-advanced-cropper"), ad = { name: "Cropper
|
|
|
10308
10324
|
l.height = b.height, l.width = b.width, k.save();
|
|
10309
10325
|
var P = Vn(Tt(ge({ left: 0, top: 0 }, p)), c);
|
|
10310
10326
|
return k.translate(-(P.left - b.width / 2), -(P.top - b.height / 2)), k.rotate(c * Math.PI / 180), k.translate(h.horizontal ? p.width : 0, h.vertical ? p.height : 0), k.scale(h.horizontal ? -1 : 1, h.vertical ? -1 : 1), k.drawImage(r, 0, 0, p.width, p.height), k.restore(), l;
|
|
10311
|
-
}(this.$refs.sourceCanvas, e, this.imageTransforms) : e, i =
|
|
10327
|
+
}(this.$refs.sourceCanvas, e, this.imageTransforms) : e, i = Le({ minWidth: 0, minHeight: 0, maxWidth: 1 / 0, maxHeight: 1 / 0, maxArea: this.maxCanvasSize, imageSmoothingEnabled: !0, imageSmoothingQuality: "high", fillColor: "transparent" }, this.canvas), s = function(l) {
|
|
10312
10328
|
return l.find(function(r) {
|
|
10313
10329
|
return d = r, !Number.isNaN(parseFloat(d)) && isFinite(d);
|
|
10314
10330
|
var d;
|
|
@@ -10341,7 +10357,7 @@ var r1 = ["transitions"], xn = ln("vue-advanced-cropper"), ad = { name: "Cropper
|
|
|
10341
10357
|
n.minWidth, n.minHeight, n.maxWidth, n.maxHeight;
|
|
10342
10358
|
var i = mi(e) ? e({ boundaries: this.boundaries, imageSize: this.imageSize, aspectRatio: this.getAspectRatio(), sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize(), visibleArea: this.visibleArea }) : e, s = this.defaultPosition || jv, o = [i, function(a) {
|
|
10343
10359
|
var l = a.coordinates;
|
|
10344
|
-
return
|
|
10360
|
+
return Le({}, mi(s) ? s({ coordinates: l, imageSize: t.imageSize, visibleArea: t.visibleArea }) : t.defaultPosition);
|
|
10345
10361
|
}];
|
|
10346
10362
|
this.delayedTransforms && o.push.apply(o, li(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(o, !0), this.delayedTransforms = null;
|
|
10347
10363
|
}
|
|
@@ -10369,10 +10385,10 @@ var r1 = ["transitions"], xn = ln("vue-advanced-cropper"), ad = { name: "Cropper
|
|
|
10369
10385
|
});
|
|
10370
10386
|
}, resetVisibleArea: function() {
|
|
10371
10387
|
var t = this;
|
|
10372
|
-
return this.appliedImageTransforms =
|
|
10388
|
+
return this.appliedImageTransforms = Le(Le({}, this.defaultImageTransforms), {}, { flip: Le({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then(function() {
|
|
10373
10389
|
t.priority !== "visible-area" && (t.visibleArea = null, t.resetCoordinates());
|
|
10374
10390
|
var e, n, i, s, o, a, l = t.defaultVisibleArea || Yv;
|
|
10375
|
-
t.visibleArea = mi(l) ? l({ imageSize: t.imageSize, boundaries: t.boundaries, coordinates: t.priority !== "visible-area" ? t.coordinates : null, getAreaRestrictions: t.getAreaRestrictions, stencilSize: t.getStencilSize() }) : t.defaultVisibleArea, t.visibleArea = (e = { visibleArea: t.visibleArea, boundaries: t.boundaries, getAreaRestrictions: t.getAreaRestrictions }, n = e.visibleArea, i = e.boundaries, s = e.getAreaRestrictions, o = ge({}, n), a =
|
|
10391
|
+
t.visibleArea = mi(l) ? l({ imageSize: t.imageSize, boundaries: t.boundaries, coordinates: t.priority !== "visible-area" ? t.coordinates : null, getAreaRestrictions: t.getAreaRestrictions, stencilSize: t.getStencilSize() }) : t.defaultVisibleArea, t.visibleArea = (e = { visibleArea: t.visibleArea, boundaries: t.boundaries, getAreaRestrictions: t.getAreaRestrictions }, n = e.visibleArea, i = e.boundaries, s = e.getAreaRestrictions, o = ge({}, n), a = _e(i), o.width / o.height !== a && (o.height = o.width / a), Pt(o, s({ visibleArea: o, type: "move" }))), t.priority === "visible-area" ? t.resetCoordinates() : t.coordinates = t.fitCoordinates({ visibleArea: t.visibleArea, coordinates: t.coordinates, aspectRatio: t.getAspectRatio(), positionRestrictions: t.positionRestrictions, sizeRestrictions: t.sizeRestrictions }), t.runAutoZoom("resetVisibleArea");
|
|
10376
10392
|
}).catch(function() {
|
|
10377
10393
|
t.visibleArea = null;
|
|
10378
10394
|
});
|
|
@@ -10396,7 +10412,7 @@ var r1 = ["transitions"], xn = ln("vue-advanced-cropper"), ad = { name: "Cropper
|
|
|
10396
10412
|
};
|
|
10397
10413
|
return !(!l.protocol && !l.host && !l.port || l.protocol && l.protocol == o.protocol && l.host && l.host == o.host && l.host && r(l) == r(o));
|
|
10398
10414
|
}(this.src)) {
|
|
10399
|
-
var n =
|
|
10415
|
+
var n = gt(this.crossOrigin) ? this.canvas : this.crossOrigin;
|
|
10400
10416
|
n === !0 && (n = "anonymous"), this.imageAttributes.crossOrigin = n || null;
|
|
10401
10417
|
}
|
|
10402
10418
|
if (this.checkOrientation) {
|
|
@@ -10455,7 +10471,7 @@ var r1 = ["transitions"], xn = ln("vue-advanced-cropper"), ad = { name: "Cropper
|
|
|
10455
10471
|
a.rotate = -90;
|
|
10456
10472
|
}
|
|
10457
10473
|
return a;
|
|
10458
|
-
}(s), this.defaultImageTransforms =
|
|
10474
|
+
}(s), this.defaultImageTransforms = Le(Le({}, this.appliedImageTransforms), {}, { flip: Le({}, this.appliedImageTransforms.flip) }), this.$nextTick(function() {
|
|
10459
10475
|
var o = e.$refs.image;
|
|
10460
10476
|
o && o.complete && (function(a) {
|
|
10461
10477
|
return !!a.naturalWidth;
|
|
@@ -10468,20 +10484,20 @@ var r1 = ["transitions"], xn = ln("vue-advanced-cropper"), ad = { name: "Cropper
|
|
|
10468
10484
|
}, onMove: function(t) {
|
|
10469
10485
|
var e = this;
|
|
10470
10486
|
this.transitionsOptions.enabled || this.awaitRender(function() {
|
|
10471
|
-
e.coordinates = e.moveAlgorithm(
|
|
10487
|
+
e.coordinates = e.moveAlgorithm(Le(Le({}, e.getPublicProperties()), {}, { positionRestrictions: Ms(e.positionRestrictions, e.visibleArea), coordinates: e.coordinates, event: e.normalizeEvent(t) })), e.onChange();
|
|
10472
10488
|
});
|
|
10473
10489
|
}, onResize: function(t) {
|
|
10474
10490
|
var e = this;
|
|
10475
10491
|
this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender(function() {
|
|
10476
10492
|
var n = e.sizeRestrictions, i = Math.min(e.coordinates.width, e.coordinates.height, 20 * e.coefficient);
|
|
10477
|
-
e.coordinates = e.resizeAlgorithm(
|
|
10493
|
+
e.coordinates = e.resizeAlgorithm(Le(Le({}, e.getPublicProperties()), {}, { positionRestrictions: Ms(e.positionRestrictions, e.visibleArea), sizeRestrictions: { maxWidth: Math.min(n.maxWidth, e.visibleArea.width), maxHeight: Math.min(n.maxHeight, e.visibleArea.height), minWidth: Math.max(n.minWidth, i), minHeight: Math.max(n.minHeight, i) }, event: e.normalizeEvent(t) })), e.onChange(), e.ticking = !1;
|
|
10478
10494
|
});
|
|
10479
10495
|
}, onManipulateImage: function(t) {
|
|
10480
10496
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
10481
10497
|
if (!this.transitionsOptions.enabled) {
|
|
10482
10498
|
var n = e.transitions, i = n !== void 0 && n, s = e.normalize, o = s === void 0 || s;
|
|
10483
10499
|
i && this.enableTransitions();
|
|
10484
|
-
var a = Qv(
|
|
10500
|
+
var a = Qv(Le(Le({}, this.getPublicProperties()), {}, { event: o ? this.normalizeEvent(t) : t, getAreaRestrictions: this.getAreaRestrictions, imageRestriction: this.imageRestriction, adjustStencil: !this.stencilSize && this.settings.resizeImage.adjustStencil })), l = a.visibleArea, r = a.coordinates;
|
|
10485
10501
|
this.visibleArea = l, this.coordinates = r, this.runAutoZoom("manipulateImage"), this.onChange(), i && this.debouncedDisableTransitions();
|
|
10486
10502
|
}
|
|
10487
10503
|
}, onPropsChange: function() {
|
|
@@ -10495,30 +10511,30 @@ var r1 = ["transitions"], xn = ln("vue-advanced-cropper"), ad = { name: "Cropper
|
|
|
10495
10511
|
var l = this.$refs.stencil.aspectRatios();
|
|
10496
10512
|
e = l.minimum, n = l.maximum;
|
|
10497
10513
|
}
|
|
10498
|
-
if (
|
|
10499
|
-
var r = this.getStencilSize(), d = r ?
|
|
10500
|
-
|
|
10514
|
+
if (gt(e) && (e = gt(s) ? o : s), gt(n) && (n = gt(s) ? a : s), !t && (gt(e) || gt(n))) {
|
|
10515
|
+
var r = this.getStencilSize(), d = r ? _e(r) : null;
|
|
10516
|
+
gt(e) && (e = il(d) ? d : void 0), gt(n) && (n = il(d) ? d : void 0);
|
|
10501
10517
|
}
|
|
10502
10518
|
return { minimum: e, maximum: n };
|
|
10503
10519
|
}, getStencilSize: function() {
|
|
10504
|
-
if (this.stencilSize) return t = { currentStencilSize: { width: this.stencilCoordinates.width, height: this.stencilCoordinates.height }, stencilSize: this.stencilSize, boundaries: this.boundaries, coefficient: this.coefficient, coordinates: this.coordinates, aspectRatio: this.getAspectRatio(!0) }, e = t.boundaries, n = t.stencilSize, i = t.aspectRatio, Xo(
|
|
10520
|
+
if (this.stencilSize) return t = { currentStencilSize: { width: this.stencilCoordinates.width, height: this.stencilCoordinates.height }, stencilSize: this.stencilSize, boundaries: this.boundaries, coefficient: this.coefficient, coordinates: this.coordinates, aspectRatio: this.getAspectRatio(!0) }, e = t.boundaries, n = t.stencilSize, i = t.aspectRatio, Xo(_e(s = mi(n) ? n({ boundaries: e, aspectRatio: i }) : n), i) && (s = Pn({ sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minWidth: 0, minHeight: 0 }, width: s.width, height: s.height, aspectRatio: { minimum: i.minimum, maximum: i.maximum } })), (s.width > e.width || s.height > e.height) && (s = Pn({ sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minWidth: 0, minHeight: 0 }, width: s.width, height: s.height, aspectRatio: { minimum: _e(s), maximum: _e(s) } })), s;
|
|
10505
10521
|
var t, e, n, i, s;
|
|
10506
10522
|
}, getPublicProperties: function() {
|
|
10507
10523
|
return { coefficient: this.coefficient, visibleArea: this.visibleArea, coordinates: this.coordinates, boundaries: this.boundaries, sizeRestrictions: this.sizeRestrictions, positionRestrictions: this.positionRestrictions, aspectRatio: this.getAspectRatio(), imageRestriction: this.imageRestriction };
|
|
10508
10524
|
}, defaultCoordinates: function() {
|
|
10509
|
-
return
|
|
10525
|
+
return Le({}, sl);
|
|
10510
10526
|
}, flip: function(t, e) {
|
|
10511
10527
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = n.transitions, s = i === void 0 || i;
|
|
10512
10528
|
if (!this.transitionsActive) {
|
|
10513
10529
|
s && this.enableTransitions();
|
|
10514
|
-
var o =
|
|
10530
|
+
var o = Le({}, this.imageTransforms.flip), a = Zv({ flip: { horizontal: t ? !o.horizontal : o.horizontal, vertical: e ? !o.vertical : o.vertical }, previousFlip: o, rotate: this.imageTransforms.rotate, visibleArea: this.visibleArea, coordinates: this.coordinates, imageSize: this.imageSize, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), l = a.visibleArea, r = a.coordinates;
|
|
10515
10531
|
t && (this.appliedImageTransforms.flip.horizontal = !this.appliedImageTransforms.flip.horizontal), e && (this.appliedImageTransforms.flip.vertical = !this.appliedImageTransforms.flip.vertical), this.visibleArea = l, this.coordinates = r, this.onChange(), s && this.debouncedDisableTransitions();
|
|
10516
10532
|
}
|
|
10517
10533
|
}, rotate: function(t) {
|
|
10518
10534
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = e.transitions, i = n === void 0 || n;
|
|
10519
10535
|
if (!this.transitionsActive) {
|
|
10520
10536
|
i && this.enableTransitions();
|
|
10521
|
-
var s =
|
|
10537
|
+
var s = Le({}, this.imageSize);
|
|
10522
10538
|
this.appliedImageTransforms.rotate += t;
|
|
10523
10539
|
var o = Xv({ visibleArea: this.visibleArea, coordinates: this.coordinates, previousImageSize: s, imageSize: this.imageSize, angle: t, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), a = o.visibleArea, l = o.coordinates, r = this.processAutoZoom("rotateImage", a, l);
|
|
10524
10540
|
a = r.visibleArea, l = r.coordinates, this.visibleArea = a, this.coordinates = l, this.onChange(), i && this.debouncedDisableTransitions();
|
|
@@ -10527,7 +10543,7 @@ var r1 = ["transitions"], xn = ln("vue-advanced-cropper"), ad = { name: "Cropper
|
|
|
10527
10543
|
ad.render = function(t, e, n, i, s, o) {
|
|
10528
10544
|
return m(), z("div", { ref: "cropper", class: o.classes.cropper }, [g("div", { ref: "stretcher", class: o.classes.stretcher }, null, 2), g("div", { class: o.classes.boundaries, style: o.boundariesStyle }, [(m(), z(Rn(n.backgroundWrapperComponent), { class: o.classes.cropperWrapper, "wheel-resize": o.settings.resizeImage.wheel, "touch-resize": o.settings.resizeImage.touch, "touch-move": o.settings.moveImage.touch, "mouse-move": o.settings.moveImage.mouse, onMove: o.onManipulateImage, onResize: o.onManipulateImage }, { default: C(function() {
|
|
10529
10545
|
return [g("div", { class: o.classes.background, style: o.boundariesStyle }, null, 6), g("div", { class: o.classes.imageWrapper }, [g("img", { ref: "image", crossorigin: s.imageAttributes.crossOrigin, src: s.imageAttributes.src, class: o.classes.image, style: o.imageStyle, onMousedown: e[1] || (e[1] = Ye(function() {
|
|
10530
|
-
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), g("div", { class: o.classes.foreground, style: o.boundariesStyle }, null, 6),
|
|
10546
|
+
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), g("div", { class: o.classes.foreground, style: o.boundariesStyle }, null, 6), Je((m(), z(Rn(n.stencilComponent), at({ ref: "stencil", image: o.image, coordinates: s.coordinates, "stencil-coordinates": o.stencilCoordinates, transitions: o.transitionsOptions }, n.stencilProps, { onResize: o.onResize, onResizeEnd: o.onResizeEnd, onMove: o.onMove, onMoveEnd: o.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[eo, s.imageLoaded]]), n.canvas ? (m(), z("canvas", l1, null, 512)) : G("", !0), n.canvas ? (m(), z("canvas", u1, null, 512)) : G("", !0)];
|
|
10531
10547
|
}), _: 1 }, 8, ["class", "wheel-resize", "touch-resize", "touch-move", "mouse-move", "onMove", "onResize"]))], 6)], 2);
|
|
10532
10548
|
};
|
|
10533
10549
|
const d1 = {
|
|
@@ -10812,7 +10828,7 @@ const c1 = { class: "cropper-wrapper" }, f1 = { class: "row justify-end q-mt-md"
|
|
|
10812
10828
|
g(f(kt), { class: "row items-center q-pb-none" }, {
|
|
10813
10829
|
default: C(() => [
|
|
10814
10830
|
g(f(_n)),
|
|
10815
|
-
|
|
10831
|
+
Je(g(ue, {
|
|
10816
10832
|
icon: "close",
|
|
10817
10833
|
flat: "",
|
|
10818
10834
|
round: "",
|
|
@@ -10849,7 +10865,7 @@ const c1 = { class: "cropper-wrapper" }, f1 = { class: "row justify-end q-mt-md"
|
|
|
10849
10865
|
class: "p-form-image-input__status"
|
|
10850
10866
|
}, S1 = /* @__PURE__ */ j({
|
|
10851
10867
|
__name: "PFormImageInput",
|
|
10852
|
-
props: /* @__PURE__ */
|
|
10868
|
+
props: /* @__PURE__ */ De({
|
|
10853
10869
|
height: { default: 180 },
|
|
10854
10870
|
ratio: { default: 16 / 9 }
|
|
10855
10871
|
}, {
|
|
@@ -10858,7 +10874,7 @@ const c1 = { class: "cropper-wrapper" }, f1 = { class: "row justify-end q-mt-md"
|
|
|
10858
10874
|
}),
|
|
10859
10875
|
emits: ["update:modelValue"],
|
|
10860
10876
|
setup(t) {
|
|
10861
|
-
const e =
|
|
10877
|
+
const e = vt(t, "modelValue"), n = ht(new Nt());
|
|
10862
10878
|
n.getFileUrl = () => n.url || n.fileSystemPath;
|
|
10863
10879
|
const i = O(!1);
|
|
10864
10880
|
Ae(
|
|
@@ -11183,7 +11199,7 @@ const T1 = { class: "p-form-renderer" }, P1 = {
|
|
|
11183
11199
|
}, [
|
|
11184
11200
|
l(x) ? (m(), S(K, { key: 0 }, [
|
|
11185
11201
|
x.name ? (m(), S("div", M1, U(x.name), 1)) : G("", !0),
|
|
11186
|
-
(m(!0), S(K, null, we(x.fields, (V) =>
|
|
11202
|
+
(m(!0), S(K, null, we(x.fields, (V) => Je((m(), S("div", {
|
|
11187
11203
|
key: V.id,
|
|
11188
11204
|
class: "field-block q-mb-md"
|
|
11189
11205
|
}, [
|
|
@@ -11368,7 +11384,7 @@ const T1 = { class: "p-form-renderer" }, P1 = {
|
|
|
11368
11384
|
class: "text-caption text-grey-7 q-pt-md"
|
|
11369
11385
|
}, dy = { class: "col-auto" }, cy = /* @__PURE__ */ j({
|
|
11370
11386
|
__name: "PFormFieldEditor",
|
|
11371
|
-
props: /* @__PURE__ */
|
|
11387
|
+
props: /* @__PURE__ */ De({
|
|
11372
11388
|
valueTypes: {},
|
|
11373
11389
|
typeLabels: {},
|
|
11374
11390
|
fields: {}
|
|
@@ -11376,9 +11392,9 @@ const T1 = { class: "p-form-renderer" }, P1 = {
|
|
|
11376
11392
|
field: { required: !0 },
|
|
11377
11393
|
fieldModifiers: {}
|
|
11378
11394
|
}),
|
|
11379
|
-
emits: /* @__PURE__ */
|
|
11395
|
+
emits: /* @__PURE__ */ De(["move", "remove", "change"], ["update:field"]),
|
|
11380
11396
|
setup(t, { emit: e }) {
|
|
11381
|
-
const n =
|
|
11397
|
+
const n = vt(t, "field"), i = t, s = e, o = {
|
|
11382
11398
|
string: "Строка",
|
|
11383
11399
|
text: "Текст",
|
|
11384
11400
|
number: "Число",
|
|
@@ -11417,9 +11433,9 @@ const T1 = { class: "p-form-renderer" }, P1 = {
|
|
|
11417
11433
|
], k = D(
|
|
11418
11434
|
() => (i.fields ?? []).filter((I) => I.id !== n.value.id).map((I) => ({ label: I.name || I.code || "Вопрос", value: I.id }))
|
|
11419
11435
|
), P = (I) => (i.fields ?? []).find((L) => L.id === I.dependsOnFieldId), E = (I) => ["equals", "notEquals", "contains", "notContains"].includes(I), T = (I) => {
|
|
11420
|
-
var xe, ke,
|
|
11436
|
+
var xe, ke, Ke, mt;
|
|
11421
11437
|
const L = P(I);
|
|
11422
|
-
return (!!((ke = (xe = L == null ? void 0 : L.valueType) == null ? void 0 : xe.isRadio) != null && ke.call(xe)) || !!((
|
|
11438
|
+
return (!!((ke = (xe = L == null ? void 0 : L.valueType) == null ? void 0 : xe.isRadio) != null && ke.call(xe)) || !!((mt = (Ke = L == null ? void 0 : L.valueType) == null ? void 0 : Ke.isSet) != null && mt.call(Ke))) && E(I.operator);
|
|
11423
11439
|
}, M = (I) => !["answered", "notAnswered"].includes(I.operator), x = (I) => {
|
|
11424
11440
|
var L;
|
|
11425
11441
|
return (((L = P(I)) == null ? void 0 : L.answerVariants) ?? []).map((Q) => ({ label: Q.name, value: Q.id }));
|
|
@@ -11619,16 +11635,16 @@ const T1 = { class: "p-form-renderer" }, P1 = {
|
|
|
11619
11635
|
class: "col-auto"
|
|
11620
11636
|
}, my = { class: "col" }, py = { class: "col-auto" }, gy = { class: "drag-handle" }, vy = /* @__PURE__ */ j({
|
|
11621
11637
|
__name: "PFormSectionEditor",
|
|
11622
|
-
props: /* @__PURE__ */
|
|
11638
|
+
props: /* @__PURE__ */ De({
|
|
11623
11639
|
valueTypes: {},
|
|
11624
11640
|
fields: {}
|
|
11625
11641
|
}, {
|
|
11626
11642
|
section: { required: !0 },
|
|
11627
11643
|
sectionModifiers: {}
|
|
11628
11644
|
}),
|
|
11629
|
-
emits: /* @__PURE__ */
|
|
11645
|
+
emits: /* @__PURE__ */ De(["move", "remove", "change"], ["update:section"]),
|
|
11630
11646
|
setup(t, { emit: e }) {
|
|
11631
|
-
const n =
|
|
11647
|
+
const n = vt(t, "section"), i = e, s = () => {
|
|
11632
11648
|
n.value.sortFields();
|
|
11633
11649
|
}, o = () => {
|
|
11634
11650
|
s(), i("change");
|
|
@@ -11729,15 +11745,15 @@ const T1 = { class: "p-form-renderer" }, P1 = {
|
|
|
11729
11745
|
style: { "min-width": "180px" }
|
|
11730
11746
|
}, Cy = { class: "col-auto" }, ky = { class: "form-image q-mb-md" }, xy = { class: "drag-handle" }, $y = { class: "preview-card" }, Ty = { class: "row items-center justify-between q-mb-md" }, Py = /* @__PURE__ */ j({
|
|
11731
11747
|
__name: "PFormBuilder",
|
|
11732
|
-
props: /* @__PURE__ */
|
|
11748
|
+
props: /* @__PURE__ */ De({
|
|
11733
11749
|
valueTypes: {}
|
|
11734
11750
|
}, {
|
|
11735
11751
|
form: { required: !0 },
|
|
11736
11752
|
formModifiers: {}
|
|
11737
11753
|
}),
|
|
11738
|
-
emits: /* @__PURE__ */
|
|
11754
|
+
emits: /* @__PURE__ */ De(["change", "save"], ["update:form"]),
|
|
11739
11755
|
setup(t, { emit: e }) {
|
|
11740
|
-
const n =
|
|
11756
|
+
const n = vt(t, "form"), i = t, s = e, o = O(i.valueTypes ?? []), a = O(!1), l = [
|
|
11741
11757
|
{ label: "Черновик", value: "draft" },
|
|
11742
11758
|
{ label: "Опубликована", value: "published" }
|
|
11743
11759
|
], r = D(() => n.value.getFields()), d = O(null), c = () => {
|
|
@@ -12386,7 +12402,7 @@ class $o {
|
|
|
12386
12402
|
Ce.BuildClass(this, e);
|
|
12387
12403
|
}
|
|
12388
12404
|
addFile(e) {
|
|
12389
|
-
this.icon.id || (this.icon.id =
|
|
12405
|
+
this.icon.id || (this.icon.id = Lt.UUID()), this.icon.originalName = e.name, this.icon.file = e.raw;
|
|
12390
12406
|
}
|
|
12391
12407
|
}
|
|
12392
12408
|
var e0 = Object.defineProperty, t0 = (t, e, n, i) => {
|
|
@@ -12423,7 +12439,7 @@ class Ja {
|
|
|
12423
12439
|
}), e;
|
|
12424
12440
|
}
|
|
12425
12441
|
addFile(e) {
|
|
12426
|
-
this.icon.id || (this.icon.id =
|
|
12442
|
+
this.icon.id || (this.icon.id = Lt.UUID()), this.icon.originalName = e.name, this.icon.file = e.raw;
|
|
12427
12443
|
}
|
|
12428
12444
|
addSubMenu() {
|
|
12429
12445
|
this.subMenus.push(new $o());
|
|
@@ -12770,36 +12786,36 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12770
12786
|
SchedulePlace: ys,
|
|
12771
12787
|
ScheduleSession: vs,
|
|
12772
12788
|
ScheduleSlot: Yn
|
|
12773
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
12789
|
+
}, Symbol.toStringTag, { value: "Module" })), Ve = (t) => t ? Y.H.Time.HMtoM(t) : NaN, It = (t) => Y.H.Time.ConcatHM(Math.floor(t / 60), t % 60), Zn = (t) => {
|
|
12774
12790
|
if (!t)
|
|
12775
12791
|
return "";
|
|
12776
12792
|
const e = Y.H.Time.HmsToHm(t);
|
|
12777
12793
|
return /^\d{1,2}:\d{2}$/.test(e) ? e : "";
|
|
12778
12794
|
}, vi = (t, e) => Y.H.Time.DiffM(t ?? "", e ?? ""), tn = (t, e) => Y.H.Time.AddMtoHM(t, e), $a = (t, e) => {
|
|
12779
|
-
const n =
|
|
12795
|
+
const n = Ve(t.startTime), i = Ve(e.startTime);
|
|
12780
12796
|
return isFinite(n) ? isFinite(i) ? n - i : -1 : 1;
|
|
12781
12797
|
}, Wi = (t, e) => {
|
|
12782
|
-
const n =
|
|
12798
|
+
const n = Ve(t.startTime), i = Ve(t.endTime), s = Ve(e.startTime), o = Ve(e.endTime);
|
|
12783
12799
|
return !isFinite(n) || !isFinite(i) || !isFinite(s) || !isFinite(o) ? !1 : n < o && s < i;
|
|
12784
12800
|
}, Yi = (t, e) => Math.round(t / e) * e, Id = (t, e = 8 * 60, n = 20 * 60) => {
|
|
12785
12801
|
let i = e, s = n;
|
|
12786
12802
|
for (const { item: l } of t) {
|
|
12787
|
-
const r =
|
|
12803
|
+
const r = Ve(l.startTime), d = Ve(l.endTime);
|
|
12788
12804
|
isFinite(r) && (i = Math.min(i, r)), isFinite(d) && (s = Math.max(s, d));
|
|
12789
12805
|
}
|
|
12790
12806
|
const o = Math.floor(i / 60) * 60, a = Math.ceil(s / 60) * 60;
|
|
12791
12807
|
return { start: o, end: a, total: a - o || 60 };
|
|
12792
12808
|
}, Md = (t, e) => {
|
|
12793
|
-
const n =
|
|
12809
|
+
const n = Ve(t.item.startTime), i = Ve(t.item.endTime);
|
|
12794
12810
|
if (!isFinite(n) || !isFinite(i))
|
|
12795
12811
|
return { top: "0%", height: "48px" };
|
|
12796
12812
|
const s = (n - e.start) / e.total * 100, o = Math.max((i - n) / e.total * 100, 2.5);
|
|
12797
12813
|
return { top: s + "%", height: o + "%" };
|
|
12798
12814
|
}, Ad = (t, e) => {
|
|
12799
|
-
const n =
|
|
12815
|
+
const n = Ve(t.startTime), i = Ve(t.endTime);
|
|
12800
12816
|
if (!isFinite(n) || !isFinite(i) || i <= n)
|
|
12801
12817
|
return { top: "0%", height: "auto" };
|
|
12802
|
-
const s = i - n, o =
|
|
12818
|
+
const s = i - n, o = Ve(e.startTime), a = Ve(e.endTime), l = isFinite(o) ? Math.max((o - n) / s * 100, 0) : 0;
|
|
12803
12819
|
let r = isFinite(o) && isFinite(a) ? (a - o) / s * 100 : 8;
|
|
12804
12820
|
return r = Math.min(Math.max(r, 3), 100 - l), { top: l + "%", height: r + "%" };
|
|
12805
12821
|
}, Ed = (t, e, n) => t.some((i) => i.item.id === e.item.id || e.kind === "session" && i.kind === "slot" && i.item.sessionId === e.item.id ? !1 : n(e.item, i.item)), Fd = (t, e, n) => t.some((i) => i.id !== e.id && n(e, i)), Od = (t, e, n, i) => {
|
|
@@ -13158,12 +13174,12 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13158
13174
|
})), a = D(() => ({
|
|
13159
13175
|
...Ld,
|
|
13160
13176
|
...e.factories
|
|
13161
|
-
})), l = (v) => e.slotListOf ? e.slotListOf(v) : (v == null ? void 0 : v.slots) || [], r = (v) => e.nestedSlotListOf ? e.nestedSlotListOf(v) : (v == null ? void 0 : v.slots) || [], d = (v) => (v == null ? void 0 : v.name) || o.value.hall, c = (v) => e.sessionName ? e.sessionName(v) : (v == null ? void 0 : v.name) || `${o.value.session} ${(v == null ? void 0 : v.startTime) || ""}–${(v == null ? void 0 : v.endTime) || ""}`.trim(), h = (v) => e.slotName ? e.slotName(v) : (v == null ? void 0 : v.name) || o.value.slot, p = (v) => e.slotSubtitle ? e.slotSubtitle(v) : "", b = O("grid"), k = O((kr = (Cr = e.days) == null ? void 0 : Cr[0]) == null ? void 0 : kr.id), P = O(!1), E = O(""), T = O(!1), M = O(!1), x = O(null), V = O(null), $ = O(null), B = O(void 0), I = O(null), L = O(null), Q = O(!1), xe = O(0), ke = O(null),
|
|
13177
|
+
})), l = (v) => e.slotListOf ? e.slotListOf(v) : (v == null ? void 0 : v.slots) || [], r = (v) => e.nestedSlotListOf ? e.nestedSlotListOf(v) : (v == null ? void 0 : v.slots) || [], d = (v) => (v == null ? void 0 : v.name) || o.value.hall, c = (v) => e.sessionName ? e.sessionName(v) : (v == null ? void 0 : v.name) || `${o.value.session} ${(v == null ? void 0 : v.startTime) || ""}–${(v == null ? void 0 : v.endTime) || ""}`.trim(), h = (v) => e.slotName ? e.slotName(v) : (v == null ? void 0 : v.name) || o.value.slot, p = (v) => e.slotSubtitle ? e.slotSubtitle(v) : "", b = O("grid"), k = O((kr = (Cr = e.days) == null ? void 0 : Cr[0]) == null ? void 0 : kr.id), P = O(!1), E = O(""), T = O(!1), M = O(!1), x = O(null), V = O(null), $ = O(null), B = O(void 0), I = O(null), L = O(null), Q = O(!1), xe = O(0), ke = O(null), Ke = [
|
|
13162
13178
|
{ label: "5 мин", value: 5 },
|
|
13163
13179
|
{ label: "10 мин", value: 10 },
|
|
13164
13180
|
{ label: "15 мин", value: 15 },
|
|
13165
13181
|
{ label: "30 мин", value: 30 }
|
|
13166
|
-
],
|
|
13182
|
+
], mt = [
|
|
13167
13183
|
{ label: "20 px/ч", value: 20 },
|
|
13168
13184
|
{ label: "30 px/ч", value: 30 },
|
|
13169
13185
|
{ label: "40 px/ч", value: 40 },
|
|
@@ -13173,30 +13189,30 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13173
13189
|
{ label: "160 px/ч", value: 160 },
|
|
13174
13190
|
{ label: "200 px/ч", value: 200 },
|
|
13175
13191
|
{ label: "240 px/ч", value: 240 }
|
|
13176
|
-
],
|
|
13192
|
+
], Xe = D(() => [
|
|
13177
13193
|
{ label: o.value.grid, value: "grid", icon: "calendar_view_week" },
|
|
13178
13194
|
{ label: o.value.list, value: "list", icon: "view_list" }
|
|
13179
13195
|
]), rt = (v, w, R) => {
|
|
13180
13196
|
const q = Number(localStorage.getItem(v));
|
|
13181
13197
|
return w.includes(q) ? q : R;
|
|
13182
13198
|
}, lt = O(
|
|
13183
|
-
rt(cl,
|
|
13184
|
-
),
|
|
13185
|
-
rt(fl,
|
|
13199
|
+
rt(cl, Ke.map((v) => v.value), Mb)
|
|
13200
|
+
), Vt = O(
|
|
13201
|
+
rt(fl, mt.map((v) => v.value), Ab)
|
|
13186
13202
|
), yt = D(() => lt.value);
|
|
13187
|
-
Ae(lt, (v) => localStorage.setItem(cl, String(v))), Ae(
|
|
13188
|
-
const un = D(() => Math.max(
|
|
13203
|
+
Ae(lt, (v) => localStorage.setItem(cl, String(v))), Ae(Vt, (v) => localStorage.setItem(fl, String(v)));
|
|
13204
|
+
const un = D(() => Math.max(Ze.value.total / 60 * Vt.value, 360)), Dt = D(() => un.value + "px"), Ue = D(
|
|
13189
13205
|
() => [...e.days || []].sort(
|
|
13190
13206
|
(v, w) => new Date(v.date).getTime() - new Date(w.date).getTime()
|
|
13191
13207
|
)
|
|
13192
13208
|
), oe = D(
|
|
13193
|
-
() =>
|
|
13209
|
+
() => Ue.value.find((v) => v.id === k.value)
|
|
13194
13210
|
);
|
|
13195
13211
|
Ae(
|
|
13196
|
-
() =>
|
|
13212
|
+
() => Ue.value.map((v) => v.id).join(","),
|
|
13197
13213
|
() => {
|
|
13198
13214
|
var v;
|
|
13199
|
-
(!k.value || !
|
|
13215
|
+
(!k.value || !Ue.value.some((w) => w.id === k.value)) && (k.value = (v = Ue.value[0]) == null ? void 0 : v.id);
|
|
13200
13216
|
}
|
|
13201
13217
|
);
|
|
13202
13218
|
const ut = (v) => {
|
|
@@ -13219,13 +13235,13 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13219
13235
|
if (!v)
|
|
13220
13236
|
return;
|
|
13221
13237
|
for (const q of Oe(v))
|
|
13222
|
-
await
|
|
13238
|
+
await _t(q);
|
|
13223
13239
|
await e.persist.removeDay(v);
|
|
13224
13240
|
const w = (e.days || []).indexOf(v);
|
|
13225
|
-
w >= 0 && e.days.splice(w, 1), await e.persist.refresh(), k.value = (R =
|
|
13241
|
+
w >= 0 && e.days.splice(w, 1), await e.persist.refresh(), k.value = (R = Ue.value[0]) == null ? void 0 : R.id;
|
|
13226
13242
|
}, me = async () => {
|
|
13227
13243
|
var ee, fe;
|
|
13228
|
-
const v =
|
|
13244
|
+
const v = Ue.value, w = v[v.length - 1], R = w ? new Date(new Date(w.date).getTime() + 864e5) : /* @__PURE__ */ new Date();
|
|
13229
13245
|
let q;
|
|
13230
13246
|
try {
|
|
13231
13247
|
q = a.value.createDay(R);
|
|
@@ -13235,8 +13251,8 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13235
13251
|
}
|
|
13236
13252
|
try {
|
|
13237
13253
|
await ((fe = (ee = e.persist).createDay) == null ? void 0 : fe.call(ee, q));
|
|
13238
|
-
for (const
|
|
13239
|
-
await En(
|
|
13254
|
+
for (const ze of e.places || [])
|
|
13255
|
+
await En(ze, q);
|
|
13240
13256
|
await e.persist.refresh();
|
|
13241
13257
|
} catch {
|
|
13242
13258
|
e.persist.notify("negative", o.value.createFailed);
|
|
@@ -13244,9 +13260,9 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13244
13260
|
}
|
|
13245
13261
|
k.value = q.id, e.persist.notify("positive", `${o.value.dayAdded}: ${ut(q)}`);
|
|
13246
13262
|
}, Oe = (v) => ((v == null ? void 0 : v.schedules) || []).slice().sort((w, R) => {
|
|
13247
|
-
const q =
|
|
13263
|
+
const q = pt(w), ee = pt(R);
|
|
13248
13264
|
return q.localeCompare(ee, "ru");
|
|
13249
|
-
}),
|
|
13265
|
+
}), pt = (v) => {
|
|
13250
13266
|
if (e.hallName)
|
|
13251
13267
|
return e.hallName(v);
|
|
13252
13268
|
const w = v.place || (e.places || []).find((R) => R.id === v.placeId);
|
|
@@ -13300,10 +13316,10 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13300
13316
|
}
|
|
13301
13317
|
E.value = "", await wt(w), e.persist.notify("positive", o.value.hallCreated.replace("{name}", v));
|
|
13302
13318
|
}, dt = async (v) => {
|
|
13303
|
-
await
|
|
13319
|
+
await _t(v);
|
|
13304
13320
|
const w = jt(v);
|
|
13305
13321
|
w && (w.schedules = (w.schedules || []).filter((R) => R.id !== v.id)), await e.persist.refresh();
|
|
13306
|
-
},
|
|
13322
|
+
}, _t = async (v) => {
|
|
13307
13323
|
for (const w of v.sessions || []) {
|
|
13308
13324
|
for (const R of r(w))
|
|
13309
13325
|
await e.persist.removeSlot(R);
|
|
@@ -13314,7 +13330,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13314
13330
|
await e.persist.removeSchedule(v);
|
|
13315
13331
|
}, jt = (v) => (e.days || []).find(
|
|
13316
13332
|
(w) => (w.schedules || []).some((R) => R.id === v.id)
|
|
13317
|
-
),
|
|
13333
|
+
), Ut = (v) => [...r(v)].sort($a), Qn = (v) => (v.sessions || []).some((w) => r(w).length > 0), dn = /* @__PURE__ */ new WeakMap(), Ui = (v) => {
|
|
13318
13334
|
const w = dn.get(v), R = l(v);
|
|
13319
13335
|
if (w && w.src === R)
|
|
13320
13336
|
return w.list;
|
|
@@ -13323,35 +13339,35 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13323
13339
|
}, ci = (v) => [
|
|
13324
13340
|
...n.value ? (v.sessions || []).map((w) => ({ kind: "session", item: w })) : [],
|
|
13325
13341
|
...Ui(v).map((w) => ({ kind: "slot", item: w }))
|
|
13326
|
-
], Po = (v) => n.value ? (v.sessions || []).map((w) => ({ kind: "session", item: w })) : [],
|
|
13342
|
+
], Po = (v) => n.value ? (v.sessions || []).map((w) => ({ kind: "session", item: w })) : [], Ze = D(() => {
|
|
13327
13343
|
var w, R;
|
|
13328
13344
|
const v = (((w = oe.value) == null ? void 0 : w.schedules) || []).flatMap((q) => ci(q));
|
|
13329
13345
|
for (const q of ((R = oe.value) == null ? void 0 : R.schedules) || [])
|
|
13330
13346
|
for (const ee of q.sessions || [])
|
|
13331
|
-
v.push(...
|
|
13347
|
+
v.push(...Ut(ee).map((fe) => ({ kind: "slot", item: fe })));
|
|
13332
13348
|
return Id(v);
|
|
13333
13349
|
}), Ro = D(() => {
|
|
13334
13350
|
const v = [];
|
|
13335
|
-
for (let w =
|
|
13351
|
+
for (let w = Ze.value.start; w <= Ze.value.end; w += 60)
|
|
13336
13352
|
v.push({ min: w, label: It(w) });
|
|
13337
13353
|
return v;
|
|
13338
13354
|
}), Io = D(() => {
|
|
13339
13355
|
const v = [];
|
|
13340
|
-
for (let w =
|
|
13356
|
+
for (let w = Ze.value.start + 30; w < Ze.value.end; w += 60)
|
|
13341
13357
|
v.push({ min: w, label: It(w) });
|
|
13342
13358
|
return v;
|
|
13343
|
-
}), ws = (v) => Md(v,
|
|
13359
|
+
}), ws = (v) => Md(v, Ze.value), Bi = D(() => {
|
|
13344
13360
|
if (!I.value || !$.value)
|
|
13345
13361
|
return {};
|
|
13346
|
-
const v =
|
|
13362
|
+
const v = Ze.value, w = (I.value.minutes - v.start) / v.total * 100, R = Math.max($.value.duration / v.total * 100, 2.5);
|
|
13347
13363
|
return { top: w + "%", height: R + "%" };
|
|
13348
13364
|
}), F = D(() => !I.value || !$.value ? "" : It(I.value.minutes + $.value.duration)), _ = D(() => {
|
|
13349
13365
|
if (!I.value)
|
|
13350
13366
|
return {};
|
|
13351
|
-
const v =
|
|
13367
|
+
const v = Ze.value, w = (I.value.minutes - v.start) / v.total * 100, R = Math.max(yt.value / v.total * 100, 1.5);
|
|
13352
13368
|
return { top: w + "%", height: R + "%" };
|
|
13353
13369
|
}), H = D(() => {
|
|
13354
|
-
var ee, fe,
|
|
13370
|
+
var ee, fe, ze, tt, ct;
|
|
13355
13371
|
if (!I.value || !$.value || !$.value.id)
|
|
13356
13372
|
return 0;
|
|
13357
13373
|
const v = fi(I.value.scheduleId);
|
|
@@ -13360,13 +13376,13 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13360
13376
|
const w = { startTime: I.value.time, endTime: F.value }, R = (ee = I.value.session) == null ? void 0 : ee.id;
|
|
13361
13377
|
let q = 0;
|
|
13362
13378
|
for (const W of ci(v))
|
|
13363
|
-
W.item.id !== ((fe = $.value) == null ? void 0 : fe.id) && (((
|
|
13364
|
-
if (((
|
|
13365
|
-
for (const W of
|
|
13379
|
+
W.item.id !== ((fe = $.value) == null ? void 0 : fe.id) && (((ze = $.value) == null ? void 0 : ze.kind) === "slot" && W.kind === "session" && W.item.id === R || Wi(w, W.item) && q++);
|
|
13380
|
+
if (((tt = $.value) == null ? void 0 : tt.kind) === "slot" && I.value.session)
|
|
13381
|
+
for (const W of Ut(I.value.session))
|
|
13366
13382
|
W.id !== ((ct = $.value) == null ? void 0 : ct.id) && Wi(w, W) && q++;
|
|
13367
13383
|
return q;
|
|
13368
|
-
}), ne = D(() => H.value > 0), pe = (v, w) => Ed(ci(v), w, Wi), ot = (v, w) => Fd(
|
|
13369
|
-
const w =
|
|
13384
|
+
}), ne = D(() => H.value > 0), pe = (v, w) => Ed(ci(v), w, Wi), ot = (v, w) => Fd(Ut(v), w, Wi), et = (v, w) => Ad(v, w), $e = (v) => {
|
|
13385
|
+
const w = Ze.value, R = Ve(v.item.startTime), q = Ve(v.item.endTime);
|
|
13370
13386
|
return !isFinite(R) || !isFinite(q) ? 48 : (q - R) / w.total * un.value;
|
|
13371
13387
|
}, ie = (v) => Dd($e(v)), ae = (v) => {
|
|
13372
13388
|
const w = e.slotName ? e.slotName(v.item) : v.item.name || (v.kind === "session" ? o.value.session : o.value.slot);
|
|
@@ -13410,7 +13426,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13410
13426
|
};
|
|
13411
13427
|
}, je = O(null), St = (v, w) => {
|
|
13412
13428
|
const R = v.getBoundingClientRect(), q = Math.min(Math.max((w - R.top) / R.height, 0), 1);
|
|
13413
|
-
return
|
|
13429
|
+
return Ze.value.start + Yi(q * Ze.value.total, yt.value);
|
|
13414
13430
|
}, Ss = (v, w) => {
|
|
13415
13431
|
w.target.closest(".block-actions, .block-resize") || w.button !== 0 || Q.value || (je.value = { gi: v, startX: w.clientX, startY: w.clientY, moved: !1 }, window.addEventListener("pointermove", Cs), window.addEventListener("pointerup", ir), window.addEventListener("pointercancel", Eo), window.addEventListener("keydown", or));
|
|
13416
13432
|
}, Cs = (v) => {
|
|
@@ -13431,7 +13447,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13431
13447
|
Mo(v.clientX, v.clientY), sc(v.clientX, v.clientY);
|
|
13432
13448
|
}
|
|
13433
13449
|
}, Mo = (v, w) => {
|
|
13434
|
-
var
|
|
13450
|
+
var tt, ct;
|
|
13435
13451
|
const R = document.elementFromPoint(v, w), q = R == null ? void 0 : R.closest(".hall-col"), ee = q == null ? void 0 : q.getAttribute("data-schedule-id");
|
|
13436
13452
|
if (!q || !ee) {
|
|
13437
13453
|
B.value = void 0, I.value = null;
|
|
@@ -13441,19 +13457,19 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13441
13457
|
if (!fe)
|
|
13442
13458
|
return;
|
|
13443
13459
|
B.value = fe.id;
|
|
13444
|
-
const
|
|
13460
|
+
const ze = St(q, w);
|
|
13445
13461
|
I.value = {
|
|
13446
13462
|
scheduleId: fe.id,
|
|
13447
|
-
minutes:
|
|
13448
|
-
time: It(
|
|
13449
|
-
hallName:
|
|
13463
|
+
minutes: ze,
|
|
13464
|
+
time: It(ze),
|
|
13465
|
+
hallName: pt(fe),
|
|
13450
13466
|
// слот, целиком попадающий в секцию, будет вложен в неё при броске
|
|
13451
|
-
...((
|
|
13467
|
+
...((tt = $.value) == null ? void 0 : tt.kind) === "slot" && n.value ? {
|
|
13452
13468
|
session: xs(
|
|
13453
13469
|
fe.sessions,
|
|
13454
|
-
|
|
13455
|
-
|
|
13456
|
-
|
|
13470
|
+
ze,
|
|
13471
|
+
ze + (((ct = $.value) == null ? void 0 : ct.duration) || 30),
|
|
13472
|
+
Ve
|
|
13457
13473
|
)
|
|
13458
13474
|
} : {}
|
|
13459
13475
|
}, L.value = { x: v, y: w };
|
|
@@ -13472,8 +13488,8 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13472
13488
|
xe.value = Date.now();
|
|
13473
13489
|
const R = document.elementFromPoint(v.clientX, v.clientY), q = R == null ? void 0 : R.closest(".hall-col"), ee = q == null ? void 0 : q.getAttribute("data-schedule-id"), fe = ee ? fi(ee) : void 0;
|
|
13474
13490
|
if (q && fe) {
|
|
13475
|
-
const
|
|
13476
|
-
await ur(fe,
|
|
13491
|
+
const ze = St(q, v.clientY);
|
|
13492
|
+
await ur(fe, ze);
|
|
13477
13493
|
}
|
|
13478
13494
|
sr();
|
|
13479
13495
|
}, Ao = () => {
|
|
@@ -13506,26 +13522,26 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13506
13522
|
return ks((v = $.value) == null ? void 0 : v.id);
|
|
13507
13523
|
}, rc = (v, w) => {
|
|
13508
13524
|
w.preventDefault(), w.stopPropagation();
|
|
13509
|
-
const R = v.item, q =
|
|
13525
|
+
const R = v.item, q = Ve(R.startTime), ee = Ve(R.endTime);
|
|
13510
13526
|
if (!isFinite(q) || !isFinite(ee))
|
|
13511
13527
|
return;
|
|
13512
13528
|
const fe = w.clientY;
|
|
13513
13529
|
Q.value = !0;
|
|
13514
|
-
const
|
|
13515
|
-
const ce = (W.clientY - fe) /
|
|
13530
|
+
const ze = (W) => {
|
|
13531
|
+
const ce = (W.clientY - fe) / Vt.value * 60, ye = Yi(ee + ce, yt.value);
|
|
13516
13532
|
R.endTime = It(Math.max(ye, q + yt.value));
|
|
13517
|
-
},
|
|
13518
|
-
window.removeEventListener("pointermove",
|
|
13533
|
+
}, tt = async () => {
|
|
13534
|
+
window.removeEventListener("pointermove", ze), window.removeEventListener("pointerup", ct), Q.value = !1, xe.value = Date.now();
|
|
13519
13535
|
const W = ks(R.id);
|
|
13520
13536
|
W && (await Fn(R, W.kind), await e.persist.refresh());
|
|
13521
13537
|
}, ct = () => {
|
|
13522
|
-
|
|
13538
|
+
tt();
|
|
13523
13539
|
};
|
|
13524
|
-
window.addEventListener("pointermove",
|
|
13540
|
+
window.addEventListener("pointermove", ze), window.addEventListener("pointerup", ct);
|
|
13525
13541
|
}, cn = O(null), lc = (v, w, R) => {
|
|
13526
13542
|
if (R.target.closest(".nested-edit, .nested-resize") || R.button !== 0 || Q.value)
|
|
13527
13543
|
return;
|
|
13528
|
-
const q = R.target.closest(".session-perfoms"), ee =
|
|
13544
|
+
const q = R.target.closest(".session-perfoms"), ee = Ve(v.startTime), fe = Ve(v.endTime), ze = vi(w.startTime, w.endTime);
|
|
13529
13545
|
!q || !isFinite(ee) || !isFinite(fe) || fe <= ee || (cn.value = {
|
|
13530
13546
|
perfom: w,
|
|
13531
13547
|
session: v,
|
|
@@ -13536,7 +13552,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13536
13552
|
savedEnd: w.endTime,
|
|
13537
13553
|
sessionStart: ee,
|
|
13538
13554
|
sessionDur: fe - ee,
|
|
13539
|
-
durMin: isFinite(
|
|
13555
|
+
durMin: isFinite(ze) && ze > 0 ? ze : 30,
|
|
13540
13556
|
container: q
|
|
13541
13557
|
}, window.addEventListener("pointermove", ar), window.addEventListener("pointerup", rr), window.addEventListener("pointercancel", Fo), window.addEventListener("keydown", lr));
|
|
13542
13558
|
}, ar = (v) => {
|
|
@@ -13555,7 +13571,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13555
13571
|
}, rr = (v) => {
|
|
13556
13572
|
uc(v);
|
|
13557
13573
|
}, uc = async (v) => {
|
|
13558
|
-
var
|
|
13574
|
+
var ze;
|
|
13559
13575
|
const w = cn.value;
|
|
13560
13576
|
if (Oo(), cn.value = null, L.value = null, document.body.style.userSelect = "", document.body.style.cursor = "", !w || !w.moved)
|
|
13561
13577
|
return;
|
|
@@ -13568,8 +13584,8 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13568
13584
|
name: w.perfom.name || o.value.slot,
|
|
13569
13585
|
duration: w.durMin
|
|
13570
13586
|
};
|
|
13571
|
-
const
|
|
13572
|
-
await ur(fe,
|
|
13587
|
+
const tt = St(q, v.clientY), ct = It(tt), W = vi(w.perfom.startTime, w.perfom.endTime), ce = tn(ct, W > 0 ? W : 30), ye = ((ze = fr(w.perfom)) == null ? void 0 : ze.id) === fe.id && w.perfom.startTime === ct && w.perfom.endTime === ce;
|
|
13588
|
+
await ur(fe, tt), ye && (await e.persist.updateSlot(w.perfom), await e.persist.refresh()), $.value = null;
|
|
13573
13589
|
return;
|
|
13574
13590
|
}
|
|
13575
13591
|
w.perfom.startTime = Zn(w.perfom.startTime), w.perfom.endTime = Zn(w.perfom.endTime), w.perfom.startTime && (await e.persist.updateSlot(w.perfom), await e.persist.refresh());
|
|
@@ -13582,10 +13598,10 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13582
13598
|
v.key === "Escape" && Fo();
|
|
13583
13599
|
}, dc = (v, w, R) => {
|
|
13584
13600
|
R.preventDefault(), R.stopPropagation();
|
|
13585
|
-
const q =
|
|
13586
|
-
if (!
|
|
13601
|
+
const q = Ve(v.startTime), ee = Ve(v.endTime), fe = Ve(w.startTime), ze = R.target.closest(".nested-perfom"), tt = ze == null ? void 0 : ze.closest(".session-perfoms");
|
|
13602
|
+
if (!ze || !tt || !isFinite(q) || !isFinite(ee) || ee <= q || !isFinite(fe))
|
|
13587
13603
|
return;
|
|
13588
|
-
const ct =
|
|
13604
|
+
const ct = tt.getBoundingClientRect(), W = ee - q;
|
|
13589
13605
|
Q.value = !0;
|
|
13590
13606
|
const ce = (kn) => {
|
|
13591
13607
|
const kc = Math.min(Math.max((kn.clientY - ct.top) / ct.height, 0), 1), xc = Math.min(
|
|
@@ -13608,20 +13624,20 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13608
13624
|
const q = It(w), ee = vi(R.item.startTime, R.item.endTime), fe = tn(q, ee > 0 ? ee : 30);
|
|
13609
13625
|
if (((ce = R.schedule) == null ? void 0 : ce.id) === v.id && R.item.startTime === q && R.item.endTime === fe)
|
|
13610
13626
|
return;
|
|
13611
|
-
const
|
|
13627
|
+
const ze = R.item.startTime;
|
|
13612
13628
|
if (R.item.startTime = q, R.item.endTime = fe, R.kind === "slot" && n.value) {
|
|
13613
|
-
const ye = xs(v.sessions,
|
|
13629
|
+
const ye = xs(v.sessions, Ve(q), Ve(fe), Ve);
|
|
13614
13630
|
ye ? R.item.sessionId = ye.id : delete R.item.sessionId;
|
|
13615
13631
|
} else R.kind === "slot" && delete R.item.sessionId;
|
|
13616
13632
|
if (R.kind === "session") {
|
|
13617
|
-
const ye =
|
|
13618
|
-
for (const he of
|
|
13633
|
+
const ye = Ve(q) - Ve(ze);
|
|
13634
|
+
for (const he of Ut(R.item))
|
|
13619
13635
|
he.startTime && (he.startTime = tn(he.startTime, ye), he.endTime && (he.endTime = tn(he.endTime, ye)), he.scheduleId = v.id, await Fn(he, "slot"));
|
|
13620
13636
|
}
|
|
13621
|
-
const
|
|
13622
|
-
if (
|
|
13637
|
+
const tt = R.schedule, ct = R.kind === "session" ? v.sessions : l(v), W = R.item;
|
|
13638
|
+
if (tt && tt.id !== v.id) {
|
|
13623
13639
|
W.scheduleId = v.id;
|
|
13624
|
-
const ye = R.kind === "session" ?
|
|
13640
|
+
const ye = R.kind === "session" ? tt.sessions : l(tt);
|
|
13625
13641
|
Y.H.Classes.RemoveFromClassById(W.id, ye, []), ct.push(W);
|
|
13626
13642
|
}
|
|
13627
13643
|
await Fn(W, R.kind), await e.persist.refresh();
|
|
@@ -13630,7 +13646,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13630
13646
|
return;
|
|
13631
13647
|
const R = St(w.currentTarget, w.clientY), q = a.value.createSlot(v);
|
|
13632
13648
|
if (q.startTime = It(R), q.endTime = It(R + 30), n.value) {
|
|
13633
|
-
const fe = xs(v.sessions, R, R + 30,
|
|
13649
|
+
const fe = xs(v.sessions, R, R + 30, Ve);
|
|
13634
13650
|
fe != null && fe.id && (q.sessionId = fe.id);
|
|
13635
13651
|
}
|
|
13636
13652
|
await e.persist.createSlot(q), await e.persist.refresh();
|
|
@@ -13684,7 +13700,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13684
13700
|
}, hc = async (v, w) => {
|
|
13685
13701
|
const R = a.value.createSlot(v);
|
|
13686
13702
|
if (R.startTime = It(w), R.endTime = tn(R.startTime, 30), n.value) {
|
|
13687
|
-
const ee = xs(v.sessions, w, w + 30,
|
|
13703
|
+
const ee = xs(v.sessions, w, w + 30, Ve);
|
|
13688
13704
|
ee != null && ee.id && (R.sessionId = ee.id);
|
|
13689
13705
|
}
|
|
13690
13706
|
await e.persist.createSlot(R), await e.persist.refresh();
|
|
@@ -13807,10 +13823,10 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13807
13823
|
v[w] = R, Fn(v, q);
|
|
13808
13824
|
};
|
|
13809
13825
|
return e.persist.loadOptions && e.persist.loadOptions(), (v, w) => {
|
|
13810
|
-
var
|
|
13811
|
-
const R = Me("PButton"), q = Me("PTooltip"), ee = Me("PSelect"), fe = Me("PInput"),
|
|
13826
|
+
var tt, ct;
|
|
13827
|
+
const R = Me("PButton"), q = Me("PTooltip"), ee = Me("PSelect"), fe = Me("PInput"), ze = Me("PDialog");
|
|
13812
13828
|
return m(), S("div", P0, [
|
|
13813
|
-
(
|
|
13829
|
+
(tt = t.days) != null && tt.length ? (m(), S(K, { key: 1 }, [
|
|
13814
13830
|
y("div", I0, [
|
|
13815
13831
|
i.value ? (m(), S("div", M0, [
|
|
13816
13832
|
g(f(wl), {
|
|
@@ -13821,7 +13837,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13821
13837
|
"active-color": "primary"
|
|
13822
13838
|
}, {
|
|
13823
13839
|
default: C(() => [
|
|
13824
|
-
(m(!0), S(K, null, we(
|
|
13840
|
+
(m(!0), S(K, null, we(Ue.value, (W) => (m(), z(f(Sl), {
|
|
13825
13841
|
key: W.id,
|
|
13826
13842
|
name: W.id,
|
|
13827
13843
|
class: "day-tab"
|
|
@@ -13896,7 +13912,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13896
13912
|
g(ee, {
|
|
13897
13913
|
modelValue: lt.value,
|
|
13898
13914
|
"onUpdate:modelValue": w[2] || (w[2] = (W) => lt.value = W),
|
|
13899
|
-
options:
|
|
13915
|
+
options: Ke,
|
|
13900
13916
|
clearable: !1,
|
|
13901
13917
|
size: "sm",
|
|
13902
13918
|
dense: "",
|
|
@@ -13919,9 +13935,9 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13919
13935
|
class: "text-grey-6"
|
|
13920
13936
|
}),
|
|
13921
13937
|
g(ee, {
|
|
13922
|
-
modelValue:
|
|
13923
|
-
"onUpdate:modelValue": w[3] || (w[3] = (W) =>
|
|
13924
|
-
options:
|
|
13938
|
+
modelValue: Vt.value,
|
|
13939
|
+
"onUpdate:modelValue": w[3] || (w[3] = (W) => Vt.value = W),
|
|
13940
|
+
options: mt,
|
|
13925
13941
|
clearable: !1,
|
|
13926
13942
|
size: "sm",
|
|
13927
13943
|
dense: "",
|
|
@@ -13942,7 +13958,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13942
13958
|
g(ee, {
|
|
13943
13959
|
modelValue: b.value,
|
|
13944
13960
|
"onUpdate:modelValue": w[4] || (w[4] = (W) => b.value = W),
|
|
13945
|
-
options:
|
|
13961
|
+
options: Xe.value,
|
|
13946
13962
|
clearable: !1,
|
|
13947
13963
|
size: "sm",
|
|
13948
13964
|
dense: "",
|
|
@@ -13971,8 +13987,8 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13971
13987
|
class: "grid-wrap",
|
|
13972
13988
|
style: J({
|
|
13973
13989
|
"--halls": Oe(oe.value).length,
|
|
13974
|
-
"--hours": Math.max(
|
|
13975
|
-
"--half-hours": Math.max(
|
|
13990
|
+
"--hours": Math.max(Ze.value.total / 60, 1),
|
|
13991
|
+
"--half-hours": Math.max(Ze.value.total / 60 * 2, 2)
|
|
13976
13992
|
})
|
|
13977
13993
|
}, [
|
|
13978
13994
|
y("div", D0, [
|
|
@@ -13986,7 +14002,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13986
14002
|
name: "meeting_room",
|
|
13987
14003
|
size: "15px"
|
|
13988
14004
|
}),
|
|
13989
|
-
y("span", L0, U(
|
|
14005
|
+
y("span", L0, U(pt(W)), 1),
|
|
13990
14006
|
g(R, {
|
|
13991
14007
|
size: "sm",
|
|
13992
14008
|
flat: "",
|
|
@@ -14054,12 +14070,12 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14054
14070
|
(m(!0), S(K, null, we(Ro.value, (W) => (m(), S("div", {
|
|
14055
14071
|
key: W.min,
|
|
14056
14072
|
class: "hour-label",
|
|
14057
|
-
style: J({ top: (W.min -
|
|
14073
|
+
style: J({ top: (W.min - Ze.value.start) / Ze.value.total * 100 + "%" })
|
|
14058
14074
|
}, U(W.label), 5))), 128)),
|
|
14059
14075
|
(m(!0), S(K, null, we(Io.value, (W) => (m(), S("div", {
|
|
14060
14076
|
key: W.min,
|
|
14061
14077
|
class: "half-label",
|
|
14062
|
-
style: J({ top: (W.min -
|
|
14078
|
+
style: J({ top: (W.min - Ze.value.start) / Ze.value.total * 100 + "%" })
|
|
14063
14079
|
}, U(W.label), 5))), 128))
|
|
14064
14080
|
]),
|
|
14065
14081
|
(m(!0), S(K, null, we(Oe(oe.value), (W) => (m(), S("div", {
|
|
@@ -14093,11 +14109,11 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14093
14109
|
y("div", N0, U(ae(ce)), 1),
|
|
14094
14110
|
ce.kind === "slot" && p(ce.item) ? (m(), S("div", H0, U(p(ce.item)), 1)) : G("", !0)
|
|
14095
14111
|
]),
|
|
14096
|
-
ce.kind === "session" &&
|
|
14097
|
-
(m(!0), S(K, null, we(
|
|
14112
|
+
ce.kind === "session" && Ut(ce.item).length ? (m(), S("div", j0, [
|
|
14113
|
+
(m(!0), S(K, null, we(Ut(ce.item), (he) => (m(), S("div", {
|
|
14098
14114
|
key: he.id,
|
|
14099
14115
|
class: ve(["nested-perfom", He(ce, he)]),
|
|
14100
|
-
style: J(
|
|
14116
|
+
style: J(et(ce.item, he)),
|
|
14101
14117
|
title: Te(he),
|
|
14102
14118
|
onPointerdown: Ye((kn) => lc(ce.item, he, kn), ["stop"]),
|
|
14103
14119
|
onClick: Ye((kn) => On({ kind: "slot", item: he }), ["stop"]),
|
|
@@ -14258,7 +14274,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14258
14274
|
size: "18px",
|
|
14259
14275
|
color: "primary"
|
|
14260
14276
|
}),
|
|
14261
|
-
y("span", lb, U(
|
|
14277
|
+
y("span", lb, U(pt(W)), 1),
|
|
14262
14278
|
g(f(_n)),
|
|
14263
14279
|
g(R, {
|
|
14264
14280
|
size: "sm",
|
|
@@ -14361,8 +14377,8 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14361
14377
|
onClick: (he) => qi(ye, "session")
|
|
14362
14378
|
}, null, 8, ["onClick"])
|
|
14363
14379
|
]),
|
|
14364
|
-
|
|
14365
|
-
(m(!0), S(K, null, we(
|
|
14380
|
+
Ut(ye).length ? (m(), S("div", fb, [
|
|
14381
|
+
(m(!0), S(K, null, we(Ut(ye), (he) => (m(), S("div", {
|
|
14366
14382
|
key: he.id,
|
|
14367
14383
|
class: "list-row nested-row"
|
|
14368
14384
|
}, [
|
|
@@ -14487,7 +14503,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14487
14503
|
onClick: me
|
|
14488
14504
|
}, null, 8, ["label"])
|
|
14489
14505
|
])),
|
|
14490
|
-
g(
|
|
14506
|
+
g(ze, {
|
|
14491
14507
|
modelValue: P.value,
|
|
14492
14508
|
"onUpdate:modelValue": w[7] || (w[7] = (W) => P.value = W)
|
|
14493
14509
|
}, {
|
|
@@ -14565,7 +14581,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14565
14581
|
]),
|
|
14566
14582
|
_: 3
|
|
14567
14583
|
}, 8, ["modelValue"]),
|
|
14568
|
-
g(
|
|
14584
|
+
g(ze, {
|
|
14569
14585
|
modelValue: M.value,
|
|
14570
14586
|
"onUpdate:modelValue": w[9] || (w[9] = (W) => M.value = W)
|
|
14571
14587
|
}, {
|
|
@@ -14606,7 +14622,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14606
14622
|
]),
|
|
14607
14623
|
_: 1
|
|
14608
14624
|
}, 8, ["modelValue"]),
|
|
14609
|
-
g(
|
|
14625
|
+
g(ze, {
|
|
14610
14626
|
modelValue: T.value,
|
|
14611
14627
|
"onUpdate:modelValue": w[16] || (w[16] = (W) => T.value = W)
|
|
14612
14628
|
}, {
|
|
@@ -14965,7 +14981,7 @@ const S0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14965
14981
|
nestedSlotStyle: Ad,
|
|
14966
14982
|
normTime: Zn,
|
|
14967
14983
|
snapMinutes: Yi,
|
|
14968
|
-
toMin:
|
|
14984
|
+
toMin: Ve
|
|
14969
14985
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
14970
14986
|
let mw = class extends st {
|
|
14971
14987
|
constructor() {
|
|
@@ -15085,7 +15101,7 @@ const kw = new Cw(), xw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.d
|
|
|
15085
15101
|
default: C(() => [
|
|
15086
15102
|
g(f(Ei), { dense: "" }, {
|
|
15087
15103
|
default: C(() => [
|
|
15088
|
-
(m(!0), S(K, null, we(f(o), (h) =>
|
|
15104
|
+
(m(!0), S(K, null, we(f(o), (h) => Je((m(), z(f(Bn), {
|
|
15089
15105
|
key: h.value,
|
|
15090
15106
|
clickable: "",
|
|
15091
15107
|
class: "tag-item",
|
|
@@ -15182,7 +15198,7 @@ const kw = new Cw(), xw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.d
|
|
|
15182
15198
|
}, [
|
|
15183
15199
|
y("div", Fw, [
|
|
15184
15200
|
y("div", Ow, U(s.title), 1),
|
|
15185
|
-
|
|
15201
|
+
Je(g(ue, {
|
|
15186
15202
|
icon: "close",
|
|
15187
15203
|
flat: "",
|
|
15188
15204
|
dense: "",
|
|
@@ -15196,7 +15212,7 @@ const kw = new Cw(), xw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.d
|
|
|
15196
15212
|
N(p.$slots, "default", {}, void 0, !0)
|
|
15197
15213
|
]),
|
|
15198
15214
|
s.showConfirm ? (m(), S("div", zw, [
|
|
15199
|
-
|
|
15215
|
+
Je(g(ue, {
|
|
15200
15216
|
flat: "",
|
|
15201
15217
|
label: s.cancelLabel,
|
|
15202
15218
|
size: "sm"
|
|
@@ -16322,7 +16338,7 @@ const S2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
16322
16338
|
}
|
|
16323
16339
|
}), k2 = { class: "row items-center justify-end" }, x2 = { class: "row items-center justify-end" }, $2 = /* @__PURE__ */ j({
|
|
16324
16340
|
__name: "PDateTimeInput",
|
|
16325
|
-
props: /* @__PURE__ */
|
|
16341
|
+
props: /* @__PURE__ */ De({
|
|
16326
16342
|
label: { type: String, default: "Дата и время" },
|
|
16327
16343
|
placeholder: { type: String, default: "ДД.ММ.ГГГГ ЧЧ:мм" },
|
|
16328
16344
|
disable: { type: Boolean, default: !1 },
|
|
@@ -16337,7 +16353,7 @@ const S2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
16337
16353
|
}),
|
|
16338
16354
|
emits: ["update:modelValue"],
|
|
16339
16355
|
setup(t) {
|
|
16340
|
-
const e = Wn, n =
|
|
16356
|
+
const e = Wn, n = vt(t, "modelValue"), i = O(""), s = O(""), o = O(""), a = (k) => k ? Jn.formatDate(k, "DD.MM.YYYY HH:mm") : "", l = (k) => {
|
|
16341
16357
|
if (!k || !/^\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}$/.test(k)) return null;
|
|
16342
16358
|
const P = Jn.extractDate(k, "DD.MM.YYYY HH:mm");
|
|
16343
16359
|
return Number.isNaN(P.getTime()) ? null : P;
|
|
@@ -16410,7 +16426,7 @@ const S2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
16410
16426
|
}, {
|
|
16411
16427
|
default: C(() => [
|
|
16412
16428
|
y("div", k2, [
|
|
16413
|
-
|
|
16429
|
+
Je(g(ue, {
|
|
16414
16430
|
label: "OK",
|
|
16415
16431
|
color: "primary",
|
|
16416
16432
|
flat: "",
|
|
@@ -16446,7 +16462,7 @@ const S2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
16446
16462
|
}, {
|
|
16447
16463
|
default: C(() => [
|
|
16448
16464
|
y("div", x2, [
|
|
16449
|
-
|
|
16465
|
+
Je(g(ue, {
|
|
16450
16466
|
label: "OK",
|
|
16451
16467
|
color: "primary",
|
|
16452
16468
|
flat: "",
|
|
@@ -16506,7 +16522,7 @@ const S2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
16506
16522
|
}, I2 = /* @__PURE__ */ j({
|
|
16507
16523
|
name: "PForm",
|
|
16508
16524
|
__name: "PForm",
|
|
16509
|
-
props: /* @__PURE__ */
|
|
16525
|
+
props: /* @__PURE__ */ De({
|
|
16510
16526
|
greedy: { type: Boolean, default: !1 },
|
|
16511
16527
|
autofocus: { type: Boolean, default: !1 },
|
|
16512
16528
|
noErrorFocus: { type: Boolean, default: !1 },
|
|
@@ -16515,9 +16531,9 @@ const S2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
16515
16531
|
valid: { type: Boolean, default: void 0 },
|
|
16516
16532
|
validModifiers: {}
|
|
16517
16533
|
}),
|
|
16518
|
-
emits: /* @__PURE__ */
|
|
16534
|
+
emits: /* @__PURE__ */ De(["submit", "reset", "validation-success", "validation-error"], ["update:valid"]),
|
|
16519
16535
|
setup(t, { expose: e, emit: n }) {
|
|
16520
|
-
const i = n, s =
|
|
16536
|
+
const i = n, s = vt(t, "valid"), o = O(!0), a = (T) => {
|
|
16521
16537
|
o.value = T, s.value !== void 0 && (s.value = T);
|
|
16522
16538
|
}, l = O(), r = () => {
|
|
16523
16539
|
a(!0), i("validation-success");
|
|
@@ -17299,7 +17315,7 @@ const cS = { class: "admin-gallery" }, fS = { class: "groups" }, hS = ["src", "a
|
|
|
17299
17315
|
class: "viewer-caption"
|
|
17300
17316
|
}, kS = /* @__PURE__ */ j({
|
|
17301
17317
|
__name: "AdminGallery",
|
|
17302
|
-
props: /* @__PURE__ */
|
|
17318
|
+
props: /* @__PURE__ */ De({
|
|
17303
17319
|
id: { default: "" },
|
|
17304
17320
|
type: { default: "" },
|
|
17305
17321
|
ratio: { default: 0 },
|
|
@@ -17310,9 +17326,9 @@ const cS = { class: "admin-gallery" }, fS = { class: "groups" }, hS = ["src", "a
|
|
|
17310
17326
|
images: { default: () => [] },
|
|
17311
17327
|
imagesModifiers: {}
|
|
17312
17328
|
}),
|
|
17313
|
-
emits: /* @__PURE__ */
|
|
17329
|
+
emits: /* @__PURE__ */ De(["addImage", "remove", "sort"], ["update:images"]),
|
|
17314
17330
|
setup(t, { emit: e }) {
|
|
17315
|
-
const n = Wn, i = t, s =
|
|
17331
|
+
const n = Wn, i = t, s = vt(t, "images"), o = e, a = D(() => f(s) ?? []), l = O(), r = O(!1), d = O(!1), c = O(0), h = O(!1), p = O(""), b = O(i.ratio), k = D(
|
|
17316
17332
|
() => b.value > 0 ? { aspectRatio: String(b.value) } : {}
|
|
17317
17333
|
), P = O(), E = O(), T = (Z) => typeof Z.getFileUrl == "function" ? Z.getFileUrl() : "", M = ht(/* @__PURE__ */ new Set()), x = (Z) => {
|
|
17318
17334
|
Z.id && M.add(Z.id);
|
|
@@ -17325,8 +17341,8 @@ const cS = { class: "admin-gallery" }, fS = { class: "groups" }, hS = ["src", "a
|
|
|
17325
17341
|
return !0;
|
|
17326
17342
|
const Fe = Z.type.toLowerCase(), me = Z.name.toLowerCase();
|
|
17327
17343
|
return te.split(",").some((Oe) => {
|
|
17328
|
-
const
|
|
17329
|
-
return
|
|
17344
|
+
const pt = Oe.trim().toLowerCase();
|
|
17345
|
+
return pt ? pt.startsWith(".") ? me.endsWith(pt) : pt.endsWith("/*") ? Fe.startsWith(pt.slice(0, -1)) : Fe === pt : !1;
|
|
17330
17346
|
});
|
|
17331
17347
|
}, L = O(!1);
|
|
17332
17348
|
let Q = 0;
|
|
@@ -17335,11 +17351,11 @@ const cS = { class: "admin-gallery" }, fS = { class: "groups" }, hS = ["src", "a
|
|
|
17335
17351
|
return Array.from(((te = Z.dataTransfer) == null ? void 0 : te.types) ?? []).includes("Files");
|
|
17336
17352
|
}, ke = (Z) => {
|
|
17337
17353
|
!i.upload || !xe(Z) || (Q += 1, L.value = !0);
|
|
17338
|
-
},
|
|
17354
|
+
}, Ke = (Z) => {
|
|
17339
17355
|
!i.upload || !xe(Z) || Z.dataTransfer && (Z.dataTransfer.dropEffect = "copy");
|
|
17340
|
-
},
|
|
17356
|
+
}, mt = (Z) => {
|
|
17341
17357
|
!i.upload || !xe(Z) || (Q = Math.max(0, Q - 1), Q === 0 && (L.value = !1));
|
|
17342
|
-
},
|
|
17358
|
+
}, Xe = (Z) => {
|
|
17343
17359
|
var Fe, me;
|
|
17344
17360
|
if (Q = 0, L.value = !1, !i.upload)
|
|
17345
17361
|
return;
|
|
@@ -17361,8 +17377,8 @@ const cS = { class: "admin-gallery" }, fS = { class: "groups" }, hS = ["src", "a
|
|
|
17361
17377
|
return;
|
|
17362
17378
|
}
|
|
17363
17379
|
const te = new Nt();
|
|
17364
|
-
te.id =
|
|
17365
|
-
},
|
|
17380
|
+
te.id = Lt.UUID(), te.itemId = $(), te.type = i.type, te.originalName = Z.name, te.file = Z, te.src = URL.createObjectURL(Z), E.value = te, P.value = void 0, p.value = te.src, h.value = !0;
|
|
17381
|
+
}, Vt = async (Z) => {
|
|
17366
17382
|
var Fe;
|
|
17367
17383
|
const te = P.value;
|
|
17368
17384
|
if (te) {
|
|
@@ -17393,7 +17409,7 @@ const cS = { class: "admin-gallery" }, fS = { class: "groups" }, hS = ["src", "a
|
|
|
17393
17409
|
}
|
|
17394
17410
|
}, Dt = () => {
|
|
17395
17411
|
h.value = !1, E.value = void 0, P.value = void 0;
|
|
17396
|
-
},
|
|
17412
|
+
}, Ue = (Z) => {
|
|
17397
17413
|
const te = s.value.findIndex((Fe) => Fe.id === Z.id);
|
|
17398
17414
|
c.value = te > -1 ? te : 0, d.value = !0;
|
|
17399
17415
|
}, oe = (Z) => {
|
|
@@ -17424,9 +17440,9 @@ const cS = { class: "admin-gallery" }, fS = { class: "groups" }, hS = ["src", "a
|
|
|
17424
17440
|
y("div", {
|
|
17425
17441
|
class: ve(["dropzone", { "is-dragover": t.upload && f(L) }]),
|
|
17426
17442
|
onDragenter: Ye(ke, ["prevent"]),
|
|
17427
|
-
onDragover: Ye(
|
|
17428
|
-
onDragleave: Ye(
|
|
17429
|
-
onDrop: Ye(
|
|
17443
|
+
onDragover: Ye(Ke, ["prevent"]),
|
|
17444
|
+
onDragleave: Ye(mt, ["prevent"]),
|
|
17445
|
+
onDrop: Ye(Xe, ["prevent"])
|
|
17430
17446
|
}, [
|
|
17431
17447
|
y("div", fS, [
|
|
17432
17448
|
g(f(si), {
|
|
@@ -17450,11 +17466,11 @@ const cS = { class: "admin-gallery" }, fS = { class: "groups" }, hS = ["src", "a
|
|
|
17450
17466
|
alt: me.description,
|
|
17451
17467
|
loading: "lazy",
|
|
17452
17468
|
onError: (Oe) => x(me),
|
|
17453
|
-
onClick: (Oe) =>
|
|
17469
|
+
onClick: (Oe) => Ue(me)
|
|
17454
17470
|
}, null, 40, hS)) : (m(), S("div", {
|
|
17455
17471
|
key: 1,
|
|
17456
17472
|
class: "card-placeholder",
|
|
17457
|
-
onClick: (Oe) =>
|
|
17473
|
+
onClick: (Oe) => Ue(me)
|
|
17458
17474
|
}, [
|
|
17459
17475
|
g(f(re), {
|
|
17460
17476
|
name: "broken_image",
|
|
@@ -17559,7 +17575,7 @@ const cS = { class: "admin-gallery" }, fS = { class: "groups" }, hS = ["src", "a
|
|
|
17559
17575
|
g(f(kt), { class: "row items-center q-pb-none" }, {
|
|
17560
17576
|
default: C(() => [
|
|
17561
17577
|
g(f(_n)),
|
|
17562
|
-
|
|
17578
|
+
Je(g(ue, {
|
|
17563
17579
|
icon: "close",
|
|
17564
17580
|
flat: "",
|
|
17565
17581
|
round: "",
|
|
@@ -17578,7 +17594,7 @@ const cS = { class: "admin-gallery" }, fS = { class: "groups" }, hS = ["src", "a
|
|
|
17578
17594
|
key: 0,
|
|
17579
17595
|
src: f(p),
|
|
17580
17596
|
ratio: f(b),
|
|
17581
|
-
onCrop: te[0] || (te[0] = (me) => f(P) ?
|
|
17597
|
+
onCrop: te[0] || (te[0] = (me) => f(P) ? Vt(me) : un(me)),
|
|
17582
17598
|
"onUpdate:ratio": te[1] || (te[1] = (me) => b.value = me)
|
|
17583
17599
|
}, null, 8, ["src", "ratio"])) : G("", !0)
|
|
17584
17600
|
]),
|
|
@@ -19046,7 +19062,7 @@ const F8 = /* @__PURE__ */ X(I8, [["render", E8], ["__scopeId", "data-v-6fb8269e
|
|
|
19046
19062
|
}
|
|
19047
19063
|
}), j8 = /* @__PURE__ */ X(H8, [["__scopeId", "data-v-caedda9d"]]), G8 = { class: "select-dialog" }, W8 = { class: "select-dialog-header" }, Y8 = { class: "select-dialog-title" }, Q8 = { class: "select-dialog-content" }, X8 = { class: "select-dialog-actions" }, Z8 = /* @__PURE__ */ j({
|
|
19048
19064
|
__name: "PAddDialog",
|
|
19049
|
-
props: /* @__PURE__ */
|
|
19065
|
+
props: /* @__PURE__ */ De({
|
|
19050
19066
|
title: {
|
|
19051
19067
|
type: String,
|
|
19052
19068
|
default: ""
|
|
@@ -19059,9 +19075,9 @@ const F8 = /* @__PURE__ */ X(I8, [["render", E8], ["__scopeId", "data-v-6fb8269e
|
|
|
19059
19075
|
modelValue: { type: Boolean, default: !1 },
|
|
19060
19076
|
modelModifiers: {}
|
|
19061
19077
|
}),
|
|
19062
|
-
emits: /* @__PURE__ */
|
|
19078
|
+
emits: /* @__PURE__ */ De(["add", "close"], ["update:modelValue"]),
|
|
19063
19079
|
setup(t, { expose: e, emit: n }) {
|
|
19064
|
-
const i = t, s = n, o =
|
|
19080
|
+
const i = t, s = n, o = vt(t, "modelValue"), a = O([]), l = Hc, r = Wn, d = async () => {
|
|
19065
19081
|
await i.store.GetOptions(), a.value = i.store.Options;
|
|
19066
19082
|
}, c = async (E) => {
|
|
19067
19083
|
await i.store.Get(E.value);
|
|
@@ -19094,7 +19110,7 @@ const F8 = /* @__PURE__ */ X(I8, [["render", E8], ["__scopeId", "data-v-6fb8269e
|
|
|
19094
19110
|
y("div", G8, [
|
|
19095
19111
|
y("div", W8, [
|
|
19096
19112
|
y("div", Y8, U(t.title), 1),
|
|
19097
|
-
|
|
19113
|
+
Je(g(ue, {
|
|
19098
19114
|
icon: "close",
|
|
19099
19115
|
flat: "",
|
|
19100
19116
|
dense: "",
|
|
@@ -19110,7 +19126,7 @@ const F8 = /* @__PURE__ */ X(I8, [["render", E8], ["__scopeId", "data-v-6fb8269e
|
|
|
19110
19126
|
separator: ""
|
|
19111
19127
|
}, {
|
|
19112
19128
|
default: C(() => [
|
|
19113
|
-
(m(!0), S(K, null, we(f(a), (M) =>
|
|
19129
|
+
(m(!0), S(K, null, we(f(a), (M) => Je((m(), z(f(Bn), {
|
|
19114
19130
|
key: M.value,
|
|
19115
19131
|
clickable: "",
|
|
19116
19132
|
class: "q-px-md q-py-sm",
|
|
@@ -19138,7 +19154,7 @@ const F8 = /* @__PURE__ */ X(I8, [["render", E8], ["__scopeId", "data-v-6fb8269e
|
|
|
19138
19154
|
})
|
|
19139
19155
|
]),
|
|
19140
19156
|
y("div", X8, [
|
|
19141
|
-
|
|
19157
|
+
Je(g(ue, {
|
|
19142
19158
|
flat: "",
|
|
19143
19159
|
label: "Закрыть",
|
|
19144
19160
|
size: "sm",
|
|
@@ -19720,7 +19736,7 @@ const pC = { class: "btn-group" }, gC = /* @__PURE__ */ j({
|
|
|
19720
19736
|
},
|
|
19721
19737
|
emits: ["upload", "remove"],
|
|
19722
19738
|
setup(t, { emit: e }) {
|
|
19723
|
-
const n = t, i = e, s =
|
|
19739
|
+
const n = t, i = e, s = Lt.GUID(), o = Lt.GUID(), a = () => {
|
|
19724
19740
|
const d = document.getElementById(s);
|
|
19725
19741
|
if (!d.files)
|
|
19726
19742
|
return;
|