sprof 0.0.131 → 0.0.132
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/core/auth/Auth.d.ts +16 -4
- package/dist/core/components/organisms/PModal.vue.d.ts +1 -1
- package/dist/sprof.js +137 -137
- package/dist/sprof.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/core/auth/Auth.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { default as AuthModal } from './AuthModal';
|
|
2
|
-
import { default as AuthStatus } from './AuthStatus';
|
|
3
1
|
declare class Auth<UserT> {
|
|
4
2
|
static instance: unknown | undefined;
|
|
5
3
|
private form;
|
|
@@ -246,8 +244,22 @@ declare class Auth<UserT> {
|
|
|
246
244
|
ResetFields: () => void;
|
|
247
245
|
Reset: () => void;
|
|
248
246
|
};
|
|
249
|
-
get Status():
|
|
250
|
-
|
|
247
|
+
get Status(): {
|
|
248
|
+
DeprecateLogout: () => void;
|
|
249
|
+
AllowLogout: () => void;
|
|
250
|
+
readonly IsAuth: boolean;
|
|
251
|
+
readonly User: import('vue').UnwrapRef<UserT> | undefined;
|
|
252
|
+
SetUserConstructor: (c: import('../helpers/Classes').Constructable<import('../interfaces/IWithId').default>) => void;
|
|
253
|
+
SetState: (authInfo: import('../types/AuthInfo').AuthInfo) => void;
|
|
254
|
+
Logout: () => void;
|
|
255
|
+
Actualize: () => void;
|
|
256
|
+
};
|
|
257
|
+
get Modal(): {
|
|
258
|
+
IsClosable: () => boolean;
|
|
259
|
+
IsVisible: () => boolean;
|
|
260
|
+
Close: () => void;
|
|
261
|
+
Open: (closable?: boolean | undefined) => void;
|
|
262
|
+
};
|
|
251
263
|
}
|
|
252
264
|
declare const _default: Auth<unknown>;
|
|
253
265
|
export default _default;
|
|
@@ -91,6 +91,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<gl
|
|
|
91
91
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
92
92
|
onSave?: ((...args: any[]) => any) | undefined;
|
|
93
93
|
}>, {
|
|
94
|
+
closable: boolean;
|
|
94
95
|
title: string;
|
|
95
96
|
top: string;
|
|
96
97
|
margin: string;
|
|
@@ -98,7 +99,6 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<gl
|
|
|
98
99
|
width: string;
|
|
99
100
|
maxHeight: string;
|
|
100
101
|
show: boolean;
|
|
101
|
-
closable: boolean;
|
|
102
102
|
showClose: boolean;
|
|
103
103
|
showCloseDialog: boolean;
|
|
104
104
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
|
package/dist/sprof.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var na = Object.defineProperty;
|
|
2
2
|
var sa = (t, e, i) => e in t ? na(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
|
|
3
3
|
var l = (t, e, i) => sa(t, typeof e != "symbol" ? e + "" : e, i);
|
|
4
|
-
import { reactive as
|
|
4
|
+
import { reactive as We, ref as z, openBlock as g, createElementBlock as b, createElementVNode as f, getCurrentInstance as ra, inject as oa, onUnmounted as cr, onDeactivated as aa, onActivated as la, onBeforeMount as ot, defineComponent as A, Fragment as V, renderSlot as P, unref as p, normalizeStyle as R, createCommentVNode as J, resolveComponent as E, createVNode as I, withCtx as G, withModifiers as Ee, withDirectives as Ve, vModelText as Wn, computed as ve, mergeProps as Tt, createTextVNode as Li, toDisplayString as ye, mergeModels as Re, useModel as pt, vModelCheckbox as ua, vModelDynamic as ca, isRef as Xe, withKeys as da, normalizeClass as ie, watch as nt, createBlock as q, vModelRadio as ha, vShow as jn, vModelSelect as fa, useCssVars as dr, onMounted as ai, renderList as Pe, resolveDirective as hr, createStaticVNode as fr, resolveDynamicComponent as ei, nextTick as ma, onUpdated as ga, onBeforeUnmount as Vn, Transition as mr } from "vue";
|
|
5
5
|
var ke = /* @__PURE__ */ ((t) => (t.Login = "login", t.Register = "register", t.Restore = "restore", t.Refresh = "refresh", t))(ke || {}), ze = /* @__PURE__ */ ((t) => (t.Primary = "primary", t.Success = "success", t.Warning = "warning", t.Error = "error", t.Info = "info", t))(ze || {});
|
|
6
6
|
class Ct {
|
|
7
7
|
constructor(e, i, n, s) {
|
|
@@ -71,7 +71,7 @@ class an extends Di {
|
|
|
71
71
|
l(this, "id", "auth-button-restore");
|
|
72
72
|
l(this, "text", "Забыли пароль?");
|
|
73
73
|
l(this, "isSubmit", !1);
|
|
74
|
-
l(this, "chunk", ke.
|
|
74
|
+
l(this, "chunk", ke.Restore);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
class gr {
|
|
@@ -445,7 +445,7 @@ class xa extends yr {
|
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
447
|
const Oe = new xa();
|
|
448
|
-
class
|
|
448
|
+
class _e {
|
|
449
449
|
static Get(e) {
|
|
450
450
|
const i = localStorage.getItem(e);
|
|
451
451
|
if (i)
|
|
@@ -466,19 +466,19 @@ class ka {
|
|
|
466
466
|
this.setAccessToken(e.accessToken), this.setRefreshToken(e.refreshToken);
|
|
467
467
|
}
|
|
468
468
|
getAccessToken() {
|
|
469
|
-
return
|
|
469
|
+
return _e.Get(Ne.AccessToken);
|
|
470
470
|
}
|
|
471
471
|
getRefreshToken() {
|
|
472
|
-
return
|
|
472
|
+
return _e.Get(Ne.RefreshToken);
|
|
473
473
|
}
|
|
474
474
|
setAccessToken(e) {
|
|
475
|
-
|
|
475
|
+
_e.Set(Ne.AccessToken, e);
|
|
476
476
|
}
|
|
477
477
|
setRefreshToken(e) {
|
|
478
|
-
|
|
478
|
+
_e.Set(Ne.RefreshToken, e);
|
|
479
479
|
}
|
|
480
480
|
reset() {
|
|
481
|
-
|
|
481
|
+
_e.Remove(Ne.AccessToken), _e.Remove(Ne.RefreshToken);
|
|
482
482
|
}
|
|
483
483
|
actualize() {
|
|
484
484
|
this.setAccessToken(this.getAccessToken()), this.setRefreshToken(this.getAccessToken());
|
|
@@ -497,16 +497,16 @@ class Ma {
|
|
|
497
497
|
}
|
|
498
498
|
get() {
|
|
499
499
|
if (this.userConstructor)
|
|
500
|
-
return this.user = new this.userConstructor(
|
|
500
|
+
return this.user = new this.userConstructor(_e.Get(Ne.User)), this.user;
|
|
501
501
|
}
|
|
502
502
|
set(e) {
|
|
503
|
-
this.userConstructor && (this.user = new this.userConstructor(e),
|
|
503
|
+
this.userConstructor && (this.user = new this.userConstructor(e), _e.Set(Ne.User, this.user));
|
|
504
504
|
}
|
|
505
505
|
reset() {
|
|
506
|
-
this.user = void 0,
|
|
506
|
+
this.user = void 0, _e.Remove(Ne.User);
|
|
507
507
|
}
|
|
508
508
|
actualize() {
|
|
509
|
-
const e =
|
|
509
|
+
const e = _e.Get(Ne.User);
|
|
510
510
|
e && this.set(e);
|
|
511
511
|
}
|
|
512
512
|
}
|
|
@@ -552,9 +552,9 @@ class Ra {
|
|
|
552
552
|
}
|
|
553
553
|
const Ht = class Ht {
|
|
554
554
|
constructor() {
|
|
555
|
-
l(this, "form",
|
|
556
|
-
l(this, "status", new Ra());
|
|
557
|
-
l(this, "modal", new Ca());
|
|
555
|
+
l(this, "form", We(new Sa()));
|
|
556
|
+
l(this, "status", We(new Ra()));
|
|
557
|
+
l(this, "modal", We(new Ca()));
|
|
558
558
|
if (Ht.instance)
|
|
559
559
|
return Ht.instance;
|
|
560
560
|
Ht.instance = this, Object.freeze(this);
|
|
@@ -647,7 +647,7 @@ var Ps;
|
|
|
647
647
|
throw new TypeError();
|
|
648
648
|
if (!fe(T) && !_(T) && !Ot(T))
|
|
649
649
|
throw new TypeError();
|
|
650
|
-
return Ot(T) && (T = void 0), M =
|
|
650
|
+
return Ot(T) && (T = void 0), M = Qe(M), Uo(y, C, M, T);
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
e("decorate", X);
|
|
@@ -665,51 +665,51 @@ var Ps;
|
|
|
665
665
|
function H(y, C, M, T) {
|
|
666
666
|
if (!fe(M))
|
|
667
667
|
throw new TypeError();
|
|
668
|
-
return _(T) || (T =
|
|
668
|
+
return _(T) || (T = Qe(T)), gs(y, C, M, T);
|
|
669
669
|
}
|
|
670
670
|
e("defineMetadata", H);
|
|
671
671
|
function ne(y, C, M) {
|
|
672
672
|
if (!fe(C))
|
|
673
673
|
throw new TypeError();
|
|
674
|
-
return _(M) || (M =
|
|
674
|
+
return _(M) || (M = Qe(M)), hs(y, C, M);
|
|
675
675
|
}
|
|
676
676
|
e("hasMetadata", ne);
|
|
677
677
|
function He(y, C, M) {
|
|
678
678
|
if (!fe(C))
|
|
679
679
|
throw new TypeError();
|
|
680
|
-
return _(M) || (M =
|
|
680
|
+
return _(M) || (M = Qe(M)), nn(y, C, M);
|
|
681
681
|
}
|
|
682
682
|
e("hasOwnMetadata", He);
|
|
683
683
|
function qe(y, C, M) {
|
|
684
684
|
if (!fe(C))
|
|
685
685
|
throw new TypeError();
|
|
686
|
-
return _(M) || (M =
|
|
686
|
+
return _(M) || (M = Qe(M)), fs(y, C, M);
|
|
687
687
|
}
|
|
688
688
|
e("getMetadata", qe);
|
|
689
689
|
function vt(y, C, M) {
|
|
690
690
|
if (!fe(C))
|
|
691
691
|
throw new TypeError();
|
|
692
|
-
return _(M) || (M =
|
|
692
|
+
return _(M) || (M = Qe(M)), ms(y, C, M);
|
|
693
693
|
}
|
|
694
694
|
e("getOwnMetadata", vt);
|
|
695
695
|
function zt(y, C) {
|
|
696
696
|
if (!fe(y))
|
|
697
697
|
throw new TypeError();
|
|
698
|
-
return _(C) || (C =
|
|
698
|
+
return _(C) || (C = Qe(C)), ps(y, C);
|
|
699
699
|
}
|
|
700
700
|
e("getMetadataKeys", zt);
|
|
701
701
|
function gi(y, C) {
|
|
702
702
|
if (!fe(y))
|
|
703
703
|
throw new TypeError();
|
|
704
|
-
return _(C) || (C =
|
|
704
|
+
return _(C) || (C = Qe(C)), vs(y, C);
|
|
705
705
|
}
|
|
706
706
|
e("getOwnMetadataKeys", gi);
|
|
707
707
|
function qo(y, C, M) {
|
|
708
708
|
if (!fe(C))
|
|
709
709
|
throw new TypeError();
|
|
710
|
-
if (_(M) || (M =
|
|
710
|
+
if (_(M) || (M = Qe(M)), !fe(C))
|
|
711
711
|
throw new TypeError();
|
|
712
|
-
_(M) || (M =
|
|
712
|
+
_(M) || (M = Qe(M));
|
|
713
713
|
var T = Zt(
|
|
714
714
|
C,
|
|
715
715
|
M,
|
|
@@ -892,7 +892,7 @@ var Ps;
|
|
|
892
892
|
function Go(y) {
|
|
893
893
|
return "" + y;
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function Qe(y) {
|
|
896
896
|
var C = jo(y);
|
|
897
897
|
return Wo(C) ? C : Go(C);
|
|
898
898
|
}
|
|
@@ -998,9 +998,9 @@ var Ps;
|
|
|
998
998
|
var ue = Ms(ae);
|
|
999
999
|
if (!ue)
|
|
1000
1000
|
return;
|
|
1001
|
-
var
|
|
1002
|
-
if (
|
|
1003
|
-
return Rs(ae),
|
|
1001
|
+
var Ge = ks(ue);
|
|
1002
|
+
if (Ge.isProviderFor(B, te))
|
|
1003
|
+
return Rs(ae), Ge;
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
@@ -1023,8 +1023,8 @@ var Ps;
|
|
|
1023
1023
|
if (ue !== ae) {
|
|
1024
1024
|
if (!_(ue))
|
|
1025
1025
|
return !1;
|
|
1026
|
-
var
|
|
1027
|
-
_(
|
|
1026
|
+
var Ge = W.get(B);
|
|
1027
|
+
_(Ge) && (Ge = new m(), W.set(B, Ge)), Ge.set(te, ae);
|
|
1028
1028
|
}
|
|
1029
1029
|
return !0;
|
|
1030
1030
|
}
|
|
@@ -1104,13 +1104,13 @@ var Ps;
|
|
|
1104
1104
|
);
|
|
1105
1105
|
if (_(te))
|
|
1106
1106
|
return B;
|
|
1107
|
-
for (var ae = te.keys(), ue = xs(ae),
|
|
1107
|
+
for (var ae = te.keys(), ue = xs(ae), Ge = 0; ; ) {
|
|
1108
1108
|
var Is = Ms(ue);
|
|
1109
1109
|
if (!Is)
|
|
1110
|
-
return B.length =
|
|
1110
|
+
return B.length = Ge, B;
|
|
1111
1111
|
var ta = ks(Is);
|
|
1112
1112
|
try {
|
|
1113
|
-
B[
|
|
1113
|
+
B[Ge] = ta;
|
|
1114
1114
|
} catch (ia) {
|
|
1115
1115
|
try {
|
|
1116
1116
|
Rs(ue);
|
|
@@ -1118,7 +1118,7 @@ var Ps;
|
|
|
1118
1118
|
throw ia;
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
|
1121
|
-
|
|
1121
|
+
Ge++;
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
1124
|
function F(L, D, B) {
|
|
@@ -1962,7 +1962,7 @@ class Pi {
|
|
|
1962
1962
|
this.offset = 0, this.limit = 25, j.BuildClass(this);
|
|
1963
1963
|
}
|
|
1964
1964
|
}
|
|
1965
|
-
var
|
|
1965
|
+
var Ze = /* @__PURE__ */ ((t) => (t.Asc = "asc", t.Desc = "desc", t))(Ze || {});
|
|
1966
1966
|
class Zn {
|
|
1967
1967
|
constructor(e) {
|
|
1968
1968
|
l(this, "model", "");
|
|
@@ -1973,15 +1973,15 @@ class Zn {
|
|
|
1973
1973
|
l(this, "selected", !1);
|
|
1974
1974
|
j.BuildClass(this, e);
|
|
1975
1975
|
}
|
|
1976
|
-
static Create(e, i, n =
|
|
1976
|
+
static Create(e, i, n = Ze.Asc, s, r) {
|
|
1977
1977
|
const o = new Zn();
|
|
1978
|
-
return o.model = e.GetClassName(), o.col = i ?? "", o.order = n ??
|
|
1978
|
+
return o.model = e.GetClassName(), o.col = i ?? "", o.order = n ?? Ze.Asc, o.label = s ?? "", o.default = r ?? !1, o;
|
|
1979
1979
|
}
|
|
1980
1980
|
isAsc() {
|
|
1981
|
-
return this.order ===
|
|
1981
|
+
return this.order === Ze.Asc;
|
|
1982
1982
|
}
|
|
1983
1983
|
isDesc() {
|
|
1984
|
-
return this.order ===
|
|
1984
|
+
return this.order === Ze.Desc;
|
|
1985
1985
|
}
|
|
1986
1986
|
eq(e) {
|
|
1987
1987
|
return e.model === this.model && e.col === this.col && e.order === this.order;
|
|
@@ -1995,10 +1995,10 @@ class Zn {
|
|
|
1995
1995
|
this.model = n.get("model") ?? "", this.col = n.get("col") ?? "", this.label = n.get("label") ?? "", this.default = !!n.get("default"), this.order = n.get("order") ?? "";
|
|
1996
1996
|
}
|
|
1997
1997
|
asc() {
|
|
1998
|
-
this.order =
|
|
1998
|
+
this.order = Ze.Asc;
|
|
1999
1999
|
}
|
|
2000
2000
|
desc() {
|
|
2001
|
-
this.order =
|
|
2001
|
+
this.order = Ze.Desc;
|
|
2002
2002
|
}
|
|
2003
2003
|
}
|
|
2004
2004
|
class qi {
|
|
@@ -2093,11 +2093,11 @@ function kr(t, e) {
|
|
|
2093
2093
|
const { toString: La } = Object.prototype, { getPrototypeOf: Xn } = Object, Ui = /* @__PURE__ */ ((t) => (e) => {
|
|
2094
2094
|
const i = La.call(e);
|
|
2095
2095
|
return t[i] || (t[i] = i.slice(8, -1).toLowerCase());
|
|
2096
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
2096
|
+
})(/* @__PURE__ */ Object.create(null)), Ye = (t) => (t = t.toLowerCase(), (e) => Ui(e) === t), Wi = (t) => (e) => typeof e === t, { isArray: Gt } = Array, si = Wi("undefined");
|
|
2097
2097
|
function Da(t) {
|
|
2098
2098
|
return t !== null && !si(t) && t.constructor !== null && !si(t.constructor) && Be(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
2099
2099
|
}
|
|
2100
|
-
const Mr =
|
|
2100
|
+
const Mr = Ye("ArrayBuffer");
|
|
2101
2101
|
function Ba(t) {
|
|
2102
2102
|
let e;
|
|
2103
2103
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Mr(t.buffer), e;
|
|
@@ -2107,11 +2107,11 @@ const Ha = Wi("string"), Be = Wi("function"), Rr = Wi("number"), ji = (t) => t !
|
|
|
2107
2107
|
return !1;
|
|
2108
2108
|
const e = Xn(t);
|
|
2109
2109
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
|
|
2110
|
-
}, Na =
|
|
2110
|
+
}, Na = Ye("Date"), Ua = Ye("File"), Wa = Ye("Blob"), ja = Ye("FileList"), Va = (t) => ji(t) && Be(t.pipe), Ga = (t) => {
|
|
2111
2111
|
let e;
|
|
2112
2112
|
return t && (typeof FormData == "function" && t instanceof FormData || Be(t.append) && ((e = Ui(t)) === "formdata" || // detect form-data instance
|
|
2113
2113
|
e === "object" && Be(t.toString) && t.toString() === "[object FormData]"));
|
|
2114
|
-
}, _a =
|
|
2114
|
+
}, _a = Ye("URLSearchParams"), [Za, Xa, Ya, Ja] = ["ReadableStream", "Request", "Response", "Headers"].map(Ye), Qa = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
2115
2115
|
function ci(t, e, { allOwnKeys: i = !1 } = {}) {
|
|
2116
2116
|
if (t === null || typeof t > "u")
|
|
2117
2117
|
return;
|
|
@@ -2187,12 +2187,12 @@ const Ka = (t, e, i, { allOwnKeys: n } = {}) => (ci(e, (s, r) => {
|
|
|
2187
2187
|
for (; (i = t.exec(e)) !== null; )
|
|
2188
2188
|
n.push(i);
|
|
2189
2189
|
return n;
|
|
2190
|
-
}, ll =
|
|
2190
|
+
}, ll = Ye("HTMLFormElement"), ul = (t) => t.toLowerCase().replace(
|
|
2191
2191
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
2192
2192
|
function(i, n, s) {
|
|
2193
2193
|
return n.toUpperCase() + s;
|
|
2194
2194
|
}
|
|
2195
|
-
), zs = (({ hasOwnProperty: t }) => (e, i) => t.call(e, i))(Object.prototype), cl =
|
|
2195
|
+
), zs = (({ hasOwnProperty: t }) => (e, i) => t.call(e, i))(Object.prototype), cl = Ye("RegExp"), $r = (t, e) => {
|
|
2196
2196
|
const i = Object.getOwnPropertyDescriptors(t), n = {};
|
|
2197
2197
|
ci(i, (s, r) => {
|
|
2198
2198
|
let o;
|
|
@@ -2252,7 +2252,7 @@ const vl = (t) => {
|
|
|
2252
2252
|
return n;
|
|
2253
2253
|
};
|
|
2254
2254
|
return i(t, 0);
|
|
2255
|
-
}, yl =
|
|
2255
|
+
}, yl = Ye("AsyncFunction"), wl = (t) => t && (ji(t) || Be(t)) && Be(t.then) && Be(t.catch), Pr = ((t, e) => t ? setImmediate : e ? ((i, n) => (xt.addEventListener("message", ({ source: s, data: r }) => {
|
|
2256
2256
|
s === xt && r === i && n.length && n.shift()();
|
|
2257
2257
|
}, !1), (s) => {
|
|
2258
2258
|
n.push(s), xt.postMessage(i, "*");
|
|
@@ -2292,7 +2292,7 @@ const vl = (t) => {
|
|
|
2292
2292
|
inherits: tl,
|
|
2293
2293
|
toFlatObject: il,
|
|
2294
2294
|
kindOf: Ui,
|
|
2295
|
-
kindOfTest:
|
|
2295
|
+
kindOfTest: Ye,
|
|
2296
2296
|
endsWith: nl,
|
|
2297
2297
|
toArray: sl,
|
|
2298
2298
|
forEachEntry: ol,
|
|
@@ -3468,7 +3468,7 @@ function lu(t, e, i) {
|
|
|
3468
3468
|
const Ri = {
|
|
3469
3469
|
assertOptions: lu,
|
|
3470
3470
|
validators: _i
|
|
3471
|
-
},
|
|
3471
|
+
}, Ke = Ri.validators;
|
|
3472
3472
|
class kt {
|
|
3473
3473
|
constructor(e) {
|
|
3474
3474
|
this.defaults = e, this.interceptors = {
|
|
@@ -3505,17 +3505,17 @@ class kt {
|
|
|
3505
3505
|
typeof e == "string" ? (i = i || {}, i.url = e) : i = e || {}, i = It(this.defaults, i);
|
|
3506
3506
|
const { transitional: n, paramsSerializer: s, headers: r } = i;
|
|
3507
3507
|
n !== void 0 && Ri.assertOptions(n, {
|
|
3508
|
-
silentJSONParsing:
|
|
3509
|
-
forcedJSONParsing:
|
|
3510
|
-
clarifyTimeoutError:
|
|
3508
|
+
silentJSONParsing: Ke.transitional(Ke.boolean),
|
|
3509
|
+
forcedJSONParsing: Ke.transitional(Ke.boolean),
|
|
3510
|
+
clarifyTimeoutError: Ke.transitional(Ke.boolean)
|
|
3511
3511
|
}, !1), s != null && (x.isFunction(s) ? i.paramsSerializer = {
|
|
3512
3512
|
serialize: s
|
|
3513
3513
|
} : Ri.assertOptions(s, {
|
|
3514
|
-
encode:
|
|
3515
|
-
serialize:
|
|
3514
|
+
encode: Ke.function,
|
|
3515
|
+
serialize: Ke.function
|
|
3516
3516
|
}, !0)), Ri.assertOptions(i, {
|
|
3517
|
-
baseUrl:
|
|
3518
|
-
withXsrfToken:
|
|
3517
|
+
baseUrl: Ke.spelling("baseURL"),
|
|
3518
|
+
withXsrfToken: Ke.spelling("withXSRFToken")
|
|
3519
3519
|
}, !0), i.method = (i.method || this.defaults.method || "get").toLowerCase();
|
|
3520
3520
|
let o = r && x.merge(
|
|
3521
3521
|
r.common,
|
|
@@ -3924,7 +3924,7 @@ const oe = class oe {
|
|
|
3924
3924
|
return o || "file";
|
|
3925
3925
|
}
|
|
3926
3926
|
static getHeaders(e) {
|
|
3927
|
-
const i =
|
|
3927
|
+
const i = _e.Get(Ne.AccessToken);
|
|
3928
3928
|
return e || (e = oe.headers), i && (e[Pn.Token] = i), e ?? oe.headers;
|
|
3929
3929
|
}
|
|
3930
3930
|
static returnResponse(e, i) {
|
|
@@ -4008,7 +4008,7 @@ const Xr = /* @__PURE__ */ $(du, [["render", fu]]), mu = [
|
|
|
4008
4008
|
name: "NotFound",
|
|
4009
4009
|
component: Xr
|
|
4010
4010
|
}
|
|
4011
|
-
],
|
|
4011
|
+
], et = class et {
|
|
4012
4012
|
static Set(e) {
|
|
4013
4013
|
this.router = e, this.AddRoutes(mu);
|
|
4014
4014
|
}
|
|
@@ -4029,16 +4029,16 @@ const Xr = /* @__PURE__ */ $(du, [["render", fu]]), mu = [
|
|
|
4029
4029
|
await this.Get().replace(e);
|
|
4030
4030
|
}
|
|
4031
4031
|
static Id() {
|
|
4032
|
-
return
|
|
4032
|
+
return et.GetStringParam("id");
|
|
4033
4033
|
}
|
|
4034
4034
|
static Slug() {
|
|
4035
|
-
return
|
|
4035
|
+
return et.GetStringParam("slug");
|
|
4036
4036
|
}
|
|
4037
4037
|
static async Back() {
|
|
4038
4038
|
this.Get().go(-1);
|
|
4039
4039
|
}
|
|
4040
4040
|
static GetQid() {
|
|
4041
|
-
return
|
|
4041
|
+
return et.GetStringQueryParam("qid");
|
|
4042
4042
|
}
|
|
4043
4043
|
static Route() {
|
|
4044
4044
|
return this.Get().currentRoute.value;
|
|
@@ -4049,7 +4049,7 @@ const Xr = /* @__PURE__ */ $(du, [["render", fu]]), mu = [
|
|
|
4049
4049
|
}
|
|
4050
4050
|
static GetPath() {
|
|
4051
4051
|
var i;
|
|
4052
|
-
const e = (i =
|
|
4052
|
+
const e = (i = et.Route()) == null ? void 0 : i.path.split("/");
|
|
4053
4053
|
return !e || e.length <= 0 ? "" : e[e.length - 1];
|
|
4054
4054
|
}
|
|
4055
4055
|
static async ToAdmin(e) {
|
|
@@ -4058,7 +4058,7 @@ const Xr = /* @__PURE__ */ $(du, [["render", fu]]), mu = [
|
|
|
4058
4058
|
return;
|
|
4059
4059
|
}
|
|
4060
4060
|
let i = e;
|
|
4061
|
-
i[0] === "/" && (i = e.substring(1)), await
|
|
4061
|
+
i[0] === "/" && (i = e.substring(1)), await et.To(`/admin/${i}`);
|
|
4062
4062
|
}
|
|
4063
4063
|
static GetStringQueryParam(e) {
|
|
4064
4064
|
return String(this.Route().query[e]);
|
|
@@ -4077,19 +4077,19 @@ const Xr = /* @__PURE__ */ $(du, [["render", fu]]), mu = [
|
|
|
4077
4077
|
return this.Get().resolve(e);
|
|
4078
4078
|
}
|
|
4079
4079
|
};
|
|
4080
|
-
l(
|
|
4081
|
-
let i =
|
|
4080
|
+
l(et, "router"), l(et, "ChangeDocumentTitle", (e = "") => {
|
|
4081
|
+
let i = et.Route().meta.title ?? e;
|
|
4082
4082
|
i && e && (i = i + ` | ${e}`), document.title = i;
|
|
4083
4083
|
});
|
|
4084
|
-
let bt =
|
|
4084
|
+
let bt = et;
|
|
4085
4085
|
class le {
|
|
4086
4086
|
constructor(e, i) {
|
|
4087
|
-
l(this, "items",
|
|
4087
|
+
l(this, "items", We([]));
|
|
4088
4088
|
l(this, "item");
|
|
4089
4089
|
l(this, "count", z(0));
|
|
4090
4090
|
l(this, "classConstructor");
|
|
4091
4091
|
l(this, "url", "");
|
|
4092
|
-
this.classConstructor = e, this.item =
|
|
4092
|
+
this.classConstructor = e, this.item = We(new this.classConstructor()), this.url = i;
|
|
4093
4093
|
}
|
|
4094
4094
|
Set(e) {
|
|
4095
4095
|
Object.assign(this.item, new this.classConstructor(e));
|
|
@@ -4234,7 +4234,7 @@ class vu {
|
|
|
4234
4234
|
}
|
|
4235
4235
|
}
|
|
4236
4236
|
function Yr(t, e) {
|
|
4237
|
-
const i = [], n = e ||
|
|
4237
|
+
const i = [], n = e || Ze.Asc, s = n === Ze.Asc ? Ze.Desc : Ze.Asc;
|
|
4238
4238
|
return Object.values(t).forEach((r) => {
|
|
4239
4239
|
i.push(r(n)), i.push(r(s));
|
|
4240
4240
|
}), i.length > 0 && !i.some((r) => r.default) && (i[0].default = !0), e && i.forEach((r) => {
|
|
@@ -5081,8 +5081,8 @@ class gn {
|
|
|
5081
5081
|
let yc = class {
|
|
5082
5082
|
constructor() {
|
|
5083
5083
|
l(this, "isSearchDrawerOpen", z(!1));
|
|
5084
|
-
l(this, "searchModel",
|
|
5085
|
-
l(this, "searchGroups",
|
|
5084
|
+
l(this, "searchModel", We(new gn()));
|
|
5085
|
+
l(this, "searchGroups", We([]));
|
|
5086
5086
|
l(this, "count", 0);
|
|
5087
5087
|
}
|
|
5088
5088
|
async Search(e) {
|
|
@@ -5254,8 +5254,8 @@ class Rc {
|
|
|
5254
5254
|
const Ic = new Rc();
|
|
5255
5255
|
class Ac {
|
|
5256
5256
|
constructor() {
|
|
5257
|
-
l(this, "Menu",
|
|
5258
|
-
l(this, "Head",
|
|
5257
|
+
l(this, "Menu", We(Ic));
|
|
5258
|
+
l(this, "Head", We(Mc));
|
|
5259
5259
|
}
|
|
5260
5260
|
}
|
|
5261
5261
|
const $c = new Ac();
|
|
@@ -5312,7 +5312,7 @@ class St {
|
|
|
5312
5312
|
l(St, "Admin", $c), l(St, "Dialog", ct), l(St, "Loading", Tc), l(St, "Notify", Oe), l(St, "Btn", Ct), l(St, "Input", gr);
|
|
5313
5313
|
class N {
|
|
5314
5314
|
}
|
|
5315
|
-
l(N, "Auth",
|
|
5315
|
+
l(N, "Auth", We(ft)), l(N, "UI", We(St)), l(N, "Paginator", We(Kr)), l(N, "FTSP", ni), l(N, "S", xc), l(N, "H", Vu), l(N, "C", Pa);
|
|
5316
5316
|
class ao {
|
|
5317
5317
|
constructor(e) {
|
|
5318
5318
|
l(this, "id");
|
|
@@ -6252,7 +6252,7 @@ const xd = {
|
|
|
6252
6252
|
}, null, 8, ["file-info", "default-ratio", "onRemoveFile", "onCrop"])
|
|
6253
6253
|
]),
|
|
6254
6254
|
f("div", Dd, [
|
|
6255
|
-
|
|
6255
|
+
Ve(f("input", {
|
|
6256
6256
|
"onUpdate:modelValue": (v) => h.description = v,
|
|
6257
6257
|
class: "item-description-form",
|
|
6258
6258
|
placeholder: "..."
|
|
@@ -6338,7 +6338,7 @@ const Nd = "p-button", Ud = /* @__PURE__ */ A({
|
|
|
6338
6338
|
class: "check-field__label",
|
|
6339
6339
|
style: R({ fontSize: t.fontSize })
|
|
6340
6340
|
}, [
|
|
6341
|
-
|
|
6341
|
+
Ve(f("input", {
|
|
6342
6342
|
"onUpdate:modelValue": o[0] || (o[0] = (a) => i.value = a),
|
|
6343
6343
|
class: "check-field__input",
|
|
6344
6344
|
type: "checkbox",
|
|
@@ -6674,7 +6674,7 @@ const pn = /* @__PURE__ */ new WeakMap(), ch = (t, e) => {
|
|
|
6674
6674
|
f("div", hh, [
|
|
6675
6675
|
P(i.$slots, "default", {}, void 0, !0)
|
|
6676
6676
|
]),
|
|
6677
|
-
|
|
6677
|
+
Ve(f("input", Tt(i.$attrs, {
|
|
6678
6678
|
"onUpdate:modelValue": n[0] || (n[0] = (s) => e.value = s),
|
|
6679
6679
|
class: "text-field__input",
|
|
6680
6680
|
style: { color: t.color },
|
|
@@ -6724,7 +6724,7 @@ const pn = /* @__PURE__ */ new WeakMap(), ch = (t, e) => {
|
|
|
6724
6724
|
}, [
|
|
6725
6725
|
I(d, {
|
|
6726
6726
|
modelValue: p(r),
|
|
6727
|
-
"onUpdate:modelValue": c[0] || (c[0] = (h) =>
|
|
6727
|
+
"onUpdate:modelValue": c[0] || (c[0] = (h) => Xe(r) ? r.value = h : null),
|
|
6728
6728
|
mask: "##.##.####",
|
|
6729
6729
|
placeholder: t.placeholder,
|
|
6730
6730
|
margin: t.margin,
|
|
@@ -6870,8 +6870,8 @@ const wh = /* @__PURE__ */ A({
|
|
|
6870
6870
|
I(bh)
|
|
6871
6871
|
], 2)
|
|
6872
6872
|
]),
|
|
6873
|
-
|
|
6874
|
-
"onUpdate:modelValue": w[0] || (w[0] = (O) =>
|
|
6873
|
+
Ve(f("input", Tt(k.$attrs, {
|
|
6874
|
+
"onUpdate:modelValue": w[0] || (w[0] = (O) => Xe(u) ? u.value = O : null),
|
|
6875
6875
|
class: "input-field",
|
|
6876
6876
|
type: "number",
|
|
6877
6877
|
disabled: t.disabled,
|
|
@@ -7062,7 +7062,7 @@ const wh = /* @__PURE__ */ A({
|
|
|
7062
7062
|
for: p(r),
|
|
7063
7063
|
style: R({ fontSize: t.fontSize })
|
|
7064
7064
|
}, [
|
|
7065
|
-
|
|
7065
|
+
Ve(f("input", {
|
|
7066
7066
|
id: p(r),
|
|
7067
7067
|
"onUpdate:modelValue": c[0] || (c[0] = (d) => i.value = d),
|
|
7068
7068
|
name: t.name,
|
|
@@ -7270,7 +7270,7 @@ const wh = /* @__PURE__ */ A({
|
|
|
7270
7270
|
onMouseover: c[1] || (c[1] = (h) => r.value = !0),
|
|
7271
7271
|
onMouseleave: c[2] || (c[2] = (h) => r.value = !1)
|
|
7272
7272
|
}, [
|
|
7273
|
-
t.clearable ?
|
|
7273
|
+
t.clearable ? Ve((g(), b("div", {
|
|
7274
7274
|
key: 0,
|
|
7275
7275
|
class: "clear",
|
|
7276
7276
|
onClick: u
|
|
@@ -7282,7 +7282,7 @@ const wh = /* @__PURE__ */ A({
|
|
|
7282
7282
|
f("div", Gh, [
|
|
7283
7283
|
I(d, { margin: "2px 2px 0 0" })
|
|
7284
7284
|
]),
|
|
7285
|
-
|
|
7285
|
+
Ve(f("select", Tt(a.$attrs, {
|
|
7286
7286
|
"onUpdate:modelValue": c[0] || (c[0] = (h) => i.value = h),
|
|
7287
7287
|
class: "text-field__input",
|
|
7288
7288
|
onChange: o
|
|
@@ -7398,7 +7398,7 @@ const wh = /* @__PURE__ */ A({
|
|
|
7398
7398
|
f("div", rf, [
|
|
7399
7399
|
P(i.$slots, "default", {}, void 0, !0)
|
|
7400
7400
|
]),
|
|
7401
|
-
|
|
7401
|
+
Ve(f("textarea", Tt(i.$attrs, {
|
|
7402
7402
|
"onUpdate:modelValue": n[0] || (n[0] = (s) => e.value = s),
|
|
7403
7403
|
class: "text-field__input",
|
|
7404
7404
|
style: { color: t.color },
|
|
@@ -7680,7 +7680,7 @@ const gf = { class: "container" }, pf = { class: "slide-box" }, vf = { class: "l
|
|
|
7680
7680
|
};
|
|
7681
7681
|
return (c, d) => {
|
|
7682
7682
|
const h = hr("click-outside");
|
|
7683
|
-
return
|
|
7683
|
+
return Ve((g(), b("div", {
|
|
7684
7684
|
class: "context-window",
|
|
7685
7685
|
style: R({
|
|
7686
7686
|
left: p(o),
|
|
@@ -7724,13 +7724,13 @@ const gf = { class: "container" }, pf = { class: "slide-box" }, vf = { class: "l
|
|
|
7724
7724
|
return g(), b("div", Cf, [
|
|
7725
7725
|
I(d, {
|
|
7726
7726
|
"model-value": p(s),
|
|
7727
|
-
"onUpdate:modelValue": c[0] || (c[0] = (h) =>
|
|
7727
|
+
"onUpdate:modelValue": c[0] || (c[0] = (h) => Xe(s) ? s.value = h : null),
|
|
7728
7728
|
onChange: o
|
|
7729
7729
|
}, null, 8, ["model-value"]),
|
|
7730
7730
|
c[2] || (c[2] = Li(" - ")),
|
|
7731
7731
|
I(d, {
|
|
7732
7732
|
"model-value": p(r),
|
|
7733
|
-
"onUpdate:modelValue": c[1] || (c[1] = (h) =>
|
|
7733
|
+
"onUpdate:modelValue": c[1] || (c[1] = (h) => Xe(r) ? r.value = h : null),
|
|
7734
7734
|
onChange: u
|
|
7735
7735
|
}, null, 8, ["model-value"])
|
|
7736
7736
|
]);
|
|
@@ -7808,7 +7808,7 @@ const Af = /* @__PURE__ */ $(Mf, [["render", If], ["__scopeId", "data-v-d28c6f33
|
|
|
7808
7808
|
const a = E("PCheckBox");
|
|
7809
7809
|
return g(), q(a, {
|
|
7810
7810
|
modelValue: p(n),
|
|
7811
|
-
"onUpdate:modelValue": u[0] || (u[0] = (c) =>
|
|
7811
|
+
"onUpdate:modelValue": u[0] || (u[0] = (c) => Xe(n) ? n.value = c : null),
|
|
7812
7812
|
label: t.model.label,
|
|
7813
7813
|
size: "mini",
|
|
7814
7814
|
onChange: r
|
|
@@ -7905,7 +7905,7 @@ const Af = /* @__PURE__ */ $(Mf, [["render", If], ["__scopeId", "data-v-d28c6f33
|
|
|
7905
7905
|
const c = E("PSelect");
|
|
7906
7906
|
return g(), q(c, {
|
|
7907
7907
|
modelValue: p(s),
|
|
7908
|
-
"onUpdate:modelValue": a[0] || (a[0] = (d) =>
|
|
7908
|
+
"onUpdate:modelValue": a[0] || (a[0] = (d) => Xe(s) ? s.value = d : null),
|
|
7909
7909
|
clearable: p(s),
|
|
7910
7910
|
placeholder: t.defaultLabel,
|
|
7911
7911
|
onChange: o
|
|
@@ -8703,7 +8703,7 @@ var tr, Sm, wi, pe = (tr = function(t) {
|
|
|
8703
8703
|
return function() {
|
|
8704
8704
|
throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
|
|
8705
8705
|
}(e == null && wi.path);
|
|
8706
|
-
} }, wi.exports), wi.exports),
|
|
8706
|
+
} }, wi.exports), wi.exports), Je = function(t) {
|
|
8707
8707
|
return function(e, i) {
|
|
8708
8708
|
if (!e) return t;
|
|
8709
8709
|
var n;
|
|
@@ -8868,7 +8868,7 @@ us.render = function(t, e, i, n, s, r) {
|
|
|
8868
8868
|
return r.onMouseLeave && r.onMouseLeave.apply(r, arguments);
|
|
8869
8869
|
}) }, [P(t.$slots, "default")], 34);
|
|
8870
8870
|
};
|
|
8871
|
-
var yn =
|
|
8871
|
+
var yn = Je("vue-handler-wrapper"), Ao = { name: "HandlerWrapper", components: { DraggableElement: us }, props: { horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, computed: { classes: function() {
|
|
8872
8872
|
var t;
|
|
8873
8873
|
if (this.horizontalPosition || this.verticalPosition) {
|
|
8874
8874
|
var e, i = ko(this.horizontalPosition, this.verticalPosition);
|
|
@@ -8890,7 +8890,7 @@ Ao.render = function(t, e, i, n, s, r) {
|
|
|
8890
8890
|
return [P(t.$slots, "default")];
|
|
8891
8891
|
}), _: 3 }, 8, ["class"])], 2);
|
|
8892
8892
|
};
|
|
8893
|
-
var km =
|
|
8893
|
+
var km = Je("vue-line-wrapper"), $o = { name: "LineWrapper", components: { DraggableElement: us }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
|
|
8894
8894
|
var t;
|
|
8895
8895
|
return km((Ue(t = {}, this.position, !0), Ue(t, "disabled", this.disabled), t));
|
|
8896
8896
|
} }, emits: ["leave", "enter", "drag", "drag-end"] };
|
|
@@ -8908,7 +8908,7 @@ $o.render = function(t, e, i, n, s, r) {
|
|
|
8908
8908
|
return [P(t.$slots, "default")];
|
|
8909
8909
|
}), _: 3 }, 8, ["class"]);
|
|
8910
8910
|
};
|
|
8911
|
-
var
|
|
8911
|
+
var it = ["left", "right", "top", "bottom"], Mm = ["left", "right"], Rm = ["top", "bottom"], Im = ["left", "top"], Am = ["fill-area", "fit-area", "stencil", "none"], sr = { left: 0, top: 0, width: 0, height: 0 };
|
|
8912
8912
|
function rr(t, e, i) {
|
|
8913
8913
|
return !(i = i || ["width", "height", "left", "top"]).some(function(n) {
|
|
8914
8914
|
return t[n] !== e[n];
|
|
@@ -8925,12 +8925,12 @@ function Ce(t) {
|
|
|
8925
8925
|
}
|
|
8926
8926
|
function oi(t, e) {
|
|
8927
8927
|
var i = { left: 0, top: 0, right: 0, bottom: 0 };
|
|
8928
|
-
return
|
|
8928
|
+
return it.forEach(function(n) {
|
|
8929
8929
|
var s = e[n], r = rt(t)[n];
|
|
8930
8930
|
i[n] = s !== void 0 && r !== void 0 ? n === "left" || n === "top" ? Math.max(0, s - r) : Math.max(0, r - s) : 0;
|
|
8931
8931
|
}), i;
|
|
8932
8932
|
}
|
|
8933
|
-
function
|
|
8933
|
+
function tt(t, e) {
|
|
8934
8934
|
return { left: t.left - e.left, top: t.top - e.top, width: t.width + e.left + e.right, height: t.height + e.top + e.bottom };
|
|
8935
8935
|
}
|
|
8936
8936
|
function Ki(t) {
|
|
@@ -8939,7 +8939,7 @@ function Ki(t) {
|
|
|
8939
8939
|
function Le(t, e) {
|
|
8940
8940
|
return U(U({}, t), { left: t.left + e.left, top: t.top + e.top });
|
|
8941
8941
|
}
|
|
8942
|
-
function
|
|
8942
|
+
function je(t, e, i, n) {
|
|
8943
8943
|
if (e !== 1) {
|
|
8944
8944
|
if (i) {
|
|
8945
8945
|
var s = Ce(t);
|
|
@@ -8993,7 +8993,7 @@ function $m(t, e) {
|
|
|
8993
8993
|
function To(t, e, i) {
|
|
8994
8994
|
i === void 0 && (i = !0);
|
|
8995
8995
|
var n = {};
|
|
8996
|
-
return
|
|
8996
|
+
return it.forEach(function(s) {
|
|
8997
8997
|
var r = t[s], o = e[s];
|
|
8998
8998
|
r !== void 0 && o !== void 0 ? n[s] = s === "left" || s === "top" ? i ? Math.max(r, o) : Math.min(r, o) : i ? Math.min(r, o) : Math.max(r, o) : o !== void 0 ? n[s] = o : r !== void 0 && (n[s] = r);
|
|
8999
8999
|
}), n;
|
|
@@ -9046,8 +9046,8 @@ function Pm(t) {
|
|
|
9046
9046
|
t.stencilReference;
|
|
9047
9047
|
var a, c, d, h = U({}, n), m = U({}, s), v = U({}, r);
|
|
9048
9048
|
a = re(v), c = re(h), d === void 0 && (d = 1e-3), (a === 0 || c === 0 ? Math.abs(c - a) < d : Math.abs(c / a) < 1 + d && Math.abs(c / a) > 1 - d) || (h = U(U({}, h), mt({ sizeRestrictions: o, width: h.width, height: h.height, aspectRatio: { minimum: re(v), maximum: re(v) } })));
|
|
9049
|
-
var S = en(m =
|
|
9050
|
-
return S !== 1 && (m =
|
|
9049
|
+
var S = en(m = je(m, h.width * i.width / (m.width * v.width)), e({ visibleArea: m, type: "resize" }));
|
|
9050
|
+
return S !== 1 && (m = je(m, S), h = je(h, S)), m = xe(m = Le(m, Wt(Ce(h), Ce(m))), e({ visibleArea: m, type: "move" })), { coordinates: h = xe(h, tn(rt(m), u)), visibleArea: m };
|
|
9051
9051
|
}
|
|
9052
9052
|
function Tm(t) {
|
|
9053
9053
|
var e = t.event, i = t.getAreaRestrictions, n = t.boundaries, s = t.coordinates, r = t.visibleArea;
|
|
@@ -9058,8 +9058,8 @@ function Tm(t) {
|
|
|
9058
9058
|
if (s && r && e.type !== "manipulateImage") {
|
|
9059
9059
|
var c = { width: 0, height: 0 };
|
|
9060
9060
|
a.width, n.width, re(n) > re(u) ? (c.height = 0.8 * n.height, c.width = c.height * re(u)) : (c.width = 0.8 * n.width, c.height = c.width * re(u));
|
|
9061
|
-
var d = en(a =
|
|
9062
|
-
a =
|
|
9061
|
+
var d = en(a = je(a, u.width * n.width / (a.width * c.width)), i({ visibleArea: a, type: "resize" }));
|
|
9062
|
+
a = je(a, d), d !== 1 && (c.height /= d, c.width /= d), a = xe(a = Le(a, Wt(Ce(u), Ce(a))), i({ visibleArea: a, type: "move" })), u = xe(u, tn(rt(a), o));
|
|
9063
9063
|
}
|
|
9064
9064
|
return { coordinates: u, visibleArea: a };
|
|
9065
9065
|
}
|
|
@@ -9067,7 +9067,7 @@ function zm(t) {
|
|
|
9067
9067
|
var e = t.event, i = t.coordinates, n = t.visibleArea, s = t.getAreaRestrictions, r = U({}, n), o = U({}, i);
|
|
9068
9068
|
if (e.type === "setCoordinates") {
|
|
9069
9069
|
var u = Math.max(0, o.width - r.width), a = Math.max(0, o.height - r.height);
|
|
9070
|
-
u > a ? r =
|
|
9070
|
+
u > a ? r = je(r, Math.min(o.width / r.width, jt(r, s({ visibleArea: r, type: "resize" })))) : a > u && (r = je(r, Math.min(o.height / r.height, jt(r, s({ visibleArea: r, type: "resize" }))))), r = xe(r = Le(r, Ki(Vt(o, rt(r)))), s({ visibleArea: r, type: "move" }));
|
|
9071
9071
|
}
|
|
9072
9072
|
return { visibleArea: r, coordinates: o };
|
|
9073
9073
|
}
|
|
@@ -9099,13 +9099,13 @@ function Bm(t) {
|
|
|
9099
9099
|
var e = t.event, i = t.coordinates, n = t.visibleArea, s = t.sizeRestrictions, r = t.getAreaRestrictions, o = t.positionRestrictions, u = t.adjustStencil, a = e.scale, c = e.move, d = U({}, n), h = U({}, i), m = 1, v = 1, S = a.factor && Math.abs(a.factor - 1) > 1e-3;
|
|
9100
9100
|
d = Le(d, { left: c.left || 0, top: c.top || 0 });
|
|
9101
9101
|
var k = { stencil: { minimum: Math.max(s.minWidth ? s.minWidth / h.width : 0, s.minHeight ? s.minHeight / h.height : 0), maximum: Math.min(s.maxWidth ? s.maxWidth / h.width : 1 / 0, s.maxHeight ? s.maxHeight / h.height : 1 / 0, jt(h, o)) }, area: { maximum: jt(d, r({ visibleArea: d, type: "resize" })) } };
|
|
9102
|
-
a.factor && S && (a.factor < 1 ? (v = Math.max(a.factor, k.stencil.minimum)) > 1 && (v = 1) : a.factor > 1 && (v = Math.min(a.factor, Math.min(k.area.maximum, k.stencil.maximum))) < 1 && (v = 1)), v && (d =
|
|
9102
|
+
a.factor && S && (a.factor < 1 ? (v = Math.max(a.factor, k.stencil.minimum)) > 1 && (v = 1) : a.factor > 1 && (v = Math.min(a.factor, Math.min(k.area.maximum, k.stencil.maximum))) < 1 && (v = 1)), v && (d = je(d, v, a.center));
|
|
9103
9103
|
var w = i.left - n.left, O = n.width + n.left - (i.width + i.left), X = i.top - n.top, Y = n.height + n.top - (i.height + i.top);
|
|
9104
|
-
return d = xe(d = Le(d, Vt(d, { left: o.left !== void 0 ? o.left - w * v : void 0, top: o.top !== void 0 ? o.top - X * v : void 0, bottom: o.bottom !== void 0 ? o.bottom + Y * v : void 0, right: o.right !== void 0 ? o.right + O * v : void 0 })), r({ visibleArea: d, type: "move" })), h.width = h.width * v, h.height = h.height * v, h.left = d.left + w * v, h.top = d.top + X * v, h = xe(h, tn(rt(d), o)), a.factor && S && u && (a.factor > 1 ? m = Math.min(k.area.maximum, a.factor) / v : a.factor < 1 && (m = Math.max(h.height / d.height, h.width / d.width, a.factor / v)), m !== 1 && (d = Le(d = xe(d =
|
|
9104
|
+
return d = xe(d = Le(d, Vt(d, { left: o.left !== void 0 ? o.left - w * v : void 0, top: o.top !== void 0 ? o.top - X * v : void 0, bottom: o.bottom !== void 0 ? o.bottom + Y * v : void 0, right: o.right !== void 0 ? o.right + O * v : void 0 })), r({ visibleArea: d, type: "move" })), h.width = h.width * v, h.height = h.height * v, h.left = d.left + w * v, h.top = d.top + X * v, h = xe(h, tn(rt(d), o)), a.factor && S && u && (a.factor > 1 ? m = Math.min(k.area.maximum, a.factor) / v : a.factor < 1 && (m = Math.max(h.height / d.height, h.width / d.width, a.factor / v)), m !== 1 && (d = Le(d = xe(d = je(d, m, a.factor > 1 ? a.center : Ce(h)), r({ visibleArea: d, type: "move" })), Ki(Vt(h, rt(d)))))), { coordinates: h, visibleArea: d };
|
|
9105
9105
|
}
|
|
9106
9106
|
function Hm(t) {
|
|
9107
9107
|
var e = t.aspectRatio, i = t.getAreaRestrictions, n = t.coordinates, s = t.visibleArea, r = t.sizeRestrictions, o = t.positionRestrictions, u = t.imageSize, a = t.previousImageSize, c = t.angle, d = U({}, n), h = U({}, s), m = yt(Ce(U({ left: 0, top: 0 }, a)), c);
|
|
9108
|
-
return (d = U(U({}, mt({ sizeRestrictions: r, aspectRatio: e, width: d.width, height: d.height })), yt(Ce(d), c))).left -= m.left - u.width / 2 + d.width / 2, d.top -= m.top - u.height / 2 + d.height / 2, h =
|
|
9108
|
+
return (d = U(U({}, mt({ sizeRestrictions: r, aspectRatio: e, width: d.width, height: d.height })), yt(Ce(d), c))).left -= m.left - u.width / 2 + d.width / 2, d.top -= m.top - u.height / 2 + d.height / 2, h = je(h, en(h, i({ visibleArea: h, type: "resize" }))), { coordinates: d = xe(d, o), visibleArea: h = xe(h = Le(h, Wt(Ce(d), Ce(n))), i({ visibleArea: h, type: "move" })) };
|
|
9109
9109
|
}
|
|
9110
9110
|
function qm(t) {
|
|
9111
9111
|
var e = t.flip, i = t.previousFlip, n = t.rotate, s = t.getAreaRestrictions, r = t.coordinates, o = t.visibleArea, u = t.imageSize, a = U({}, r), c = U({}, o), d = i.horizontal !== e.horizontal, h = i.vertical !== e.vertical;
|
|
@@ -9116,27 +9116,27 @@ function qm(t) {
|
|
|
9116
9116
|
return { coordinates: a, visibleArea: c };
|
|
9117
9117
|
}
|
|
9118
9118
|
function lr(t) {
|
|
9119
|
-
var e = t.directions, i = t.coordinates, n = t.positionRestrictions, s = n === void 0 ? {} : n, r = t.sizeRestrictions, o = t.preserveRatio, u = t.compensate, a = U({}, e), c =
|
|
9119
|
+
var e = t.directions, i = t.coordinates, n = t.positionRestrictions, s = n === void 0 ? {} : n, r = t.sizeRestrictions, o = t.preserveRatio, u = t.compensate, a = U({}, e), c = tt(i, a).width, d = tt(i, a).height;
|
|
9120
9120
|
c < 0 && (a.left < 0 && a.right < 0 ? (a.left = -(i.width - r.minWidth) / (a.left / a.right), a.right = -(i.width - r.minWidth) / (a.right / a.left)) : a.left < 0 ? a.left = -(i.width - r.minWidth) : a.right < 0 && (a.right = -(i.width - r.minWidth))), d < 0 && (a.top < 0 && a.bottom < 0 ? (a.top = -(i.height - r.minHeight) / (a.top / a.bottom), a.bottom = -(i.height - r.minHeight) / (a.bottom / a.top)) : a.top < 0 ? a.top = -(i.height - r.minHeight) : a.bottom < 0 && (a.bottom = -(i.height - r.minHeight)));
|
|
9121
|
-
var h = oi(
|
|
9122
|
-
u && (h.left && h.left > 0 && h.right === 0 ? (a.right += h.left, a.left -= h.left) : h.right && h.right > 0 && h.left === 0 && (a.left += h.right, a.right -= h.right), h.top && h.top > 0 && h.bottom === 0 ? (a.bottom += h.top, a.top -= h.top) : h.bottom && h.bottom > 0 && h.top === 0 && (a.top += h.bottom, a.bottom -= h.bottom), h = oi(
|
|
9121
|
+
var h = oi(tt(i, a), s);
|
|
9122
|
+
u && (h.left && h.left > 0 && h.right === 0 ? (a.right += h.left, a.left -= h.left) : h.right && h.right > 0 && h.left === 0 && (a.left += h.right, a.right -= h.right), h.top && h.top > 0 && h.bottom === 0 ? (a.bottom += h.top, a.top -= h.top) : h.bottom && h.bottom > 0 && h.top === 0 && (a.top += h.bottom, a.bottom -= h.bottom), h = oi(tt(i, a), s));
|
|
9123
9123
|
var m = { width: 1 / 0, height: 1 / 0, left: 1 / 0, right: 1 / 0, top: 1 / 0, bottom: 1 / 0 };
|
|
9124
|
-
if (
|
|
9124
|
+
if (it.forEach(function(k) {
|
|
9125
9125
|
var w = h[k];
|
|
9126
9126
|
w && a[k] && (m[k] = Math.max(0, 1 - w / a[k]));
|
|
9127
9127
|
}), o) {
|
|
9128
|
-
var v = Math.min.apply(null,
|
|
9128
|
+
var v = Math.min.apply(null, it.map(function(k) {
|
|
9129
9129
|
return m[k];
|
|
9130
9130
|
}));
|
|
9131
|
-
v !== 1 / 0 &&
|
|
9131
|
+
v !== 1 / 0 && it.forEach(function(k) {
|
|
9132
9132
|
a[k] *= v;
|
|
9133
9133
|
});
|
|
9134
|
-
} else
|
|
9134
|
+
} else it.forEach(function(k) {
|
|
9135
9135
|
m[k] !== 1 / 0 && (a[k] *= m[k]);
|
|
9136
9136
|
});
|
|
9137
|
-
if (c =
|
|
9137
|
+
if (c = tt(i, a).width, d = tt(i, a).height, a.right + a.left && (c > r.maxWidth ? m.width = (r.maxWidth - i.width) / (a.right + a.left) : c < r.minWidth && (m.width = (r.minWidth - i.width) / (a.right + a.left))), a.bottom + a.top && (d > r.maxHeight ? m.height = (r.maxHeight - i.height) / (a.bottom + a.top) : d < r.minHeight && (m.height = (r.minHeight - i.height) / (a.bottom + a.top))), o) {
|
|
9138
9138
|
var S = Math.min(m.width, m.height);
|
|
9139
|
-
S !== 1 / 0 &&
|
|
9139
|
+
S !== 1 / 0 && it.forEach(function(k) {
|
|
9140
9140
|
a[k] *= S;
|
|
9141
9141
|
});
|
|
9142
9142
|
} else m.width !== 1 / 0 && Mm.forEach(function(k) {
|
|
@@ -9149,7 +9149,7 @@ function lr(t) {
|
|
|
9149
9149
|
function Ci(t, e, i) {
|
|
9150
9150
|
return e == 0 && i == 0 ? t / 2 : e == 0 ? 0 : i == 0 ? t : t * Math.abs(e / (e + i));
|
|
9151
9151
|
}
|
|
9152
|
-
var Nm =
|
|
9152
|
+
var Nm = Je("vue-simple-handler"), Um = Je("vue-simple-handler-wrapper"), cs = { name: "SimpleHandler", components: { HandlerWrapper: Ao }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
|
|
9153
9153
|
return { hover: !1 };
|
|
9154
9154
|
}, computed: { classes: function() {
|
|
9155
9155
|
var t, e = (Ue(t = {}, this.horizontalPosition, !!this.horizontalPosition), Ue(t, this.verticalPosition, !!this.verticalPosition), Ue(t, "".concat(this.horizontalPosition, "-").concat(this.verticalPosition), !!(this.verticalPosition && this.horizontalPosition)), Ue(t, "hover", this.hover), t);
|
|
@@ -9169,7 +9169,7 @@ cs.render = function(t, e, i, n, s, r) {
|
|
|
9169
9169
|
return [I("div", { class: r.classes.default }, null, 2)];
|
|
9170
9170
|
}), _: 1 }, 8, ["class", "vertical-position", "horizontal-position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
|
|
9171
9171
|
};
|
|
9172
|
-
var Wm =
|
|
9172
|
+
var Wm = Je("vue-simple-line"), jm = Je("vue-simple-line-wrapper"), ds = { name: "SimpleLine", components: { LineWrapper: $o }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
|
|
9173
9173
|
return { hover: !1 };
|
|
9174
9174
|
}, computed: { classes: function() {
|
|
9175
9175
|
return { root: pe(Wm(Ue({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass), wrapper: pe(jm(Ue({}, this.position, !0)), this.wrapperClass) };
|
|
@@ -9188,7 +9188,7 @@ ds.render = function(t, e, i, n, s, r) {
|
|
|
9188
9188
|
return [I("div", { class: r.classes.root }, null, 2)];
|
|
9189
9189
|
}), _: 1 }, 8, ["class", "position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
|
|
9190
9190
|
};
|
|
9191
|
-
var bn =
|
|
9191
|
+
var bn = Je("vue-bounding-box"), Vm = ["east", "west", null], Gm = ["south", "north", null], zo = { name: "BoundingBox", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {
|
|
9192
9192
|
return { eastNorth: !0, north: !0, westNorth: !0, west: !0, westSouth: !0, south: !0, eastSouth: !0, east: !0 };
|
|
9193
9193
|
} }, handlersComponent: { type: [Object, String], default: function() {
|
|
9194
9194
|
return cs;
|
|
@@ -9264,7 +9264,7 @@ zo.render = function(t, e, i, n, s, r) {
|
|
|
9264
9264
|
}) }, null, 8, ["default-class", "hover-class", "wrapper-class", "horizontal-position", "vertical-position", "disabled", "onDrag"]))], 6);
|
|
9265
9265
|
}), 128))], 6);
|
|
9266
9266
|
};
|
|
9267
|
-
var _m =
|
|
9267
|
+
var _m = Je("vue-draggable-area"), Oo = { name: "DraggableArea", props: { movable: { type: Boolean, default: !0 }, activationDistance: { type: Number, default: 20 } }, computed: { classnames: function() {
|
|
9268
9268
|
return { default: _m() };
|
|
9269
9269
|
} }, beforeMount: function() {
|
|
9270
9270
|
window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
|
|
@@ -9466,7 +9466,7 @@ qn.render = function(t, e, i, n, s, r) {
|
|
|
9466
9466
|
return [P(t.$slots, "default")];
|
|
9467
9467
|
}), _: 3 }, 8, ["touch-move", "touch-resize", "mouse-move", "wheel-resize"]);
|
|
9468
9468
|
};
|
|
9469
|
-
var xi =
|
|
9469
|
+
var xi = Je("vue-preview"), Do = { props: { coordinates: { type: Object }, transitions: { type: Object }, image: { type: Object, default: function() {
|
|
9470
9470
|
return {};
|
|
9471
9471
|
} }, imageClass: { type: String }, width: { type: Number }, height: { type: Number }, fill: { type: Boolean } }, data: function() {
|
|
9472
9472
|
return { calculatedImageSize: { width: 0, height: 0 }, calculatedSize: { width: 0, height: 0 } };
|
|
@@ -9510,14 +9510,14 @@ var xi = Ye("vue-preview"), Do = { props: { coordinates: { type: Object }, trans
|
|
|
9510
9510
|
t && t.complete && this.refreshImage(), this.refresh();
|
|
9511
9511
|
} } };
|
|
9512
9512
|
Do.render = function(t, e, i, n, s, r) {
|
|
9513
|
-
return g(), q("div", { ref: "root", class: r.classes.root, style: r.style }, [I("div", { ref: "wrapper", class: r.classes.wrapper, style: r.wrapperStyle }, [
|
|
9513
|
+
return g(), q("div", { ref: "root", class: r.classes.root, style: r.style }, [I("div", { ref: "wrapper", class: r.classes.wrapper, style: r.wrapperStyle }, [Ve(I("img", { ref: "image", src: i.image && i.image.src, class: r.classes.image, style: r.imageStyle }, null, 14, ["src"]), [[jn, i.image && i.image.src]])], 6)], 6);
|
|
9514
9514
|
};
|
|
9515
9515
|
var Bo = { components: { Preview: Do }, inheritAttrs: !1 };
|
|
9516
9516
|
Bo.render = function(t, e, i, n, s, r) {
|
|
9517
9517
|
var o = E("preview");
|
|
9518
9518
|
return g(), q(o, Tt(t.$attrs, { fill: !0 }), null, 16);
|
|
9519
9519
|
};
|
|
9520
|
-
var Cn =
|
|
9520
|
+
var Cn = Je("vue-rectangle-stencil"), Ho = { name: "RectangleStencil", components: { StencilPreview: Bo, BoundingBox: zo, DraggableArea: Oo }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
|
|
9521
9521
|
return cs;
|
|
9522
9522
|
} }, lines: { type: Object }, linesComponent: { type: [Object, String], default: function() {
|
|
9523
9523
|
return ds;
|
|
@@ -9555,7 +9555,7 @@ Ho.render = function(t, e, i, n, s, r) {
|
|
|
9555
9555
|
}), _: 1 }, 8, ["movable", "onMove", "onMoveEnd"])];
|
|
9556
9556
|
}), _: 1 }, 8, ["width", "height", "transitions", "class", "handlers", "handlers-component", "handlers-classes", "handlers-wrappers-classes", "lines", "lines-component", "lines-classes", "lines-wrappers-classes", "resizable", "onResize", "onResizeEnd"])], 6);
|
|
9557
9557
|
};
|
|
9558
|
-
var Ym = ["transitions"], lt =
|
|
9558
|
+
var Ym = ["transitions"], lt = Je("vue-advanced-cropper"), Nn = { name: "Cropper", components: { BackgroundWrapper: qn }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
|
|
9559
9559
|
return Ho;
|
|
9560
9560
|
} }, backgroundWrapperComponent: { type: [Object, String], default: function() {
|
|
9561
9561
|
return qn;
|
|
@@ -9567,10 +9567,10 @@ var Ym = ["transitions"], lt = Ye("vue-advanced-cropper"), Nn = { name: "Cropper
|
|
|
9567
9567
|
return !(typeof t == "string" && t !== "fill" && t !== "fit");
|
|
9568
9568
|
} }, priority: { type: String, default: "coordinates" }, stencilSize: { type: [Object, Function] }, resizeImage: { type: [Boolean, Object], default: !0 }, moveImage: { type: [Boolean, Object], default: !0 }, autoZoomAlgorithm: { type: Function }, resizeAlgorithm: { type: Function, default: function(t) {
|
|
9569
9569
|
var e = t.event, i = t.coordinates, n = t.aspectRatio, s = t.positionRestrictions, r = t.sizeRestrictions, o = U(U({}, i), { right: i.left + i.width, bottom: i.top + i.height }), u = e.params || {}, a = U({}, e.directions), c = u.allowedDirections || { left: !0, right: !0, bottom: !0, top: !0 };
|
|
9570
|
-
r.widthFrozen && (a.left = 0, a.right = 0), r.heightFrozen && (a.top = 0, a.bottom = 0),
|
|
9570
|
+
r.widthFrozen && (a.left = 0, a.right = 0), r.heightFrozen && (a.top = 0, a.bottom = 0), it.forEach(function(H) {
|
|
9571
9571
|
c[H] || (a[H] = 0);
|
|
9572
9572
|
});
|
|
9573
|
-
var d =
|
|
9573
|
+
var d = tt(o, a = lr({ coordinates: o, directions: a, sizeRestrictions: r, positionRestrictions: s })).width, h = tt(o, a).height, m = u.preserveRatio ? re(o) : wn(d / h, n);
|
|
9574
9574
|
if (m) {
|
|
9575
9575
|
var v = u.respectDirection;
|
|
9576
9576
|
if (v || (v = o.width >= o.height || m === 1 ? "width" : "height"), v === "width") {
|
|
@@ -9588,7 +9588,7 @@ var Ym = ["transitions"], lt = Ye("vue-advanced-cropper"), Nn = { name: "Cropper
|
|
|
9588
9588
|
}
|
|
9589
9589
|
a = lr({ directions: a, coordinates: o, sizeRestrictions: r, positionRestrictions: s, preserveRatio: !0, compensate: u.compensate });
|
|
9590
9590
|
}
|
|
9591
|
-
return d =
|
|
9591
|
+
return d = tt(o, a).width, h = tt(o, a).height, (m = u.preserveRatio ? re(o) : wn(d / h, n)) && Math.abs(m - d / h) > 1e-3 && it.forEach(function(H) {
|
|
9592
9592
|
c[H] || (a[H] = 0);
|
|
9593
9593
|
}), Hn({ event: new ls({ left: -a.left, top: -a.top }), coordinates: { width: i.width + a.right + a.left, height: i.height + a.top + a.bottom, left: i.left, top: i.top }, positionRestrictions: s });
|
|
9594
9594
|
} }, moveAlgorithm: { type: Function, default: Hn }, initStretcher: { type: Function, default: function(t) {
|
|
@@ -9599,8 +9599,8 @@ var Ym = ["transitions"], lt = Ye("vue-advanced-cropper"), Nn = { name: "Cropper
|
|
|
9599
9599
|
return o = xe(o = Le(o, Wt(Ce(i), Ce(o))), tn(rt(e), r));
|
|
9600
9600
|
} }, fitVisibleArea: { type: Function, default: function(t) {
|
|
9601
9601
|
var e = t.visibleArea, i = t.boundaries, n = t.getAreaRestrictions, s = t.coordinates, r = U({}, e);
|
|
9602
|
-
r.height = r.width / re(i), r.top += (e.height - r.height) / 2, (s.height - r.height > 0 || s.width - r.width > 0) && (r =
|
|
9603
|
-
var o = Ki(Vt(s, rt(r =
|
|
9602
|
+
r.height = r.width / re(i), r.top += (e.height - r.height) / 2, (s.height - r.height > 0 || s.width - r.width > 0) && (r = je(r, Math.max(s.height / r.height, s.width / r.width)));
|
|
9603
|
+
var o = Ki(Vt(s, rt(r = je(r, en(r, n({ visibleArea: r, type: "resize" }))))));
|
|
9604
9604
|
return r.width < s.width && (o.left = 0), r.height < s.height && (o.top = 0), r = xe(r = Le(r, o), n({ visibleArea: r, type: "move" }));
|
|
9605
9605
|
} }, areaRestrictionsAlgorithm: { type: Function, default: function(t) {
|
|
9606
9606
|
var e = t.visibleArea, i = t.boundaries, n = t.imageSize, s = t.imageRestriction, r = t.type, o = {};
|
|
@@ -9746,7 +9746,7 @@ var Ym = ["transitions"], lt = Ye("vue-advanced-cropper"), Nn = { name: "Cropper
|
|
|
9746
9746
|
if (i.type === "manipulateImage") return U(U({}, i), { move: { left: i.move && i.move.left ? s * i.move.left : 0, top: i.move && i.move.top ? s * i.move.top : 0 }, scale: { factor: i.scale && i.scale.factor ? i.scale.factor : 1, center: i.scale && i.scale.center ? { left: i.scale.center.left * s + n.left, top: i.scale.center.top * s + n.top } : null } });
|
|
9747
9747
|
if (i.type === "resize") {
|
|
9748
9748
|
var r = U(U({}, i), { directions: U({}, i.directions) });
|
|
9749
|
-
return
|
|
9749
|
+
return it.forEach(function(u) {
|
|
9750
9750
|
r.directions[u] *= s;
|
|
9751
9751
|
}), r;
|
|
9752
9752
|
}
|
|
@@ -9984,7 +9984,7 @@ var Ym = ["transitions"], lt = Ye("vue-advanced-cropper"), Nn = { name: "Cropper
|
|
|
9984
9984
|
Nn.render = function(t, e, i, n, s, r) {
|
|
9985
9985
|
return g(), q("div", { ref: "cropper", class: r.classes.cropper }, [I("div", { ref: "stretcher", class: r.classes.stretcher }, null, 2), I("div", { class: r.classes.boundaries, style: r.boundariesStyle }, [(g(), q(ei(i.backgroundWrapperComponent), { class: r.classes.cropperWrapper, "wheel-resize": r.settings.resizeImage.wheel, "touch-resize": r.settings.resizeImage.touch, "touch-move": r.settings.moveImage.touch, "mouse-move": r.settings.moveImage.mouse, onMove: r.onManipulateImage, onResize: r.onManipulateImage }, { default: G(function() {
|
|
9986
9986
|
return [I("div", { class: r.classes.background, style: r.boundariesStyle }, null, 6), I("div", { class: r.classes.imageWrapper }, [I("img", { ref: "image", crossorigin: s.imageAttributes.crossOrigin, src: s.imageAttributes.src, class: r.classes.image, style: r.imageStyle, onMousedown: e[1] || (e[1] = Ee(function() {
|
|
9987
|
-
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), I("div", { class: r.classes.foreground, style: r.boundariesStyle }, null, 6),
|
|
9987
|
+
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), I("div", { class: r.classes.foreground, style: r.boundariesStyle }, null, 6), Ve((g(), q(ei(i.stencilComponent), Tt({ ref: "stencil", image: r.image, coordinates: s.coordinates, "stencil-coordinates": r.stencilCoordinates, transitions: r.transitionsOptions }, i.stencilProps, { onResize: r.onResize, onResizeEnd: r.onResizeEnd, onMove: r.onMove, onMoveEnd: r.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[jn, s.imageLoaded]]), i.canvas ? (g(), q("canvas", Jm, null, 512)) : J("", !0), i.canvas ? (g(), q("canvas", Qm, null, 512)) : J("", !0)];
|
|
9988
9988
|
}), _: 1 }, 8, ["class", "wheel-resize", "touch-resize", "touch-move", "mouse-move", "onMove", "onResize"]))], 6)], 2);
|
|
9989
9989
|
};
|
|
9990
9990
|
const Km = { class: "background-container" }, eg = { class: "tools-line" }, tg = { class: "line-block" }, ig = { class: "dialog-footer" }, ng = /* @__PURE__ */ A({
|
|
@@ -10041,7 +10041,7 @@ const Km = { class: "background-container" }, eg = { class: "tools-line" }, tg =
|
|
|
10041
10041
|
default: G(() => [
|
|
10042
10042
|
I(k, {
|
|
10043
10043
|
modelValue: p(r),
|
|
10044
|
-
"onUpdate:modelValue": S[0] || (S[0] = (H) =>
|
|
10044
|
+
"onUpdate:modelValue": S[0] || (S[0] = (H) => Xe(r) ? r.value = H : null),
|
|
10045
10045
|
label: "Пропорции изображения",
|
|
10046
10046
|
onChange: o
|
|
10047
10047
|
}, {
|
|
@@ -10216,7 +10216,7 @@ const Km = { class: "background-container" }, eg = { class: "tools-line" }, tg =
|
|
|
10216
10216
|
}, [
|
|
10217
10217
|
P(H.$slots, "default", {}, void 0, !0)
|
|
10218
10218
|
], 6)),
|
|
10219
|
-
p(o) ?
|
|
10219
|
+
p(o) ? Ve((g(), b("div", {
|
|
10220
10220
|
key: 1,
|
|
10221
10221
|
id: "info-item-opened-content",
|
|
10222
10222
|
class: "open-window",
|
|
@@ -11140,7 +11140,7 @@ const Mg = /* @__PURE__ */ $(Sg, [["render", kg], ["__scopeId", "data-v-0ea9a95f
|
|
|
11140
11140
|
return g(), b("div", sp, [
|
|
11141
11141
|
I(m, {
|
|
11142
11142
|
modelValue: p(s),
|
|
11143
|
-
"onUpdate:modelValue": d[0] || (d[0] = (v) =>
|
|
11143
|
+
"onUpdate:modelValue": d[0] || (d[0] = (v) => Xe(s) ? s.value = v : null),
|
|
11144
11144
|
placeholder: "Найти",
|
|
11145
11145
|
onInput: o
|
|
11146
11146
|
}, {
|
|
@@ -11469,7 +11469,7 @@ const vp = /* @__PURE__ */ $(gp, [["render", pp], ["__scopeId", "data-v-0f1f2f84
|
|
|
11469
11469
|
ref_key: "searchForm",
|
|
11470
11470
|
ref: r,
|
|
11471
11471
|
modelValue: p(s),
|
|
11472
|
-
"onUpdate:modelValue": h[0] || (h[0] = (v) =>
|
|
11472
|
+
"onUpdate:modelValue": h[0] || (h[0] = (v) => Xe(s) ? s.value = v : null),
|
|
11473
11473
|
"value-key": "label",
|
|
11474
11474
|
style: { width: "100%", "margin-right": "10px" },
|
|
11475
11475
|
placeholder: t.placeholder,
|
|
@@ -11877,7 +11877,7 @@ const vp = /* @__PURE__ */ $(gp, [["render", pp], ["__scopeId", "data-v-0f1f2f84
|
|
|
11877
11877
|
return p(i) ? (g(), q(c, {
|
|
11878
11878
|
key: 0,
|
|
11879
11879
|
modelValue: p(s),
|
|
11880
|
-
"onUpdate:modelValue": a[0] || (a[0] = (h) =>
|
|
11880
|
+
"onUpdate:modelValue": a[0] || (a[0] = (h) => Xe(s) ? s.value = h : null),
|
|
11881
11881
|
"popper-append-to-body": !1,
|
|
11882
11882
|
clearable: !((d = p(s)) != null && d.default),
|
|
11883
11883
|
"value-key": "label",
|
|
@@ -11919,7 +11919,7 @@ const vp = /* @__PURE__ */ $(gp, [["render", pp], ["__scopeId", "data-v-0f1f2f84
|
|
|
11919
11919
|
const a = E("PSelect");
|
|
11920
11920
|
return g(), q(a, {
|
|
11921
11921
|
modelValue: p(n),
|
|
11922
|
-
"onUpdate:modelValue": u[0] || (u[0] = (d) =>
|
|
11922
|
+
"onUpdate:modelValue": u[0] || (u[0] = (d) => Xe(n) ? n.value = d : null),
|
|
11923
11923
|
"popper-append-to-body": !1,
|
|
11924
11924
|
clearable: !((c = p(n)) != null && c.default),
|
|
11925
11925
|
"value-key": "label",
|
package/dist/sprof.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(E,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(E=typeof globalThis<"u"?globalThis:E||self,i(E.sprof={},E.Vue))})(this,function(E,i){"use strict";var rp=Object.defineProperty;var op=(E,i,Me)=>i in E?rp(E,i,{enumerable:!0,configurable:!0,writable:!0,value:Me}):E[i]=Me;var c=(E,i,Me)=>op(E,typeof i!="symbol"?i+"":i,Me);var Ge,Ce,H,we;var Me=typeof document<"u"?document.currentScript:null,se=(t=>(t.Login="login",t.Register="register",t.Restore="restore",t.Refresh="refresh",t))(se||{}),me=(t=>(t.Primary="primary",t.Success="success",t.Warning="warning",t.Error="error",t.Info="info",t))(me||{});class Qe{constructor(e,n,r,o){c(this,"text","Сохранить");c(this,"type",me.Success);c(this,"condition",!0);c(this,"action");c(this,"id","button");c(this,"disabled",!1);this.text=e,this.type=r,this.action=n,o!==void 0&&(this.condition=o)}static Primary(e,n,r){return new Qe(e,n,me.Primary,r)}static Success(e,n,r){return new Qe(e,n,me.Success,r)}static Warning(e,n,r){return new Qe(e,n,me.Warning,r)}static Error(e,n,r){return new Qe(e,n,me.Error,r)}}class _t extends Qe{constructor(){super(...arguments);c(this,"id","auth-button");c(this,"chunk",se.Login);c(this,"isSubmit",!1);c(this,"isLink",!0)}GetChunk(){return this.chunk}}let zn=class extends _t{constructor(){super(...arguments);c(this,"id","auth-button-login");c(this,"text","Войти");c(this,"isSubmit",!1);c(this,"chunk",se.Login)}};class Li extends _t{constructor(){super(...arguments);c(this,"id","auth-button-refresh");c(this,"text","Обновить пароль");c(this,"isSubmit",!1);c(this,"chunk",se.Refresh)}}class Tn extends _t{constructor(){super(...arguments);c(this,"id","auth-button-register");c(this,"text","Зарегистрироваться");c(this,"isSubmit",!1);c(this,"chunk",se.Register)}}class Ut extends _t{constructor(){super(...arguments);c(this,"id","auth-button-restore");c(this,"text","Забыли пароль?");c(this,"isSubmit",!1);c(this,"chunk",se.Register)}}class Hi{constructor(){c(this,"value","");c(this,"label","");c(this,"placeholder","");c(this,"validator")}Validate(){return this.validator?(this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}class Wt extends Hi{constructor(){super(...arguments);c(this,"method");c(this,"id","field-auth");c(this,"name","")}}var ct=(t=>(t.Login="login",t.Email="email",t.Phone="phone",t.VK="vk",t.ESIA="esia",t))(ct||{});const Va=/\S+@\S+\.\S+/;class qi{constructor(){c(this,"errors",[])}validate(e){return(e===""||!e)&&this.errors.push("Введите email"),Va.test(e)||this.errors.push("Некорректный email"),this.errors}}class jt extends Wt{constructor(){super(...arguments);c(this,"id","field-auth-email");c(this,"label","Email");c(this,"name","email");c(this,"placeholder","Введите email");c(this,"validator",new qi);c(this,"method",ct.Email)}}class za{constructor(){c(this,"errors",[]);c(this,"length",6)}validate(e){return e===""||!e?(this.errors.push("Введите пароль"),this.errors):(e.length<this.length&&this.errors.push("Пароль недостаточной длины"),this.errors)}}class Gt extends Wt{constructor(){super(...arguments);c(this,"label","Пароль");c(this,"validator",new za);c(this,"name","password");c(this,"placeholder","Введите пароль");c(this,"id","field-auth-password")}}class _i extends Wt{constructor(){super(...arguments);c(this,"label","Повторите пароль");c(this,"id","field-auth-password-repeat")}}const Ui={allowRestore:!1,[se.Login]:{methods:[ct.Email],title:"Вход в систему",action:"login",buttons:[new zn,new Tn,new Ut],fields:[new jt,new Gt],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[se.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new Tn,new zn,new Ut],fields:[new jt,new Gt,new _i],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[se.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new Ut],fields:[new jt]},[se.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new Li],fields:[new Gt]}};let Ta=class{constructor(){c(this,"settings",Ui);c(this,"chunk",se.Login);c(this,"selectedMethod",ct.Email)}async Block(e){await e()}GetValues(){const e=this.GetFields(),n=new Map;return e.forEach(r=>{r.value&&n.set(r.name,r.value)}),Object.fromEntries(n)}Validate(){return[]}GetFields(){return this.GetCurSet().fields.filter(e=>!e.method||e.method===this.selectedMethod)}GetMethods(){return this.GetCurSet().methods}Chunk(){return this.chunk}get Settings(){return this.settings}GetCurSet(){return this.settings[this.chunk]}IsLogin(){return this.chunk===se.Login}IsRegister(){return this.chunk===se.Register}IsRestore(){return this.chunk===se.Restore}IsRefresh(){return this.chunk===se.Refresh}SetChunk(e){this.chunk=e}GetTitle(){return this.GetCurSet().title}GetButtons(){const e=this.GetCurSet().buttons;return e.forEach(n=>{n.isSubmit=!1}),e[0].isSubmit=!0,e}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(e=>e.Reset())}Reset(){this.chunk=se.Login}};class Fa{constructor(){c(this,"visible",!1);c(this,"closable",!1)}IsClosable(){return this.closable}IsVisible(){return this.visible}Close(){this.visible=!1}Open(e){e&&(this.closable=!0),this.visible=!0}}class Wi{constructor(){c(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class ji extends Wi{constructor(){super(...arguments);c(this,"type",me.Success);c(this,"text","");c(this,"title","")}showMessage(n,r){this.hide(),this.type=r,typeof n=="string"?this.text=n:(this.text=n.text,this.title=n.title??""),super.show()}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}Info(n){this.showMessage(n,me.Info)}Success(n){this.showMessage(n,me.Success)}Error(n){this.showMessage(n,me.Error)}Warning(n){this.showMessage(n,me.Warning)}FormMessage(n){let r="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const o of Object.keys(n))n[o][0]&&n[o][0].message&&(r+=`<li>${n[o][0].message}</li>`);return r+="</ul>",r}}class Fn{static Get(e,n,r="-"){return!e||!n?"":`${e}${r}${n}`}static In(e,n,r){return e>=n&&e<=r}static Intersects(e,n,r,o){return e===r||n===o||e>r&&e<o||n>r&&n<o||n>o&&e<r}}const Gi=1e3,Zi=60*Gi,On=60*Zi;var Bt=(t=>(t.FiveMinutes="5",t.HourQuarter="15",t.HourHalf="30",t.Hour="60",t))(Bt||{});const Zt={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class L{static S(e){return Gi*e}static M(e){return Zi*e}static H(e){return On*e}static D(e){return On*e}static W(e){return On*e}static NormalizeTime(e){return String(e).padStart(2,"0")}static HMtoM(e){const n=L.SplitHM(e);return n.length>1?L.HtoM(n[0])+n[1]:L.HtoM(n[0])}static HtoM(e){return Number(e)*60}static SplitHM(e){if(!e)return[];const n=e.split(":");return[Number(n[0]),Number(n[1])]}static HmsToHm(e){const n=L.SplitHM(e);return L.ConcatHM(n[0],n[1])}static AddMtoHM(e,n){const r=new Date,o=L.SplitHM(e);r.setHours(o[0],o[1],0,0);const s=new Date(r.getTime()+n*6e4),a=s.getHours(),d=s.getMinutes();return L.ConcatHM(a,d)}static ConcatHM(e,n){return`${e}:${L.NormalizeTime(n)}`}static DiffM(e,n){return L.Gt(n,e)?L.HMtoM(n)-L.HMtoM(e):L.HMtoM(e)-L.HMtoM(n)}static GetPeriod(e,n){return Fn.Get(e,n)}static Gt(e,n){return L.HMtoM(e)>L.HMtoM(n)}static GtOrEq(e,n){return L.Gt(e,n)||L.Eq(e,n)}static Eq(e,n){return L.HMtoM(e)===L.HMtoM(n)}static PeriodInPeriod(e,n,r,o){return L.HMtoM(e)>=L.HMtoM(r)&&L.HMtoM(n)<=L.HMtoM(o)}static PeriodsIntersects(e,n,r,o){return Fn.Intersects(L.HMtoM(e),L.HMtoM(n),L.HMtoM(r),L.HMtoM(o))}}class Mt{static Wait(e,n){return new Promise(r=>setTimeout(()=>r(n),e))}static WaitS(e,n){return Mt.Wait(L.S(e),n)}static WaitM(e,n){return Mt.Wait(L.M(e),n)}}class Oa extends ji{constructor(){super(...arguments);c(this,"duration",L.S(3))}showMessage(n,r){super.showMessage(n,r),typeof n!="string"&&(this.duration=n.duration??this.duration),Mt.Wait(this.GetDuration()).then(()=>super.hide())}GetDuration(){return this.duration}Dev(){const n="В режиме разработки",r=me.Warning;super.showMessage(n,r)}Save(){const n="Изменения успешно сохранены",r=me.Success;super.showMessage(n,r)}}const pe=new Oa;class Re{static Get(e){const n=localStorage.getItem(e);if(n)return JSON.parse(n)}static Set(e,n){n&&localStorage.setItem(e,JSON.stringify(n))}static Remove(e){localStorage.removeItem(e)}}var Se=(t=>(t.User="user",t.AccessToken="accessToken",t.RefreshToken="refreshToken",t))(Se||{});class Da{set(e){this.setAccessToken(e.accessToken),this.setRefreshToken(e.refreshToken)}getAccessToken(){return Re.Get(Se.AccessToken)}getRefreshToken(){return Re.Get(Se.RefreshToken)}setAccessToken(e){Re.Set(Se.AccessToken,e)}setRefreshToken(e){Re.Set(Se.RefreshToken,e)}reset(){Re.Remove(Se.AccessToken),Re.Remove(Se.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class La{constructor(){c(this,"user");c(this,"userConstructor")}AssignTo(e){e.user=this.get()}setUserConstructor(e){this.userConstructor=e}get(){if(this.userConstructor)return this.user=new this.userConstructor(Re.Get(Se.User)),this.user}set(e){this.userConstructor&&(this.user=new this.userConstructor(e),Re.Set(Se.User,this.user))}reset(){this.user=void 0,Re.Remove(Se.User)}actualize(){const e=Re.Get(Se.User);e&&this.set(e)}}class Ha{constructor(){c(this,"isAuth",!1);c(this,"user",new La);c(this,"tokens",new Da);c(this,"preventLogout",!1)}DeprecateLogout(){this.preventLogout=!0}AllowLogout(){this.preventLogout=!1}get IsAuth(){return this.isAuth}get User(){return this.user.get()}SetUserConstructor(e){this.user.setUserConstructor(e)}SetState(e){this.user.set(e.user),this.tokens.set(e.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){pe.Warning("В текущий момент Вы не можете выйти из системы");return}this.user.reset(),this.tokens.reset(),this.isAuth=!1}Actualize(){if(this.tokens.actualize(),this.tokens.getAccessToken()){this.isAuth=!0;return}this.Logout()}}const Ct=class Ct{constructor(){c(this,"form",i.reactive(new Ta));c(this,"status",new Ha);c(this,"modal",new Fa);if(Ct.instance)return Ct.instance;Ct.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}};c(Ct,"instance");let Dn=Ct;const Ne=new Dn;var Xi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
|
|
1
|
+
(function(E,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(E=typeof globalThis<"u"?globalThis:E||self,i(E.sprof={},E.Vue))})(this,function(E,i){"use strict";var rp=Object.defineProperty;var op=(E,i,Me)=>i in E?rp(E,i,{enumerable:!0,configurable:!0,writable:!0,value:Me}):E[i]=Me;var c=(E,i,Me)=>op(E,typeof i!="symbol"?i+"":i,Me);var Ge,Ce,H,we;var Me=typeof document<"u"?document.currentScript:null,se=(t=>(t.Login="login",t.Register="register",t.Restore="restore",t.Refresh="refresh",t))(se||{}),me=(t=>(t.Primary="primary",t.Success="success",t.Warning="warning",t.Error="error",t.Info="info",t))(me||{});class Qe{constructor(e,n,r,o){c(this,"text","Сохранить");c(this,"type",me.Success);c(this,"condition",!0);c(this,"action");c(this,"id","button");c(this,"disabled",!1);this.text=e,this.type=r,this.action=n,o!==void 0&&(this.condition=o)}static Primary(e,n,r){return new Qe(e,n,me.Primary,r)}static Success(e,n,r){return new Qe(e,n,me.Success,r)}static Warning(e,n,r){return new Qe(e,n,me.Warning,r)}static Error(e,n,r){return new Qe(e,n,me.Error,r)}}class _t extends Qe{constructor(){super(...arguments);c(this,"id","auth-button");c(this,"chunk",se.Login);c(this,"isSubmit",!1);c(this,"isLink",!0)}GetChunk(){return this.chunk}}let zn=class extends _t{constructor(){super(...arguments);c(this,"id","auth-button-login");c(this,"text","Войти");c(this,"isSubmit",!1);c(this,"chunk",se.Login)}};class Li extends _t{constructor(){super(...arguments);c(this,"id","auth-button-refresh");c(this,"text","Обновить пароль");c(this,"isSubmit",!1);c(this,"chunk",se.Refresh)}}class Tn extends _t{constructor(){super(...arguments);c(this,"id","auth-button-register");c(this,"text","Зарегистрироваться");c(this,"isSubmit",!1);c(this,"chunk",se.Register)}}class Ut extends _t{constructor(){super(...arguments);c(this,"id","auth-button-restore");c(this,"text","Забыли пароль?");c(this,"isSubmit",!1);c(this,"chunk",se.Restore)}}class Hi{constructor(){c(this,"value","");c(this,"label","");c(this,"placeholder","");c(this,"validator")}Validate(){return this.validator?(this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}class Wt extends Hi{constructor(){super(...arguments);c(this,"method");c(this,"id","field-auth");c(this,"name","")}}var ct=(t=>(t.Login="login",t.Email="email",t.Phone="phone",t.VK="vk",t.ESIA="esia",t))(ct||{});const Va=/\S+@\S+\.\S+/;class qi{constructor(){c(this,"errors",[])}validate(e){return(e===""||!e)&&this.errors.push("Введите email"),Va.test(e)||this.errors.push("Некорректный email"),this.errors}}class jt extends Wt{constructor(){super(...arguments);c(this,"id","field-auth-email");c(this,"label","Email");c(this,"name","email");c(this,"placeholder","Введите email");c(this,"validator",new qi);c(this,"method",ct.Email)}}class za{constructor(){c(this,"errors",[]);c(this,"length",6)}validate(e){return e===""||!e?(this.errors.push("Введите пароль"),this.errors):(e.length<this.length&&this.errors.push("Пароль недостаточной длины"),this.errors)}}class Gt extends Wt{constructor(){super(...arguments);c(this,"label","Пароль");c(this,"validator",new za);c(this,"name","password");c(this,"placeholder","Введите пароль");c(this,"id","field-auth-password")}}class _i extends Wt{constructor(){super(...arguments);c(this,"label","Повторите пароль");c(this,"id","field-auth-password-repeat")}}const Ui={allowRestore:!1,[se.Login]:{methods:[ct.Email],title:"Вход в систему",action:"login",buttons:[new zn,new Tn,new Ut],fields:[new jt,new Gt],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[se.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new Tn,new zn,new Ut],fields:[new jt,new Gt,new _i],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[se.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new Ut],fields:[new jt]},[se.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new Li],fields:[new Gt]}};let Ta=class{constructor(){c(this,"settings",Ui);c(this,"chunk",se.Login);c(this,"selectedMethod",ct.Email)}async Block(e){await e()}GetValues(){const e=this.GetFields(),n=new Map;return e.forEach(r=>{r.value&&n.set(r.name,r.value)}),Object.fromEntries(n)}Validate(){return[]}GetFields(){return this.GetCurSet().fields.filter(e=>!e.method||e.method===this.selectedMethod)}GetMethods(){return this.GetCurSet().methods}Chunk(){return this.chunk}get Settings(){return this.settings}GetCurSet(){return this.settings[this.chunk]}IsLogin(){return this.chunk===se.Login}IsRegister(){return this.chunk===se.Register}IsRestore(){return this.chunk===se.Restore}IsRefresh(){return this.chunk===se.Refresh}SetChunk(e){this.chunk=e}GetTitle(){return this.GetCurSet().title}GetButtons(){const e=this.GetCurSet().buttons;return e.forEach(n=>{n.isSubmit=!1}),e[0].isSubmit=!0,e}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(e=>e.Reset())}Reset(){this.chunk=se.Login}};class Fa{constructor(){c(this,"visible",!1);c(this,"closable",!1)}IsClosable(){return this.closable}IsVisible(){return this.visible}Close(){this.visible=!1}Open(e){e&&(this.closable=!0),this.visible=!0}}class Wi{constructor(){c(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class ji extends Wi{constructor(){super(...arguments);c(this,"type",me.Success);c(this,"text","");c(this,"title","")}showMessage(n,r){this.hide(),this.type=r,typeof n=="string"?this.text=n:(this.text=n.text,this.title=n.title??""),super.show()}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}Info(n){this.showMessage(n,me.Info)}Success(n){this.showMessage(n,me.Success)}Error(n){this.showMessage(n,me.Error)}Warning(n){this.showMessage(n,me.Warning)}FormMessage(n){let r="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const o of Object.keys(n))n[o][0]&&n[o][0].message&&(r+=`<li>${n[o][0].message}</li>`);return r+="</ul>",r}}class Fn{static Get(e,n,r="-"){return!e||!n?"":`${e}${r}${n}`}static In(e,n,r){return e>=n&&e<=r}static Intersects(e,n,r,o){return e===r||n===o||e>r&&e<o||n>r&&n<o||n>o&&e<r}}const Gi=1e3,Zi=60*Gi,On=60*Zi;var Bt=(t=>(t.FiveMinutes="5",t.HourQuarter="15",t.HourHalf="30",t.Hour="60",t))(Bt||{});const Zt={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class L{static S(e){return Gi*e}static M(e){return Zi*e}static H(e){return On*e}static D(e){return On*e}static W(e){return On*e}static NormalizeTime(e){return String(e).padStart(2,"0")}static HMtoM(e){const n=L.SplitHM(e);return n.length>1?L.HtoM(n[0])+n[1]:L.HtoM(n[0])}static HtoM(e){return Number(e)*60}static SplitHM(e){if(!e)return[];const n=e.split(":");return[Number(n[0]),Number(n[1])]}static HmsToHm(e){const n=L.SplitHM(e);return L.ConcatHM(n[0],n[1])}static AddMtoHM(e,n){const r=new Date,o=L.SplitHM(e);r.setHours(o[0],o[1],0,0);const s=new Date(r.getTime()+n*6e4),a=s.getHours(),d=s.getMinutes();return L.ConcatHM(a,d)}static ConcatHM(e,n){return`${e}:${L.NormalizeTime(n)}`}static DiffM(e,n){return L.Gt(n,e)?L.HMtoM(n)-L.HMtoM(e):L.HMtoM(e)-L.HMtoM(n)}static GetPeriod(e,n){return Fn.Get(e,n)}static Gt(e,n){return L.HMtoM(e)>L.HMtoM(n)}static GtOrEq(e,n){return L.Gt(e,n)||L.Eq(e,n)}static Eq(e,n){return L.HMtoM(e)===L.HMtoM(n)}static PeriodInPeriod(e,n,r,o){return L.HMtoM(e)>=L.HMtoM(r)&&L.HMtoM(n)<=L.HMtoM(o)}static PeriodsIntersects(e,n,r,o){return Fn.Intersects(L.HMtoM(e),L.HMtoM(n),L.HMtoM(r),L.HMtoM(o))}}class Mt{static Wait(e,n){return new Promise(r=>setTimeout(()=>r(n),e))}static WaitS(e,n){return Mt.Wait(L.S(e),n)}static WaitM(e,n){return Mt.Wait(L.M(e),n)}}class Oa extends ji{constructor(){super(...arguments);c(this,"duration",L.S(3))}showMessage(n,r){super.showMessage(n,r),typeof n!="string"&&(this.duration=n.duration??this.duration),Mt.Wait(this.GetDuration()).then(()=>super.hide())}GetDuration(){return this.duration}Dev(){const n="В режиме разработки",r=me.Warning;super.showMessage(n,r)}Save(){const n="Изменения успешно сохранены",r=me.Success;super.showMessage(n,r)}}const pe=new Oa;class Re{static Get(e){const n=localStorage.getItem(e);if(n)return JSON.parse(n)}static Set(e,n){n&&localStorage.setItem(e,JSON.stringify(n))}static Remove(e){localStorage.removeItem(e)}}var Se=(t=>(t.User="user",t.AccessToken="accessToken",t.RefreshToken="refreshToken",t))(Se||{});class Da{set(e){this.setAccessToken(e.accessToken),this.setRefreshToken(e.refreshToken)}getAccessToken(){return Re.Get(Se.AccessToken)}getRefreshToken(){return Re.Get(Se.RefreshToken)}setAccessToken(e){Re.Set(Se.AccessToken,e)}setRefreshToken(e){Re.Set(Se.RefreshToken,e)}reset(){Re.Remove(Se.AccessToken),Re.Remove(Se.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class La{constructor(){c(this,"user");c(this,"userConstructor")}AssignTo(e){e.user=this.get()}setUserConstructor(e){this.userConstructor=e}get(){if(this.userConstructor)return this.user=new this.userConstructor(Re.Get(Se.User)),this.user}set(e){this.userConstructor&&(this.user=new this.userConstructor(e),Re.Set(Se.User,this.user))}reset(){this.user=void 0,Re.Remove(Se.User)}actualize(){const e=Re.Get(Se.User);e&&this.set(e)}}class Ha{constructor(){c(this,"isAuth",!1);c(this,"user",new La);c(this,"tokens",new Da);c(this,"preventLogout",!1)}DeprecateLogout(){this.preventLogout=!0}AllowLogout(){this.preventLogout=!1}get IsAuth(){return this.isAuth}get User(){return this.user.get()}SetUserConstructor(e){this.user.setUserConstructor(e)}SetState(e){this.user.set(e.user),this.tokens.set(e.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){pe.Warning("В текущий момент Вы не можете выйти из системы");return}this.user.reset(),this.tokens.reset(),this.isAuth=!1}Actualize(){if(this.tokens.actualize(),this.tokens.getAccessToken()){this.isAuth=!0;return}this.Logout()}}const Ct=class Ct{constructor(){c(this,"form",i.reactive(new Ta));c(this,"status",i.reactive(new Ha));c(this,"modal",i.reactive(new Fa));if(Ct.instance)return Ct.instance;Ct.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}};c(Ct,"instance");let Dn=Ct;const Ne=new Dn;var Xi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
|
|
2
2
|
Copyright (C) Microsoft. All rights reserved.
|
|
3
3
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
4
|
this file except in compliance with the License. You may obtain a copy of the
|
package/package.json
CHANGED