react-ecosistema-unp 1.5.10 → 1.5.12
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.
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsxs as I, Fragment as Ze, jsx as B } from "react/jsx-runtime";
|
|
2
|
-
import { useState as D, useEffect as
|
|
3
|
-
import { L as Ee, i as
|
|
4
|
-
import { Tabla as
|
|
5
|
-
import { CustomModal as
|
|
6
|
-
import { EncabezadoTabla as
|
|
2
|
+
import { useState as D, useEffect as yn } from "react";
|
|
3
|
+
import { L as Ee, i as vn, n as kn, a as xn } from "../../isLoading-B9qN9mny.js";
|
|
4
|
+
import { Tabla as Cn } from "./tabla/Tabla.js";
|
|
5
|
+
import { CustomModal as An } from "./modal/Modal.js";
|
|
6
|
+
import { EncabezadoTabla as En } from "./encabezado-tabla/EncabezadoTabla.js";
|
|
7
|
+
import { useNavigate as Bn } from "react-router-dom";
|
|
7
8
|
import '../../assets/TablaRegistros.css';/*!
|
|
8
9
|
* sweetalert2 v11.16.1
|
|
9
10
|
* Released under the MIT License.
|
|
@@ -12,57 +13,57 @@ function dt(e, t, n) {
|
|
|
12
13
|
if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
13
14
|
throw new TypeError("Private element is not present on this object");
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
+
function Pn(e, t) {
|
|
16
17
|
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
17
18
|
}
|
|
18
19
|
function Je(e, t) {
|
|
19
20
|
return e.get(dt(e, t));
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
22
|
+
function Tn(e, t, n) {
|
|
23
|
+
Pn(e, t), t.set(e, n);
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
+
function Ln(e, t, n) {
|
|
25
26
|
return e.set(dt(e, t), n), n;
|
|
26
27
|
}
|
|
27
|
-
const
|
|
28
|
+
const $n = 100, a = {}, Sn = () => {
|
|
28
29
|
a.previousActiveElement instanceof HTMLElement ? (a.previousActiveElement.focus(), a.previousActiveElement = null) : document.body && document.body.focus();
|
|
29
|
-
},
|
|
30
|
+
}, In = (e) => new Promise((t) => {
|
|
30
31
|
if (!e)
|
|
31
32
|
return t();
|
|
32
33
|
const n = window.scrollX, o = window.scrollY;
|
|
33
34
|
a.restoreFocusTimeout = setTimeout(() => {
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
}), ut = "swal2-",
|
|
35
|
+
Sn(), t();
|
|
36
|
+
}, $n), window.scrollTo(n, o);
|
|
37
|
+
}), ut = "swal2-", Mn = ["container", "shown", "height-auto", "iosfix", "popup", "modal", "no-backdrop", "no-transition", "toast", "toast-shown", "show", "hide", "close", "title", "html-container", "actions", "confirm", "deny", "cancel", "default-outline", "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"], i = Mn.reduce(
|
|
37
38
|
(e, t) => (e[t] = ut + t, e),
|
|
38
39
|
/** @type {SwalClasses} */
|
|
39
40
|
{}
|
|
40
|
-
),
|
|
41
|
+
), On = ["success", "warning", "info", "question", "error"], ce = On.reduce(
|
|
41
42
|
(e, t) => (e[t] = ut + t, e),
|
|
42
43
|
/** @type {SwalIcons} */
|
|
43
44
|
{}
|
|
44
|
-
), wt = "SweetAlert2:", $e = (e) => e.charAt(0).toUpperCase() + e.slice(1),
|
|
45
|
+
), wt = "SweetAlert2:", $e = (e) => e.charAt(0).toUpperCase() + e.slice(1), v = (e) => {
|
|
45
46
|
console.warn(`${wt} ${typeof e == "object" ? e.join(" ") : e}`);
|
|
46
47
|
}, F = (e) => {
|
|
47
48
|
console.error(`${wt} ${e}`);
|
|
48
|
-
}, Ge = [],
|
|
49
|
-
Ge.includes(e) || (Ge.push(e),
|
|
49
|
+
}, Ge = [], Dn = (e) => {
|
|
50
|
+
Ge.includes(e) || (Ge.push(e), v(e));
|
|
50
51
|
}, ft = function(e) {
|
|
51
52
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
const t =
|
|
53
|
+
Dn(`"${e}" is deprecated and will be removed in the next major release.${t ? ` Use "${t}" instead.` : ""}`);
|
|
54
|
+
}, ye = (e) => typeof e == "function" ? e() : e, Se = (e) => e && typeof e.toPromise == "function", G = (e) => Se(e) ? e.toPromise() : Promise.resolve(e), Ie = (e) => e && Promise.resolve(e) === e, k = () => document.body.querySelector(`.${i.container}`), Q = (e) => {
|
|
55
|
+
const t = k();
|
|
55
56
|
return t ? t.querySelector(e) : null;
|
|
56
|
-
}, A = (e) =>
|
|
57
|
+
}, A = (e) => Q(`.${e}`), u = () => A(i.popup), U = () => A(i.icon), Hn = () => A(i["icon-content"]), mt = () => A(i.title), Me = () => A(i["html-container"]), ht = () => A(i.image), Oe = () => A(i["progress-steps"]), ve = () => A(i["validation-message"]), $ = () => (
|
|
57
58
|
/** @type {HTMLButtonElement} */
|
|
58
|
-
|
|
59
|
+
Q(`.${i.actions} .${i.confirm}`)
|
|
59
60
|
), _ = () => (
|
|
60
61
|
/** @type {HTMLButtonElement} */
|
|
61
|
-
|
|
62
|
+
Q(`.${i.actions} .${i.cancel}`)
|
|
62
63
|
), q = () => (
|
|
63
64
|
/** @type {HTMLButtonElement} */
|
|
64
|
-
|
|
65
|
-
),
|
|
65
|
+
Q(`.${i.actions} .${i.deny}`)
|
|
66
|
+
), jn = () => A(i["input-label"]), Y = () => Q(`.${i.loader}`), ee = () => A(i.actions), gt = () => A(i.footer), ke = () => A(i["timer-progress-bar"]), De = () => A(i.close), zn = `
|
|
66
67
|
a[href],
|
|
67
68
|
area[href],
|
|
68
69
|
input:not([disabled]),
|
|
@@ -84,12 +85,12 @@ const Tn = 100, a = {}, Ln = () => {
|
|
|
84
85
|
const t = e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'), n = Array.from(t).sort((r, l) => {
|
|
85
86
|
const c = parseInt(r.getAttribute("tabindex") || "0"), w = parseInt(l.getAttribute("tabindex") || "0");
|
|
86
87
|
return c > w ? 1 : c < w ? -1 : 0;
|
|
87
|
-
}), o = e.querySelectorAll(
|
|
88
|
+
}), o = e.querySelectorAll(zn), s = Array.from(o).filter((r) => r.getAttribute("tabindex") !== "-1");
|
|
88
89
|
return [...new Set(n.concat(s))].filter((r) => x(r));
|
|
89
|
-
}, je = () => S(document.body, i.shown) && !S(document.body, i["toast-shown"]) && !S(document.body, i["no-backdrop"]),
|
|
90
|
+
}, je = () => S(document.body, i.shown) && !S(document.body, i["toast-shown"]) && !S(document.body, i["no-backdrop"]), xe = () => {
|
|
90
91
|
const e = u();
|
|
91
92
|
return e ? S(e, i.toast) : !1;
|
|
92
|
-
},
|
|
93
|
+
}, Fn = () => {
|
|
93
94
|
const e = u();
|
|
94
95
|
return e ? e.hasAttribute("data-loading") : !1;
|
|
95
96
|
}, E = (e, t) => {
|
|
@@ -111,12 +112,12 @@ const Tn = 100, a = {}, Ln = () => {
|
|
|
111
112
|
if (!e.classList.contains(n[o]))
|
|
112
113
|
return !1;
|
|
113
114
|
return !0;
|
|
114
|
-
},
|
|
115
|
+
}, qn = (e, t) => {
|
|
115
116
|
Array.from(e.classList).forEach((n) => {
|
|
116
|
-
!Object.values(i).includes(n) && !Object.values(
|
|
117
|
+
!Object.values(i).includes(n) && !Object.values(ce).includes(n) && !Object.values(t.showClass || {}).includes(n) && e.classList.remove(n);
|
|
117
118
|
});
|
|
118
119
|
}, C = (e, t, n) => {
|
|
119
|
-
if (
|
|
120
|
+
if (qn(e, t), !t.customClass)
|
|
120
121
|
return;
|
|
121
122
|
const o = t.customClass[
|
|
122
123
|
/** @type {keyof SweetAlertCustomClass} */
|
|
@@ -124,12 +125,12 @@ const Tn = 100, a = {}, Ln = () => {
|
|
|
124
125
|
];
|
|
125
126
|
if (o) {
|
|
126
127
|
if (typeof o != "string" && !o.forEach) {
|
|
127
|
-
|
|
128
|
+
v(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof o}"`);
|
|
128
129
|
return;
|
|
129
130
|
}
|
|
130
131
|
d(e, o);
|
|
131
132
|
}
|
|
132
|
-
},
|
|
133
|
+
}, Ce = (e, t) => {
|
|
133
134
|
if (!t)
|
|
134
135
|
return null;
|
|
135
136
|
switch (t) {
|
|
@@ -173,12 +174,12 @@ const Tn = 100, a = {}, Ln = () => {
|
|
|
173
174
|
}, g = function(e) {
|
|
174
175
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "flex";
|
|
175
176
|
e && (e.style.display = t);
|
|
176
|
-
},
|
|
177
|
+
}, y = (e) => {
|
|
177
178
|
e && (e.style.display = "none");
|
|
178
179
|
}, ze = function(e) {
|
|
179
180
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "block";
|
|
180
181
|
e && new MutationObserver(() => {
|
|
181
|
-
|
|
182
|
+
te(e, e.innerHTML, t);
|
|
182
183
|
}).observe(e, {
|
|
183
184
|
childList: !0,
|
|
184
185
|
subtree: !0
|
|
@@ -186,27 +187,27 @@ const Tn = 100, a = {}, Ln = () => {
|
|
|
186
187
|
}, Qe = (e, t, n, o) => {
|
|
187
188
|
const s = e.querySelector(t);
|
|
188
189
|
s && s.style.setProperty(n, o);
|
|
189
|
-
},
|
|
190
|
+
}, te = function(e, t) {
|
|
190
191
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "flex";
|
|
191
|
-
t ? g(e, n) :
|
|
192
|
-
}, x = (e) => !!(e && (e.offsetWidth || e.offsetHeight || e.getClientRects().length)),
|
|
192
|
+
t ? g(e, n) : y(e);
|
|
193
|
+
}, x = (e) => !!(e && (e.offsetWidth || e.offsetHeight || e.getClientRects().length)), Vn = () => !x($()) && !x(q()) && !x(_()), et = (e) => e.scrollHeight > e.clientHeight, yt = (e) => {
|
|
193
194
|
const t = window.getComputedStyle(e), n = parseFloat(t.getPropertyValue("animation-duration") || "0"), o = parseFloat(t.getPropertyValue("transition-duration") || "0");
|
|
194
195
|
return n > 0 || o > 0;
|
|
195
196
|
}, Fe = function(e) {
|
|
196
197
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
197
|
-
const n =
|
|
198
|
+
const n = ke();
|
|
198
199
|
n && x(n) && (t && (n.style.transition = "none", n.style.width = "100%"), setTimeout(() => {
|
|
199
200
|
n.style.transition = `width ${e / 1e3}s linear`, n.style.width = "0%";
|
|
200
201
|
}, 10));
|
|
201
|
-
},
|
|
202
|
-
const e =
|
|
202
|
+
}, Nn = () => {
|
|
203
|
+
const e = ke();
|
|
203
204
|
if (!e)
|
|
204
205
|
return;
|
|
205
206
|
const t = parseInt(window.getComputedStyle(e).width);
|
|
206
207
|
e.style.removeProperty("transition"), e.style.width = "100%";
|
|
207
208
|
const n = parseInt(window.getComputedStyle(e).width), o = t / n * 100;
|
|
208
209
|
e.style.width = `${o}%`;
|
|
209
|
-
},
|
|
210
|
+
}, Rn = () => typeof window > "u" || typeof document > "u", Wn = `
|
|
210
211
|
<div aria-labelledby="${i.title}" aria-describedby="${i["html-container"]}" class="${i.popup}" tabindex="-1">
|
|
211
212
|
<button type="button" class="${i.close}"></button>
|
|
212
213
|
<ul class="${i["progress-steps"]}"></ul>
|
|
@@ -239,52 +240,52 @@ const Tn = 100, a = {}, Ln = () => {
|
|
|
239
240
|
<div class="${i["timer-progress-bar"]}"></div>
|
|
240
241
|
</div>
|
|
241
242
|
</div>
|
|
242
|
-
`.replace(/(^|\n)\s*/g, ""),
|
|
243
|
-
const e =
|
|
243
|
+
`.replace(/(^|\n)\s*/g, ""), Un = () => {
|
|
244
|
+
const e = k();
|
|
244
245
|
return e ? (e.remove(), P([document.documentElement, document.body], [i["no-backdrop"], i["toast-shown"], i["has-column"]]), !0) : !1;
|
|
245
246
|
}, H = () => {
|
|
246
247
|
a.currentInstance.resetValidationMessage();
|
|
247
|
-
},
|
|
248
|
+
}, _n = () => {
|
|
248
249
|
const e = u(), t = M(e, i.input), n = M(e, i.file), o = e.querySelector(`.${i.range} input`), s = e.querySelector(`.${i.range} output`), r = M(e, i.select), l = e.querySelector(`.${i.checkbox} input`), c = M(e, i.textarea);
|
|
249
250
|
t.oninput = H, n.onchange = H, r.onchange = H, l.onchange = H, c.oninput = H, o.oninput = () => {
|
|
250
251
|
H(), s.value = o.value;
|
|
251
252
|
}, o.onchange = () => {
|
|
252
253
|
H(), s.value = o.value;
|
|
253
254
|
};
|
|
254
|
-
},
|
|
255
|
+
}, Yn = (e) => typeof e == "string" ? document.querySelector(e) : e, Xn = (e) => {
|
|
255
256
|
const t = u();
|
|
256
257
|
t.setAttribute("role", e.toast ? "alert" : "dialog"), t.setAttribute("aria-live", e.toast ? "polite" : "assertive"), e.toast || t.setAttribute("aria-modal", "true");
|
|
257
|
-
},
|
|
258
|
-
window.getComputedStyle(e).direction === "rtl" && d(
|
|
259
|
-
},
|
|
260
|
-
const t =
|
|
261
|
-
if (
|
|
258
|
+
}, Kn = (e) => {
|
|
259
|
+
window.getComputedStyle(e).direction === "rtl" && d(k(), i.rtl);
|
|
260
|
+
}, Zn = (e) => {
|
|
261
|
+
const t = Un();
|
|
262
|
+
if (Rn()) {
|
|
262
263
|
F("SweetAlert2 requires document to initialize");
|
|
263
264
|
return;
|
|
264
265
|
}
|
|
265
266
|
const n = document.createElement("div");
|
|
266
|
-
n.className = i.container, t && d(n, i["no-transition"]), E(n,
|
|
267
|
-
const o =
|
|
268
|
-
o.appendChild(n),
|
|
267
|
+
n.className = i.container, t && d(n, i["no-transition"]), E(n, Wn), n.dataset.swal2Theme = e.theme;
|
|
268
|
+
const o = Yn(e.target);
|
|
269
|
+
o.appendChild(n), Xn(e), Kn(o), _n();
|
|
269
270
|
}, qe = (e, t) => {
|
|
270
|
-
e instanceof HTMLElement ? t.appendChild(e) : typeof e == "object" ?
|
|
271
|
-
},
|
|
272
|
-
e.jquery ?
|
|
273
|
-
},
|
|
271
|
+
e instanceof HTMLElement ? t.appendChild(e) : typeof e == "object" ? Jn(e, t) : e && E(t, e);
|
|
272
|
+
}, Jn = (e, t) => {
|
|
273
|
+
e.jquery ? Gn(t, e) : E(t, e.toString());
|
|
274
|
+
}, Gn = (e, t) => {
|
|
274
275
|
if (e.textContent = "", 0 in t)
|
|
275
276
|
for (let n = 0; n in t; n++)
|
|
276
277
|
e.appendChild(t[n].cloneNode(!0));
|
|
277
278
|
else
|
|
278
279
|
e.appendChild(t.cloneNode(!0));
|
|
279
|
-
},
|
|
280
|
-
const n =
|
|
281
|
-
!n || !o || (!t.showConfirmButton && !t.showDenyButton && !t.showCancelButton ?
|
|
280
|
+
}, Qn = (e, t) => {
|
|
281
|
+
const n = ee(), o = Y();
|
|
282
|
+
!n || !o || (!t.showConfirmButton && !t.showDenyButton && !t.showCancelButton ? y(n) : g(n), C(n, t, "actions"), eo(n, o, t), E(o, t.loaderHtml || ""), C(o, t, "loader"));
|
|
282
283
|
};
|
|
283
|
-
function
|
|
284
|
+
function eo(e, t, n) {
|
|
284
285
|
const o = $(), s = q(), r = _();
|
|
285
|
-
!o || !s || !r || (Be(o, "confirm", n), Be(s, "deny", n), Be(r, "cancel", n),
|
|
286
|
+
!o || !s || !r || (Be(o, "confirm", n), Be(s, "deny", n), Be(r, "cancel", n), to(o, s, r, n), n.reverseButtons && (n.toast ? (e.insertBefore(r, o), e.insertBefore(s, o)) : (e.insertBefore(r, t), e.insertBefore(s, t), e.insertBefore(o, t))));
|
|
286
287
|
}
|
|
287
|
-
function
|
|
288
|
+
function to(e, t, n, o) {
|
|
288
289
|
if (!o.buttonsStyling) {
|
|
289
290
|
P([e, t, n], i.styled);
|
|
290
291
|
return;
|
|
@@ -296,38 +297,38 @@ function Be(e, t, n) {
|
|
|
296
297
|
/** @type {'Confirm' | 'Deny' | 'Cancel'} */
|
|
297
298
|
$e(t)
|
|
298
299
|
);
|
|
299
|
-
|
|
300
|
+
te(e, n[`show${o}Button`], "inline-block"), E(e, n[`${t}ButtonText`] || ""), e.setAttribute("aria-label", n[`${t}ButtonAriaLabel`] || ""), e.className = i[t], C(e, n, `${t}Button`);
|
|
300
301
|
}
|
|
301
|
-
const
|
|
302
|
+
const no = (e, t) => {
|
|
302
303
|
const n = De();
|
|
303
|
-
n && (E(n, t.closeButtonHtml || ""), C(n, t, "closeButton"),
|
|
304
|
-
},
|
|
305
|
-
const n =
|
|
306
|
-
n && (
|
|
304
|
+
n && (E(n, t.closeButtonHtml || ""), C(n, t, "closeButton"), te(n, t.showCloseButton), n.setAttribute("aria-label", t.closeButtonAriaLabel || ""));
|
|
305
|
+
}, oo = (e, t) => {
|
|
306
|
+
const n = k();
|
|
307
|
+
n && (so(n, t.backdrop), io(n, t.position), ro(n, t.grow), C(n, t, "container"));
|
|
307
308
|
};
|
|
308
|
-
function
|
|
309
|
+
function so(e, t) {
|
|
309
310
|
typeof t == "string" ? e.style.background = t : t || d([document.documentElement, document.body], i["no-backdrop"]);
|
|
310
311
|
}
|
|
311
|
-
function
|
|
312
|
-
t && (t in i ? d(e, i[t]) : (
|
|
312
|
+
function io(e, t) {
|
|
313
|
+
t && (t in i ? d(e, i[t]) : (v('The "position" parameter is not valid, defaulting to "center"'), d(e, i.center)));
|
|
313
314
|
}
|
|
314
|
-
function
|
|
315
|
+
function ro(e, t) {
|
|
315
316
|
t && d(e, i[`grow-${t}`]);
|
|
316
317
|
}
|
|
317
318
|
var f = {
|
|
318
319
|
innerParams: /* @__PURE__ */ new WeakMap(),
|
|
319
320
|
domCache: /* @__PURE__ */ new WeakMap()
|
|
320
321
|
};
|
|
321
|
-
const
|
|
322
|
+
const ao = ["input", "file", "range", "select", "radio", "checkbox", "textarea"], lo = (e, t) => {
|
|
322
323
|
const n = u();
|
|
323
324
|
if (!n)
|
|
324
325
|
return;
|
|
325
326
|
const o = f.innerParams.get(e), s = !o || t.input !== o.input;
|
|
326
|
-
|
|
327
|
+
ao.forEach((r) => {
|
|
327
328
|
const l = M(n, i[r]);
|
|
328
|
-
l && (
|
|
329
|
-
}), t.input && (s &&
|
|
330
|
-
},
|
|
329
|
+
l && (wo(r, t.inputAttributes), l.className = i[r], s && y(l));
|
|
330
|
+
}), t.input && (s && co(t), fo(t));
|
|
331
|
+
}, co = (e) => {
|
|
331
332
|
if (!e.input)
|
|
332
333
|
return;
|
|
333
334
|
if (!m[e.input]) {
|
|
@@ -341,29 +342,29 @@ const io = ["input", "file", "range", "select", "radio", "checkbox", "textarea"]
|
|
|
341
342
|
g(t), e.inputAutoFocus && setTimeout(() => {
|
|
342
343
|
pt(n);
|
|
343
344
|
});
|
|
344
|
-
},
|
|
345
|
+
}, uo = (e) => {
|
|
345
346
|
for (let t = 0; t < e.attributes.length; t++) {
|
|
346
347
|
const n = e.attributes[t].name;
|
|
347
348
|
["id", "type", "value", "style"].includes(n) || e.removeAttribute(n);
|
|
348
349
|
}
|
|
349
|
-
},
|
|
350
|
+
}, wo = (e, t) => {
|
|
350
351
|
const n = u();
|
|
351
352
|
if (!n)
|
|
352
353
|
return;
|
|
353
|
-
const o =
|
|
354
|
+
const o = Ce(n, e);
|
|
354
355
|
if (o) {
|
|
355
|
-
|
|
356
|
+
uo(o);
|
|
356
357
|
for (const s in t)
|
|
357
358
|
o.setAttribute(s, t[s]);
|
|
358
359
|
}
|
|
359
|
-
},
|
|
360
|
+
}, fo = (e) => {
|
|
360
361
|
if (!e.input)
|
|
361
362
|
return;
|
|
362
363
|
const t = vt(e.input);
|
|
363
364
|
t && C(t, e, "input");
|
|
364
365
|
}, Ve = (e, t) => {
|
|
365
366
|
!e.placeholder && t.inputPlaceholder && (e.placeholder = t.inputPlaceholder);
|
|
366
|
-
},
|
|
367
|
+
}, ne = (e, t, n) => {
|
|
367
368
|
if (n.inputLabel) {
|
|
368
369
|
const o = document.createElement("label"), s = i["input-label"];
|
|
369
370
|
o.setAttribute("for", e.id), o.className = s, typeof n.customClass == "object" && d(o, n.customClass.inputLabel), o.innerText = n.inputLabel, t.insertAdjacentElement("beforebegin", o);
|
|
@@ -375,32 +376,32 @@ const io = ["input", "file", "range", "select", "radio", "checkbox", "textarea"]
|
|
|
375
376
|
/** @type {SwalClass} */
|
|
376
377
|
e
|
|
377
378
|
] || i.input);
|
|
378
|
-
},
|
|
379
|
-
["string", "number"].includes(typeof t) ? e.value = `${t}` : Ie(t) ||
|
|
379
|
+
}, de = (e, t) => {
|
|
380
|
+
["string", "number"].includes(typeof t) ? e.value = `${t}` : Ie(t) || v(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`);
|
|
380
381
|
}, m = {};
|
|
381
382
|
m.text = m.email = m.password = m.number = m.tel = m.url = m.search = m.date = m["datetime-local"] = m.time = m.week = m.month = /** @type {(input: Input | HTMLElement, params: SweetAlertOptions) => Input} */
|
|
382
|
-
(e, t) => (
|
|
383
|
-
m.file = (e, t) => (
|
|
383
|
+
(e, t) => (de(e, t.inputValue), ne(e, e, t), Ve(e, t), e.type = t.input, e);
|
|
384
|
+
m.file = (e, t) => (ne(e, e, t), Ve(e, t), e);
|
|
384
385
|
m.range = (e, t) => {
|
|
385
386
|
const n = e.querySelector("input"), o = e.querySelector("output");
|
|
386
|
-
return
|
|
387
|
+
return de(n, t.inputValue), n.type = t.input, de(o, t.inputValue), ne(n, e, t), e;
|
|
387
388
|
};
|
|
388
389
|
m.select = (e, t) => {
|
|
389
390
|
if (e.textContent = "", t.inputPlaceholder) {
|
|
390
391
|
const n = document.createElement("option");
|
|
391
392
|
E(n, t.inputPlaceholder), n.value = "", n.disabled = !0, n.selected = !0, e.appendChild(n);
|
|
392
393
|
}
|
|
393
|
-
return
|
|
394
|
+
return ne(e, e, t), e;
|
|
394
395
|
};
|
|
395
396
|
m.radio = (e) => (e.textContent = "", e);
|
|
396
397
|
m.checkbox = (e, t) => {
|
|
397
|
-
const n =
|
|
398
|
+
const n = Ce(u(), "checkbox");
|
|
398
399
|
n.value = "1", n.checked = !!t.inputValue;
|
|
399
400
|
const o = e.querySelector("span");
|
|
400
401
|
return E(o, t.inputPlaceholder || t.inputLabel), n;
|
|
401
402
|
};
|
|
402
403
|
m.textarea = (e, t) => {
|
|
403
|
-
|
|
404
|
+
de(e, t.inputValue), Ve(e, t), ne(e, e, t);
|
|
404
405
|
const n = (o) => parseInt(window.getComputedStyle(o).marginLeft) + parseInt(window.getComputedStyle(o).marginRight);
|
|
405
406
|
return setTimeout(() => {
|
|
406
407
|
if ("MutationObserver" in window) {
|
|
@@ -417,13 +418,13 @@ m.textarea = (e, t) => {
|
|
|
417
418
|
}
|
|
418
419
|
}), e;
|
|
419
420
|
};
|
|
420
|
-
const
|
|
421
|
+
const mo = (e, t) => {
|
|
421
422
|
const n = Me();
|
|
422
|
-
n && (ze(n), C(n, t, "htmlContainer"), t.html ? (qe(t.html, n), g(n, "block")) : t.text ? (n.textContent = t.text, g(n, "block")) :
|
|
423
|
-
},
|
|
423
|
+
n && (ze(n), C(n, t, "htmlContainer"), t.html ? (qe(t.html, n), g(n, "block")) : t.text ? (n.textContent = t.text, g(n, "block")) : y(n), lo(e, t));
|
|
424
|
+
}, ho = (e, t) => {
|
|
424
425
|
const n = gt();
|
|
425
|
-
n && (ze(n),
|
|
426
|
-
},
|
|
426
|
+
n && (ze(n), te(n, t.footer, "block"), t.footer && qe(t.footer, n), C(n, t, "footer"));
|
|
427
|
+
}, go = (e, t) => {
|
|
427
428
|
const n = f.innerParams.get(e), o = U();
|
|
428
429
|
if (!o)
|
|
429
430
|
return;
|
|
@@ -432,18 +433,18 @@ const wo = (e, t) => {
|
|
|
432
433
|
return;
|
|
433
434
|
}
|
|
434
435
|
if (!t.icon && !t.iconHtml) {
|
|
435
|
-
|
|
436
|
+
y(o);
|
|
436
437
|
return;
|
|
437
438
|
}
|
|
438
|
-
if (t.icon && Object.keys(
|
|
439
|
-
F(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),
|
|
439
|
+
if (t.icon && Object.keys(ce).indexOf(t.icon) === -1) {
|
|
440
|
+
F(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`), y(o);
|
|
440
441
|
return;
|
|
441
442
|
}
|
|
442
443
|
g(o), nt(o, t), tt(o, t), d(o, t.showClass && t.showClass.icon), window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", kt);
|
|
443
444
|
}, tt = (e, t) => {
|
|
444
|
-
for (const [n, o] of Object.entries(
|
|
445
|
+
for (const [n, o] of Object.entries(ce))
|
|
445
446
|
t.icon !== n && P(e, o);
|
|
446
|
-
d(e, t.icon &&
|
|
447
|
+
d(e, t.icon && ce[t.icon]), yo(e, t), kt(), C(e, t, "icon");
|
|
447
448
|
}, kt = () => {
|
|
448
449
|
const e = u();
|
|
449
450
|
if (!e)
|
|
@@ -451,12 +452,12 @@ const wo = (e, t) => {
|
|
|
451
452
|
const t = window.getComputedStyle(e).getPropertyValue("background-color"), n = e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");
|
|
452
453
|
for (let o = 0; o < n.length; o++)
|
|
453
454
|
n[o].style.backgroundColor = t;
|
|
454
|
-
},
|
|
455
|
+
}, po = `
|
|
455
456
|
<div class="swal2-success-circular-line-left"></div>
|
|
456
457
|
<span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
|
|
457
458
|
<div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
|
|
458
459
|
<div class="swal2-success-circular-line-right"></div>
|
|
459
|
-
`,
|
|
460
|
+
`, bo = `
|
|
460
461
|
<span class="swal2-x-mark">
|
|
461
462
|
<span class="swal2-x-mark-line-left"></span>
|
|
462
463
|
<span class="swal2-x-mark-line-right"></span>
|
|
@@ -465,34 +466,34 @@ const wo = (e, t) => {
|
|
|
465
466
|
if (!t.icon && !t.iconHtml)
|
|
466
467
|
return;
|
|
467
468
|
let n = e.innerHTML, o = "";
|
|
468
|
-
t.iconHtml ? o = ot(t.iconHtml) : t.icon === "success" ? (o =
|
|
469
|
+
t.iconHtml ? o = ot(t.iconHtml) : t.icon === "success" ? (o = po, n = n.replace(/ style=".*?"/g, "")) : t.icon === "error" ? o = bo : t.icon && (o = ot({
|
|
469
470
|
question: "?",
|
|
470
471
|
warning: "!",
|
|
471
472
|
info: "i"
|
|
472
473
|
}[t.icon])), n.trim() !== o.trim() && E(e, o);
|
|
473
|
-
},
|
|
474
|
+
}, yo = (e, t) => {
|
|
474
475
|
if (t.iconColor) {
|
|
475
476
|
e.style.color = t.iconColor, e.style.borderColor = t.iconColor;
|
|
476
477
|
for (const n of [".swal2-success-line-tip", ".swal2-success-line-long", ".swal2-x-mark-line-left", ".swal2-x-mark-line-right"])
|
|
477
478
|
Qe(e, n, "background-color", t.iconColor);
|
|
478
479
|
Qe(e, ".swal2-success-ring", "border-color", t.iconColor);
|
|
479
480
|
}
|
|
480
|
-
}, ot = (e) => `<div class="${i["icon-content"]}">${e}</div>`,
|
|
481
|
+
}, ot = (e) => `<div class="${i["icon-content"]}">${e}</div>`, vo = (e, t) => {
|
|
481
482
|
const n = ht();
|
|
482
483
|
if (n) {
|
|
483
484
|
if (!t.imageUrl) {
|
|
484
|
-
|
|
485
|
+
y(n);
|
|
485
486
|
return;
|
|
486
487
|
}
|
|
487
488
|
g(n, ""), n.setAttribute("src", t.imageUrl), n.setAttribute("alt", t.imageAlt || ""), j(n, "width", t.imageWidth), j(n, "height", t.imageHeight), n.className = i.image, C(n, t, "image");
|
|
488
489
|
}
|
|
489
490
|
};
|
|
490
491
|
let Ne = !1, xt = 0, Ct = 0, At = 0, Et = 0;
|
|
491
|
-
const
|
|
492
|
-
e.addEventListener("mousedown",
|
|
493
|
-
},
|
|
494
|
-
e.removeEventListener("mousedown",
|
|
495
|
-
},
|
|
492
|
+
const ko = (e) => {
|
|
493
|
+
e.addEventListener("mousedown", ue), document.body.addEventListener("mousemove", we), e.addEventListener("mouseup", fe), e.addEventListener("touchstart", ue), document.body.addEventListener("touchmove", we), e.addEventListener("touchend", fe);
|
|
494
|
+
}, xo = (e) => {
|
|
495
|
+
e.removeEventListener("mousedown", ue), document.body.removeEventListener("mousemove", we), e.removeEventListener("mouseup", fe), e.removeEventListener("touchstart", ue), document.body.removeEventListener("touchmove", we), e.removeEventListener("touchend", fe);
|
|
496
|
+
}, ue = (e) => {
|
|
496
497
|
const t = u();
|
|
497
498
|
if (e.target === t || U().contains(
|
|
498
499
|
/** @type {HTMLElement} */
|
|
@@ -502,7 +503,7 @@ const yo = (e) => {
|
|
|
502
503
|
const n = Bt(e);
|
|
503
504
|
xt = n.clientX, Ct = n.clientY, At = parseInt(t.style.insetInlineStart) || 0, Et = parseInt(t.style.insetBlockStart) || 0, d(t, "swal2-dragging");
|
|
504
505
|
}
|
|
505
|
-
},
|
|
506
|
+
}, we = (e) => {
|
|
506
507
|
const t = u();
|
|
507
508
|
if (Ne) {
|
|
508
509
|
let {
|
|
@@ -511,7 +512,7 @@ const yo = (e) => {
|
|
|
511
512
|
} = Bt(e);
|
|
512
513
|
t.style.insetInlineStart = `${At + (n - xt)}px`, t.style.insetBlockStart = `${Et + (o - Ct)}px`;
|
|
513
514
|
}
|
|
514
|
-
},
|
|
515
|
+
}, fe = () => {
|
|
515
516
|
const e = u();
|
|
516
517
|
Ne = !1, P(e, "swal2-dragging");
|
|
517
518
|
}, Bt = (e) => {
|
|
@@ -524,8 +525,8 @@ const yo = (e) => {
|
|
|
524
525
|
clientX: t,
|
|
525
526
|
clientY: n
|
|
526
527
|
};
|
|
527
|
-
},
|
|
528
|
-
const n =
|
|
528
|
+
}, Co = (e, t) => {
|
|
529
|
+
const n = k(), o = u();
|
|
529
530
|
if (!(!n || !o)) {
|
|
530
531
|
if (t.toast) {
|
|
531
532
|
j(n, "width", t.width), o.style.width = "100%";
|
|
@@ -533,12 +534,12 @@ const yo = (e) => {
|
|
|
533
534
|
s && o.insertBefore(s, U());
|
|
534
535
|
} else
|
|
535
536
|
j(o, "width", t.width);
|
|
536
|
-
j(o, "padding", t.padding), t.color && (o.style.color = t.color), t.background && (o.style.background = t.background),
|
|
537
|
+
j(o, "padding", t.padding), t.color && (o.style.color = t.color), t.background && (o.style.background = t.background), y(ve()), Ao(o, t), t.draggable && !t.toast ? (d(o, i.draggable), ko(o)) : (P(o, i.draggable), xo(o));
|
|
537
538
|
}
|
|
538
|
-
},
|
|
539
|
+
}, Ao = (e, t) => {
|
|
539
540
|
const n = t.showClass || {};
|
|
540
541
|
e.className = `${i.popup} ${x(e) ? n.popup : ""}`, t.toast ? (d([document.documentElement, document.body], i["toast-shown"]), d(e, i.toast)) : d(e, i.modal), C(e, t, "popup"), typeof t.customClass == "string" && d(e, t.customClass), t.icon && d(e, i[`icon-${t.icon}`]);
|
|
541
|
-
},
|
|
542
|
+
}, Eo = (e, t) => {
|
|
542
543
|
const n = Oe();
|
|
543
544
|
if (!n)
|
|
544
545
|
return;
|
|
@@ -547,36 +548,36 @@ const yo = (e) => {
|
|
|
547
548
|
currentProgressStep: s
|
|
548
549
|
} = t;
|
|
549
550
|
if (!o || o.length === 0 || s === void 0) {
|
|
550
|
-
|
|
551
|
+
y(n);
|
|
551
552
|
return;
|
|
552
553
|
}
|
|
553
|
-
g(n), n.textContent = "", s >= o.length &&
|
|
554
|
-
const c =
|
|
554
|
+
g(n), n.textContent = "", s >= o.length && v("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"), o.forEach((r, l) => {
|
|
555
|
+
const c = Bo(r);
|
|
555
556
|
if (n.appendChild(c), l === s && d(c, i["active-progress-step"]), l !== o.length - 1) {
|
|
556
|
-
const w =
|
|
557
|
+
const w = Po(t);
|
|
557
558
|
n.appendChild(w);
|
|
558
559
|
}
|
|
559
560
|
});
|
|
560
|
-
},
|
|
561
|
+
}, Bo = (e) => {
|
|
561
562
|
const t = document.createElement("li");
|
|
562
563
|
return d(t, i["progress-step"]), E(t, e), t;
|
|
563
|
-
},
|
|
564
|
+
}, Po = (e) => {
|
|
564
565
|
const t = document.createElement("li");
|
|
565
566
|
return d(t, i["progress-step-line"]), e.progressStepsDistance && j(t, "width", e.progressStepsDistance), t;
|
|
566
|
-
},
|
|
567
|
+
}, To = (e, t) => {
|
|
567
568
|
const n = mt();
|
|
568
|
-
n && (ze(n),
|
|
569
|
+
n && (ze(n), te(n, t.title || t.titleText, "block"), t.title && qe(t.title, n), t.titleText && (n.innerText = t.titleText), C(n, t, "title"));
|
|
569
570
|
}, Pt = (e, t) => {
|
|
570
|
-
|
|
571
|
+
Co(e, t), oo(e, t), Eo(e, t), go(e, t), vo(e, t), To(e, t), no(e, t), mo(e, t), Qn(e, t), ho(e, t);
|
|
571
572
|
const n = u();
|
|
572
573
|
typeof t.didRender == "function" && n && t.didRender(n), a.eventEmitter.emit("didRender", n);
|
|
573
|
-
},
|
|
574
|
+
}, Lo = () => x(u()), Tt = () => {
|
|
574
575
|
var e;
|
|
575
576
|
return (e = $()) === null || e === void 0 ? void 0 : e.click();
|
|
576
|
-
},
|
|
577
|
+
}, $o = () => {
|
|
577
578
|
var e;
|
|
578
579
|
return (e = q()) === null || e === void 0 ? void 0 : e.click();
|
|
579
|
-
},
|
|
580
|
+
}, So = () => {
|
|
580
581
|
var e;
|
|
581
582
|
return (e = _()) === null || e === void 0 ? void 0 : e.click();
|
|
582
583
|
}, X = Object.freeze({
|
|
@@ -589,8 +590,8 @@ const yo = (e) => {
|
|
|
589
590
|
e.keydownTarget && e.keydownHandlerAdded && (e.keydownTarget.removeEventListener("keydown", e.keydownHandler, {
|
|
590
591
|
capture: e.keydownListenerCapture
|
|
591
592
|
}), e.keydownHandlerAdded = !1);
|
|
592
|
-
},
|
|
593
|
-
Lt(e), t.toast || (e.keydownHandler = (o) =>
|
|
593
|
+
}, Io = (e, t, n) => {
|
|
594
|
+
Lt(e), t.toast || (e.keydownHandler = (o) => Oo(t, o, n), e.keydownTarget = t.keydownListenerCapture ? window : u(), e.keydownListenerCapture = t.keydownListenerCapture, e.keydownTarget.addEventListener("keydown", e.keydownHandler, {
|
|
594
595
|
capture: e.keydownListenerCapture
|
|
595
596
|
}), e.keydownHandlerAdded = !0);
|
|
596
597
|
}, Te = (e, t) => {
|
|
@@ -601,18 +602,18 @@ const yo = (e) => {
|
|
|
601
602
|
return;
|
|
602
603
|
}
|
|
603
604
|
(n = u()) === null || n === void 0 || n.focus();
|
|
604
|
-
}, $t = ["ArrowRight", "ArrowDown"],
|
|
605
|
-
e && (t.isComposing || t.keyCode === 229 || (e.stopKeydownPropagation && t.stopPropagation(), t.key === "Enter" ?
|
|
606
|
-
},
|
|
607
|
-
if (!
|
|
605
|
+
}, $t = ["ArrowRight", "ArrowDown"], Mo = ["ArrowLeft", "ArrowUp"], Oo = (e, t, n) => {
|
|
606
|
+
e && (t.isComposing || t.keyCode === 229 || (e.stopKeydownPropagation && t.stopPropagation(), t.key === "Enter" ? Do(t, e) : t.key === "Tab" ? Ho(t) : [...$t, ...Mo].includes(t.key) ? jo(t.key) : t.key === "Escape" && zo(t, e, n)));
|
|
607
|
+
}, Do = (e, t) => {
|
|
608
|
+
if (!ye(t.allowEnterKey))
|
|
608
609
|
return;
|
|
609
|
-
const n =
|
|
610
|
+
const n = Ce(u(), t.input);
|
|
610
611
|
if (e.target && n && e.target instanceof HTMLElement && e.target.outerHTML === n.outerHTML) {
|
|
611
612
|
if (["textarea", "file"].includes(t.input))
|
|
612
613
|
return;
|
|
613
614
|
Tt(), e.preventDefault();
|
|
614
615
|
}
|
|
615
|
-
},
|
|
616
|
+
}, Ho = (e) => {
|
|
616
617
|
const t = e.target, n = He();
|
|
617
618
|
let o = -1;
|
|
618
619
|
for (let s = 0; s < n.length; s++)
|
|
@@ -621,8 +622,8 @@ const yo = (e) => {
|
|
|
621
622
|
break;
|
|
622
623
|
}
|
|
623
624
|
e.shiftKey ? Te(o, -1) : Te(o, 1), e.stopPropagation(), e.preventDefault();
|
|
624
|
-
},
|
|
625
|
-
const t =
|
|
625
|
+
}, jo = (e) => {
|
|
626
|
+
const t = ee(), n = $(), o = q(), s = _();
|
|
626
627
|
if (!t || !n || !o || !s)
|
|
627
628
|
return;
|
|
628
629
|
const r = [n, o, s];
|
|
@@ -639,15 +640,15 @@ const yo = (e) => {
|
|
|
639
640
|
}
|
|
640
641
|
c instanceof HTMLButtonElement && c.focus();
|
|
641
642
|
}
|
|
642
|
-
},
|
|
643
|
-
|
|
643
|
+
}, zo = (e, t, n) => {
|
|
644
|
+
ye(t.allowEscapeKey) && (e.preventDefault(), n(X.esc));
|
|
644
645
|
};
|
|
645
646
|
var R = {
|
|
646
647
|
swalPromiseResolve: /* @__PURE__ */ new WeakMap(),
|
|
647
648
|
swalPromiseReject: /* @__PURE__ */ new WeakMap()
|
|
648
649
|
};
|
|
649
|
-
const
|
|
650
|
-
const e =
|
|
650
|
+
const Fo = () => {
|
|
651
|
+
const e = k();
|
|
651
652
|
Array.from(document.body.children).forEach((n) => {
|
|
652
653
|
n.contains(e) || (n.hasAttribute("aria-hidden") && n.setAttribute("data-previous-aria-hidden", n.getAttribute("aria-hidden") || ""), n.setAttribute("aria-hidden", "true"));
|
|
653
654
|
});
|
|
@@ -655,56 +656,56 @@ const jo = () => {
|
|
|
655
656
|
Array.from(document.body.children).forEach((t) => {
|
|
656
657
|
t.hasAttribute("data-previous-aria-hidden") ? (t.setAttribute("aria-hidden", t.getAttribute("data-previous-aria-hidden") || ""), t.removeAttribute("data-previous-aria-hidden")) : t.removeAttribute("aria-hidden");
|
|
657
658
|
});
|
|
658
|
-
}, It = typeof window < "u" && !!window.GestureEvent,
|
|
659
|
+
}, It = typeof window < "u" && !!window.GestureEvent, qo = () => {
|
|
659
660
|
if (It && !S(document.body, i.iosfix)) {
|
|
660
661
|
const e = document.body.scrollTop;
|
|
661
|
-
document.body.style.top = `${e * -1}px`, d(document.body, i.iosfix),
|
|
662
|
+
document.body.style.top = `${e * -1}px`, d(document.body, i.iosfix), Vo();
|
|
662
663
|
}
|
|
663
|
-
},
|
|
664
|
-
const e =
|
|
664
|
+
}, Vo = () => {
|
|
665
|
+
const e = k();
|
|
665
666
|
if (!e)
|
|
666
667
|
return;
|
|
667
668
|
let t;
|
|
668
669
|
e.ontouchstart = (n) => {
|
|
669
|
-
t =
|
|
670
|
+
t = No(n);
|
|
670
671
|
}, e.ontouchmove = (n) => {
|
|
671
672
|
t && (n.preventDefault(), n.stopPropagation());
|
|
672
673
|
};
|
|
673
|
-
},
|
|
674
|
-
const t = e.target, n =
|
|
675
|
-
return !n || !o ||
|
|
674
|
+
}, No = (e) => {
|
|
675
|
+
const t = e.target, n = k(), o = Me();
|
|
676
|
+
return !n || !o || Ro(e) || Wo(e) ? !1 : t === n || !et(n) && t instanceof HTMLElement && t.tagName !== "INPUT" && // #1603
|
|
676
677
|
t.tagName !== "TEXTAREA" && // #2266
|
|
677
678
|
!(et(o) && // #1944
|
|
678
679
|
o.contains(t));
|
|
679
|
-
},
|
|
680
|
+
}, Ro = (e) => e.touches && e.touches.length && e.touches[0].touchType === "stylus", Wo = (e) => e.touches && e.touches.length > 1, Uo = () => {
|
|
680
681
|
if (S(document.body, i.iosfix)) {
|
|
681
682
|
const e = parseInt(document.body.style.top, 10);
|
|
682
683
|
P(document.body, i.iosfix), document.body.style.top = "", document.body.scrollTop = e * -1;
|
|
683
684
|
}
|
|
684
|
-
},
|
|
685
|
+
}, _o = () => {
|
|
685
686
|
const e = document.createElement("div");
|
|
686
687
|
e.className = i["scrollbar-measure"], document.body.appendChild(e);
|
|
687
688
|
const t = e.getBoundingClientRect().width - e.clientWidth;
|
|
688
689
|
return document.body.removeChild(e), t;
|
|
689
690
|
};
|
|
690
691
|
let V = null;
|
|
691
|
-
const
|
|
692
|
-
V === null && (document.body.scrollHeight > window.innerHeight || e === "scroll") && (V = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = `${V +
|
|
693
|
-
},
|
|
692
|
+
const Yo = (e) => {
|
|
693
|
+
V === null && (document.body.scrollHeight > window.innerHeight || e === "scroll") && (V = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = `${V + _o()}px`);
|
|
694
|
+
}, Xo = () => {
|
|
694
695
|
V !== null && (document.body.style.paddingRight = `${V}px`, V = null);
|
|
695
696
|
};
|
|
696
697
|
function Mt(e, t, n, o) {
|
|
697
|
-
|
|
698
|
+
xe() ? st(e, o) : (In(n).then(() => st(e, o)), Lt(a)), It ? (t.setAttribute("style", "display:none !important"), t.removeAttribute("class"), t.innerHTML = "") : t.remove(), je() && (Xo(), Uo(), St()), Ko();
|
|
698
699
|
}
|
|
699
|
-
function
|
|
700
|
+
function Ko() {
|
|
700
701
|
P([document.documentElement, document.body], [i.shown, i["height-auto"], i["no-backdrop"], i["toast-shown"]]);
|
|
701
702
|
}
|
|
702
703
|
function O(e) {
|
|
703
|
-
e =
|
|
704
|
-
const t = R.swalPromiseResolve.get(this), n =
|
|
705
|
-
this.isAwaitingPromise ? e.isDismissed || (
|
|
704
|
+
e = Jo(e);
|
|
705
|
+
const t = R.swalPromiseResolve.get(this), n = Zo(this);
|
|
706
|
+
this.isAwaitingPromise ? e.isDismissed || (oe(this), t(e)) : n && t(e);
|
|
706
707
|
}
|
|
707
|
-
const
|
|
708
|
+
const Zo = (e) => {
|
|
708
709
|
const t = u();
|
|
709
710
|
if (!t)
|
|
710
711
|
return !1;
|
|
@@ -712,16 +713,16 @@ const Xo = (e) => {
|
|
|
712
713
|
if (!n || S(t, n.hideClass.popup))
|
|
713
714
|
return !1;
|
|
714
715
|
P(t, n.showClass.popup), d(t, n.hideClass.popup);
|
|
715
|
-
const o =
|
|
716
|
-
return P(o, n.showClass.backdrop), d(o, n.hideClass.backdrop),
|
|
716
|
+
const o = k();
|
|
717
|
+
return P(o, n.showClass.backdrop), d(o, n.hideClass.backdrop), Go(e, t, n), !0;
|
|
717
718
|
};
|
|
718
719
|
function Ot(e) {
|
|
719
720
|
const t = R.swalPromiseReject.get(this);
|
|
720
|
-
|
|
721
|
+
oe(this), t && t(e);
|
|
721
722
|
}
|
|
722
|
-
const
|
|
723
|
+
const oe = (e) => {
|
|
723
724
|
e.isAwaitingPromise && (delete e.isAwaitingPromise, f.innerParams.get(e) || e._destroy());
|
|
724
|
-
},
|
|
725
|
+
}, Jo = (e) => typeof e > "u" ? {
|
|
725
726
|
isConfirmed: !1,
|
|
726
727
|
isDenied: !1,
|
|
727
728
|
isDismissed: !0
|
|
@@ -729,11 +730,11 @@ const ne = (e) => {
|
|
|
729
730
|
isConfirmed: !1,
|
|
730
731
|
isDenied: !1,
|
|
731
732
|
isDismissed: !1
|
|
732
|
-
}, e),
|
|
733
|
+
}, e), Go = (e, t, n) => {
|
|
733
734
|
var o;
|
|
734
|
-
const s =
|
|
735
|
-
typeof n.willClose == "function" && n.willClose(t), (o = a.eventEmitter) === null || o === void 0 || o.emit("willClose", t), r ?
|
|
736
|
-
},
|
|
735
|
+
const s = k(), r = yt(t);
|
|
736
|
+
typeof n.willClose == "function" && n.willClose(t), (o = a.eventEmitter) === null || o === void 0 || o.emit("willClose", t), r ? Qo(e, t, s, n.returnFocus, n.didClose) : Mt(e, s, n.returnFocus, n.didClose);
|
|
737
|
+
}, Qo = (e, t, n, o, s) => {
|
|
737
738
|
a.swalCloseEventFinishedCallback = Mt.bind(null, e, n, o, s);
|
|
738
739
|
const r = function(l) {
|
|
739
740
|
if (l.target === t) {
|
|
@@ -749,48 +750,48 @@ const ne = (e) => {
|
|
|
749
750
|
});
|
|
750
751
|
}, W = (e) => {
|
|
751
752
|
let t = u();
|
|
752
|
-
if (t || new
|
|
753
|
+
if (t || new be(), t = u(), !t)
|
|
753
754
|
return;
|
|
754
755
|
const n = Y();
|
|
755
|
-
|
|
756
|
-
}, Go = (e, t) => {
|
|
757
|
-
const n = Q(), o = Y();
|
|
758
|
-
!n || !o || (!t && x($()) && (t = $()), g(n), t && (p(t), o.setAttribute("data-button-to-replace", t.className), n.insertBefore(o, t)), d([e, n], i.loading));
|
|
759
|
-
}, Qo = (e, t) => {
|
|
760
|
-
t.input === "select" || t.input === "radio" ? ss(e, t) : ["text", "email", "number", "tel", "textarea"].some((n) => n === t.input) && (Se(t.inputValue) || Ie(t.inputValue)) && (W($()), is(e, t));
|
|
756
|
+
xe() ? y(U()) : es(t, e), g(n), t.setAttribute("data-loading", "true"), t.setAttribute("aria-busy", "true"), t.focus();
|
|
761
757
|
}, es = (e, t) => {
|
|
758
|
+
const n = ee(), o = Y();
|
|
759
|
+
!n || !o || (!t && x($()) && (t = $()), g(n), t && (y(t), o.setAttribute("data-button-to-replace", t.className), n.insertBefore(o, t)), d([e, n], i.loading));
|
|
760
|
+
}, ts = (e, t) => {
|
|
761
|
+
t.input === "select" || t.input === "radio" ? rs(e, t) : ["text", "email", "number", "tel", "textarea"].some((n) => n === t.input) && (Se(t.inputValue) || Ie(t.inputValue)) && (W($()), as(e, t));
|
|
762
|
+
}, ns = (e, t) => {
|
|
762
763
|
const n = e.getInput();
|
|
763
764
|
if (!n)
|
|
764
765
|
return null;
|
|
765
766
|
switch (t.input) {
|
|
766
767
|
case "checkbox":
|
|
767
|
-
return
|
|
768
|
+
return os(n);
|
|
768
769
|
case "radio":
|
|
769
|
-
return
|
|
770
|
+
return ss(n);
|
|
770
771
|
case "file":
|
|
771
|
-
return
|
|
772
|
+
return is(n);
|
|
772
773
|
default:
|
|
773
774
|
return t.inputAutoTrim ? n.value.trim() : n.value;
|
|
774
775
|
}
|
|
775
|
-
},
|
|
776
|
+
}, os = (e) => e.checked ? 1 : 0, ss = (e) => e.checked ? e.value : null, is = (e) => e.files && e.files.length ? e.getAttribute("multiple") !== null ? e.files : e.files[0] : null, rs = (e, t) => {
|
|
776
777
|
const n = u();
|
|
777
778
|
if (!n)
|
|
778
779
|
return;
|
|
779
780
|
const o = (s) => {
|
|
780
|
-
t.input === "select" ?
|
|
781
|
+
t.input === "select" ? ls(n, me(s), t) : t.input === "radio" && cs(n, me(s), t);
|
|
781
782
|
};
|
|
782
|
-
Se(t.inputOptions) || Ie(t.inputOptions) ? (W($()),
|
|
783
|
+
Se(t.inputOptions) || Ie(t.inputOptions) ? (W($()), G(t.inputOptions).then((s) => {
|
|
783
784
|
e.hideLoading(), o(s);
|
|
784
785
|
})) : typeof t.inputOptions == "object" ? o(t.inputOptions) : F(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof t.inputOptions}`);
|
|
785
|
-
},
|
|
786
|
+
}, as = (e, t) => {
|
|
786
787
|
const n = e.getInput();
|
|
787
|
-
n && (
|
|
788
|
+
n && (y(n), G(t.inputValue).then((o) => {
|
|
788
789
|
n.value = t.input === "number" ? `${parseFloat(o) || 0}` : `${o}`, g(n), n.focus(), e.hideLoading();
|
|
789
790
|
}).catch((o) => {
|
|
790
791
|
F(`Error in inputValue promise: ${o}`), n.value = "", g(n), n.focus(), e.hideLoading();
|
|
791
792
|
}));
|
|
792
793
|
};
|
|
793
|
-
function
|
|
794
|
+
function ls(e, t, n) {
|
|
794
795
|
const o = M(e, i.select);
|
|
795
796
|
if (!o)
|
|
796
797
|
return;
|
|
@@ -807,7 +808,7 @@ function rs(e, t, n) {
|
|
|
807
808
|
s(o, c, l);
|
|
808
809
|
}), o.focus();
|
|
809
810
|
}
|
|
810
|
-
function
|
|
811
|
+
function cs(e, t, n) {
|
|
811
812
|
const o = M(e, i.radio);
|
|
812
813
|
if (!o)
|
|
813
814
|
return;
|
|
@@ -820,22 +821,22 @@ function as(e, t, n) {
|
|
|
820
821
|
const s = o.querySelectorAll("input");
|
|
821
822
|
s.length && s[0].focus();
|
|
822
823
|
}
|
|
823
|
-
const
|
|
824
|
+
const me = (e) => {
|
|
824
825
|
const t = [];
|
|
825
826
|
return e instanceof Map ? e.forEach((n, o) => {
|
|
826
827
|
let s = n;
|
|
827
|
-
typeof s == "object" && (s =
|
|
828
|
+
typeof s == "object" && (s = me(s)), t.push([o, s]);
|
|
828
829
|
}) : Object.keys(e).forEach((n) => {
|
|
829
830
|
let o = e[n];
|
|
830
|
-
typeof o == "object" && (o =
|
|
831
|
+
typeof o == "object" && (o = me(o)), t.push([n, o]);
|
|
831
832
|
}), t;
|
|
832
|
-
}, Dt = (e, t) => !!t && t.toString() === e.toString(),
|
|
833
|
+
}, Dt = (e, t) => !!t && t.toString() === e.toString(), ds = (e) => {
|
|
833
834
|
const t = f.innerParams.get(e);
|
|
834
835
|
e.disableButtons(), t.input ? Ht(e, "confirm") : We(e, !0);
|
|
835
|
-
},
|
|
836
|
+
}, us = (e) => {
|
|
836
837
|
const t = f.innerParams.get(e);
|
|
837
838
|
e.disableButtons(), t.returnInputValueOnDeny ? Ht(e, "deny") : Re(e, !1);
|
|
838
|
-
},
|
|
839
|
+
}, ws = (e, t) => {
|
|
839
840
|
e.disableButtons(), t(X.cancel);
|
|
840
841
|
}, Ht = (e, t) => {
|
|
841
842
|
const n = f.innerParams.get(e);
|
|
@@ -843,17 +844,17 @@ const fe = (e) => {
|
|
|
843
844
|
F(`The "input" parameter is needed to be set when using returnInputValueOn${$e(t)}`);
|
|
844
845
|
return;
|
|
845
846
|
}
|
|
846
|
-
const o = e.getInput(), s =
|
|
847
|
-
n.inputValidator ?
|
|
848
|
-
},
|
|
847
|
+
const o = e.getInput(), s = ns(e, n);
|
|
848
|
+
n.inputValidator ? fs(e, s, t) : o && !o.checkValidity() ? (e.enableButtons(), e.showValidationMessage(n.validationMessage || o.validationMessage)) : t === "deny" ? Re(e, s) : We(e, s);
|
|
849
|
+
}, fs = (e, t, n) => {
|
|
849
850
|
const o = f.innerParams.get(e);
|
|
850
|
-
e.disableInput(), Promise.resolve().then(() =>
|
|
851
|
+
e.disableInput(), Promise.resolve().then(() => G(o.inputValidator(t, o.validationMessage))).then((r) => {
|
|
851
852
|
e.enableButtons(), e.enableInput(), r ? e.showValidationMessage(r) : n === "deny" ? Re(e, t) : We(e, t);
|
|
852
853
|
});
|
|
853
854
|
}, Re = (e, t) => {
|
|
854
855
|
const n = f.innerParams.get(e || void 0);
|
|
855
|
-
n.showLoaderOnDeny && W(q()), n.preDeny ? (e.isAwaitingPromise = !0, Promise.resolve().then(() =>
|
|
856
|
-
s === !1 ? (e.hideLoading(),
|
|
856
|
+
n.showLoaderOnDeny && W(q()), n.preDeny ? (e.isAwaitingPromise = !0, Promise.resolve().then(() => G(n.preDeny(t, n.validationMessage))).then((s) => {
|
|
857
|
+
s === !1 ? (e.hideLoading(), oe(e)) : e.close({
|
|
857
858
|
isDenied: !0,
|
|
858
859
|
value: typeof s > "u" ? t : s
|
|
859
860
|
});
|
|
@@ -870,24 +871,24 @@ const fe = (e) => {
|
|
|
870
871
|
e.rejectPromise(t);
|
|
871
872
|
}, We = (e, t) => {
|
|
872
873
|
const n = f.innerParams.get(e || void 0);
|
|
873
|
-
n.showLoaderOnConfirm && W(), n.preConfirm ? (e.resetValidationMessage(), e.isAwaitingPromise = !0, Promise.resolve().then(() =>
|
|
874
|
-
x(
|
|
874
|
+
n.showLoaderOnConfirm && W(), n.preConfirm ? (e.resetValidationMessage(), e.isAwaitingPromise = !0, Promise.resolve().then(() => G(n.preConfirm(t, n.validationMessage))).then((s) => {
|
|
875
|
+
x(ve()) || s === !1 ? (e.hideLoading(), oe(e)) : it(e, typeof s > "u" ? t : s);
|
|
875
876
|
}).catch((s) => jt(e || void 0, s))) : it(e, t);
|
|
876
877
|
};
|
|
877
|
-
function
|
|
878
|
+
function he() {
|
|
878
879
|
const e = f.innerParams.get(this);
|
|
879
880
|
if (!e)
|
|
880
881
|
return;
|
|
881
882
|
const t = f.domCache.get(this);
|
|
882
|
-
|
|
883
|
+
y(t.loader), xe() ? e.icon && g(U()) : ms(t), P([t.popup, t.actions], i.loading), t.popup.removeAttribute("aria-busy"), t.popup.removeAttribute("data-loading"), t.confirmButton.disabled = !1, t.denyButton.disabled = !1, t.cancelButton.disabled = !1;
|
|
883
884
|
}
|
|
884
|
-
const
|
|
885
|
+
const ms = (e) => {
|
|
885
886
|
const t = e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));
|
|
886
|
-
t.length ? g(t[0], "inline-block") :
|
|
887
|
+
t.length ? g(t[0], "inline-block") : Vn() && y(e.actions);
|
|
887
888
|
};
|
|
888
889
|
function zt() {
|
|
889
890
|
const e = f.innerParams.get(this), t = f.domCache.get(this);
|
|
890
|
-
return t ?
|
|
891
|
+
return t ? Ce(t.popup, e.input) : null;
|
|
891
892
|
}
|
|
892
893
|
function Ft(e, t, n) {
|
|
893
894
|
const o = f.domCache.get(e);
|
|
@@ -925,7 +926,7 @@ function Ut(e) {
|
|
|
925
926
|
}
|
|
926
927
|
function _t() {
|
|
927
928
|
const e = f.domCache.get(this);
|
|
928
|
-
e.validationMessage &&
|
|
929
|
+
e.validationMessage && y(e.validationMessage);
|
|
929
930
|
const t = this.getInput();
|
|
930
931
|
t && (t.removeAttribute("aria-invalid"), t.removeAttribute("aria-describedby"), P(t, i.inputerror));
|
|
931
932
|
}
|
|
@@ -1021,27 +1022,27 @@ const N = {
|
|
|
1021
1022
|
didClose: void 0,
|
|
1022
1023
|
didDestroy: void 0,
|
|
1023
1024
|
scrollbarPadding: !0
|
|
1024
|
-
},
|
|
1025
|
+
}, hs = ["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"], gs = {
|
|
1025
1026
|
allowEnterKey: void 0
|
|
1026
|
-
},
|
|
1027
|
-
Yt(e) ||
|
|
1028
|
-
},
|
|
1029
|
-
|
|
1030
|
-
},
|
|
1027
|
+
}, ps = ["allowOutsideClick", "allowEnterKey", "backdrop", "draggable", "focusConfirm", "focusDeny", "focusCancel", "returnFocus", "heightAuto", "keydownListenerCapture"], Yt = (e) => Object.prototype.hasOwnProperty.call(N, e), Xt = (e) => hs.indexOf(e) !== -1, Kt = (e) => gs[e], bs = (e) => {
|
|
1028
|
+
Yt(e) || v(`Unknown parameter "${e}"`);
|
|
1029
|
+
}, ys = (e) => {
|
|
1030
|
+
ps.includes(e) && v(`The parameter "${e}" is incompatible with toasts`);
|
|
1031
|
+
}, vs = (e) => {
|
|
1031
1032
|
const t = Kt(e);
|
|
1032
1033
|
t && ft(e, t);
|
|
1033
1034
|
}, Zt = (e) => {
|
|
1034
|
-
e.backdrop === !1 && e.allowOutsideClick &&
|
|
1035
|
+
e.backdrop === !1 && e.allowOutsideClick && v('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'), e.theme && !["light", "dark", "auto"].includes(e.theme) && v(`Invalid theme "${e.theme}". Expected "light", "dark", or "auto"`);
|
|
1035
1036
|
for (const t in e)
|
|
1036
|
-
|
|
1037
|
+
bs(t), e.toast && ys(t), vs(t);
|
|
1037
1038
|
};
|
|
1038
1039
|
function Jt(e) {
|
|
1039
|
-
const t =
|
|
1040
|
+
const t = k(), n = u(), o = f.innerParams.get(this);
|
|
1040
1041
|
if (!n || S(n, o.hideClass.popup)) {
|
|
1041
|
-
|
|
1042
|
+
v("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.");
|
|
1042
1043
|
return;
|
|
1043
1044
|
}
|
|
1044
|
-
const s =
|
|
1045
|
+
const s = ks(e), r = Object.assign({}, o, s);
|
|
1045
1046
|
Zt(r), t.dataset.swal2Theme = r.theme, Pt(this, r), f.innerParams.set(this, r), Object.defineProperties(this, {
|
|
1046
1047
|
params: {
|
|
1047
1048
|
value: Object.assign({}, this.params, e),
|
|
@@ -1050,10 +1051,10 @@ function Jt(e) {
|
|
|
1050
1051
|
}
|
|
1051
1052
|
});
|
|
1052
1053
|
}
|
|
1053
|
-
const
|
|
1054
|
+
const ks = (e) => {
|
|
1054
1055
|
const t = {};
|
|
1055
1056
|
return Object.keys(e).forEach((n) => {
|
|
1056
|
-
Xt(n) ? t[n] = e[n] :
|
|
1057
|
+
Xt(n) ? t[n] = e[n] : v(`Invalid parameter to update: ${n}`);
|
|
1057
1058
|
}), t;
|
|
1058
1059
|
};
|
|
1059
1060
|
function Gt() {
|
|
@@ -1062,9 +1063,9 @@ function Gt() {
|
|
|
1062
1063
|
Qt(this);
|
|
1063
1064
|
return;
|
|
1064
1065
|
}
|
|
1065
|
-
e.popup && a.swalCloseEventFinishedCallback && (a.swalCloseEventFinishedCallback(), delete a.swalCloseEventFinishedCallback), typeof t.didDestroy == "function" && t.didDestroy(), a.eventEmitter.emit("didDestroy"),
|
|
1066
|
+
e.popup && a.swalCloseEventFinishedCallback && (a.swalCloseEventFinishedCallback(), delete a.swalCloseEventFinishedCallback), typeof t.didDestroy == "function" && t.didDestroy(), a.eventEmitter.emit("didDestroy"), xs(this);
|
|
1066
1067
|
}
|
|
1067
|
-
const
|
|
1068
|
+
const xs = (e) => {
|
|
1068
1069
|
Qt(e), delete e.params, delete a.keydownHandler, delete a.keydownTarget, delete a.currentInstance;
|
|
1069
1070
|
}, Qt = (e) => {
|
|
1070
1071
|
e.isAwaitingPromise ? (Pe(f, e), e.isAwaitingPromise = !0) : (Pe(R, e), Pe(f, e), delete e.isAwaitingPromise, delete e.disableButtons, delete e.enableButtons, delete e.getInput, delete e.disableInput, delete e.enableInput, delete e.hideLoading, delete e.disableLoading, delete e.showValidationMessage, delete e.resetValidationMessage, delete e.close, delete e.closePopup, delete e.closeModal, delete e.closeToast, delete e.rejectPromise, delete e.update, delete e._destroy);
|
|
@@ -1072,7 +1073,7 @@ const vs = (e) => {
|
|
|
1072
1073
|
for (const n in e)
|
|
1073
1074
|
e[n].delete(t);
|
|
1074
1075
|
};
|
|
1075
|
-
var
|
|
1076
|
+
var Cs = /* @__PURE__ */ Object.freeze({
|
|
1076
1077
|
__proto__: null,
|
|
1077
1078
|
_destroy: Gt,
|
|
1078
1079
|
close: O,
|
|
@@ -1081,60 +1082,60 @@ var ks = /* @__PURE__ */ Object.freeze({
|
|
|
1081
1082
|
closeToast: O,
|
|
1082
1083
|
disableButtons: Nt,
|
|
1083
1084
|
disableInput: Wt,
|
|
1084
|
-
disableLoading:
|
|
1085
|
+
disableLoading: he,
|
|
1085
1086
|
enableButtons: Vt,
|
|
1086
1087
|
enableInput: Rt,
|
|
1087
1088
|
getInput: zt,
|
|
1088
|
-
handleAwaitingPromise:
|
|
1089
|
-
hideLoading:
|
|
1089
|
+
handleAwaitingPromise: oe,
|
|
1090
|
+
hideLoading: he,
|
|
1090
1091
|
rejectPromise: Ot,
|
|
1091
1092
|
resetValidationMessage: _t,
|
|
1092
1093
|
showValidationMessage: Ut,
|
|
1093
1094
|
update: Jt
|
|
1094
1095
|
});
|
|
1095
|
-
const
|
|
1096
|
-
e.toast ?
|
|
1097
|
-
},
|
|
1096
|
+
const As = (e, t, n) => {
|
|
1097
|
+
e.toast ? Es(e, t, n) : (Ps(t), Ts(t), Ls(e, t, n));
|
|
1098
|
+
}, Es = (e, t, n) => {
|
|
1098
1099
|
t.popup.onclick = () => {
|
|
1099
|
-
e && (
|
|
1100
|
+
e && (Bs(e) || e.timer || e.input) || n(X.close);
|
|
1100
1101
|
};
|
|
1101
|
-
},
|
|
1102
|
-
let
|
|
1103
|
-
const
|
|
1102
|
+
}, Bs = (e) => !!(e.showConfirmButton || e.showDenyButton || e.showCancelButton || e.showCloseButton);
|
|
1103
|
+
let ge = !1;
|
|
1104
|
+
const Ps = (e) => {
|
|
1104
1105
|
e.popup.onmousedown = () => {
|
|
1105
1106
|
e.container.onmouseup = function(t) {
|
|
1106
1107
|
e.container.onmouseup = () => {
|
|
1107
|
-
}, t.target === e.container && (
|
|
1108
|
+
}, t.target === e.container && (ge = !0);
|
|
1108
1109
|
};
|
|
1109
1110
|
};
|
|
1110
|
-
},
|
|
1111
|
+
}, Ts = (e) => {
|
|
1111
1112
|
e.container.onmousedown = (t) => {
|
|
1112
1113
|
t.target === e.container && t.preventDefault(), e.popup.onmouseup = function(n) {
|
|
1113
1114
|
e.popup.onmouseup = () => {
|
|
1114
|
-
}, (n.target === e.popup || n.target instanceof HTMLElement && e.popup.contains(n.target)) && (
|
|
1115
|
+
}, (n.target === e.popup || n.target instanceof HTMLElement && e.popup.contains(n.target)) && (ge = !0);
|
|
1115
1116
|
};
|
|
1116
1117
|
};
|
|
1117
|
-
},
|
|
1118
|
+
}, Ls = (e, t, n) => {
|
|
1118
1119
|
t.container.onclick = (o) => {
|
|
1119
|
-
if (
|
|
1120
|
-
|
|
1120
|
+
if (ge) {
|
|
1121
|
+
ge = !1;
|
|
1121
1122
|
return;
|
|
1122
1123
|
}
|
|
1123
|
-
o.target === t.container &&
|
|
1124
|
+
o.target === t.container && ye(e.allowOutsideClick) && n(X.backdrop);
|
|
1124
1125
|
};
|
|
1125
|
-
},
|
|
1126
|
+
}, $s = (e) => typeof e == "object" && e.jquery, rt = (e) => e instanceof Element || $s(e), Ss = (e) => {
|
|
1126
1127
|
const t = {};
|
|
1127
1128
|
return typeof e[0] == "object" && !rt(e[0]) ? Object.assign(t, e[0]) : ["title", "html", "icon"].forEach((n, o) => {
|
|
1128
1129
|
const s = e[o];
|
|
1129
1130
|
typeof s == "string" || rt(s) ? t[n] = s : s !== void 0 && F(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof s}`);
|
|
1130
1131
|
}), t;
|
|
1131
1132
|
};
|
|
1132
|
-
function
|
|
1133
|
+
function Is() {
|
|
1133
1134
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
1134
1135
|
t[n] = arguments[n];
|
|
1135
1136
|
return new this(...t);
|
|
1136
1137
|
}
|
|
1137
|
-
function
|
|
1138
|
+
function Ms(e) {
|
|
1138
1139
|
class t extends this {
|
|
1139
1140
|
_main(o, s) {
|
|
1140
1141
|
return super._main(o, Object.assign({}, e, s));
|
|
@@ -1142,30 +1143,30 @@ function Ss(e) {
|
|
|
1142
1143
|
}
|
|
1143
1144
|
return t;
|
|
1144
1145
|
}
|
|
1145
|
-
const
|
|
1146
|
+
const Os = () => a.timeout && a.timeout.getTimerLeft(), en = () => {
|
|
1146
1147
|
if (a.timeout)
|
|
1147
|
-
return
|
|
1148
|
+
return Nn(), a.timeout.stop();
|
|
1148
1149
|
}, tn = () => {
|
|
1149
1150
|
if (a.timeout) {
|
|
1150
1151
|
const e = a.timeout.start();
|
|
1151
1152
|
return Fe(e), e;
|
|
1152
1153
|
}
|
|
1153
|
-
},
|
|
1154
|
+
}, Ds = () => {
|
|
1154
1155
|
const e = a.timeout;
|
|
1155
1156
|
return e && (e.running ? en() : tn());
|
|
1156
|
-
},
|
|
1157
|
+
}, Hs = (e) => {
|
|
1157
1158
|
if (a.timeout) {
|
|
1158
1159
|
const t = a.timeout.increase(e);
|
|
1159
1160
|
return Fe(t, !0), t;
|
|
1160
1161
|
}
|
|
1161
|
-
},
|
|
1162
|
+
}, js = () => !!(a.timeout && a.timeout.isRunning());
|
|
1162
1163
|
let at = !1;
|
|
1163
1164
|
const Le = {};
|
|
1164
|
-
function
|
|
1165
|
+
function zs() {
|
|
1165
1166
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "data-swal-template";
|
|
1166
|
-
Le[e] = this, at || (document.body.addEventListener("click",
|
|
1167
|
+
Le[e] = this, at || (document.body.addEventListener("click", Fs), at = !0);
|
|
1167
1168
|
}
|
|
1168
|
-
const
|
|
1169
|
+
const Fs = (e) => {
|
|
1169
1170
|
for (let t = e.target; t && t !== document; t = t.parentNode)
|
|
1170
1171
|
for (const n in Le) {
|
|
1171
1172
|
const o = t.getAttribute(n);
|
|
@@ -1177,7 +1178,7 @@ const js = (e) => {
|
|
|
1177
1178
|
}
|
|
1178
1179
|
}
|
|
1179
1180
|
};
|
|
1180
|
-
class
|
|
1181
|
+
class qs {
|
|
1181
1182
|
constructor() {
|
|
1182
1183
|
this.events = {};
|
|
1183
1184
|
}
|
|
@@ -1248,64 +1249,64 @@ class zs {
|
|
|
1248
1249
|
this.events = {};
|
|
1249
1250
|
}
|
|
1250
1251
|
}
|
|
1251
|
-
a.eventEmitter = new
|
|
1252
|
-
const
|
|
1252
|
+
a.eventEmitter = new qs();
|
|
1253
|
+
const Vs = (e, t) => {
|
|
1253
1254
|
a.eventEmitter.on(e, t);
|
|
1254
|
-
},
|
|
1255
|
+
}, Ns = (e, t) => {
|
|
1255
1256
|
a.eventEmitter.once(e, t);
|
|
1256
|
-
},
|
|
1257
|
+
}, Rs = (e, t) => {
|
|
1257
1258
|
if (!e) {
|
|
1258
1259
|
a.eventEmitter.reset();
|
|
1259
1260
|
return;
|
|
1260
1261
|
}
|
|
1261
1262
|
t ? a.eventEmitter.removeListener(e, t) : a.eventEmitter.removeAllListeners(e);
|
|
1262
1263
|
};
|
|
1263
|
-
var
|
|
1264
|
+
var Ws = /* @__PURE__ */ Object.freeze({
|
|
1264
1265
|
__proto__: null,
|
|
1265
|
-
argsToParams:
|
|
1266
|
-
bindClickHandler:
|
|
1267
|
-
clickCancel:
|
|
1266
|
+
argsToParams: Ss,
|
|
1267
|
+
bindClickHandler: zs,
|
|
1268
|
+
clickCancel: So,
|
|
1268
1269
|
clickConfirm: Tt,
|
|
1269
|
-
clickDeny:
|
|
1270
|
+
clickDeny: $o,
|
|
1270
1271
|
enableLoading: W,
|
|
1271
|
-
fire:
|
|
1272
|
-
getActions:
|
|
1272
|
+
fire: Is,
|
|
1273
|
+
getActions: ee,
|
|
1273
1274
|
getCancelButton: _,
|
|
1274
1275
|
getCloseButton: De,
|
|
1275
1276
|
getConfirmButton: $,
|
|
1276
|
-
getContainer:
|
|
1277
|
+
getContainer: k,
|
|
1277
1278
|
getDenyButton: q,
|
|
1278
1279
|
getFocusableElements: He,
|
|
1279
1280
|
getFooter: gt,
|
|
1280
1281
|
getHtmlContainer: Me,
|
|
1281
1282
|
getIcon: U,
|
|
1282
|
-
getIconContent:
|
|
1283
|
+
getIconContent: Hn,
|
|
1283
1284
|
getImage: ht,
|
|
1284
|
-
getInputLabel:
|
|
1285
|
+
getInputLabel: jn,
|
|
1285
1286
|
getLoader: Y,
|
|
1286
1287
|
getPopup: u,
|
|
1287
1288
|
getProgressSteps: Oe,
|
|
1288
|
-
getTimerLeft:
|
|
1289
|
-
getTimerProgressBar:
|
|
1289
|
+
getTimerLeft: Os,
|
|
1290
|
+
getTimerProgressBar: ke,
|
|
1290
1291
|
getTitle: mt,
|
|
1291
|
-
getValidationMessage:
|
|
1292
|
-
increaseTimer:
|
|
1292
|
+
getValidationMessage: ve,
|
|
1293
|
+
increaseTimer: Hs,
|
|
1293
1294
|
isDeprecatedParameter: Kt,
|
|
1294
|
-
isLoading:
|
|
1295
|
-
isTimerRunning:
|
|
1295
|
+
isLoading: Fn,
|
|
1296
|
+
isTimerRunning: js,
|
|
1296
1297
|
isUpdatableParameter: Xt,
|
|
1297
1298
|
isValidParameter: Yt,
|
|
1298
|
-
isVisible:
|
|
1299
|
-
mixin:
|
|
1300
|
-
off:
|
|
1301
|
-
on:
|
|
1302
|
-
once:
|
|
1299
|
+
isVisible: Lo,
|
|
1300
|
+
mixin: Ms,
|
|
1301
|
+
off: Rs,
|
|
1302
|
+
on: Vs,
|
|
1303
|
+
once: Ns,
|
|
1303
1304
|
resumeTimer: tn,
|
|
1304
1305
|
showLoading: W,
|
|
1305
1306
|
stopTimer: en,
|
|
1306
|
-
toggleTimer:
|
|
1307
|
+
toggleTimer: Ds
|
|
1307
1308
|
});
|
|
1308
|
-
class
|
|
1309
|
+
class Us {
|
|
1309
1310
|
/**
|
|
1310
1311
|
* @param {Function} callback
|
|
1311
1312
|
* @param {number} delay
|
|
@@ -1346,7 +1347,7 @@ class Rs {
|
|
|
1346
1347
|
return this.running;
|
|
1347
1348
|
}
|
|
1348
1349
|
}
|
|
1349
|
-
const nn = ["swal-title", "swal-html", "swal-footer"],
|
|
1350
|
+
const nn = ["swal-title", "swal-html", "swal-footer"], _s = (e) => {
|
|
1350
1351
|
const t = typeof e.template == "string" ? (
|
|
1351
1352
|
/** @type {HTMLTemplateElement} */
|
|
1352
1353
|
document.querySelector(e.template)
|
|
@@ -1354,8 +1355,8 @@ const nn = ["swal-title", "swal-html", "swal-footer"], Ws = (e) => {
|
|
|
1354
1355
|
if (!t)
|
|
1355
1356
|
return {};
|
|
1356
1357
|
const n = t.content;
|
|
1357
|
-
return
|
|
1358
|
-
},
|
|
1358
|
+
return ei(n), Object.assign(Ys(n), Xs(n), Ks(n), Zs(n), Js(n), Gs(n), Qs(n, nn));
|
|
1359
|
+
}, Ys = (e) => {
|
|
1359
1360
|
const t = {};
|
|
1360
1361
|
return Array.from(e.querySelectorAll("swal-param")).forEach((o) => {
|
|
1361
1362
|
z(o, ["name", "value"]);
|
|
@@ -1365,7 +1366,7 @@ const nn = ["swal-title", "swal-html", "swal-footer"], Ws = (e) => {
|
|
|
1365
1366
|
), r = o.getAttribute("value");
|
|
1366
1367
|
!s || !r || (typeof N[s] == "boolean" ? t[s] = r !== "false" : typeof N[s] == "object" ? t[s] = JSON.parse(r) : t[s] = r);
|
|
1367
1368
|
}), t;
|
|
1368
|
-
},
|
|
1369
|
+
}, Xs = (e) => {
|
|
1369
1370
|
const t = {};
|
|
1370
1371
|
return Array.from(e.querySelectorAll("swal-function-param")).forEach((o) => {
|
|
1371
1372
|
const s = (
|
|
@@ -1374,20 +1375,20 @@ const nn = ["swal-title", "swal-html", "swal-footer"], Ws = (e) => {
|
|
|
1374
1375
|
), r = o.getAttribute("value");
|
|
1375
1376
|
!s || !r || (t[s] = new Function(`return ${r}`)());
|
|
1376
1377
|
}), t;
|
|
1377
|
-
},
|
|
1378
|
+
}, Ks = (e) => {
|
|
1378
1379
|
const t = {};
|
|
1379
1380
|
return Array.from(e.querySelectorAll("swal-button")).forEach((o) => {
|
|
1380
1381
|
z(o, ["type", "color", "aria-label"]);
|
|
1381
1382
|
const s = o.getAttribute("type");
|
|
1382
1383
|
!s || !["confirm", "cancel", "deny"].includes(s) || (t[`${s}ButtonText`] = o.innerHTML, t[`show${$e(s)}Button`] = !0, o.hasAttribute("color") && (t[`${s}ButtonColor`] = o.getAttribute("color")), o.hasAttribute("aria-label") && (t[`${s}ButtonAriaLabel`] = o.getAttribute("aria-label")));
|
|
1383
1384
|
}), t;
|
|
1384
|
-
},
|
|
1385
|
+
}, Zs = (e) => {
|
|
1385
1386
|
const t = {}, n = e.querySelector("swal-image");
|
|
1386
1387
|
return n && (z(n, ["src", "width", "height", "alt"]), n.hasAttribute("src") && (t.imageUrl = n.getAttribute("src") || void 0), n.hasAttribute("width") && (t.imageWidth = n.getAttribute("width") || void 0), n.hasAttribute("height") && (t.imageHeight = n.getAttribute("height") || void 0), n.hasAttribute("alt") && (t.imageAlt = n.getAttribute("alt") || void 0)), t;
|
|
1387
|
-
},
|
|
1388
|
+
}, Js = (e) => {
|
|
1388
1389
|
const t = {}, n = e.querySelector("swal-icon");
|
|
1389
1390
|
return n && (z(n, ["type", "color"]), n.hasAttribute("type") && (t.icon = n.getAttribute("type")), n.hasAttribute("color") && (t.iconColor = n.getAttribute("color")), t.iconHtml = n.innerHTML), t;
|
|
1390
|
-
},
|
|
1391
|
+
}, Gs = (e) => {
|
|
1391
1392
|
const t = {}, n = e.querySelector("swal-input");
|
|
1392
1393
|
n && (z(n, ["type", "label", "placeholder", "value"]), t.input = n.getAttribute("type") || "text", n.hasAttribute("label") && (t.inputLabel = n.getAttribute("label")), n.hasAttribute("placeholder") && (t.inputPlaceholder = n.getAttribute("placeholder")), n.hasAttribute("value") && (t.inputValue = n.getAttribute("value")));
|
|
1393
1394
|
const o = Array.from(e.querySelectorAll("swal-input-option"));
|
|
@@ -1399,43 +1400,43 @@ const nn = ["swal-title", "swal-html", "swal-footer"], Ws = (e) => {
|
|
|
1399
1400
|
const l = s.innerHTML;
|
|
1400
1401
|
t.inputOptions[r] = l;
|
|
1401
1402
|
})), t;
|
|
1402
|
-
},
|
|
1403
|
+
}, Qs = (e, t) => {
|
|
1403
1404
|
const n = {};
|
|
1404
1405
|
for (const o in t) {
|
|
1405
1406
|
const s = t[o], r = e.querySelector(s);
|
|
1406
1407
|
r && (z(r, []), n[s.replace(/^swal-/, "")] = r.innerHTML.trim());
|
|
1407
1408
|
}
|
|
1408
1409
|
return n;
|
|
1409
|
-
},
|
|
1410
|
+
}, ei = (e) => {
|
|
1410
1411
|
const t = nn.concat(["swal-param", "swal-function-param", "swal-button", "swal-image", "swal-icon", "swal-input", "swal-input-option"]);
|
|
1411
1412
|
Array.from(e.children).forEach((n) => {
|
|
1412
1413
|
const o = n.tagName.toLowerCase();
|
|
1413
|
-
t.includes(o) ||
|
|
1414
|
+
t.includes(o) || v(`Unrecognized element <${o}>`);
|
|
1414
1415
|
});
|
|
1415
1416
|
}, z = (e, t) => {
|
|
1416
1417
|
Array.from(e.attributes).forEach((n) => {
|
|
1417
|
-
t.indexOf(n.name) === -1 &&
|
|
1418
|
+
t.indexOf(n.name) === -1 && v([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`, `${t.length ? `Allowed attributes are: ${t.join(", ")}` : "To set the value, use HTML within the element."}`]);
|
|
1418
1419
|
});
|
|
1419
|
-
}, on = 10,
|
|
1420
|
-
const t =
|
|
1420
|
+
}, on = 10, ti = (e) => {
|
|
1421
|
+
const t = k(), n = u();
|
|
1421
1422
|
typeof e.willOpen == "function" && e.willOpen(n), a.eventEmitter.emit("willOpen", n);
|
|
1422
1423
|
const s = window.getComputedStyle(document.body).overflowY;
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
}, on), je() && (
|
|
1426
|
-
},
|
|
1424
|
+
si(t, n, e), setTimeout(() => {
|
|
1425
|
+
ni(t, n);
|
|
1426
|
+
}, on), je() && (oi(t, e.scrollbarPadding, s), Fo()), !xe() && !a.previousActiveElement && (a.previousActiveElement = document.activeElement), typeof e.didOpen == "function" && setTimeout(() => e.didOpen(n)), a.eventEmitter.emit("didOpen", n), P(t, i["no-transition"]);
|
|
1427
|
+
}, pe = (e) => {
|
|
1427
1428
|
const t = u();
|
|
1428
1429
|
if (e.target !== t)
|
|
1429
1430
|
return;
|
|
1430
|
-
const n =
|
|
1431
|
-
t.removeEventListener("animationend",
|
|
1432
|
-
},
|
|
1433
|
-
yt(t) ? (e.style.overflowY = "hidden", t.addEventListener("animationend",
|
|
1434
|
-
},
|
|
1435
|
-
|
|
1431
|
+
const n = k();
|
|
1432
|
+
t.removeEventListener("animationend", pe), t.removeEventListener("transitionend", pe), n.style.overflowY = "auto";
|
|
1433
|
+
}, ni = (e, t) => {
|
|
1434
|
+
yt(t) ? (e.style.overflowY = "hidden", t.addEventListener("animationend", pe), t.addEventListener("transitionend", pe)) : e.style.overflowY = "auto";
|
|
1435
|
+
}, oi = (e, t, n) => {
|
|
1436
|
+
qo(), t && n !== "hidden" && Yo(n), setTimeout(() => {
|
|
1436
1437
|
e.scrollTop = 0;
|
|
1437
1438
|
});
|
|
1438
|
-
},
|
|
1439
|
+
}, si = (e, t, n) => {
|
|
1439
1440
|
d(e, n.showClass.backdrop), n.animation ? (t.style.setProperty("opacity", "0", "important"), g(t, "grid"), setTimeout(() => {
|
|
1440
1441
|
d(t, n.showClass.popup), t.style.removeProperty("opacity");
|
|
1441
1442
|
}, on)) : g(t, "grid"), d([document.documentElement, document.body], i.shown), n.heightAuto && n.backdrop && !n.toast && d([document.documentElement, document.body], i["height-auto"]);
|
|
@@ -1454,33 +1455,33 @@ var lt = {
|
|
|
1454
1455
|
*/
|
|
1455
1456
|
url: (e, t) => /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e) ? Promise.resolve() : Promise.resolve(t || "Invalid URL")
|
|
1456
1457
|
};
|
|
1457
|
-
function
|
|
1458
|
+
function ii(e) {
|
|
1458
1459
|
e.inputValidator || (e.input === "email" && (e.inputValidator = lt.email), e.input === "url" && (e.inputValidator = lt.url));
|
|
1459
1460
|
}
|
|
1460
|
-
function
|
|
1461
|
-
(!e.target || typeof e.target == "string" && !document.querySelector(e.target) || typeof e.target != "string" && !e.target.appendChild) && (
|
|
1461
|
+
function ri(e) {
|
|
1462
|
+
(!e.target || typeof e.target == "string" && !document.querySelector(e.target) || typeof e.target != "string" && !e.target.appendChild) && (v('Target parameter is not valid, defaulting to "body"'), e.target = "body");
|
|
1462
1463
|
}
|
|
1463
|
-
function
|
|
1464
|
-
|
|
1464
|
+
function ai(e) {
|
|
1465
|
+
ii(e), e.showLoaderOnConfirm && !e.preConfirm && v(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
|
|
1465
1466
|
showLoaderOnConfirm should be used together with preConfirm, see usage example:
|
|
1466
|
-
https://sweetalert2.github.io/#ajax-request`),
|
|
1467
|
-
`).join("<br />")),
|
|
1467
|
+
https://sweetalert2.github.io/#ajax-request`), ri(e), typeof e.title == "string" && (e.title = e.title.split(`
|
|
1468
|
+
`).join("<br />")), Zn(e);
|
|
1468
1469
|
}
|
|
1469
1470
|
let L;
|
|
1470
|
-
var
|
|
1471
|
+
var le = /* @__PURE__ */ new WeakMap();
|
|
1471
1472
|
class h {
|
|
1472
1473
|
/**
|
|
1473
1474
|
* @param {...any} args
|
|
1474
1475
|
* @this {SweetAlert}
|
|
1475
1476
|
*/
|
|
1476
1477
|
constructor() {
|
|
1477
|
-
if (
|
|
1478
|
+
if (Tn(this, le, void 0), typeof window > "u")
|
|
1478
1479
|
return;
|
|
1479
1480
|
L = this;
|
|
1480
1481
|
for (var t = arguments.length, n = new Array(t), o = 0; o < t; o++)
|
|
1481
1482
|
n[o] = arguments[o];
|
|
1482
1483
|
const s = Object.freeze(this.constructor.argsToParams(n));
|
|
1483
|
-
this.params = s, this.isAwaitingPromise = !1,
|
|
1484
|
+
this.params = s, this.isAwaitingPromise = !1, Ln(le, this, this._main(L.params));
|
|
1484
1485
|
}
|
|
1485
1486
|
_main(t) {
|
|
1486
1487
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -1493,20 +1494,20 @@ class h {
|
|
|
1493
1494
|
}), je() && St();
|
|
1494
1495
|
}
|
|
1495
1496
|
a.currentInstance = L;
|
|
1496
|
-
const o =
|
|
1497
|
-
|
|
1498
|
-
const s =
|
|
1499
|
-
return Pt(L, o), f.innerParams.set(L, o),
|
|
1497
|
+
const o = ci(t, n);
|
|
1498
|
+
ai(o), Object.freeze(o), a.timeout && (a.timeout.stop(), delete a.timeout), clearTimeout(a.restoreFocusTimeout);
|
|
1499
|
+
const s = di(L);
|
|
1500
|
+
return Pt(L, o), f.innerParams.set(L, o), li(L, s, o);
|
|
1500
1501
|
}
|
|
1501
1502
|
// `catch` cannot be the name of a module export, so we define our thenable methods here instead
|
|
1502
1503
|
then(t) {
|
|
1503
|
-
return Je(
|
|
1504
|
+
return Je(le, this).then(t);
|
|
1504
1505
|
}
|
|
1505
1506
|
finally(t) {
|
|
1506
|
-
return Je(
|
|
1507
|
+
return Je(le, this).finally(t);
|
|
1507
1508
|
}
|
|
1508
1509
|
}
|
|
1509
|
-
const
|
|
1510
|
+
const li = (e, t, n) => new Promise((o, s) => {
|
|
1510
1511
|
const r = (l) => {
|
|
1511
1512
|
e.close({
|
|
1512
1513
|
isDismissed: !0,
|
|
@@ -1514,57 +1515,57 @@ const ri = (e, t, n) => new Promise((o, s) => {
|
|
|
1514
1515
|
});
|
|
1515
1516
|
};
|
|
1516
1517
|
R.swalPromiseResolve.set(e, o), R.swalPromiseReject.set(e, s), t.confirmButton.onclick = () => {
|
|
1517
|
-
|
|
1518
|
+
ds(e);
|
|
1518
1519
|
}, t.denyButton.onclick = () => {
|
|
1519
|
-
|
|
1520
|
+
us(e);
|
|
1520
1521
|
}, t.cancelButton.onclick = () => {
|
|
1521
|
-
|
|
1522
|
+
ws(e, r);
|
|
1522
1523
|
}, t.closeButton.onclick = () => {
|
|
1523
1524
|
r(X.close);
|
|
1524
|
-
},
|
|
1525
|
+
}, As(n, t, r), Io(a, n, r), ts(e, n), ti(n), ui(a, n, r), wi(t, n), setTimeout(() => {
|
|
1525
1526
|
t.container.scrollTop = 0;
|
|
1526
1527
|
});
|
|
1527
|
-
}),
|
|
1528
|
-
const n =
|
|
1528
|
+
}), ci = (e, t) => {
|
|
1529
|
+
const n = _s(e), o = Object.assign({}, N, t, n, e);
|
|
1529
1530
|
return o.showClass = Object.assign({}, N.showClass, o.showClass), o.hideClass = Object.assign({}, N.hideClass, o.hideClass), o.animation === !1 && (o.showClass = {
|
|
1530
1531
|
backdrop: "swal2-noanimation"
|
|
1531
1532
|
}, o.hideClass = {}), o;
|
|
1532
|
-
},
|
|
1533
|
+
}, di = (e) => {
|
|
1533
1534
|
const t = {
|
|
1534
1535
|
popup: u(),
|
|
1535
|
-
container:
|
|
1536
|
-
actions:
|
|
1536
|
+
container: k(),
|
|
1537
|
+
actions: ee(),
|
|
1537
1538
|
confirmButton: $(),
|
|
1538
1539
|
denyButton: q(),
|
|
1539
1540
|
cancelButton: _(),
|
|
1540
1541
|
loader: Y(),
|
|
1541
1542
|
closeButton: De(),
|
|
1542
|
-
validationMessage:
|
|
1543
|
+
validationMessage: ve(),
|
|
1543
1544
|
progressSteps: Oe()
|
|
1544
1545
|
};
|
|
1545
1546
|
return f.domCache.set(e, t), t;
|
|
1546
|
-
},
|
|
1547
|
-
const o =
|
|
1548
|
-
|
|
1547
|
+
}, ui = (e, t, n) => {
|
|
1548
|
+
const o = ke();
|
|
1549
|
+
y(o), t.timer && (e.timeout = new Us(() => {
|
|
1549
1550
|
n("timer"), delete e.timeout;
|
|
1550
1551
|
}, t.timer), t.timerProgressBar && (g(o), C(o, t, "timerProgressBar"), setTimeout(() => {
|
|
1551
1552
|
e.timeout && e.timeout.running && Fe(t.timer);
|
|
1552
1553
|
})));
|
|
1553
|
-
},
|
|
1554
|
+
}, wi = (e, t) => {
|
|
1554
1555
|
if (!t.toast) {
|
|
1555
|
-
if (!
|
|
1556
|
-
ft("allowEnterKey"),
|
|
1556
|
+
if (!ye(t.allowEnterKey)) {
|
|
1557
|
+
ft("allowEnterKey"), hi();
|
|
1557
1558
|
return;
|
|
1558
1559
|
}
|
|
1559
|
-
|
|
1560
|
+
fi(e) || mi(e, t) || Te(-1, 1);
|
|
1560
1561
|
}
|
|
1561
|
-
},
|
|
1562
|
+
}, fi = (e) => {
|
|
1562
1563
|
const t = Array.from(e.popup.querySelectorAll("[autofocus]"));
|
|
1563
1564
|
for (const n of t)
|
|
1564
1565
|
if (n instanceof HTMLElement && x(n))
|
|
1565
1566
|
return n.focus(), !0;
|
|
1566
1567
|
return !1;
|
|
1567
|
-
},
|
|
1568
|
+
}, mi = (e, t) => t.focusDeny && x(e.denyButton) ? (e.denyButton.focus(), !0) : t.focusCancel && x(e.cancelButton) ? (e.cancelButton.focus(), !0) : t.focusConfirm && x(e.confirmButton) ? (e.confirmButton.focus(), !0) : !1, hi = () => {
|
|
1568
1569
|
document.activeElement instanceof HTMLElement && typeof document.activeElement.blur == "function" && document.activeElement.blur();
|
|
1569
1570
|
};
|
|
1570
1571
|
if (typeof window < "u" && /^ru\b/.test(navigator.language) && location.host.match(/\.(ru|su|by|xn--p1ai)$/)) {
|
|
@@ -1583,8 +1584,8 @@ h.prototype.enableButtons = Vt;
|
|
|
1583
1584
|
h.prototype.getInput = zt;
|
|
1584
1585
|
h.prototype.disableInput = Wt;
|
|
1585
1586
|
h.prototype.enableInput = Rt;
|
|
1586
|
-
h.prototype.hideLoading =
|
|
1587
|
-
h.prototype.disableLoading =
|
|
1587
|
+
h.prototype.hideLoading = he;
|
|
1588
|
+
h.prototype.disableLoading = he;
|
|
1588
1589
|
h.prototype.showValidationMessage = Ut;
|
|
1589
1590
|
h.prototype.resetValidationMessage = _t;
|
|
1590
1591
|
h.prototype.close = O;
|
|
@@ -1594,16 +1595,16 @@ h.prototype.closeToast = O;
|
|
|
1594
1595
|
h.prototype.rejectPromise = Ot;
|
|
1595
1596
|
h.prototype.update = Jt;
|
|
1596
1597
|
h.prototype._destroy = Gt;
|
|
1597
|
-
Object.assign(h,
|
|
1598
|
-
Object.keys(
|
|
1598
|
+
Object.assign(h, Ws);
|
|
1599
|
+
Object.keys(Cs).forEach((e) => {
|
|
1599
1600
|
h[e] = function() {
|
|
1600
1601
|
return L && L[e] ? L[e](...arguments) : null;
|
|
1601
1602
|
};
|
|
1602
1603
|
});
|
|
1603
1604
|
h.DismissReason = X;
|
|
1604
1605
|
h.version = "11.16.1";
|
|
1605
|
-
const
|
|
1606
|
-
|
|
1606
|
+
const be = h;
|
|
1607
|
+
be.default = be;
|
|
1607
1608
|
typeof document < "u" && function(e, t) {
|
|
1608
1609
|
var n = e.createElement("style");
|
|
1609
1610
|
if (e.getElementsByTagName("head")[0].appendChild(n), n.styleSheet) n.styleSheet.disabled || (n.styleSheet.cssText = t);
|
|
@@ -1613,7 +1614,7 @@ typeof document < "u" && function(e, t) {
|
|
|
1613
1614
|
n.innerText = t;
|
|
1614
1615
|
}
|
|
1615
1616
|
}(document, ':root{--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-footer-border-color: #eee;--swal2-input-background: transparent;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666}[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)}@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)}}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:background-color .1s;-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) 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}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:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-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:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}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:box-shadow .1s;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:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}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);color:inherit;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:rgba(0,0,0,.2)}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){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:color .1s,box-shadow .1s;border:none;border-radius:var(--swal2-border-radius);background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}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:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-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:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:var(--swal2-input-background);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);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):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}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:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}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;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)}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}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}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}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)}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:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.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;background:var(--swal2-background);box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);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}.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:swal2-toast-show .5s}.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);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}}');
|
|
1616
|
-
const
|
|
1617
|
+
const gi = () => (/* @__PURE__ */ new Date()).getFullYear(), ct = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), Ai = ({
|
|
1617
1618
|
columns: e,
|
|
1618
1619
|
data: t,
|
|
1619
1620
|
renderModalContent: n,
|
|
@@ -1626,25 +1627,30 @@ const mi = () => (/* @__PURE__ */ new Date()).getFullYear(), ct = (e) => e.norma
|
|
|
1626
1627
|
isShared: T = !1,
|
|
1627
1628
|
isLoading: K,
|
|
1628
1629
|
closeModalOut: sn = !0,
|
|
1629
|
-
enableColumnSearch:
|
|
1630
|
+
enableColumnSearch: Ae = !1,
|
|
1630
1631
|
enableColumnSorter: rn = !1
|
|
1631
1632
|
}) => {
|
|
1632
|
-
const [
|
|
1633
|
-
|
|
1633
|
+
const [se, an] = D(""), [Z, ln] = D({}), [ie, Ue] = D(null), [cn, re] = D(!1), [_e, Ye] = D(23), [dn, Xe] = D(t.length > 23), [un, wn] = D(!1), fn = gi(), mn = Bn();
|
|
1634
|
+
yn(() => {
|
|
1634
1635
|
wn(t.length < 1), Ye(25), Xe(t.length > 25);
|
|
1635
|
-
}, [
|
|
1636
|
-
const
|
|
1637
|
-
ln((
|
|
1638
|
-
},
|
|
1639
|
-
(
|
|
1640
|
-
), Ke = Object.values(Z).some((
|
|
1641
|
-
(
|
|
1636
|
+
}, [se, Z, t.length]);
|
|
1637
|
+
const hn = (p, b) => {
|
|
1638
|
+
ln((J) => ({ ...J, [p]: b }));
|
|
1639
|
+
}, gn = t.filter(
|
|
1640
|
+
(p) => e.every((b) => Ae && Z[b.key] ? String(p[b.key]).toLowerCase().includes(Z[b.key].toLowerCase()) : !0)
|
|
1641
|
+
), Ke = Object.values(Z).some((p) => p.trim() !== ""), pn = t.slice().sort(
|
|
1642
|
+
(p, b) => w ? new Date(b[w]).getTime() - new Date(p[w]).getTime() : 0
|
|
1642
1643
|
).filter(
|
|
1643
|
-
(
|
|
1644
|
-
(b) => ct(String(
|
|
1644
|
+
(p) => !Ke && e.some(
|
|
1645
|
+
(b) => ct(String(p[b.key])).includes(ct(se))
|
|
1645
1646
|
)
|
|
1646
|
-
),
|
|
1647
|
-
|
|
1647
|
+
), ae = Ke ? gn : pn, bn = (p, b) => {
|
|
1648
|
+
if (p.redirectTo) {
|
|
1649
|
+
const J = p.redirectTo(b);
|
|
1650
|
+
mn(J);
|
|
1651
|
+
return;
|
|
1652
|
+
}
|
|
1653
|
+
p.hasModal ? b.estadoRegistro === "por_gestionar" && T && o ? be.fire({
|
|
1648
1654
|
title: "<small>¿Tomar este registro?</small>",
|
|
1649
1655
|
text: "Tenga presente que, una vez lo haga, deberá darle trámite en los tiempos definidos en el procedimiento.",
|
|
1650
1656
|
icon: "info",
|
|
@@ -1653,48 +1659,48 @@ const mi = () => (/* @__PURE__ */ new Date()).getFullYear(), ct = (e) => e.norma
|
|
|
1653
1659
|
cancelButtonColor: "#cc5159",
|
|
1654
1660
|
confirmButtonText: "Sí, tomar registro",
|
|
1655
1661
|
cancelButtonText: "No, cancelar"
|
|
1656
|
-
}).then(async (
|
|
1657
|
-
|
|
1658
|
-
}) : (b.estadoRegistro === "en_gestion" || !T) && (Ue({ row: b, column:
|
|
1662
|
+
}).then(async (J) => {
|
|
1663
|
+
J.isConfirmed && o(b);
|
|
1664
|
+
}) : (b.estadoRegistro === "en_gestion" || !T) && (Ue({ row: b, column: p }), re(!0)) : p.hasModal && n && !T && (Ue({ row: b, column: p }), re(!0));
|
|
1659
1665
|
};
|
|
1660
1666
|
return /* @__PURE__ */ I(Ze, { children: [
|
|
1661
1667
|
/* @__PURE__ */ B(
|
|
1662
|
-
|
|
1668
|
+
En,
|
|
1663
1669
|
{
|
|
1664
1670
|
title: r,
|
|
1665
1671
|
subtitle: c,
|
|
1666
1672
|
data: t,
|
|
1667
1673
|
setSearchTerm: an,
|
|
1668
1674
|
extraInput: l,
|
|
1669
|
-
enableColumnSearch:
|
|
1675
|
+
enableColumnSearch: Ae
|
|
1670
1676
|
}
|
|
1671
1677
|
),
|
|
1672
1678
|
K ? /* @__PURE__ */ I("div", { className: "animation-container", children: [
|
|
1673
|
-
/* @__PURE__ */ B("div", { style: { width: 500, height: 125 }, children: /* @__PURE__ */ B(Ee, { animationData:
|
|
1679
|
+
/* @__PURE__ */ B("div", { style: { width: 500, height: 125 }, children: /* @__PURE__ */ B(Ee, { animationData: vn, loop: !0 }) }),
|
|
1674
1680
|
/* @__PURE__ */ B("span", { className: "lottie", children: "Actualizando y cargando registros, por favor espere..." })
|
|
1675
1681
|
] }) : un ? /* @__PURE__ */ I("div", { className: "animation-container", children: [
|
|
1676
|
-
/* @__PURE__ */ B("div", { style: { width: 150, height: 150 }, children: /* @__PURE__ */ B(Ee, { animationData: vn, loop: !0 }) }),
|
|
1677
|
-
/* @__PURE__ */ B("span", { className: "lottie", children: "No existen registros pendientes por tramitar" })
|
|
1678
|
-
] }) : oe && re.length === 0 ? /* @__PURE__ */ I("div", { className: "animation-container", children: [
|
|
1679
1682
|
/* @__PURE__ */ B("div", { style: { width: 150, height: 150 }, children: /* @__PURE__ */ B(Ee, { animationData: kn, loop: !0 }) }),
|
|
1683
|
+
/* @__PURE__ */ B("span", { className: "lottie", children: "No existen registros pendientes por tramitar" })
|
|
1684
|
+
] }) : se && ae.length === 0 ? /* @__PURE__ */ I("div", { className: "animation-container", children: [
|
|
1685
|
+
/* @__PURE__ */ B("div", { style: { width: 150, height: 150 }, children: /* @__PURE__ */ B(Ee, { animationData: xn, loop: !0 }) }),
|
|
1680
1686
|
/* @__PURE__ */ B("span", { className: "lottie", children: "No se encontró registro con el criterio de búsqueda definido" })
|
|
1681
1687
|
] }) : /* @__PURE__ */ I(Ze, { children: [
|
|
1682
1688
|
/* @__PURE__ */ B(
|
|
1683
|
-
|
|
1689
|
+
Cn,
|
|
1684
1690
|
{
|
|
1685
1691
|
columns: e,
|
|
1686
|
-
displayedData:
|
|
1692
|
+
displayedData: ae,
|
|
1687
1693
|
hasMoreData: dn,
|
|
1688
1694
|
setHasMoreData: Xe,
|
|
1689
1695
|
setVisibleData: Ye,
|
|
1690
1696
|
visibleData: _e,
|
|
1691
|
-
searchTerm:
|
|
1692
|
-
handleCellClick:
|
|
1697
|
+
searchTerm: se,
|
|
1698
|
+
handleCellClick: bn,
|
|
1693
1699
|
totalDias: s,
|
|
1694
1700
|
isShared: T,
|
|
1695
|
-
enableColumnSearch:
|
|
1701
|
+
enableColumnSearch: Ae,
|
|
1696
1702
|
columnSearch: Z,
|
|
1697
|
-
handleColumnSearch:
|
|
1703
|
+
handleColumnSearch: hn,
|
|
1698
1704
|
enableColumnSorter: rn
|
|
1699
1705
|
}
|
|
1700
1706
|
),
|
|
@@ -1705,30 +1711,30 @@ const mi = () => (/* @__PURE__ */ new Date()).getFullYear(), ct = (e) => e.norma
|
|
|
1705
1711
|
] }),
|
|
1706
1712
|
/* @__PURE__ */ I("div", { className: "data-count", children: [
|
|
1707
1713
|
"Mostrando ",
|
|
1708
|
-
Math.min(_e,
|
|
1714
|
+
Math.min(_e, ae.length),
|
|
1709
1715
|
" de",
|
|
1710
1716
|
" ",
|
|
1711
|
-
|
|
1717
|
+
ae.length,
|
|
1712
1718
|
" elementos"
|
|
1713
1719
|
] })
|
|
1714
1720
|
] })
|
|
1715
1721
|
] }),
|
|
1716
|
-
|
|
1717
|
-
|
|
1722
|
+
ie && n && /* @__PURE__ */ B(
|
|
1723
|
+
An,
|
|
1718
1724
|
{
|
|
1719
1725
|
show: cn,
|
|
1720
|
-
onHide: () =>
|
|
1721
|
-
title: `${
|
|
1726
|
+
onHide: () => re(!1),
|
|
1727
|
+
title: `${ie.column.label}`,
|
|
1722
1728
|
closeModalOut: sn,
|
|
1723
1729
|
children: n(
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
() =>
|
|
1730
|
+
ie.row,
|
|
1731
|
+
ie.column,
|
|
1732
|
+
() => re(!1)
|
|
1727
1733
|
)
|
|
1728
1734
|
}
|
|
1729
1735
|
)
|
|
1730
1736
|
] });
|
|
1731
1737
|
};
|
|
1732
1738
|
export {
|
|
1733
|
-
|
|
1739
|
+
Ai as TablaRegistros
|
|
1734
1740
|
};
|