@luizleon/sf.prefeiturasp.vuecomponents 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/navmenulink/NavMenuLink.d.ts +1 -0
- package/dist/keycloak.d.ts +671 -0
- package/dist/lib.es.js +1625 -1561
- package/dist/lib.es.js.map +1 -1
- package/dist/lib.umd.js +37 -37
- package/dist/lib.umd.js.map +1 -1
- package/dist/services/authService.d.ts +1 -1
- package/package.json +4 -2
- package/src/components/navmenulink/NavMenuLink.d.ts +1 -0
- package/src/components/navmenulink/NavMenuLink.vue +2 -2
- package/src/keycloak.d.ts +671 -0
- package/src/keycloak.js +1729 -0
- package/src/services/authService.ts +1 -2
package/dist/lib.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref, openBlock, createElementBlock, createElementVNode, defineComponent, normalizeStyle, normalizeClass, mergeProps, createBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode, unref, createStaticVNode, createVNode, renderSlot, resolveComponent, withCtx, onMounted, onBeforeUnmount, renderList, nextTick } from "vue";
|
|
5
|
-
class
|
|
1
|
+
var Yr = Object.defineProperty;
|
|
2
|
+
var Xr = (c, o, f) => o in c ? Yr(c, o, { enumerable: !0, configurable: !0, writable: !0, value: f }) : c[o] = f;
|
|
3
|
+
var qe = (c, o, f) => (Xr(c, typeof o != "symbol" ? o + "" : o, f), f);
|
|
4
|
+
import { ref as Ye, openBlock as oe, createElementBlock as ve, createElementVNode as q, defineComponent as Te, normalizeStyle as nn, normalizeClass as me, mergeProps as Zr, createBlock as et, Fragment as on, createTextVNode as Gr, toDisplayString as tt, createCommentVNode as rn, unref as Ee, createStaticVNode as Qr, createVNode as We, renderSlot as Pe, resolveComponent as sn, withCtx as an, onMounted as cn, onBeforeUnmount as es, renderList as ts, nextTick as ns } from "vue";
|
|
5
|
+
class os {
|
|
6
6
|
constructor() {
|
|
7
|
-
|
|
7
|
+
qe(this, "_visible", Ye(!1));
|
|
8
8
|
}
|
|
9
9
|
get IsVisible() {
|
|
10
10
|
return this._visible.value === !0;
|
|
@@ -19,16 +19,16 @@ class NavMenuService {
|
|
|
19
19
|
this._visible.value = !0;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
const
|
|
23
|
-
var
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
for (const [
|
|
27
|
-
|
|
28
|
-
return
|
|
29
|
-
},
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
22
|
+
const rs = new os(), ln = () => rs;
|
|
23
|
+
var un = /* @__PURE__ */ ((c) => (c.Primary = "primary", c.Secondary = "secondary", c.Info = "info", c.Success = "success", c.Help = "help", c.Warn = "warn", c.Error = "error", c))(un || {}), Ke = /* @__PURE__ */ ((c) => (c.Pequeno = "sm", c.Medio = "md", c.Grande = "lg", c))(Ke || {});
|
|
24
|
+
const dn = (c, o) => {
|
|
25
|
+
const f = c.__vccOpts || c;
|
|
26
|
+
for (const [y, L] of o)
|
|
27
|
+
f[y] = L;
|
|
28
|
+
return f;
|
|
29
|
+
}, ss = {}, is = { class: "sf-loading-circle" }, as = /* @__PURE__ */ q("div", null, [
|
|
30
|
+
/* @__PURE__ */ q("svg", { viewBox: "25 25 50 50" }, [
|
|
31
|
+
/* @__PURE__ */ q("circle", {
|
|
32
32
|
cx: "50",
|
|
33
33
|
cy: "50",
|
|
34
34
|
r: "20",
|
|
@@ -37,20 +37,20 @@ const _export_sfc = (a, o) => {
|
|
|
37
37
|
"stroke-miterlimit": "10"
|
|
38
38
|
})
|
|
39
39
|
])
|
|
40
|
-
], -1),
|
|
41
|
-
|
|
40
|
+
], -1), cs = [
|
|
41
|
+
as
|
|
42
42
|
];
|
|
43
|
-
function
|
|
44
|
-
return
|
|
43
|
+
function ls(c, o) {
|
|
44
|
+
return oe(), ve("div", is, cs);
|
|
45
45
|
}
|
|
46
|
-
const
|
|
47
|
-
class
|
|
46
|
+
const us = /* @__PURE__ */ dn(ss, [["render", ls]]);
|
|
47
|
+
class ze {
|
|
48
48
|
/**
|
|
49
49
|
* Creates a new instance of the CssClassBuilder class.
|
|
50
50
|
* @param value The initial value of the CSS class string.
|
|
51
51
|
*/
|
|
52
52
|
constructor(o) {
|
|
53
|
-
|
|
53
|
+
qe(this, "retorno");
|
|
54
54
|
this.retorno = o ?? "";
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
@@ -67,8 +67,8 @@ class CssClassBuilder {
|
|
|
67
67
|
* @param when The condition that determines whether to add the CSS class.
|
|
68
68
|
* @returns The current instance of the CssClassBuilder class.
|
|
69
69
|
*/
|
|
70
|
-
AddClass(o,
|
|
71
|
-
return
|
|
70
|
+
AddClass(o, f = !0) {
|
|
71
|
+
return f ? this.Concat(o) : this;
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
74
|
* Builds the final CSS class string.
|
|
@@ -78,7 +78,7 @@ class CssClassBuilder {
|
|
|
78
78
|
return this.retorno.trim();
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
const
|
|
81
|
+
const ds = ["disabled", "tabindex"], fs = ["data-color"], fn = /* @__PURE__ */ Te({
|
|
82
82
|
__name: "Icon",
|
|
83
83
|
props: {
|
|
84
84
|
icone: {},
|
|
@@ -88,105 +88,130 @@ const _hoisted_1$6 = ["disabled", "tabindex"], _hoisted_2$5 = ["data-color"], _s
|
|
|
88
88
|
disabled: { type: Boolean },
|
|
89
89
|
loading: { type: Boolean },
|
|
90
90
|
button: { type: Boolean },
|
|
91
|
-
tamanho: { default:
|
|
91
|
+
tamanho: { default: Ke.Medio },
|
|
92
92
|
dot: { type: Boolean },
|
|
93
|
-
dotColor: { default:
|
|
93
|
+
dotColor: { default: un.Error },
|
|
94
94
|
buttonProps: {}
|
|
95
95
|
},
|
|
96
|
-
setup(
|
|
97
|
-
const o =
|
|
98
|
-
function
|
|
99
|
-
return new
|
|
100
|
-
}
|
|
101
|
-
return (
|
|
102
|
-
style:
|
|
103
|
-
class:
|
|
96
|
+
setup(c) {
|
|
97
|
+
const o = c;
|
|
98
|
+
function f() {
|
|
99
|
+
return new ze(`${o.class} sf-icon`).AddClass("sf-component-loading", o.loading).AddClass("sf-component-disabled", o.disabled).AddClass("sf-icon-button", o.button).AddClass("sf-icon-small", o.tamanho === Ke.Pequeno).AddClass("sf-icon-medium", o.tamanho === Ke.Medio).AddClass("sf-icon-large", o.tamanho === Ke.Grande).AddClass("sf-ripple", o.button === !0).Build();
|
|
100
|
+
}
|
|
101
|
+
return (y, L) => (oe(), ve("div", {
|
|
102
|
+
style: nn(o.style),
|
|
103
|
+
class: me(f())
|
|
104
104
|
}, [
|
|
105
|
-
|
|
105
|
+
q("button", Zr({
|
|
106
106
|
class: "material-symbols-outlined",
|
|
107
107
|
disabled: o.disabled || o.loading
|
|
108
108
|
}, o.buttonProps, {
|
|
109
109
|
tabindex: o.button ? void 0 : -1
|
|
110
110
|
}), [
|
|
111
|
-
o.loading ? (
|
|
112
|
-
|
|
111
|
+
o.loading ? (oe(), et(us, { key: 0 })) : (oe(), ve(on, { key: 1 }, [
|
|
112
|
+
Gr(tt(o.icone), 1)
|
|
113
113
|
], 64))
|
|
114
|
-
], 16,
|
|
115
|
-
o.dot ? (
|
|
114
|
+
], 16, ds),
|
|
115
|
+
o.dot ? (oe(), ve("span", {
|
|
116
116
|
key: 0,
|
|
117
117
|
"data-color": o.dotColor
|
|
118
|
-
}, null, 8,
|
|
118
|
+
}, null, 8, fs)) : rn("", !0)
|
|
119
119
|
], 6));
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
|
-
var
|
|
123
|
-
function
|
|
124
|
-
return
|
|
122
|
+
var Ae = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
123
|
+
function hn(c) {
|
|
124
|
+
return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
126
|
+
function hs(c) {
|
|
127
|
+
if (c.__esModule)
|
|
128
|
+
return c;
|
|
129
|
+
var o = c.default;
|
|
130
|
+
if (typeof o == "function") {
|
|
131
|
+
var f = function y() {
|
|
132
|
+
return this instanceof y ? Reflect.construct(o, arguments, this.constructor) : o.apply(this, arguments);
|
|
133
|
+
};
|
|
134
|
+
f.prototype = o.prototype;
|
|
135
|
+
} else
|
|
136
|
+
f = {};
|
|
137
|
+
return Object.defineProperty(f, "__esModule", { value: !0 }), Object.keys(c).forEach(function(y) {
|
|
138
|
+
var L = Object.getOwnPropertyDescriptor(c, y);
|
|
139
|
+
Object.defineProperty(f, y, L.get ? L : {
|
|
140
|
+
enumerable: !0,
|
|
141
|
+
get: function() {
|
|
142
|
+
return c[y];
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}), f;
|
|
146
|
+
}
|
|
147
|
+
var nt = {};
|
|
148
|
+
nt.byteLength = ms;
|
|
149
|
+
nt.toByteArray = bs;
|
|
150
|
+
nt.fromByteArray = ks;
|
|
151
|
+
var xe = [], ge = [], ps = typeof Uint8Array < "u" ? Uint8Array : Array, vt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
152
|
+
for (var He = 0, gs = vt.length; He < gs; ++He)
|
|
153
|
+
xe[He] = vt[He], ge[vt.charCodeAt(He)] = He;
|
|
154
|
+
ge["-".charCodeAt(0)] = 62;
|
|
155
|
+
ge["_".charCodeAt(0)] = 63;
|
|
156
|
+
function pn(c) {
|
|
157
|
+
var o = c.length;
|
|
137
158
|
if (o % 4 > 0)
|
|
138
159
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
139
|
-
var
|
|
140
|
-
|
|
141
|
-
var
|
|
142
|
-
return [
|
|
160
|
+
var f = c.indexOf("=");
|
|
161
|
+
f === -1 && (f = o);
|
|
162
|
+
var y = f === o ? 0 : 4 - f % 4;
|
|
163
|
+
return [f, y];
|
|
143
164
|
}
|
|
144
|
-
function
|
|
145
|
-
var o =
|
|
146
|
-
return (
|
|
165
|
+
function ms(c) {
|
|
166
|
+
var o = pn(c), f = o[0], y = o[1];
|
|
167
|
+
return (f + y) * 3 / 4 - y;
|
|
147
168
|
}
|
|
148
|
-
function
|
|
149
|
-
return (o +
|
|
169
|
+
function vs(c, o, f) {
|
|
170
|
+
return (o + f) * 3 / 4 - f;
|
|
150
171
|
}
|
|
151
|
-
function
|
|
152
|
-
var o,
|
|
153
|
-
for (
|
|
154
|
-
o =
|
|
155
|
-
return
|
|
172
|
+
function bs(c) {
|
|
173
|
+
var o, f = pn(c), y = f[0], L = f[1], k = new ps(vs(c, y, L)), B = 0, M = L > 0 ? y - 4 : y, h;
|
|
174
|
+
for (h = 0; h < M; h += 4)
|
|
175
|
+
o = ge[c.charCodeAt(h)] << 18 | ge[c.charCodeAt(h + 1)] << 12 | ge[c.charCodeAt(h + 2)] << 6 | ge[c.charCodeAt(h + 3)], k[B++] = o >> 16 & 255, k[B++] = o >> 8 & 255, k[B++] = o & 255;
|
|
176
|
+
return L === 2 && (o = ge[c.charCodeAt(h)] << 2 | ge[c.charCodeAt(h + 1)] >> 4, k[B++] = o & 255), L === 1 && (o = ge[c.charCodeAt(h)] << 10 | ge[c.charCodeAt(h + 1)] << 4 | ge[c.charCodeAt(h + 2)] >> 2, k[B++] = o >> 8 & 255, k[B++] = o & 255), k;
|
|
156
177
|
}
|
|
157
|
-
function
|
|
158
|
-
return
|
|
178
|
+
function ws(c) {
|
|
179
|
+
return xe[c >> 18 & 63] + xe[c >> 12 & 63] + xe[c >> 6 & 63] + xe[c & 63];
|
|
159
180
|
}
|
|
160
|
-
function
|
|
161
|
-
for (var
|
|
162
|
-
|
|
163
|
-
return
|
|
181
|
+
function ys(c, o, f) {
|
|
182
|
+
for (var y, L = [], k = o; k < f; k += 3)
|
|
183
|
+
y = (c[k] << 16 & 16711680) + (c[k + 1] << 8 & 65280) + (c[k + 2] & 255), L.push(ws(y));
|
|
184
|
+
return L.join("");
|
|
164
185
|
}
|
|
165
|
-
function
|
|
166
|
-
for (var o,
|
|
167
|
-
|
|
168
|
-
return
|
|
169
|
-
|
|
170
|
-
)) :
|
|
171
|
-
|
|
172
|
-
)),
|
|
186
|
+
function ks(c) {
|
|
187
|
+
for (var o, f = c.length, y = f % 3, L = [], k = 16383, B = 0, M = f - y; B < M; B += k)
|
|
188
|
+
L.push(ys(c, B, B + k > M ? M : B + k));
|
|
189
|
+
return y === 1 ? (o = c[f - 1], L.push(
|
|
190
|
+
xe[o >> 2] + xe[o << 4 & 63] + "=="
|
|
191
|
+
)) : y === 2 && (o = (c[f - 2] << 8) + c[f - 1], L.push(
|
|
192
|
+
xe[o >> 10] + xe[o >> 4 & 63] + xe[o << 2 & 63] + "="
|
|
193
|
+
)), L.join("");
|
|
173
194
|
}
|
|
174
|
-
var
|
|
195
|
+
var gn = { exports: {} };
|
|
196
|
+
const xs = {}, Cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
197
|
+
__proto__: null,
|
|
198
|
+
default: xs
|
|
199
|
+
}, Symbol.toStringTag, { value: "Module" })), en = /* @__PURE__ */ hs(Cs);
|
|
175
200
|
/**
|
|
176
201
|
* [js-sha256]{@link https://github.com/emn178/js-sha256}
|
|
177
202
|
*
|
|
178
|
-
* @version 0.
|
|
203
|
+
* @version 0.10.1
|
|
179
204
|
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
180
|
-
* @copyright Chen, Yi-Cyuan 2014-
|
|
205
|
+
* @copyright Chen, Yi-Cyuan 2014-2023
|
|
181
206
|
* @license MIT
|
|
182
207
|
*/
|
|
183
|
-
(function(
|
|
208
|
+
(function(c) {
|
|
184
209
|
(function() {
|
|
185
|
-
var
|
|
186
|
-
|
|
187
|
-
var
|
|
188
|
-
|
|
189
|
-
var
|
|
210
|
+
var o = "input is invalid type", f = typeof window == "object", y = f ? window : {};
|
|
211
|
+
y.JS_SHA256_NO_WINDOW && (f = !1);
|
|
212
|
+
var L = !f && typeof self == "object", k = !y.JS_SHA256_NO_NODE_JS && typeof process == "object" && process.versions && process.versions.node;
|
|
213
|
+
k ? y = Ae : L && (y = self);
|
|
214
|
+
var B = !y.JS_SHA256_NO_COMMON_JS && !0 && c.exports, M = !y.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer < "u", h = "0123456789abcdef".split(""), K = [-2147483648, 8388608, 32768, 128], W = [24, 16, 8, 0], Y = [
|
|
190
215
|
1116352408,
|
|
191
216
|
1899447441,
|
|
192
217
|
3049323471,
|
|
@@ -251,194 +276,246 @@ var sha256$1 = { exports: {} };
|
|
|
251
276
|
2756734187,
|
|
252
277
|
3204031479,
|
|
253
278
|
3329325298
|
|
254
|
-
],
|
|
255
|
-
(
|
|
256
|
-
return Object.prototype.toString.call(
|
|
257
|
-
}),
|
|
258
|
-
return typeof
|
|
279
|
+
], ae = ["hex", "array", "digest", "arrayBuffer"], V = [];
|
|
280
|
+
(y.JS_SHA256_NO_NODE_JS || !Array.isArray) && (Array.isArray = function(u) {
|
|
281
|
+
return Object.prototype.toString.call(u) === "[object Array]";
|
|
282
|
+
}), M && (y.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView) && (ArrayBuffer.isView = function(u) {
|
|
283
|
+
return typeof u == "object" && u.buffer && u.buffer.constructor === ArrayBuffer;
|
|
259
284
|
});
|
|
260
|
-
var
|
|
261
|
-
return function(
|
|
262
|
-
return new
|
|
285
|
+
var Se = function(u, x) {
|
|
286
|
+
return function(I) {
|
|
287
|
+
return new z(x, !0).update(I)[u]();
|
|
263
288
|
};
|
|
264
|
-
},
|
|
265
|
-
var
|
|
266
|
-
|
|
267
|
-
return new
|
|
268
|
-
},
|
|
269
|
-
return
|
|
289
|
+
}, be = function(u) {
|
|
290
|
+
var x = Se("hex", u);
|
|
291
|
+
k && (x = ce(x, u)), x.create = function() {
|
|
292
|
+
return new z(u);
|
|
293
|
+
}, x.update = function(S) {
|
|
294
|
+
return x.create().update(S);
|
|
270
295
|
};
|
|
271
|
-
for (var
|
|
272
|
-
var
|
|
273
|
-
|
|
296
|
+
for (var I = 0; I < ae.length; ++I) {
|
|
297
|
+
var C = ae[I];
|
|
298
|
+
x[C] = Se(C, u);
|
|
274
299
|
}
|
|
275
|
-
return
|
|
276
|
-
},
|
|
277
|
-
var
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
if (a == null)
|
|
281
|
-
throw new Error(ERROR);
|
|
282
|
-
return a.constructor === ArrayBuffer && (a = new Uint8Array(a)), Array.isArray(a) || ArrayBuffer.isView(a) || a.constructor === Buffer ? crypto.createHash(algorithm).update(new Buffer(a)).digest("hex") : method(a);
|
|
300
|
+
return x;
|
|
301
|
+
}, ce = function(u, x) {
|
|
302
|
+
var I = en, C = en.Buffer, S = x ? "sha224" : "sha256", w;
|
|
303
|
+
C.from && !y.JS_SHA256_NO_BUFFER_FROM ? w = C.from : w = function(g) {
|
|
304
|
+
return new C(g);
|
|
283
305
|
};
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
306
|
+
var i = function(g) {
|
|
307
|
+
if (typeof g == "string")
|
|
308
|
+
return I.createHash(S).update(g, "utf8").digest("hex");
|
|
309
|
+
if (g == null)
|
|
310
|
+
throw new Error(o);
|
|
311
|
+
return g.constructor === ArrayBuffer && (g = new Uint8Array(g)), Array.isArray(g) || ArrayBuffer.isView(g) || g.constructor === C ? I.createHash(S).update(w(g)).digest("hex") : u(g);
|
|
288
312
|
};
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
return new
|
|
293
|
-
}, o.update = function(k, l) {
|
|
294
|
-
return o.create(k).update(l);
|
|
313
|
+
return i;
|
|
314
|
+
}, Fe = function(u, x) {
|
|
315
|
+
return function(I, C) {
|
|
316
|
+
return new we(I, x, !0).update(C)[u]();
|
|
295
317
|
};
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
318
|
+
}, de = function(u) {
|
|
319
|
+
var x = Fe("hex", u);
|
|
320
|
+
x.create = function(S) {
|
|
321
|
+
return new we(S, u);
|
|
322
|
+
}, x.update = function(S, w) {
|
|
323
|
+
return x.create(S).update(w);
|
|
324
|
+
};
|
|
325
|
+
for (var I = 0; I < ae.length; ++I) {
|
|
326
|
+
var C = ae[I];
|
|
327
|
+
x[C] = Fe(C, u);
|
|
299
328
|
}
|
|
300
|
-
return
|
|
329
|
+
return x;
|
|
301
330
|
};
|
|
302
|
-
function
|
|
303
|
-
|
|
331
|
+
function z(u, x) {
|
|
332
|
+
x ? (V[0] = V[16] = V[1] = V[2] = V[3] = V[4] = V[5] = V[6] = V[7] = V[8] = V[9] = V[10] = V[11] = V[12] = V[13] = V[14] = V[15] = 0, this.blocks = V) : this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], u ? (this.h0 = 3238371032, this.h1 = 914150663, this.h2 = 812702999, this.h3 = 4144912697, this.h4 = 4290775857, this.h5 = 1750603025, this.h6 = 1694076839, this.h7 = 3204075428) : (this.h0 = 1779033703, this.h1 = 3144134277, this.h2 = 1013904242, this.h3 = 2773480762, this.h4 = 1359893119, this.h5 = 2600822924, this.h6 = 528734635, this.h7 = 1541459225), this.block = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1, this.first = !0, this.is224 = u;
|
|
304
333
|
}
|
|
305
|
-
|
|
334
|
+
z.prototype.update = function(u) {
|
|
306
335
|
if (!this.finalized) {
|
|
307
|
-
var
|
|
308
|
-
if (
|
|
309
|
-
if (
|
|
310
|
-
if (
|
|
311
|
-
throw new Error(
|
|
312
|
-
if (
|
|
313
|
-
|
|
314
|
-
else if (!Array.isArray(
|
|
315
|
-
throw new Error(
|
|
336
|
+
var x, I = typeof u;
|
|
337
|
+
if (I !== "string") {
|
|
338
|
+
if (I === "object") {
|
|
339
|
+
if (u === null)
|
|
340
|
+
throw new Error(o);
|
|
341
|
+
if (M && u.constructor === ArrayBuffer)
|
|
342
|
+
u = new Uint8Array(u);
|
|
343
|
+
else if (!Array.isArray(u) && (!M || !ArrayBuffer.isView(u)))
|
|
344
|
+
throw new Error(o);
|
|
316
345
|
} else
|
|
317
|
-
throw new Error(
|
|
318
|
-
|
|
346
|
+
throw new Error(o);
|
|
347
|
+
x = !0;
|
|
319
348
|
}
|
|
320
|
-
for (var
|
|
321
|
-
if (this.hashed && (this.hashed = !1,
|
|
322
|
-
for (
|
|
323
|
-
|
|
349
|
+
for (var C, S = 0, w, i = u.length, g = this.blocks; S < i; ) {
|
|
350
|
+
if (this.hashed && (this.hashed = !1, g[0] = this.block, g[16] = g[1] = g[2] = g[3] = g[4] = g[5] = g[6] = g[7] = g[8] = g[9] = g[10] = g[11] = g[12] = g[13] = g[14] = g[15] = 0), x)
|
|
351
|
+
for (w = this.start; S < i && w < 64; ++S)
|
|
352
|
+
g[w >> 2] |= u[S] << W[w++ & 3];
|
|
324
353
|
else
|
|
325
|
-
for (
|
|
326
|
-
|
|
327
|
-
this.lastByteIndex =
|
|
354
|
+
for (w = this.start; S < i && w < 64; ++S)
|
|
355
|
+
C = u.charCodeAt(S), C < 128 ? g[w >> 2] |= C << W[w++ & 3] : C < 2048 ? (g[w >> 2] |= (192 | C >> 6) << W[w++ & 3], g[w >> 2] |= (128 | C & 63) << W[w++ & 3]) : C < 55296 || C >= 57344 ? (g[w >> 2] |= (224 | C >> 12) << W[w++ & 3], g[w >> 2] |= (128 | C >> 6 & 63) << W[w++ & 3], g[w >> 2] |= (128 | C & 63) << W[w++ & 3]) : (C = 65536 + ((C & 1023) << 10 | u.charCodeAt(++S) & 1023), g[w >> 2] |= (240 | C >> 18) << W[w++ & 3], g[w >> 2] |= (128 | C >> 12 & 63) << W[w++ & 3], g[w >> 2] |= (128 | C >> 6 & 63) << W[w++ & 3], g[w >> 2] |= (128 | C & 63) << W[w++ & 3]);
|
|
356
|
+
this.lastByteIndex = w, this.bytes += w - this.start, w >= 64 ? (this.block = g[16], this.start = w - 64, this.hash(), this.hashed = !0) : this.start = w;
|
|
328
357
|
}
|
|
329
358
|
return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this;
|
|
330
359
|
}
|
|
331
|
-
},
|
|
360
|
+
}, z.prototype.finalize = function() {
|
|
332
361
|
if (!this.finalized) {
|
|
333
362
|
this.finalized = !0;
|
|
334
|
-
var
|
|
335
|
-
|
|
363
|
+
var u = this.blocks, x = this.lastByteIndex;
|
|
364
|
+
u[16] = this.block, u[x >> 2] |= K[x & 3], this.block = u[16], x >= 56 && (this.hashed || this.hash(), u[0] = this.block, u[16] = u[1] = u[2] = u[3] = u[4] = u[5] = u[6] = u[7] = u[8] = u[9] = u[10] = u[11] = u[12] = u[13] = u[14] = u[15] = 0), u[14] = this.hBytes << 3 | this.bytes >>> 29, u[15] = this.bytes << 3, this.hash();
|
|
336
365
|
}
|
|
337
|
-
},
|
|
338
|
-
var
|
|
339
|
-
for (
|
|
340
|
-
|
|
341
|
-
for (
|
|
342
|
-
this.first ? (this.is224 ? (
|
|
343
|
-
this.h0 = this.h0 +
|
|
344
|
-
},
|
|
366
|
+
}, z.prototype.hash = function() {
|
|
367
|
+
var u = this.h0, x = this.h1, I = this.h2, C = this.h3, S = this.h4, w = this.h5, i = this.h6, g = this.h7, T = this.blocks, N, $, F, Z, H, Q, s, a, p, m, l;
|
|
368
|
+
for (N = 16; N < 64; ++N)
|
|
369
|
+
H = T[N - 15], $ = (H >>> 7 | H << 25) ^ (H >>> 18 | H << 14) ^ H >>> 3, H = T[N - 2], F = (H >>> 17 | H << 15) ^ (H >>> 19 | H << 13) ^ H >>> 10, T[N] = T[N - 16] + $ + T[N - 7] + F << 0;
|
|
370
|
+
for (l = x & I, N = 0; N < 64; N += 4)
|
|
371
|
+
this.first ? (this.is224 ? (a = 300032, H = T[0] - 1413257819, g = H - 150054599 << 0, C = H + 24177077 << 0) : (a = 704751109, H = T[0] - 210244248, g = H - 1521486534 << 0, C = H + 143694565 << 0), this.first = !1) : ($ = (u >>> 2 | u << 30) ^ (u >>> 13 | u << 19) ^ (u >>> 22 | u << 10), F = (S >>> 6 | S << 26) ^ (S >>> 11 | S << 21) ^ (S >>> 25 | S << 7), a = u & x, Z = a ^ u & I ^ l, s = S & w ^ ~S & i, H = g + F + s + Y[N] + T[N], Q = $ + Z, g = C + H << 0, C = H + Q << 0), $ = (C >>> 2 | C << 30) ^ (C >>> 13 | C << 19) ^ (C >>> 22 | C << 10), F = (g >>> 6 | g << 26) ^ (g >>> 11 | g << 21) ^ (g >>> 25 | g << 7), p = C & u, Z = p ^ C & x ^ a, s = g & S ^ ~g & w, H = i + F + s + Y[N + 1] + T[N + 1], Q = $ + Z, i = I + H << 0, I = H + Q << 0, $ = (I >>> 2 | I << 30) ^ (I >>> 13 | I << 19) ^ (I >>> 22 | I << 10), F = (i >>> 6 | i << 26) ^ (i >>> 11 | i << 21) ^ (i >>> 25 | i << 7), m = I & C, Z = m ^ I & u ^ p, s = i & g ^ ~i & S, H = w + F + s + Y[N + 2] + T[N + 2], Q = $ + Z, w = x + H << 0, x = H + Q << 0, $ = (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10), F = (w >>> 6 | w << 26) ^ (w >>> 11 | w << 21) ^ (w >>> 25 | w << 7), l = x & I, Z = l ^ x & C ^ m, s = w & i ^ ~w & g, H = S + F + s + Y[N + 3] + T[N + 3], Q = $ + Z, S = u + H << 0, u = H + Q << 0, this.chromeBugWorkAround = !0;
|
|
372
|
+
this.h0 = this.h0 + u << 0, this.h1 = this.h1 + x << 0, this.h2 = this.h2 + I << 0, this.h3 = this.h3 + C << 0, this.h4 = this.h4 + S << 0, this.h5 = this.h5 + w << 0, this.h6 = this.h6 + i << 0, this.h7 = this.h7 + g << 0;
|
|
373
|
+
}, z.prototype.hex = function() {
|
|
345
374
|
this.finalize();
|
|
346
|
-
var
|
|
347
|
-
return this.is224 || (
|
|
348
|
-
},
|
|
375
|
+
var u = this.h0, x = this.h1, I = this.h2, C = this.h3, S = this.h4, w = this.h5, i = this.h6, g = this.h7, T = h[u >> 28 & 15] + h[u >> 24 & 15] + h[u >> 20 & 15] + h[u >> 16 & 15] + h[u >> 12 & 15] + h[u >> 8 & 15] + h[u >> 4 & 15] + h[u & 15] + h[x >> 28 & 15] + h[x >> 24 & 15] + h[x >> 20 & 15] + h[x >> 16 & 15] + h[x >> 12 & 15] + h[x >> 8 & 15] + h[x >> 4 & 15] + h[x & 15] + h[I >> 28 & 15] + h[I >> 24 & 15] + h[I >> 20 & 15] + h[I >> 16 & 15] + h[I >> 12 & 15] + h[I >> 8 & 15] + h[I >> 4 & 15] + h[I & 15] + h[C >> 28 & 15] + h[C >> 24 & 15] + h[C >> 20 & 15] + h[C >> 16 & 15] + h[C >> 12 & 15] + h[C >> 8 & 15] + h[C >> 4 & 15] + h[C & 15] + h[S >> 28 & 15] + h[S >> 24 & 15] + h[S >> 20 & 15] + h[S >> 16 & 15] + h[S >> 12 & 15] + h[S >> 8 & 15] + h[S >> 4 & 15] + h[S & 15] + h[w >> 28 & 15] + h[w >> 24 & 15] + h[w >> 20 & 15] + h[w >> 16 & 15] + h[w >> 12 & 15] + h[w >> 8 & 15] + h[w >> 4 & 15] + h[w & 15] + h[i >> 28 & 15] + h[i >> 24 & 15] + h[i >> 20 & 15] + h[i >> 16 & 15] + h[i >> 12 & 15] + h[i >> 8 & 15] + h[i >> 4 & 15] + h[i & 15];
|
|
376
|
+
return this.is224 || (T += h[g >> 28 & 15] + h[g >> 24 & 15] + h[g >> 20 & 15] + h[g >> 16 & 15] + h[g >> 12 & 15] + h[g >> 8 & 15] + h[g >> 4 & 15] + h[g & 15]), T;
|
|
377
|
+
}, z.prototype.toString = z.prototype.hex, z.prototype.digest = function() {
|
|
349
378
|
this.finalize();
|
|
350
|
-
var
|
|
351
|
-
a >> 24 & 255,
|
|
352
|
-
a >> 16 & 255,
|
|
353
|
-
a >> 8 & 255,
|
|
354
|
-
a & 255,
|
|
355
|
-
o >> 24 & 255,
|
|
356
|
-
o >> 16 & 255,
|
|
357
|
-
o >> 8 & 255,
|
|
358
|
-
o & 255,
|
|
379
|
+
var u = this.h0, x = this.h1, I = this.h2, C = this.h3, S = this.h4, w = this.h5, i = this.h6, g = this.h7, T = [
|
|
359
380
|
u >> 24 & 255,
|
|
360
381
|
u >> 16 & 255,
|
|
361
382
|
u >> 8 & 255,
|
|
362
383
|
u & 255,
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
384
|
+
x >> 24 & 255,
|
|
385
|
+
x >> 16 & 255,
|
|
386
|
+
x >> 8 & 255,
|
|
387
|
+
x & 255,
|
|
388
|
+
I >> 24 & 255,
|
|
389
|
+
I >> 16 & 255,
|
|
390
|
+
I >> 8 & 255,
|
|
391
|
+
I & 255,
|
|
392
|
+
C >> 24 & 255,
|
|
393
|
+
C >> 16 & 255,
|
|
394
|
+
C >> 8 & 255,
|
|
395
|
+
C & 255,
|
|
396
|
+
S >> 24 & 255,
|
|
397
|
+
S >> 16 & 255,
|
|
398
|
+
S >> 8 & 255,
|
|
399
|
+
S & 255,
|
|
400
|
+
w >> 24 & 255,
|
|
401
|
+
w >> 16 & 255,
|
|
402
|
+
w >> 8 & 255,
|
|
403
|
+
w & 255,
|
|
404
|
+
i >> 24 & 255,
|
|
405
|
+
i >> 16 & 255,
|
|
406
|
+
i >> 8 & 255,
|
|
407
|
+
i & 255
|
|
379
408
|
];
|
|
380
|
-
return this.is224 ||
|
|
381
|
-
},
|
|
409
|
+
return this.is224 || T.push(g >> 24 & 255, g >> 16 & 255, g >> 8 & 255, g & 255), T;
|
|
410
|
+
}, z.prototype.array = z.prototype.digest, z.prototype.arrayBuffer = function() {
|
|
382
411
|
this.finalize();
|
|
383
|
-
var
|
|
384
|
-
return
|
|
412
|
+
var u = new ArrayBuffer(this.is224 ? 28 : 32), x = new DataView(u);
|
|
413
|
+
return x.setUint32(0, this.h0), x.setUint32(4, this.h1), x.setUint32(8, this.h2), x.setUint32(12, this.h3), x.setUint32(16, this.h4), x.setUint32(20, this.h5), x.setUint32(24, this.h6), this.is224 || x.setUint32(28, this.h7), u;
|
|
385
414
|
};
|
|
386
|
-
function
|
|
387
|
-
var
|
|
388
|
-
if (
|
|
389
|
-
var
|
|
390
|
-
for (
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
} else if (
|
|
394
|
-
if (
|
|
395
|
-
throw new Error(
|
|
396
|
-
if (
|
|
397
|
-
|
|
398
|
-
else if (!Array.isArray(
|
|
399
|
-
throw new Error(
|
|
415
|
+
function we(u, x, I) {
|
|
416
|
+
var C, S = typeof u;
|
|
417
|
+
if (S === "string") {
|
|
418
|
+
var w = [], i = u.length, g = 0, T;
|
|
419
|
+
for (C = 0; C < i; ++C)
|
|
420
|
+
T = u.charCodeAt(C), T < 128 ? w[g++] = T : T < 2048 ? (w[g++] = 192 | T >> 6, w[g++] = 128 | T & 63) : T < 55296 || T >= 57344 ? (w[g++] = 224 | T >> 12, w[g++] = 128 | T >> 6 & 63, w[g++] = 128 | T & 63) : (T = 65536 + ((T & 1023) << 10 | u.charCodeAt(++C) & 1023), w[g++] = 240 | T >> 18, w[g++] = 128 | T >> 12 & 63, w[g++] = 128 | T >> 6 & 63, w[g++] = 128 | T & 63);
|
|
421
|
+
u = w;
|
|
422
|
+
} else if (S === "object") {
|
|
423
|
+
if (u === null)
|
|
424
|
+
throw new Error(o);
|
|
425
|
+
if (M && u.constructor === ArrayBuffer)
|
|
426
|
+
u = new Uint8Array(u);
|
|
427
|
+
else if (!Array.isArray(u) && (!M || !ArrayBuffer.isView(u)))
|
|
428
|
+
throw new Error(o);
|
|
400
429
|
} else
|
|
401
|
-
throw new Error(
|
|
402
|
-
|
|
403
|
-
var
|
|
404
|
-
for (
|
|
405
|
-
var
|
|
406
|
-
|
|
430
|
+
throw new Error(o);
|
|
431
|
+
u.length > 64 && (u = new z(x, !0).update(u).array());
|
|
432
|
+
var N = [], $ = [];
|
|
433
|
+
for (C = 0; C < 64; ++C) {
|
|
434
|
+
var F = u[C] || 0;
|
|
435
|
+
N[C] = 92 ^ F, $[C] = 54 ^ F;
|
|
407
436
|
}
|
|
408
|
-
|
|
437
|
+
z.call(this, x, I), this.update($), this.oKeyPad = N, this.inner = !0, this.sharedMemory = I;
|
|
409
438
|
}
|
|
410
|
-
|
|
411
|
-
if (
|
|
439
|
+
we.prototype = new z(), we.prototype.finalize = function() {
|
|
440
|
+
if (z.prototype.finalize.call(this), this.inner) {
|
|
412
441
|
this.inner = !1;
|
|
413
|
-
var
|
|
414
|
-
|
|
442
|
+
var u = this.array();
|
|
443
|
+
z.call(this, this.is224, this.sharedMemory), this.update(this.oKeyPad), this.update(u), z.prototype.finalize.call(this);
|
|
415
444
|
}
|
|
416
445
|
};
|
|
417
|
-
var
|
|
418
|
-
|
|
446
|
+
var X = be();
|
|
447
|
+
X.sha256 = X, X.sha224 = be(!0), X.sha256.hmac = de(), X.sha224.hmac = de(!0), B ? c.exports = X : (y.sha256 = X.sha256, y.sha224 = X.sha224);
|
|
419
448
|
})();
|
|
420
|
-
})(
|
|
421
|
-
var
|
|
422
|
-
const
|
|
449
|
+
})(gn);
|
|
450
|
+
var As = gn.exports;
|
|
451
|
+
const Ss = /* @__PURE__ */ hn(As);
|
|
452
|
+
class Je extends Error {
|
|
453
|
+
}
|
|
454
|
+
Je.prototype.name = "InvalidTokenError";
|
|
455
|
+
function _s(c) {
|
|
456
|
+
return decodeURIComponent(atob(c).replace(/(.)/g, (o, f) => {
|
|
457
|
+
let y = f.charCodeAt(0).toString(16).toUpperCase();
|
|
458
|
+
return y.length < 2 && (y = "0" + y), "%" + y;
|
|
459
|
+
}));
|
|
460
|
+
}
|
|
461
|
+
function Es(c) {
|
|
462
|
+
let o = c.replace(/-/g, "+").replace(/_/g, "/");
|
|
463
|
+
switch (o.length % 4) {
|
|
464
|
+
case 0:
|
|
465
|
+
break;
|
|
466
|
+
case 2:
|
|
467
|
+
o += "==";
|
|
468
|
+
break;
|
|
469
|
+
case 3:
|
|
470
|
+
o += "=";
|
|
471
|
+
break;
|
|
472
|
+
default:
|
|
473
|
+
throw new Error("base64 string is not of the correct length");
|
|
474
|
+
}
|
|
475
|
+
try {
|
|
476
|
+
return _s(o);
|
|
477
|
+
} catch {
|
|
478
|
+
return atob(o);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
function bt(c, o) {
|
|
482
|
+
if (typeof c != "string")
|
|
483
|
+
throw new Je("Invalid token specified: must be a string");
|
|
484
|
+
o || (o = {});
|
|
485
|
+
const f = o.header === !0 ? 0 : 1, y = c.split(".")[f];
|
|
486
|
+
if (typeof y != "string")
|
|
487
|
+
throw new Je(`Invalid token specified: missing part #${f + 1}`);
|
|
488
|
+
let L;
|
|
489
|
+
try {
|
|
490
|
+
L = Es(y);
|
|
491
|
+
} catch (k) {
|
|
492
|
+
throw new Je(`Invalid token specified: invalid base64 for part #${f + 1} (${k.message})`);
|
|
493
|
+
}
|
|
494
|
+
try {
|
|
495
|
+
return JSON.parse(L);
|
|
496
|
+
} catch (k) {
|
|
497
|
+
throw new Je(`Invalid token specified: invalid json for part #${f + 1} (${k.message})`);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
423
500
|
if (typeof Promise > "u")
|
|
424
501
|
throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");
|
|
425
|
-
function
|
|
426
|
-
if (!(this instanceof
|
|
502
|
+
function mn(c) {
|
|
503
|
+
if (!(this instanceof mn))
|
|
427
504
|
throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");
|
|
428
|
-
for (var o = this,
|
|
505
|
+
for (var o = this, f, y = [], L, k = {
|
|
429
506
|
enable: !0,
|
|
430
507
|
callbackList: [],
|
|
431
508
|
interval: 5
|
|
432
|
-
},
|
|
433
|
-
(
|
|
434
|
-
var
|
|
509
|
+
}, B = document.getElementsByTagName("script"), M = 0; M < B.length; M++)
|
|
510
|
+
(B[M].src.indexOf("keycloak.js") !== -1 || B[M].src.indexOf("keycloak.min.js") !== -1) && B[M].src.indexOf("version=") !== -1 && (o.iframeVersion = B[M].src.substring(B[M].src.indexOf("version=") + 8).split("&")[0]);
|
|
511
|
+
var h = !0, K = Q(console.info), W = Q(console.warn);
|
|
435
512
|
o.init = function(s) {
|
|
436
513
|
if (o.didInitialize)
|
|
437
514
|
throw new Error("A 'Keycloak' instance can only be initialized once.");
|
|
438
|
-
o.didInitialize = !0, o.authenticated = !1,
|
|
439
|
-
var
|
|
440
|
-
if (s &&
|
|
441
|
-
if (typeof s.useNonce < "u" && (
|
|
515
|
+
o.didInitialize = !0, o.authenticated = !1, L = H();
|
|
516
|
+
var a = ["default", "cordova", "cordova-native"];
|
|
517
|
+
if (s && a.indexOf(s.adapter) > -1 ? f = $(s.adapter) : s && typeof s.adapter == "object" ? f = s.adapter : window.Cordova || window.cordova ? f = $("cordova") : f = $(), s) {
|
|
518
|
+
if (typeof s.useNonce < "u" && (h = s.useNonce), typeof s.checkLoginIframe < "u" && (k.enable = s.checkLoginIframe), s.checkLoginIframeInterval && (k.interval = s.checkLoginIframeInterval), s.onLoad === "login-required" && (o.loginRequired = !0), s.responseMode)
|
|
442
519
|
if (s.responseMode === "query" || s.responseMode === "fragment")
|
|
443
520
|
o.responseMode = s.responseMode;
|
|
444
521
|
else
|
|
@@ -464,43 +541,43 @@ function Keycloak(a) {
|
|
|
464
541
|
throw "Invalid value for pkceMethod";
|
|
465
542
|
o.pkceMethod = s.pkceMethod;
|
|
466
543
|
}
|
|
467
|
-
typeof s.enableLogging == "boolean" ? o.enableLogging = s.enableLogging : o.enableLogging = !1, typeof s.scope == "string" && (o.scope = s.scope), typeof s.messageReceiveTimeout == "number" && s.messageReceiveTimeout > 0 ? o.messageReceiveTimeout = s.messageReceiveTimeout : o.messageReceiveTimeout = 1e4;
|
|
544
|
+
typeof s.enableLogging == "boolean" ? o.enableLogging = s.enableLogging : o.enableLogging = !1, typeof s.scope == "string" && (o.scope = s.scope), typeof s.acrValues == "string" && (o.acrValues = s.acrValues), typeof s.messageReceiveTimeout == "number" && s.messageReceiveTimeout > 0 ? o.messageReceiveTimeout = s.messageReceiveTimeout : o.messageReceiveTimeout = 1e4;
|
|
468
545
|
}
|
|
469
546
|
o.responseMode || (o.responseMode = "fragment"), o.responseType || (o.responseType = "code", o.flow = "standard");
|
|
470
|
-
var
|
|
471
|
-
|
|
472
|
-
o.onReady && o.onReady(o.authenticated),
|
|
547
|
+
var p = S(), m = S();
|
|
548
|
+
m.promise.then(function() {
|
|
549
|
+
o.onReady && o.onReady(o.authenticated), p.setSuccess(o.authenticated);
|
|
473
550
|
}).catch(function(_) {
|
|
474
|
-
|
|
551
|
+
p.setError(_);
|
|
475
552
|
});
|
|
476
|
-
var
|
|
477
|
-
function
|
|
478
|
-
var _ = function(
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
}).catch(function(
|
|
482
|
-
|
|
553
|
+
var l = z();
|
|
554
|
+
function A() {
|
|
555
|
+
var _ = function(j) {
|
|
556
|
+
j || (U.prompt = "none"), s && s.locale && (U.locale = s.locale), o.login(U).then(function() {
|
|
557
|
+
m.setSuccess();
|
|
558
|
+
}).catch(function(fe) {
|
|
559
|
+
m.setError(fe);
|
|
483
560
|
});
|
|
484
|
-
},
|
|
485
|
-
var
|
|
486
|
-
|
|
487
|
-
var
|
|
488
|
-
if (!(
|
|
489
|
-
var
|
|
490
|
-
|
|
561
|
+
}, E = function() {
|
|
562
|
+
var j = document.createElement("iframe"), fe = o.createLoginUrl({ prompt: "none", redirectUri: o.silentCheckSsoRedirectUri });
|
|
563
|
+
j.setAttribute("src", fe), j.setAttribute("sandbox", "allow-scripts allow-same-origin"), j.setAttribute("title", "keycloak-silent-check-sso"), j.style.display = "none", document.body.appendChild(j);
|
|
564
|
+
var he = function(ee) {
|
|
565
|
+
if (!(ee.origin !== window.location.origin || j.contentWindow !== ee.source)) {
|
|
566
|
+
var ye = x(ee.data);
|
|
567
|
+
de(ye, m), document.body.removeChild(j), window.removeEventListener("message", he);
|
|
491
568
|
}
|
|
492
569
|
};
|
|
493
|
-
window.addEventListener("message",
|
|
494
|
-
},
|
|
570
|
+
window.addEventListener("message", he);
|
|
571
|
+
}, U = {};
|
|
495
572
|
switch (s.onLoad) {
|
|
496
573
|
case "check-sso":
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
}).catch(function(
|
|
501
|
-
|
|
574
|
+
k.enable ? i().then(function() {
|
|
575
|
+
T().then(function(j) {
|
|
576
|
+
j ? m.setSuccess() : o.silentCheckSsoRedirectUri ? E() : _(!1);
|
|
577
|
+
}).catch(function(j) {
|
|
578
|
+
m.setError(j);
|
|
502
579
|
});
|
|
503
|
-
}) : o.silentCheckSsoRedirectUri ?
|
|
580
|
+
}) : o.silentCheckSsoRedirectUri ? E() : _(!1);
|
|
504
581
|
break;
|
|
505
582
|
case "login-required":
|
|
506
583
|
_(!0);
|
|
@@ -510,491 +587,476 @@ function Keycloak(a) {
|
|
|
510
587
|
}
|
|
511
588
|
}
|
|
512
589
|
function v() {
|
|
513
|
-
var _ =
|
|
590
|
+
var _ = x(window.location.href);
|
|
514
591
|
if (_ && window.history.replaceState(window.history.state, null, _.newUrl), _ && _.valid)
|
|
515
|
-
return
|
|
516
|
-
|
|
517
|
-
}).catch(function(
|
|
518
|
-
|
|
592
|
+
return i().then(function() {
|
|
593
|
+
de(_, m);
|
|
594
|
+
}).catch(function(E) {
|
|
595
|
+
m.setError(E);
|
|
519
596
|
});
|
|
520
|
-
s ? s.token && s.refreshToken ? (
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
}).catch(function(
|
|
524
|
-
|
|
597
|
+
s ? s.token && s.refreshToken ? (X(s.token, s.refreshToken, s.idToken), k.enable ? i().then(function() {
|
|
598
|
+
T().then(function(E) {
|
|
599
|
+
E ? (o.onAuthSuccess && o.onAuthSuccess(), m.setSuccess(), g()) : m.setSuccess();
|
|
600
|
+
}).catch(function(E) {
|
|
601
|
+
m.setError(E);
|
|
525
602
|
});
|
|
526
603
|
}) : o.updateToken(-1).then(function() {
|
|
527
|
-
o.onAuthSuccess && o.onAuthSuccess(),
|
|
528
|
-
}).catch(function(
|
|
529
|
-
o.onAuthError && o.onAuthError(), s.onLoad ?
|
|
530
|
-
})) : s.onLoad ?
|
|
604
|
+
o.onAuthSuccess && o.onAuthSuccess(), m.setSuccess();
|
|
605
|
+
}).catch(function(E) {
|
|
606
|
+
o.onAuthError && o.onAuthError(), s.onLoad ? A() : m.setError(E);
|
|
607
|
+
})) : s.onLoad ? A() : m.setSuccess() : m.setSuccess();
|
|
531
608
|
}
|
|
532
609
|
function b() {
|
|
533
|
-
var _ =
|
|
534
|
-
(document.readyState === "interactive" || document.readyState === "complete") && (document.removeEventListener("readystatechange",
|
|
610
|
+
var _ = S(), E = function() {
|
|
611
|
+
(document.readyState === "interactive" || document.readyState === "complete") && (document.removeEventListener("readystatechange", E), _.setSuccess());
|
|
535
612
|
};
|
|
536
|
-
return document.addEventListener("readystatechange",
|
|
613
|
+
return document.addEventListener("readystatechange", E), E(), _.promise;
|
|
537
614
|
}
|
|
538
|
-
return
|
|
539
|
-
b().then(
|
|
540
|
-
|
|
615
|
+
return l.then(function() {
|
|
616
|
+
b().then(N).then(v).catch(function(_) {
|
|
617
|
+
p.setError(_);
|
|
541
618
|
});
|
|
542
|
-
}),
|
|
543
|
-
|
|
544
|
-
}),
|
|
619
|
+
}), l.catch(function(_) {
|
|
620
|
+
p.setError(_);
|
|
621
|
+
}), p.promise;
|
|
545
622
|
}, o.login = function(s) {
|
|
546
|
-
return
|
|
623
|
+
return f.login(s);
|
|
547
624
|
};
|
|
548
|
-
function
|
|
549
|
-
var
|
|
550
|
-
if (
|
|
551
|
-
return
|
|
552
|
-
|
|
553
|
-
for (var
|
|
554
|
-
|
|
555
|
-
return
|
|
625
|
+
function Y(s) {
|
|
626
|
+
var a = null, p = window.crypto || window.msCrypto;
|
|
627
|
+
if (p && p.getRandomValues && window.Uint8Array)
|
|
628
|
+
return a = new Uint8Array(s), p.getRandomValues(a), a;
|
|
629
|
+
a = new Array(s);
|
|
630
|
+
for (var m = 0; m < a.length; m++)
|
|
631
|
+
a[m] = Math.floor(256 * Math.random());
|
|
632
|
+
return a;
|
|
556
633
|
}
|
|
557
|
-
function
|
|
558
|
-
return
|
|
634
|
+
function ae(s) {
|
|
635
|
+
return V(s, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
|
|
559
636
|
}
|
|
560
|
-
function
|
|
561
|
-
for (var
|
|
562
|
-
|
|
563
|
-
return String.fromCharCode.apply(null,
|
|
637
|
+
function V(s, a) {
|
|
638
|
+
for (var p = Y(s), m = new Array(s), l = 0; l < s; l++)
|
|
639
|
+
m[l] = a.charCodeAt(p[l] % a.length);
|
|
640
|
+
return String.fromCharCode.apply(null, m);
|
|
564
641
|
}
|
|
565
|
-
function
|
|
642
|
+
function Se(s, a) {
|
|
566
643
|
switch (s) {
|
|
567
644
|
case "S256":
|
|
568
|
-
var
|
|
569
|
-
return
|
|
645
|
+
var p = new Uint8Array(Ss.arrayBuffer(a)), m = nt.fromByteArray(p).replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, "");
|
|
646
|
+
return m;
|
|
570
647
|
default:
|
|
571
648
|
throw "Invalid value for pkceMethod";
|
|
572
649
|
}
|
|
573
650
|
}
|
|
574
|
-
function
|
|
575
|
-
var
|
|
651
|
+
function be(s) {
|
|
652
|
+
var a = {
|
|
576
653
|
id_token: {
|
|
577
654
|
acr: s
|
|
578
655
|
}
|
|
579
656
|
};
|
|
580
|
-
return JSON.stringify(
|
|
657
|
+
return JSON.stringify(a);
|
|
581
658
|
}
|
|
582
659
|
o.createLoginUrl = function(s) {
|
|
583
|
-
var
|
|
584
|
-
state:
|
|
585
|
-
nonce:
|
|
586
|
-
redirectUri: encodeURIComponent(
|
|
660
|
+
var a = u(), p = u(), m = f.redirectUri(s), l = {
|
|
661
|
+
state: a,
|
|
662
|
+
nonce: p,
|
|
663
|
+
redirectUri: encodeURIComponent(m)
|
|
587
664
|
};
|
|
588
|
-
s && s.prompt && (
|
|
589
|
-
var
|
|
590
|
-
s && s.action == "register" ?
|
|
665
|
+
s && s.prompt && (l.prompt = s.prompt);
|
|
666
|
+
var A;
|
|
667
|
+
s && s.action == "register" ? A = o.endpoints.register() : A = o.endpoints.authorize();
|
|
591
668
|
var v = s && s.scope || o.scope;
|
|
592
669
|
v ? v.indexOf("openid") === -1 && (v = "openid " + v) : v = "openid";
|
|
593
|
-
var b =
|
|
594
|
-
if (
|
|
595
|
-
var _ =
|
|
670
|
+
var b = A + "?client_id=" + encodeURIComponent(o.clientId) + "&redirect_uri=" + encodeURIComponent(m) + "&state=" + encodeURIComponent(a) + "&response_mode=" + encodeURIComponent(o.responseMode) + "&response_type=" + encodeURIComponent(o.responseType) + "&scope=" + encodeURIComponent(v);
|
|
671
|
+
if (h && (b = b + "&nonce=" + encodeURIComponent(p)), s && s.prompt && (b += "&prompt=" + encodeURIComponent(s.prompt)), s && s.maxAge && (b += "&max_age=" + encodeURIComponent(s.maxAge)), s && s.loginHint && (b += "&login_hint=" + encodeURIComponent(s.loginHint)), s && s.idpHint && (b += "&kc_idp_hint=" + encodeURIComponent(s.idpHint)), s && s.action && s.action != "register" && (b += "&kc_action=" + encodeURIComponent(s.action)), s && s.locale && (b += "&ui_locales=" + encodeURIComponent(s.locale)), s && s.acr) {
|
|
672
|
+
var _ = be(s.acr);
|
|
596
673
|
b += "&claims=" + encodeURIComponent(_);
|
|
597
674
|
}
|
|
598
|
-
if (o.pkceMethod) {
|
|
599
|
-
var
|
|
600
|
-
|
|
601
|
-
var
|
|
602
|
-
b += "&code_challenge=" +
|
|
675
|
+
if ((s && s.acrValues || o.acrValues) && (b += "&acr_values=" + encodeURIComponent(s.acrValues || o.acrValues)), o.pkceMethod) {
|
|
676
|
+
var E = ae(96);
|
|
677
|
+
l.pkceCodeVerifier = E;
|
|
678
|
+
var U = Se(o.pkceMethod, E);
|
|
679
|
+
b += "&code_challenge=" + U, b += "&code_challenge_method=" + o.pkceMethod;
|
|
603
680
|
}
|
|
604
|
-
return
|
|
681
|
+
return L.add(l), b;
|
|
605
682
|
}, o.logout = function(s) {
|
|
606
|
-
return
|
|
683
|
+
return f.logout(s);
|
|
607
684
|
}, o.createLogoutUrl = function(s) {
|
|
608
|
-
var
|
|
609
|
-
return o.idToken && (
|
|
685
|
+
var a = o.endpoints.logout() + "?client_id=" + encodeURIComponent(o.clientId) + "&post_logout_redirect_uri=" + encodeURIComponent(f.redirectUri(s, !1));
|
|
686
|
+
return o.idToken && (a += "&id_token_hint=" + encodeURIComponent(o.idToken)), a;
|
|
610
687
|
}, o.register = function(s) {
|
|
611
|
-
return
|
|
688
|
+
return f.register(s);
|
|
612
689
|
}, o.createRegisterUrl = function(s) {
|
|
613
690
|
return s || (s = {}), s.action = "register", o.createLoginUrl(s);
|
|
614
691
|
}, o.createAccountUrl = function(s) {
|
|
615
|
-
var
|
|
616
|
-
return typeof
|
|
692
|
+
var a = ce(), p = void 0;
|
|
693
|
+
return typeof a < "u" && (p = a + "/account?referrer=" + encodeURIComponent(o.clientId) + "&referrer_uri=" + encodeURIComponent(f.redirectUri(s))), p;
|
|
617
694
|
}, o.accountManagement = function() {
|
|
618
|
-
return
|
|
695
|
+
return f.accountManagement();
|
|
619
696
|
}, o.hasRealmRole = function(s) {
|
|
620
|
-
var
|
|
621
|
-
return !!
|
|
622
|
-
}, o.hasResourceRole = function(s,
|
|
697
|
+
var a = o.realmAccess;
|
|
698
|
+
return !!a && a.roles.indexOf(s) >= 0;
|
|
699
|
+
}, o.hasResourceRole = function(s, a) {
|
|
623
700
|
if (!o.resourceAccess)
|
|
624
701
|
return !1;
|
|
625
|
-
var
|
|
626
|
-
return !!
|
|
702
|
+
var p = o.resourceAccess[a || o.clientId];
|
|
703
|
+
return !!p && p.roles.indexOf(s) >= 0;
|
|
627
704
|
}, o.loadUserProfile = function() {
|
|
628
|
-
var s =
|
|
629
|
-
|
|
630
|
-
var
|
|
631
|
-
return
|
|
632
|
-
|
|
633
|
-
},
|
|
705
|
+
var s = ce() + "/account", a = new XMLHttpRequest();
|
|
706
|
+
a.open("GET", s, !0), a.setRequestHeader("Accept", "application/json"), a.setRequestHeader("Authorization", "bearer " + o.token);
|
|
707
|
+
var p = S();
|
|
708
|
+
return a.onreadystatechange = function() {
|
|
709
|
+
a.readyState == 4 && (a.status == 200 ? (o.profile = JSON.parse(a.responseText), p.setSuccess(o.profile)) : p.setError());
|
|
710
|
+
}, a.send(), p.promise;
|
|
634
711
|
}, o.loadUserInfo = function() {
|
|
635
|
-
var s = o.endpoints.userinfo(),
|
|
636
|
-
|
|
637
|
-
var
|
|
638
|
-
return
|
|
639
|
-
|
|
640
|
-
},
|
|
712
|
+
var s = o.endpoints.userinfo(), a = new XMLHttpRequest();
|
|
713
|
+
a.open("GET", s, !0), a.setRequestHeader("Accept", "application/json"), a.setRequestHeader("Authorization", "bearer " + o.token);
|
|
714
|
+
var p = S();
|
|
715
|
+
return a.onreadystatechange = function() {
|
|
716
|
+
a.readyState == 4 && (a.status == 200 ? (o.userInfo = JSON.parse(a.responseText), p.setSuccess(o.userInfo)) : p.setError());
|
|
717
|
+
}, a.send(), p.promise;
|
|
641
718
|
}, o.isTokenExpired = function(s) {
|
|
642
719
|
if (!o.tokenParsed || !o.refreshToken && o.flow != "implicit")
|
|
643
720
|
throw "Not authenticated";
|
|
644
721
|
if (o.timeSkew == null)
|
|
645
|
-
return
|
|
646
|
-
var
|
|
722
|
+
return K("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"), !0;
|
|
723
|
+
var a = o.tokenParsed.exp - Math.ceil((/* @__PURE__ */ new Date()).getTime() / 1e3) + o.timeSkew;
|
|
647
724
|
if (s) {
|
|
648
725
|
if (isNaN(s))
|
|
649
726
|
throw "Invalid minValidity";
|
|
650
|
-
|
|
727
|
+
a -= s;
|
|
651
728
|
}
|
|
652
|
-
return
|
|
729
|
+
return a < 0;
|
|
653
730
|
}, o.updateToken = function(s) {
|
|
654
|
-
var
|
|
731
|
+
var a = S();
|
|
655
732
|
if (!o.refreshToken)
|
|
656
|
-
return
|
|
733
|
+
return a.setError(), a.promise;
|
|
657
734
|
s = s || 5;
|
|
658
|
-
var
|
|
659
|
-
var
|
|
660
|
-
if (s == -1 ? (
|
|
661
|
-
|
|
735
|
+
var p = function() {
|
|
736
|
+
var l = !1;
|
|
737
|
+
if (s == -1 ? (l = !0, K("[KEYCLOAK] Refreshing token: forced refresh")) : (!o.tokenParsed || o.isTokenExpired(s)) && (l = !0, K("[KEYCLOAK] Refreshing token: token expired")), !l)
|
|
738
|
+
a.setSuccess(!1);
|
|
662
739
|
else {
|
|
663
|
-
var
|
|
664
|
-
if (
|
|
740
|
+
var A = "grant_type=refresh_token&refresh_token=" + o.refreshToken, v = o.endpoints.token();
|
|
741
|
+
if (y.push(a), y.length == 1) {
|
|
665
742
|
var b = new XMLHttpRequest();
|
|
666
|
-
b.open("POST", v, !0), b.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), b.withCredentials = !0,
|
|
743
|
+
b.open("POST", v, !0), b.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), b.withCredentials = !0, A += "&client_id=" + encodeURIComponent(o.clientId);
|
|
667
744
|
var _ = (/* @__PURE__ */ new Date()).getTime();
|
|
668
745
|
b.onreadystatechange = function() {
|
|
669
746
|
if (b.readyState == 4)
|
|
670
747
|
if (b.status == 200) {
|
|
671
|
-
|
|
672
|
-
var
|
|
673
|
-
|
|
674
|
-
for (var
|
|
675
|
-
|
|
748
|
+
K("[KEYCLOAK] Token refreshed"), _ = (_ + (/* @__PURE__ */ new Date()).getTime()) / 2;
|
|
749
|
+
var E = JSON.parse(b.responseText);
|
|
750
|
+
X(E.access_token, E.refresh_token, E.id_token, _), o.onAuthRefreshSuccess && o.onAuthRefreshSuccess();
|
|
751
|
+
for (var U = y.pop(); U != null; U = y.pop())
|
|
752
|
+
U.setSuccess(!0);
|
|
676
753
|
} else {
|
|
677
|
-
|
|
678
|
-
for (var
|
|
679
|
-
|
|
754
|
+
W("[KEYCLOAK] Failed to refresh token"), b.status == 400 && o.clearToken(), o.onAuthRefreshError && o.onAuthRefreshError();
|
|
755
|
+
for (var U = y.pop(); U != null; U = y.pop())
|
|
756
|
+
U.setError(!0);
|
|
680
757
|
}
|
|
681
|
-
}, b.send(
|
|
758
|
+
}, b.send(A);
|
|
682
759
|
}
|
|
683
760
|
}
|
|
684
761
|
};
|
|
685
|
-
if (
|
|
686
|
-
var
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
}).catch(function(
|
|
690
|
-
|
|
762
|
+
if (k.enable) {
|
|
763
|
+
var m = T();
|
|
764
|
+
m.then(function() {
|
|
765
|
+
p();
|
|
766
|
+
}).catch(function(l) {
|
|
767
|
+
a.setError(l);
|
|
691
768
|
});
|
|
692
769
|
} else
|
|
693
|
-
|
|
694
|
-
return
|
|
770
|
+
p();
|
|
771
|
+
return a.promise;
|
|
695
772
|
}, o.clearToken = function() {
|
|
696
|
-
o.token && (
|
|
697
|
-
};
|
|
698
|
-
function
|
|
773
|
+
o.token && (X(null, null, null), o.onAuthLogout && o.onAuthLogout(), o.loginRequired && o.login());
|
|
774
|
+
}, o.setToken = X;
|
|
775
|
+
function ce() {
|
|
699
776
|
if (typeof o.authServerUrl < "u")
|
|
700
777
|
return o.authServerUrl.charAt(o.authServerUrl.length - 1) == "/" ? o.authServerUrl + "realms/" + encodeURIComponent(o.realm) : o.authServerUrl + "/realms/" + encodeURIComponent(o.realm);
|
|
701
778
|
}
|
|
702
|
-
function
|
|
779
|
+
function Fe() {
|
|
703
780
|
return window.location.origin ? window.location.origin : window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : "");
|
|
704
781
|
}
|
|
705
|
-
function
|
|
706
|
-
var
|
|
707
|
-
if (s.kc_action_status && o.onActionUpdate && o.onActionUpdate(s.kc_action_status),
|
|
708
|
-
if (
|
|
709
|
-
var v = { error:
|
|
710
|
-
o.onAuthError && o.onAuthError(v),
|
|
782
|
+
function de(s, a) {
|
|
783
|
+
var p = s.code, m = s.error, l = s.prompt, A = (/* @__PURE__ */ new Date()).getTime();
|
|
784
|
+
if (s.kc_action_status && o.onActionUpdate && o.onActionUpdate(s.kc_action_status), m) {
|
|
785
|
+
if (l != "none") {
|
|
786
|
+
var v = { error: m, error_description: s.error_description };
|
|
787
|
+
o.onAuthError && o.onAuthError(v), a && a.setError(v);
|
|
711
788
|
} else
|
|
712
|
-
|
|
789
|
+
a && a.setSuccess();
|
|
713
790
|
return;
|
|
714
791
|
} else
|
|
715
|
-
o.flow != "standard" && (s.access_token || s.id_token) &&
|
|
716
|
-
if (o.flow != "implicit" &&
|
|
717
|
-
var b = "code=" +
|
|
718
|
-
|
|
719
|
-
if (
|
|
720
|
-
if (
|
|
721
|
-
var
|
|
722
|
-
|
|
792
|
+
o.flow != "standard" && (s.access_token || s.id_token) && U(s.access_token, null, s.id_token, !0);
|
|
793
|
+
if (o.flow != "implicit" && p) {
|
|
794
|
+
var b = "code=" + p + "&grant_type=authorization_code", _ = o.endpoints.token(), E = new XMLHttpRequest();
|
|
795
|
+
E.open("POST", _, !0), E.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), b += "&client_id=" + encodeURIComponent(o.clientId), b += "&redirect_uri=" + s.redirectUri, s.pkceCodeVerifier && (b += "&code_verifier=" + s.pkceCodeVerifier), E.withCredentials = !0, E.onreadystatechange = function() {
|
|
796
|
+
if (E.readyState == 4)
|
|
797
|
+
if (E.status == 200) {
|
|
798
|
+
var j = JSON.parse(E.responseText);
|
|
799
|
+
U(j.access_token, j.refresh_token, j.id_token, o.flow === "standard"), g();
|
|
723
800
|
} else
|
|
724
|
-
o.onAuthError && o.onAuthError(),
|
|
725
|
-
},
|
|
801
|
+
o.onAuthError && o.onAuthError(), a && a.setError();
|
|
802
|
+
}, E.send(b);
|
|
726
803
|
}
|
|
727
|
-
function
|
|
728
|
-
|
|
804
|
+
function U(j, fe, he, ee) {
|
|
805
|
+
A = (A + (/* @__PURE__ */ new Date()).getTime()) / 2, X(j, fe, he, A), h && (o.tokenParsed && o.tokenParsed.nonce != s.storedNonce || o.refreshTokenParsed && o.refreshTokenParsed.nonce != s.storedNonce || o.idTokenParsed && o.idTokenParsed.nonce != s.storedNonce) ? (K("[KEYCLOAK] Invalid nonce, clearing token"), o.clearToken(), a && a.setError()) : ee && (o.onAuthSuccess && o.onAuthSuccess(), a && a.setSuccess());
|
|
729
806
|
}
|
|
730
807
|
}
|
|
731
|
-
function
|
|
732
|
-
var
|
|
733
|
-
|
|
734
|
-
function
|
|
735
|
-
|
|
808
|
+
function z(s) {
|
|
809
|
+
var a = S(), p;
|
|
810
|
+
c ? typeof c == "string" && (p = c) : p = "keycloak.json";
|
|
811
|
+
function m(E) {
|
|
812
|
+
E ? o.endpoints = {
|
|
736
813
|
authorize: function() {
|
|
737
|
-
return
|
|
814
|
+
return E.authorization_endpoint;
|
|
738
815
|
},
|
|
739
816
|
token: function() {
|
|
740
|
-
return
|
|
817
|
+
return E.token_endpoint;
|
|
741
818
|
},
|
|
742
819
|
logout: function() {
|
|
743
|
-
if (!
|
|
820
|
+
if (!E.end_session_endpoint)
|
|
744
821
|
throw "Not supported by the OIDC server";
|
|
745
|
-
return
|
|
822
|
+
return E.end_session_endpoint;
|
|
746
823
|
},
|
|
747
824
|
checkSessionIframe: function() {
|
|
748
|
-
if (!
|
|
825
|
+
if (!E.check_session_iframe)
|
|
749
826
|
throw "Not supported by the OIDC server";
|
|
750
|
-
return
|
|
827
|
+
return E.check_session_iframe;
|
|
751
828
|
},
|
|
752
829
|
register: function() {
|
|
753
830
|
throw 'Redirection to "Register user" page not supported in standard OIDC mode';
|
|
754
831
|
},
|
|
755
832
|
userinfo: function() {
|
|
756
|
-
if (!
|
|
833
|
+
if (!E.userinfo_endpoint)
|
|
757
834
|
throw "Not supported by the OIDC server";
|
|
758
|
-
return
|
|
835
|
+
return E.userinfo_endpoint;
|
|
759
836
|
}
|
|
760
837
|
} : o.endpoints = {
|
|
761
838
|
authorize: function() {
|
|
762
|
-
return
|
|
839
|
+
return ce() + "/protocol/openid-connect/auth";
|
|
763
840
|
},
|
|
764
841
|
token: function() {
|
|
765
|
-
return
|
|
842
|
+
return ce() + "/protocol/openid-connect/token";
|
|
766
843
|
},
|
|
767
844
|
logout: function() {
|
|
768
|
-
return
|
|
845
|
+
return ce() + "/protocol/openid-connect/logout";
|
|
769
846
|
},
|
|
770
847
|
checkSessionIframe: function() {
|
|
771
|
-
var
|
|
772
|
-
return o.iframeVersion && (
|
|
848
|
+
var U = ce() + "/protocol/openid-connect/login-status-iframe.html";
|
|
849
|
+
return o.iframeVersion && (U = U + "?version=" + o.iframeVersion), U;
|
|
773
850
|
},
|
|
774
851
|
thirdPartyCookiesIframe: function() {
|
|
775
|
-
var
|
|
776
|
-
return o.iframeVersion && (
|
|
852
|
+
var U = ce() + "/protocol/openid-connect/3p-cookies/step1.html";
|
|
853
|
+
return o.iframeVersion && (U = U + "?version=" + o.iframeVersion), U;
|
|
777
854
|
},
|
|
778
855
|
register: function() {
|
|
779
|
-
return
|
|
856
|
+
return ce() + "/protocol/openid-connect/registrations";
|
|
780
857
|
},
|
|
781
858
|
userinfo: function() {
|
|
782
|
-
return
|
|
859
|
+
return ce() + "/protocol/openid-connect/userinfo";
|
|
783
860
|
}
|
|
784
861
|
};
|
|
785
862
|
}
|
|
786
|
-
if (
|
|
787
|
-
var
|
|
788
|
-
|
|
789
|
-
if (
|
|
790
|
-
if (
|
|
791
|
-
var
|
|
792
|
-
o.authServerUrl =
|
|
863
|
+
if (p) {
|
|
864
|
+
var l = new XMLHttpRequest();
|
|
865
|
+
l.open("GET", p, !0), l.setRequestHeader("Accept", "application/json"), l.onreadystatechange = function() {
|
|
866
|
+
if (l.readyState == 4)
|
|
867
|
+
if (l.status == 200 || we(l)) {
|
|
868
|
+
var E = JSON.parse(l.responseText);
|
|
869
|
+
o.authServerUrl = E["auth-server-url"], o.realm = E.realm, o.clientId = E.resource, m(null), a.setSuccess();
|
|
793
870
|
} else
|
|
794
|
-
|
|
795
|
-
},
|
|
871
|
+
a.setError();
|
|
872
|
+
}, l.send();
|
|
796
873
|
} else {
|
|
797
|
-
if (!
|
|
874
|
+
if (!c.clientId)
|
|
798
875
|
throw "clientId missing";
|
|
799
|
-
o.clientId =
|
|
800
|
-
var
|
|
801
|
-
if (
|
|
802
|
-
if (typeof
|
|
876
|
+
o.clientId = c.clientId;
|
|
877
|
+
var A = c.oidcProvider;
|
|
878
|
+
if (A)
|
|
879
|
+
if (typeof A == "string") {
|
|
803
880
|
var _;
|
|
804
|
-
|
|
805
|
-
var
|
|
806
|
-
|
|
807
|
-
if (
|
|
808
|
-
if (
|
|
809
|
-
var
|
|
810
|
-
|
|
881
|
+
A.charAt(A.length - 1) == "/" ? _ = A + ".well-known/openid-configuration" : _ = A + "/.well-known/openid-configuration";
|
|
882
|
+
var l = new XMLHttpRequest();
|
|
883
|
+
l.open("GET", _, !0), l.setRequestHeader("Accept", "application/json"), l.onreadystatechange = function() {
|
|
884
|
+
if (l.readyState == 4)
|
|
885
|
+
if (l.status == 200 || we(l)) {
|
|
886
|
+
var U = JSON.parse(l.responseText);
|
|
887
|
+
m(U), a.setSuccess();
|
|
811
888
|
} else
|
|
812
|
-
|
|
813
|
-
},
|
|
889
|
+
a.setError();
|
|
890
|
+
}, l.send();
|
|
814
891
|
} else
|
|
815
|
-
|
|
892
|
+
m(A), a.setSuccess();
|
|
816
893
|
else {
|
|
817
|
-
if (!
|
|
894
|
+
if (!c.url) {
|
|
818
895
|
for (var v = document.getElementsByTagName("script"), b = 0; b < v.length; b++)
|
|
819
896
|
if (v[b].src.match(/.*keycloak\.js/)) {
|
|
820
|
-
|
|
897
|
+
c.url = v[b].src.substr(0, v[b].src.indexOf("/js/keycloak.js"));
|
|
821
898
|
break;
|
|
822
899
|
}
|
|
823
900
|
}
|
|
824
|
-
if (!
|
|
901
|
+
if (!c.realm)
|
|
825
902
|
throw "realm missing";
|
|
826
|
-
o.authServerUrl =
|
|
903
|
+
o.authServerUrl = c.url, o.realm = c.realm, m(null), a.setSuccess();
|
|
827
904
|
}
|
|
828
905
|
}
|
|
829
|
-
return
|
|
906
|
+
return a.promise;
|
|
830
907
|
}
|
|
831
|
-
function
|
|
908
|
+
function we(s) {
|
|
832
909
|
return s.status == 0 && s.responseText && s.responseURL.startsWith("file:");
|
|
833
910
|
}
|
|
834
|
-
function
|
|
835
|
-
if (o.tokenTimeoutHandle && (clearTimeout(o.tokenTimeoutHandle), o.tokenTimeoutHandle = null),
|
|
836
|
-
if (o.token = s, o.tokenParsed =
|
|
837
|
-
var
|
|
838
|
-
|
|
911
|
+
function X(s, a, p, m) {
|
|
912
|
+
if (o.tokenTimeoutHandle && (clearTimeout(o.tokenTimeoutHandle), o.tokenTimeoutHandle = null), a ? (o.refreshToken = a, o.refreshTokenParsed = bt(a)) : (delete o.refreshToken, delete o.refreshTokenParsed), p ? (o.idToken = p, o.idTokenParsed = bt(p)) : (delete o.idToken, delete o.idTokenParsed), s) {
|
|
913
|
+
if (o.token = s, o.tokenParsed = bt(s), o.sessionId = o.tokenParsed.session_state, o.authenticated = !0, o.subject = o.tokenParsed.sub, o.realmAccess = o.tokenParsed.realm_access, o.resourceAccess = o.tokenParsed.resource_access, m && (o.timeSkew = Math.floor(m / 1e3) - o.tokenParsed.iat), o.timeSkew != null && (K("[KEYCLOAK] Estimated time difference between browser and server is " + o.timeSkew + " seconds"), o.onTokenExpired)) {
|
|
914
|
+
var l = (o.tokenParsed.exp - (/* @__PURE__ */ new Date()).getTime() / 1e3 + o.timeSkew) * 1e3;
|
|
915
|
+
K("[KEYCLOAK] Token expires in " + Math.round(l / 1e3) + " s"), l <= 0 ? o.onTokenExpired() : o.tokenTimeoutHandle = setTimeout(o.onTokenExpired, l);
|
|
839
916
|
}
|
|
840
917
|
} else
|
|
841
918
|
delete o.token, delete o.tokenParsed, delete o.subject, delete o.realmAccess, delete o.resourceAccess, o.authenticated = !1;
|
|
842
919
|
}
|
|
843
|
-
function
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
s += "==";
|
|
849
|
-
break;
|
|
850
|
-
case 3:
|
|
851
|
-
s += "=";
|
|
852
|
-
break;
|
|
853
|
-
default:
|
|
854
|
-
throw "Invalid token";
|
|
855
|
-
}
|
|
856
|
-
return s = decodeURIComponent(escape(atob(s))), s = JSON.parse(s), s;
|
|
857
|
-
}
|
|
858
|
-
function Fe() {
|
|
859
|
-
var s = "0123456789abcdef", c = T(36, s).split("");
|
|
860
|
-
c[14] = "4", c[19] = s.substr(c[19] & 3 | 8, 1), c[8] = c[13] = c[18] = c[23] = "-";
|
|
861
|
-
var g = c.join("");
|
|
862
|
-
return g;
|
|
920
|
+
function u() {
|
|
921
|
+
var s = "0123456789abcdef", a = V(36, s).split("");
|
|
922
|
+
a[14] = "4", a[19] = s.substr(a[19] & 3 | 8, 1), a[8] = a[13] = a[18] = a[23] = "-";
|
|
923
|
+
var p = a.join("");
|
|
924
|
+
return p;
|
|
863
925
|
}
|
|
864
|
-
function
|
|
865
|
-
var
|
|
866
|
-
if (
|
|
867
|
-
var
|
|
868
|
-
return
|
|
926
|
+
function x(s) {
|
|
927
|
+
var a = I(s);
|
|
928
|
+
if (a) {
|
|
929
|
+
var p = L.get(a.state);
|
|
930
|
+
return p && (a.valid = !0, a.redirectUri = p.redirectUri, a.storedNonce = p.nonce, a.prompt = p.prompt, a.pkceCodeVerifier = p.pkceCodeVerifier), a;
|
|
869
931
|
}
|
|
870
932
|
}
|
|
871
|
-
function
|
|
872
|
-
var
|
|
933
|
+
function I(s) {
|
|
934
|
+
var a;
|
|
873
935
|
switch (o.flow) {
|
|
874
936
|
case "standard":
|
|
875
|
-
|
|
937
|
+
a = ["code", "state", "session_state", "kc_action_status", "iss"];
|
|
876
938
|
break;
|
|
877
939
|
case "implicit":
|
|
878
|
-
|
|
940
|
+
a = ["access_token", "token_type", "id_token", "state", "session_state", "expires_in", "kc_action_status", "iss"];
|
|
879
941
|
break;
|
|
880
942
|
case "hybrid":
|
|
881
|
-
|
|
943
|
+
a = ["access_token", "token_type", "id_token", "code", "state", "session_state", "expires_in", "kc_action_status", "iss"];
|
|
882
944
|
break;
|
|
883
945
|
}
|
|
884
|
-
|
|
885
|
-
var
|
|
886
|
-
if (o.responseMode === "query" &&
|
|
946
|
+
a.push("error"), a.push("error_description"), a.push("error_uri");
|
|
947
|
+
var p = s.indexOf("?"), m = s.indexOf("#"), l, A;
|
|
948
|
+
if (o.responseMode === "query" && p !== -1 ? (l = s.substring(0, p), A = C(s.substring(p + 1, m !== -1 ? m : s.length), a), A.paramsString !== "" && (l += "?" + A.paramsString), m !== -1 && (l += s.substring(m))) : o.responseMode === "fragment" && m !== -1 && (l = s.substring(0, m), A = C(s.substring(m + 1), a), A.paramsString !== "" && (l += "#" + A.paramsString)), A && A.oauthParams) {
|
|
887
949
|
if (o.flow === "standard" || o.flow === "hybrid") {
|
|
888
|
-
if ((
|
|
889
|
-
return
|
|
890
|
-
} else if (o.flow === "implicit" && (
|
|
891
|
-
return
|
|
950
|
+
if ((A.oauthParams.code || A.oauthParams.error) && A.oauthParams.state)
|
|
951
|
+
return A.oauthParams.newUrl = l, A.oauthParams;
|
|
952
|
+
} else if (o.flow === "implicit" && (A.oauthParams.access_token || A.oauthParams.error) && A.oauthParams.state)
|
|
953
|
+
return A.oauthParams.newUrl = l, A.oauthParams;
|
|
892
954
|
}
|
|
893
955
|
}
|
|
894
|
-
function
|
|
895
|
-
for (var
|
|
956
|
+
function C(s, a) {
|
|
957
|
+
for (var p = s.split("&"), m = {
|
|
896
958
|
paramsString: "",
|
|
897
959
|
oauthParams: {}
|
|
898
|
-
},
|
|
899
|
-
var
|
|
900
|
-
|
|
960
|
+
}, l = 0; l < p.length; l++) {
|
|
961
|
+
var A = p[l].indexOf("="), v = p[l].slice(0, A);
|
|
962
|
+
a.indexOf(v) !== -1 ? m.oauthParams[v] = p[l].slice(A + 1) : (m.paramsString !== "" && (m.paramsString += "&"), m.paramsString += p[l]);
|
|
901
963
|
}
|
|
902
|
-
return
|
|
964
|
+
return m;
|
|
903
965
|
}
|
|
904
|
-
function
|
|
966
|
+
function S() {
|
|
905
967
|
var s = {
|
|
906
|
-
setSuccess: function(
|
|
907
|
-
s.resolve(
|
|
968
|
+
setSuccess: function(a) {
|
|
969
|
+
s.resolve(a);
|
|
908
970
|
},
|
|
909
|
-
setError: function(
|
|
910
|
-
s.reject(
|
|
971
|
+
setError: function(a) {
|
|
972
|
+
s.reject(a);
|
|
911
973
|
}
|
|
912
974
|
};
|
|
913
|
-
return s.promise = new Promise(function(
|
|
914
|
-
s.resolve =
|
|
975
|
+
return s.promise = new Promise(function(a, p) {
|
|
976
|
+
s.resolve = a, s.reject = p;
|
|
915
977
|
}), s;
|
|
916
978
|
}
|
|
917
|
-
function
|
|
918
|
-
var
|
|
919
|
-
|
|
920
|
-
v({ error:
|
|
921
|
-
},
|
|
979
|
+
function w(s, a, p) {
|
|
980
|
+
var m = null, l = new Promise(function(A, v) {
|
|
981
|
+
m = setTimeout(function() {
|
|
982
|
+
v({ error: p || "Promise is not settled within timeout of " + a + "ms" });
|
|
983
|
+
}, a);
|
|
922
984
|
});
|
|
923
|
-
return Promise.race([s,
|
|
924
|
-
clearTimeout(
|
|
985
|
+
return Promise.race([s, l]).finally(function() {
|
|
986
|
+
clearTimeout(m);
|
|
925
987
|
});
|
|
926
988
|
}
|
|
927
|
-
function
|
|
928
|
-
var s =
|
|
929
|
-
if (!
|
|
989
|
+
function i() {
|
|
990
|
+
var s = S();
|
|
991
|
+
if (!k.enable || k.iframe)
|
|
930
992
|
return s.setSuccess(), s.promise;
|
|
931
|
-
var
|
|
932
|
-
|
|
933
|
-
var
|
|
934
|
-
|
|
993
|
+
var a = document.createElement("iframe");
|
|
994
|
+
k.iframe = a, a.onload = function() {
|
|
995
|
+
var l = o.endpoints.authorize();
|
|
996
|
+
l.charAt(0) === "/" ? k.iframeOrigin = Fe() : k.iframeOrigin = l.substring(0, l.indexOf("/", 8)), s.setSuccess();
|
|
935
997
|
};
|
|
936
|
-
var
|
|
937
|
-
|
|
938
|
-
var
|
|
939
|
-
if (!(
|
|
940
|
-
|
|
941
|
-
for (var
|
|
942
|
-
var b =
|
|
943
|
-
|
|
998
|
+
var p = o.endpoints.checkSessionIframe();
|
|
999
|
+
a.setAttribute("src", p), a.setAttribute("sandbox", "allow-scripts allow-same-origin"), a.setAttribute("title", "keycloak-session-iframe"), a.style.display = "none", document.body.appendChild(a);
|
|
1000
|
+
var m = function(l) {
|
|
1001
|
+
if (!(l.origin !== k.iframeOrigin || k.iframe.contentWindow !== l.source) && (l.data == "unchanged" || l.data == "changed" || l.data == "error")) {
|
|
1002
|
+
l.data != "unchanged" && o.clearToken();
|
|
1003
|
+
for (var A = k.callbackList.splice(0, k.callbackList.length), v = A.length - 1; v >= 0; --v) {
|
|
1004
|
+
var b = A[v];
|
|
1005
|
+
l.data == "error" ? b.setError() : b.setSuccess(l.data == "unchanged");
|
|
944
1006
|
}
|
|
945
1007
|
}
|
|
946
1008
|
};
|
|
947
|
-
return window.addEventListener("message",
|
|
1009
|
+
return window.addEventListener("message", m, !1), s.promise;
|
|
948
1010
|
}
|
|
949
|
-
function
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
s &&
|
|
1011
|
+
function g() {
|
|
1012
|
+
k.enable && o.token && setTimeout(function() {
|
|
1013
|
+
T().then(function(s) {
|
|
1014
|
+
s && g();
|
|
953
1015
|
});
|
|
954
|
-
},
|
|
1016
|
+
}, k.interval * 1e3);
|
|
955
1017
|
}
|
|
956
|
-
function
|
|
957
|
-
var s =
|
|
958
|
-
if (
|
|
959
|
-
var
|
|
960
|
-
|
|
961
|
-
var
|
|
962
|
-
|
|
1018
|
+
function T() {
|
|
1019
|
+
var s = S();
|
|
1020
|
+
if (k.iframe && k.iframeOrigin) {
|
|
1021
|
+
var a = o.clientId + " " + (o.sessionId ? o.sessionId : "");
|
|
1022
|
+
k.callbackList.push(s);
|
|
1023
|
+
var p = k.iframeOrigin;
|
|
1024
|
+
k.callbackList.length == 1 && k.iframe.contentWindow.postMessage(a, p);
|
|
963
1025
|
} else
|
|
964
1026
|
s.setSuccess();
|
|
965
1027
|
return s.promise;
|
|
966
1028
|
}
|
|
967
|
-
function
|
|
968
|
-
var s =
|
|
969
|
-
if (
|
|
970
|
-
var
|
|
971
|
-
|
|
972
|
-
var
|
|
973
|
-
|
|
1029
|
+
function N() {
|
|
1030
|
+
var s = S();
|
|
1031
|
+
if (k.enable || o.silentCheckSsoRedirectUri) {
|
|
1032
|
+
var a = document.createElement("iframe");
|
|
1033
|
+
a.setAttribute("src", o.endpoints.thirdPartyCookiesIframe()), a.setAttribute("sandbox", "allow-scripts allow-same-origin"), a.setAttribute("title", "keycloak-3p-check-iframe"), a.style.display = "none", document.body.appendChild(a);
|
|
1034
|
+
var p = function(m) {
|
|
1035
|
+
a.contentWindow === m.source && (m.data !== "supported" && m.data !== "unsupported" || (m.data === "unsupported" && (W(
|
|
974
1036
|
`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
|
|
975
1037
|
|
|
976
1038
|
- It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
|
|
977
1039
|
- It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
|
|
978
1040
|
|
|
979
1041
|
For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`
|
|
980
|
-
),
|
|
1042
|
+
), k.enable = !1, o.silentCheckSsoFallback && (o.silentCheckSsoRedirectUri = !1)), document.body.removeChild(a), window.removeEventListener("message", p), s.setSuccess()));
|
|
981
1043
|
};
|
|
982
|
-
window.addEventListener("message",
|
|
1044
|
+
window.addEventListener("message", p, !1);
|
|
983
1045
|
} else
|
|
984
1046
|
s.setSuccess();
|
|
985
|
-
return
|
|
1047
|
+
return w(s.promise, o.messageReceiveTimeout, "Timeout when waiting for 3rd party check iframe message.");
|
|
986
1048
|
}
|
|
987
|
-
function
|
|
1049
|
+
function $(s) {
|
|
988
1050
|
if (!s || s == "default")
|
|
989
1051
|
return {
|
|
990
1052
|
login: function(v) {
|
|
991
|
-
return window.location.assign(o.createLoginUrl(v)),
|
|
1053
|
+
return window.location.assign(o.createLoginUrl(v)), S().promise;
|
|
992
1054
|
},
|
|
993
1055
|
logout: function(v) {
|
|
994
|
-
return window.location.replace(o.createLogoutUrl(v)),
|
|
1056
|
+
return window.location.replace(o.createLogoutUrl(v)), S().promise;
|
|
995
1057
|
},
|
|
996
1058
|
register: function(v) {
|
|
997
|
-
return window.location.assign(o.createRegisterUrl(v)),
|
|
1059
|
+
return window.location.assign(o.createRegisterUrl(v)), S().promise;
|
|
998
1060
|
},
|
|
999
1061
|
accountManagement: function() {
|
|
1000
1062
|
var v = o.createAccountUrl();
|
|
@@ -1002,108 +1064,110 @@ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_m
|
|
|
1002
1064
|
window.location.href = v;
|
|
1003
1065
|
else
|
|
1004
1066
|
throw "Not supported by the OIDC server";
|
|
1005
|
-
return
|
|
1067
|
+
return S().promise;
|
|
1006
1068
|
},
|
|
1007
1069
|
redirectUri: function(v, b) {
|
|
1008
1070
|
return v && v.redirectUri ? v.redirectUri : o.redirectUri ? o.redirectUri : location.href;
|
|
1009
1071
|
}
|
|
1010
1072
|
};
|
|
1011
1073
|
if (s == "cordova") {
|
|
1012
|
-
|
|
1013
|
-
var
|
|
1074
|
+
k.enable = !1;
|
|
1075
|
+
var a = function(v, b, _) {
|
|
1014
1076
|
return window.cordova && window.cordova.InAppBrowser ? window.cordova.InAppBrowser.open(v, b, _) : window.open(v, b, _);
|
|
1015
|
-
},
|
|
1077
|
+
}, p = function(v) {
|
|
1016
1078
|
return v && v.cordovaOptions ? Object.keys(v.cordovaOptions).reduce(function(b, _) {
|
|
1017
1079
|
return b[_] = v.cordovaOptions[_], b;
|
|
1018
1080
|
}, {}) : {};
|
|
1019
|
-
},
|
|
1081
|
+
}, m = function(v) {
|
|
1020
1082
|
return Object.keys(v).reduce(function(b, _) {
|
|
1021
1083
|
return b.push(_ + "=" + v[_]), b;
|
|
1022
1084
|
}, []).join(",");
|
|
1023
|
-
},
|
|
1024
|
-
var b =
|
|
1025
|
-
return b.location = "no", v && v.prompt == "none" && (b.hidden = "yes"),
|
|
1026
|
-
},
|
|
1085
|
+
}, l = function(v) {
|
|
1086
|
+
var b = p(v);
|
|
1087
|
+
return b.location = "no", v && v.prompt == "none" && (b.hidden = "yes"), m(b);
|
|
1088
|
+
}, A = function() {
|
|
1089
|
+
return o.redirectUri || "http://localhost";
|
|
1090
|
+
};
|
|
1027
1091
|
return {
|
|
1028
1092
|
login: function(v) {
|
|
1029
|
-
var b =
|
|
1030
|
-
|
|
1093
|
+
var b = S(), _ = l(v), E = o.createLoginUrl(v), U = a(E, "_blank", _), j = !1, fe = !1, he = function() {
|
|
1094
|
+
fe = !0, U.close();
|
|
1031
1095
|
};
|
|
1032
|
-
return
|
|
1033
|
-
if (
|
|
1034
|
-
var
|
|
1035
|
-
|
|
1096
|
+
return U.addEventListener("loadstart", function(ee) {
|
|
1097
|
+
if (ee.url.indexOf(A()) == 0) {
|
|
1098
|
+
var ye = x(ee.url);
|
|
1099
|
+
de(ye, b), he(), j = !0;
|
|
1036
1100
|
}
|
|
1037
|
-
}),
|
|
1038
|
-
if (!
|
|
1039
|
-
if (
|
|
1040
|
-
var
|
|
1041
|
-
|
|
1101
|
+
}), U.addEventListener("loaderror", function(ee) {
|
|
1102
|
+
if (!j)
|
|
1103
|
+
if (ee.url.indexOf(A()) == 0) {
|
|
1104
|
+
var ye = x(ee.url);
|
|
1105
|
+
de(ye, b), he(), j = !0;
|
|
1042
1106
|
} else
|
|
1043
|
-
b.setError(),
|
|
1044
|
-
}),
|
|
1045
|
-
|
|
1107
|
+
b.setError(), he();
|
|
1108
|
+
}), U.addEventListener("exit", function(ee) {
|
|
1109
|
+
fe || b.setError({
|
|
1046
1110
|
reason: "closed_by_user"
|
|
1047
1111
|
});
|
|
1048
1112
|
}), b.promise;
|
|
1049
1113
|
},
|
|
1050
1114
|
logout: function(v) {
|
|
1051
|
-
var b =
|
|
1052
|
-
return
|
|
1053
|
-
|
|
1054
|
-
}),
|
|
1055
|
-
|
|
1056
|
-
}),
|
|
1057
|
-
|
|
1115
|
+
var b = S(), _ = o.createLogoutUrl(v), E = a(_, "_blank", "location=no,hidden=yes,clearcache=yes"), U;
|
|
1116
|
+
return E.addEventListener("loadstart", function(j) {
|
|
1117
|
+
j.url.indexOf(A()) == 0 && E.close();
|
|
1118
|
+
}), E.addEventListener("loaderror", function(j) {
|
|
1119
|
+
j.url.indexOf(A()) == 0 || (U = !0), E.close();
|
|
1120
|
+
}), E.addEventListener("exit", function(j) {
|
|
1121
|
+
U ? b.setError() : (o.clearToken(), b.setSuccess());
|
|
1058
1122
|
}), b.promise;
|
|
1059
1123
|
},
|
|
1060
1124
|
register: function(v) {
|
|
1061
|
-
var b =
|
|
1062
|
-
return
|
|
1063
|
-
if (
|
|
1064
|
-
|
|
1065
|
-
var
|
|
1066
|
-
|
|
1125
|
+
var b = S(), _ = o.createRegisterUrl(), E = l(v), U = a(_, "_blank", E);
|
|
1126
|
+
return U.addEventListener("loadstart", function(j) {
|
|
1127
|
+
if (j.url.indexOf(A()) == 0) {
|
|
1128
|
+
U.close();
|
|
1129
|
+
var fe = x(j.url);
|
|
1130
|
+
de(fe, b);
|
|
1067
1131
|
}
|
|
1068
1132
|
}), b.promise;
|
|
1069
1133
|
},
|
|
1070
1134
|
accountManagement: function() {
|
|
1071
1135
|
var v = o.createAccountUrl();
|
|
1072
1136
|
if (typeof v < "u") {
|
|
1073
|
-
var b =
|
|
1137
|
+
var b = a(v, "_blank", "location=no");
|
|
1074
1138
|
b.addEventListener("loadstart", function(_) {
|
|
1075
|
-
_.url.indexOf(
|
|
1139
|
+
_.url.indexOf(A()) == 0 && b.close();
|
|
1076
1140
|
});
|
|
1077
1141
|
} else
|
|
1078
1142
|
throw "Not supported by the OIDC server";
|
|
1079
1143
|
},
|
|
1080
1144
|
redirectUri: function(v) {
|
|
1081
|
-
return
|
|
1145
|
+
return A();
|
|
1082
1146
|
}
|
|
1083
1147
|
};
|
|
1084
1148
|
}
|
|
1085
1149
|
if (s == "cordova-native")
|
|
1086
|
-
return
|
|
1150
|
+
return k.enable = !1, {
|
|
1087
1151
|
login: function(v) {
|
|
1088
|
-
var b =
|
|
1089
|
-
return universalLinks.subscribe("keycloak", function(
|
|
1152
|
+
var b = S(), _ = o.createLoginUrl(v);
|
|
1153
|
+
return universalLinks.subscribe("keycloak", function(E) {
|
|
1090
1154
|
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close();
|
|
1091
|
-
var
|
|
1092
|
-
|
|
1155
|
+
var U = x(E.url);
|
|
1156
|
+
de(U, b);
|
|
1093
1157
|
}), window.cordova.plugins.browsertab.openUrl(_), b.promise;
|
|
1094
1158
|
},
|
|
1095
1159
|
logout: function(v) {
|
|
1096
|
-
var b =
|
|
1097
|
-
return universalLinks.subscribe("keycloak", function(
|
|
1160
|
+
var b = S(), _ = o.createLogoutUrl(v);
|
|
1161
|
+
return universalLinks.subscribe("keycloak", function(E) {
|
|
1098
1162
|
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close(), o.clearToken(), b.setSuccess();
|
|
1099
1163
|
}), window.cordova.plugins.browsertab.openUrl(_), b.promise;
|
|
1100
1164
|
},
|
|
1101
1165
|
register: function(v) {
|
|
1102
|
-
var b =
|
|
1103
|
-
return universalLinks.subscribe("keycloak", function(
|
|
1166
|
+
var b = S(), _ = o.createRegisterUrl(v);
|
|
1167
|
+
return universalLinks.subscribe("keycloak", function(E) {
|
|
1104
1168
|
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close();
|
|
1105
|
-
var
|
|
1106
|
-
|
|
1169
|
+
var U = x(E.url);
|
|
1170
|
+
de(U, b);
|
|
1107
1171
|
}), window.cordova.plugins.browsertab.openUrl(_), b.promise;
|
|
1108
1172
|
},
|
|
1109
1173
|
accountManagement: function() {
|
|
@@ -1119,124 +1183,124 @@ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_m
|
|
|
1119
1183
|
};
|
|
1120
1184
|
throw "invalid adapter type: " + s;
|
|
1121
1185
|
}
|
|
1122
|
-
var
|
|
1123
|
-
if (!(this instanceof
|
|
1124
|
-
return new
|
|
1186
|
+
var F = function() {
|
|
1187
|
+
if (!(this instanceof F))
|
|
1188
|
+
return new F();
|
|
1125
1189
|
localStorage.setItem("kc-test", "test"), localStorage.removeItem("kc-test");
|
|
1126
1190
|
var s = this;
|
|
1127
|
-
function
|
|
1128
|
-
for (var
|
|
1129
|
-
var
|
|
1130
|
-
if (
|
|
1131
|
-
var
|
|
1132
|
-
if (
|
|
1191
|
+
function a() {
|
|
1192
|
+
for (var p = (/* @__PURE__ */ new Date()).getTime(), m = 0; m < localStorage.length; m++) {
|
|
1193
|
+
var l = localStorage.key(m);
|
|
1194
|
+
if (l && l.indexOf("kc-callback-") == 0) {
|
|
1195
|
+
var A = localStorage.getItem(l);
|
|
1196
|
+
if (A)
|
|
1133
1197
|
try {
|
|
1134
|
-
var v = JSON.parse(
|
|
1135
|
-
(!v || v <
|
|
1198
|
+
var v = JSON.parse(A).expires;
|
|
1199
|
+
(!v || v < p) && localStorage.removeItem(l);
|
|
1136
1200
|
} catch {
|
|
1137
|
-
localStorage.removeItem(
|
|
1201
|
+
localStorage.removeItem(l);
|
|
1138
1202
|
}
|
|
1139
1203
|
}
|
|
1140
1204
|
}
|
|
1141
1205
|
}
|
|
1142
|
-
s.get = function(
|
|
1143
|
-
if (
|
|
1144
|
-
var
|
|
1145
|
-
return
|
|
1206
|
+
s.get = function(p) {
|
|
1207
|
+
if (p) {
|
|
1208
|
+
var m = "kc-callback-" + p, l = localStorage.getItem(m);
|
|
1209
|
+
return l && (localStorage.removeItem(m), l = JSON.parse(l)), a(), l;
|
|
1146
1210
|
}
|
|
1147
|
-
}, s.add = function(
|
|
1148
|
-
|
|
1149
|
-
var
|
|
1150
|
-
|
|
1211
|
+
}, s.add = function(p) {
|
|
1212
|
+
a();
|
|
1213
|
+
var m = "kc-callback-" + p.state;
|
|
1214
|
+
p.expires = (/* @__PURE__ */ new Date()).getTime() + 60 * 60 * 1e3, localStorage.setItem(m, JSON.stringify(p));
|
|
1151
1215
|
};
|
|
1152
|
-
},
|
|
1153
|
-
if (!(this instanceof
|
|
1154
|
-
return new
|
|
1216
|
+
}, Z = function() {
|
|
1217
|
+
if (!(this instanceof Z))
|
|
1218
|
+
return new Z();
|
|
1155
1219
|
var s = this;
|
|
1156
|
-
s.get = function(
|
|
1157
|
-
if (
|
|
1158
|
-
var
|
|
1159
|
-
if (
|
|
1160
|
-
return JSON.parse(
|
|
1220
|
+
s.get = function(l) {
|
|
1221
|
+
if (l) {
|
|
1222
|
+
var A = p("kc-callback-" + l);
|
|
1223
|
+
if (m("kc-callback-" + l, "", a(-100)), A)
|
|
1224
|
+
return JSON.parse(A);
|
|
1161
1225
|
}
|
|
1162
|
-
}, s.add = function(
|
|
1163
|
-
|
|
1164
|
-
}, s.removeItem = function(
|
|
1165
|
-
|
|
1226
|
+
}, s.add = function(l) {
|
|
1227
|
+
m("kc-callback-" + l.state, JSON.stringify(l), a(60));
|
|
1228
|
+
}, s.removeItem = function(l) {
|
|
1229
|
+
m(l, "", a(-100));
|
|
1166
1230
|
};
|
|
1167
|
-
var
|
|
1168
|
-
var
|
|
1169
|
-
return
|
|
1170
|
-
},
|
|
1171
|
-
for (var
|
|
1231
|
+
var a = function(l) {
|
|
1232
|
+
var A = /* @__PURE__ */ new Date();
|
|
1233
|
+
return A.setTime(A.getTime() + l * 60 * 1e3), A;
|
|
1234
|
+
}, p = function(l) {
|
|
1235
|
+
for (var A = l + "=", v = document.cookie.split(";"), b = 0; b < v.length; b++) {
|
|
1172
1236
|
for (var _ = v[b]; _.charAt(0) == " "; )
|
|
1173
1237
|
_ = _.substring(1);
|
|
1174
|
-
if (_.indexOf(
|
|
1175
|
-
return _.substring(
|
|
1238
|
+
if (_.indexOf(A) == 0)
|
|
1239
|
+
return _.substring(A.length, _.length);
|
|
1176
1240
|
}
|
|
1177
1241
|
return "";
|
|
1178
|
-
},
|
|
1179
|
-
var b =
|
|
1242
|
+
}, m = function(l, A, v) {
|
|
1243
|
+
var b = l + "=" + A + "; expires=" + v.toUTCString() + "; ";
|
|
1180
1244
|
document.cookie = b;
|
|
1181
1245
|
};
|
|
1182
1246
|
};
|
|
1183
|
-
function
|
|
1247
|
+
function H() {
|
|
1184
1248
|
try {
|
|
1185
|
-
return new
|
|
1249
|
+
return new F();
|
|
1186
1250
|
} catch {
|
|
1187
1251
|
}
|
|
1188
|
-
return new
|
|
1252
|
+
return new Z();
|
|
1189
1253
|
}
|
|
1190
|
-
function
|
|
1254
|
+
function Q(s) {
|
|
1191
1255
|
return function() {
|
|
1192
1256
|
o.enableLogging && s.apply(console, Array.prototype.slice.call(arguments));
|
|
1193
1257
|
};
|
|
1194
1258
|
}
|
|
1195
1259
|
}
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
}).catch((
|
|
1200
|
-
o(
|
|
1260
|
+
const ot = new mn(), Ps = (c, o) => {
|
|
1261
|
+
ot.init({ onLoad: "login-required" }).then(async (f) => {
|
|
1262
|
+
f && await Ts(), c();
|
|
1263
|
+
}).catch((f) => {
|
|
1264
|
+
o(f);
|
|
1201
1265
|
});
|
|
1202
|
-
},
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1205
|
-
},
|
|
1206
|
-
|
|
1266
|
+
}, Ts = async () => {
|
|
1267
|
+
const c = await ot.loadUserInfo();
|
|
1268
|
+
se.User.email = c.email ?? "", se.User.emailVerified = c.email_verified === !0, se.User.firstName = c.given_name ?? "", se.User.lastName = c.family_name ?? "", se.User.name = c.name ?? "", se.User.sub = c.sub ?? "", se.User.username = c.preferred_username ?? "", se.User.roles = [...c.role ?? []], se.User.groups = [...c.group ?? []], se.User.IsInRole = (o) => se.User.roles.includes(o);
|
|
1269
|
+
}, Bs = () => {
|
|
1270
|
+
ot.logout({
|
|
1207
1271
|
redirectUri: location.origin
|
|
1208
1272
|
}).then(() => {
|
|
1209
1273
|
sessionStorage.removeItem("user-info");
|
|
1210
1274
|
});
|
|
1211
|
-
},
|
|
1212
|
-
Instance:
|
|
1275
|
+
}, se = {
|
|
1276
|
+
Instance: ot,
|
|
1213
1277
|
User: {},
|
|
1214
|
-
CallLogin:
|
|
1215
|
-
CallLogout:
|
|
1278
|
+
CallLogin: Ps,
|
|
1279
|
+
CallLogout: Bs
|
|
1216
1280
|
};
|
|
1217
|
-
var
|
|
1281
|
+
var vn = { exports: {} };
|
|
1218
1282
|
/*!
|
|
1219
1283
|
* sweetalert2 v11.4.8
|
|
1220
1284
|
* Released under the MIT License.
|
|
1221
1285
|
*/
|
|
1222
|
-
(function(
|
|
1223
|
-
(function(
|
|
1224
|
-
|
|
1225
|
-
})(
|
|
1226
|
-
const
|
|
1286
|
+
(function(c, o) {
|
|
1287
|
+
(function(f, y) {
|
|
1288
|
+
c.exports = y();
|
|
1289
|
+
})(Ae, function() {
|
|
1290
|
+
const f = "SweetAlert2:", y = (e) => {
|
|
1227
1291
|
const t = [];
|
|
1228
1292
|
for (let n = 0; n < e.length; n++)
|
|
1229
1293
|
t.indexOf(e[n]) === -1 && t.push(e[n]);
|
|
1230
1294
|
return t;
|
|
1231
|
-
},
|
|
1232
|
-
console.warn("".concat(
|
|
1233
|
-
},
|
|
1234
|
-
console.error("".concat(
|
|
1235
|
-
},
|
|
1236
|
-
|
|
1237
|
-
},
|
|
1238
|
-
|
|
1239
|
-
},
|
|
1295
|
+
}, L = (e) => e.charAt(0).toUpperCase() + e.slice(1), k = (e) => Array.prototype.slice.call(e), B = (e) => {
|
|
1296
|
+
console.warn("".concat(f, " ").concat(typeof e == "object" ? e.join(" ") : e));
|
|
1297
|
+
}, M = (e) => {
|
|
1298
|
+
console.error("".concat(f, " ").concat(e));
|
|
1299
|
+
}, h = [], K = (e) => {
|
|
1300
|
+
h.includes(e) || (h.push(e), B(e));
|
|
1301
|
+
}, W = (e, t) => {
|
|
1302
|
+
K('"'.concat(e, '" is deprecated and will be removed in the next major release. Please use "').concat(t, '" instead.'));
|
|
1303
|
+
}, Y = (e) => typeof e == "function" ? e() : e, ae = (e) => e && typeof e.toPromise == "function", V = (e) => ae(e) ? e.toPromise() : Promise.resolve(e), Se = (e) => e && Promise.resolve(e) === e, be = {
|
|
1240
1304
|
title: "",
|
|
1241
1305
|
titleText: "",
|
|
1242
1306
|
text: "",
|
|
@@ -1324,25 +1388,25 @@ var sweetalert2 = { exports: {} };
|
|
|
1324
1388
|
didClose: void 0,
|
|
1325
1389
|
didDestroy: void 0,
|
|
1326
1390
|
scrollbarPadding: !0
|
|
1327
|
-
},
|
|
1328
|
-
|
|
1329
|
-
},
|
|
1330
|
-
|
|
1331
|
-
},
|
|
1332
|
-
|
|
1333
|
-
},
|
|
1334
|
-
!e.backdrop && e.allowOutsideClick &&
|
|
1391
|
+
}, ce = ["allowEscapeKey", "allowOutsideClick", "background", "buttonsStyling", "cancelButtonAriaLabel", "cancelButtonColor", "cancelButtonText", "closeButtonAriaLabel", "closeButtonHtml", "color", "confirmButtonAriaLabel", "confirmButtonColor", "confirmButtonText", "currentProgressStep", "customClass", "denyButtonAriaLabel", "denyButtonColor", "denyButtonText", "didClose", "didDestroy", "footer", "hideClass", "html", "icon", "iconColor", "iconHtml", "imageAlt", "imageHeight", "imageUrl", "imageWidth", "preConfirm", "preDeny", "progressSteps", "returnFocus", "reverseButtons", "showCancelButton", "showCloseButton", "showConfirmButton", "showDenyButton", "text", "title", "titleText", "willClose"], Fe = {}, de = ["allowOutsideClick", "allowEnterKey", "backdrop", "focusConfirm", "focusDeny", "focusCancel", "returnFocus", "heightAuto", "keydownListenerCapture"], z = (e) => Object.prototype.hasOwnProperty.call(be, e), we = (e) => ce.indexOf(e) !== -1, X = (e) => Fe[e], u = (e) => {
|
|
1392
|
+
z(e) || B('Unknown parameter "'.concat(e, '"'));
|
|
1393
|
+
}, x = (e) => {
|
|
1394
|
+
de.includes(e) && B('The parameter "'.concat(e, '" is incompatible with toasts'));
|
|
1395
|
+
}, I = (e) => {
|
|
1396
|
+
X(e) && W(e, X(e));
|
|
1397
|
+
}, C = (e) => {
|
|
1398
|
+
!e.backdrop && e.allowOutsideClick && B('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');
|
|
1335
1399
|
for (const t in e)
|
|
1336
|
-
|
|
1337
|
-
},
|
|
1400
|
+
u(t), e.toast && x(t), I(t);
|
|
1401
|
+
}, S = "swal2-", w = (e) => {
|
|
1338
1402
|
const t = {};
|
|
1339
1403
|
for (const n in e)
|
|
1340
|
-
t[e[n]] =
|
|
1404
|
+
t[e[n]] = S + e[n];
|
|
1341
1405
|
return t;
|
|
1342
|
-
},
|
|
1343
|
-
const t =
|
|
1406
|
+
}, i = w(["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"]), g = w(["success", "warning", "info", "question", "error"]), T = () => document.body.querySelector(".".concat(i.container)), N = (e) => {
|
|
1407
|
+
const t = T();
|
|
1344
1408
|
return t ? t.querySelector(e) : null;
|
|
1345
|
-
},
|
|
1409
|
+
}, $ = (e) => N(".".concat(e)), F = () => $(i.popup), Z = () => $(i.icon), H = () => $(i.title), Q = () => $(i["html-container"]), s = () => $(i.image), a = () => $(i["progress-steps"]), p = () => $(i["validation-message"]), m = () => N(".".concat(i.actions, " .").concat(i.confirm)), l = () => N(".".concat(i.actions, " .").concat(i.deny)), A = () => $(i["input-label"]), v = () => N(".".concat(i.loader)), b = () => N(".".concat(i.actions, " .").concat(i.cancel)), _ = () => $(i.actions), E = () => $(i.footer), U = () => $(i["timer-progress-bar"]), j = () => $(i.close), fe = `
|
|
1346
1410
|
a[href],
|
|
1347
1411
|
area[href],
|
|
1348
1412
|
input:not([disabled]),
|
|
@@ -1357,24 +1421,24 @@ var sweetalert2 = { exports: {} };
|
|
|
1357
1421
|
audio[controls],
|
|
1358
1422
|
video[controls],
|
|
1359
1423
|
summary
|
|
1360
|
-
`,
|
|
1361
|
-
const e =
|
|
1362
|
-
const
|
|
1363
|
-
return
|
|
1364
|
-
}), t =
|
|
1365
|
-
return
|
|
1366
|
-
},
|
|
1424
|
+
`, he = () => {
|
|
1425
|
+
const e = k(F().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((n, r) => {
|
|
1426
|
+
const d = parseInt(n.getAttribute("tabindex")), P = parseInt(r.getAttribute("tabindex"));
|
|
1427
|
+
return d > P ? 1 : d < P ? -1 : 0;
|
|
1428
|
+
}), t = k(F().querySelectorAll(fe)).filter((n) => n.getAttribute("tabindex") !== "-1");
|
|
1429
|
+
return y(e.concat(t)).filter((n) => le(n));
|
|
1430
|
+
}, ee = () => Ce(document.body, i.shown) && !Ce(document.body, i["toast-shown"]) && !Ce(document.body, i["no-backdrop"]), ye = () => F() && Ce(F(), i.toast), bn = () => F().hasAttribute("data-loading"), Le = {
|
|
1367
1431
|
previousBodyPadding: null
|
|
1368
|
-
},
|
|
1432
|
+
}, te = (e, t) => {
|
|
1369
1433
|
if (e.textContent = "", t) {
|
|
1370
1434
|
const r = new DOMParser().parseFromString(t, "text/html");
|
|
1371
|
-
|
|
1372
|
-
e.appendChild(
|
|
1373
|
-
}),
|
|
1374
|
-
e.appendChild(
|
|
1435
|
+
k(r.querySelector("head").childNodes).forEach((d) => {
|
|
1436
|
+
e.appendChild(d);
|
|
1437
|
+
}), k(r.querySelector("body").childNodes).forEach((d) => {
|
|
1438
|
+
e.appendChild(d);
|
|
1375
1439
|
});
|
|
1376
1440
|
}
|
|
1377
|
-
},
|
|
1441
|
+
}, Ce = (e, t) => {
|
|
1378
1442
|
if (!t)
|
|
1379
1443
|
return !1;
|
|
1380
1444
|
const n = t.split(/\s+/);
|
|
@@ -1382,160 +1446,160 @@ var sweetalert2 = { exports: {} };
|
|
|
1382
1446
|
if (!e.classList.contains(n[r]))
|
|
1383
1447
|
return !1;
|
|
1384
1448
|
return !0;
|
|
1385
|
-
},
|
|
1386
|
-
|
|
1387
|
-
!Object.values(
|
|
1449
|
+
}, wn = (e, t) => {
|
|
1450
|
+
k(e.classList).forEach((n) => {
|
|
1451
|
+
!Object.values(i).includes(n) && !Object.values(g).includes(n) && !Object.values(t.showClass).includes(n) && e.classList.remove(n);
|
|
1388
1452
|
});
|
|
1389
|
-
},
|
|
1390
|
-
if (
|
|
1453
|
+
}, pe = (e, t, n) => {
|
|
1454
|
+
if (wn(e, t), t.customClass && t.customClass[n]) {
|
|
1391
1455
|
if (typeof t.customClass[n] != "string" && !t.customClass[n].forEach)
|
|
1392
|
-
return
|
|
1393
|
-
|
|
1456
|
+
return B("Invalid type of customClass.".concat(n, '! Expected string or iterable object, got "').concat(typeof t.customClass[n], '"'));
|
|
1457
|
+
D(e, t.customClass[n]);
|
|
1394
1458
|
}
|
|
1395
|
-
},
|
|
1459
|
+
}, rt = (e, t) => {
|
|
1396
1460
|
if (!t)
|
|
1397
1461
|
return null;
|
|
1398
1462
|
switch (t) {
|
|
1399
1463
|
case "select":
|
|
1400
1464
|
case "textarea":
|
|
1401
1465
|
case "file":
|
|
1402
|
-
return e.querySelector(".".concat(
|
|
1466
|
+
return e.querySelector(".".concat(i.popup, " > .").concat(i[t]));
|
|
1403
1467
|
case "checkbox":
|
|
1404
|
-
return e.querySelector(".".concat(
|
|
1468
|
+
return e.querySelector(".".concat(i.popup, " > .").concat(i.checkbox, " input"));
|
|
1405
1469
|
case "radio":
|
|
1406
|
-
return e.querySelector(".".concat(
|
|
1470
|
+
return e.querySelector(".".concat(i.popup, " > .").concat(i.radio, " input:checked")) || e.querySelector(".".concat(i.popup, " > .").concat(i.radio, " input:first-child"));
|
|
1407
1471
|
case "range":
|
|
1408
|
-
return e.querySelector(".".concat(
|
|
1472
|
+
return e.querySelector(".".concat(i.popup, " > .").concat(i.range, " input"));
|
|
1409
1473
|
default:
|
|
1410
|
-
return e.querySelector(".".concat(
|
|
1474
|
+
return e.querySelector(".".concat(i.popup, " > .").concat(i.input));
|
|
1411
1475
|
}
|
|
1412
|
-
},
|
|
1476
|
+
}, yt = (e) => {
|
|
1413
1477
|
if (e.focus(), e.type !== "file") {
|
|
1414
1478
|
const t = e.value;
|
|
1415
1479
|
e.value = "", e.value = t;
|
|
1416
1480
|
}
|
|
1417
|
-
},
|
|
1481
|
+
}, kt = (e, t, n) => {
|
|
1418
1482
|
!e || !t || (typeof t == "string" && (t = t.split(/\s+/).filter(Boolean)), t.forEach((r) => {
|
|
1419
|
-
Array.isArray(e) ? e.forEach((
|
|
1420
|
-
n ?
|
|
1483
|
+
Array.isArray(e) ? e.forEach((d) => {
|
|
1484
|
+
n ? d.classList.add(r) : d.classList.remove(r);
|
|
1421
1485
|
}) : n ? e.classList.add(r) : e.classList.remove(r);
|
|
1422
1486
|
}));
|
|
1423
|
-
},
|
|
1424
|
-
|
|
1425
|
-
},
|
|
1426
|
-
|
|
1427
|
-
},
|
|
1428
|
-
const n =
|
|
1487
|
+
}, D = (e, t) => {
|
|
1488
|
+
kt(e, t, !0);
|
|
1489
|
+
}, ke = (e, t) => {
|
|
1490
|
+
kt(e, t, !1);
|
|
1491
|
+
}, _e = (e, t) => {
|
|
1492
|
+
const n = k(e.childNodes);
|
|
1429
1493
|
for (let r = 0; r < n.length; r++)
|
|
1430
|
-
if (
|
|
1494
|
+
if (Ce(n[r], t))
|
|
1431
1495
|
return n[r];
|
|
1432
|
-
},
|
|
1496
|
+
}, je = (e, t, n) => {
|
|
1433
1497
|
n === "".concat(parseInt(n)) && (n = parseInt(n)), n || parseInt(n) === 0 ? e.style[t] = typeof n == "number" ? "".concat(n, "px") : n : e.style.removeProperty(t);
|
|
1434
|
-
},
|
|
1498
|
+
}, G = function(e) {
|
|
1435
1499
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "flex";
|
|
1436
1500
|
e.style.display = t;
|
|
1437
|
-
},
|
|
1501
|
+
}, ne = (e) => {
|
|
1438
1502
|
e.style.display = "none";
|
|
1439
|
-
},
|
|
1440
|
-
const
|
|
1441
|
-
|
|
1442
|
-
},
|
|
1443
|
-
t ?
|
|
1444
|
-
},
|
|
1503
|
+
}, xt = (e, t, n, r) => {
|
|
1504
|
+
const d = e.querySelector(t);
|
|
1505
|
+
d && (d.style[n] = r);
|
|
1506
|
+
}, Xe = (e, t, n) => {
|
|
1507
|
+
t ? G(e, n) : ne(e);
|
|
1508
|
+
}, le = (e) => !!(e && (e.offsetWidth || e.offsetHeight || e.getClientRects().length)), yn = () => !le(m()) && !le(l()) && !le(b()), Ct = (e) => e.scrollHeight > e.clientHeight, At = (e) => {
|
|
1445
1509
|
const t = window.getComputedStyle(e), n = parseFloat(t.getPropertyValue("animation-duration") || "0"), r = parseFloat(t.getPropertyValue("transition-duration") || "0");
|
|
1446
1510
|
return n > 0 || r > 0;
|
|
1447
|
-
},
|
|
1511
|
+
}, st = function(e) {
|
|
1448
1512
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
1449
|
-
const n =
|
|
1450
|
-
|
|
1513
|
+
const n = U();
|
|
1514
|
+
le(n) && (t && (n.style.transition = "none", n.style.width = "100%"), setTimeout(() => {
|
|
1451
1515
|
n.style.transition = "width ".concat(e / 1e3, "s linear"), n.style.width = "0%";
|
|
1452
1516
|
}, 10));
|
|
1453
|
-
},
|
|
1454
|
-
const e =
|
|
1517
|
+
}, kn = () => {
|
|
1518
|
+
const e = U(), t = parseInt(window.getComputedStyle(e).width);
|
|
1455
1519
|
e.style.removeProperty("transition"), e.style.width = "100%";
|
|
1456
1520
|
const n = parseInt(window.getComputedStyle(e).width), r = t / n * 100;
|
|
1457
1521
|
e.style.removeProperty("transition"), e.style.width = "".concat(r, "%");
|
|
1458
|
-
},
|
|
1459
|
-
|
|
1460
|
-
},
|
|
1522
|
+
}, St = () => typeof window > "u" || typeof document > "u", xn = 100, O = {}, Cn = () => {
|
|
1523
|
+
O.previousActiveElement && O.previousActiveElement.focus ? (O.previousActiveElement.focus(), O.previousActiveElement = null) : document.body && document.body.focus();
|
|
1524
|
+
}, An = (e) => new Promise((t) => {
|
|
1461
1525
|
if (!e)
|
|
1462
1526
|
return t();
|
|
1463
1527
|
const n = window.scrollX, r = window.scrollY;
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
},
|
|
1467
|
-
}),
|
|
1468
|
-
<div aria-labelledby="`.concat(
|
|
1469
|
-
<button type="button" class="`).concat(
|
|
1470
|
-
<ul class="`).concat(
|
|
1471
|
-
<div class="`).concat(
|
|
1472
|
-
<img class="`).concat(
|
|
1473
|
-
<h2 class="`).concat(
|
|
1474
|
-
<div class="`).concat(
|
|
1475
|
-
<input class="`).concat(
|
|
1476
|
-
<input type="file" class="`).concat(
|
|
1477
|
-
<div class="`).concat(
|
|
1528
|
+
O.restoreFocusTimeout = setTimeout(() => {
|
|
1529
|
+
Cn(), t();
|
|
1530
|
+
}, xn), window.scrollTo(n, r);
|
|
1531
|
+
}), Sn = `
|
|
1532
|
+
<div aria-labelledby="`.concat(i.title, '" aria-describedby="').concat(i["html-container"], '" class="').concat(i.popup, `" tabindex="-1">
|
|
1533
|
+
<button type="button" class="`).concat(i.close, `"></button>
|
|
1534
|
+
<ul class="`).concat(i["progress-steps"], `"></ul>
|
|
1535
|
+
<div class="`).concat(i.icon, `"></div>
|
|
1536
|
+
<img class="`).concat(i.image, `" />
|
|
1537
|
+
<h2 class="`).concat(i.title, '" id="').concat(i.title, `"></h2>
|
|
1538
|
+
<div class="`).concat(i["html-container"], '" id="').concat(i["html-container"], `"></div>
|
|
1539
|
+
<input class="`).concat(i.input, `" />
|
|
1540
|
+
<input type="file" class="`).concat(i.file, `" />
|
|
1541
|
+
<div class="`).concat(i.range, `">
|
|
1478
1542
|
<input type="range" />
|
|
1479
1543
|
<output></output>
|
|
1480
1544
|
</div>
|
|
1481
|
-
<select class="`).concat(
|
|
1482
|
-
<div class="`).concat(
|
|
1483
|
-
<label for="`).concat(
|
|
1545
|
+
<select class="`).concat(i.select, `"></select>
|
|
1546
|
+
<div class="`).concat(i.radio, `"></div>
|
|
1547
|
+
<label for="`).concat(i.checkbox, '" class="').concat(i.checkbox, `">
|
|
1484
1548
|
<input type="checkbox" />
|
|
1485
|
-
<span class="`).concat(
|
|
1549
|
+
<span class="`).concat(i.label, `"></span>
|
|
1486
1550
|
</label>
|
|
1487
|
-
<textarea class="`).concat(
|
|
1488
|
-
<div class="`).concat(
|
|
1489
|
-
<div class="`).concat(
|
|
1490
|
-
<div class="`).concat(
|
|
1491
|
-
<button type="button" class="`).concat(
|
|
1492
|
-
<button type="button" class="`).concat(
|
|
1493
|
-
<button type="button" class="`).concat(
|
|
1551
|
+
<textarea class="`).concat(i.textarea, `"></textarea>
|
|
1552
|
+
<div class="`).concat(i["validation-message"], '" id="').concat(i["validation-message"], `"></div>
|
|
1553
|
+
<div class="`).concat(i.actions, `">
|
|
1554
|
+
<div class="`).concat(i.loader, `"></div>
|
|
1555
|
+
<button type="button" class="`).concat(i.confirm, `"></button>
|
|
1556
|
+
<button type="button" class="`).concat(i.deny, `"></button>
|
|
1557
|
+
<button type="button" class="`).concat(i.cancel, `"></button>
|
|
1494
1558
|
</div>
|
|
1495
|
-
<div class="`).concat(
|
|
1496
|
-
<div class="`).concat(
|
|
1497
|
-
<div class="`).concat(
|
|
1559
|
+
<div class="`).concat(i.footer, `"></div>
|
|
1560
|
+
<div class="`).concat(i["timer-progress-bar-container"], `">
|
|
1561
|
+
<div class="`).concat(i["timer-progress-bar"], `"></div>
|
|
1498
1562
|
</div>
|
|
1499
1563
|
</div>
|
|
1500
|
-
`).replace(/(^|\n)\s*/g, ""),
|
|
1501
|
-
const e =
|
|
1502
|
-
return e ? (e.remove(),
|
|
1503
|
-
},
|
|
1504
|
-
|
|
1505
|
-
},
|
|
1506
|
-
const e =
|
|
1507
|
-
t.oninput =
|
|
1508
|
-
|
|
1564
|
+
`).replace(/(^|\n)\s*/g, ""), _n = () => {
|
|
1565
|
+
const e = T();
|
|
1566
|
+
return e ? (e.remove(), ke([document.documentElement, document.body], [i["no-backdrop"], i["toast-shown"], i["has-column"]]), !0) : !1;
|
|
1567
|
+
}, Be = () => {
|
|
1568
|
+
O.currentInstance.resetValidationMessage();
|
|
1569
|
+
}, En = () => {
|
|
1570
|
+
const e = F(), t = _e(e, i.input), n = _e(e, i.file), r = e.querySelector(".".concat(i.range, " input")), d = e.querySelector(".".concat(i.range, " output")), P = _e(e, i.select), J = e.querySelector(".".concat(i.checkbox, " input")), ue = _e(e, i.textarea);
|
|
1571
|
+
t.oninput = Be, n.onchange = Be, P.onchange = Be, J.onchange = Be, ue.oninput = Be, r.oninput = () => {
|
|
1572
|
+
Be(), d.value = r.value;
|
|
1509
1573
|
}, r.onchange = () => {
|
|
1510
|
-
|
|
1574
|
+
Be(), r.nextSibling.value = r.value;
|
|
1511
1575
|
};
|
|
1512
|
-
},
|
|
1513
|
-
const t =
|
|
1576
|
+
}, Pn = (e) => typeof e == "string" ? document.querySelector(e) : e, Tn = (e) => {
|
|
1577
|
+
const t = F();
|
|
1514
1578
|
t.setAttribute("role", e.toast ? "alert" : "dialog"), t.setAttribute("aria-live", e.toast ? "polite" : "assertive"), e.toast || t.setAttribute("aria-modal", "true");
|
|
1515
|
-
},
|
|
1516
|
-
window.getComputedStyle(e).direction === "rtl" &&
|
|
1517
|
-
},
|
|
1518
|
-
const t =
|
|
1519
|
-
if (
|
|
1520
|
-
|
|
1579
|
+
}, Bn = (e) => {
|
|
1580
|
+
window.getComputedStyle(e).direction === "rtl" && D(T(), i.rtl);
|
|
1581
|
+
}, In = (e) => {
|
|
1582
|
+
const t = _n();
|
|
1583
|
+
if (St()) {
|
|
1584
|
+
M("SweetAlert2 requires document to initialize");
|
|
1521
1585
|
return;
|
|
1522
1586
|
}
|
|
1523
1587
|
const n = document.createElement("div");
|
|
1524
|
-
n.className =
|
|
1525
|
-
const r =
|
|
1526
|
-
r.appendChild(n),
|
|
1527
|
-
},
|
|
1528
|
-
e instanceof HTMLElement ? t.appendChild(e) : typeof e == "object" ?
|
|
1529
|
-
},
|
|
1530
|
-
e.jquery ?
|
|
1531
|
-
},
|
|
1588
|
+
n.className = i.container, t && D(n, i["no-transition"]), te(n, Sn);
|
|
1589
|
+
const r = Pn(e.target);
|
|
1590
|
+
r.appendChild(n), Tn(e), Bn(r), En();
|
|
1591
|
+
}, it = (e, t) => {
|
|
1592
|
+
e instanceof HTMLElement ? t.appendChild(e) : typeof e == "object" ? Fn(e, t) : e && te(t, e);
|
|
1593
|
+
}, Fn = (e, t) => {
|
|
1594
|
+
e.jquery ? Ln(t, e) : te(t, e.toString());
|
|
1595
|
+
}, Ln = (e, t) => {
|
|
1532
1596
|
if (e.textContent = "", 0 in t)
|
|
1533
1597
|
for (let n = 0; n in t; n++)
|
|
1534
1598
|
e.appendChild(t[n].cloneNode(!0));
|
|
1535
1599
|
else
|
|
1536
1600
|
e.appendChild(t.cloneNode(!0));
|
|
1537
|
-
},
|
|
1538
|
-
if (
|
|
1601
|
+
}, De = (() => {
|
|
1602
|
+
if (St())
|
|
1539
1603
|
return !1;
|
|
1540
1604
|
const e = document.createElement("div"), t = {
|
|
1541
1605
|
WebkitAnimation: "webkitAnimationEnd",
|
|
@@ -1547,288 +1611,288 @@ var sweetalert2 = { exports: {} };
|
|
|
1547
1611
|
if (Object.prototype.hasOwnProperty.call(t, n) && typeof e.style[n] < "u")
|
|
1548
1612
|
return t[n];
|
|
1549
1613
|
return !1;
|
|
1550
|
-
})(),
|
|
1614
|
+
})(), Un = () => {
|
|
1551
1615
|
const e = document.createElement("div");
|
|
1552
|
-
e.className =
|
|
1616
|
+
e.className = i["scrollbar-measure"], document.body.appendChild(e);
|
|
1553
1617
|
const t = e.getBoundingClientRect().width - e.clientWidth;
|
|
1554
1618
|
return document.body.removeChild(e), t;
|
|
1555
|
-
},
|
|
1556
|
-
const n =
|
|
1557
|
-
!t.showConfirmButton && !t.showDenyButton && !t.showCancelButton ?
|
|
1619
|
+
}, Mn = (e, t) => {
|
|
1620
|
+
const n = _(), r = v();
|
|
1621
|
+
!t.showConfirmButton && !t.showDenyButton && !t.showCancelButton ? ne(n) : G(n), pe(n, t, "actions"), On(n, r, t), te(r, t.loaderHtml), pe(r, t, "loader");
|
|
1558
1622
|
};
|
|
1559
|
-
function
|
|
1560
|
-
const r =
|
|
1561
|
-
|
|
1623
|
+
function On(e, t, n) {
|
|
1624
|
+
const r = m(), d = l(), P = b();
|
|
1625
|
+
at(r, "confirm", n), at(d, "deny", n), at(P, "cancel", n), Rn(r, d, P, n), n.reverseButtons && (n.toast ? (e.insertBefore(P, r), e.insertBefore(d, r)) : (e.insertBefore(P, t), e.insertBefore(d, t), e.insertBefore(r, t)));
|
|
1562
1626
|
}
|
|
1563
|
-
function
|
|
1627
|
+
function Rn(e, t, n, r) {
|
|
1564
1628
|
if (!r.buttonsStyling)
|
|
1565
|
-
return
|
|
1566
|
-
|
|
1629
|
+
return ke([e, t, n], i.styled);
|
|
1630
|
+
D([e, t, n], i.styled), r.confirmButtonColor && (e.style.backgroundColor = r.confirmButtonColor, D(e, i["default-outline"])), r.denyButtonColor && (t.style.backgroundColor = r.denyButtonColor, D(t, i["default-outline"])), r.cancelButtonColor && (n.style.backgroundColor = r.cancelButtonColor, D(n, i["default-outline"]));
|
|
1567
1631
|
}
|
|
1568
|
-
function
|
|
1569
|
-
|
|
1632
|
+
function at(e, t, n) {
|
|
1633
|
+
Xe(e, n["show".concat(L(t), "Button")], "inline-block"), te(e, n["".concat(t, "ButtonText")]), e.setAttribute("aria-label", n["".concat(t, "ButtonAriaLabel")]), e.className = i[t], pe(e, n, "".concat(t, "Button")), D(e, n["".concat(t, "ButtonClass")]);
|
|
1570
1634
|
}
|
|
1571
|
-
function
|
|
1572
|
-
typeof t == "string" ? e.style.background = t : t ||
|
|
1635
|
+
function Hn(e, t) {
|
|
1636
|
+
typeof t == "string" ? e.style.background = t : t || D([document.documentElement, document.body], i["no-backdrop"]);
|
|
1573
1637
|
}
|
|
1574
|
-
function
|
|
1575
|
-
t in
|
|
1638
|
+
function jn(e, t) {
|
|
1639
|
+
t in i ? D(e, i[t]) : (B('The "position" parameter is not valid, defaulting to "center"'), D(e, i.center));
|
|
1576
1640
|
}
|
|
1577
|
-
function
|
|
1641
|
+
function Dn(e, t) {
|
|
1578
1642
|
if (t && typeof t == "string") {
|
|
1579
1643
|
const n = "grow-".concat(t);
|
|
1580
|
-
n in
|
|
1644
|
+
n in i && D(e, i[n]);
|
|
1581
1645
|
}
|
|
1582
1646
|
}
|
|
1583
|
-
const
|
|
1584
|
-
const n =
|
|
1585
|
-
n && (
|
|
1647
|
+
const Vn = (e, t) => {
|
|
1648
|
+
const n = T();
|
|
1649
|
+
n && (Hn(n, t.backdrop), jn(n, t.position), Dn(n, t.grow), pe(n, t, "container"));
|
|
1586
1650
|
};
|
|
1587
|
-
var
|
|
1651
|
+
var R = {
|
|
1588
1652
|
awaitingPromise: /* @__PURE__ */ new WeakMap(),
|
|
1589
1653
|
promise: /* @__PURE__ */ new WeakMap(),
|
|
1590
1654
|
innerParams: /* @__PURE__ */ new WeakMap(),
|
|
1591
1655
|
domCache: /* @__PURE__ */ new WeakMap()
|
|
1592
1656
|
};
|
|
1593
|
-
const
|
|
1594
|
-
const n =
|
|
1595
|
-
|
|
1596
|
-
const
|
|
1597
|
-
|
|
1598
|
-
}), t.input && (
|
|
1599
|
-
},
|
|
1600
|
-
if (!
|
|
1601
|
-
return
|
|
1602
|
-
const t =
|
|
1603
|
-
|
|
1604
|
-
|
|
1657
|
+
const Nn = ["input", "file", "range", "select", "radio", "checkbox", "textarea"], $n = (e, t) => {
|
|
1658
|
+
const n = F(), r = R.innerParams.get(e), d = !r || t.input !== r.input;
|
|
1659
|
+
Nn.forEach((P) => {
|
|
1660
|
+
const J = i[P], ue = _e(n, J);
|
|
1661
|
+
Kn(P, t.inputAttributes), ue.className = J, d && ne(ue);
|
|
1662
|
+
}), t.input && (d && qn(t), zn(t));
|
|
1663
|
+
}, qn = (e) => {
|
|
1664
|
+
if (!ie[e.input])
|
|
1665
|
+
return M('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input, '"'));
|
|
1666
|
+
const t = _t(e.input), n = ie[e.input](t, e);
|
|
1667
|
+
G(n), setTimeout(() => {
|
|
1668
|
+
yt(n);
|
|
1605
1669
|
});
|
|
1606
|
-
},
|
|
1670
|
+
}, Wn = (e) => {
|
|
1607
1671
|
for (let t = 0; t < e.attributes.length; t++) {
|
|
1608
1672
|
const n = e.attributes[t].name;
|
|
1609
1673
|
["type", "value", "style"].includes(n) || e.removeAttribute(n);
|
|
1610
1674
|
}
|
|
1611
|
-
},
|
|
1612
|
-
const n =
|
|
1675
|
+
}, Kn = (e, t) => {
|
|
1676
|
+
const n = rt(F(), e);
|
|
1613
1677
|
if (n) {
|
|
1614
|
-
|
|
1678
|
+
Wn(n);
|
|
1615
1679
|
for (const r in t)
|
|
1616
1680
|
n.setAttribute(r, t[r]);
|
|
1617
1681
|
}
|
|
1618
|
-
},
|
|
1619
|
-
const t =
|
|
1620
|
-
e.customClass &&
|
|
1621
|
-
},
|
|
1682
|
+
}, zn = (e) => {
|
|
1683
|
+
const t = _t(e.input);
|
|
1684
|
+
e.customClass && D(t, e.customClass.input);
|
|
1685
|
+
}, ct = (e, t) => {
|
|
1622
1686
|
(!e.placeholder || t.inputPlaceholder) && (e.placeholder = t.inputPlaceholder);
|
|
1623
|
-
},
|
|
1687
|
+
}, Ve = (e, t, n) => {
|
|
1624
1688
|
if (n.inputLabel) {
|
|
1625
|
-
e.id =
|
|
1626
|
-
const r = document.createElement("label"),
|
|
1627
|
-
r.setAttribute("for", e.id), r.className =
|
|
1689
|
+
e.id = i.input;
|
|
1690
|
+
const r = document.createElement("label"), d = i["input-label"];
|
|
1691
|
+
r.setAttribute("for", e.id), r.className = d, D(r, n.customClass.inputLabel), r.innerText = n.inputLabel, t.insertAdjacentElement("beforebegin", r);
|
|
1628
1692
|
}
|
|
1629
|
-
},
|
|
1630
|
-
const t =
|
|
1631
|
-
return
|
|
1632
|
-
},
|
|
1633
|
-
|
|
1693
|
+
}, _t = (e) => {
|
|
1694
|
+
const t = i[e] ? i[e] : i.input;
|
|
1695
|
+
return _e(F(), t);
|
|
1696
|
+
}, ie = {};
|
|
1697
|
+
ie.text = ie.email = ie.password = ie.number = ie.tel = ie.url = (e, t) => (typeof t.inputValue == "string" || typeof t.inputValue == "number" ? e.value = t.inputValue : Se(t.inputValue) || B('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue, '"')), Ve(e, e, t), ct(e, t), e.type = t.input, e), ie.file = (e, t) => (Ve(e, e, t), ct(e, t), e), ie.range = (e, t) => {
|
|
1634
1698
|
const n = e.querySelector("input"), r = e.querySelector("output");
|
|
1635
|
-
return n.value = t.inputValue, n.type = t.input, r.value = t.inputValue,
|
|
1636
|
-
},
|
|
1699
|
+
return n.value = t.inputValue, n.type = t.input, r.value = t.inputValue, Ve(n, e, t), e;
|
|
1700
|
+
}, ie.select = (e, t) => {
|
|
1637
1701
|
if (e.textContent = "", t.inputPlaceholder) {
|
|
1638
1702
|
const n = document.createElement("option");
|
|
1639
|
-
|
|
1703
|
+
te(n, t.inputPlaceholder), n.value = "", n.disabled = !0, n.selected = !0, e.appendChild(n);
|
|
1640
1704
|
}
|
|
1641
|
-
return
|
|
1642
|
-
},
|
|
1643
|
-
const n =
|
|
1644
|
-
n.value = "1", n.id =
|
|
1705
|
+
return Ve(e, e, t), e;
|
|
1706
|
+
}, ie.radio = (e) => (e.textContent = "", e), ie.checkbox = (e, t) => {
|
|
1707
|
+
const n = rt(F(), "checkbox");
|
|
1708
|
+
n.value = "1", n.id = i.checkbox, n.checked = !!t.inputValue;
|
|
1645
1709
|
const r = e.querySelector("span");
|
|
1646
|
-
return
|
|
1647
|
-
},
|
|
1648
|
-
e.value = t.inputValue,
|
|
1710
|
+
return te(r, t.inputPlaceholder), e;
|
|
1711
|
+
}, ie.textarea = (e, t) => {
|
|
1712
|
+
e.value = t.inputValue, ct(e, t), Ve(e, e, t);
|
|
1649
1713
|
const n = (r) => parseInt(window.getComputedStyle(r).marginLeft) + parseInt(window.getComputedStyle(r).marginRight);
|
|
1650
1714
|
return setTimeout(() => {
|
|
1651
1715
|
if ("MutationObserver" in window) {
|
|
1652
|
-
const r = parseInt(window.getComputedStyle(
|
|
1653
|
-
const
|
|
1654
|
-
|
|
1716
|
+
const r = parseInt(window.getComputedStyle(F()).width), d = () => {
|
|
1717
|
+
const P = e.offsetWidth + n(e);
|
|
1718
|
+
P > r ? F().style.width = "".concat(P, "px") : F().style.width = null;
|
|
1655
1719
|
};
|
|
1656
|
-
new MutationObserver(
|
|
1720
|
+
new MutationObserver(d).observe(e, {
|
|
1657
1721
|
attributes: !0,
|
|
1658
1722
|
attributeFilter: ["style"]
|
|
1659
1723
|
});
|
|
1660
1724
|
}
|
|
1661
1725
|
}), e;
|
|
1662
1726
|
};
|
|
1663
|
-
const
|
|
1664
|
-
const n =
|
|
1665
|
-
|
|
1666
|
-
},
|
|
1667
|
-
const n = _();
|
|
1668
|
-
Re(n, t.footer), t.footer && je(t.footer, n), oe(n, t, "footer");
|
|
1669
|
-
}, dn = (e, t) => {
|
|
1727
|
+
const Jn = (e, t) => {
|
|
1728
|
+
const n = Q();
|
|
1729
|
+
pe(n, t, "htmlContainer"), t.html ? (it(t.html, n), G(n, "block")) : t.text ? (n.textContent = t.text, G(n, "block")) : ne(n), $n(e, t);
|
|
1730
|
+
}, Yn = (e, t) => {
|
|
1670
1731
|
const n = E();
|
|
1671
|
-
|
|
1672
|
-
},
|
|
1673
|
-
const n =
|
|
1732
|
+
Xe(n, t.footer), t.footer && it(t.footer, n), pe(n, t, "footer");
|
|
1733
|
+
}, Xn = (e, t) => {
|
|
1734
|
+
const n = j();
|
|
1735
|
+
te(n, t.closeButtonHtml), pe(n, t, "closeButton"), Xe(n, t.showCloseButton), n.setAttribute("aria-label", t.closeButtonAriaLabel);
|
|
1736
|
+
}, Zn = (e, t) => {
|
|
1737
|
+
const n = R.innerParams.get(e), r = Z();
|
|
1674
1738
|
if (n && t.icon === n.icon) {
|
|
1675
|
-
|
|
1739
|
+
Pt(r, t), Et(r, t);
|
|
1676
1740
|
return;
|
|
1677
1741
|
}
|
|
1678
1742
|
if (!t.icon && !t.iconHtml)
|
|
1679
|
-
return
|
|
1680
|
-
if (t.icon && Object.keys(
|
|
1681
|
-
return
|
|
1682
|
-
|
|
1683
|
-
},
|
|
1684
|
-
for (const n in
|
|
1685
|
-
t.icon !== n &&
|
|
1686
|
-
|
|
1687
|
-
},
|
|
1688
|
-
const e =
|
|
1743
|
+
return ne(r);
|
|
1744
|
+
if (t.icon && Object.keys(g).indexOf(t.icon) === -1)
|
|
1745
|
+
return M('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(t.icon, '"')), ne(r);
|
|
1746
|
+
G(r), Pt(r, t), Et(r, t), D(r, t.showClass.icon);
|
|
1747
|
+
}, Et = (e, t) => {
|
|
1748
|
+
for (const n in g)
|
|
1749
|
+
t.icon !== n && ke(e, g[n]);
|
|
1750
|
+
D(e, g[t.icon]), to(e, t), Gn(), pe(e, t, "icon");
|
|
1751
|
+
}, Gn = () => {
|
|
1752
|
+
const e = F(), t = window.getComputedStyle(e).getPropertyValue("background-color"), n = e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");
|
|
1689
1753
|
for (let r = 0; r < n.length; r++)
|
|
1690
1754
|
n[r].style.backgroundColor = t;
|
|
1691
|
-
},
|
|
1755
|
+
}, Qn = `
|
|
1692
1756
|
<div class="swal2-success-circular-line-left"></div>
|
|
1693
1757
|
<span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
|
|
1694
1758
|
<div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
|
|
1695
1759
|
<div class="swal2-success-circular-line-right"></div>
|
|
1696
|
-
`,
|
|
1760
|
+
`, eo = `
|
|
1697
1761
|
<span class="swal2-x-mark">
|
|
1698
1762
|
<span class="swal2-x-mark-line-left"></span>
|
|
1699
1763
|
<span class="swal2-x-mark-line-right"></span>
|
|
1700
1764
|
</span>
|
|
1701
|
-
`,
|
|
1702
|
-
e.textContent = "", t.iconHtml ?
|
|
1765
|
+
`, Pt = (e, t) => {
|
|
1766
|
+
e.textContent = "", t.iconHtml ? te(e, Tt(t.iconHtml)) : t.icon === "success" ? te(e, Qn) : t.icon === "error" ? te(e, eo) : te(e, Tt({
|
|
1703
1767
|
question: "?",
|
|
1704
1768
|
warning: "!",
|
|
1705
1769
|
info: "i"
|
|
1706
1770
|
}[t.icon]));
|
|
1707
|
-
},
|
|
1771
|
+
}, to = (e, t) => {
|
|
1708
1772
|
if (t.iconColor) {
|
|
1709
1773
|
e.style.color = t.iconColor, e.style.borderColor = t.iconColor;
|
|
1710
1774
|
for (const n of [".swal2-success-line-tip", ".swal2-success-line-long", ".swal2-x-mark-line-left", ".swal2-x-mark-line-right"])
|
|
1711
|
-
|
|
1712
|
-
|
|
1775
|
+
xt(e, n, "backgroundColor", t.iconColor);
|
|
1776
|
+
xt(e, ".swal2-success-ring", "borderColor", t.iconColor);
|
|
1713
1777
|
}
|
|
1714
|
-
},
|
|
1715
|
-
const n =
|
|
1778
|
+
}, Tt = (e) => '<div class="'.concat(i["icon-content"], '">').concat(e, "</div>"), no = (e, t) => {
|
|
1779
|
+
const n = s();
|
|
1716
1780
|
if (!t.imageUrl)
|
|
1717
|
-
return
|
|
1718
|
-
|
|
1719
|
-
},
|
|
1781
|
+
return ne(n);
|
|
1782
|
+
G(n, ""), n.setAttribute("src", t.imageUrl), n.setAttribute("alt", t.imageAlt), je(n, "width", t.imageWidth), je(n, "height", t.imageHeight), n.className = i.image, pe(n, t, "image");
|
|
1783
|
+
}, oo = (e) => {
|
|
1720
1784
|
const t = document.createElement("li");
|
|
1721
|
-
return
|
|
1722
|
-
},
|
|
1785
|
+
return D(t, i["progress-step"]), te(t, e), t;
|
|
1786
|
+
}, ro = (e) => {
|
|
1723
1787
|
const t = document.createElement("li");
|
|
1724
|
-
return
|
|
1725
|
-
},
|
|
1726
|
-
const n =
|
|
1788
|
+
return D(t, i["progress-step-line"]), e.progressStepsDistance && (t.style.width = e.progressStepsDistance), t;
|
|
1789
|
+
}, so = (e, t) => {
|
|
1790
|
+
const n = a();
|
|
1727
1791
|
if (!t.progressSteps || t.progressSteps.length === 0)
|
|
1728
|
-
return
|
|
1729
|
-
|
|
1730
|
-
const
|
|
1731
|
-
if (n.appendChild(
|
|
1732
|
-
const
|
|
1733
|
-
n.appendChild(
|
|
1792
|
+
return ne(n);
|
|
1793
|
+
G(n), n.textContent = "", t.currentProgressStep >= t.progressSteps.length && B("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"), t.progressSteps.forEach((r, d) => {
|
|
1794
|
+
const P = oo(r);
|
|
1795
|
+
if (n.appendChild(P), d === t.currentProgressStep && D(P, i["active-progress-step"]), d !== t.progressSteps.length - 1) {
|
|
1796
|
+
const J = ro(t);
|
|
1797
|
+
n.appendChild(J);
|
|
1734
1798
|
}
|
|
1735
1799
|
});
|
|
1736
|
-
},
|
|
1737
|
-
const n =
|
|
1738
|
-
|
|
1739
|
-
},
|
|
1740
|
-
const n =
|
|
1741
|
-
t.toast ? (
|
|
1742
|
-
},
|
|
1743
|
-
e.className = "".concat(
|
|
1744
|
-
},
|
|
1745
|
-
|
|
1746
|
-
},
|
|
1800
|
+
}, io = (e, t) => {
|
|
1801
|
+
const n = H();
|
|
1802
|
+
Xe(n, t.title || t.titleText, "block"), t.title && it(t.title, n), t.titleText && (n.innerText = t.titleText), pe(n, t, "title");
|
|
1803
|
+
}, ao = (e, t) => {
|
|
1804
|
+
const n = T(), r = F();
|
|
1805
|
+
t.toast ? (je(n, "width", t.width), r.style.width = "100%", r.insertBefore(v(), Z())) : je(r, "width", t.width), je(r, "padding", t.padding), t.color && (r.style.color = t.color), t.background && (r.style.background = t.background), ne(p()), co(r, t);
|
|
1806
|
+
}, co = (e, t) => {
|
|
1807
|
+
e.className = "".concat(i.popup, " ").concat(le(e) ? t.showClass.popup : ""), t.toast ? (D([document.documentElement, document.body], i["toast-shown"]), D(e, i.toast)) : D(e, i.modal), pe(e, t, "popup"), typeof t.customClass == "string" && D(e, t.customClass), t.icon && D(e, i["icon-".concat(t.icon)]);
|
|
1808
|
+
}, Bt = (e, t) => {
|
|
1809
|
+
ao(e, t), Vn(e, t), so(e, t), Zn(e, t), no(e, t), io(e, t), Xn(e, t), Jn(e, t), Mn(e, t), Yn(e, t), typeof t.didRender == "function" && t.didRender(F());
|
|
1810
|
+
}, Ue = Object.freeze({
|
|
1747
1811
|
cancel: "cancel",
|
|
1748
1812
|
backdrop: "backdrop",
|
|
1749
1813
|
close: "close",
|
|
1750
1814
|
esc: "esc",
|
|
1751
1815
|
timer: "timer"
|
|
1752
|
-
}),
|
|
1753
|
-
|
|
1754
|
-
t ===
|
|
1816
|
+
}), lo = () => {
|
|
1817
|
+
k(document.body.children).forEach((t) => {
|
|
1818
|
+
t === T() || t.contains(T()) || (t.hasAttribute("aria-hidden") && t.setAttribute("data-previous-aria-hidden", t.getAttribute("aria-hidden")), t.setAttribute("aria-hidden", "true"));
|
|
1755
1819
|
});
|
|
1756
|
-
},
|
|
1757
|
-
|
|
1820
|
+
}, It = () => {
|
|
1821
|
+
k(document.body.children).forEach((t) => {
|
|
1758
1822
|
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");
|
|
1759
1823
|
});
|
|
1760
|
-
},
|
|
1824
|
+
}, Ft = ["swal-title", "swal-html", "swal-footer"], uo = (e) => {
|
|
1761
1825
|
const t = typeof e.template == "string" ? document.querySelector(e.template) : e.template;
|
|
1762
1826
|
if (!t)
|
|
1763
1827
|
return {};
|
|
1764
1828
|
const n = t.content;
|
|
1765
|
-
return
|
|
1766
|
-
},
|
|
1829
|
+
return bo(n), Object.assign(fo(n), ho(n), po(n), go(n), mo(n), vo(n, Ft));
|
|
1830
|
+
}, fo = (e) => {
|
|
1767
1831
|
const t = {};
|
|
1768
|
-
return
|
|
1769
|
-
|
|
1770
|
-
const r = n.getAttribute("name"),
|
|
1771
|
-
typeof
|
|
1832
|
+
return k(e.querySelectorAll("swal-param")).forEach((n) => {
|
|
1833
|
+
Ie(n, ["name", "value"]);
|
|
1834
|
+
const r = n.getAttribute("name"), d = n.getAttribute("value");
|
|
1835
|
+
typeof be[r] == "boolean" && d === "false" && (t[r] = !1), typeof be[r] == "object" && (t[r] = JSON.parse(d));
|
|
1772
1836
|
}), t;
|
|
1773
|
-
},
|
|
1837
|
+
}, ho = (e) => {
|
|
1774
1838
|
const t = {};
|
|
1775
|
-
return
|
|
1776
|
-
|
|
1839
|
+
return k(e.querySelectorAll("swal-button")).forEach((n) => {
|
|
1840
|
+
Ie(n, ["type", "color", "aria-label"]);
|
|
1777
1841
|
const r = n.getAttribute("type");
|
|
1778
|
-
t["".concat(r, "ButtonText")] = n.innerHTML, t["show".concat(
|
|
1842
|
+
t["".concat(r, "ButtonText")] = n.innerHTML, t["show".concat(L(r), "Button")] = !0, n.hasAttribute("color") && (t["".concat(r, "ButtonColor")] = n.getAttribute("color")), n.hasAttribute("aria-label") && (t["".concat(r, "ButtonAriaLabel")] = n.getAttribute("aria-label"));
|
|
1779
1843
|
}), t;
|
|
1780
|
-
},
|
|
1844
|
+
}, po = (e) => {
|
|
1781
1845
|
const t = {}, n = e.querySelector("swal-image");
|
|
1782
|
-
return n && (
|
|
1783
|
-
},
|
|
1846
|
+
return n && (Ie(n, ["src", "width", "height", "alt"]), n.hasAttribute("src") && (t.imageUrl = n.getAttribute("src")), n.hasAttribute("width") && (t.imageWidth = n.getAttribute("width")), n.hasAttribute("height") && (t.imageHeight = n.getAttribute("height")), n.hasAttribute("alt") && (t.imageAlt = n.getAttribute("alt"))), t;
|
|
1847
|
+
}, go = (e) => {
|
|
1784
1848
|
const t = {}, n = e.querySelector("swal-icon");
|
|
1785
|
-
return n && (
|
|
1786
|
-
},
|
|
1849
|
+
return n && (Ie(n, ["type", "color"]), n.hasAttribute("type") && (t.icon = n.getAttribute("type")), n.hasAttribute("color") && (t.iconColor = n.getAttribute("color")), t.iconHtml = n.innerHTML), t;
|
|
1850
|
+
}, mo = (e) => {
|
|
1787
1851
|
const t = {}, n = e.querySelector("swal-input");
|
|
1788
|
-
n && (
|
|
1852
|
+
n && (Ie(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")));
|
|
1789
1853
|
const r = e.querySelectorAll("swal-input-option");
|
|
1790
|
-
return r.length && (t.inputOptions = {},
|
|
1791
|
-
|
|
1792
|
-
const
|
|
1793
|
-
t.inputOptions[
|
|
1854
|
+
return r.length && (t.inputOptions = {}, k(r).forEach((d) => {
|
|
1855
|
+
Ie(d, ["value"]);
|
|
1856
|
+
const P = d.getAttribute("value"), J = d.innerHTML;
|
|
1857
|
+
t.inputOptions[P] = J;
|
|
1794
1858
|
})), t;
|
|
1795
|
-
},
|
|
1859
|
+
}, vo = (e, t) => {
|
|
1796
1860
|
const n = {};
|
|
1797
1861
|
for (const r in t) {
|
|
1798
|
-
const
|
|
1799
|
-
|
|
1862
|
+
const d = t[r], P = e.querySelector(d);
|
|
1863
|
+
P && (Ie(P, []), n[d.replace(/^swal-/, "")] = P.innerHTML.trim());
|
|
1800
1864
|
}
|
|
1801
1865
|
return n;
|
|
1802
|
-
},
|
|
1803
|
-
const t =
|
|
1804
|
-
|
|
1866
|
+
}, bo = (e) => {
|
|
1867
|
+
const t = Ft.concat(["swal-param", "swal-button", "swal-image", "swal-icon", "swal-input", "swal-input-option"]);
|
|
1868
|
+
k(e.children).forEach((n) => {
|
|
1805
1869
|
const r = n.tagName.toLowerCase();
|
|
1806
|
-
t.indexOf(r) === -1 &&
|
|
1870
|
+
t.indexOf(r) === -1 && B("Unrecognized element <".concat(r, ">"));
|
|
1807
1871
|
});
|
|
1808
|
-
},
|
|
1809
|
-
|
|
1810
|
-
t.indexOf(n.name) === -1 &&
|
|
1872
|
+
}, Ie = (e, t) => {
|
|
1873
|
+
k(e.attributes).forEach((n) => {
|
|
1874
|
+
t.indexOf(n.name) === -1 && B(['Unrecognized attribute "'.concat(n.name, '" on <').concat(e.tagName.toLowerCase(), ">."), "".concat(t.length ? "Allowed attributes are: ".concat(t.join(", ")) : "To set the value, use HTML within the element.")]);
|
|
1811
1875
|
});
|
|
1812
1876
|
};
|
|
1813
|
-
var
|
|
1877
|
+
var Lt = {
|
|
1814
1878
|
email: (e, t) => /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e) ? Promise.resolve() : Promise.resolve(t || "Invalid email address"),
|
|
1815
1879
|
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")
|
|
1816
1880
|
};
|
|
1817
|
-
function
|
|
1818
|
-
e.inputValidator || Object.keys(
|
|
1819
|
-
e.input === t && (e.inputValidator =
|
|
1881
|
+
function wo(e) {
|
|
1882
|
+
e.inputValidator || Object.keys(Lt).forEach((t) => {
|
|
1883
|
+
e.input === t && (e.inputValidator = Lt[t]);
|
|
1820
1884
|
});
|
|
1821
1885
|
}
|
|
1822
|
-
function
|
|
1823
|
-
(!e.target || typeof e.target == "string" && !document.querySelector(e.target) || typeof e.target != "string" && !e.target.appendChild) && (
|
|
1886
|
+
function yo(e) {
|
|
1887
|
+
(!e.target || typeof e.target == "string" && !document.querySelector(e.target) || typeof e.target != "string" && !e.target.appendChild) && (B('Target parameter is not valid, defaulting to "body"'), e.target = "body");
|
|
1824
1888
|
}
|
|
1825
|
-
function
|
|
1826
|
-
|
|
1889
|
+
function ko(e) {
|
|
1890
|
+
wo(e), e.showLoaderOnConfirm && !e.preConfirm && B(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
|
|
1827
1891
|
showLoaderOnConfirm should be used together with preConfirm, see usage example:
|
|
1828
|
-
https://sweetalert2.github.io/#ajax-request`),
|
|
1829
|
-
`).join("<br />")),
|
|
1892
|
+
https://sweetalert2.github.io/#ajax-request`), yo(e), typeof e.title == "string" && (e.title = e.title.split(`
|
|
1893
|
+
`).join("<br />")), In(e);
|
|
1830
1894
|
}
|
|
1831
|
-
class
|
|
1895
|
+
class xo {
|
|
1832
1896
|
constructor(t, n) {
|
|
1833
1897
|
this.callback = t, this.remaining = n, this.running = !1, this.start();
|
|
1834
1898
|
}
|
|
@@ -1849,231 +1913,231 @@ https://sweetalert2.github.io/#ajax-request`), Ln(e), typeof e.title == "string"
|
|
|
1849
1913
|
return this.running;
|
|
1850
1914
|
}
|
|
1851
1915
|
}
|
|
1852
|
-
const
|
|
1853
|
-
|
|
1854
|
-
},
|
|
1855
|
-
|
|
1856
|
-
},
|
|
1916
|
+
const Co = () => {
|
|
1917
|
+
Le.previousBodyPadding === null && document.body.scrollHeight > window.innerHeight && (Le.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = "".concat(Le.previousBodyPadding + Un(), "px"));
|
|
1918
|
+
}, Ao = () => {
|
|
1919
|
+
Le.previousBodyPadding !== null && (document.body.style.paddingRight = "".concat(Le.previousBodyPadding, "px"), Le.previousBodyPadding = null);
|
|
1920
|
+
}, So = () => {
|
|
1857
1921
|
if (// @ts-ignore
|
|
1858
|
-
(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1) && !
|
|
1922
|
+
(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1) && !Ce(document.body, i.iosfix)) {
|
|
1859
1923
|
const t = document.body.scrollTop;
|
|
1860
|
-
document.body.style.top = "".concat(t * -1, "px"),
|
|
1924
|
+
document.body.style.top = "".concat(t * -1, "px"), D(document.body, i.iosfix), Eo(), _o();
|
|
1861
1925
|
}
|
|
1862
|
-
},
|
|
1926
|
+
}, _o = () => {
|
|
1863
1927
|
const e = navigator.userAgent, t = !!e.match(/iPad/i) || !!e.match(/iPhone/i), n = !!e.match(/WebKit/i);
|
|
1864
|
-
t && n && !e.match(/CriOS/i) &&
|
|
1865
|
-
},
|
|
1866
|
-
const e =
|
|
1928
|
+
t && n && !e.match(/CriOS/i) && F().scrollHeight > window.innerHeight - 44 && (T().style.paddingBottom = "".concat(44, "px"));
|
|
1929
|
+
}, Eo = () => {
|
|
1930
|
+
const e = T();
|
|
1867
1931
|
let t;
|
|
1868
1932
|
e.ontouchstart = (n) => {
|
|
1869
|
-
t =
|
|
1933
|
+
t = Po(n);
|
|
1870
1934
|
}, e.ontouchmove = (n) => {
|
|
1871
1935
|
t && (n.preventDefault(), n.stopPropagation());
|
|
1872
1936
|
};
|
|
1873
|
-
},
|
|
1874
|
-
const t = e.target, n =
|
|
1875
|
-
return
|
|
1937
|
+
}, Po = (e) => {
|
|
1938
|
+
const t = e.target, n = T();
|
|
1939
|
+
return To(e) || Bo(e) ? !1 : t === n || !Ct(n) && t.tagName !== "INPUT" && // #1603
|
|
1876
1940
|
t.tagName !== "TEXTAREA" && // #2266
|
|
1877
|
-
!(
|
|
1878
|
-
|
|
1879
|
-
},
|
|
1880
|
-
if (
|
|
1941
|
+
!(Ct(Q()) && // #1944
|
|
1942
|
+
Q().contains(t));
|
|
1943
|
+
}, To = (e) => e.touches && e.touches.length && e.touches[0].touchType === "stylus", Bo = (e) => e.touches && e.touches.length > 1, Io = () => {
|
|
1944
|
+
if (Ce(document.body, i.iosfix)) {
|
|
1881
1945
|
const e = parseInt(document.body.style.top, 10);
|
|
1882
|
-
|
|
1946
|
+
ke(document.body, i.iosfix), document.body.style.top = "", document.body.scrollTop = e * -1;
|
|
1883
1947
|
}
|
|
1884
|
-
},
|
|
1885
|
-
const t =
|
|
1948
|
+
}, Ut = 10, Fo = (e) => {
|
|
1949
|
+
const t = T(), n = F();
|
|
1886
1950
|
typeof e.willOpen == "function" && e.willOpen(n);
|
|
1887
|
-
const
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
},
|
|
1891
|
-
},
|
|
1892
|
-
const t =
|
|
1951
|
+
const d = window.getComputedStyle(document.body).overflowY;
|
|
1952
|
+
Mo(t, n, e), setTimeout(() => {
|
|
1953
|
+
Lo(t, n);
|
|
1954
|
+
}, Ut), ee() && (Uo(t, e.scrollbarPadding, d), lo()), !ye() && !O.previousActiveElement && (O.previousActiveElement = document.activeElement), typeof e.didOpen == "function" && setTimeout(() => e.didOpen(n)), ke(t, i["no-transition"]);
|
|
1955
|
+
}, Mt = (e) => {
|
|
1956
|
+
const t = F();
|
|
1893
1957
|
if (e.target !== t)
|
|
1894
1958
|
return;
|
|
1895
|
-
const n =
|
|
1896
|
-
t.removeEventListener(
|
|
1897
|
-
},
|
|
1898
|
-
|
|
1899
|
-
},
|
|
1900
|
-
|
|
1959
|
+
const n = T();
|
|
1960
|
+
t.removeEventListener(De, Mt), n.style.overflowY = "auto";
|
|
1961
|
+
}, Lo = (e, t) => {
|
|
1962
|
+
De && At(t) ? (e.style.overflowY = "hidden", t.addEventListener(De, Mt)) : e.style.overflowY = "auto";
|
|
1963
|
+
}, Uo = (e, t, n) => {
|
|
1964
|
+
So(), t && n !== "hidden" && Co(), setTimeout(() => {
|
|
1901
1965
|
e.scrollTop = 0;
|
|
1902
1966
|
});
|
|
1903
|
-
},
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
},
|
|
1907
|
-
},
|
|
1908
|
-
let t =
|
|
1909
|
-
t || new
|
|
1910
|
-
const n =
|
|
1911
|
-
|
|
1912
|
-
},
|
|
1913
|
-
const n =
|
|
1914
|
-
!t &&
|
|
1915
|
-
},
|
|
1916
|
-
t.input === "select" || t.input === "radio" ?
|
|
1917
|
-
},
|
|
1967
|
+
}, Mo = (e, t, n) => {
|
|
1968
|
+
D(e, n.showClass.backdrop), t.style.setProperty("opacity", "0", "important"), G(t, "grid"), setTimeout(() => {
|
|
1969
|
+
D(t, n.showClass.popup), t.style.removeProperty("opacity");
|
|
1970
|
+
}, Ut), D([document.documentElement, document.body], i.shown), n.heightAuto && n.backdrop && !n.toast && D([document.documentElement, document.body], i["height-auto"]);
|
|
1971
|
+
}, Me = (e) => {
|
|
1972
|
+
let t = F();
|
|
1973
|
+
t || new Qe(), t = F();
|
|
1974
|
+
const n = v();
|
|
1975
|
+
ye() ? ne(Z()) : Oo(t, e), G(n), t.setAttribute("data-loading", !0), t.setAttribute("aria-busy", !0), t.focus();
|
|
1976
|
+
}, Oo = (e, t) => {
|
|
1977
|
+
const n = _(), r = v();
|
|
1978
|
+
!t && le(m()) && (t = m()), G(n), t && (ne(t), r.setAttribute("data-button-to-replace", t.className)), r.parentNode.insertBefore(r, t), D([e, n], i.loading);
|
|
1979
|
+
}, Ro = (e, t) => {
|
|
1980
|
+
t.input === "select" || t.input === "radio" ? No(e, t) : ["text", "email", "number", "tel", "textarea"].includes(t.input) && (ae(t.inputValue) || Se(t.inputValue)) && (Me(m()), $o(e, t));
|
|
1981
|
+
}, Ho = (e, t) => {
|
|
1918
1982
|
const n = e.getInput();
|
|
1919
1983
|
if (!n)
|
|
1920
1984
|
return null;
|
|
1921
1985
|
switch (t.input) {
|
|
1922
1986
|
case "checkbox":
|
|
1923
|
-
return
|
|
1987
|
+
return jo(n);
|
|
1924
1988
|
case "radio":
|
|
1925
|
-
return
|
|
1989
|
+
return Do(n);
|
|
1926
1990
|
case "file":
|
|
1927
|
-
return
|
|
1991
|
+
return Vo(n);
|
|
1928
1992
|
default:
|
|
1929
1993
|
return t.inputAutoTrim ? n.value.trim() : n.value;
|
|
1930
1994
|
}
|
|
1931
|
-
},
|
|
1932
|
-
const n =
|
|
1933
|
-
|
|
1934
|
-
e.hideLoading(), r(
|
|
1935
|
-
})) : typeof t.inputOptions == "object" ? r(t.inputOptions) :
|
|
1936
|
-
},
|
|
1995
|
+
}, jo = (e) => e.checked ? 1 : 0, Do = (e) => e.checked ? e.value : null, Vo = (e) => e.files.length ? e.getAttribute("multiple") !== null ? e.files : e.files[0] : null, No = (e, t) => {
|
|
1996
|
+
const n = F(), r = (d) => qo[t.input](n, lt(d), t);
|
|
1997
|
+
ae(t.inputOptions) || Se(t.inputOptions) ? (Me(m()), V(t.inputOptions).then((d) => {
|
|
1998
|
+
e.hideLoading(), r(d);
|
|
1999
|
+
})) : typeof t.inputOptions == "object" ? r(t.inputOptions) : M("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof t.inputOptions));
|
|
2000
|
+
}, $o = (e, t) => {
|
|
1937
2001
|
const n = e.getInput();
|
|
1938
|
-
|
|
1939
|
-
n.value = t.input === "number" ? parseFloat(r) || 0 : "".concat(r),
|
|
2002
|
+
ne(n), V(t.inputValue).then((r) => {
|
|
2003
|
+
n.value = t.input === "number" ? parseFloat(r) || 0 : "".concat(r), G(n), n.focus(), e.hideLoading();
|
|
1940
2004
|
}).catch((r) => {
|
|
1941
|
-
|
|
2005
|
+
M("Error in inputValue promise: ".concat(r)), n.value = "", G(n), n.focus(), e.hideLoading();
|
|
1942
2006
|
});
|
|
1943
|
-
},
|
|
2007
|
+
}, qo = {
|
|
1944
2008
|
select: (e, t, n) => {
|
|
1945
|
-
const r =
|
|
1946
|
-
const
|
|
1947
|
-
|
|
2009
|
+
const r = _e(e, i.select), d = (P, J, ue) => {
|
|
2010
|
+
const re = document.createElement("option");
|
|
2011
|
+
re.value = ue, te(re, J), re.selected = Ot(ue, n.inputValue), P.appendChild(re);
|
|
1948
2012
|
};
|
|
1949
|
-
t.forEach((
|
|
1950
|
-
const
|
|
1951
|
-
if (Array.isArray(
|
|
1952
|
-
const
|
|
1953
|
-
|
|
2013
|
+
t.forEach((P) => {
|
|
2014
|
+
const J = P[0], ue = P[1];
|
|
2015
|
+
if (Array.isArray(ue)) {
|
|
2016
|
+
const re = document.createElement("optgroup");
|
|
2017
|
+
re.label = J, re.disabled = !1, r.appendChild(re), ue.forEach((Re) => d(re, Re[1], Re[0]));
|
|
1954
2018
|
} else
|
|
1955
|
-
|
|
2019
|
+
d(r, ue, J);
|
|
1956
2020
|
}), r.focus();
|
|
1957
2021
|
},
|
|
1958
2022
|
radio: (e, t, n) => {
|
|
1959
|
-
const r =
|
|
1960
|
-
t.forEach((
|
|
1961
|
-
const
|
|
1962
|
-
|
|
1963
|
-
const
|
|
1964
|
-
|
|
2023
|
+
const r = _e(e, i.radio);
|
|
2024
|
+
t.forEach((P) => {
|
|
2025
|
+
const J = P[0], ue = P[1], re = document.createElement("input"), Re = document.createElement("label");
|
|
2026
|
+
re.type = "radio", re.name = i.radio, re.value = J, Ot(J, n.inputValue) && (re.checked = !0);
|
|
2027
|
+
const mt = document.createElement("span");
|
|
2028
|
+
te(mt, ue), mt.className = i.label, Re.appendChild(re), Re.appendChild(mt), r.appendChild(Re);
|
|
1965
2029
|
});
|
|
1966
|
-
const
|
|
1967
|
-
|
|
2030
|
+
const d = r.querySelectorAll("input");
|
|
2031
|
+
d.length && d[0].focus();
|
|
1968
2032
|
}
|
|
1969
|
-
},
|
|
2033
|
+
}, lt = (e) => {
|
|
1970
2034
|
const t = [];
|
|
1971
2035
|
return typeof Map < "u" && e instanceof Map ? e.forEach((n, r) => {
|
|
1972
|
-
let
|
|
1973
|
-
typeof
|
|
2036
|
+
let d = n;
|
|
2037
|
+
typeof d == "object" && (d = lt(d)), t.push([r, d]);
|
|
1974
2038
|
}) : Object.keys(e).forEach((n) => {
|
|
1975
2039
|
let r = e[n];
|
|
1976
|
-
typeof r == "object" && (r =
|
|
2040
|
+
typeof r == "object" && (r = lt(r)), t.push([n, r]);
|
|
1977
2041
|
}), t;
|
|
1978
|
-
},
|
|
1979
|
-
function
|
|
1980
|
-
const e =
|
|
2042
|
+
}, Ot = (e, t) => t && t.toString() === e.toString();
|
|
2043
|
+
function Rt() {
|
|
2044
|
+
const e = R.innerParams.get(this);
|
|
1981
2045
|
if (!e)
|
|
1982
2046
|
return;
|
|
1983
|
-
const t =
|
|
1984
|
-
|
|
2047
|
+
const t = R.domCache.get(this);
|
|
2048
|
+
ne(t.loader), ye() ? e.icon && G(Z()) : Wo(t), ke([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;
|
|
1985
2049
|
}
|
|
1986
|
-
const
|
|
2050
|
+
const Wo = (e) => {
|
|
1987
2051
|
const t = e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));
|
|
1988
|
-
t.length ?
|
|
2052
|
+
t.length ? G(t[0], "inline-block") : yn() && ne(e.actions);
|
|
1989
2053
|
};
|
|
1990
|
-
function
|
|
1991
|
-
const t =
|
|
1992
|
-
return n ?
|
|
2054
|
+
function Ko(e) {
|
|
2055
|
+
const t = R.innerParams.get(e || this), n = R.domCache.get(e || this);
|
|
2056
|
+
return n ? rt(n.popup, t.input) : null;
|
|
1993
2057
|
}
|
|
1994
|
-
var
|
|
2058
|
+
var Ne = {
|
|
1995
2059
|
swalPromiseResolve: /* @__PURE__ */ new WeakMap(),
|
|
1996
2060
|
swalPromiseReject: /* @__PURE__ */ new WeakMap()
|
|
1997
2061
|
};
|
|
1998
|
-
const
|
|
2062
|
+
const zo = () => le(F()), Ht = () => m() && m().click(), Jo = () => l() && l().click(), Yo = () => b() && b().click(), jt = (e) => {
|
|
1999
2063
|
e.keydownTarget && e.keydownHandlerAdded && (e.keydownTarget.removeEventListener("keydown", e.keydownHandler, {
|
|
2000
2064
|
capture: e.keydownListenerCapture
|
|
2001
2065
|
}), e.keydownHandlerAdded = !1);
|
|
2002
|
-
},
|
|
2003
|
-
|
|
2066
|
+
}, Xo = (e, t, n, r) => {
|
|
2067
|
+
jt(t), n.toast || (t.keydownHandler = (d) => Go(e, d, r), t.keydownTarget = n.keydownListenerCapture ? window : F(), t.keydownListenerCapture = n.keydownListenerCapture, t.keydownTarget.addEventListener("keydown", t.keydownHandler, {
|
|
2004
2068
|
capture: t.keydownListenerCapture
|
|
2005
2069
|
}), t.keydownHandlerAdded = !0);
|
|
2006
|
-
},
|
|
2007
|
-
const r =
|
|
2070
|
+
}, ut = (e, t, n) => {
|
|
2071
|
+
const r = he();
|
|
2008
2072
|
if (r.length)
|
|
2009
2073
|
return t = t + n, t === r.length ? t = 0 : t === -1 && (t = r.length - 1), r[t].focus();
|
|
2010
|
-
|
|
2011
|
-
},
|
|
2012
|
-
const r =
|
|
2013
|
-
r && (t.isComposing || t.keyCode === 229 || (r.stopKeydownPropagation && t.stopPropagation(), t.key === "Enter" ?
|
|
2014
|
-
},
|
|
2015
|
-
if (
|
|
2074
|
+
F().focus();
|
|
2075
|
+
}, Dt = ["ArrowRight", "ArrowDown"], Zo = ["ArrowLeft", "ArrowUp"], Go = (e, t, n) => {
|
|
2076
|
+
const r = R.innerParams.get(e);
|
|
2077
|
+
r && (t.isComposing || t.keyCode === 229 || (r.stopKeydownPropagation && t.stopPropagation(), t.key === "Enter" ? Qo(e, t, r) : t.key === "Tab" ? er(t, r) : [...Dt, ...Zo].includes(t.key) ? tr(t.key) : t.key === "Escape" && nr(t, r, n)));
|
|
2078
|
+
}, Qo = (e, t, n) => {
|
|
2079
|
+
if (Y(n.allowEnterKey) && t.target && e.getInput() && t.target.outerHTML === e.getInput().outerHTML) {
|
|
2016
2080
|
if (["textarea", "file"].includes(n.input))
|
|
2017
2081
|
return;
|
|
2018
|
-
|
|
2082
|
+
Ht(), t.preventDefault();
|
|
2019
2083
|
}
|
|
2020
|
-
},
|
|
2021
|
-
const n = e.target, r =
|
|
2022
|
-
let
|
|
2023
|
-
for (let
|
|
2024
|
-
if (n === r[
|
|
2025
|
-
|
|
2084
|
+
}, er = (e, t) => {
|
|
2085
|
+
const n = e.target, r = he();
|
|
2086
|
+
let d = -1;
|
|
2087
|
+
for (let P = 0; P < r.length; P++)
|
|
2088
|
+
if (n === r[P]) {
|
|
2089
|
+
d = P;
|
|
2026
2090
|
break;
|
|
2027
2091
|
}
|
|
2028
|
-
e.shiftKey ?
|
|
2029
|
-
},
|
|
2030
|
-
const t =
|
|
2092
|
+
e.shiftKey ? ut(t, d, -1) : ut(t, d, 1), e.stopPropagation(), e.preventDefault();
|
|
2093
|
+
}, tr = (e) => {
|
|
2094
|
+
const t = m(), n = l(), r = b();
|
|
2031
2095
|
if (![t, n, r].includes(document.activeElement))
|
|
2032
2096
|
return;
|
|
2033
|
-
const
|
|
2034
|
-
let
|
|
2035
|
-
for (let
|
|
2036
|
-
if (
|
|
2097
|
+
const d = Dt.includes(e) ? "nextElementSibling" : "previousElementSibling";
|
|
2098
|
+
let P = document.activeElement;
|
|
2099
|
+
for (let J = 0; J < _().children.length; J++) {
|
|
2100
|
+
if (P = P[d], !P)
|
|
2037
2101
|
return;
|
|
2038
|
-
if (
|
|
2102
|
+
if (le(P) && P instanceof HTMLButtonElement)
|
|
2039
2103
|
break;
|
|
2040
2104
|
}
|
|
2041
|
-
|
|
2042
|
-
},
|
|
2043
|
-
|
|
2105
|
+
P instanceof HTMLButtonElement && P.focus();
|
|
2106
|
+
}, nr = (e, t, n) => {
|
|
2107
|
+
Y(t.allowEscapeKey) && (e.preventDefault(), n(Ue.esc));
|
|
2044
2108
|
};
|
|
2045
|
-
function
|
|
2046
|
-
|
|
2109
|
+
function Vt(e, t, n, r) {
|
|
2110
|
+
ye() ? Nt(e, r) : (An(n).then(() => Nt(e, r)), jt(O)), /^((?!chrome|android).)*safari/i.test(navigator.userAgent) ? (t.setAttribute("style", "display:none !important"), t.removeAttribute("class"), t.innerHTML = "") : t.remove(), ee() && (Ao(), Io(), It()), or();
|
|
2047
2111
|
}
|
|
2048
|
-
function
|
|
2049
|
-
|
|
2112
|
+
function or() {
|
|
2113
|
+
ke([document.documentElement, document.body], [i.shown, i["height-auto"], i["no-backdrop"], i["toast-shown"]]);
|
|
2050
2114
|
}
|
|
2051
|
-
function
|
|
2052
|
-
e =
|
|
2053
|
-
const t =
|
|
2054
|
-
this.isAwaitingPromise() ? e.isDismissed || (
|
|
2115
|
+
function Ze(e) {
|
|
2116
|
+
e = ar(e);
|
|
2117
|
+
const t = Ne.swalPromiseResolve.get(this), n = sr(this);
|
|
2118
|
+
this.isAwaitingPromise() ? e.isDismissed || ($e(this), t(e)) : n && t(e);
|
|
2055
2119
|
}
|
|
2056
|
-
function
|
|
2057
|
-
return !!
|
|
2120
|
+
function rr() {
|
|
2121
|
+
return !!R.awaitingPromise.get(this);
|
|
2058
2122
|
}
|
|
2059
|
-
const
|
|
2060
|
-
const t =
|
|
2123
|
+
const sr = (e) => {
|
|
2124
|
+
const t = F();
|
|
2061
2125
|
if (!t)
|
|
2062
2126
|
return !1;
|
|
2063
|
-
const n =
|
|
2064
|
-
if (!n ||
|
|
2127
|
+
const n = R.innerParams.get(e);
|
|
2128
|
+
if (!n || Ce(t, n.hideClass.popup))
|
|
2065
2129
|
return !1;
|
|
2066
|
-
|
|
2067
|
-
const r =
|
|
2068
|
-
return
|
|
2130
|
+
ke(t, n.showClass.popup), D(t, n.hideClass.popup);
|
|
2131
|
+
const r = T();
|
|
2132
|
+
return ke(r, n.showClass.backdrop), D(r, n.hideClass.backdrop), cr(e, t, n), !0;
|
|
2069
2133
|
};
|
|
2070
|
-
function
|
|
2071
|
-
const t =
|
|
2072
|
-
|
|
2134
|
+
function ir(e) {
|
|
2135
|
+
const t = Ne.swalPromiseReject.get(this);
|
|
2136
|
+
$e(this), t && t(e);
|
|
2073
2137
|
}
|
|
2074
|
-
const
|
|
2075
|
-
e.isAwaitingPromise() && (
|
|
2076
|
-
},
|
|
2138
|
+
const $e = (e) => {
|
|
2139
|
+
e.isAwaitingPromise() && (R.awaitingPromise.delete(e), R.innerParams.get(e) || e._destroy());
|
|
2140
|
+
}, ar = (e) => typeof e > "u" ? {
|
|
2077
2141
|
isConfirmed: !1,
|
|
2078
2142
|
isDenied: !1,
|
|
2079
2143
|
isDismissed: !0
|
|
@@ -2081,67 +2145,67 @@ https://sweetalert2.github.io/#ajax-request`), Ln(e), typeof e.title == "string"
|
|
|
2081
2145
|
isConfirmed: !1,
|
|
2082
2146
|
isDenied: !1,
|
|
2083
2147
|
isDismissed: !1
|
|
2084
|
-
}, e),
|
|
2085
|
-
const r =
|
|
2086
|
-
typeof n.willClose == "function" && n.willClose(t),
|
|
2087
|
-
},
|
|
2088
|
-
|
|
2089
|
-
|
|
2148
|
+
}, e), cr = (e, t, n) => {
|
|
2149
|
+
const r = T(), d = De && At(t);
|
|
2150
|
+
typeof n.willClose == "function" && n.willClose(t), d ? lr(e, t, r, n.returnFocus, n.didClose) : Vt(e, r, n.returnFocus, n.didClose);
|
|
2151
|
+
}, lr = (e, t, n, r, d) => {
|
|
2152
|
+
O.swalCloseEventFinishedCallback = Vt.bind(null, e, n, r, d), t.addEventListener(De, function(P) {
|
|
2153
|
+
P.target === t && (O.swalCloseEventFinishedCallback(), delete O.swalCloseEventFinishedCallback);
|
|
2090
2154
|
});
|
|
2091
|
-
},
|
|
2155
|
+
}, Nt = (e, t) => {
|
|
2092
2156
|
setTimeout(() => {
|
|
2093
2157
|
typeof t == "function" && t.bind(e.params)(), e._destroy();
|
|
2094
2158
|
});
|
|
2095
2159
|
};
|
|
2096
|
-
function
|
|
2097
|
-
const r =
|
|
2098
|
-
t.forEach((
|
|
2099
|
-
r[
|
|
2160
|
+
function $t(e, t, n) {
|
|
2161
|
+
const r = R.domCache.get(e);
|
|
2162
|
+
t.forEach((d) => {
|
|
2163
|
+
r[d].disabled = n;
|
|
2100
2164
|
});
|
|
2101
2165
|
}
|
|
2102
|
-
function
|
|
2166
|
+
function qt(e, t) {
|
|
2103
2167
|
if (!e)
|
|
2104
2168
|
return !1;
|
|
2105
2169
|
if (e.type === "radio") {
|
|
2106
2170
|
const r = e.parentNode.parentNode.querySelectorAll("input");
|
|
2107
|
-
for (let
|
|
2108
|
-
r[
|
|
2171
|
+
for (let d = 0; d < r.length; d++)
|
|
2172
|
+
r[d].disabled = t;
|
|
2109
2173
|
} else
|
|
2110
2174
|
e.disabled = t;
|
|
2111
2175
|
}
|
|
2112
|
-
function
|
|
2113
|
-
|
|
2176
|
+
function ur() {
|
|
2177
|
+
$t(this, ["confirmButton", "denyButton", "cancelButton"], !1);
|
|
2114
2178
|
}
|
|
2115
|
-
function
|
|
2116
|
-
|
|
2179
|
+
function dr() {
|
|
2180
|
+
$t(this, ["confirmButton", "denyButton", "cancelButton"], !0);
|
|
2117
2181
|
}
|
|
2118
|
-
function
|
|
2119
|
-
return
|
|
2182
|
+
function fr() {
|
|
2183
|
+
return qt(this.getInput(), !1);
|
|
2120
2184
|
}
|
|
2121
|
-
function
|
|
2122
|
-
return
|
|
2185
|
+
function hr() {
|
|
2186
|
+
return qt(this.getInput(), !0);
|
|
2123
2187
|
}
|
|
2124
|
-
function
|
|
2125
|
-
const t =
|
|
2126
|
-
|
|
2188
|
+
function pr(e) {
|
|
2189
|
+
const t = R.domCache.get(this), n = R.innerParams.get(this);
|
|
2190
|
+
te(t.validationMessage, e), t.validationMessage.className = i["validation-message"], n.customClass && n.customClass.validationMessage && D(t.validationMessage, n.customClass.validationMessage), G(t.validationMessage);
|
|
2127
2191
|
const r = this.getInput();
|
|
2128
|
-
r && (r.setAttribute("aria-invalid", !0), r.setAttribute("aria-describedby",
|
|
2192
|
+
r && (r.setAttribute("aria-invalid", !0), r.setAttribute("aria-describedby", i["validation-message"]), yt(r), D(r, i.inputerror));
|
|
2129
2193
|
}
|
|
2130
|
-
function
|
|
2131
|
-
const e =
|
|
2132
|
-
e.validationMessage &&
|
|
2194
|
+
function gr() {
|
|
2195
|
+
const e = R.domCache.get(this);
|
|
2196
|
+
e.validationMessage && ne(e.validationMessage);
|
|
2133
2197
|
const t = this.getInput();
|
|
2134
|
-
t && (t.removeAttribute("aria-invalid"), t.removeAttribute("aria-describedby"),
|
|
2198
|
+
t && (t.removeAttribute("aria-invalid"), t.removeAttribute("aria-describedby"), ke(t, i.inputerror));
|
|
2135
2199
|
}
|
|
2136
|
-
function
|
|
2137
|
-
return
|
|
2200
|
+
function mr() {
|
|
2201
|
+
return R.domCache.get(this).progressSteps;
|
|
2138
2202
|
}
|
|
2139
|
-
function
|
|
2140
|
-
const t =
|
|
2141
|
-
if (!t ||
|
|
2142
|
-
return
|
|
2143
|
-
const r =
|
|
2144
|
-
|
|
2203
|
+
function vr(e) {
|
|
2204
|
+
const t = F(), n = R.innerParams.get(this);
|
|
2205
|
+
if (!t || Ce(t, n.hideClass.popup))
|
|
2206
|
+
return B("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.");
|
|
2207
|
+
const r = br(e), d = Object.assign({}, n, r);
|
|
2208
|
+
Bt(this, d), R.innerParams.set(this, d), Object.defineProperties(this, {
|
|
2145
2209
|
params: {
|
|
2146
2210
|
value: Object.assign({}, this.params, e),
|
|
2147
2211
|
writable: !1,
|
|
@@ -2149,316 +2213,316 @@ https://sweetalert2.github.io/#ajax-request`), Ln(e), typeof e.title == "string"
|
|
|
2149
2213
|
}
|
|
2150
2214
|
});
|
|
2151
2215
|
}
|
|
2152
|
-
const
|
|
2216
|
+
const br = (e) => {
|
|
2153
2217
|
const t = {};
|
|
2154
2218
|
return Object.keys(e).forEach((n) => {
|
|
2155
|
-
|
|
2219
|
+
we(n) ? t[n] = e[n] : B('Invalid parameter to update: "'.concat(n, `". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js
|
|
2156
2220
|
|
|
2157
2221
|
If you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md`));
|
|
2158
2222
|
}), t;
|
|
2159
2223
|
};
|
|
2160
|
-
function
|
|
2161
|
-
const e =
|
|
2224
|
+
function wr() {
|
|
2225
|
+
const e = R.domCache.get(this), t = R.innerParams.get(this);
|
|
2162
2226
|
if (!t) {
|
|
2163
|
-
|
|
2227
|
+
Wt(this);
|
|
2164
2228
|
return;
|
|
2165
2229
|
}
|
|
2166
|
-
e.popup &&
|
|
2230
|
+
e.popup && O.swalCloseEventFinishedCallback && (O.swalCloseEventFinishedCallback(), delete O.swalCloseEventFinishedCallback), O.deferDisposalTimer && (clearTimeout(O.deferDisposalTimer), delete O.deferDisposalTimer), typeof t.didDestroy == "function" && t.didDestroy(), yr(this);
|
|
2167
2231
|
}
|
|
2168
|
-
const
|
|
2169
|
-
|
|
2170
|
-
},
|
|
2171
|
-
e.isAwaitingPromise() ? (
|
|
2172
|
-
},
|
|
2232
|
+
const yr = (e) => {
|
|
2233
|
+
Wt(e), delete e.params, delete O.keydownHandler, delete O.keydownTarget, delete O.currentInstance;
|
|
2234
|
+
}, Wt = (e) => {
|
|
2235
|
+
e.isAwaitingPromise() ? (dt(R, e), R.awaitingPromise.set(e, !0)) : (dt(Ne, e), dt(R, e));
|
|
2236
|
+
}, dt = (e, t) => {
|
|
2173
2237
|
for (const n in e)
|
|
2174
2238
|
e[n].delete(t);
|
|
2175
2239
|
};
|
|
2176
|
-
var
|
|
2177
|
-
hideLoading:
|
|
2178
|
-
disableLoading:
|
|
2179
|
-
getInput:
|
|
2180
|
-
close:
|
|
2181
|
-
isAwaitingPromise:
|
|
2182
|
-
rejectPromise:
|
|
2183
|
-
handleAwaitingPromise:
|
|
2184
|
-
closePopup:
|
|
2185
|
-
closeModal:
|
|
2186
|
-
closeToast:
|
|
2187
|
-
enableButtons:
|
|
2188
|
-
disableButtons:
|
|
2189
|
-
enableInput:
|
|
2190
|
-
disableInput:
|
|
2191
|
-
showValidationMessage:
|
|
2192
|
-
resetValidationMessage:
|
|
2193
|
-
getProgressSteps:
|
|
2194
|
-
update:
|
|
2195
|
-
_destroy:
|
|
2240
|
+
var Kt = /* @__PURE__ */ Object.freeze({
|
|
2241
|
+
hideLoading: Rt,
|
|
2242
|
+
disableLoading: Rt,
|
|
2243
|
+
getInput: Ko,
|
|
2244
|
+
close: Ze,
|
|
2245
|
+
isAwaitingPromise: rr,
|
|
2246
|
+
rejectPromise: ir,
|
|
2247
|
+
handleAwaitingPromise: $e,
|
|
2248
|
+
closePopup: Ze,
|
|
2249
|
+
closeModal: Ze,
|
|
2250
|
+
closeToast: Ze,
|
|
2251
|
+
enableButtons: ur,
|
|
2252
|
+
disableButtons: dr,
|
|
2253
|
+
enableInput: fr,
|
|
2254
|
+
disableInput: hr,
|
|
2255
|
+
showValidationMessage: pr,
|
|
2256
|
+
resetValidationMessage: gr,
|
|
2257
|
+
getProgressSteps: mr,
|
|
2258
|
+
update: vr,
|
|
2259
|
+
_destroy: wr
|
|
2196
2260
|
});
|
|
2197
|
-
const
|
|
2198
|
-
const t =
|
|
2199
|
-
e.disableButtons(), t.input ?
|
|
2200
|
-
},
|
|
2201
|
-
const t =
|
|
2202
|
-
e.disableButtons(), t.returnInputValueOnDeny ?
|
|
2203
|
-
},
|
|
2204
|
-
e.disableButtons(), t(
|
|
2205
|
-
},
|
|
2206
|
-
const n =
|
|
2261
|
+
const kr = (e) => {
|
|
2262
|
+
const t = R.innerParams.get(e);
|
|
2263
|
+
e.disableButtons(), t.input ? zt(e, "confirm") : ht(e, !0);
|
|
2264
|
+
}, xr = (e) => {
|
|
2265
|
+
const t = R.innerParams.get(e);
|
|
2266
|
+
e.disableButtons(), t.returnInputValueOnDeny ? zt(e, "deny") : ft(e, !1);
|
|
2267
|
+
}, Cr = (e, t) => {
|
|
2268
|
+
e.disableButtons(), t(Ue.cancel);
|
|
2269
|
+
}, zt = (e, t) => {
|
|
2270
|
+
const n = R.innerParams.get(e);
|
|
2207
2271
|
if (!n.input)
|
|
2208
|
-
return
|
|
2209
|
-
const r =
|
|
2210
|
-
n.inputValidator ?
|
|
2211
|
-
},
|
|
2212
|
-
const r =
|
|
2213
|
-
e.disableInput(), Promise.resolve().then(() =>
|
|
2214
|
-
e.enableButtons(), e.enableInput(),
|
|
2272
|
+
return M('The "input" parameter is needed to be set when using returnInputValueOn'.concat(L(t)));
|
|
2273
|
+
const r = Ho(e, n);
|
|
2274
|
+
n.inputValidator ? Ar(e, r, t) : e.getInput().checkValidity() ? t === "deny" ? ft(e, r) : ht(e, r) : (e.enableButtons(), e.showValidationMessage(n.validationMessage));
|
|
2275
|
+
}, Ar = (e, t, n) => {
|
|
2276
|
+
const r = R.innerParams.get(e);
|
|
2277
|
+
e.disableInput(), Promise.resolve().then(() => V(r.inputValidator(t, r.validationMessage))).then((P) => {
|
|
2278
|
+
e.enableButtons(), e.enableInput(), P ? e.showValidationMessage(P) : n === "deny" ? ft(e, t) : ht(e, t);
|
|
2215
2279
|
});
|
|
2216
|
-
},
|
|
2217
|
-
const n =
|
|
2218
|
-
n.showLoaderOnDeny &&
|
|
2219
|
-
|
|
2280
|
+
}, ft = (e, t) => {
|
|
2281
|
+
const n = R.innerParams.get(e || void 0);
|
|
2282
|
+
n.showLoaderOnDeny && Me(l()), n.preDeny ? (R.awaitingPromise.set(e || void 0, !0), Promise.resolve().then(() => V(n.preDeny(t, n.validationMessage))).then((d) => {
|
|
2283
|
+
d === !1 ? (e.hideLoading(), $e(e)) : e.closePopup({
|
|
2220
2284
|
isDenied: !0,
|
|
2221
|
-
value: typeof
|
|
2285
|
+
value: typeof d > "u" ? t : d
|
|
2222
2286
|
});
|
|
2223
|
-
}).catch((
|
|
2287
|
+
}).catch((d) => Yt(e || void 0, d))) : e.closePopup({
|
|
2224
2288
|
isDenied: !0,
|
|
2225
2289
|
value: t
|
|
2226
2290
|
});
|
|
2227
|
-
},
|
|
2291
|
+
}, Jt = (e, t) => {
|
|
2228
2292
|
e.closePopup({
|
|
2229
2293
|
isConfirmed: !0,
|
|
2230
2294
|
value: t
|
|
2231
2295
|
});
|
|
2232
|
-
},
|
|
2296
|
+
}, Yt = (e, t) => {
|
|
2233
2297
|
e.rejectPromise(t);
|
|
2234
|
-
},
|
|
2235
|
-
const n =
|
|
2236
|
-
n.showLoaderOnConfirm &&
|
|
2237
|
-
|
|
2238
|
-
}).catch((
|
|
2239
|
-
},
|
|
2240
|
-
|
|
2241
|
-
},
|
|
2298
|
+
}, ht = (e, t) => {
|
|
2299
|
+
const n = R.innerParams.get(e || void 0);
|
|
2300
|
+
n.showLoaderOnConfirm && Me(), n.preConfirm ? (e.resetValidationMessage(), R.awaitingPromise.set(e || void 0, !0), Promise.resolve().then(() => V(n.preConfirm(t, n.validationMessage))).then((d) => {
|
|
2301
|
+
le(p()) || d === !1 ? (e.hideLoading(), $e(e)) : Jt(e, typeof d > "u" ? t : d);
|
|
2302
|
+
}).catch((d) => Yt(e || void 0, d))) : Jt(e, t);
|
|
2303
|
+
}, Sr = (e, t, n) => {
|
|
2304
|
+
R.innerParams.get(e).toast ? _r(e, t, n) : (Pr(t), Tr(t), Br(e, t, n));
|
|
2305
|
+
}, _r = (e, t, n) => {
|
|
2242
2306
|
t.popup.onclick = () => {
|
|
2243
|
-
const r =
|
|
2244
|
-
r && (
|
|
2307
|
+
const r = R.innerParams.get(e);
|
|
2308
|
+
r && (Er(r) || r.timer || r.input) || n(Ue.close);
|
|
2245
2309
|
};
|
|
2246
|
-
},
|
|
2247
|
-
let
|
|
2248
|
-
const
|
|
2310
|
+
}, Er = (e) => e.showConfirmButton || e.showDenyButton || e.showCancelButton || e.showCloseButton;
|
|
2311
|
+
let Ge = !1;
|
|
2312
|
+
const Pr = (e) => {
|
|
2249
2313
|
e.popup.onmousedown = () => {
|
|
2250
2314
|
e.container.onmouseup = function(t) {
|
|
2251
|
-
e.container.onmouseup = void 0, t.target === e.container && (
|
|
2315
|
+
e.container.onmouseup = void 0, t.target === e.container && (Ge = !0);
|
|
2252
2316
|
};
|
|
2253
2317
|
};
|
|
2254
|
-
},
|
|
2318
|
+
}, Tr = (e) => {
|
|
2255
2319
|
e.container.onmousedown = () => {
|
|
2256
2320
|
e.popup.onmouseup = function(t) {
|
|
2257
|
-
e.popup.onmouseup = void 0, (t.target === e.popup || e.popup.contains(t.target)) && (
|
|
2321
|
+
e.popup.onmouseup = void 0, (t.target === e.popup || e.popup.contains(t.target)) && (Ge = !0);
|
|
2258
2322
|
};
|
|
2259
2323
|
};
|
|
2260
|
-
},
|
|
2324
|
+
}, Br = (e, t, n) => {
|
|
2261
2325
|
t.container.onclick = (r) => {
|
|
2262
|
-
const
|
|
2263
|
-
if (
|
|
2264
|
-
|
|
2326
|
+
const d = R.innerParams.get(e);
|
|
2327
|
+
if (Ge) {
|
|
2328
|
+
Ge = !1;
|
|
2265
2329
|
return;
|
|
2266
2330
|
}
|
|
2267
|
-
r.target === t.container &&
|
|
2331
|
+
r.target === t.container && Y(d.allowOutsideClick) && n(Ue.backdrop);
|
|
2268
2332
|
};
|
|
2269
|
-
},
|
|
2333
|
+
}, Ir = (e) => typeof e == "object" && e.jquery, Xt = (e) => e instanceof Element || Ir(e), Fr = (e) => {
|
|
2270
2334
|
const t = {};
|
|
2271
|
-
return typeof e[0] == "object" && !
|
|
2272
|
-
const
|
|
2273
|
-
typeof
|
|
2335
|
+
return typeof e[0] == "object" && !Xt(e[0]) ? Object.assign(t, e[0]) : ["title", "html", "icon"].forEach((n, r) => {
|
|
2336
|
+
const d = e[r];
|
|
2337
|
+
typeof d == "string" || Xt(d) ? t[n] = d : d !== void 0 && M("Unexpected type of ".concat(n, '! Expected "string" or "Element", got ').concat(typeof d));
|
|
2274
2338
|
}), t;
|
|
2275
2339
|
};
|
|
2276
|
-
function
|
|
2340
|
+
function Lr() {
|
|
2277
2341
|
const e = this;
|
|
2278
2342
|
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
2279
2343
|
n[r] = arguments[r];
|
|
2280
2344
|
return new e(...n);
|
|
2281
2345
|
}
|
|
2282
|
-
function
|
|
2346
|
+
function Ur(e) {
|
|
2283
2347
|
class t extends this {
|
|
2284
|
-
_main(r,
|
|
2285
|
-
return super._main(r, Object.assign({}, e,
|
|
2348
|
+
_main(r, d) {
|
|
2349
|
+
return super._main(r, Object.assign({}, e, d));
|
|
2286
2350
|
}
|
|
2287
2351
|
}
|
|
2288
2352
|
return t;
|
|
2289
2353
|
}
|
|
2290
|
-
const
|
|
2291
|
-
if (
|
|
2292
|
-
return
|
|
2293
|
-
},
|
|
2294
|
-
if (
|
|
2295
|
-
const e =
|
|
2296
|
-
return
|
|
2354
|
+
const Mr = () => O.timeout && O.timeout.getTimerLeft(), Zt = () => {
|
|
2355
|
+
if (O.timeout)
|
|
2356
|
+
return kn(), O.timeout.stop();
|
|
2357
|
+
}, Gt = () => {
|
|
2358
|
+
if (O.timeout) {
|
|
2359
|
+
const e = O.timeout.start();
|
|
2360
|
+
return st(e), e;
|
|
2297
2361
|
}
|
|
2298
|
-
},
|
|
2299
|
-
const e =
|
|
2300
|
-
return e && (e.running ?
|
|
2301
|
-
},
|
|
2302
|
-
if (
|
|
2303
|
-
const t =
|
|
2304
|
-
return
|
|
2362
|
+
}, Or = () => {
|
|
2363
|
+
const e = O.timeout;
|
|
2364
|
+
return e && (e.running ? Zt() : Gt());
|
|
2365
|
+
}, Rr = (e) => {
|
|
2366
|
+
if (O.timeout) {
|
|
2367
|
+
const t = O.timeout.increase(e);
|
|
2368
|
+
return st(t, !0), t;
|
|
2305
2369
|
}
|
|
2306
|
-
},
|
|
2307
|
-
let
|
|
2308
|
-
const
|
|
2309
|
-
function
|
|
2370
|
+
}, Hr = () => O.timeout && O.timeout.isRunning();
|
|
2371
|
+
let Qt = !1;
|
|
2372
|
+
const pt = {};
|
|
2373
|
+
function jr() {
|
|
2310
2374
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "data-swal-template";
|
|
2311
|
-
|
|
2375
|
+
pt[e] = this, Qt || (document.body.addEventListener("click", Dr), Qt = !0);
|
|
2312
2376
|
}
|
|
2313
|
-
const
|
|
2377
|
+
const Dr = (e) => {
|
|
2314
2378
|
for (let t = e.target; t && t !== document; t = t.parentNode)
|
|
2315
|
-
for (const n in
|
|
2379
|
+
for (const n in pt) {
|
|
2316
2380
|
const r = t.getAttribute(n);
|
|
2317
2381
|
if (r) {
|
|
2318
|
-
|
|
2382
|
+
pt[n].fire({
|
|
2319
2383
|
template: r
|
|
2320
2384
|
});
|
|
2321
2385
|
return;
|
|
2322
2386
|
}
|
|
2323
2387
|
}
|
|
2324
2388
|
};
|
|
2325
|
-
var
|
|
2326
|
-
isValidParameter:
|
|
2327
|
-
isUpdatableParameter:
|
|
2328
|
-
isDeprecatedParameter:
|
|
2329
|
-
argsToParams:
|
|
2330
|
-
isVisible:
|
|
2331
|
-
clickConfirm:
|
|
2332
|
-
clickDeny:
|
|
2333
|
-
clickCancel:
|
|
2334
|
-
getContainer:
|
|
2335
|
-
getPopup:
|
|
2336
|
-
getTitle:
|
|
2337
|
-
getHtmlContainer:
|
|
2338
|
-
getImage:
|
|
2339
|
-
getIcon:
|
|
2340
|
-
getInputLabel:
|
|
2341
|
-
getCloseButton:
|
|
2342
|
-
getActions:
|
|
2343
|
-
getConfirmButton:
|
|
2344
|
-
getDenyButton:
|
|
2345
|
-
getCancelButton:
|
|
2346
|
-
getLoader:
|
|
2347
|
-
getFooter:
|
|
2348
|
-
getTimerProgressBar:
|
|
2349
|
-
getFocusableElements:
|
|
2350
|
-
getValidationMessage:
|
|
2351
|
-
isLoading:
|
|
2352
|
-
fire:
|
|
2353
|
-
mixin:
|
|
2354
|
-
showLoading:
|
|
2355
|
-
enableLoading:
|
|
2356
|
-
getTimerLeft:
|
|
2357
|
-
stopTimer:
|
|
2358
|
-
resumeTimer:
|
|
2359
|
-
toggleTimer:
|
|
2360
|
-
increaseTimer:
|
|
2361
|
-
isTimerRunning:
|
|
2362
|
-
bindClickHandler:
|
|
2389
|
+
var Vr = /* @__PURE__ */ Object.freeze({
|
|
2390
|
+
isValidParameter: z,
|
|
2391
|
+
isUpdatableParameter: we,
|
|
2392
|
+
isDeprecatedParameter: X,
|
|
2393
|
+
argsToParams: Fr,
|
|
2394
|
+
isVisible: zo,
|
|
2395
|
+
clickConfirm: Ht,
|
|
2396
|
+
clickDeny: Jo,
|
|
2397
|
+
clickCancel: Yo,
|
|
2398
|
+
getContainer: T,
|
|
2399
|
+
getPopup: F,
|
|
2400
|
+
getTitle: H,
|
|
2401
|
+
getHtmlContainer: Q,
|
|
2402
|
+
getImage: s,
|
|
2403
|
+
getIcon: Z,
|
|
2404
|
+
getInputLabel: A,
|
|
2405
|
+
getCloseButton: j,
|
|
2406
|
+
getActions: _,
|
|
2407
|
+
getConfirmButton: m,
|
|
2408
|
+
getDenyButton: l,
|
|
2409
|
+
getCancelButton: b,
|
|
2410
|
+
getLoader: v,
|
|
2411
|
+
getFooter: E,
|
|
2412
|
+
getTimerProgressBar: U,
|
|
2413
|
+
getFocusableElements: he,
|
|
2414
|
+
getValidationMessage: p,
|
|
2415
|
+
isLoading: bn,
|
|
2416
|
+
fire: Lr,
|
|
2417
|
+
mixin: Ur,
|
|
2418
|
+
showLoading: Me,
|
|
2419
|
+
enableLoading: Me,
|
|
2420
|
+
getTimerLeft: Mr,
|
|
2421
|
+
stopTimer: Zt,
|
|
2422
|
+
resumeTimer: Gt,
|
|
2423
|
+
toggleTimer: Or,
|
|
2424
|
+
increaseTimer: Rr,
|
|
2425
|
+
isTimerRunning: Hr,
|
|
2426
|
+
bindClickHandler: jr
|
|
2363
2427
|
});
|
|
2364
|
-
let
|
|
2365
|
-
class
|
|
2428
|
+
let gt;
|
|
2429
|
+
class Oe {
|
|
2366
2430
|
constructor() {
|
|
2367
2431
|
if (typeof window > "u")
|
|
2368
2432
|
return;
|
|
2369
|
-
|
|
2433
|
+
gt = this;
|
|
2370
2434
|
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
2371
2435
|
n[r] = arguments[r];
|
|
2372
|
-
const
|
|
2436
|
+
const d = Object.freeze(this.constructor.argsToParams(n));
|
|
2373
2437
|
Object.defineProperties(this, {
|
|
2374
2438
|
params: {
|
|
2375
|
-
value:
|
|
2439
|
+
value: d,
|
|
2376
2440
|
writable: !1,
|
|
2377
2441
|
enumerable: !0,
|
|
2378
2442
|
configurable: !0
|
|
2379
2443
|
}
|
|
2380
2444
|
});
|
|
2381
|
-
const
|
|
2382
|
-
|
|
2445
|
+
const P = this._main(this.params);
|
|
2446
|
+
R.promise.set(this, P);
|
|
2383
2447
|
}
|
|
2384
2448
|
_main(t) {
|
|
2385
2449
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2386
|
-
|
|
2387
|
-
const r =
|
|
2388
|
-
|
|
2389
|
-
const
|
|
2390
|
-
return
|
|
2450
|
+
C(Object.assign({}, n, t)), O.currentInstance && (O.currentInstance._destroy(), ee() && It()), O.currentInstance = this;
|
|
2451
|
+
const r = $r(t, n);
|
|
2452
|
+
ko(r), Object.freeze(r), O.timeout && (O.timeout.stop(), delete O.timeout), clearTimeout(O.restoreFocusTimeout);
|
|
2453
|
+
const d = qr(this);
|
|
2454
|
+
return Bt(this, r), R.innerParams.set(this, r), Nr(this, d, r);
|
|
2391
2455
|
}
|
|
2392
2456
|
// `catch` cannot be the name of a module export, so we define our thenable methods here instead
|
|
2393
2457
|
then(t) {
|
|
2394
|
-
return
|
|
2458
|
+
return R.promise.get(this).then(t);
|
|
2395
2459
|
}
|
|
2396
2460
|
finally(t) {
|
|
2397
|
-
return
|
|
2461
|
+
return R.promise.get(this).finally(t);
|
|
2398
2462
|
}
|
|
2399
2463
|
}
|
|
2400
|
-
const
|
|
2401
|
-
const
|
|
2464
|
+
const Nr = (e, t, n) => new Promise((r, d) => {
|
|
2465
|
+
const P = (J) => {
|
|
2402
2466
|
e.closePopup({
|
|
2403
2467
|
isDismissed: !0,
|
|
2404
|
-
dismiss:
|
|
2468
|
+
dismiss: J
|
|
2405
2469
|
});
|
|
2406
2470
|
};
|
|
2407
|
-
|
|
2471
|
+
Ne.swalPromiseResolve.set(e, r), Ne.swalPromiseReject.set(e, d), t.confirmButton.onclick = () => kr(e), t.denyButton.onclick = () => xr(e), t.cancelButton.onclick = () => Cr(e, P), t.closeButton.onclick = () => P(Ue.close), Sr(e, t, P), Xo(e, O, n, P), Ro(e, n), Fo(n), Wr(O, n, P), Kr(t, n), setTimeout(() => {
|
|
2408
2472
|
t.container.scrollTop = 0;
|
|
2409
2473
|
});
|
|
2410
|
-
}),
|
|
2411
|
-
const n =
|
|
2412
|
-
return r.showClass = Object.assign({},
|
|
2413
|
-
},
|
|
2474
|
+
}), $r = (e, t) => {
|
|
2475
|
+
const n = uo(e), r = Object.assign({}, be, t, n, e);
|
|
2476
|
+
return r.showClass = Object.assign({}, be.showClass, r.showClass), r.hideClass = Object.assign({}, be.hideClass, r.hideClass), r;
|
|
2477
|
+
}, qr = (e) => {
|
|
2414
2478
|
const t = {
|
|
2415
|
-
popup:
|
|
2416
|
-
container:
|
|
2417
|
-
actions:
|
|
2418
|
-
confirmButton:
|
|
2419
|
-
denyButton:
|
|
2420
|
-
cancelButton:
|
|
2421
|
-
loader:
|
|
2422
|
-
closeButton:
|
|
2423
|
-
validationMessage:
|
|
2424
|
-
progressSteps:
|
|
2479
|
+
popup: F(),
|
|
2480
|
+
container: T(),
|
|
2481
|
+
actions: _(),
|
|
2482
|
+
confirmButton: m(),
|
|
2483
|
+
denyButton: l(),
|
|
2484
|
+
cancelButton: b(),
|
|
2485
|
+
loader: v(),
|
|
2486
|
+
closeButton: j(),
|
|
2487
|
+
validationMessage: p(),
|
|
2488
|
+
progressSteps: a()
|
|
2425
2489
|
};
|
|
2426
|
-
return
|
|
2427
|
-
},
|
|
2428
|
-
const r =
|
|
2429
|
-
|
|
2490
|
+
return R.domCache.set(e, t), t;
|
|
2491
|
+
}, Wr = (e, t, n) => {
|
|
2492
|
+
const r = U();
|
|
2493
|
+
ne(r), t.timer && (e.timeout = new xo(() => {
|
|
2430
2494
|
n("timer"), delete e.timeout;
|
|
2431
|
-
}, t.timer), t.timerProgressBar && (
|
|
2432
|
-
e.timeout && e.timeout.running &&
|
|
2495
|
+
}, t.timer), t.timerProgressBar && (G(r), pe(r, t, "timerProgressBar"), setTimeout(() => {
|
|
2496
|
+
e.timeout && e.timeout.running && st(t.timer);
|
|
2433
2497
|
})));
|
|
2434
|
-
},
|
|
2498
|
+
}, Kr = (e, t) => {
|
|
2435
2499
|
if (!t.toast) {
|
|
2436
|
-
if (!
|
|
2437
|
-
return
|
|
2438
|
-
|
|
2500
|
+
if (!Y(t.allowEnterKey))
|
|
2501
|
+
return Jr();
|
|
2502
|
+
zr(e, t) || ut(t, -1, 1);
|
|
2439
2503
|
}
|
|
2440
|
-
},
|
|
2504
|
+
}, zr = (e, t) => t.focusDeny && le(e.denyButton) ? (e.denyButton.focus(), !0) : t.focusCancel && le(e.cancelButton) ? (e.cancelButton.focus(), !0) : t.focusConfirm && le(e.confirmButton) ? (e.confirmButton.focus(), !0) : !1, Jr = () => {
|
|
2441
2505
|
document.activeElement instanceof HTMLElement && typeof document.activeElement.blur == "function" && document.activeElement.blur();
|
|
2442
2506
|
};
|
|
2443
|
-
Object.assign(
|
|
2444
|
-
|
|
2445
|
-
if (
|
|
2446
|
-
return
|
|
2507
|
+
Object.assign(Oe.prototype, Kt), Object.assign(Oe, Vr), Object.keys(Kt).forEach((e) => {
|
|
2508
|
+
Oe[e] = function() {
|
|
2509
|
+
if (gt)
|
|
2510
|
+
return gt[e](...arguments);
|
|
2447
2511
|
};
|
|
2448
|
-
}),
|
|
2449
|
-
const
|
|
2450
|
-
return
|
|
2451
|
-
}), typeof
|
|
2452
|
-
})(
|
|
2453
|
-
var
|
|
2454
|
-
const
|
|
2455
|
-
class
|
|
2512
|
+
}), Oe.DismissReason = Ue, Oe.version = "11.4.8";
|
|
2513
|
+
const Qe = Oe;
|
|
2514
|
+
return Qe.default = Qe, Qe;
|
|
2515
|
+
}), typeof Ae < "u" && Ae.Sweetalert2 && (Ae.swal = Ae.sweetAlert = Ae.Swal = Ae.SweetAlert = Ae.Sweetalert2);
|
|
2516
|
+
})(vn);
|
|
2517
|
+
var Is = vn.exports;
|
|
2518
|
+
const tn = /* @__PURE__ */ hn(Is);
|
|
2519
|
+
class Fs {
|
|
2456
2520
|
get IsVisible() {
|
|
2457
|
-
return
|
|
2521
|
+
return tn.isVisible();
|
|
2458
2522
|
}
|
|
2459
2523
|
async ConfirmAsync(o) {
|
|
2460
|
-
return new Promise((
|
|
2461
|
-
|
|
2524
|
+
return new Promise((f) => {
|
|
2525
|
+
tn.fire({
|
|
2462
2526
|
showCancelButton: !0,
|
|
2463
2527
|
allowEscapeKey: !1,
|
|
2464
2528
|
allowOutsideClick: !1,
|
|
@@ -2467,54 +2531,54 @@ class DialogService {
|
|
|
2467
2531
|
html: o.message,
|
|
2468
2532
|
confirmButtonText: o.confirmLabel ?? "confirmar",
|
|
2469
2533
|
cancelButtonText: o.rejectLabel ?? "cancelar"
|
|
2470
|
-
}).then((
|
|
2471
|
-
|
|
2534
|
+
}).then((y) => {
|
|
2535
|
+
f(y.isConfirmed === !0);
|
|
2472
2536
|
});
|
|
2473
2537
|
});
|
|
2474
2538
|
}
|
|
2475
2539
|
}
|
|
2476
|
-
const
|
|
2540
|
+
const Ls = new Fs(), Us = () => Ls, Ms = ["data-cor"], Os = /* @__PURE__ */ Te({
|
|
2477
2541
|
__name: "HeaderAvatar",
|
|
2478
|
-
setup(
|
|
2479
|
-
const o =
|
|
2480
|
-
async function
|
|
2542
|
+
setup(c) {
|
|
2543
|
+
const o = Us(), f = L();
|
|
2544
|
+
async function y() {
|
|
2481
2545
|
await o.ConfirmAsync({
|
|
2482
|
-
message: `${
|
|
2546
|
+
message: `${se.User.username} - ${se.User.name}.<br /><br />Você deseja sair da conta?`,
|
|
2483
2547
|
confirmLabel: "sair"
|
|
2484
|
-
}) &&
|
|
2548
|
+
}) && se.CallLogout();
|
|
2549
|
+
}
|
|
2550
|
+
function L() {
|
|
2551
|
+
const B = se.User.name;
|
|
2552
|
+
let M = "?";
|
|
2553
|
+
if (!B)
|
|
2554
|
+
return M;
|
|
2555
|
+
const h = B.split(" ").filter((W) => W.length > 0).map((W) => W[0].toUpperCase()), K = Math.min(2, h.length);
|
|
2556
|
+
return M = h.slice(0, K).join(""), M.length > 0 ? M : "?";
|
|
2485
2557
|
}
|
|
2486
2558
|
function k() {
|
|
2487
|
-
const
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
const x = y.split(" ").filter((U) => U.length > 0).map((U) => U[0].toUpperCase()), B = Math.min(2, x.length);
|
|
2492
|
-
return h = x.slice(0, B).join(""), h.length > 0 ? h : "?";
|
|
2493
|
-
}
|
|
2494
|
-
function l() {
|
|
2495
|
-
const y = u[0], h = y === "?" ? 0 : (y.charCodeAt(0) - 64) % 19;
|
|
2496
|
-
return Math.max(h, 0);
|
|
2497
|
-
}
|
|
2498
|
-
return (y, h) => (openBlock(), createElementBlock("div", {
|
|
2559
|
+
const B = f[0], M = B === "?" ? 0 : (B.charCodeAt(0) - 64) % 19;
|
|
2560
|
+
return Math.max(M, 0);
|
|
2561
|
+
}
|
|
2562
|
+
return (B, M) => (oe(), ve("div", {
|
|
2499
2563
|
id: "sf-header-avatar",
|
|
2500
|
-
"data-cor":
|
|
2501
|
-
onClick:
|
|
2502
|
-
},
|
|
2564
|
+
"data-cor": k(),
|
|
2565
|
+
onClick: y
|
|
2566
|
+
}, tt(Ee(f)), 9, Ms));
|
|
2503
2567
|
}
|
|
2504
|
-
}),
|
|
2568
|
+
}), Rs = {}, Hs = {
|
|
2505
2569
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2506
2570
|
height: "48",
|
|
2507
2571
|
viewBox: "0 -960 960 960",
|
|
2508
2572
|
width: "48",
|
|
2509
2573
|
class: "sf-svg-icon"
|
|
2510
|
-
},
|
|
2511
|
-
|
|
2574
|
+
}, js = /* @__PURE__ */ q("path", { d: "m307.231-83.463-54.999-55.23 343.923-343.922-343.923-343.539 54.999-54.614 398.153 398.153L307.231-83.462Z" }, null, -1), Ds = [
|
|
2575
|
+
js
|
|
2512
2576
|
];
|
|
2513
|
-
function
|
|
2514
|
-
return
|
|
2577
|
+
function Vs(c, o) {
|
|
2578
|
+
return oe(), ve("svg", Hs, Ds);
|
|
2515
2579
|
}
|
|
2516
|
-
const
|
|
2517
|
-
class
|
|
2580
|
+
const Ns = /* @__PURE__ */ dn(Rs, [["render", Vs]]);
|
|
2581
|
+
class $s {
|
|
2518
2582
|
get storedTheme() {
|
|
2519
2583
|
return localStorage.getItem("color-scheme");
|
|
2520
2584
|
}
|
|
@@ -2540,124 +2604,125 @@ class ThemeToggle {
|
|
|
2540
2604
|
this.EnableLightMode();
|
|
2541
2605
|
}
|
|
2542
2606
|
}
|
|
2543
|
-
const
|
|
2544
|
-
|
|
2545
|
-
],
|
|
2607
|
+
const wt = (() => new $s())(), qs = /* @__PURE__ */ Qr('<svg xmlns="http://www.w3.org/2000/svg" width="472.39" height="472.39" viewBox="0 0 472.39 472.39"><g class="toggle-sun"><path d="M403.21,167V69.18H305.38L236.2,0,167,69.18H69.18V167L0,236.2l69.18,69.18v97.83H167l69.18,69.18,69.18-69.18h97.83V305.38l69.18-69.18Zm-167,198.17a129,129,0,1,1,129-129A129,129,0,0,1,236.2,365.19Z"></path></g><g class="toggle-circle"><circle class="cls-1" cx="236.2" cy="236.2" r="103.78"></circle></g></svg>', 1), Ws = [
|
|
2608
|
+
qs
|
|
2609
|
+
], Ks = /* @__PURE__ */ Te({
|
|
2546
2610
|
__name: "ThemeToggle",
|
|
2547
|
-
setup(
|
|
2548
|
-
return (o,
|
|
2611
|
+
setup(c) {
|
|
2612
|
+
return (o, f) => (oe(), ve("button", {
|
|
2549
2613
|
id: "sf-theme-toggle",
|
|
2550
|
-
onClick:
|
|
2551
|
-
(...
|
|
2552
|
-
},
|
|
2614
|
+
onClick: f[0] || (f[0] = //@ts-ignore
|
|
2615
|
+
(...y) => Ee(wt).Toggle && Ee(wt).Toggle(...y))
|
|
2616
|
+
}, Ws));
|
|
2553
2617
|
}
|
|
2554
|
-
}),
|
|
2618
|
+
}), zs = { id: "sf-layout" }, Js = /* @__PURE__ */ q("div", { class: "sf-layout-menu-toggler-logo" }, null, -1), Ys = { class: "title" }, Xs = { class: "sf-layout-nav-header" }, Zs = /* @__PURE__ */ q("span", null, "Menu", -1), Gs = { class: "sf-layout-nav-content" }, Qs = /* @__PURE__ */ q("section", { id: "sf-layout-page-title" }, null, -1), ei = { id: "sf-layout-content" }, hi = /* @__PURE__ */ Te({
|
|
2555
2619
|
__name: "Layout",
|
|
2556
|
-
setup(
|
|
2557
|
-
const o =
|
|
2558
|
-
return (
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
class:
|
|
2620
|
+
setup(c) {
|
|
2621
|
+
const o = ln();
|
|
2622
|
+
return (f, y) => (oe(), ve("div", zs, [
|
|
2623
|
+
q("header", null, [
|
|
2624
|
+
q("div", {
|
|
2625
|
+
class: me([
|
|
2562
2626
|
"sf-layout-menu-toggler",
|
|
2563
|
-
{ invert:
|
|
2627
|
+
{ invert: Ee(o).IsVisible }
|
|
2564
2628
|
]),
|
|
2565
|
-
onClick:
|
|
2629
|
+
onClick: y[0] || (y[0] = (L) => Ee(o).Toggle())
|
|
2566
2630
|
}, [
|
|
2567
|
-
|
|
2568
|
-
|
|
2631
|
+
Js,
|
|
2632
|
+
We(Ns)
|
|
2569
2633
|
], 2),
|
|
2570
|
-
|
|
2571
|
-
|
|
2634
|
+
q("div", Ys, [
|
|
2635
|
+
Pe(f.$slots, "title")
|
|
2572
2636
|
]),
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2637
|
+
Pe(f.$slots, "action"),
|
|
2638
|
+
We(Ks),
|
|
2639
|
+
We(Os)
|
|
2576
2640
|
]),
|
|
2577
|
-
|
|
2578
|
-
class:
|
|
2641
|
+
q("nav", {
|
|
2642
|
+
class: me({ visible: Ee(o).IsVisible })
|
|
2579
2643
|
}, [
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2644
|
+
q("div", Xs, [
|
|
2645
|
+
Zs,
|
|
2646
|
+
We(fn, {
|
|
2583
2647
|
icone: "close",
|
|
2584
2648
|
button: "",
|
|
2585
|
-
onClick:
|
|
2649
|
+
onClick: y[1] || (y[1] = (L) => Ee(o).Close())
|
|
2586
2650
|
})
|
|
2587
2651
|
]),
|
|
2588
|
-
|
|
2589
|
-
|
|
2652
|
+
q("div", Gs, [
|
|
2653
|
+
Pe(f.$slots, "menu")
|
|
2590
2654
|
])
|
|
2591
2655
|
], 2),
|
|
2592
|
-
|
|
2593
|
-
class:
|
|
2656
|
+
q("main", {
|
|
2657
|
+
class: me({ "menu-visible": Ee(o).IsVisible })
|
|
2594
2658
|
}, [
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2659
|
+
Qs,
|
|
2660
|
+
q("section", ei, [
|
|
2661
|
+
Pe(f.$slots, "content")
|
|
2598
2662
|
])
|
|
2599
2663
|
], 2)
|
|
2600
2664
|
]));
|
|
2601
2665
|
}
|
|
2602
|
-
}),
|
|
2666
|
+
}), ti = ["href", "data-active", "onClick"], ni = { class: "sf-navmenulink-text" }, pi = /* @__PURE__ */ Te({
|
|
2603
2667
|
__name: "NavMenuLink",
|
|
2604
2668
|
props: {
|
|
2605
2669
|
href: {},
|
|
2606
2670
|
text: {},
|
|
2607
|
-
icon: {}
|
|
2671
|
+
icon: {},
|
|
2672
|
+
exact: { type: Boolean }
|
|
2608
2673
|
},
|
|
2609
|
-
setup(
|
|
2610
|
-
const o =
|
|
2611
|
-
function
|
|
2612
|
-
|
|
2613
|
-
const
|
|
2614
|
-
|
|
2615
|
-
}
|
|
2616
|
-
return (
|
|
2617
|
-
const
|
|
2618
|
-
return
|
|
2674
|
+
setup(c) {
|
|
2675
|
+
const o = c, f = ln();
|
|
2676
|
+
function y(L, k) {
|
|
2677
|
+
L.preventDefault();
|
|
2678
|
+
const M = L.target.closest(".sf-layout-nav-content");
|
|
2679
|
+
k(), M && M.clientWidth + 10 > document.body.clientWidth && f.Close();
|
|
2680
|
+
}
|
|
2681
|
+
return (L, k) => {
|
|
2682
|
+
const B = sn("router-link");
|
|
2683
|
+
return oe(), et(B, {
|
|
2619
2684
|
to: o.href,
|
|
2620
2685
|
custom: ""
|
|
2621
2686
|
}, {
|
|
2622
|
-
default:
|
|
2623
|
-
|
|
2687
|
+
default: an(({ href: M, navigate: h, isExactActive: K, isActive: W }) => [
|
|
2688
|
+
q("a", {
|
|
2624
2689
|
class: "sf-navmenulink",
|
|
2625
|
-
href:
|
|
2626
|
-
"data-active":
|
|
2627
|
-
onClick: (
|
|
2690
|
+
href: M,
|
|
2691
|
+
"data-active": o.exact ? K : W,
|
|
2692
|
+
onClick: (Y) => y(Y, h)
|
|
2628
2693
|
}, [
|
|
2629
|
-
o.icon ? (
|
|
2694
|
+
o.icon ? (oe(), et(fn, {
|
|
2630
2695
|
key: 0,
|
|
2631
2696
|
icone: o.icon,
|
|
2632
2697
|
"button-props": { tabindex: -1 }
|
|
2633
|
-
}, null, 8, ["icone"])) :
|
|
2634
|
-
|
|
2635
|
-
], 8,
|
|
2698
|
+
}, null, 8, ["icone"])) : rn("", !0),
|
|
2699
|
+
q("span", ni, tt(o.text), 1)
|
|
2700
|
+
], 8, ti)
|
|
2636
2701
|
]),
|
|
2637
2702
|
_: 1
|
|
2638
2703
|
}, 8, ["to"]);
|
|
2639
2704
|
};
|
|
2640
2705
|
}
|
|
2641
|
-
}),
|
|
2706
|
+
}), oi = /* @__PURE__ */ Te({
|
|
2642
2707
|
__name: "ScrollToTop",
|
|
2643
|
-
setup(
|
|
2644
|
-
const o =
|
|
2645
|
-
let
|
|
2646
|
-
function
|
|
2647
|
-
|
|
2648
|
-
}
|
|
2649
|
-
return
|
|
2650
|
-
var
|
|
2651
|
-
|
|
2708
|
+
setup(c) {
|
|
2709
|
+
const o = Ye(!1), f = `--${+/* @__PURE__ */ new Date()}`;
|
|
2710
|
+
let y = null;
|
|
2711
|
+
function L() {
|
|
2712
|
+
y == null || y.scrollTo(0, 0);
|
|
2713
|
+
}
|
|
2714
|
+
return cn(() => {
|
|
2715
|
+
var k;
|
|
2716
|
+
y = ((k = document.getElementById(f)) == null ? void 0 : k.parentElement) ?? null, y && y.addEventListener("scroll", function() {
|
|
2652
2717
|
o.value = this.scrollTop - this.clientHeight > 0;
|
|
2653
2718
|
});
|
|
2654
|
-
}), (
|
|
2655
|
-
id:
|
|
2656
|
-
class:
|
|
2657
|
-
onClick:
|
|
2719
|
+
}), (k, B) => (oe(), ve("button", {
|
|
2720
|
+
id: f,
|
|
2721
|
+
class: me(["sf-scrollToTop", { "sf-scrollToTop-visible": o.value }]),
|
|
2722
|
+
onClick: L
|
|
2658
2723
|
}, null, 2));
|
|
2659
2724
|
}
|
|
2660
|
-
}),
|
|
2725
|
+
}), gi = /* @__PURE__ */ Te({
|
|
2661
2726
|
__name: "Content",
|
|
2662
2727
|
props: {
|
|
2663
2728
|
class: {},
|
|
@@ -2666,43 +2731,43 @@ const ThemeToggleBase = (() => new ThemeToggle())(), _hoisted_1$3 = /* @__PURE__
|
|
|
2666
2731
|
disableHeaderPadding: { type: Boolean },
|
|
2667
2732
|
disableFooterPadding: { type: Boolean }
|
|
2668
2733
|
},
|
|
2669
|
-
setup(
|
|
2670
|
-
const o =
|
|
2671
|
-
function u() {
|
|
2672
|
-
return new CssClassBuilder("sf-content").AddClass(o.class, !!o.class).Build();
|
|
2673
|
-
}
|
|
2734
|
+
setup(c) {
|
|
2735
|
+
const o = c;
|
|
2674
2736
|
function f() {
|
|
2675
|
-
return new
|
|
2737
|
+
return new ze("sf-content").AddClass(o.class, !!o.class).Build();
|
|
2676
2738
|
}
|
|
2677
|
-
function
|
|
2678
|
-
return new
|
|
2739
|
+
function y() {
|
|
2740
|
+
return new ze("sf-content-body").AddClass("sf-content-no-padding", o.disableBodyPadding).Build();
|
|
2679
2741
|
}
|
|
2680
|
-
function
|
|
2681
|
-
return new
|
|
2742
|
+
function L() {
|
|
2743
|
+
return new ze("sf-content-header").AddClass("sf-content-no-padding", o.disableHeaderPadding).Build();
|
|
2744
|
+
}
|
|
2745
|
+
function k() {
|
|
2746
|
+
return new ze("sf-content-footer").AddClass("sf-content-no-padding", o.disableFooterPadding).Build();
|
|
2682
2747
|
}
|
|
2683
|
-
return (
|
|
2684
|
-
class:
|
|
2685
|
-
style:
|
|
2748
|
+
return (B, M) => (oe(), ve("div", {
|
|
2749
|
+
class: me(f()),
|
|
2750
|
+
style: nn(o.style)
|
|
2686
2751
|
}, [
|
|
2687
|
-
|
|
2688
|
-
class:
|
|
2752
|
+
q("div", {
|
|
2753
|
+
class: me(L())
|
|
2689
2754
|
}, [
|
|
2690
|
-
|
|
2755
|
+
Pe(B.$slots, "header")
|
|
2691
2756
|
], 2),
|
|
2692
|
-
|
|
2693
|
-
class:
|
|
2757
|
+
q("div", {
|
|
2758
|
+
class: me(y())
|
|
2694
2759
|
}, [
|
|
2695
|
-
|
|
2696
|
-
|
|
2760
|
+
Pe(B.$slots, "default"),
|
|
2761
|
+
We(oi)
|
|
2697
2762
|
], 2),
|
|
2698
|
-
|
|
2699
|
-
class:
|
|
2763
|
+
q("div", {
|
|
2764
|
+
class: me(k())
|
|
2700
2765
|
}, [
|
|
2701
|
-
|
|
2766
|
+
Pe(B.$slots, "footer")
|
|
2702
2767
|
], 2)
|
|
2703
2768
|
], 6));
|
|
2704
2769
|
}
|
|
2705
|
-
}),
|
|
2770
|
+
}), ri = { class: "sf-tab-navigation" }, si = /* @__PURE__ */ q("svg", {
|
|
2706
2771
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2707
2772
|
fill: "none",
|
|
2708
2773
|
viewBox: "0 0 24 24",
|
|
@@ -2710,14 +2775,14 @@ const ThemeToggleBase = (() => new ThemeToggle())(), _hoisted_1$3 = /* @__PURE__
|
|
|
2710
2775
|
stroke: "currentColor",
|
|
2711
2776
|
class: "w-6 h-6"
|
|
2712
2777
|
}, [
|
|
2713
|
-
/* @__PURE__ */
|
|
2778
|
+
/* @__PURE__ */ q("path", {
|
|
2714
2779
|
"stroke-linecap": "round",
|
|
2715
2780
|
"stroke-linejoin": "round",
|
|
2716
2781
|
d: "M15.75 19.5L8.25 12l7.5-7.5"
|
|
2717
2782
|
})
|
|
2718
|
-
], -1),
|
|
2719
|
-
|
|
2720
|
-
],
|
|
2783
|
+
], -1), ii = [
|
|
2784
|
+
si
|
|
2785
|
+
], ai = ["data-active"], ci = ["href", "onClick"], li = /* @__PURE__ */ q("svg", {
|
|
2721
2786
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2722
2787
|
fill: "none",
|
|
2723
2788
|
viewBox: "0 0 24 24",
|
|
@@ -2725,86 +2790,86 @@ const ThemeToggleBase = (() => new ThemeToggle())(), _hoisted_1$3 = /* @__PURE__
|
|
|
2725
2790
|
stroke: "currentColor",
|
|
2726
2791
|
class: "w-6 h-6"
|
|
2727
2792
|
}, [
|
|
2728
|
-
/* @__PURE__ */
|
|
2793
|
+
/* @__PURE__ */ q("path", {
|
|
2729
2794
|
"stroke-linecap": "round",
|
|
2730
2795
|
"stroke-linejoin": "round",
|
|
2731
2796
|
d: "M8.25 4.5l7.5 7.5-7.5 7.5"
|
|
2732
2797
|
})
|
|
2733
|
-
], -1),
|
|
2734
|
-
|
|
2735
|
-
],
|
|
2798
|
+
], -1), ui = [
|
|
2799
|
+
li
|
|
2800
|
+
], mi = /* @__PURE__ */ Te({
|
|
2736
2801
|
__name: "TabNavigation",
|
|
2737
2802
|
props: {
|
|
2738
2803
|
tabs: {}
|
|
2739
2804
|
},
|
|
2740
|
-
setup(
|
|
2741
|
-
const o =
|
|
2742
|
-
|
|
2743
|
-
}),
|
|
2744
|
-
function
|
|
2745
|
-
const
|
|
2746
|
-
|
|
2747
|
-
}
|
|
2748
|
-
function
|
|
2749
|
-
const
|
|
2750
|
-
|
|
2751
|
-
}
|
|
2752
|
-
return
|
|
2753
|
-
|
|
2754
|
-
}),
|
|
2755
|
-
var
|
|
2805
|
+
setup(c) {
|
|
2806
|
+
const o = c, f = Ye(null), y = new ResizeObserver((h) => {
|
|
2807
|
+
M();
|
|
2808
|
+
}), L = Ye(!1), k = Ye(!1);
|
|
2809
|
+
function B(h = !1) {
|
|
2810
|
+
const K = f.value.clientWidth;
|
|
2811
|
+
f.value.scrollLeft += h ? -K : K;
|
|
2812
|
+
}
|
|
2813
|
+
function M() {
|
|
2814
|
+
const h = f.value.scrollWidth - f.value.clientWidth;
|
|
2815
|
+
L.value = f.value.scrollLeft > 10, k.value = f.value.scrollLeft < h - 10;
|
|
2816
|
+
}
|
|
2817
|
+
return cn(() => {
|
|
2818
|
+
f.value.addEventListener("scroll", M), y.observe(f.value);
|
|
2819
|
+
}), es(() => {
|
|
2820
|
+
var h;
|
|
2756
2821
|
try {
|
|
2757
|
-
(
|
|
2822
|
+
(h = f.value) == null || h.removeEventListener(
|
|
2758
2823
|
"scroll",
|
|
2759
|
-
|
|
2760
|
-
),
|
|
2824
|
+
M
|
|
2825
|
+
), y.unobserve(f.value), y.disconnect();
|
|
2761
2826
|
} catch {
|
|
2762
2827
|
}
|
|
2763
|
-
}), (
|
|
2764
|
-
const
|
|
2765
|
-
return
|
|
2766
|
-
|
|
2767
|
-
class:
|
|
2768
|
-
onClick:
|
|
2769
|
-
},
|
|
2770
|
-
|
|
2828
|
+
}), (h, K) => {
|
|
2829
|
+
const W = sn("RouterLink");
|
|
2830
|
+
return oe(), ve("div", ri, [
|
|
2831
|
+
q("div", {
|
|
2832
|
+
class: me(["left-arrow", { active: L.value }]),
|
|
2833
|
+
onClick: K[0] || (K[0] = (Y) => B(!0))
|
|
2834
|
+
}, ii, 2),
|
|
2835
|
+
q("ul", {
|
|
2771
2836
|
ref_key: "trackerContainer",
|
|
2772
|
-
ref:
|
|
2837
|
+
ref: f
|
|
2773
2838
|
}, [
|
|
2774
|
-
(
|
|
2775
|
-
to:
|
|
2839
|
+
(oe(!0), ve(on, null, ts(o.tabs, (Y) => (oe(), et(W, {
|
|
2840
|
+
to: Y.route,
|
|
2776
2841
|
custom: !0
|
|
2777
2842
|
}, {
|
|
2778
|
-
default:
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
item:
|
|
2782
|
-
navigate:
|
|
2783
|
-
isActive:
|
|
2843
|
+
default: an(({ navigate: ae, isActive: V }) => [
|
|
2844
|
+
q("li", { "data-active": V }, [
|
|
2845
|
+
Pe(h.$slots, "item", {
|
|
2846
|
+
item: Y,
|
|
2847
|
+
navigate: ae,
|
|
2848
|
+
isActive: V
|
|
2784
2849
|
}, () => [
|
|
2785
|
-
|
|
2786
|
-
href:
|
|
2787
|
-
class:
|
|
2788
|
-
onClick:
|
|
2789
|
-
},
|
|
2850
|
+
q("a", {
|
|
2851
|
+
href: Y.route,
|
|
2852
|
+
class: me({ active: V }),
|
|
2853
|
+
onClick: ae
|
|
2854
|
+
}, tt(Y.text), 11, ci)
|
|
2790
2855
|
])
|
|
2791
|
-
], 8,
|
|
2856
|
+
], 8, ai)
|
|
2792
2857
|
]),
|
|
2793
2858
|
_: 2
|
|
2794
2859
|
}, 1032, ["to"]))), 256))
|
|
2795
2860
|
], 512),
|
|
2796
|
-
|
|
2797
|
-
class:
|
|
2798
|
-
onClick:
|
|
2799
|
-
},
|
|
2861
|
+
q("div", {
|
|
2862
|
+
class: me(["right-arrow", { active: k.value }]),
|
|
2863
|
+
onClick: K[1] || (K[1] = (Y) => B())
|
|
2864
|
+
}, ui, 2)
|
|
2800
2865
|
]);
|
|
2801
2866
|
};
|
|
2802
2867
|
}
|
|
2803
2868
|
});
|
|
2804
|
-
class
|
|
2869
|
+
class vi {
|
|
2805
2870
|
constructor(o = null) {
|
|
2806
|
-
|
|
2807
|
-
|
|
2871
|
+
qe(this, "errors", []);
|
|
2872
|
+
qe(this, "_value", null);
|
|
2808
2873
|
this._value = o;
|
|
2809
2874
|
}
|
|
2810
2875
|
get value() {
|
|
@@ -2823,35 +2888,34 @@ class AppResult {
|
|
|
2823
2888
|
this.errors.push(o);
|
|
2824
2889
|
}
|
|
2825
2890
|
}
|
|
2826
|
-
const tema = "", componentes = "";
|
|
2827
2891
|
(() => {
|
|
2828
|
-
function
|
|
2829
|
-
|
|
2892
|
+
function c() {
|
|
2893
|
+
ns(() => {
|
|
2830
2894
|
setTimeout(() => {
|
|
2831
|
-
var
|
|
2895
|
+
var f;
|
|
2832
2896
|
const o = document.querySelector(":root");
|
|
2833
2897
|
o && // @ts-ignore
|
|
2834
2898
|
o.style.setProperty(
|
|
2835
2899
|
"--window-height",
|
|
2836
|
-
`${((
|
|
2900
|
+
`${((f = window.visualViewport) == null ? void 0 : f.height) ?? window.innerHeight}px`
|
|
2837
2901
|
);
|
|
2838
2902
|
}, 1);
|
|
2839
2903
|
});
|
|
2840
2904
|
}
|
|
2841
|
-
|
|
2905
|
+
c(), window.addEventListener("resize", c);
|
|
2842
2906
|
})();
|
|
2843
|
-
|
|
2907
|
+
wt.SetInitialTheme();
|
|
2844
2908
|
export {
|
|
2845
|
-
AppResult,
|
|
2846
|
-
AuthService,
|
|
2847
|
-
Cor,
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
Tamanho,
|
|
2854
|
-
UseDialogService,
|
|
2855
|
-
UseNavMenuService
|
|
2909
|
+
vi as AppResult,
|
|
2910
|
+
se as AuthService,
|
|
2911
|
+
un as Cor,
|
|
2912
|
+
gi as SfContent,
|
|
2913
|
+
fn as SfIcon,
|
|
2914
|
+
hi as SfLayout,
|
|
2915
|
+
pi as SfNavMenuLink,
|
|
2916
|
+
mi as SfTabNavigation,
|
|
2917
|
+
Ke as Tamanho,
|
|
2918
|
+
Us as UseDialogService,
|
|
2919
|
+
ln as UseNavMenuService
|
|
2856
2920
|
};
|
|
2857
2921
|
//# sourceMappingURL=lib.es.js.map
|