gc_i18n 1.7.2 → 1.7.3
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/lib/gc_i18n.es.js +515 -481
- package/lib/gc_i18n.umd.js +12 -12
- package/package.json +12 -5
- package/packages/index.js +47 -21
package/lib/gc_i18n.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import './gc_i18n.css';
|
|
2
2
|
import kt from "keyboardjs";
|
|
3
|
-
import { h as ke, ref as ie, computed as He, onMounted as
|
|
3
|
+
import { h as ke, ref as ie, computed as He, onMounted as no, nextTick as xt, Vue as xe } from "vue-demi";
|
|
4
4
|
import st from "axios";
|
|
5
5
|
import E from "store2";
|
|
6
6
|
import b from "lodash-es";
|
|
7
|
-
import { jws as
|
|
8
|
-
const
|
|
7
|
+
import { jws as oo } from "jsrsasign";
|
|
8
|
+
const so = [
|
|
9
9
|
"ar-SA",
|
|
10
10
|
// 阿拉伯语(沙特阿拉伯)
|
|
11
11
|
"ar-EG",
|
|
@@ -14,25 +14,25 @@ const oo = [
|
|
|
14
14
|
// 波斯语(伊朗)
|
|
15
15
|
], Ee = (t) => {
|
|
16
16
|
if (!t || typeof t != "string") return !1;
|
|
17
|
-
if (
|
|
17
|
+
if (so.includes(t)) return !0;
|
|
18
18
|
const e = t.split("-")[0].toLowerCase();
|
|
19
19
|
return ["ar", "fa"].includes(e);
|
|
20
|
-
},
|
|
20
|
+
}, io = (t) => {
|
|
21
21
|
const e = {};
|
|
22
22
|
for (const n of t)
|
|
23
23
|
e[n.key] = n.value;
|
|
24
24
|
return e;
|
|
25
|
-
},
|
|
25
|
+
}, ro = (t, e, n) => (e.forEach((o) => {
|
|
26
26
|
const s = o.key.split(".");
|
|
27
27
|
s[0] === "common" && b.find(t, { key: `${n}.${s[1]}` }) && b.remove(t, { key: `${n}.${s[1]}` });
|
|
28
28
|
const i = b.find(t, { key: o.key });
|
|
29
29
|
i ? b.merge(i, o) : t.push(o);
|
|
30
30
|
}), t), ce = st.create({
|
|
31
31
|
timeout: 8e3
|
|
32
|
-
}), Te = /* @__PURE__ */ new Map(),
|
|
32
|
+
}), Te = /* @__PURE__ */ new Map(), ao = "https://extendapi.ihotel.cn", lo = "https://test.ihotel.cn", co = /^https?:\/\//i, Xe = (t) => String(t || "guest").replace(/[^\w-]/g, "_"), we = async (t, e) => typeof e != "function" ? t : await e(t) || t, Gt = ({ env: t, dev: e } = {}) => {
|
|
33
33
|
const n = typeof t == "string" ? t.trim() : t;
|
|
34
|
-
return typeof n == "string" &&
|
|
35
|
-
},
|
|
34
|
+
return typeof n == "string" && co.test(n) ? n.replace(/\/+$/, "") : n === "dev" || e === !0 ? lo : !n || n === "local" ? "" : ao;
|
|
35
|
+
}, Wt = async ({
|
|
36
36
|
baseUrl: t,
|
|
37
37
|
token: e,
|
|
38
38
|
appCode: n,
|
|
@@ -65,7 +65,7 @@ const oo = [
|
|
|
65
65
|
console.error("获取语言列表失败:", r);
|
|
66
66
|
}
|
|
67
67
|
return [];
|
|
68
|
-
},
|
|
68
|
+
}, Yt = async ({ baseUrl: t, token: e, appCode: n, getRequestToken: o }) => {
|
|
69
69
|
const s = await we(e, o);
|
|
70
70
|
return ce.get(
|
|
71
71
|
t + "/i18n-web/app/getsupportedlangs?appCode=" + n,
|
|
@@ -97,7 +97,7 @@ const oo = [
|
|
|
97
97
|
} catch (r) {
|
|
98
98
|
return console.error("获取翻译数据失败:", r), null;
|
|
99
99
|
}
|
|
100
|
-
},
|
|
100
|
+
}, Zt = async ({ data: t, token: e, baseUrl: n, getRequestToken: o }) => {
|
|
101
101
|
const s = await we(e, o);
|
|
102
102
|
return ce({
|
|
103
103
|
url: n + "/i18n-web/kv_translate/userDicts",
|
|
@@ -107,7 +107,7 @@ const oo = [
|
|
|
107
107
|
},
|
|
108
108
|
data: t
|
|
109
109
|
});
|
|
110
|
-
},
|
|
110
|
+
}, Jt = async ({ data: t, token: e, baseUrl: n, getRequestToken: o }) => {
|
|
111
111
|
const s = await we(e, o);
|
|
112
112
|
return ce({
|
|
113
113
|
url: n + "/i18n-web/kv_translate/batch",
|
|
@@ -123,7 +123,7 @@ const oo = [
|
|
|
123
123
|
return !e || /^<!doctype/i.test(e) || /^<html/i.test(e) ? (console.warn("i18n_token 接口未返回有效 token,请检查业务项目接口"), "") : e;
|
|
124
124
|
}
|
|
125
125
|
return b.get(t, "retVal.i18n_token") || b.get(t, "retVal.token") || b.get(t, "i18n_token") || b.get(t, "token") || "";
|
|
126
|
-
},
|
|
126
|
+
}, uo = async ({
|
|
127
127
|
request: t,
|
|
128
128
|
appCode: e,
|
|
129
129
|
orgCode: n,
|
|
@@ -155,7 +155,7 @@ const oo = [
|
|
|
155
155
|
}
|
|
156
156
|
});
|
|
157
157
|
return Tt(i == null ? void 0 : i.data);
|
|
158
|
-
},
|
|
158
|
+
}, ho = async ({
|
|
159
159
|
baseUrl: t,
|
|
160
160
|
appCode: e,
|
|
161
161
|
language: n = "zh-CN",
|
|
@@ -165,7 +165,7 @@ const oo = [
|
|
|
165
165
|
getRequestToken: r
|
|
166
166
|
}) => {
|
|
167
167
|
try {
|
|
168
|
-
const l =
|
|
168
|
+
const l = Xe(i), a = `I18N_${b.toUpper(e)}_${l}`, d = E.namespace(a), g = {
|
|
169
169
|
baseUrl: t,
|
|
170
170
|
appCode: e,
|
|
171
171
|
language: n,
|
|
@@ -194,7 +194,7 @@ const oo = [
|
|
|
194
194
|
return b.get(u, "translatesDTOs", []);
|
|
195
195
|
const B = b.get(u, "translatesDTOs", []);
|
|
196
196
|
if (!b.isEmpty(S.translatesDTOs)) {
|
|
197
|
-
const x =
|
|
197
|
+
const x = ro(B, S.translatesDTOs, s), w = {
|
|
198
198
|
lastPullDate: S.lastPullDate,
|
|
199
199
|
translatesDTOs: x
|
|
200
200
|
};
|
|
@@ -207,20 +207,20 @@ const oo = [
|
|
|
207
207
|
}), k;
|
|
208
208
|
} catch (l) {
|
|
209
209
|
console.error("处理翻译数据失败:", l);
|
|
210
|
-
const a =
|
|
210
|
+
const a = Xe(i), d = E.namespace(`I18N_${b.toUpper(e)}_${a}`);
|
|
211
211
|
return b.get(d.get(n), "translatesDTOs", []);
|
|
212
212
|
}
|
|
213
213
|
}, At = ({ appCode: t, cacheScope: e } = {}) => {
|
|
214
214
|
if (t) {
|
|
215
215
|
if (e) {
|
|
216
|
-
E.namespace(`I18N_${b.toUpper(t)}_${
|
|
216
|
+
E.namespace(`I18N_${b.toUpper(t)}_${Xe(e)}`).clearAll();
|
|
217
217
|
return;
|
|
218
218
|
}
|
|
219
219
|
E.namespace(`I18N_${b.toUpper(t)}`).clearAll();
|
|
220
220
|
}
|
|
221
221
|
};
|
|
222
222
|
function St(t) {
|
|
223
|
-
const e = t || "", n =
|
|
223
|
+
const e = t || "", n = fo(e);
|
|
224
224
|
return $t(n ? [
|
|
225
225
|
{ type: "locked", value: e.slice(0, n.questionIndex + 1) },
|
|
226
226
|
...Lt(
|
|
@@ -233,7 +233,7 @@ function St(t) {
|
|
|
233
233
|
{ type: "locked", value: e.slice(n.endIndex) }
|
|
234
234
|
] : Xt(e));
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function fo(t) {
|
|
237
237
|
let e = 0, n = "", o = -1, s = -1;
|
|
238
238
|
for (let i = 0; i < t.length; i++) {
|
|
239
239
|
const r = t[i], l = t[i - 1];
|
|
@@ -261,12 +261,12 @@ function ho(t) {
|
|
|
261
261
|
return {
|
|
262
262
|
questionIndex: o,
|
|
263
263
|
colonIndex: i,
|
|
264
|
-
endIndex:
|
|
264
|
+
endIndex: go(t, i + 1, s)
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
267
|
return null;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function go(t, e, n) {
|
|
270
270
|
let o = n, s = "";
|
|
271
271
|
for (let i = e; i < t.length; i++) {
|
|
272
272
|
const r = t[i], l = t[i - 1];
|
|
@@ -323,12 +323,12 @@ function $t(t) {
|
|
|
323
323
|
[]
|
|
324
324
|
);
|
|
325
325
|
}
|
|
326
|
-
const I = (t) => String(t ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), Fe = (t) => (t == null ? void 0 : t.data) ?? t,
|
|
326
|
+
const I = (t) => String(t ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), Fe = (t) => (t == null ? void 0 : t.data) ?? t, po = (t) => String(t || "").trim(), wo = (t) => ({
|
|
327
327
|
...t,
|
|
328
328
|
langCode: t.language || t.langCode || t,
|
|
329
329
|
langName: t.langName || t.language || t.langCode || t,
|
|
330
330
|
langNameNative: t.langNameNative || t.nativeName || ""
|
|
331
|
-
}),
|
|
331
|
+
}), mo = (t) => ({ [t]: !0 }), bo = ["GREENCLOUD", "GCBZG"], yo = (t) => {
|
|
332
332
|
const n = String(t || "").replace(/^Bearer\s+/i, "").split(".")[1];
|
|
333
333
|
if (!n)
|
|
334
334
|
return {};
|
|
@@ -358,9 +358,9 @@ const I = (t) => String(t ?? "").replace(/&/g, "&").replace(/</g, "<").re
|
|
|
358
358
|
}
|
|
359
359
|
window.opener && window.opener.postMessage(t, "*");
|
|
360
360
|
};
|
|
361
|
-
class
|
|
361
|
+
class vo {
|
|
362
362
|
constructor(e = {}) {
|
|
363
|
-
this.name = e.name || "", this.appCode = e.appCode || "", this.token = e.token || "", this.getRequestToken = e.getRequestToken, this.baseUrl = e.baseUrl || "", this.translationKeys = e.translationKeys || [], this.loginRouteName = e.loginRouteName || "login", this.loginTranslationKeys = e.loginTranslationKeys || [], this.login = e.login === !0, this.onSaveSuccess = e.onSaveSuccess, this.onError = e.onError, this.onClose = e.onClose, this.orgCode =
|
|
363
|
+
this.name = e.name || "", this.appCode = e.appCode || "", this.token = e.token || "", this.getRequestToken = e.getRequestToken, this.baseUrl = e.baseUrl || "", this.translationKeys = e.translationKeys || [], this.loginRouteName = e.loginRouteName || "login", this.loginTranslationKeys = e.loginTranslationKeys || [], this.login = e.login === !0, this.onSaveSuccess = e.onSaveSuccess, this.onError = e.onError, this.onClose = e.onClose, this.orgCode = yo(this.token).orgCode || "", this.root = null, this.loading = !1, this.languageSettingVisible = !1, this.searchText = "", this.type = "pageData", this.languages = [], this.mySaveData = [], this.data = [], this.page = {
|
|
364
364
|
pageSize: 10,
|
|
365
365
|
firstResult: 0,
|
|
366
366
|
totalRows: 0
|
|
@@ -379,7 +379,7 @@ class yo {
|
|
|
379
379
|
return this.type === "loginData" ? this.loginRouteName : this.type === "pageData" ? this.name : "common";
|
|
380
380
|
}
|
|
381
381
|
get isSystemDefaultEditor() {
|
|
382
|
-
return
|
|
382
|
+
return bo.includes(String(this.orgCode).toUpperCase());
|
|
383
383
|
}
|
|
384
384
|
renderSystemDefaultNotice() {
|
|
385
385
|
return this.isSystemDefaultEditor ? `
|
|
@@ -475,14 +475,14 @@ class yo {
|
|
|
475
475
|
this.loading = !0, this.render();
|
|
476
476
|
try {
|
|
477
477
|
let e = E.get("I18N_LANGUAGE_SETTING");
|
|
478
|
-
const n = await
|
|
478
|
+
const n = await Yt({
|
|
479
479
|
token: this.token,
|
|
480
480
|
getRequestToken: this.getRequestToken,
|
|
481
481
|
baseUrl: this.baseUrl,
|
|
482
482
|
appCode: this.appCode
|
|
483
483
|
}), o = Fe(n);
|
|
484
484
|
o && o.result === 0 ? (b.isEmpty(e) && (e = ["zh-CN", "en-US", "zh-TW"]), this.languages = b.map(o.retVal || [], (s) => {
|
|
485
|
-
const i =
|
|
485
|
+
const i = wo(s);
|
|
486
486
|
return {
|
|
487
487
|
...i,
|
|
488
488
|
checked: b.includes(e, i.langCode)
|
|
@@ -523,7 +523,7 @@ class yo {
|
|
|
523
523
|
[n]: o,
|
|
524
524
|
[`${n}_fromAi`]: "F",
|
|
525
525
|
page: this.getCurrentPageName(),
|
|
526
|
-
changedLangs:
|
|
526
|
+
changedLangs: mo(n)
|
|
527
527
|
});
|
|
528
528
|
}
|
|
529
529
|
isProtectedValue(e) {
|
|
@@ -537,7 +537,7 @@ class yo {
|
|
|
537
537
|
const o = this.data[e];
|
|
538
538
|
if (!o)
|
|
539
539
|
return;
|
|
540
|
-
const s =
|
|
540
|
+
const s = po(o[n]);
|
|
541
541
|
this.editor = {
|
|
542
542
|
rowIndex: e,
|
|
543
543
|
key: n,
|
|
@@ -588,7 +588,7 @@ class yo {
|
|
|
588
588
|
return;
|
|
589
589
|
}
|
|
590
590
|
try {
|
|
591
|
-
const s = await
|
|
591
|
+
const s = await Jt({
|
|
592
592
|
baseUrl: this.baseUrl,
|
|
593
593
|
data: {
|
|
594
594
|
appCode: this.appCode,
|
|
@@ -650,7 +650,7 @@ class yo {
|
|
|
650
650
|
async search(e, n) {
|
|
651
651
|
this.loading = !0, this.render();
|
|
652
652
|
try {
|
|
653
|
-
const o = await
|
|
653
|
+
const o = await Zt({
|
|
654
654
|
baseUrl: this.baseUrl,
|
|
655
655
|
data: {
|
|
656
656
|
appCode: this.appCode,
|
|
@@ -975,58 +975,58 @@ class yo {
|
|
|
975
975
|
return `<div class="gc_i18n_config_protected_editor">${this.editor.parts.map((n, o) => n.type === "text" ? `<span class="gc_i18n_config_editor_text" contenteditable="true" spellcheck="false" data-editor-index="${o}">${I(n.value)}</span>` : `<span class="gc_i18n_config_editor_locked" contenteditable="false">${I(n.value)}</span>`).join("")}</div>`;
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
|
-
function
|
|
979
|
-
return new
|
|
978
|
+
function Co(t) {
|
|
979
|
+
return new vo(t);
|
|
980
980
|
}
|
|
981
981
|
/*!
|
|
982
982
|
* sweetalert2 v11.26.18
|
|
983
983
|
* Released under the MIT License.
|
|
984
984
|
*/
|
|
985
|
-
function
|
|
985
|
+
function Qt(t, e, n) {
|
|
986
986
|
if (typeof t == "function" ? t === e : t.has(e)) return arguments.length < 3 ? e : n;
|
|
987
987
|
throw new TypeError("Private element is not present on this object");
|
|
988
988
|
}
|
|
989
|
-
function
|
|
989
|
+
function _o(t, e) {
|
|
990
990
|
if (e.has(t)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
991
991
|
}
|
|
992
992
|
function It(t, e) {
|
|
993
|
-
return t.get(
|
|
994
|
-
}
|
|
995
|
-
function _o(t, e, n) {
|
|
996
|
-
Co(t, e), e.set(t, n);
|
|
993
|
+
return t.get(Qt(t, e));
|
|
997
994
|
}
|
|
998
995
|
function ko(t, e, n) {
|
|
999
|
-
|
|
996
|
+
_o(t, e), e.set(t, n);
|
|
997
|
+
}
|
|
998
|
+
function xo(t, e, n) {
|
|
999
|
+
return t.set(Qt(t, e), n), n;
|
|
1000
1000
|
}
|
|
1001
|
-
const
|
|
1001
|
+
const Eo = 100, p = {}, To = () => {
|
|
1002
1002
|
p.previousActiveElement instanceof HTMLElement ? (p.previousActiveElement.focus(), p.previousActiveElement = null) : document.body && document.body.focus();
|
|
1003
|
-
},
|
|
1003
|
+
}, Ao = (t) => new Promise((e) => {
|
|
1004
1004
|
if (!t)
|
|
1005
1005
|
return e();
|
|
1006
1006
|
const n = window.scrollX, o = window.scrollY;
|
|
1007
1007
|
p.restoreFocusTimeout = setTimeout(() => {
|
|
1008
|
-
|
|
1009
|
-
},
|
|
1010
|
-
}),
|
|
1011
|
-
(t, e) => (t[e] =
|
|
1008
|
+
To(), e();
|
|
1009
|
+
}, Eo), window.scrollTo(n, o);
|
|
1010
|
+
}), en = "swal2-", So = ["container", "shown", "height-auto", "iosfix", "popup", "modal", "no-backdrop", "no-transition", "toast", "toast-shown", "show", "hide", "close", "title", "html-container", "actions", "confirm", "deny", "cancel", "footer", "icon", "icon-content", "image", "input", "file", "range", "select", "radio", "checkbox", "label", "textarea", "inputerror", "input-label", "validation-message", "progress-steps", "active-progress-step", "progress-step", "progress-step-line", "loader", "loading", "styled", "top", "top-start", "top-end", "top-left", "top-right", "center", "center-start", "center-end", "center-left", "center-right", "bottom", "bottom-start", "bottom-end", "bottom-left", "bottom-right", "grow-row", "grow-column", "grow-fullscreen", "rtl", "timer-progress-bar", "timer-progress-bar-container", "scrollbar-measure", "icon-success", "icon-warning", "icon-info", "icon-question", "icon-error", "draggable", "dragging"], c = So.reduce(
|
|
1011
|
+
(t, e) => (t[e] = en + e, t),
|
|
1012
1012
|
/** @type {SwalClasses} */
|
|
1013
1013
|
{}
|
|
1014
|
-
),
|
|
1015
|
-
(t, e) => (t[e] =
|
|
1014
|
+
), Lo = ["success", "warning", "info", "question", "error"], Le = Lo.reduce(
|
|
1015
|
+
(t, e) => (t[e] = en + e, t),
|
|
1016
1016
|
/** @type {SwalIcons} */
|
|
1017
1017
|
{}
|
|
1018
|
-
),
|
|
1019
|
-
console.warn(`${
|
|
1018
|
+
), tn = "SweetAlert2:", it = (t) => t.charAt(0).toUpperCase() + t.slice(1), O = (t) => {
|
|
1019
|
+
console.warn(`${tn} ${typeof t == "object" ? t.join(" ") : t}`);
|
|
1020
1020
|
}, te = (t) => {
|
|
1021
|
-
console.error(`${
|
|
1022
|
-
}, Pt = [],
|
|
1021
|
+
console.error(`${tn} ${t}`);
|
|
1022
|
+
}, Pt = [], $o = (t) => {
|
|
1023
1023
|
Pt.includes(t) || (Pt.push(t), O(t));
|
|
1024
|
-
},
|
|
1025
|
-
|
|
1026
|
-
}, Oe = (t) => typeof t == "function" ? t() : t, rt = (t) => t && typeof t.toPromise == "function", me = (t) => rt(t) ? t.toPromise() : Promise.resolve(t), at = (t) => t && Promise.resolve(t) === t,
|
|
1027
|
-
const e =
|
|
1024
|
+
}, nn = (t, e = null) => {
|
|
1025
|
+
$o(`"${t}" is deprecated and will be removed in the next major release.${e ? ` Use "${e}" instead.` : ""}`);
|
|
1026
|
+
}, Oe = (t) => typeof t == "function" ? t() : t, rt = (t) => t && typeof t.toPromise == "function", me = (t) => rt(t) ? t.toPromise() : Promise.resolve(t), at = (t) => t && Promise.resolve(t) === t, U = () => document.body.querySelector(`.${c.container}`), be = (t) => {
|
|
1027
|
+
const e = U();
|
|
1028
1028
|
return e ? e.querySelector(t) : null;
|
|
1029
|
-
}, j = (t) => be(`.${t}`), A = () => j(c.popup), de = () => j(c.icon),
|
|
1029
|
+
}, j = (t) => be(`.${t}`), A = () => j(c.popup), de = () => j(c.icon), Io = () => j(c["icon-content"]), on = () => j(c.title), lt = () => j(c["html-container"]), sn = () => j(c.image), ct = () => j(c["progress-steps"]), Ue = () => j(c["validation-message"]), K = () => (
|
|
1030
1030
|
/** @type {HTMLButtonElement} */
|
|
1031
1031
|
be(`.${c.actions} .${c.confirm}`)
|
|
1032
1032
|
), ue = () => (
|
|
@@ -1035,7 +1035,7 @@ const xo = 100, p = {}, Eo = () => {
|
|
|
1035
1035
|
), ne = () => (
|
|
1036
1036
|
/** @type {HTMLButtonElement} */
|
|
1037
1037
|
be(`.${c.actions} .${c.deny}`)
|
|
1038
|
-
),
|
|
1038
|
+
), Po = () => j(c["input-label"]), he = () => be(`.${c.loader}`), ye = () => j(c.actions), rn = () => j(c.footer), ze = () => j(c["timer-progress-bar"]), dt = () => j(c.close), No = `
|
|
1039
1039
|
a[href],
|
|
1040
1040
|
area[href],
|
|
1041
1041
|
input:not([disabled]),
|
|
@@ -1057,12 +1057,12 @@ const xo = 100, p = {}, Eo = () => {
|
|
|
1057
1057
|
const e = t.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'), n = Array.from(e).sort((i, r) => {
|
|
1058
1058
|
const l = parseInt(i.getAttribute("tabindex") || "0"), a = parseInt(r.getAttribute("tabindex") || "0");
|
|
1059
1059
|
return l > a ? 1 : l < a ? -1 : 0;
|
|
1060
|
-
}), o = t.querySelectorAll(
|
|
1061
|
-
return [...new Set(n.concat(s))].filter((i) =>
|
|
1060
|
+
}), o = t.querySelectorAll(No), s = Array.from(o).filter((i) => i.getAttribute("tabindex") !== "-1");
|
|
1061
|
+
return [...new Set(n.concat(s))].filter((i) => z(i));
|
|
1062
1062
|
}, ht = () => G(document.body, c.shown) && !G(document.body, c["toast-shown"]) && !G(document.body, c["no-backdrop"]), qe = () => {
|
|
1063
1063
|
const t = A();
|
|
1064
1064
|
return t ? G(t, c.toast) : !1;
|
|
1065
|
-
},
|
|
1065
|
+
}, Bo = () => {
|
|
1066
1066
|
const t = A();
|
|
1067
1067
|
return t ? t.hasAttribute("data-loading") : !1;
|
|
1068
1068
|
}, V = (t, e) => {
|
|
@@ -1084,12 +1084,12 @@ const xo = 100, p = {}, Eo = () => {
|
|
|
1084
1084
|
if (!t.classList.contains(n[o]))
|
|
1085
1085
|
return !1;
|
|
1086
1086
|
return !0;
|
|
1087
|
-
},
|
|
1087
|
+
}, Mo = (t, e) => {
|
|
1088
1088
|
Array.from(t.classList).forEach((n) => {
|
|
1089
1089
|
!Object.values(c).includes(n) && !Object.values(Le).includes(n) && !Object.values(e.showClass || {}).includes(n) && t.classList.remove(n);
|
|
1090
1090
|
});
|
|
1091
1091
|
}, q = (t, e, n) => {
|
|
1092
|
-
if (
|
|
1092
|
+
if (Mo(t, e), !e.customClass)
|
|
1093
1093
|
return;
|
|
1094
1094
|
const o = e.customClass[
|
|
1095
1095
|
/** @type {keyof SweetAlertCustomClass} */
|
|
@@ -1119,21 +1119,21 @@ const xo = 100, p = {}, Eo = () => {
|
|
|
1119
1119
|
default:
|
|
1120
1120
|
return t.querySelector(`.${c.popup} > .${c.input}`);
|
|
1121
1121
|
}
|
|
1122
|
-
},
|
|
1122
|
+
}, an = (t) => {
|
|
1123
1123
|
if (t.focus(), t.type !== "file") {
|
|
1124
1124
|
const e = t.value;
|
|
1125
1125
|
t.value = "", t.value = e;
|
|
1126
1126
|
}
|
|
1127
|
-
},
|
|
1127
|
+
}, ln = (t, e, n) => {
|
|
1128
1128
|
!t || !e || (typeof e == "string" && (e = e.split(/\s+/).filter(Boolean)), e.forEach((o) => {
|
|
1129
1129
|
Array.isArray(t) ? t.forEach((s) => {
|
|
1130
1130
|
n ? s.classList.add(o) : s.classList.remove(o);
|
|
1131
1131
|
}) : n ? t.classList.add(o) : t.classList.remove(o);
|
|
1132
1132
|
}));
|
|
1133
1133
|
}, T = (t, e) => {
|
|
1134
|
-
|
|
1134
|
+
ln(t, e, !0);
|
|
1135
1135
|
}, H = (t, e) => {
|
|
1136
|
-
|
|
1136
|
+
ln(t, e, !1);
|
|
1137
1137
|
}, W = (t, e) => {
|
|
1138
1138
|
const n = Array.from(t.children);
|
|
1139
1139
|
for (let o = 0; o < n.length; o++) {
|
|
@@ -1162,7 +1162,7 @@ const xo = 100, p = {}, Eo = () => {
|
|
|
1162
1162
|
s && s.style.setProperty(n, o);
|
|
1163
1163
|
}, ve = (t, e, n = "flex") => {
|
|
1164
1164
|
e ? R(t, n) : D(t);
|
|
1165
|
-
},
|
|
1165
|
+
}, z = (t) => !!(t && (t.offsetWidth || t.offsetHeight || t.getClientRects().length)), Ro = () => !z(K()) && !z(ne()) && !z(ue()), Qe = (t) => t.scrollHeight > t.clientHeight, Do = (t, e) => {
|
|
1166
1166
|
let n = (
|
|
1167
1167
|
/** @type {HTMLElement | null} */
|
|
1168
1168
|
t
|
|
@@ -1173,23 +1173,23 @@ const xo = 100, p = {}, Eo = () => {
|
|
|
1173
1173
|
n = n.parentElement;
|
|
1174
1174
|
}
|
|
1175
1175
|
return !1;
|
|
1176
|
-
},
|
|
1176
|
+
}, cn = (t) => {
|
|
1177
1177
|
const e = window.getComputedStyle(t), n = parseFloat(e.getPropertyValue("animation-duration") || "0"), o = parseFloat(e.getPropertyValue("transition-duration") || "0");
|
|
1178
1178
|
return n > 0 || o > 0;
|
|
1179
1179
|
}, gt = (t, e = !1) => {
|
|
1180
|
-
const n =
|
|
1181
|
-
n &&
|
|
1180
|
+
const n = ze();
|
|
1181
|
+
n && z(n) && (e && (n.style.transition = "none", n.style.width = "100%"), setTimeout(() => {
|
|
1182
1182
|
n.style.transition = `width ${t / 1e3}s linear`, n.style.width = "0%";
|
|
1183
1183
|
}, 10));
|
|
1184
|
-
},
|
|
1185
|
-
const t =
|
|
1184
|
+
}, Oo = () => {
|
|
1185
|
+
const t = ze();
|
|
1186
1186
|
if (!t)
|
|
1187
1187
|
return;
|
|
1188
1188
|
const e = parseInt(window.getComputedStyle(t).width);
|
|
1189
1189
|
t.style.removeProperty("transition"), t.style.width = "100%";
|
|
1190
1190
|
const n = parseInt(window.getComputedStyle(t).width), o = e / n * 100;
|
|
1191
1191
|
t.style.width = `${o}%`;
|
|
1192
|
-
},
|
|
1192
|
+
}, Uo = () => typeof window > "u" || typeof document > "u", zo = `
|
|
1193
1193
|
<div aria-labelledby="${c.title}" aria-describedby="${c["html-container"]}" class="${c.popup}" tabindex="-1">
|
|
1194
1194
|
<button type="button" class="${c.close}"></button>
|
|
1195
1195
|
<ul class="${c["progress-steps"]}"></ul>
|
|
@@ -1222,27 +1222,27 @@ const xo = 100, p = {}, Eo = () => {
|
|
|
1222
1222
|
<div class="${c["timer-progress-bar"]}"></div>
|
|
1223
1223
|
</div>
|
|
1224
1224
|
</div>
|
|
1225
|
-
`.replace(/(^|\n)\s*/g, ""),
|
|
1226
|
-
const t =
|
|
1225
|
+
`.replace(/(^|\n)\s*/g, ""), qo = () => {
|
|
1226
|
+
const t = U();
|
|
1227
1227
|
return t ? (t.remove(), H([document.documentElement, document.body], [
|
|
1228
1228
|
c["no-backdrop"],
|
|
1229
1229
|
c["toast-shown"],
|
|
1230
1230
|
// @ts-ignore: 'has-column' is not defined in swalClasses but may be set dynamically
|
|
1231
1231
|
c["has-column"]
|
|
1232
1232
|
]), !0) : !1;
|
|
1233
|
-
},
|
|
1233
|
+
}, J = () => {
|
|
1234
1234
|
p.currentInstance && p.currentInstance.resetValidationMessage();
|
|
1235
|
-
},
|
|
1235
|
+
}, jo = () => {
|
|
1236
1236
|
const t = A();
|
|
1237
1237
|
if (!t)
|
|
1238
1238
|
return;
|
|
1239
1239
|
const e = W(t, c.input), n = W(t, c.file), o = t.querySelector(`.${c.range} input`), s = t.querySelector(`.${c.range} output`), i = W(t, c.select), r = t.querySelector(`.${c.checkbox} input`), l = W(t, c.textarea);
|
|
1240
|
-
e && (e.oninput =
|
|
1241
|
-
|
|
1240
|
+
e && (e.oninput = J), n && (n.onchange = J), i && (i.onchange = J), r && (r.onchange = J), l && (l.oninput = J), o && s && (o.oninput = () => {
|
|
1241
|
+
J(), s.value = o.value;
|
|
1242
1242
|
}, o.onchange = () => {
|
|
1243
|
-
|
|
1243
|
+
J(), s.value = o.value;
|
|
1244
1244
|
});
|
|
1245
|
-
},
|
|
1245
|
+
}, Vo = (t) => {
|
|
1246
1246
|
if (typeof t == "string") {
|
|
1247
1247
|
const e = document.querySelector(t);
|
|
1248
1248
|
if (!e)
|
|
@@ -1253,40 +1253,40 @@ const xo = 100, p = {}, Eo = () => {
|
|
|
1253
1253
|
);
|
|
1254
1254
|
}
|
|
1255
1255
|
return t;
|
|
1256
|
-
},
|
|
1256
|
+
}, Ho = (t) => {
|
|
1257
1257
|
const e = A();
|
|
1258
1258
|
e && (e.setAttribute("role", t.toast ? "alert" : "dialog"), e.setAttribute("aria-live", t.toast ? "polite" : "assertive"), t.toast || e.setAttribute("aria-modal", "true"));
|
|
1259
|
-
}, Ho = (t) => {
|
|
1260
|
-
window.getComputedStyle(t).direction === "rtl" && (T(z(), c.rtl), p.isRTL = !0);
|
|
1261
1259
|
}, Fo = (t) => {
|
|
1262
|
-
|
|
1263
|
-
|
|
1260
|
+
window.getComputedStyle(t).direction === "rtl" && (T(U(), c.rtl), p.isRTL = !0);
|
|
1261
|
+
}, Ko = (t) => {
|
|
1262
|
+
const e = qo();
|
|
1263
|
+
if (Uo()) {
|
|
1264
1264
|
te("SweetAlert2 requires document to initialize");
|
|
1265
1265
|
return;
|
|
1266
1266
|
}
|
|
1267
1267
|
const n = document.createElement("div");
|
|
1268
1268
|
n.className = c.container, e && T(n, c["no-transition"]), V(n, zo), n.dataset.swal2Theme = t.theme;
|
|
1269
|
-
const o =
|
|
1270
|
-
o.appendChild(n), t.topLayer && (n.setAttribute("popover", ""), n.showPopover()),
|
|
1269
|
+
const o = Vo(t.target || "body");
|
|
1270
|
+
o.appendChild(n), t.topLayer && (n.setAttribute("popover", ""), n.showPopover()), Ho(t), Fo(o), jo();
|
|
1271
1271
|
}, pt = (t, e) => {
|
|
1272
|
-
t instanceof HTMLElement ? e.appendChild(t) : typeof t == "object" ?
|
|
1273
|
-
}, Ko = (t, e) => {
|
|
1274
|
-
"jquery" in t ? Go(e, t) : V(e, t.toString());
|
|
1272
|
+
t instanceof HTMLElement ? e.appendChild(t) : typeof t == "object" ? Go(t, e) : t && V(e, t);
|
|
1275
1273
|
}, Go = (t, e) => {
|
|
1274
|
+
"jquery" in t ? Wo(e, t) : V(e, t.toString());
|
|
1275
|
+
}, Wo = (t, e) => {
|
|
1276
1276
|
if (t.textContent = "", 0 in e)
|
|
1277
1277
|
for (let n = 0; n in e; n++)
|
|
1278
1278
|
t.appendChild(e[n].cloneNode(!0));
|
|
1279
1279
|
else
|
|
1280
1280
|
t.appendChild(e.cloneNode(!0));
|
|
1281
|
-
},
|
|
1281
|
+
}, Yo = (t, e) => {
|
|
1282
1282
|
const n = ye(), o = he();
|
|
1283
|
-
!n || !o || (!e.showConfirmButton && !e.showDenyButton && !e.showCancelButton ? D(n) : R(n), q(n, e, "actions"),
|
|
1283
|
+
!n || !o || (!e.showConfirmButton && !e.showDenyButton && !e.showCancelButton ? D(n) : R(n), q(n, e, "actions"), Zo(n, o, e), V(o, e.loaderHtml || ""), q(o, e, "loader"));
|
|
1284
1284
|
};
|
|
1285
|
-
function
|
|
1285
|
+
function Zo(t, e, n) {
|
|
1286
1286
|
const o = K(), s = ne(), i = ue();
|
|
1287
|
-
!o || !s || !i || (We(o, "confirm", n), We(s, "deny", n), We(i, "cancel", n),
|
|
1287
|
+
!o || !s || !i || (We(o, "confirm", n), We(s, "deny", n), We(i, "cancel", n), Jo(o, s, i, n), n.reverseButtons && (n.toast ? (t.insertBefore(i, o), t.insertBefore(s, o)) : (t.insertBefore(i, e), t.insertBefore(s, e), t.insertBefore(o, e))));
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1289
|
+
function Jo(t, e, n, o) {
|
|
1290
1290
|
if (!o.buttonsStyling) {
|
|
1291
1291
|
H([t, e, n], c.styled);
|
|
1292
1292
|
return;
|
|
@@ -1310,65 +1310,65 @@ function We(t, e, n) {
|
|
|
1310
1310
|
const Xo = (t, e) => {
|
|
1311
1311
|
const n = dt();
|
|
1312
1312
|
n && (V(n, e.closeButtonHtml || ""), q(n, e, "closeButton"), ve(n, e.showCloseButton), n.setAttribute("aria-label", e.closeButtonAriaLabel || ""));
|
|
1313
|
-
},
|
|
1314
|
-
const n =
|
|
1315
|
-
n && (
|
|
1313
|
+
}, Qo = (t, e) => {
|
|
1314
|
+
const n = U();
|
|
1315
|
+
n && (es(n, e.backdrop), ts(n, e.position), ns(n, e.grow), q(n, e, "container"));
|
|
1316
1316
|
};
|
|
1317
|
-
function
|
|
1317
|
+
function es(t, e) {
|
|
1318
1318
|
typeof e == "string" ? t.style.background = e : e || T([document.documentElement, document.body], c["no-backdrop"]);
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1320
|
+
function ts(t, e) {
|
|
1321
1321
|
e && (e in c ? T(t, c[e]) : (O('The "position" parameter is not valid, defaulting to "center"'), T(t, c.center)));
|
|
1322
1322
|
}
|
|
1323
|
-
function
|
|
1323
|
+
function ns(t, e) {
|
|
1324
1324
|
e && T(t, c[`grow-${e}`]);
|
|
1325
1325
|
}
|
|
1326
1326
|
var $ = {
|
|
1327
1327
|
innerParams: /* @__PURE__ */ new WeakMap(),
|
|
1328
1328
|
domCache: /* @__PURE__ */ new WeakMap()
|
|
1329
1329
|
};
|
|
1330
|
-
const
|
|
1330
|
+
const os = ["input", "file", "range", "select", "radio", "checkbox", "textarea"], ss = (t, e) => {
|
|
1331
1331
|
const n = A();
|
|
1332
1332
|
if (!n)
|
|
1333
1333
|
return;
|
|
1334
1334
|
const o = $.innerParams.get(t), s = !o || e.input !== o.input;
|
|
1335
|
-
|
|
1335
|
+
os.forEach((i) => {
|
|
1336
1336
|
const r = W(n, c[i]);
|
|
1337
|
-
r && (
|
|
1338
|
-
}), e.input && (s &&
|
|
1339
|
-
},
|
|
1337
|
+
r && (as(i, e.inputAttributes), r.className = c[i], s && D(r));
|
|
1338
|
+
}), e.input && (s && is(e), ls(e));
|
|
1339
|
+
}, is = (t) => {
|
|
1340
1340
|
if (!t.input)
|
|
1341
1341
|
return;
|
|
1342
1342
|
if (!P[t.input]) {
|
|
1343
1343
|
te(`Unexpected type of input! Expected ${Object.keys(P).join(" | ")}, got "${t.input}"`);
|
|
1344
1344
|
return;
|
|
1345
1345
|
}
|
|
1346
|
-
const e =
|
|
1346
|
+
const e = dn(t.input);
|
|
1347
1347
|
if (!e)
|
|
1348
1348
|
return;
|
|
1349
1349
|
const n = P[t.input](e, t);
|
|
1350
1350
|
R(e), t.inputAutoFocus && setTimeout(() => {
|
|
1351
|
-
|
|
1351
|
+
an(n);
|
|
1352
1352
|
});
|
|
1353
|
-
},
|
|
1353
|
+
}, rs = (t) => {
|
|
1354
1354
|
for (let e = 0; e < t.attributes.length; e++) {
|
|
1355
1355
|
const n = t.attributes[e].name;
|
|
1356
1356
|
["id", "type", "value", "style"].includes(n) || t.removeAttribute(n);
|
|
1357
1357
|
}
|
|
1358
|
-
},
|
|
1358
|
+
}, as = (t, e) => {
|
|
1359
1359
|
const n = A();
|
|
1360
1360
|
if (!n)
|
|
1361
1361
|
return;
|
|
1362
1362
|
const o = je(n, t);
|
|
1363
1363
|
if (o) {
|
|
1364
|
-
|
|
1364
|
+
rs(o);
|
|
1365
1365
|
for (const s in e)
|
|
1366
1366
|
o.setAttribute(s, e[s]);
|
|
1367
1367
|
}
|
|
1368
|
-
},
|
|
1368
|
+
}, ls = (t) => {
|
|
1369
1369
|
if (!t.input)
|
|
1370
1370
|
return;
|
|
1371
|
-
const e =
|
|
1371
|
+
const e = dn(t.input);
|
|
1372
1372
|
e && q(e, t, "input");
|
|
1373
1373
|
}, wt = (t, e) => {
|
|
1374
1374
|
!t.placeholder && e.inputPlaceholder && (t.placeholder = e.inputPlaceholder);
|
|
@@ -1377,7 +1377,7 @@ const ns = ["input", "file", "range", "select", "radio", "checkbox", "textarea"]
|
|
|
1377
1377
|
const o = document.createElement("label"), s = c["input-label"];
|
|
1378
1378
|
o.setAttribute("for", t.id), o.className = s, typeof n.customClass == "object" && T(o, n.customClass.inputLabel), o.innerText = n.inputLabel, e.insertAdjacentElement("beforebegin", o);
|
|
1379
1379
|
}
|
|
1380
|
-
},
|
|
1380
|
+
}, dn = (t) => {
|
|
1381
1381
|
const e = A();
|
|
1382
1382
|
if (e)
|
|
1383
1383
|
return W(e, c[
|
|
@@ -1476,13 +1476,13 @@ P.textarea = (t, e) => {
|
|
|
1476
1476
|
}
|
|
1477
1477
|
}), n;
|
|
1478
1478
|
};
|
|
1479
|
-
const
|
|
1479
|
+
const cs = (t, e) => {
|
|
1480
1480
|
const n = lt();
|
|
1481
|
-
n && (ft(n), q(n, e, "htmlContainer"), e.html ? (pt(e.html, n), R(n, "block")) : e.text ? (n.textContent = e.text, R(n, "block")) : D(n),
|
|
1482
|
-
}, cs = (t, e) => {
|
|
1483
|
-
const n = sn();
|
|
1484
|
-
n && (ft(n), ve(n, !!e.footer, "block"), e.footer && pt(e.footer, n), q(n, e, "footer"));
|
|
1481
|
+
n && (ft(n), q(n, e, "htmlContainer"), e.html ? (pt(e.html, n), R(n, "block")) : e.text ? (n.textContent = e.text, R(n, "block")) : D(n), ss(t, e));
|
|
1485
1482
|
}, ds = (t, e) => {
|
|
1483
|
+
const n = rn();
|
|
1484
|
+
n && (ft(n), ve(n, !!e.footer, "block"), e.footer && pt(e.footer, n), q(n, e, "footer"));
|
|
1485
|
+
}, us = (t, e) => {
|
|
1486
1486
|
const n = $.innerParams.get(t), o = de();
|
|
1487
1487
|
if (!o)
|
|
1488
1488
|
return;
|
|
@@ -1498,25 +1498,25 @@ const ls = (t, e) => {
|
|
|
1498
1498
|
te(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`), D(o);
|
|
1499
1499
|
return;
|
|
1500
1500
|
}
|
|
1501
|
-
R(o), Mt(o, e), Bt(o, e), T(o, e.showClass && e.showClass.icon), window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",
|
|
1501
|
+
R(o), Mt(o, e), Bt(o, e), T(o, e.showClass && e.showClass.icon), window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", un);
|
|
1502
1502
|
}, Bt = (t, e) => {
|
|
1503
1503
|
for (const [n, o] of Object.entries(Le))
|
|
1504
1504
|
e.icon !== n && H(t, o);
|
|
1505
|
-
T(t, e.icon && Le[e.icon]),
|
|
1506
|
-
},
|
|
1505
|
+
T(t, e.icon && Le[e.icon]), gs(t, e), un(), q(t, e, "icon");
|
|
1506
|
+
}, un = () => {
|
|
1507
1507
|
const t = A();
|
|
1508
1508
|
if (!t)
|
|
1509
1509
|
return;
|
|
1510
1510
|
const e = window.getComputedStyle(t).getPropertyValue("background-color"), n = t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");
|
|
1511
1511
|
for (let o = 0; o < n.length; o++)
|
|
1512
1512
|
n[o].style.backgroundColor = e;
|
|
1513
|
-
},
|
|
1513
|
+
}, hs = (t) => `
|
|
1514
1514
|
${t.animation ? '<div class="swal2-success-circular-line-left"></div>' : ""}
|
|
1515
1515
|
<span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
|
|
1516
1516
|
<div class="swal2-success-ring"></div>
|
|
1517
1517
|
${t.animation ? '<div class="swal2-success-fix"></div>' : ""}
|
|
1518
1518
|
${t.animation ? '<div class="swal2-success-circular-line-right"></div>' : ""}
|
|
1519
|
-
`,
|
|
1519
|
+
`, fs = `
|
|
1520
1520
|
<span class="swal2-x-mark">
|
|
1521
1521
|
<span class="swal2-x-mark-line-left"></span>
|
|
1522
1522
|
<span class="swal2-x-mark-line-right"></span>
|
|
@@ -1525,20 +1525,20 @@ const ls = (t, e) => {
|
|
|
1525
1525
|
if (!e.icon && !e.iconHtml)
|
|
1526
1526
|
return;
|
|
1527
1527
|
let n = t.innerHTML, o = "";
|
|
1528
|
-
e.iconHtml ? o = Rt(e.iconHtml) : e.icon === "success" ? (o =
|
|
1528
|
+
e.iconHtml ? o = Rt(e.iconHtml) : e.icon === "success" ? (o = hs(e), n = n.replace(/ style=".*?"/g, "")) : e.icon === "error" ? o = fs : e.icon && (o = Rt({
|
|
1529
1529
|
question: "?",
|
|
1530
1530
|
warning: "!",
|
|
1531
1531
|
info: "i"
|
|
1532
1532
|
}[e.icon])), n.trim() !== o.trim() && V(t, o);
|
|
1533
|
-
},
|
|
1533
|
+
}, gs = (t, e) => {
|
|
1534
1534
|
if (e.iconColor) {
|
|
1535
1535
|
t.style.color = e.iconColor, t.style.borderColor = e.iconColor;
|
|
1536
1536
|
for (const n of [".swal2-success-line-tip", ".swal2-success-line-long", ".swal2-x-mark-line-left", ".swal2-x-mark-line-right"])
|
|
1537
1537
|
Nt(t, n, "background-color", e.iconColor);
|
|
1538
1538
|
Nt(t, ".swal2-success-ring", "border-color", e.iconColor);
|
|
1539
1539
|
}
|
|
1540
|
-
}, Rt = (t) => `<div class="${c["icon-content"]}">${t}</div>`,
|
|
1541
|
-
const n =
|
|
1540
|
+
}, Rt = (t) => `<div class="${c["icon-content"]}">${t}</div>`, ps = (t, e) => {
|
|
1541
|
+
const n = sn();
|
|
1542
1542
|
if (n) {
|
|
1543
1543
|
if (!e.imageUrl) {
|
|
1544
1544
|
D(n);
|
|
@@ -1547,10 +1547,10 @@ const ls = (t, e) => {
|
|
|
1547
1547
|
R(n, ""), n.setAttribute("src", e.imageUrl), n.setAttribute("alt", e.imageAlt || ""), Q(n, "width", e.imageWidth), Q(n, "height", e.imageHeight), n.className = c.image, q(n, e, "image");
|
|
1548
1548
|
}
|
|
1549
1549
|
};
|
|
1550
|
-
let mt = !1,
|
|
1551
|
-
const
|
|
1550
|
+
let mt = !1, hn = 0, fn = 0, gn = 0, pn = 0;
|
|
1551
|
+
const ws = (t) => {
|
|
1552
1552
|
t.addEventListener("mousedown", Ie), document.body.addEventListener("mousemove", Pe), t.addEventListener("mouseup", Ne), t.addEventListener("touchstart", Ie), document.body.addEventListener("touchmove", Pe), t.addEventListener("touchend", Ne);
|
|
1553
|
-
},
|
|
1553
|
+
}, ms = (t) => {
|
|
1554
1554
|
t.removeEventListener("mousedown", Ie), document.body.removeEventListener("mousemove", Pe), t.removeEventListener("mouseup", Ne), t.removeEventListener("touchstart", Ie), document.body.removeEventListener("touchmove", Pe), t.removeEventListener("touchend", Ne);
|
|
1555
1555
|
}, Ie = (t) => {
|
|
1556
1556
|
const e = A();
|
|
@@ -1562,8 +1562,8 @@ const ps = (t) => {
|
|
|
1562
1562
|
t.target
|
|
1563
1563
|
)) {
|
|
1564
1564
|
mt = !0;
|
|
1565
|
-
const o =
|
|
1566
|
-
|
|
1565
|
+
const o = wn(t);
|
|
1566
|
+
hn = o.clientX, fn = o.clientY, gn = parseInt(e.style.insetInlineStart) || 0, pn = parseInt(e.style.insetBlockStart) || 0, T(e, "swal2-dragging");
|
|
1567
1567
|
}
|
|
1568
1568
|
}, Pe = (t) => {
|
|
1569
1569
|
const e = A();
|
|
@@ -1571,14 +1571,14 @@ const ps = (t) => {
|
|
|
1571
1571
|
let {
|
|
1572
1572
|
clientX: n,
|
|
1573
1573
|
clientY: o
|
|
1574
|
-
} =
|
|
1575
|
-
const s = n -
|
|
1576
|
-
e.style.insetInlineStart = `${
|
|
1574
|
+
} = wn(t);
|
|
1575
|
+
const s = n - hn;
|
|
1576
|
+
e.style.insetInlineStart = `${gn + (p.isRTL ? -s : s)}px`, e.style.insetBlockStart = `${pn + (o - fn)}px`;
|
|
1577
1577
|
}
|
|
1578
1578
|
}, Ne = () => {
|
|
1579
1579
|
const t = A();
|
|
1580
1580
|
mt = !1, H(t, "swal2-dragging");
|
|
1581
|
-
},
|
|
1581
|
+
}, wn = (t) => {
|
|
1582
1582
|
let e = 0, n = 0;
|
|
1583
1583
|
return t.type.startsWith("mouse") ? (e = /** @type {MouseEvent} */
|
|
1584
1584
|
t.clientX, n = /** @type {MouseEvent} */
|
|
@@ -1588,8 +1588,8 @@ const ps = (t) => {
|
|
|
1588
1588
|
clientX: e,
|
|
1589
1589
|
clientY: n
|
|
1590
1590
|
};
|
|
1591
|
-
},
|
|
1592
|
-
const n =
|
|
1591
|
+
}, bs = (t, e) => {
|
|
1592
|
+
const n = U(), o = A();
|
|
1593
1593
|
if (!(!n || !o)) {
|
|
1594
1594
|
if (e.toast) {
|
|
1595
1595
|
Q(n, "width", e.width), o.style.width = "100%";
|
|
@@ -1597,12 +1597,12 @@ const ps = (t) => {
|
|
|
1597
1597
|
s && o.insertBefore(s, de());
|
|
1598
1598
|
} else
|
|
1599
1599
|
Q(o, "width", e.width);
|
|
1600
|
-
Q(o, "padding", e.padding), e.color && (o.style.color = e.color), e.background && (o.style.background = e.background), D(
|
|
1600
|
+
Q(o, "padding", e.padding), e.color && (o.style.color = e.color), e.background && (o.style.background = e.background), D(Ue()), ys(o, e), e.draggable && !e.toast ? (T(o, c.draggable), ws(o)) : (H(o, c.draggable), ms(o));
|
|
1601
1601
|
}
|
|
1602
|
-
}, bs = (t, e) => {
|
|
1603
|
-
const n = e.showClass || {};
|
|
1604
|
-
t.className = `${c.popup} ${U(t) ? n.popup : ""}`, e.toast ? (T([document.documentElement, document.body], c["toast-shown"]), T(t, c.toast)) : T(t, c.modal), q(t, e, "popup"), typeof e.customClass == "string" && T(t, e.customClass), e.icon && T(t, c[`icon-${e.icon}`]);
|
|
1605
1602
|
}, ys = (t, e) => {
|
|
1603
|
+
const n = e.showClass || {};
|
|
1604
|
+
t.className = `${c.popup} ${z(t) ? n.popup : ""}`, e.toast ? (T([document.documentElement, document.body], c["toast-shown"]), T(t, c.toast)) : T(t, c.modal), q(t, e, "popup"), typeof e.customClass == "string" && T(t, e.customClass), e.icon && T(t, c[`icon-${e.icon}`]);
|
|
1605
|
+
}, vs = (t, e) => {
|
|
1606
1606
|
const n = ct();
|
|
1607
1607
|
if (!n)
|
|
1608
1608
|
return;
|
|
@@ -1615,33 +1615,33 @@ const ps = (t) => {
|
|
|
1615
1615
|
return;
|
|
1616
1616
|
}
|
|
1617
1617
|
R(n), n.textContent = "", s >= o.length && O("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"), o.forEach((i, r) => {
|
|
1618
|
-
const l =
|
|
1618
|
+
const l = Cs(i);
|
|
1619
1619
|
if (n.appendChild(l), r === s && T(l, c["active-progress-step"]), r !== o.length - 1) {
|
|
1620
|
-
const a =
|
|
1620
|
+
const a = _s(e);
|
|
1621
1621
|
n.appendChild(a);
|
|
1622
1622
|
}
|
|
1623
1623
|
});
|
|
1624
|
-
},
|
|
1624
|
+
}, Cs = (t) => {
|
|
1625
1625
|
const e = document.createElement("li");
|
|
1626
1626
|
return T(e, c["progress-step"]), V(e, t), e;
|
|
1627
|
-
},
|
|
1627
|
+
}, _s = (t) => {
|
|
1628
1628
|
const e = document.createElement("li");
|
|
1629
1629
|
return T(e, c["progress-step-line"]), t.progressStepsDistance && Q(e, "width", t.progressStepsDistance), e;
|
|
1630
|
-
},
|
|
1631
|
-
const n =
|
|
1630
|
+
}, ks = (t, e) => {
|
|
1631
|
+
const n = on();
|
|
1632
1632
|
n && (ft(n), ve(n, !!(e.title || e.titleText), "block"), e.title && pt(e.title, n), e.titleText && (n.innerText = e.titleText), q(n, e, "title"));
|
|
1633
|
-
},
|
|
1633
|
+
}, mn = (t, e) => {
|
|
1634
1634
|
var n;
|
|
1635
|
-
|
|
1635
|
+
bs(t, e), Qo(t, e), vs(t, e), us(t, e), ps(t, e), ks(t, e), Xo(t, e), cs(t, e), Yo(t, e), ds(t, e);
|
|
1636
1636
|
const o = A();
|
|
1637
1637
|
typeof e.didRender == "function" && o && e.didRender(o), (n = p.eventEmitter) === null || n === void 0 || n.emit("didRender", o);
|
|
1638
|
-
},
|
|
1638
|
+
}, xs = () => z(A()), bn = () => {
|
|
1639
1639
|
var t;
|
|
1640
1640
|
return (t = K()) === null || t === void 0 ? void 0 : t.click();
|
|
1641
|
-
},
|
|
1641
|
+
}, Es = () => {
|
|
1642
1642
|
var t;
|
|
1643
1643
|
return (t = ne()) === null || t === void 0 ? void 0 : t.click();
|
|
1644
|
-
},
|
|
1644
|
+
}, Ts = () => {
|
|
1645
1645
|
var t;
|
|
1646
1646
|
return (t = ue()) === null || t === void 0 ? void 0 : t.click();
|
|
1647
1647
|
}, fe = Object.freeze({
|
|
@@ -1650,7 +1650,7 @@ const ps = (t) => {
|
|
|
1650
1650
|
close: "close",
|
|
1651
1651
|
esc: "esc",
|
|
1652
1652
|
timer: "timer"
|
|
1653
|
-
}),
|
|
1653
|
+
}), yn = (t) => {
|
|
1654
1654
|
if (t.keydownTarget && t.keydownHandlerAdded && t.keydownHandler) {
|
|
1655
1655
|
const e = (
|
|
1656
1656
|
/** @type {EventListenerOrEventListenerObject} */
|
|
@@ -1661,9 +1661,9 @@ const ps = (t) => {
|
|
|
1661
1661
|
capture: t.keydownListenerCapture
|
|
1662
1662
|
}), t.keydownHandlerAdded = !1;
|
|
1663
1663
|
}
|
|
1664
|
-
},
|
|
1665
|
-
if (
|
|
1666
|
-
const o = (i) =>
|
|
1664
|
+
}, As = (t, e, n) => {
|
|
1665
|
+
if (yn(t), !e.toast) {
|
|
1666
|
+
const o = (i) => Ls(e, i, n);
|
|
1667
1667
|
t.keydownHandler = o;
|
|
1668
1668
|
const s = e.keydownListenerCapture ? window : A();
|
|
1669
1669
|
if (s) {
|
|
@@ -1686,9 +1686,9 @@ const ps = (t) => {
|
|
|
1686
1686
|
return;
|
|
1687
1687
|
}
|
|
1688
1688
|
(n = A()) === null || n === void 0 || n.focus();
|
|
1689
|
-
},
|
|
1690
|
-
t && (e.isComposing || e.keyCode === 229 || (t.stopKeydownPropagation && e.stopPropagation(), e.key === "Enter" ?
|
|
1691
|
-
},
|
|
1689
|
+
}, vn = ["ArrowRight", "ArrowDown"], Ss = ["ArrowLeft", "ArrowUp"], Ls = (t, e, n) => {
|
|
1690
|
+
t && (e.isComposing || e.keyCode === 229 || (t.stopKeydownPropagation && e.stopPropagation(), e.key === "Enter" ? $s(e, t) : e.key === "Tab" ? Is(e) : [...vn, ...Ss].includes(e.key) ? Ps(e.key) : e.key === "Escape" && Ns(e, t, n)));
|
|
1691
|
+
}, $s = (t, e) => {
|
|
1692
1692
|
if (!Oe(e.allowEnterKey))
|
|
1693
1693
|
return;
|
|
1694
1694
|
const n = A();
|
|
@@ -1698,9 +1698,9 @@ const ps = (t) => {
|
|
|
1698
1698
|
if (t.target && o && t.target instanceof HTMLElement && t.target.outerHTML === o.outerHTML) {
|
|
1699
1699
|
if (["textarea", "file"].includes(e.input))
|
|
1700
1700
|
return;
|
|
1701
|
-
|
|
1701
|
+
bn(), t.preventDefault();
|
|
1702
1702
|
}
|
|
1703
|
-
},
|
|
1703
|
+
}, Is = (t) => {
|
|
1704
1704
|
const e = t.target, n = ut();
|
|
1705
1705
|
let o = -1;
|
|
1706
1706
|
for (let s = 0; s < n.length; s++)
|
|
@@ -1709,92 +1709,92 @@ const ps = (t) => {
|
|
|
1709
1709
|
break;
|
|
1710
1710
|
}
|
|
1711
1711
|
t.shiftKey ? et(o, -1) : et(o, 1), t.stopPropagation(), t.preventDefault();
|
|
1712
|
-
},
|
|
1712
|
+
}, Ps = (t) => {
|
|
1713
1713
|
const e = ye(), n = K(), o = ne(), s = ue();
|
|
1714
1714
|
if (!e || !n || !o || !s)
|
|
1715
1715
|
return;
|
|
1716
1716
|
const i = [n, o, s];
|
|
1717
1717
|
if (document.activeElement instanceof HTMLElement && !i.includes(document.activeElement))
|
|
1718
1718
|
return;
|
|
1719
|
-
const r =
|
|
1719
|
+
const r = vn.includes(t) ? "nextElementSibling" : "previousElementSibling";
|
|
1720
1720
|
let l = document.activeElement;
|
|
1721
1721
|
if (l) {
|
|
1722
1722
|
for (let a = 0; a < e.children.length; a++) {
|
|
1723
1723
|
if (l = l[r], !l)
|
|
1724
1724
|
return;
|
|
1725
|
-
if (l instanceof HTMLButtonElement &&
|
|
1725
|
+
if (l instanceof HTMLButtonElement && z(l))
|
|
1726
1726
|
break;
|
|
1727
1727
|
}
|
|
1728
1728
|
l instanceof HTMLButtonElement && l.focus();
|
|
1729
1729
|
}
|
|
1730
|
-
},
|
|
1730
|
+
}, Ns = (t, e, n) => {
|
|
1731
1731
|
t.preventDefault(), Oe(e.allowEscapeKey) && n(fe.esc);
|
|
1732
1732
|
};
|
|
1733
1733
|
var ae = {
|
|
1734
1734
|
swalPromiseResolve: /* @__PURE__ */ new WeakMap(),
|
|
1735
1735
|
swalPromiseReject: /* @__PURE__ */ new WeakMap()
|
|
1736
1736
|
};
|
|
1737
|
-
const
|
|
1738
|
-
const t =
|
|
1737
|
+
const Bs = () => {
|
|
1738
|
+
const t = U();
|
|
1739
1739
|
Array.from(document.body.children).forEach((n) => {
|
|
1740
1740
|
n.contains(t) || (n.hasAttribute("aria-hidden") && n.setAttribute("data-previous-aria-hidden", n.getAttribute("aria-hidden") || ""), n.setAttribute("aria-hidden", "true"));
|
|
1741
1741
|
});
|
|
1742
|
-
},
|
|
1742
|
+
}, Cn = () => {
|
|
1743
1743
|
Array.from(document.body.children).forEach((e) => {
|
|
1744
1744
|
e.hasAttribute("data-previous-aria-hidden") ? (e.setAttribute("aria-hidden", e.getAttribute("data-previous-aria-hidden") || ""), e.removeAttribute("data-previous-aria-hidden")) : e.removeAttribute("aria-hidden");
|
|
1745
1745
|
});
|
|
1746
|
-
},
|
|
1747
|
-
if (
|
|
1746
|
+
}, _n = typeof window < "u" && !!window.GestureEvent, Ms = () => {
|
|
1747
|
+
if (_n && !G(document.body, c.iosfix)) {
|
|
1748
1748
|
const t = document.body.scrollTop;
|
|
1749
|
-
document.body.style.top = `${t * -1}px`, T(document.body, c.iosfix),
|
|
1749
|
+
document.body.style.top = `${t * -1}px`, T(document.body, c.iosfix), Rs();
|
|
1750
1750
|
}
|
|
1751
|
-
},
|
|
1752
|
-
const t =
|
|
1751
|
+
}, Rs = () => {
|
|
1752
|
+
const t = U();
|
|
1753
1753
|
if (!t)
|
|
1754
1754
|
return;
|
|
1755
1755
|
let e;
|
|
1756
1756
|
t.ontouchstart = (n) => {
|
|
1757
|
-
e =
|
|
1757
|
+
e = Ds(n);
|
|
1758
1758
|
}, t.ontouchmove = (n) => {
|
|
1759
1759
|
e && (n.preventDefault(), n.stopPropagation());
|
|
1760
1760
|
};
|
|
1761
|
-
},
|
|
1762
|
-
const e = t.target, n =
|
|
1763
|
-
return !n || !o ||
|
|
1761
|
+
}, Ds = (t) => {
|
|
1762
|
+
const e = t.target, n = U(), o = lt();
|
|
1763
|
+
return !n || !o || Os(t) || Us(t) ? !1 : e === n || !Qe(n) && e instanceof HTMLElement && !Do(e, o) && // #2823
|
|
1764
1764
|
e.tagName !== "INPUT" && // #1603
|
|
1765
1765
|
e.tagName !== "TEXTAREA" && // #2266
|
|
1766
1766
|
!(Qe(o) && // #1944
|
|
1767
1767
|
o.contains(e));
|
|
1768
|
-
},
|
|
1769
|
-
t.touches[0].touchType === "stylus"),
|
|
1768
|
+
}, Os = (t) => !!(t.touches && t.touches.length && // @ts-ignore - touchType is not a standard property
|
|
1769
|
+
t.touches[0].touchType === "stylus"), Us = (t) => t.touches && t.touches.length > 1, zs = () => {
|
|
1770
1770
|
if (G(document.body, c.iosfix)) {
|
|
1771
1771
|
const t = parseInt(document.body.style.top, 10);
|
|
1772
1772
|
H(document.body, c.iosfix), document.body.style.top = "", document.body.scrollTop = t * -1;
|
|
1773
1773
|
}
|
|
1774
|
-
},
|
|
1774
|
+
}, qs = () => {
|
|
1775
1775
|
const t = document.createElement("div");
|
|
1776
1776
|
t.className = c["scrollbar-measure"], document.body.appendChild(t);
|
|
1777
1777
|
const e = t.getBoundingClientRect().width - t.clientWidth;
|
|
1778
1778
|
return document.body.removeChild(t), e;
|
|
1779
1779
|
};
|
|
1780
1780
|
let re = null;
|
|
1781
|
-
const
|
|
1782
|
-
re === null && (document.body.scrollHeight > window.innerHeight || t === "scroll") && (re = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = `${re +
|
|
1783
|
-
},
|
|
1781
|
+
const js = (t) => {
|
|
1782
|
+
re === null && (document.body.scrollHeight > window.innerHeight || t === "scroll") && (re = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = `${re + qs()}px`);
|
|
1783
|
+
}, Vs = () => {
|
|
1784
1784
|
re !== null && (document.body.style.paddingRight = `${re}px`, re = null);
|
|
1785
1785
|
};
|
|
1786
|
-
function
|
|
1787
|
-
qe() ? Dt(t, o) : (
|
|
1786
|
+
function kn(t, e, n, o) {
|
|
1787
|
+
qe() ? Dt(t, o) : (Ao(n).then(() => Dt(t, o)), yn(p)), _n ? (e.setAttribute("style", "display:none !important"), e.removeAttribute("class"), e.innerHTML = "") : e.remove(), ht() && (Vs(), zs(), Cn()), Hs();
|
|
1788
1788
|
}
|
|
1789
|
-
function
|
|
1789
|
+
function Hs() {
|
|
1790
1790
|
H([document.documentElement, document.body], [c.shown, c["height-auto"], c["no-backdrop"], c["toast-shown"]]);
|
|
1791
1791
|
}
|
|
1792
1792
|
function Y(t) {
|
|
1793
|
-
t =
|
|
1794
|
-
const e = ae.swalPromiseResolve.get(this), n =
|
|
1793
|
+
t = Ks(t);
|
|
1794
|
+
const e = ae.swalPromiseResolve.get(this), n = Fs(this);
|
|
1795
1795
|
this.isAwaitingPromise ? t.isDismissed || (_e(this), e(t)) : n && e(t);
|
|
1796
1796
|
}
|
|
1797
|
-
const
|
|
1797
|
+
const Fs = (t) => {
|
|
1798
1798
|
const e = A();
|
|
1799
1799
|
if (!e)
|
|
1800
1800
|
return !1;
|
|
@@ -1802,16 +1802,16 @@ const Hs = (t) => {
|
|
|
1802
1802
|
if (!n || G(e, n.hideClass.popup))
|
|
1803
1803
|
return !1;
|
|
1804
1804
|
H(e, n.showClass.popup), T(e, n.hideClass.popup);
|
|
1805
|
-
const o =
|
|
1806
|
-
return H(o, n.showClass.backdrop), T(o, n.hideClass.backdrop),
|
|
1805
|
+
const o = U();
|
|
1806
|
+
return H(o, n.showClass.backdrop), T(o, n.hideClass.backdrop), Gs(t, e, n), !0;
|
|
1807
1807
|
};
|
|
1808
|
-
function
|
|
1808
|
+
function xn(t) {
|
|
1809
1809
|
const e = ae.swalPromiseReject.get(this);
|
|
1810
1810
|
_e(this), e && e(t);
|
|
1811
1811
|
}
|
|
1812
1812
|
const _e = (t) => {
|
|
1813
1813
|
t.isAwaitingPromise && (delete t.isAwaitingPromise, $.innerParams.get(t) || t._destroy());
|
|
1814
|
-
},
|
|
1814
|
+
}, Ks = (t) => typeof t > "u" ? {
|
|
1815
1815
|
isConfirmed: !1,
|
|
1816
1816
|
isDenied: !1,
|
|
1817
1817
|
isDismissed: !0
|
|
@@ -1819,12 +1819,12 @@ const _e = (t) => {
|
|
|
1819
1819
|
isConfirmed: !1,
|
|
1820
1820
|
isDenied: !1,
|
|
1821
1821
|
isDismissed: !1
|
|
1822
|
-
}, t),
|
|
1822
|
+
}, t), Gs = (t, e, n) => {
|
|
1823
1823
|
var o;
|
|
1824
|
-
const s =
|
|
1825
|
-
typeof n.willClose == "function" && n.willClose(e), (o = p.eventEmitter) === null || o === void 0 || o.emit("willClose", e), i && s ?
|
|
1826
|
-
},
|
|
1827
|
-
p.swalCloseEventFinishedCallback =
|
|
1824
|
+
const s = U(), i = cn(e);
|
|
1825
|
+
typeof n.willClose == "function" && n.willClose(e), (o = p.eventEmitter) === null || o === void 0 || o.emit("willClose", e), i && s ? Ws(t, e, s, !!n.returnFocus, n.didClose) : s && kn(t, s, !!n.returnFocus, n.didClose);
|
|
1826
|
+
}, Ws = (t, e, n, o, s) => {
|
|
1827
|
+
p.swalCloseEventFinishedCallback = kn.bind(null, t, n, o, s);
|
|
1828
1828
|
const i = function(r) {
|
|
1829
1829
|
if (r.target === e) {
|
|
1830
1830
|
var l;
|
|
@@ -1842,13 +1842,13 @@ const _e = (t) => {
|
|
|
1842
1842
|
if (e || new M(), e = A(), !e)
|
|
1843
1843
|
return;
|
|
1844
1844
|
const n = he();
|
|
1845
|
-
qe() ? D(de()) :
|
|
1846
|
-
}, Ws = (t, e) => {
|
|
1847
|
-
const n = ye(), o = he();
|
|
1848
|
-
!n || !o || (!e && U(K()) && (e = K()), R(n), e && (D(e), o.setAttribute("data-button-to-replace", e.className), n.insertBefore(o, e)), T([t, n], c.loading));
|
|
1845
|
+
qe() ? D(de()) : Ys(e, t), R(n), e.setAttribute("data-loading", "true"), e.setAttribute("aria-busy", "true"), e.focus();
|
|
1849
1846
|
}, Ys = (t, e) => {
|
|
1850
|
-
|
|
1847
|
+
const n = ye(), o = he();
|
|
1848
|
+
!n || !o || (!e && z(K()) && (e = K()), R(n), e && (D(e), o.setAttribute("data-button-to-replace", e.className), n.insertBefore(o, e)), T([t, n], c.loading));
|
|
1851
1849
|
}, Zs = (t, e) => {
|
|
1850
|
+
e.input === "select" || e.input === "radio" ? ti(t, e) : ["text", "email", "number", "tel", "textarea"].some((n) => n === e.input) && (rt(e.inputValue) || at(e.inputValue)) && (le(K()), ni(t, e));
|
|
1851
|
+
}, Js = (t, e) => {
|
|
1852
1852
|
const n = t.getInput();
|
|
1853
1853
|
if (!n)
|
|
1854
1854
|
return null;
|
|
@@ -1856,23 +1856,23 @@ const _e = (t) => {
|
|
|
1856
1856
|
case "checkbox":
|
|
1857
1857
|
return Xs(n);
|
|
1858
1858
|
case "radio":
|
|
1859
|
-
return Js(n);
|
|
1860
|
-
case "file":
|
|
1861
1859
|
return Qs(n);
|
|
1860
|
+
case "file":
|
|
1861
|
+
return ei(n);
|
|
1862
1862
|
default:
|
|
1863
1863
|
return e.inputAutoTrim ? n.value.trim() : n.value;
|
|
1864
1864
|
}
|
|
1865
|
-
}, Xs = (t) => t.checked ? 1 : 0,
|
|
1865
|
+
}, Xs = (t) => t.checked ? 1 : 0, Qs = (t) => t.checked ? t.value : null, ei = (t) => t.files && t.files.length ? t.getAttribute("multiple") !== null ? t.files : t.files[0] : null, ti = (t, e) => {
|
|
1866
1866
|
const n = A();
|
|
1867
1867
|
if (!n)
|
|
1868
1868
|
return;
|
|
1869
1869
|
const o = (s) => {
|
|
1870
|
-
e.input === "select" ?
|
|
1870
|
+
e.input === "select" ? oi(n, Be(s), e) : e.input === "radio" && si(n, Be(s), e);
|
|
1871
1871
|
};
|
|
1872
1872
|
rt(e.inputOptions) || at(e.inputOptions) ? (le(K()), me(e.inputOptions).then((s) => {
|
|
1873
1873
|
t.hideLoading(), o(s);
|
|
1874
1874
|
})) : typeof e.inputOptions == "object" ? o(e.inputOptions) : te(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`);
|
|
1875
|
-
},
|
|
1875
|
+
}, ni = (t, e) => {
|
|
1876
1876
|
const n = t.getInput();
|
|
1877
1877
|
n && (D(n), me(e.inputValue).then((o) => {
|
|
1878
1878
|
n.value = e.input === "number" ? `${parseFloat(o) || 0}` : `${o}`, R(n), n.focus(), t.hideLoading();
|
|
@@ -1880,13 +1880,13 @@ const _e = (t) => {
|
|
|
1880
1880
|
te(`Error in inputValue promise: ${o}`), n.value = "", R(n), n.focus(), t.hideLoading();
|
|
1881
1881
|
}));
|
|
1882
1882
|
};
|
|
1883
|
-
function
|
|
1883
|
+
function oi(t, e, n) {
|
|
1884
1884
|
const o = W(t, c.select);
|
|
1885
1885
|
if (!o)
|
|
1886
1886
|
return;
|
|
1887
1887
|
const s = (i, r, l) => {
|
|
1888
1888
|
const a = document.createElement("option");
|
|
1889
|
-
a.value = l, V(a, r), a.selected =
|
|
1889
|
+
a.value = l, V(a, r), a.selected = En(l, n.inputValue), i.appendChild(a);
|
|
1890
1890
|
};
|
|
1891
1891
|
e.forEach((i) => {
|
|
1892
1892
|
const r = i[0], l = i[1];
|
|
@@ -1897,13 +1897,13 @@ function ni(t, e, n) {
|
|
|
1897
1897
|
s(o, l, r);
|
|
1898
1898
|
}), o.focus();
|
|
1899
1899
|
}
|
|
1900
|
-
function
|
|
1900
|
+
function si(t, e, n) {
|
|
1901
1901
|
const o = W(t, c.radio);
|
|
1902
1902
|
if (!o)
|
|
1903
1903
|
return;
|
|
1904
1904
|
e.forEach((i) => {
|
|
1905
1905
|
const r = i[0], l = i[1], a = document.createElement("input"), d = document.createElement("label");
|
|
1906
|
-
a.type = "radio", a.name = c.radio, a.value = r,
|
|
1906
|
+
a.type = "radio", a.name = c.radio, a.value = r, En(r, n.inputValue) && (a.checked = !0);
|
|
1907
1907
|
const g = document.createElement("span");
|
|
1908
1908
|
V(g, l), g.className = c.label, d.appendChild(a), d.appendChild(g), o.appendChild(d);
|
|
1909
1909
|
});
|
|
@@ -1919,23 +1919,23 @@ const Be = (t) => {
|
|
|
1919
1919
|
let o = t[n];
|
|
1920
1920
|
typeof o == "object" && (o = Be(o)), e.push([n, o]);
|
|
1921
1921
|
}), e;
|
|
1922
|
-
},
|
|
1922
|
+
}, En = (t, e) => !!e && e !== null && e !== void 0 && e.toString() === t.toString(), ii = (t) => {
|
|
1923
1923
|
const e = $.innerParams.get(t);
|
|
1924
|
-
t.disableButtons(), e.input ?
|
|
1925
|
-
},
|
|
1924
|
+
t.disableButtons(), e.input ? Tn(t, "confirm") : yt(t, !0);
|
|
1925
|
+
}, ri = (t) => {
|
|
1926
1926
|
const e = $.innerParams.get(t);
|
|
1927
|
-
t.disableButtons(), e.returnInputValueOnDeny ?
|
|
1928
|
-
},
|
|
1927
|
+
t.disableButtons(), e.returnInputValueOnDeny ? Tn(t, "deny") : bt(t, !1);
|
|
1928
|
+
}, ai = (t, e) => {
|
|
1929
1929
|
t.disableButtons(), e(fe.cancel);
|
|
1930
|
-
},
|
|
1930
|
+
}, Tn = (t, e) => {
|
|
1931
1931
|
const n = $.innerParams.get(t);
|
|
1932
1932
|
if (!n.input) {
|
|
1933
1933
|
te(`The "input" parameter is needed to be set when using returnInputValueOn${it(e)}`);
|
|
1934
1934
|
return;
|
|
1935
1935
|
}
|
|
1936
|
-
const o = t.getInput(), s =
|
|
1937
|
-
n.inputValidator ?
|
|
1938
|
-
},
|
|
1936
|
+
const o = t.getInput(), s = Js(t, n);
|
|
1937
|
+
n.inputValidator ? li(t, s, e) : o && !o.checkValidity() ? (t.enableButtons(), t.showValidationMessage(n.validationMessage || o.validationMessage)) : e === "deny" ? bt(t, s) : yt(t, s);
|
|
1938
|
+
}, li = (t, e, n) => {
|
|
1939
1939
|
const o = $.innerParams.get(t);
|
|
1940
1940
|
t.disableInput(), Promise.resolve().then(() => me(o.inputValidator(e, o.validationMessage))).then((i) => {
|
|
1941
1941
|
t.enableButtons(), t.enableInput(), i ? t.showValidationMessage(i) : n === "deny" ? bt(t, e) : yt(t, e);
|
|
@@ -1950,7 +1950,7 @@ const Be = (t) => {
|
|
|
1950
1950
|
value: typeof s > "u" ? e : s
|
|
1951
1951
|
}
|
|
1952
1952
|
);
|
|
1953
|
-
}).catch((s) =>
|
|
1953
|
+
}).catch((s) => An(t, s))) : t.close(
|
|
1954
1954
|
/** @type SweetAlertResult */
|
|
1955
1955
|
{
|
|
1956
1956
|
isDenied: !0,
|
|
@@ -1965,40 +1965,40 @@ const Be = (t) => {
|
|
|
1965
1965
|
value: e
|
|
1966
1966
|
}
|
|
1967
1967
|
);
|
|
1968
|
-
},
|
|
1968
|
+
}, An = (t, e) => {
|
|
1969
1969
|
t.rejectPromise(e);
|
|
1970
1970
|
}, yt = (t, e) => {
|
|
1971
1971
|
const n = $.innerParams.get(t);
|
|
1972
1972
|
n.showLoaderOnConfirm && le(), n.preConfirm ? (t.resetValidationMessage(), t.isAwaitingPromise = !0, Promise.resolve().then(() => me(n.preConfirm(e, n.validationMessage))).then((s) => {
|
|
1973
|
-
|
|
1974
|
-
}).catch((s) =>
|
|
1973
|
+
z(Ue()) || s === !1 ? (t.hideLoading(), _e(t)) : Ot(t, typeof s > "u" ? e : s);
|
|
1974
|
+
}).catch((s) => An(t, s))) : Ot(t, e);
|
|
1975
1975
|
};
|
|
1976
1976
|
function Me() {
|
|
1977
1977
|
const t = $.innerParams.get(this);
|
|
1978
1978
|
if (!t)
|
|
1979
1979
|
return;
|
|
1980
1980
|
const e = $.domCache.get(this);
|
|
1981
|
-
D(e.loader), qe() ? t.icon && R(de()) :
|
|
1981
|
+
D(e.loader), qe() ? t.icon && R(de()) : ci(e), H([e.popup, e.actions], c.loading), e.popup.removeAttribute("aria-busy"), e.popup.removeAttribute("data-loading"), e.confirmButton.disabled = !1, e.denyButton.disabled = !1, e.cancelButton.disabled = !1;
|
|
1982
1982
|
}
|
|
1983
|
-
const
|
|
1983
|
+
const ci = (t) => {
|
|
1984
1984
|
const e = t.loader.getAttribute("data-button-to-replace"), n = e ? t.popup.getElementsByClassName(e) : [];
|
|
1985
1985
|
n.length ? R(
|
|
1986
1986
|
/** @type {HTMLElement} */
|
|
1987
1987
|
n[0],
|
|
1988
1988
|
"inline-block"
|
|
1989
|
-
) :
|
|
1989
|
+
) : Ro() && D(t.actions);
|
|
1990
1990
|
};
|
|
1991
|
-
function
|
|
1991
|
+
function Sn() {
|
|
1992
1992
|
const t = $.innerParams.get(this), e = $.domCache.get(this);
|
|
1993
1993
|
return e ? je(e.popup, t.input) : null;
|
|
1994
1994
|
}
|
|
1995
|
-
function
|
|
1995
|
+
function Ln(t, e, n) {
|
|
1996
1996
|
const o = $.domCache.get(t);
|
|
1997
1997
|
e.forEach((s) => {
|
|
1998
1998
|
o[s].disabled = n;
|
|
1999
1999
|
});
|
|
2000
2000
|
}
|
|
2001
|
-
function
|
|
2001
|
+
function $n(t, e) {
|
|
2002
2002
|
const n = A();
|
|
2003
2003
|
if (!(!n || !t))
|
|
2004
2004
|
if (t.type === "radio") {
|
|
@@ -2008,25 +2008,25 @@ function Ln(t, e) {
|
|
|
2008
2008
|
} else
|
|
2009
2009
|
t.disabled = e;
|
|
2010
2010
|
}
|
|
2011
|
-
function $n() {
|
|
2012
|
-
Sn(this, ["confirmButton", "denyButton", "cancelButton"], !1);
|
|
2013
|
-
}
|
|
2014
2011
|
function In() {
|
|
2015
|
-
|
|
2012
|
+
Ln(this, ["confirmButton", "denyButton", "cancelButton"], !1);
|
|
2016
2013
|
}
|
|
2017
2014
|
function Pn() {
|
|
2018
|
-
Ln(this
|
|
2015
|
+
Ln(this, ["confirmButton", "denyButton", "cancelButton"], !0);
|
|
2019
2016
|
}
|
|
2020
2017
|
function Nn() {
|
|
2021
|
-
|
|
2018
|
+
$n(this.getInput(), !1);
|
|
2019
|
+
}
|
|
2020
|
+
function Bn() {
|
|
2021
|
+
$n(this.getInput(), !0);
|
|
2022
2022
|
}
|
|
2023
|
-
function
|
|
2023
|
+
function Mn(t) {
|
|
2024
2024
|
const e = $.domCache.get(this), n = $.innerParams.get(this);
|
|
2025
2025
|
V(e.validationMessage, t), e.validationMessage.className = c["validation-message"], n.customClass && n.customClass.validationMessage && T(e.validationMessage, n.customClass.validationMessage), R(e.validationMessage);
|
|
2026
2026
|
const o = this.getInput();
|
|
2027
|
-
o && (o.setAttribute("aria-invalid", "true"), o.setAttribute("aria-describedby", c["validation-message"]),
|
|
2027
|
+
o && (o.setAttribute("aria-invalid", "true"), o.setAttribute("aria-describedby", c["validation-message"]), an(o), T(o, c.inputerror));
|
|
2028
2028
|
}
|
|
2029
|
-
function
|
|
2029
|
+
function Rn() {
|
|
2030
2030
|
const t = $.domCache.get(this);
|
|
2031
2031
|
t.validationMessage && D(t.validationMessage);
|
|
2032
2032
|
const e = this.getInput();
|
|
@@ -2125,28 +2125,28 @@ const Z = {
|
|
|
2125
2125
|
didDestroy: void 0,
|
|
2126
2126
|
scrollbarPadding: !0,
|
|
2127
2127
|
topLayer: !1
|
|
2128
|
-
},
|
|
2128
|
+
}, di = ["allowEscapeKey", "allowOutsideClick", "background", "buttonsStyling", "cancelButtonAriaLabel", "cancelButtonColor", "cancelButtonText", "closeButtonAriaLabel", "closeButtonHtml", "color", "confirmButtonAriaLabel", "confirmButtonColor", "confirmButtonText", "currentProgressStep", "customClass", "denyButtonAriaLabel", "denyButtonColor", "denyButtonText", "didClose", "didDestroy", "draggable", "footer", "hideClass", "html", "icon", "iconColor", "iconHtml", "imageAlt", "imageHeight", "imageUrl", "imageWidth", "preConfirm", "preDeny", "progressSteps", "returnFocus", "reverseButtons", "showCancelButton", "showCloseButton", "showConfirmButton", "showDenyButton", "text", "title", "titleText", "theme", "willClose"], ui = {
|
|
2129
2129
|
allowEnterKey: void 0
|
|
2130
|
-
},
|
|
2131
|
-
|
|
2132
|
-
}, fi = (t) => {
|
|
2133
|
-
ui.includes(t) && O(`The parameter "${t}" is incompatible with toasts`);
|
|
2130
|
+
}, hi = ["allowOutsideClick", "allowEnterKey", "backdrop", "draggable", "focusConfirm", "focusDeny", "focusCancel", "returnFocus", "heightAuto", "keydownListenerCapture"], Dn = (t) => Object.prototype.hasOwnProperty.call(Z, t), On = (t) => di.indexOf(t) !== -1, Un = (t) => ui[t], fi = (t) => {
|
|
2131
|
+
Dn(t) || O(`Unknown parameter "${t}"`);
|
|
2134
2132
|
}, gi = (t) => {
|
|
2135
|
-
|
|
2136
|
-
|
|
2133
|
+
hi.includes(t) && O(`The parameter "${t}" is incompatible with toasts`);
|
|
2134
|
+
}, pi = (t) => {
|
|
2135
|
+
const e = Un(t);
|
|
2136
|
+
e && nn(t, e);
|
|
2137
2137
|
}, zn = (t) => {
|
|
2138
2138
|
t.backdrop === !1 && t.allowOutsideClick && O('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'), t.theme && !["light", "dark", "auto", "minimal", "borderless", "bootstrap-4", "bootstrap-4-light", "bootstrap-4-dark", "bootstrap-5", "bootstrap-5-light", "bootstrap-5-dark", "material-ui", "material-ui-light", "material-ui-dark", "embed-iframe", "bulma", "bulma-light", "bulma-dark"].includes(t.theme) && O(`Invalid theme "${t.theme}"`);
|
|
2139
2139
|
for (const e in t)
|
|
2140
|
-
|
|
2140
|
+
fi(e), t.toast && gi(e), pi(e);
|
|
2141
2141
|
};
|
|
2142
|
-
function
|
|
2143
|
-
const e =
|
|
2142
|
+
function qn(t) {
|
|
2143
|
+
const e = U(), n = A(), o = $.innerParams.get(this);
|
|
2144
2144
|
if (!n || G(n, o.hideClass.popup)) {
|
|
2145
2145
|
O("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");
|
|
2146
2146
|
return;
|
|
2147
2147
|
}
|
|
2148
|
-
const s =
|
|
2149
|
-
zn(i), e && (e.dataset.swal2Theme = i.theme),
|
|
2148
|
+
const s = wi(t), i = Object.assign({}, o, s);
|
|
2149
|
+
zn(i), e && (e.dataset.swal2Theme = i.theme), mn(this, i), $.innerParams.set(this, i), Object.defineProperties(this, {
|
|
2150
2150
|
params: {
|
|
2151
2151
|
value: Object.assign({}, this.params, t),
|
|
2152
2152
|
writable: !1,
|
|
@@ -2154,10 +2154,10 @@ function Un(t) {
|
|
|
2154
2154
|
}
|
|
2155
2155
|
});
|
|
2156
2156
|
}
|
|
2157
|
-
const
|
|
2157
|
+
const wi = (t) => {
|
|
2158
2158
|
const e = {};
|
|
2159
2159
|
return Object.keys(t).forEach((n) => {
|
|
2160
|
-
if (
|
|
2160
|
+
if (On(n)) {
|
|
2161
2161
|
const o = (
|
|
2162
2162
|
/** @type {Record<string, any>} */
|
|
2163
2163
|
t
|
|
@@ -2167,66 +2167,66 @@ const pi = (t) => {
|
|
|
2167
2167
|
O(`Invalid parameter to update: ${n}`);
|
|
2168
2168
|
}), e;
|
|
2169
2169
|
};
|
|
2170
|
-
function
|
|
2170
|
+
function jn() {
|
|
2171
2171
|
var t;
|
|
2172
2172
|
const e = $.domCache.get(this), n = $.innerParams.get(this);
|
|
2173
2173
|
if (!n) {
|
|
2174
|
-
|
|
2174
|
+
Vn(this);
|
|
2175
2175
|
return;
|
|
2176
2176
|
}
|
|
2177
|
-
e.popup && p.swalCloseEventFinishedCallback && (p.swalCloseEventFinishedCallback(), delete p.swalCloseEventFinishedCallback), typeof n.didDestroy == "function" && n.didDestroy(), (t = p.eventEmitter) === null || t === void 0 || t.emit("didDestroy"),
|
|
2177
|
+
e.popup && p.swalCloseEventFinishedCallback && (p.swalCloseEventFinishedCallback(), delete p.swalCloseEventFinishedCallback), typeof n.didDestroy == "function" && n.didDestroy(), (t = p.eventEmitter) === null || t === void 0 || t.emit("didDestroy"), mi(this);
|
|
2178
2178
|
}
|
|
2179
|
-
const
|
|
2180
|
-
|
|
2181
|
-
},
|
|
2179
|
+
const mi = (t) => {
|
|
2180
|
+
Vn(t), delete t.params, delete p.keydownHandler, delete p.keydownTarget, delete p.currentInstance;
|
|
2181
|
+
}, Vn = (t) => {
|
|
2182
2182
|
t.isAwaitingPromise ? (Ye($, t), t.isAwaitingPromise = !0) : (Ye(ae, t), Ye($, t), delete t.isAwaitingPromise, delete t.disableButtons, delete t.enableButtons, delete t.getInput, delete t.disableInput, delete t.enableInput, delete t.hideLoading, delete t.disableLoading, delete t.showValidationMessage, delete t.resetValidationMessage, delete t.close, delete t.closePopup, delete t.closeModal, delete t.closeToast, delete t.rejectPromise, delete t.update, delete t._destroy);
|
|
2183
2183
|
}, Ye = (t, e) => {
|
|
2184
2184
|
for (const n in t)
|
|
2185
2185
|
t[n].delete(e);
|
|
2186
2186
|
};
|
|
2187
|
-
var
|
|
2187
|
+
var bi = /* @__PURE__ */ Object.freeze({
|
|
2188
2188
|
__proto__: null,
|
|
2189
|
-
_destroy:
|
|
2189
|
+
_destroy: jn,
|
|
2190
2190
|
close: Y,
|
|
2191
2191
|
closeModal: Y,
|
|
2192
2192
|
closePopup: Y,
|
|
2193
2193
|
closeToast: Y,
|
|
2194
|
-
disableButtons:
|
|
2195
|
-
disableInput:
|
|
2194
|
+
disableButtons: Pn,
|
|
2195
|
+
disableInput: Bn,
|
|
2196
2196
|
disableLoading: Me,
|
|
2197
|
-
enableButtons:
|
|
2198
|
-
enableInput:
|
|
2199
|
-
getInput:
|
|
2197
|
+
enableButtons: In,
|
|
2198
|
+
enableInput: Nn,
|
|
2199
|
+
getInput: Sn,
|
|
2200
2200
|
handleAwaitingPromise: _e,
|
|
2201
2201
|
hideLoading: Me,
|
|
2202
|
-
rejectPromise:
|
|
2203
|
-
resetValidationMessage:
|
|
2204
|
-
showValidationMessage:
|
|
2205
|
-
update:
|
|
2202
|
+
rejectPromise: xn,
|
|
2203
|
+
resetValidationMessage: Rn,
|
|
2204
|
+
showValidationMessage: Mn,
|
|
2205
|
+
update: qn
|
|
2206
2206
|
});
|
|
2207
|
-
const
|
|
2208
|
-
t.toast ?
|
|
2209
|
-
},
|
|
2207
|
+
const yi = (t, e, n) => {
|
|
2208
|
+
t.toast ? vi(t, e, n) : (_i(e), ki(e), xi(t, e, n));
|
|
2209
|
+
}, vi = (t, e, n) => {
|
|
2210
2210
|
e.popup.onclick = () => {
|
|
2211
|
-
t && (
|
|
2211
|
+
t && (Ci(t) || t.timer || t.input) || n(fe.close);
|
|
2212
2212
|
};
|
|
2213
|
-
},
|
|
2213
|
+
}, Ci = (t) => !!(t.showConfirmButton || t.showDenyButton || t.showCancelButton || t.showCloseButton);
|
|
2214
2214
|
let Re = !1;
|
|
2215
|
-
const
|
|
2215
|
+
const _i = (t) => {
|
|
2216
2216
|
t.popup.onmousedown = () => {
|
|
2217
2217
|
t.container.onmouseup = function(e) {
|
|
2218
2218
|
t.container.onmouseup = () => {
|
|
2219
2219
|
}, e.target === t.container && (Re = !0);
|
|
2220
2220
|
};
|
|
2221
2221
|
};
|
|
2222
|
-
},
|
|
2222
|
+
}, ki = (t) => {
|
|
2223
2223
|
t.container.onmousedown = (e) => {
|
|
2224
2224
|
e.target === t.container && e.preventDefault(), t.popup.onmouseup = function(n) {
|
|
2225
2225
|
t.popup.onmouseup = () => {
|
|
2226
2226
|
}, (n.target === t.popup || n.target instanceof HTMLElement && t.popup.contains(n.target)) && (Re = !0);
|
|
2227
2227
|
};
|
|
2228
2228
|
};
|
|
2229
|
-
},
|
|
2229
|
+
}, xi = (t, e, n) => {
|
|
2230
2230
|
e.container.onclick = (o) => {
|
|
2231
2231
|
if (Re) {
|
|
2232
2232
|
Re = !1;
|
|
@@ -2234,18 +2234,18 @@ const Ci = (t) => {
|
|
|
2234
2234
|
}
|
|
2235
2235
|
o.target === e.container && Oe(t.allowOutsideClick) && n(fe.backdrop);
|
|
2236
2236
|
};
|
|
2237
|
-
},
|
|
2237
|
+
}, Ei = (t) => typeof t == "object" && t !== null && "jquery" in t, Ut = (t) => t instanceof Element || Ei(t), Ti = (t) => {
|
|
2238
2238
|
const e = {};
|
|
2239
|
-
return typeof t[0] == "object" && !
|
|
2239
|
+
return typeof t[0] == "object" && !Ut(t[0]) ? Object.assign(e, t[0]) : ["title", "html", "icon"].forEach((n, o) => {
|
|
2240
2240
|
const s = t[o];
|
|
2241
|
-
typeof s == "string" ||
|
|
2241
|
+
typeof s == "string" || Ut(s) ? e[n] = s : s !== void 0 && te(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof s}`);
|
|
2242
2242
|
}), /** @type {SweetAlertOptions} */
|
|
2243
2243
|
e;
|
|
2244
2244
|
};
|
|
2245
|
-
function
|
|
2245
|
+
function Ai(...t) {
|
|
2246
2246
|
return new this(...t);
|
|
2247
2247
|
}
|
|
2248
|
-
function
|
|
2248
|
+
function Si(t) {
|
|
2249
2249
|
class e extends this {
|
|
2250
2250
|
/**
|
|
2251
2251
|
* @param {any} params
|
|
@@ -2257,29 +2257,29 @@ function Ai(t) {
|
|
|
2257
2257
|
}
|
|
2258
2258
|
return e;
|
|
2259
2259
|
}
|
|
2260
|
-
const
|
|
2260
|
+
const Li = () => p.timeout && p.timeout.getTimerLeft(), Hn = () => {
|
|
2261
2261
|
if (p.timeout)
|
|
2262
|
-
return
|
|
2263
|
-
},
|
|
2262
|
+
return Oo(), p.timeout.stop();
|
|
2263
|
+
}, Fn = () => {
|
|
2264
2264
|
if (p.timeout) {
|
|
2265
2265
|
const t = p.timeout.start();
|
|
2266
2266
|
return gt(t), t;
|
|
2267
2267
|
}
|
|
2268
|
-
},
|
|
2268
|
+
}, $i = () => {
|
|
2269
2269
|
const t = p.timeout;
|
|
2270
|
-
return t && (t.running ?
|
|
2271
|
-
},
|
|
2270
|
+
return t && (t.running ? Hn() : Fn());
|
|
2271
|
+
}, Ii = (t) => {
|
|
2272
2272
|
if (p.timeout) {
|
|
2273
2273
|
const e = p.timeout.increase(t);
|
|
2274
2274
|
return gt(e, !0), e;
|
|
2275
2275
|
}
|
|
2276
|
-
},
|
|
2277
|
-
let
|
|
2276
|
+
}, Pi = () => !!(p.timeout && p.timeout.isRunning());
|
|
2277
|
+
let zt = !1;
|
|
2278
2278
|
const tt = {};
|
|
2279
|
-
function
|
|
2280
|
-
tt[t] = this,
|
|
2279
|
+
function Ni(t = "data-swal-template") {
|
|
2280
|
+
tt[t] = this, zt || (document.body.addEventListener("click", Bi), zt = !0);
|
|
2281
2281
|
}
|
|
2282
|
-
const
|
|
2282
|
+
const Bi = (t) => {
|
|
2283
2283
|
for (let e = (
|
|
2284
2284
|
/** @type {any} */
|
|
2285
2285
|
t.target
|
|
@@ -2294,7 +2294,7 @@ const Ni = (t) => {
|
|
|
2294
2294
|
}
|
|
2295
2295
|
}
|
|
2296
2296
|
};
|
|
2297
|
-
class
|
|
2297
|
+
class Mi {
|
|
2298
2298
|
constructor() {
|
|
2299
2299
|
this.events = {};
|
|
2300
2300
|
}
|
|
@@ -2359,12 +2359,12 @@ class Bi {
|
|
|
2359
2359
|
this.events = {};
|
|
2360
2360
|
}
|
|
2361
2361
|
}
|
|
2362
|
-
p.eventEmitter = new
|
|
2363
|
-
const
|
|
2362
|
+
p.eventEmitter = new Mi();
|
|
2363
|
+
const Ri = (t, e) => {
|
|
2364
2364
|
p.eventEmitter && p.eventEmitter.on(t, e);
|
|
2365
|
-
}, Ri = (t, e) => {
|
|
2366
|
-
p.eventEmitter && p.eventEmitter.once(t, e);
|
|
2367
2365
|
}, Di = (t, e) => {
|
|
2366
|
+
p.eventEmitter && p.eventEmitter.once(t, e);
|
|
2367
|
+
}, Oi = (t, e) => {
|
|
2368
2368
|
if (p.eventEmitter) {
|
|
2369
2369
|
if (!t) {
|
|
2370
2370
|
p.eventEmitter.reset();
|
|
@@ -2373,50 +2373,50 @@ const Mi = (t, e) => {
|
|
|
2373
2373
|
e ? p.eventEmitter.removeListener(t, e) : p.eventEmitter.removeAllListeners(t);
|
|
2374
2374
|
}
|
|
2375
2375
|
};
|
|
2376
|
-
var
|
|
2376
|
+
var Ui = /* @__PURE__ */ Object.freeze({
|
|
2377
2377
|
__proto__: null,
|
|
2378
|
-
argsToParams:
|
|
2379
|
-
bindClickHandler:
|
|
2380
|
-
clickCancel:
|
|
2381
|
-
clickConfirm:
|
|
2382
|
-
clickDeny:
|
|
2378
|
+
argsToParams: Ti,
|
|
2379
|
+
bindClickHandler: Ni,
|
|
2380
|
+
clickCancel: Ts,
|
|
2381
|
+
clickConfirm: bn,
|
|
2382
|
+
clickDeny: Es,
|
|
2383
2383
|
enableLoading: le,
|
|
2384
|
-
fire:
|
|
2384
|
+
fire: Ai,
|
|
2385
2385
|
getActions: ye,
|
|
2386
2386
|
getCancelButton: ue,
|
|
2387
2387
|
getCloseButton: dt,
|
|
2388
2388
|
getConfirmButton: K,
|
|
2389
|
-
getContainer:
|
|
2389
|
+
getContainer: U,
|
|
2390
2390
|
getDenyButton: ne,
|
|
2391
2391
|
getFocusableElements: ut,
|
|
2392
|
-
getFooter:
|
|
2392
|
+
getFooter: rn,
|
|
2393
2393
|
getHtmlContainer: lt,
|
|
2394
2394
|
getIcon: de,
|
|
2395
|
-
getIconContent:
|
|
2396
|
-
getImage:
|
|
2397
|
-
getInputLabel:
|
|
2395
|
+
getIconContent: Io,
|
|
2396
|
+
getImage: sn,
|
|
2397
|
+
getInputLabel: Po,
|
|
2398
2398
|
getLoader: he,
|
|
2399
2399
|
getPopup: A,
|
|
2400
2400
|
getProgressSteps: ct,
|
|
2401
|
-
getTimerLeft:
|
|
2402
|
-
getTimerProgressBar:
|
|
2403
|
-
getTitle:
|
|
2404
|
-
getValidationMessage:
|
|
2405
|
-
increaseTimer:
|
|
2406
|
-
isDeprecatedParameter:
|
|
2407
|
-
isLoading:
|
|
2408
|
-
isTimerRunning:
|
|
2409
|
-
isUpdatableParameter:
|
|
2410
|
-
isValidParameter:
|
|
2411
|
-
isVisible:
|
|
2412
|
-
mixin:
|
|
2413
|
-
off:
|
|
2414
|
-
on:
|
|
2415
|
-
once:
|
|
2416
|
-
resumeTimer:
|
|
2401
|
+
getTimerLeft: Li,
|
|
2402
|
+
getTimerProgressBar: ze,
|
|
2403
|
+
getTitle: on,
|
|
2404
|
+
getValidationMessage: Ue,
|
|
2405
|
+
increaseTimer: Ii,
|
|
2406
|
+
isDeprecatedParameter: Un,
|
|
2407
|
+
isLoading: Bo,
|
|
2408
|
+
isTimerRunning: Pi,
|
|
2409
|
+
isUpdatableParameter: On,
|
|
2410
|
+
isValidParameter: Dn,
|
|
2411
|
+
isVisible: xs,
|
|
2412
|
+
mixin: Si,
|
|
2413
|
+
off: Oi,
|
|
2414
|
+
on: Ri,
|
|
2415
|
+
once: Di,
|
|
2416
|
+
resumeTimer: Fn,
|
|
2417
2417
|
showLoading: le,
|
|
2418
|
-
stopTimer:
|
|
2419
|
-
toggleTimer:
|
|
2418
|
+
stopTimer: Hn,
|
|
2419
|
+
toggleTimer: $i
|
|
2420
2420
|
});
|
|
2421
2421
|
class zi {
|
|
2422
2422
|
/**
|
|
@@ -2459,7 +2459,7 @@ class zi {
|
|
|
2459
2459
|
return this.running;
|
|
2460
2460
|
}
|
|
2461
2461
|
}
|
|
2462
|
-
const
|
|
2462
|
+
const Kn = ["swal-title", "swal-html", "swal-footer"], qi = (t) => {
|
|
2463
2463
|
const e = typeof t.template == "string" ? (
|
|
2464
2464
|
/** @type {HTMLTemplateElement} */
|
|
2465
2465
|
document.querySelector(t.template)
|
|
@@ -2467,8 +2467,8 @@ const Fn = ["swal-title", "swal-html", "swal-footer"], Ui = (t) => {
|
|
|
2467
2467
|
if (!e)
|
|
2468
2468
|
return {};
|
|
2469
2469
|
const n = e.content;
|
|
2470
|
-
return
|
|
2471
|
-
},
|
|
2470
|
+
return Yi(n), Object.assign(ji(n), Vi(n), Hi(n), Fi(n), Ki(n), Gi(n), Wi(n, Kn));
|
|
2471
|
+
}, ji = (t) => {
|
|
2472
2472
|
const e = {};
|
|
2473
2473
|
return Array.from(t.querySelectorAll("swal-param")).forEach((o) => {
|
|
2474
2474
|
ee(o, ["name", "value"]);
|
|
@@ -2484,7 +2484,7 @@ const Fn = ["swal-title", "swal-html", "swal-footer"], Ui = (t) => {
|
|
|
2484
2484
|
s
|
|
2485
2485
|
] == "object" ? e[s] = JSON.parse(i) : e[s] = i);
|
|
2486
2486
|
}), e;
|
|
2487
|
-
},
|
|
2487
|
+
}, Vi = (t) => {
|
|
2488
2488
|
const e = {};
|
|
2489
2489
|
return Array.from(t.querySelectorAll("swal-function-param")).forEach((o) => {
|
|
2490
2490
|
const s = (
|
|
@@ -2493,7 +2493,7 @@ const Fn = ["swal-title", "swal-html", "swal-footer"], Ui = (t) => {
|
|
|
2493
2493
|
), i = o.getAttribute("value");
|
|
2494
2494
|
!s || !i || (e[s] = new Function(`return ${i}`)());
|
|
2495
2495
|
}), e;
|
|
2496
|
-
},
|
|
2496
|
+
}, Hi = (t) => {
|
|
2497
2497
|
const e = {};
|
|
2498
2498
|
return Array.from(t.querySelectorAll("swal-button")).forEach((o) => {
|
|
2499
2499
|
ee(o, ["type", "color", "aria-label"]);
|
|
@@ -2509,13 +2509,13 @@ const Fn = ["swal-title", "swal-html", "swal-footer"], Ui = (t) => {
|
|
|
2509
2509
|
}
|
|
2510
2510
|
}
|
|
2511
2511
|
}), e;
|
|
2512
|
-
},
|
|
2512
|
+
}, Fi = (t) => {
|
|
2513
2513
|
const e = {}, n = t.querySelector("swal-image");
|
|
2514
2514
|
return n && (ee(n, ["src", "width", "height", "alt"]), n.hasAttribute("src") && (e.imageUrl = n.getAttribute("src") || void 0), n.hasAttribute("width") && (e.imageWidth = n.getAttribute("width") || void 0), n.hasAttribute("height") && (e.imageHeight = n.getAttribute("height") || void 0), n.hasAttribute("alt") && (e.imageAlt = n.getAttribute("alt") || void 0)), e;
|
|
2515
|
-
},
|
|
2515
|
+
}, Ki = (t) => {
|
|
2516
2516
|
const e = {}, n = t.querySelector("swal-icon");
|
|
2517
2517
|
return n && (ee(n, ["type", "color"]), n.hasAttribute("type") && (e.icon = n.getAttribute("type")), n.hasAttribute("color") && (e.iconColor = n.getAttribute("color")), e.iconHtml = n.innerHTML), e;
|
|
2518
|
-
},
|
|
2518
|
+
}, Gi = (t) => {
|
|
2519
2519
|
const e = {}, n = t.querySelector("swal-input");
|
|
2520
2520
|
n && (ee(n, ["type", "label", "placeholder", "value"]), e.input = n.getAttribute("type") || "text", n.hasAttribute("label") && (e.inputLabel = n.getAttribute("label")), n.hasAttribute("placeholder") && (e.inputPlaceholder = n.getAttribute("placeholder")), n.hasAttribute("value") && (e.inputValue = n.getAttribute("value")));
|
|
2521
2521
|
const o = Array.from(t.querySelectorAll("swal-input-option"));
|
|
@@ -2527,15 +2527,15 @@ const Fn = ["swal-title", "swal-html", "swal-footer"], Ui = (t) => {
|
|
|
2527
2527
|
const r = s.innerHTML;
|
|
2528
2528
|
e.inputOptions[i] = r;
|
|
2529
2529
|
})), e;
|
|
2530
|
-
},
|
|
2530
|
+
}, Wi = (t, e) => {
|
|
2531
2531
|
const n = {};
|
|
2532
2532
|
for (const o in e) {
|
|
2533
2533
|
const s = e[o], i = t.querySelector(s);
|
|
2534
2534
|
i && (ee(i, []), n[s.replace(/^swal-/, "")] = i.innerHTML.trim());
|
|
2535
2535
|
}
|
|
2536
2536
|
return n;
|
|
2537
|
-
},
|
|
2538
|
-
const e =
|
|
2537
|
+
}, Yi = (t) => {
|
|
2538
|
+
const e = Kn.concat(["swal-param", "swal-function-param", "swal-button", "swal-image", "swal-icon", "swal-input", "swal-input-option"]);
|
|
2539
2539
|
Array.from(t.children).forEach((n) => {
|
|
2540
2540
|
const o = n.tagName.toLowerCase();
|
|
2541
2541
|
e.includes(o) || O(`Unrecognized element <${o}>`);
|
|
@@ -2544,16 +2544,16 @@ const Fn = ["swal-title", "swal-html", "swal-footer"], Ui = (t) => {
|
|
|
2544
2544
|
Array.from(t.attributes).forEach((n) => {
|
|
2545
2545
|
e.indexOf(n.name) === -1 && O([`Unrecognized attribute "${n.name}" on <${t.tagName.toLowerCase()}>.`, `${e.length ? `Allowed attributes are: ${e.join(", ")}` : "To set the value, use HTML within the element."}`]);
|
|
2546
2546
|
});
|
|
2547
|
-
},
|
|
2547
|
+
}, Gn = 10, Zi = (t) => {
|
|
2548
2548
|
var e, n;
|
|
2549
|
-
const o =
|
|
2549
|
+
const o = U(), s = A();
|
|
2550
2550
|
if (!o || !s)
|
|
2551
2551
|
return;
|
|
2552
2552
|
typeof t.willOpen == "function" && t.willOpen(s), (e = p.eventEmitter) === null || e === void 0 || e.emit("willOpen", s);
|
|
2553
2553
|
const r = window.getComputedStyle(document.body).overflowY;
|
|
2554
|
-
if (
|
|
2555
|
-
|
|
2556
|
-
},
|
|
2554
|
+
if (Qi(o, s, t), setTimeout(() => {
|
|
2555
|
+
Ji(o, s);
|
|
2556
|
+
}, Gn), ht() && (Xi(o, t.scrollbarPadding !== void 0 ? t.scrollbarPadding : !1, r), Bs()), !qe() && !p.previousActiveElement && (p.previousActiveElement = document.activeElement), typeof t.didOpen == "function") {
|
|
2557
2557
|
const l = t.didOpen;
|
|
2558
2558
|
setTimeout(() => l(s));
|
|
2559
2559
|
}
|
|
@@ -2562,20 +2562,20 @@ const Fn = ["swal-title", "swal-html", "swal-footer"], Ui = (t) => {
|
|
|
2562
2562
|
const e = A();
|
|
2563
2563
|
if (!e || t.target !== e)
|
|
2564
2564
|
return;
|
|
2565
|
-
const n =
|
|
2565
|
+
const n = U();
|
|
2566
2566
|
n && (e.removeEventListener("animationend", De), e.removeEventListener("transitionend", De), n.style.overflowY = "auto", H(n, c["no-transition"]));
|
|
2567
|
-
},
|
|
2568
|
-
|
|
2567
|
+
}, Ji = (t, e) => {
|
|
2568
|
+
cn(e) ? (t.style.overflowY = "hidden", e.addEventListener("animationend", De), e.addEventListener("transitionend", De)) : t.style.overflowY = "auto";
|
|
2569
2569
|
}, Xi = (t, e, n) => {
|
|
2570
|
-
|
|
2570
|
+
Ms(), e && n !== "hidden" && js(n), setTimeout(() => {
|
|
2571
2571
|
t.scrollTop = 0;
|
|
2572
2572
|
});
|
|
2573
|
-
},
|
|
2573
|
+
}, Qi = (t, e, n) => {
|
|
2574
2574
|
var o;
|
|
2575
2575
|
(o = n.showClass) !== null && o !== void 0 && o.backdrop && T(t, n.showClass.backdrop), n.animation ? (e.style.setProperty("opacity", "0", "important"), R(e, "grid"), setTimeout(() => {
|
|
2576
2576
|
var s;
|
|
2577
2577
|
(s = n.showClass) !== null && s !== void 0 && s.popup && T(e, n.showClass.popup), e.style.removeProperty("opacity");
|
|
2578
|
-
},
|
|
2578
|
+
}, Gn)) : R(e, "grid"), T([document.documentElement, document.body], c.shown), n.heightAuto && n.backdrop && !n.toast && T([document.documentElement, document.body], c["height-auto"]);
|
|
2579
2579
|
};
|
|
2580
2580
|
var qt = {
|
|
2581
2581
|
/**
|
|
@@ -2591,17 +2591,17 @@ var qt = {
|
|
|
2591
2591
|
*/
|
|
2592
2592
|
url: (t, e) => /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t) ? Promise.resolve() : Promise.resolve(e || "Invalid URL")
|
|
2593
2593
|
};
|
|
2594
|
-
function
|
|
2594
|
+
function er(t) {
|
|
2595
2595
|
t.inputValidator || (t.input === "email" && (t.inputValidator = qt.email), t.input === "url" && (t.inputValidator = qt.url));
|
|
2596
2596
|
}
|
|
2597
|
-
function
|
|
2597
|
+
function tr(t) {
|
|
2598
2598
|
(!t.target || typeof t.target == "string" && !document.querySelector(t.target) || typeof t.target != "string" && !t.target.appendChild) && (O('Target parameter is not valid, defaulting to "body"'), t.target = "body");
|
|
2599
2599
|
}
|
|
2600
|
-
function
|
|
2601
|
-
|
|
2600
|
+
function nr(t) {
|
|
2601
|
+
er(t), t.showLoaderOnConfirm && !t.preConfirm && O(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
|
|
2602
2602
|
showLoaderOnConfirm should be used together with preConfirm, see usage example:
|
|
2603
|
-
https://sweetalert2.github.io/#ajax-request`),
|
|
2604
|
-
`).join("<br />")),
|
|
2603
|
+
https://sweetalert2.github.io/#ajax-request`), tr(t), typeof t.title == "string" && (t.title = t.title.split(`
|
|
2604
|
+
`).join("<br />")), Ko(t);
|
|
2605
2605
|
}
|
|
2606
2606
|
let F;
|
|
2607
2607
|
var Ae = /* @__PURE__ */ new WeakMap();
|
|
@@ -2611,7 +2611,7 @@ class N {
|
|
|
2611
2611
|
* @this {SweetAlert}
|
|
2612
2612
|
*/
|
|
2613
2613
|
constructor(...e) {
|
|
2614
|
-
if (
|
|
2614
|
+
if (ko(
|
|
2615
2615
|
this,
|
|
2616
2616
|
Ae,
|
|
2617
2617
|
/** @type {Promise<SweetAlertResult>} */
|
|
@@ -2624,7 +2624,7 @@ class N {
|
|
|
2624
2624
|
return;
|
|
2625
2625
|
F = this;
|
|
2626
2626
|
const n = Object.freeze(this.constructor.argsToParams(e));
|
|
2627
|
-
this.params = n, this.isAwaitingPromise = !1,
|
|
2627
|
+
this.params = n, this.isAwaitingPromise = !1, xo(Ae, this, this._main(F.params));
|
|
2628
2628
|
}
|
|
2629
2629
|
/**
|
|
2630
2630
|
* @param {any} userParams
|
|
@@ -2637,13 +2637,13 @@ class N {
|
|
|
2637
2637
|
} = p.currentInstance;
|
|
2638
2638
|
p.currentInstance._destroy(), r || i({
|
|
2639
2639
|
isDismissed: !0
|
|
2640
|
-
}), ht() &&
|
|
2640
|
+
}), ht() && Cn();
|
|
2641
2641
|
}
|
|
2642
2642
|
p.currentInstance = F;
|
|
2643
|
-
const o =
|
|
2644
|
-
|
|
2645
|
-
const s =
|
|
2646
|
-
return
|
|
2643
|
+
const o = sr(e, n);
|
|
2644
|
+
nr(o), Object.freeze(o), p.timeout && (p.timeout.stop(), delete p.timeout), clearTimeout(p.restoreFocusTimeout);
|
|
2645
|
+
const s = ir(F);
|
|
2646
|
+
return mn(F, o), $.innerParams.set(F, o), or(F, s, o);
|
|
2647
2647
|
}
|
|
2648
2648
|
// `catch` cannot be the name of a module export, so we define our thenable methods here instead
|
|
2649
2649
|
/**
|
|
@@ -2659,7 +2659,7 @@ class N {
|
|
|
2659
2659
|
return It(Ae, this).finally(e);
|
|
2660
2660
|
}
|
|
2661
2661
|
}
|
|
2662
|
-
const
|
|
2662
|
+
const or = (t, e, n) => new Promise((o, s) => {
|
|
2663
2663
|
const i = (r) => {
|
|
2664
2664
|
t.close({
|
|
2665
2665
|
isDismissed: !0,
|
|
@@ -2669,22 +2669,22 @@ const nr = (t, e, n) => new Promise((o, s) => {
|
|
|
2669
2669
|
});
|
|
2670
2670
|
};
|
|
2671
2671
|
ae.swalPromiseResolve.set(t, o), ae.swalPromiseReject.set(t, s), e.confirmButton.onclick = () => {
|
|
2672
|
-
si(t);
|
|
2673
|
-
}, e.denyButton.onclick = () => {
|
|
2674
2672
|
ii(t);
|
|
2673
|
+
}, e.denyButton.onclick = () => {
|
|
2674
|
+
ri(t);
|
|
2675
2675
|
}, e.cancelButton.onclick = () => {
|
|
2676
|
-
|
|
2676
|
+
ai(t, i);
|
|
2677
2677
|
}, e.closeButton.onclick = () => {
|
|
2678
2678
|
i(fe.close);
|
|
2679
|
-
},
|
|
2679
|
+
}, yi(n, e, i), As(p, n, i), Zs(t, n), Zi(n), rr(p, n, i), ar(e, n), setTimeout(() => {
|
|
2680
2680
|
e.container.scrollTop = 0;
|
|
2681
2681
|
});
|
|
2682
|
-
}),
|
|
2683
|
-
const n =
|
|
2682
|
+
}), sr = (t, e) => {
|
|
2683
|
+
const n = qi(t), o = Object.assign({}, Z, e, n, t);
|
|
2684
2684
|
return o.showClass = Object.assign({}, Z.showClass, o.showClass), o.hideClass = Object.assign({}, Z.hideClass, o.hideClass), o.animation === !1 && (o.showClass = {
|
|
2685
2685
|
backdrop: "swal2-noanimation"
|
|
2686
2686
|
}, o.hideClass = {}), o;
|
|
2687
|
-
},
|
|
2687
|
+
}, ir = (t) => {
|
|
2688
2688
|
const e = (
|
|
2689
2689
|
/** @type {DomCache} */
|
|
2690
2690
|
{
|
|
@@ -2694,7 +2694,7 @@ const nr = (t, e, n) => new Promise((o, s) => {
|
|
|
2694
2694
|
),
|
|
2695
2695
|
container: (
|
|
2696
2696
|
/** @type {HTMLElement} */
|
|
2697
|
-
|
|
2697
|
+
U()
|
|
2698
2698
|
),
|
|
2699
2699
|
actions: (
|
|
2700
2700
|
/** @type {HTMLElement} */
|
|
@@ -2722,7 +2722,7 @@ const nr = (t, e, n) => new Promise((o, s) => {
|
|
|
2722
2722
|
),
|
|
2723
2723
|
validationMessage: (
|
|
2724
2724
|
/** @type {HTMLElement} */
|
|
2725
|
-
|
|
2725
|
+
Ue()
|
|
2726
2726
|
),
|
|
2727
2727
|
progressSteps: (
|
|
2728
2728
|
/** @type {HTMLElement} */
|
|
@@ -2731,8 +2731,8 @@ const nr = (t, e, n) => new Promise((o, s) => {
|
|
|
2731
2731
|
}
|
|
2732
2732
|
);
|
|
2733
2733
|
return $.domCache.set(t, e), e;
|
|
2734
|
-
},
|
|
2735
|
-
const o =
|
|
2734
|
+
}, rr = (t, e, n) => {
|
|
2735
|
+
const o = ze();
|
|
2736
2736
|
D(o), e.timer && (t.timeout = new zi(() => {
|
|
2737
2737
|
n("timer"), delete t.timeout;
|
|
2738
2738
|
}, e.timer), e.timerProgressBar && o && (R(o), q(o, e, "timerProgressBar"), setTimeout(() => {
|
|
@@ -2741,41 +2741,41 @@ const nr = (t, e, n) => new Promise((o, s) => {
|
|
|
2741
2741
|
e.timer
|
|
2742
2742
|
);
|
|
2743
2743
|
})));
|
|
2744
|
-
},
|
|
2744
|
+
}, ar = (t, e) => {
|
|
2745
2745
|
if (!e.toast) {
|
|
2746
2746
|
if (!Oe(e.allowEnterKey)) {
|
|
2747
|
-
|
|
2747
|
+
nn("allowEnterKey"), dr();
|
|
2748
2748
|
return;
|
|
2749
2749
|
}
|
|
2750
|
-
|
|
2750
|
+
lr(t) || cr(t, e) || et(-1, 1);
|
|
2751
2751
|
}
|
|
2752
|
-
},
|
|
2752
|
+
}, lr = (t) => {
|
|
2753
2753
|
const e = Array.from(t.popup.querySelectorAll("[autofocus]"));
|
|
2754
2754
|
for (const n of e)
|
|
2755
|
-
if (n instanceof HTMLElement &&
|
|
2755
|
+
if (n instanceof HTMLElement && z(n))
|
|
2756
2756
|
return n.focus(), !0;
|
|
2757
2757
|
return !1;
|
|
2758
|
-
},
|
|
2758
|
+
}, cr = (t, e) => e.focusDeny && z(t.denyButton) ? (t.denyButton.focus(), !0) : e.focusCancel && z(t.cancelButton) ? (t.cancelButton.focus(), !0) : e.focusConfirm && z(t.confirmButton) ? (t.confirmButton.focus(), !0) : !1, dr = () => {
|
|
2759
2759
|
document.activeElement instanceof HTMLElement && typeof document.activeElement.blur == "function" && document.activeElement.blur();
|
|
2760
2760
|
};
|
|
2761
|
-
N.prototype.disableButtons =
|
|
2762
|
-
N.prototype.enableButtons =
|
|
2763
|
-
N.prototype.getInput =
|
|
2764
|
-
N.prototype.disableInput =
|
|
2765
|
-
N.prototype.enableInput =
|
|
2761
|
+
N.prototype.disableButtons = Pn;
|
|
2762
|
+
N.prototype.enableButtons = In;
|
|
2763
|
+
N.prototype.getInput = Sn;
|
|
2764
|
+
N.prototype.disableInput = Bn;
|
|
2765
|
+
N.prototype.enableInput = Nn;
|
|
2766
2766
|
N.prototype.hideLoading = Me;
|
|
2767
2767
|
N.prototype.disableLoading = Me;
|
|
2768
|
-
N.prototype.showValidationMessage =
|
|
2769
|
-
N.prototype.resetValidationMessage =
|
|
2768
|
+
N.prototype.showValidationMessage = Mn;
|
|
2769
|
+
N.prototype.resetValidationMessage = Rn;
|
|
2770
2770
|
N.prototype.close = Y;
|
|
2771
2771
|
N.prototype.closePopup = Y;
|
|
2772
2772
|
N.prototype.closeModal = Y;
|
|
2773
2773
|
N.prototype.closeToast = Y;
|
|
2774
|
-
N.prototype.rejectPromise =
|
|
2775
|
-
N.prototype.update =
|
|
2776
|
-
N.prototype._destroy =
|
|
2777
|
-
Object.assign(N,
|
|
2778
|
-
Object.keys(
|
|
2774
|
+
N.prototype.rejectPromise = xn;
|
|
2775
|
+
N.prototype.update = qn;
|
|
2776
|
+
N.prototype._destroy = jn;
|
|
2777
|
+
Object.assign(N, Ui);
|
|
2778
|
+
Object.keys(bi).forEach((t) => {
|
|
2779
2779
|
N[t] = function(...e) {
|
|
2780
2780
|
if (F && F[t])
|
|
2781
2781
|
return F[t](...e);
|
|
@@ -2795,7 +2795,7 @@ typeof document < "u" && (function(t, e) {
|
|
|
2795
2795
|
}
|
|
2796
2796
|
})(document, ':root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-icon-animations: true;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem;container-name:swal2-popup}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:all}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}@container swal2-popup style(--swal2-icon-animations:true){.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}');
|
|
2797
2797
|
st.create();
|
|
2798
|
-
class
|
|
2798
|
+
class ur {
|
|
2799
2799
|
constructor() {
|
|
2800
2800
|
this.isActive = !1, this.baseUrl = "", this.appCode = "", this.token = "", this.getRequestToken = null, this.currentLocale = "zh-CN", this.languages = [], this.wrappedElements = /* @__PURE__ */ new Set(), this.clickHandler = this.handleElementClick.bind(this);
|
|
2801
2801
|
}
|
|
@@ -2804,7 +2804,7 @@ class dr {
|
|
|
2804
2804
|
*/
|
|
2805
2805
|
async initConfig() {
|
|
2806
2806
|
const e = E.get("I18N_CONFIG") || {}, n = e.env || "local";
|
|
2807
|
-
this.baseUrl =
|
|
2807
|
+
this.baseUrl = Gt({ env: n }), console.log("baseUrl:", this.baseUrl), this.appCode = e.appCode || "", this.unitCode = e.unitCode || "GREENCLOUD", this.token = e.token || (E.get("I18N_CONFIG") || {}).token || "", this.getRequestToken = globalThis.__GC_I18N_GET_REQUEST_TOKEN__ || null, this.currentLocale = e.locale || E.get("I18N_LANGUAGE") || "zh-CN", await this.loadLanguages();
|
|
2808
2808
|
}
|
|
2809
2809
|
/**
|
|
2810
2810
|
* 加载语言列表
|
|
@@ -2820,7 +2820,7 @@ class dr {
|
|
|
2820
2820
|
return;
|
|
2821
2821
|
}
|
|
2822
2822
|
try {
|
|
2823
|
-
const n = await
|
|
2823
|
+
const n = await Yt({
|
|
2824
2824
|
baseUrl: this.baseUrl,
|
|
2825
2825
|
appCode: this.appCode,
|
|
2826
2826
|
token: this.token,
|
|
@@ -3082,7 +3082,7 @@ class dr {
|
|
|
3082
3082
|
if (!this.appCode)
|
|
3083
3083
|
return [];
|
|
3084
3084
|
try {
|
|
3085
|
-
const o = (E.get("I18N_CONFIG") || {}).routerName || "", s = await
|
|
3085
|
+
const o = (E.get("I18N_CONFIG") || {}).routerName || "", s = await Zt({
|
|
3086
3086
|
baseUrl: this.baseUrl,
|
|
3087
3087
|
data: {
|
|
3088
3088
|
appCode: this.appCode,
|
|
@@ -3124,7 +3124,7 @@ class dr {
|
|
|
3124
3124
|
const s = this.getChangedTranslationData(e, n, o);
|
|
3125
3125
|
if (b.isEmpty(s))
|
|
3126
3126
|
return !0;
|
|
3127
|
-
const i = await
|
|
3127
|
+
const i = await Jt({
|
|
3128
3128
|
data: { data: s, isLocal: "F" },
|
|
3129
3129
|
token: this.token,
|
|
3130
3130
|
getRequestToken: this.getRequestToken,
|
|
@@ -3161,12 +3161,12 @@ class dr {
|
|
|
3161
3161
|
});
|
|
3162
3162
|
}
|
|
3163
3163
|
}
|
|
3164
|
-
const
|
|
3165
|
-
function
|
|
3164
|
+
const hr = new ur();
|
|
3165
|
+
function fr(t) {
|
|
3166
3166
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
3167
3167
|
}
|
|
3168
3168
|
var Ze = { exports: {} }, jt;
|
|
3169
|
-
function
|
|
3169
|
+
function gr() {
|
|
3170
3170
|
return jt || (jt = 1, (function(t) {
|
|
3171
3171
|
var e = (function() {
|
|
3172
3172
|
var n = String.fromCharCode, o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$", i = {};
|
|
@@ -3363,11 +3363,11 @@ function fr() {
|
|
|
3363
3363
|
});
|
|
3364
3364
|
})(Ze)), Ze.exports;
|
|
3365
3365
|
}
|
|
3366
|
-
var
|
|
3367
|
-
const Se = /* @__PURE__ */
|
|
3366
|
+
var pr = gr();
|
|
3367
|
+
const Se = /* @__PURE__ */ fr(pr);
|
|
3368
3368
|
function Vt(t) {
|
|
3369
3369
|
const e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new WeakSet(), o = (r) => {
|
|
3370
|
-
|
|
3370
|
+
wr(r).forEach((l) => e.add(l));
|
|
3371
3371
|
}, s = (r) => {
|
|
3372
3372
|
if (!(!r || typeof r != "object"))
|
|
3373
3373
|
for (const l in r) {
|
|
@@ -3389,39 +3389,39 @@ function Vt(t) {
|
|
|
3389
3389
|
};
|
|
3390
3390
|
return i(t), [...e];
|
|
3391
3391
|
}
|
|
3392
|
-
function
|
|
3392
|
+
function wr(t) {
|
|
3393
3393
|
const e = [], n = /(?:\$t|(?:this|_vm|_ctx|\$setup|ctx|globalThis)\.\$t)\s*\(/g;
|
|
3394
3394
|
for (; n.exec(t) !== null; ) {
|
|
3395
|
-
const o = n.lastIndex - 1, s =
|
|
3395
|
+
const o = n.lastIndex - 1, s = Wn(t, o);
|
|
3396
3396
|
if (s === -1) continue;
|
|
3397
|
-
const i = t.slice(o + 1, s), r =
|
|
3397
|
+
const i = t.slice(o + 1, s), r = mr(i);
|
|
3398
3398
|
e.push(...nt(r)), n.lastIndex = s + 1;
|
|
3399
3399
|
}
|
|
3400
3400
|
return e;
|
|
3401
3401
|
}
|
|
3402
3402
|
function nt(t) {
|
|
3403
|
-
const e =
|
|
3403
|
+
const e = vr(t.trim()), n = Cr(e);
|
|
3404
3404
|
if (n !== null) return [n];
|
|
3405
|
-
const o =
|
|
3405
|
+
const o = br(e);
|
|
3406
3406
|
return o ? [
|
|
3407
3407
|
...nt(o.consequent),
|
|
3408
3408
|
...nt(o.alternate)
|
|
3409
3409
|
] : [];
|
|
3410
3410
|
}
|
|
3411
|
-
function
|
|
3412
|
-
const e =
|
|
3411
|
+
function mr(t) {
|
|
3412
|
+
const e = Yn(t, ",");
|
|
3413
3413
|
return e === -1 ? t : t.slice(0, e);
|
|
3414
3414
|
}
|
|
3415
|
-
function
|
|
3416
|
-
const e =
|
|
3415
|
+
function br(t) {
|
|
3416
|
+
const e = Yn(t, "?");
|
|
3417
3417
|
if (e === -1) return null;
|
|
3418
|
-
const n =
|
|
3418
|
+
const n = yr(t, e + 1);
|
|
3419
3419
|
return n === -1 ? null : {
|
|
3420
3420
|
consequent: t.slice(e + 1, n),
|
|
3421
3421
|
alternate: t.slice(n + 1)
|
|
3422
3422
|
};
|
|
3423
3423
|
}
|
|
3424
|
-
function
|
|
3424
|
+
function Wn(t, e) {
|
|
3425
3425
|
let n = 0;
|
|
3426
3426
|
for (let o = e; o < t.length; o++) {
|
|
3427
3427
|
const s = t[o];
|
|
@@ -3434,7 +3434,7 @@ function Gn(t, e) {
|
|
|
3434
3434
|
}
|
|
3435
3435
|
return -1;
|
|
3436
3436
|
}
|
|
3437
|
-
function
|
|
3437
|
+
function Yn(t, e) {
|
|
3438
3438
|
let n = 0, o = 0, s = 0;
|
|
3439
3439
|
for (let i = 0; i < t.length; i++) {
|
|
3440
3440
|
const r = t[i];
|
|
@@ -3448,12 +3448,12 @@ function Wn(t, e) {
|
|
|
3448
3448
|
else if (r === "]") o--;
|
|
3449
3449
|
else if (r === "{") s++;
|
|
3450
3450
|
else if (r === "}") s--;
|
|
3451
|
-
else if (r === e && !
|
|
3451
|
+
else if (r === e && !Zn(t, i, e) && n === 0 && o === 0 && s === 0)
|
|
3452
3452
|
return i;
|
|
3453
3453
|
}
|
|
3454
3454
|
return -1;
|
|
3455
3455
|
}
|
|
3456
|
-
function
|
|
3456
|
+
function yr(t, e) {
|
|
3457
3457
|
let n = 0, o = 0, s = 0, i = 0;
|
|
3458
3458
|
for (let r = e; r < t.length; r++) {
|
|
3459
3459
|
const l = t[r];
|
|
@@ -3467,20 +3467,20 @@ function br(t, e) {
|
|
|
3467
3467
|
else if (l === "]") s--;
|
|
3468
3468
|
else if (l === "{") i++;
|
|
3469
3469
|
else if (l === "}") i--;
|
|
3470
|
-
else if (o === 0 && s === 0 && i === 0 && (l === "?" && !
|
|
3470
|
+
else if (o === 0 && s === 0 && i === 0 && (l === "?" && !Zn(t, r, "?") && n++, l === ":")) {
|
|
3471
3471
|
if (n === 0) return r;
|
|
3472
3472
|
n--;
|
|
3473
3473
|
}
|
|
3474
3474
|
}
|
|
3475
3475
|
return -1;
|
|
3476
3476
|
}
|
|
3477
|
-
function
|
|
3477
|
+
function vr(t) {
|
|
3478
3478
|
let e = t;
|
|
3479
|
-
for (; e.startsWith("(") &&
|
|
3479
|
+
for (; e.startsWith("(") && Wn(e, 0) === e.length - 1; )
|
|
3480
3480
|
e = e.slice(1, -1).trim();
|
|
3481
3481
|
return e;
|
|
3482
3482
|
}
|
|
3483
|
-
function
|
|
3483
|
+
function Cr(t) {
|
|
3484
3484
|
if (!t || !Ve(t[0])) return null;
|
|
3485
3485
|
const e = t[0];
|
|
3486
3486
|
let n = "";
|
|
@@ -3510,7 +3510,7 @@ function vt(t, e) {
|
|
|
3510
3510
|
function Ve(t) {
|
|
3511
3511
|
return t === "'" || t === '"' || t === "`";
|
|
3512
3512
|
}
|
|
3513
|
-
function
|
|
3513
|
+
function Zn(t, e, n) {
|
|
3514
3514
|
return n === "?" && (t[e + 1] === "." || t[e + 1] === "?");
|
|
3515
3515
|
}
|
|
3516
3516
|
const Ht = {
|
|
@@ -3561,7 +3561,7 @@ const Ht = {
|
|
|
3561
3561
|
i.value = t.languages;
|
|
3562
3562
|
return;
|
|
3563
3563
|
}
|
|
3564
|
-
const w = await
|
|
3564
|
+
const w = await Wt({
|
|
3565
3565
|
baseUrl: t.baseUrl,
|
|
3566
3566
|
token: s.value,
|
|
3567
3567
|
appCode: o.value,
|
|
@@ -3707,7 +3707,7 @@ const Ht = {
|
|
|
3707
3707
|
}, x = () => {
|
|
3708
3708
|
t.request && typeof t.request == "function" ? S() : B();
|
|
3709
3709
|
};
|
|
3710
|
-
return
|
|
3710
|
+
return no(() => {
|
|
3711
3711
|
r(), l(), window.addEventListener("message", h), L();
|
|
3712
3712
|
}), {
|
|
3713
3713
|
currentValue: d,
|
|
@@ -3756,7 +3756,7 @@ function pe(t) {
|
|
|
3756
3756
|
"en-us": "en-US"
|
|
3757
3757
|
}[e] || t;
|
|
3758
3758
|
}
|
|
3759
|
-
function
|
|
3759
|
+
function Jn(t = {}) {
|
|
3760
3760
|
const e = Object.entries(t || {});
|
|
3761
3761
|
return e.some(([, o]) => o && typeof o == "object" && !Array.isArray(o) && Object.keys(o).some((s) => s.includes("-"))) ? e.reduce((o, [s, i]) => (!i || typeof i != "object" || Array.isArray(i) || Object.entries(i).forEach(([r, l]) => {
|
|
3762
3762
|
const a = pe(r);
|
|
@@ -3787,8 +3787,8 @@ function Xn(t, e) {
|
|
|
3787
3787
|
values: e
|
|
3788
3788
|
};
|
|
3789
3789
|
}
|
|
3790
|
-
function
|
|
3791
|
-
const { locale: e = "zh-CN", messages: n = {} } = t, o =
|
|
3790
|
+
function _r(t) {
|
|
3791
|
+
const { locale: e = "zh-CN", messages: n = {} } = t, o = Jn(n), s = ie(e), i = ie(0), r = Ct(), l = eo() && r && typeof r.observable == "function" ? r.observable({
|
|
3792
3792
|
locale: e,
|
|
3793
3793
|
messageVersion: 0
|
|
3794
3794
|
}) : null, a = () => l ? l.locale : s.value, d = (h) => {
|
|
@@ -3827,21 +3827,56 @@ function Cr(t) {
|
|
|
3827
3827
|
};
|
|
3828
3828
|
return u.global = u, u;
|
|
3829
3829
|
}
|
|
3830
|
-
const
|
|
3830
|
+
const Qn = st.create({
|
|
3831
3831
|
timeout: 8e3
|
|
3832
|
-
})
|
|
3833
|
-
|
|
3832
|
+
}), Kt = "zh-CN", kr = /^(?:"([a-z]{2}-[A-Z]{2})"|([a-z]{2}-[A-Z]{2}))$/, xr = /* @__PURE__ */ new Set([
|
|
3833
|
+
"zh-CN",
|
|
3834
|
+
"zh-TW",
|
|
3835
|
+
"zh-UG",
|
|
3836
|
+
"en-US",
|
|
3837
|
+
"tr-TR",
|
|
3838
|
+
"es-ES",
|
|
3839
|
+
"ja-JP",
|
|
3840
|
+
"ru-RU",
|
|
3841
|
+
"fr-FR",
|
|
3842
|
+
"de-DE",
|
|
3843
|
+
"pt-BR",
|
|
3844
|
+
"pt-PT",
|
|
3845
|
+
"ko-KR",
|
|
3846
|
+
"vi-VN",
|
|
3847
|
+
"sv-SE",
|
|
3848
|
+
"id-ID",
|
|
3849
|
+
"uk-UA",
|
|
3850
|
+
"it-IT",
|
|
3851
|
+
"th-TH",
|
|
3852
|
+
"hi-IN",
|
|
3853
|
+
"fa-IR",
|
|
3854
|
+
"ro-RO",
|
|
3855
|
+
"el-GR",
|
|
3856
|
+
"nl-NL",
|
|
3857
|
+
"cs-CZ",
|
|
3858
|
+
"mn-MN",
|
|
3859
|
+
"mn-TR",
|
|
3860
|
+
"fi-FI",
|
|
3861
|
+
"ar-SA",
|
|
3862
|
+
"ar-EG",
|
|
3863
|
+
"da-DK",
|
|
3864
|
+
"pl-PL",
|
|
3865
|
+
"nb-NO",
|
|
3866
|
+
"si-LK"
|
|
3867
|
+
]);
|
|
3868
|
+
Qn.interceptors.request.use((t) => {
|
|
3834
3869
|
const n = (E.get("I18N_CONFIG") || {}).token;
|
|
3835
3870
|
return n && (t.headers.Authorization = `Bearer ${n}`), t;
|
|
3836
3871
|
});
|
|
3837
|
-
function
|
|
3872
|
+
function Er(t = {}) {
|
|
3838
3873
|
const n = JSON.stringify({
|
|
3839
3874
|
alg: "HS512"
|
|
3840
3875
|
// 算法
|
|
3841
3876
|
}), o = JSON.stringify(t);
|
|
3842
|
-
return
|
|
3877
|
+
return oo.JWS.sign("HS512", n, o, "");
|
|
3843
3878
|
}
|
|
3844
|
-
function
|
|
3879
|
+
function Tr(t) {
|
|
3845
3880
|
if (!t || typeof t != "string") return "";
|
|
3846
3881
|
const e = t.replace(/-/g, "+").replace(/_/g, "/"), n = e.padEnd(
|
|
3847
3882
|
e.length + (4 - e.length % 4) % 4,
|
|
@@ -3856,18 +3891,18 @@ function kr(t) {
|
|
|
3856
3891
|
}
|
|
3857
3892
|
return "";
|
|
3858
3893
|
}
|
|
3859
|
-
function
|
|
3894
|
+
function Ar(t) {
|
|
3860
3895
|
if (!t || typeof t != "string") return null;
|
|
3861
3896
|
const e = t.split(".");
|
|
3862
3897
|
if (e.length !== 3) return null;
|
|
3863
3898
|
try {
|
|
3864
|
-
return JSON.parse(
|
|
3899
|
+
return JSON.parse(Tr(e[1]));
|
|
3865
3900
|
} catch {
|
|
3866
3901
|
return null;
|
|
3867
3902
|
}
|
|
3868
3903
|
}
|
|
3869
|
-
function
|
|
3870
|
-
const e =
|
|
3904
|
+
function Sr(t) {
|
|
3905
|
+
const e = Ar(t);
|
|
3871
3906
|
return !!(e && (e.mainAppCode && e.userCode && e.deviceType || e.appCode && e.orgCode && e.userCode && e.i18n_token));
|
|
3872
3907
|
}
|
|
3873
3908
|
function ot(t) {
|
|
@@ -3878,7 +3913,7 @@ function ot(t) {
|
|
|
3878
3913
|
n = (n << 5) - n + e.charCodeAt(o), n |= 0;
|
|
3879
3914
|
return `user_${Math.abs(n)}`;
|
|
3880
3915
|
}
|
|
3881
|
-
function
|
|
3916
|
+
function Je({ appCode: t, orgCode: e, userCode: n } = {}) {
|
|
3882
3917
|
return !t || !e || !n ? "" : ot([t, e, n].join("|"));
|
|
3883
3918
|
}
|
|
3884
3919
|
function oe(t, ...e) {
|
|
@@ -3888,13 +3923,13 @@ function oe(t, ...e) {
|
|
|
3888
3923
|
function Ct(t) {
|
|
3889
3924
|
return t && (t.version || t.prototype || t.config) ? t : xe && xe.version ? xe : xe;
|
|
3890
3925
|
}
|
|
3891
|
-
function
|
|
3926
|
+
function eo(t) {
|
|
3892
3927
|
if (t && t.config && t.config.globalProperties)
|
|
3893
3928
|
return !1;
|
|
3894
3929
|
const e = Ct(t), n = e && e.version;
|
|
3895
3930
|
return typeof n == "string" ? n.split(".")[0] === "2" : !!(e && e.prototype);
|
|
3896
3931
|
}
|
|
3897
|
-
function
|
|
3932
|
+
function Lr(t) {
|
|
3898
3933
|
[t.$, t._].filter(Boolean).forEach((n) => {
|
|
3899
3934
|
Array.isArray(n.renderCache) && (n.renderCache.length = 0);
|
|
3900
3935
|
});
|
|
@@ -3914,13 +3949,13 @@ function se(t, e) {
|
|
|
3914
3949
|
t.component && _t(t.component, e), Array.isArray(t.children) && t.children.forEach((n) => se(n, e)), Array.isArray(t.dynamicChildren) && t.dynamicChildren.forEach((n) => se(n, e)), t.ssContent && se(t.ssContent, e), t.ssFallback && se(t.ssFallback, e);
|
|
3915
3950
|
}
|
|
3916
3951
|
}
|
|
3917
|
-
function
|
|
3952
|
+
function to(t, e = /* @__PURE__ */ new Set()) {
|
|
3918
3953
|
if (!t || e.has(t)) return;
|
|
3919
|
-
e.add(t),
|
|
3954
|
+
e.add(t), Lr(t), [t.$, t._].filter(Boolean).forEach((o) => {
|
|
3920
3955
|
_t(o, e);
|
|
3921
|
-
}), typeof t.$forceUpdate == "function" && t.$forceUpdate(), (t.$children || []).forEach((o) =>
|
|
3956
|
+
}), typeof t.$forceUpdate == "function" && t.$forceUpdate(), (t.$children || []).forEach((o) => to(o, e));
|
|
3922
3957
|
}
|
|
3923
|
-
class
|
|
3958
|
+
class X {
|
|
3924
3959
|
constructor(e = {}) {
|
|
3925
3960
|
const {
|
|
3926
3961
|
router: n,
|
|
@@ -3938,11 +3973,11 @@ class J {
|
|
|
3938
3973
|
i18nTokenRequest: L,
|
|
3939
3974
|
auth: S
|
|
3940
3975
|
} = e;
|
|
3941
|
-
this.env = h || "local", this.baseUrl =
|
|
3976
|
+
this.env = h || "local", this.baseUrl = Gt({ env: h, dev: k }), this.i18nTokenRequest = L || null, this.baseToken = i || (E.get("I18N_CONFIG") || {}).token || E.get("token"), this.token = this.baseToken, this.auth = S || null, this.authInfo = {
|
|
3942
3977
|
appCode: o,
|
|
3943
3978
|
orgCode: r || "",
|
|
3944
3979
|
userCode: l || ""
|
|
3945
|
-
}, this.getRequestToken = this.getRequestToken.bind(this), this.requestAuthIdentity = null, this.tokenResolveVersion = 0, this.manualAuthScope =
|
|
3980
|
+
}, this.getRequestToken = this.getRequestToken.bind(this), this.requestAuthIdentity = null, this.tokenResolveVersion = 0, this.manualAuthScope = Je(this.authInfo) || (i ? ot(i) : ""), this.authUnsubscribe = null, this.authVersion = 0, this.languageVersion = 0, this.activeCacheScope = this.manualAuthScope || "guest", this.loadI18n = !0, this.appCode = o, this.router = n, this.locale = this.resolveInitialLocale(u), this._isRTL = Ee(this.locale), this.persistI18nConfig(), this.name = "", this.messages = Jn(s || {}), this.translationKeys = [], this.translationKeySet = /* @__PURE__ */ new Set(), this.loginRouteName = a || "login", this.login = d, this.loginTranslationKeys = [], this.keyboard = g || "ctrl+shift+l", this.vueInstances = /* @__PURE__ */ new Set(), this.vueApps = /* @__PURE__ */ new Set(), this.editKeyboard = e.editKeyboard || "ctrl+shift+e", this.applyAuthState(this.resolveAuthState(), { silent: !0 }), this.initI18n(e), this.router && this.initRouterGuards(), kt.bind(this.keyboard, (B) => {
|
|
3946
3981
|
if (B.preventDefault(), this.name === this.loginRouteName)
|
|
3947
3982
|
return;
|
|
3948
3983
|
const x = Array.from(this.translationKeySet);
|
|
@@ -3968,7 +4003,7 @@ class J {
|
|
|
3968
4003
|
const w = document.getElementById("gc_i18n_config_modal_root");
|
|
3969
4004
|
if (!w)
|
|
3970
4005
|
return;
|
|
3971
|
-
const C =
|
|
4006
|
+
const C = Co({
|
|
3972
4007
|
name: this.name,
|
|
3973
4008
|
token: this.token,
|
|
3974
4009
|
appCode: this.appCode,
|
|
@@ -4001,19 +4036,18 @@ class J {
|
|
|
4001
4036
|
}
|
|
4002
4037
|
});
|
|
4003
4038
|
}), kt.bind(this.editKeyboard, (B) => {
|
|
4004
|
-
B.preventDefault(),
|
|
4039
|
+
B.preventDefault(), hr.toggle();
|
|
4005
4040
|
}), this.setupLanguageChangeListener(), this.setupAuthListener(), this.setupMessageListener();
|
|
4006
4041
|
}
|
|
4007
4042
|
/**
|
|
4008
|
-
*
|
|
4043
|
+
* 严格校验语言代码,不支持的值统一回退到简体中文
|
|
4009
4044
|
* @param {string} locale - 原始语言代码
|
|
4010
|
-
* @returns {string}
|
|
4045
|
+
* @returns {string} 受支持的语言代码
|
|
4011
4046
|
*/
|
|
4012
4047
|
normalizeLocale(e) {
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
}[e] || e : "zh-CN";
|
|
4048
|
+
if (typeof e != "string") return Kt;
|
|
4049
|
+
const n = e.match(kr), o = n ? n[1] || n[2] : "";
|
|
4050
|
+
return xr.has(o) ? o : Kt;
|
|
4017
4051
|
}
|
|
4018
4052
|
getUrlLanguage() {
|
|
4019
4053
|
if (typeof window > "u" || !window.location) return "";
|
|
@@ -4038,7 +4072,7 @@ class J {
|
|
|
4038
4072
|
}
|
|
4039
4073
|
resolveAuthState() {
|
|
4040
4074
|
var g, u, h;
|
|
4041
|
-
const e = this.auth || {}, n = oe(e.getToken) ?? "", o = oe(e.getScope) ?? oe(e.getUserScope) ?? "", s = oe(e.getAppCode) ?? ((g = this.authInfo) == null ? void 0 : g.appCode) ?? this.appCode, i = oe(e.getOrgCode) ?? ((u = this.authInfo) == null ? void 0 : u.orgCode) ?? "", r = oe(e.getUserCode) ?? ((h = this.authInfo) == null ? void 0 : h.userCode) ?? "", l =
|
|
4075
|
+
const e = this.auth || {}, n = oe(e.getToken) ?? "", o = oe(e.getScope) ?? oe(e.getUserScope) ?? "", s = oe(e.getAppCode) ?? ((g = this.authInfo) == null ? void 0 : g.appCode) ?? this.appCode, i = oe(e.getOrgCode) ?? ((u = this.authInfo) == null ? void 0 : u.orgCode) ?? "", r = oe(e.getUserCode) ?? ((h = this.authInfo) == null ? void 0 : h.userCode) ?? "", l = Je({ appCode: s, orgCode: i, userCode: r }), a = typeof e.isAuthenticated == "function" ? !!e.isAuthenticated() : !!n || !!(this.i18nTokenRequest && l), d = a ? String(
|
|
4042
4076
|
o || ot(n) || l || this.manualAuthScope || "user"
|
|
4043
4077
|
) : "guest";
|
|
4044
4078
|
return {
|
|
@@ -4089,7 +4123,7 @@ class J {
|
|
|
4089
4123
|
async createRequestToken(e, n = {}) {
|
|
4090
4124
|
if (!this.i18nTokenRequest)
|
|
4091
4125
|
return e || "";
|
|
4092
|
-
if (e &&
|
|
4126
|
+
if (e && Sr(e))
|
|
4093
4127
|
return e;
|
|
4094
4128
|
const o = {
|
|
4095
4129
|
appCode: n.appCode || this.appCode,
|
|
@@ -4101,14 +4135,14 @@ class J {
|
|
|
4101
4135
|
"临时 token 模式需要提供 appCode、orgCode、userCode 三元身份"
|
|
4102
4136
|
), "";
|
|
4103
4137
|
try {
|
|
4104
|
-
const s = await
|
|
4138
|
+
const s = await uo({
|
|
4105
4139
|
request: this.i18nTokenRequest,
|
|
4106
4140
|
appCode: o.appCode || this.appCode,
|
|
4107
4141
|
orgCode: o.orgCode,
|
|
4108
4142
|
userCode: o.userCode,
|
|
4109
4143
|
token: e
|
|
4110
4144
|
});
|
|
4111
|
-
return s ?
|
|
4145
|
+
return s ? Er({
|
|
4112
4146
|
appCode: o.appCode || this.appCode,
|
|
4113
4147
|
orgCode: o.orgCode,
|
|
4114
4148
|
userCode: o.userCode,
|
|
@@ -4213,7 +4247,7 @@ class J {
|
|
|
4213
4247
|
}
|
|
4214
4248
|
// 初始化路由守卫
|
|
4215
4249
|
initRouterGuards() {
|
|
4216
|
-
this.router && (
|
|
4250
|
+
this.router && (X._routerGuardRegistered || (X._routerGuardRegistered = !0, this.router.beforeEach(async (e, n, o) => {
|
|
4217
4251
|
var l, a;
|
|
4218
4252
|
const { language: s, token: i } = e.query;
|
|
4219
4253
|
if (this.configInstance && this.configInstance.closeModal(), this.name = e.name, this.translationKeySet = /* @__PURE__ */ new Set(), i && await this.setToken(i), this.loadI18n)
|
|
@@ -4254,7 +4288,7 @@ class J {
|
|
|
4254
4288
|
return;
|
|
4255
4289
|
}
|
|
4256
4290
|
o();
|
|
4257
|
-
}),
|
|
4291
|
+
}), X._afterEachGuardRegistered || (X._afterEachGuardRegistered = !0, this.router.afterEach(async () => {
|
|
4258
4292
|
var i, r;
|
|
4259
4293
|
await xt();
|
|
4260
4294
|
const e = Array.from(this.translationKeySet), n = Array.from(
|
|
@@ -4274,7 +4308,7 @@ class J {
|
|
|
4274
4308
|
}
|
|
4275
4309
|
// 初始化 i18n 实例
|
|
4276
4310
|
initI18n(e) {
|
|
4277
|
-
this.i18n =
|
|
4311
|
+
this.i18n = _r({
|
|
4278
4312
|
locale: this.locale,
|
|
4279
4313
|
messages: e.messages || {}
|
|
4280
4314
|
}), this.keyValueMap = {}, globalThis.__I18N_ALL_KEYS__ = /* @__PURE__ */ new Set();
|
|
@@ -4383,7 +4417,7 @@ class J {
|
|
|
4383
4417
|
this.vueApps && this.vueApps.forEach((s) => {
|
|
4384
4418
|
s && s._instance && _t(s._instance, o);
|
|
4385
4419
|
}), this.vueInstances && this.vueInstances.forEach((s) => {
|
|
4386
|
-
|
|
4420
|
+
to(s, o);
|
|
4387
4421
|
});
|
|
4388
4422
|
}), typeof window < "u" && typeof CustomEvent == "function" && window.dispatchEvent(
|
|
4389
4423
|
new CustomEvent("gc-i18n-language-changed", {
|
|
@@ -4405,10 +4439,10 @@ class J {
|
|
|
4405
4439
|
"临时 token 模式调用 setToken 时必须提供 appCode、orgCode、userCode 三元身份"
|
|
4406
4440
|
), Promise.resolve(!1);
|
|
4407
4441
|
const r = this.updateRequestAuthIdentity(n);
|
|
4408
|
-
return this.tokenResolveVersion++, this.baseToken = e || "", this.token = this.baseToken, this.i18nTokenRequest && (this.activeCacheScope = n.cacheScope || n.scope ||
|
|
4442
|
+
return this.tokenResolveVersion++, this.baseToken = e || "", this.token = this.baseToken, this.i18nTokenRequest && (this.activeCacheScope = n.cacheScope || n.scope || Je(i) || "user"), this.persistI18nConfig(), o !== this.token || s !== this.activeCacheScope || r ? this.refreshLanguageForCurrentAuth() : Promise.resolve(!1);
|
|
4409
4443
|
}
|
|
4410
4444
|
async getLanguages(e = !1) {
|
|
4411
|
-
return await
|
|
4445
|
+
return await Wt({
|
|
4412
4446
|
baseUrl: this.baseUrl,
|
|
4413
4447
|
token: this.token,
|
|
4414
4448
|
appCode: this.appCode,
|
|
@@ -4422,7 +4456,7 @@ class J {
|
|
|
4422
4456
|
let l = E.get(r);
|
|
4423
4457
|
if (b.isEmpty(l))
|
|
4424
4458
|
try {
|
|
4425
|
-
const a = await
|
|
4459
|
+
const a = await Qn.get(
|
|
4426
4460
|
`https://cdn.ihotel.cn/i18n_messages/${e}.json`
|
|
4427
4461
|
);
|
|
4428
4462
|
if (a) {
|
|
@@ -4436,7 +4470,7 @@ class J {
|
|
|
4436
4470
|
), l = {};
|
|
4437
4471
|
}
|
|
4438
4472
|
try {
|
|
4439
|
-
const a = await
|
|
4473
|
+
const a = await ho({
|
|
4440
4474
|
baseUrl: this.baseUrl,
|
|
4441
4475
|
appCode: this.appCode,
|
|
4442
4476
|
language: e || this.locale,
|
|
@@ -4448,7 +4482,7 @@ class J {
|
|
|
4448
4482
|
if (s !== this.authVersion || i !== this.languageVersion)
|
|
4449
4483
|
return !1;
|
|
4450
4484
|
if (a && Array.isArray(a)) {
|
|
4451
|
-
const d =
|
|
4485
|
+
const d = io(a), g = b.assign(
|
|
4452
4486
|
{},
|
|
4453
4487
|
l,
|
|
4454
4488
|
b.get(this.messages, e),
|
|
@@ -4476,10 +4510,10 @@ class J {
|
|
|
4476
4510
|
}
|
|
4477
4511
|
}
|
|
4478
4512
|
install(e, n = {}) {
|
|
4479
|
-
if (
|
|
4513
|
+
if (eo(e)) {
|
|
4480
4514
|
const o = Ct(e);
|
|
4481
|
-
if (o.prototype.$t = this.t || globalThis.$t, o.prototype.$i18n = this.i18n, !
|
|
4482
|
-
|
|
4515
|
+
if (o.prototype.$t = this.t || globalThis.$t, o.prototype.$i18n = this.i18n, !X._vue2UpdateMixinRegistered && o.mixin) {
|
|
4516
|
+
X._vue2UpdateMixinRegistered = !0;
|
|
4483
4517
|
const s = this;
|
|
4484
4518
|
o.mixin({
|
|
4485
4519
|
beforeCreate() {
|
|
@@ -4514,6 +4548,6 @@ class J {
|
|
|
4514
4548
|
}
|
|
4515
4549
|
}
|
|
4516
4550
|
export {
|
|
4517
|
-
|
|
4518
|
-
|
|
4551
|
+
X as I18n,
|
|
4552
|
+
X as default
|
|
4519
4553
|
};
|