@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/lib.es.js CHANGED
@@ -1,10 +1,10 @@
1
- var ur = Object.defineProperty;
2
- var dr = (a, o, u) => o in a ? ur(a, o, { enumerable: !0, configurable: !0, writable: !0, value: u }) : a[o] = u;
3
- var Ie = (a, o, u) => (dr(a, typeof o != "symbol" ? o + "" : o, u), u);
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 NavMenuService {
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
- Ie(this, "_visible", ref(!1));
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 LkNavMenuService = new NavMenuService(), UseNavMenuService = () => LkNavMenuService;
23
- var Cor = /* @__PURE__ */ ((a) => (a.Primary = "primary", a.Secondary = "secondary", a.Info = "info", a.Success = "success", a.Help = "help", a.Warn = "warn", a.Error = "error", a))(Cor || {}), Tamanho = /* @__PURE__ */ ((a) => (a.Pequeno = "sm", a.Medio = "md", a.Grande = "lg", a))(Tamanho || {});
24
- const _export_sfc = (a, o) => {
25
- const u = a.__vccOpts || a;
26
- for (const [f, k] of o)
27
- u[f] = k;
28
- return u;
29
- }, _sfc_main$9 = {}, _hoisted_1$7 = { class: "sf-loading-circle" }, _hoisted_2$6 = /* @__PURE__ */ createElementVNode("div", null, [
30
- /* @__PURE__ */ createElementVNode("svg", { viewBox: "25 25 50 50" }, [
31
- /* @__PURE__ */ createElementVNode("circle", {
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), _hoisted_3$3 = [
41
- _hoisted_2$6
40
+ ], -1), cs = [
41
+ as
42
42
  ];
43
- function _sfc_render$1(a, o) {
44
- return openBlock(), createElementBlock("div", _hoisted_1$7, _hoisted_3$3);
43
+ function ls(c, o) {
44
+ return oe(), ve("div", is, cs);
45
45
  }
46
- const LoadingCircle = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$1]]);
47
- class CssClassBuilder {
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
- Ie(this, "retorno");
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, u = !0) {
71
- return u ? this.Concat(o) : this;
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 _hoisted_1$6 = ["disabled", "tabindex"], _hoisted_2$5 = ["data-color"], _sfc_main$8 = /* @__PURE__ */ defineComponent({
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: Tamanho.Medio },
91
+ tamanho: { default: Ke.Medio },
92
92
  dot: { type: Boolean },
93
- dotColor: { default: Cor.Error },
93
+ dotColor: { default: un.Error },
94
94
  buttonProps: {}
95
95
  },
96
- setup(a) {
97
- const o = a;
98
- function u() {
99
- return new CssClassBuilder(`${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 === Tamanho.Pequeno).AddClass("sf-icon-medium", o.tamanho === Tamanho.Medio).AddClass("sf-icon-large", o.tamanho === Tamanho.Grande).AddClass("sf-ripple", o.button === !0).Build();
100
- }
101
- return (f, k) => (openBlock(), createElementBlock("div", {
102
- style: normalizeStyle(o.style),
103
- class: normalizeClass(u())
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
- createElementVNode("button", mergeProps({
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 ? (openBlock(), createBlock(LoadingCircle, { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
112
- createTextVNode(toDisplayString(o.icone), 1)
111
+ o.loading ? (oe(), et(us, { key: 0 })) : (oe(), ve(on, { key: 1 }, [
112
+ Gr(tt(o.icone), 1)
113
113
  ], 64))
114
- ], 16, _hoisted_1$6),
115
- o.dot ? (openBlock(), createElementBlock("span", {
114
+ ], 16, ds),
115
+ o.dot ? (oe(), ve("span", {
116
116
  key: 0,
117
117
  "data-color": o.dotColor
118
- }, null, 8, _hoisted_2$5)) : createCommentVNode("", !0)
118
+ }, null, 8, fs)) : rn("", !0)
119
119
  ], 6));
120
120
  }
121
121
  });
122
- var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
123
- function getDefaultExportFromCjs(a) {
124
- return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
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
- var base64Js = {};
127
- base64Js.byteLength = byteLength;
128
- base64Js.toByteArray = toByteArray;
129
- base64Js.fromByteArray = fromByteArray;
130
- var lookup = [], revLookup = [], Arr = typeof Uint8Array < "u" ? Uint8Array : Array, code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
131
- for (var i = 0, len = code.length; i < len; ++i)
132
- lookup[i] = code[i], revLookup[code.charCodeAt(i)] = i;
133
- revLookup["-".charCodeAt(0)] = 62;
134
- revLookup["_".charCodeAt(0)] = 63;
135
- function getLens(a) {
136
- var o = a.length;
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 u = a.indexOf("=");
140
- u === -1 && (u = o);
141
- var f = u === o ? 0 : 4 - u % 4;
142
- return [u, f];
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 byteLength(a) {
145
- var o = getLens(a), u = o[0], f = o[1];
146
- return (u + f) * 3 / 4 - f;
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 _byteLength(a, o, u) {
149
- return (o + u) * 3 / 4 - u;
169
+ function vs(c, o, f) {
170
+ return (o + f) * 3 / 4 - f;
150
171
  }
151
- function toByteArray(a) {
152
- var o, u = getLens(a), f = u[0], k = u[1], l = new Arr(_byteLength(a, f, k)), y = 0, h = k > 0 ? f - 4 : f, x;
153
- for (x = 0; x < h; x += 4)
154
- o = revLookup[a.charCodeAt(x)] << 18 | revLookup[a.charCodeAt(x + 1)] << 12 | revLookup[a.charCodeAt(x + 2)] << 6 | revLookup[a.charCodeAt(x + 3)], l[y++] = o >> 16 & 255, l[y++] = o >> 8 & 255, l[y++] = o & 255;
155
- return k === 2 && (o = revLookup[a.charCodeAt(x)] << 2 | revLookup[a.charCodeAt(x + 1)] >> 4, l[y++] = o & 255), k === 1 && (o = revLookup[a.charCodeAt(x)] << 10 | revLookup[a.charCodeAt(x + 1)] << 4 | revLookup[a.charCodeAt(x + 2)] >> 2, l[y++] = o >> 8 & 255, l[y++] = o & 255), l;
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 tripletToBase64(a) {
158
- return lookup[a >> 18 & 63] + lookup[a >> 12 & 63] + lookup[a >> 6 & 63] + lookup[a & 63];
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 encodeChunk(a, o, u) {
161
- for (var f, k = [], l = o; l < u; l += 3)
162
- f = (a[l] << 16 & 16711680) + (a[l + 1] << 8 & 65280) + (a[l + 2] & 255), k.push(tripletToBase64(f));
163
- return k.join("");
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 fromByteArray(a) {
166
- for (var o, u = a.length, f = u % 3, k = [], l = 16383, y = 0, h = u - f; y < h; y += l)
167
- k.push(encodeChunk(a, y, y + l > h ? h : y + l));
168
- return f === 1 ? (o = a[u - 1], k.push(
169
- lookup[o >> 2] + lookup[o << 4 & 63] + "=="
170
- )) : f === 2 && (o = (a[u - 2] << 8) + a[u - 1], k.push(
171
- lookup[o >> 10] + lookup[o >> 4 & 63] + lookup[o << 2 & 63] + "="
172
- )), k.join("");
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 sha256$1 = { exports: {} };
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.9.0
203
+ * @version 0.10.1
179
204
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
180
- * @copyright Chen, Yi-Cyuan 2014-2017
205
+ * @copyright Chen, Yi-Cyuan 2014-2023
181
206
  * @license MIT
182
207
  */
183
- (function(module) {
208
+ (function(c) {
184
209
  (function() {
185
- var ERROR = "input is invalid type", WINDOW = typeof window == "object", root = WINDOW ? window : {};
186
- root.JS_SHA256_NO_WINDOW && (WINDOW = !1);
187
- var WEB_WORKER = !WINDOW && typeof self == "object", NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process == "object" && process.versions && process.versions.node;
188
- NODE_JS ? root = commonjsGlobal : WEB_WORKER && (root = self);
189
- var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && !0 && module.exports, ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer < "u", HEX_CHARS = "0123456789abcdef".split(""), EXTRA = [-2147483648, 8388608, 32768, 128], SHIFT = [24, 16, 8, 0], K = [
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
- ], OUTPUT_TYPES = ["hex", "array", "digest", "arrayBuffer"], blocks = [];
255
- (root.JS_SHA256_NO_NODE_JS || !Array.isArray) && (Array.isArray = function(a) {
256
- return Object.prototype.toString.call(a) === "[object Array]";
257
- }), ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView) && (ArrayBuffer.isView = function(a) {
258
- return typeof a == "object" && a.buffer && a.buffer.constructor === ArrayBuffer;
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 createOutputMethod = function(a, o) {
261
- return function(u) {
262
- return new Sha256(o, !0).update(u)[a]();
285
+ var Se = function(u, x) {
286
+ return function(I) {
287
+ return new z(x, !0).update(I)[u]();
263
288
  };
264
- }, createMethod = function(a) {
265
- var o = createOutputMethod("hex", a);
266
- NODE_JS && (o = nodeWrap(o, a)), o.create = function() {
267
- return new Sha256(a);
268
- }, o.update = function(k) {
269
- return o.create().update(k);
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 u = 0; u < OUTPUT_TYPES.length; ++u) {
272
- var f = OUTPUT_TYPES[u];
273
- o[f] = createOutputMethod(f, a);
296
+ for (var I = 0; I < ae.length; ++I) {
297
+ var C = ae[I];
298
+ x[C] = Se(C, u);
274
299
  }
275
- return o;
276
- }, nodeWrap = function(method, is224) {
277
- var crypto = eval("require('crypto')"), Buffer = eval("require('buffer').Buffer"), algorithm = is224 ? "sha224" : "sha256", nodeMethod = function(a) {
278
- if (typeof a == "string")
279
- return crypto.createHash(algorithm).update(a, "utf8").digest("hex");
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
- return nodeMethod;
285
- }, createHmacOutputMethod = function(a, o) {
286
- return function(u, f) {
287
- return new HmacSha256(u, o, !0).update(f)[a]();
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
- }, createHmacMethod = function(a) {
290
- var o = createHmacOutputMethod("hex", a);
291
- o.create = function(k) {
292
- return new HmacSha256(k, a);
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
- for (var u = 0; u < OUTPUT_TYPES.length; ++u) {
297
- var f = OUTPUT_TYPES[u];
298
- o[f] = createHmacOutputMethod(f, a);
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 o;
329
+ return x;
301
330
  };
302
- function Sha256(a, o) {
303
- o ? (blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0, this.blocks = blocks) : this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], a ? (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 = a;
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
- Sha256.prototype.update = function(a) {
334
+ z.prototype.update = function(u) {
306
335
  if (!this.finalized) {
307
- var o, u = typeof a;
308
- if (u !== "string") {
309
- if (u === "object") {
310
- if (a === null)
311
- throw new Error(ERROR);
312
- if (ARRAY_BUFFER && a.constructor === ArrayBuffer)
313
- a = new Uint8Array(a);
314
- else if (!Array.isArray(a) && (!ARRAY_BUFFER || !ArrayBuffer.isView(a)))
315
- throw new Error(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(ERROR);
318
- o = !0;
346
+ throw new Error(o);
347
+ x = !0;
319
348
  }
320
- for (var f, k = 0, l, y = a.length, h = this.blocks; k < y; ) {
321
- if (this.hashed && (this.hashed = !1, h[0] = this.block, h[16] = h[1] = h[2] = h[3] = h[4] = h[5] = h[6] = h[7] = h[8] = h[9] = h[10] = h[11] = h[12] = h[13] = h[14] = h[15] = 0), o)
322
- for (l = this.start; k < y && l < 64; ++k)
323
- h[l >> 2] |= a[k] << SHIFT[l++ & 3];
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 (l = this.start; k < y && l < 64; ++k)
326
- f = a.charCodeAt(k), f < 128 ? h[l >> 2] |= f << SHIFT[l++ & 3] : f < 2048 ? (h[l >> 2] |= (192 | f >> 6) << SHIFT[l++ & 3], h[l >> 2] |= (128 | f & 63) << SHIFT[l++ & 3]) : f < 55296 || f >= 57344 ? (h[l >> 2] |= (224 | f >> 12) << SHIFT[l++ & 3], h[l >> 2] |= (128 | f >> 6 & 63) << SHIFT[l++ & 3], h[l >> 2] |= (128 | f & 63) << SHIFT[l++ & 3]) : (f = 65536 + ((f & 1023) << 10 | a.charCodeAt(++k) & 1023), h[l >> 2] |= (240 | f >> 18) << SHIFT[l++ & 3], h[l >> 2] |= (128 | f >> 12 & 63) << SHIFT[l++ & 3], h[l >> 2] |= (128 | f >> 6 & 63) << SHIFT[l++ & 3], h[l >> 2] |= (128 | f & 63) << SHIFT[l++ & 3]);
327
- this.lastByteIndex = l, this.bytes += l - this.start, l >= 64 ? (this.block = h[16], this.start = l - 64, this.hash(), this.hashed = !0) : this.start = l;
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
- }, Sha256.prototype.finalize = function() {
360
+ }, z.prototype.finalize = function() {
332
361
  if (!this.finalized) {
333
362
  this.finalized = !0;
334
- var a = this.blocks, o = this.lastByteIndex;
335
- a[16] = this.block, a[o >> 2] |= EXTRA[o & 3], this.block = a[16], o >= 56 && (this.hashed || this.hash(), a[0] = this.block, a[16] = a[1] = a[2] = a[3] = a[4] = a[5] = a[6] = a[7] = a[8] = a[9] = a[10] = a[11] = a[12] = a[13] = a[14] = a[15] = 0), a[14] = this.hBytes << 3 | this.bytes >>> 29, a[15] = this.bytes << 3, this.hash();
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
- }, Sha256.prototype.hash = function() {
338
- var a = this.h0, o = this.h1, u = this.h2, f = this.h3, k = this.h4, l = this.h5, y = this.h6, h = this.h7, x = this.blocks, B, U, R, V, T, J, D, j, he, Q, ie;
339
- for (B = 16; B < 64; ++B)
340
- T = x[B - 15], U = (T >>> 7 | T << 25) ^ (T >>> 18 | T << 14) ^ T >>> 3, T = x[B - 2], R = (T >>> 17 | T << 15) ^ (T >>> 19 | T << 13) ^ T >>> 10, x[B] = x[B - 16] + U + x[B - 7] + R << 0;
341
- for (ie = o & u, B = 0; B < 64; B += 4)
342
- this.first ? (this.is224 ? (j = 300032, T = x[0] - 1413257819, h = T - 150054599 << 0, f = T + 24177077 << 0) : (j = 704751109, T = x[0] - 210244248, h = T - 1521486534 << 0, f = T + 143694565 << 0), this.first = !1) : (U = (a >>> 2 | a << 30) ^ (a >>> 13 | a << 19) ^ (a >>> 22 | a << 10), R = (k >>> 6 | k << 26) ^ (k >>> 11 | k << 21) ^ (k >>> 25 | k << 7), j = a & o, V = j ^ a & u ^ ie, D = k & l ^ ~k & y, T = h + R + D + K[B] + x[B], J = U + V, h = f + T << 0, f = T + J << 0), U = (f >>> 2 | f << 30) ^ (f >>> 13 | f << 19) ^ (f >>> 22 | f << 10), R = (h >>> 6 | h << 26) ^ (h >>> 11 | h << 21) ^ (h >>> 25 | h << 7), he = f & a, V = he ^ f & o ^ j, D = h & k ^ ~h & l, T = y + R + D + K[B + 1] + x[B + 1], J = U + V, y = u + T << 0, u = T + J << 0, U = (u >>> 2 | u << 30) ^ (u >>> 13 | u << 19) ^ (u >>> 22 | u << 10), R = (y >>> 6 | y << 26) ^ (y >>> 11 | y << 21) ^ (y >>> 25 | y << 7), Q = u & f, V = Q ^ u & a ^ he, D = y & h ^ ~y & k, T = l + R + D + K[B + 2] + x[B + 2], J = U + V, l = o + T << 0, o = T + J << 0, U = (o >>> 2 | o << 30) ^ (o >>> 13 | o << 19) ^ (o >>> 22 | o << 10), R = (l >>> 6 | l << 26) ^ (l >>> 11 | l << 21) ^ (l >>> 25 | l << 7), ie = o & u, V = ie ^ o & f ^ Q, D = l & y ^ ~l & h, T = k + R + D + K[B + 3] + x[B + 3], J = U + V, k = a + T << 0, a = T + J << 0;
343
- this.h0 = this.h0 + a << 0, this.h1 = this.h1 + o << 0, this.h2 = this.h2 + u << 0, this.h3 = this.h3 + f << 0, this.h4 = this.h4 + k << 0, this.h5 = this.h5 + l << 0, this.h6 = this.h6 + y << 0, this.h7 = this.h7 + h << 0;
344
- }, Sha256.prototype.hex = function() {
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 a = this.h0, o = this.h1, u = this.h2, f = this.h3, k = this.h4, l = this.h5, y = this.h6, h = this.h7, x = HEX_CHARS[a >> 28 & 15] + HEX_CHARS[a >> 24 & 15] + HEX_CHARS[a >> 20 & 15] + HEX_CHARS[a >> 16 & 15] + HEX_CHARS[a >> 12 & 15] + HEX_CHARS[a >> 8 & 15] + HEX_CHARS[a >> 4 & 15] + HEX_CHARS[a & 15] + HEX_CHARS[o >> 28 & 15] + HEX_CHARS[o >> 24 & 15] + HEX_CHARS[o >> 20 & 15] + HEX_CHARS[o >> 16 & 15] + HEX_CHARS[o >> 12 & 15] + HEX_CHARS[o >> 8 & 15] + HEX_CHARS[o >> 4 & 15] + HEX_CHARS[o & 15] + HEX_CHARS[u >> 28 & 15] + HEX_CHARS[u >> 24 & 15] + HEX_CHARS[u >> 20 & 15] + HEX_CHARS[u >> 16 & 15] + HEX_CHARS[u >> 12 & 15] + HEX_CHARS[u >> 8 & 15] + HEX_CHARS[u >> 4 & 15] + HEX_CHARS[u & 15] + HEX_CHARS[f >> 28 & 15] + HEX_CHARS[f >> 24 & 15] + HEX_CHARS[f >> 20 & 15] + HEX_CHARS[f >> 16 & 15] + HEX_CHARS[f >> 12 & 15] + HEX_CHARS[f >> 8 & 15] + HEX_CHARS[f >> 4 & 15] + HEX_CHARS[f & 15] + HEX_CHARS[k >> 28 & 15] + HEX_CHARS[k >> 24 & 15] + HEX_CHARS[k >> 20 & 15] + HEX_CHARS[k >> 16 & 15] + HEX_CHARS[k >> 12 & 15] + HEX_CHARS[k >> 8 & 15] + HEX_CHARS[k >> 4 & 15] + HEX_CHARS[k & 15] + HEX_CHARS[l >> 28 & 15] + HEX_CHARS[l >> 24 & 15] + HEX_CHARS[l >> 20 & 15] + HEX_CHARS[l >> 16 & 15] + HEX_CHARS[l >> 12 & 15] + HEX_CHARS[l >> 8 & 15] + HEX_CHARS[l >> 4 & 15] + HEX_CHARS[l & 15] + HEX_CHARS[y >> 28 & 15] + HEX_CHARS[y >> 24 & 15] + HEX_CHARS[y >> 20 & 15] + HEX_CHARS[y >> 16 & 15] + HEX_CHARS[y >> 12 & 15] + HEX_CHARS[y >> 8 & 15] + HEX_CHARS[y >> 4 & 15] + HEX_CHARS[y & 15];
347
- return this.is224 || (x += HEX_CHARS[h >> 28 & 15] + HEX_CHARS[h >> 24 & 15] + HEX_CHARS[h >> 20 & 15] + HEX_CHARS[h >> 16 & 15] + HEX_CHARS[h >> 12 & 15] + HEX_CHARS[h >> 8 & 15] + HEX_CHARS[h >> 4 & 15] + HEX_CHARS[h & 15]), x;
348
- }, Sha256.prototype.toString = Sha256.prototype.hex, Sha256.prototype.digest = function() {
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 a = this.h0, o = this.h1, u = this.h2, f = this.h3, k = this.h4, l = this.h5, y = this.h6, h = this.h7, x = [
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
- f >> 24 & 255,
364
- f >> 16 & 255,
365
- f >> 8 & 255,
366
- f & 255,
367
- k >> 24 & 255,
368
- k >> 16 & 255,
369
- k >> 8 & 255,
370
- k & 255,
371
- l >> 24 & 255,
372
- l >> 16 & 255,
373
- l >> 8 & 255,
374
- l & 255,
375
- y >> 24 & 255,
376
- y >> 16 & 255,
377
- y >> 8 & 255,
378
- y & 255
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 || x.push(h >> 24 & 255, h >> 16 & 255, h >> 8 & 255, h & 255), x;
381
- }, Sha256.prototype.array = Sha256.prototype.digest, Sha256.prototype.arrayBuffer = function() {
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 a = new ArrayBuffer(this.is224 ? 28 : 32), o = new DataView(a);
384
- return o.setUint32(0, this.h0), o.setUint32(4, this.h1), o.setUint32(8, this.h2), o.setUint32(12, this.h3), o.setUint32(16, this.h4), o.setUint32(20, this.h5), o.setUint32(24, this.h6), this.is224 || o.setUint32(28, this.h7), a;
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 HmacSha256(a, o, u) {
387
- var f, k = typeof a;
388
- if (k === "string") {
389
- var l = [], y = a.length, h = 0, x;
390
- for (f = 0; f < y; ++f)
391
- x = a.charCodeAt(f), x < 128 ? l[h++] = x : x < 2048 ? (l[h++] = 192 | x >> 6, l[h++] = 128 | x & 63) : x < 55296 || x >= 57344 ? (l[h++] = 224 | x >> 12, l[h++] = 128 | x >> 6 & 63, l[h++] = 128 | x & 63) : (x = 65536 + ((x & 1023) << 10 | a.charCodeAt(++f) & 1023), l[h++] = 240 | x >> 18, l[h++] = 128 | x >> 12 & 63, l[h++] = 128 | x >> 6 & 63, l[h++] = 128 | x & 63);
392
- a = l;
393
- } else if (k === "object") {
394
- if (a === null)
395
- throw new Error(ERROR);
396
- if (ARRAY_BUFFER && a.constructor === ArrayBuffer)
397
- a = new Uint8Array(a);
398
- else if (!Array.isArray(a) && (!ARRAY_BUFFER || !ArrayBuffer.isView(a)))
399
- throw new Error(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(ERROR);
402
- a.length > 64 && (a = new Sha256(o, !0).update(a).array());
403
- var B = [], U = [];
404
- for (f = 0; f < 64; ++f) {
405
- var R = a[f] || 0;
406
- B[f] = 92 ^ R, U[f] = 54 ^ R;
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
- Sha256.call(this, o, u), this.update(U), this.oKeyPad = B, this.inner = !0, this.sharedMemory = u;
437
+ z.call(this, x, I), this.update($), this.oKeyPad = N, this.inner = !0, this.sharedMemory = I;
409
438
  }
410
- HmacSha256.prototype = new Sha256(), HmacSha256.prototype.finalize = function() {
411
- if (Sha256.prototype.finalize.call(this), this.inner) {
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 a = this.array();
414
- Sha256.call(this, this.is224, this.sharedMemory), this.update(this.oKeyPad), this.update(a), Sha256.prototype.finalize.call(this);
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 exports = createMethod();
418
- exports.sha256 = exports, exports.sha224 = createMethod(!0), exports.sha256.hmac = createHmacMethod(), exports.sha224.hmac = createHmacMethod(!0), COMMON_JS ? module.exports = exports : (root.sha256 = exports.sha256, root.sha224 = exports.sha224);
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
- })(sha256$1);
421
- var sha256Exports = sha256$1.exports;
422
- const sha256 = /* @__PURE__ */ getDefaultExportFromCjs(sha256Exports);
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 Keycloak(a) {
426
- if (!(this instanceof Keycloak))
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, u, f = [], k, l = {
505
+ for (var o = this, f, y = [], L, k = {
429
506
  enable: !0,
430
507
  callbackList: [],
431
508
  interval: 5
432
- }, y = document.getElementsByTagName("script"), h = 0; h < y.length; h++)
433
- (y[h].src.indexOf("keycloak.js") !== -1 || y[h].src.indexOf("keycloak.min.js") !== -1) && y[h].src.indexOf("version=") !== -1 && (o.iframeVersion = y[h].src.substring(y[h].src.indexOf("version=") + 8).split("&")[0]);
434
- var x = !0, B = Ae(console.info), U = Ae(console.warn);
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, k = be();
439
- var c = ["default", "cordova", "cordova-native"];
440
- if (s && c.indexOf(s.adapter) > -1 ? u = I(s.adapter) : s && typeof s.adapter == "object" ? u = s.adapter : window.Cordova || window.cordova ? u = I("cordova") : u = I(), s) {
441
- if (typeof s.useNonce < "u" && (x = s.useNonce), typeof s.checkLoginIframe < "u" && (l.enable = s.checkLoginIframe), s.checkLoginIframeInterval && (l.interval = s.checkLoginIframeInterval), s.onLoad === "login-required" && (o.loginRequired = !0), s.responseMode)
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 g = M(), w = M();
471
- w.promise.then(function() {
472
- o.onReady && o.onReady(o.authenticated), g.setSuccess(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
- g.setError(_);
551
+ p.setError(_);
475
552
  });
476
- var m = ie();
477
- function C() {
478
- var _ = function(L) {
479
- L || (E.prompt = "none"), s && s.locale && (E.locale = s.locale), o.login(E).then(function() {
480
- w.setSuccess();
481
- }).catch(function(G) {
482
- w.setError(G);
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
- }, S = function() {
485
- var L = document.createElement("iframe"), G = o.createLoginUrl({ prompt: "none", redirectUri: o.silentCheckSsoRedirectUri });
486
- L.setAttribute("src", G), L.setAttribute("sandbox", "allow-scripts allow-same-origin"), L.setAttribute("title", "keycloak-silent-check-sso"), L.style.display = "none", document.body.appendChild(L);
487
- var ne = function($) {
488
- if (!($.origin !== window.location.origin || L.contentWindow !== $.source)) {
489
- var pe = ae($.data);
490
- Q(pe, w), document.body.removeChild(L), window.removeEventListener("message", ne);
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", ne);
494
- }, E = {};
570
+ window.addEventListener("message", he);
571
+ }, U = {};
495
572
  switch (s.onLoad) {
496
573
  case "check-sso":
497
- l.enable ? ce().then(function() {
498
- re().then(function(L) {
499
- L ? w.setSuccess() : o.silentCheckSsoRedirectUri ? S() : _(!1);
500
- }).catch(function(L) {
501
- w.setError(L);
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 ? S() : _(!1);
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 _ = ae(window.location.href);
590
+ var _ = x(window.location.href);
514
591
  if (_ && window.history.replaceState(window.history.state, null, _.newUrl), _ && _.valid)
515
- return ce().then(function() {
516
- Q(_, w);
517
- }).catch(function(S) {
518
- w.setError(S);
592
+ return i().then(function() {
593
+ de(_, m);
594
+ }).catch(function(E) {
595
+ m.setError(E);
519
596
  });
520
- s ? s.token && s.refreshToken ? (de(s.token, s.refreshToken, s.idToken), l.enable ? ce().then(function() {
521
- re().then(function(S) {
522
- S ? (o.onAuthSuccess && o.onAuthSuccess(), w.setSuccess(), N()) : w.setSuccess();
523
- }).catch(function(S) {
524
- w.setError(S);
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(), w.setSuccess();
528
- }).catch(function(S) {
529
- o.onAuthError && o.onAuthError(), s.onLoad ? C() : w.setError(S);
530
- })) : s.onLoad ? C() : w.setSuccess() : w.setSuccess();
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 _ = M(), S = function() {
534
- (document.readyState === "interactive" || document.readyState === "complete") && (document.removeEventListener("readystatechange", S), _.setSuccess());
610
+ var _ = S(), E = function() {
611
+ (document.readyState === "interactive" || document.readyState === "complete") && (document.removeEventListener("readystatechange", E), _.setSuccess());
535
612
  };
536
- return document.addEventListener("readystatechange", S), S(), _.promise;
613
+ return document.addEventListener("readystatechange", E), E(), _.promise;
537
614
  }
538
- return m.then(function() {
539
- b().then(Y).then(v).catch(function(_) {
540
- g.setError(_);
615
+ return l.then(function() {
616
+ b().then(N).then(v).catch(function(_) {
617
+ p.setError(_);
541
618
  });
542
- }), m.catch(function(_) {
543
- g.setError(_);
544
- }), g.promise;
619
+ }), l.catch(function(_) {
620
+ p.setError(_);
621
+ }), p.promise;
545
622
  }, o.login = function(s) {
546
- return u.login(s);
623
+ return f.login(s);
547
624
  };
548
- function R(s) {
549
- var c = null, g = window.crypto || window.msCrypto;
550
- if (g && g.getRandomValues && window.Uint8Array)
551
- return c = new Uint8Array(s), g.getRandomValues(c), c;
552
- c = new Array(s);
553
- for (var w = 0; w < c.length; w++)
554
- c[w] = Math.floor(256 * Math.random());
555
- return c;
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 V(s) {
558
- return T(s, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
634
+ function ae(s) {
635
+ return V(s, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
559
636
  }
560
- function T(s, c) {
561
- for (var g = R(s), w = new Array(s), m = 0; m < s; m++)
562
- w[m] = c.charCodeAt(g[m] % c.length);
563
- return String.fromCharCode.apply(null, w);
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 J(s, c) {
642
+ function Se(s, a) {
566
643
  switch (s) {
567
644
  case "S256":
568
- var g = new Uint8Array(sha256.arrayBuffer(c)), w = base64Js.fromByteArray(g).replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, "");
569
- return w;
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 D(s) {
575
- var c = {
651
+ function be(s) {
652
+ var a = {
576
653
  id_token: {
577
654
  acr: s
578
655
  }
579
656
  };
580
- return JSON.stringify(c);
657
+ return JSON.stringify(a);
581
658
  }
582
659
  o.createLoginUrl = function(s) {
583
- var c = Fe(), g = Fe(), w = u.redirectUri(s), m = {
584
- state: c,
585
- nonce: g,
586
- redirectUri: encodeURIComponent(w)
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 && (m.prompt = s.prompt);
589
- var C;
590
- s && s.action == "register" ? C = o.endpoints.register() : C = o.endpoints.authorize();
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 = C + "?client_id=" + encodeURIComponent(o.clientId) + "&redirect_uri=" + encodeURIComponent(w) + "&state=" + encodeURIComponent(c) + "&response_mode=" + encodeURIComponent(o.responseMode) + "&response_type=" + encodeURIComponent(o.responseType) + "&scope=" + encodeURIComponent(v);
594
- if (x && (b = b + "&nonce=" + encodeURIComponent(g)), 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) {
595
- var _ = D(s.acr);
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 S = V(96);
600
- m.pkceCodeVerifier = S;
601
- var E = J(o.pkceMethod, S);
602
- b += "&code_challenge=" + E, b += "&code_challenge_method=" + o.pkceMethod;
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 k.add(m), b;
681
+ return L.add(l), b;
605
682
  }, o.logout = function(s) {
606
- return u.logout(s);
683
+ return f.logout(s);
607
684
  }, o.createLogoutUrl = function(s) {
608
- var c = o.endpoints.logout() + "?client_id=" + encodeURIComponent(o.clientId) + "&post_logout_redirect_uri=" + encodeURIComponent(u.redirectUri(s, !1));
609
- return o.idToken && (c += "&id_token_hint=" + encodeURIComponent(o.idToken)), c;
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 u.register(s);
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 c = j(), g = void 0;
616
- return typeof c < "u" && (g = c + "/account?referrer=" + encodeURIComponent(o.clientId) + "&referrer_uri=" + encodeURIComponent(u.redirectUri(s))), g;
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 u.accountManagement();
695
+ return f.accountManagement();
619
696
  }, o.hasRealmRole = function(s) {
620
- var c = o.realmAccess;
621
- return !!c && c.roles.indexOf(s) >= 0;
622
- }, o.hasResourceRole = function(s, c) {
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 g = o.resourceAccess[c || o.clientId];
626
- return !!g && g.roles.indexOf(s) >= 0;
702
+ var p = o.resourceAccess[a || o.clientId];
703
+ return !!p && p.roles.indexOf(s) >= 0;
627
704
  }, o.loadUserProfile = function() {
628
- var s = j() + "/account", c = new XMLHttpRequest();
629
- c.open("GET", s, !0), c.setRequestHeader("Accept", "application/json"), c.setRequestHeader("Authorization", "bearer " + o.token);
630
- var g = M();
631
- return c.onreadystatechange = function() {
632
- c.readyState == 4 && (c.status == 200 ? (o.profile = JSON.parse(c.responseText), g.setSuccess(o.profile)) : g.setError());
633
- }, c.send(), g.promise;
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(), c = new XMLHttpRequest();
636
- c.open("GET", s, !0), c.setRequestHeader("Accept", "application/json"), c.setRequestHeader("Authorization", "bearer " + o.token);
637
- var g = M();
638
- return c.onreadystatechange = function() {
639
- c.readyState == 4 && (c.status == 200 ? (o.userInfo = JSON.parse(c.responseText), g.setSuccess(o.userInfo)) : g.setError());
640
- }, c.send(), g.promise;
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 B("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"), !0;
646
- var c = o.tokenParsed.exp - Math.ceil((/* @__PURE__ */ new Date()).getTime() / 1e3) + o.timeSkew;
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
- c -= s;
727
+ a -= s;
651
728
  }
652
- return c < 0;
729
+ return a < 0;
653
730
  }, o.updateToken = function(s) {
654
- var c = M();
731
+ var a = S();
655
732
  if (!o.refreshToken)
656
- return c.setError(), c.promise;
733
+ return a.setError(), a.promise;
657
734
  s = s || 5;
658
- var g = function() {
659
- var m = !1;
660
- if (s == -1 ? (m = !0, B("[KEYCLOAK] Refreshing token: forced refresh")) : (!o.tokenParsed || o.isTokenExpired(s)) && (m = !0, B("[KEYCLOAK] Refreshing token: token expired")), !m)
661
- c.setSuccess(!1);
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 C = "grant_type=refresh_token&refresh_token=" + o.refreshToken, v = o.endpoints.token();
664
- if (f.push(c), f.length == 1) {
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, C += "&client_id=" + encodeURIComponent(o.clientId);
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
- B("[KEYCLOAK] Token refreshed"), _ = (_ + (/* @__PURE__ */ new Date()).getTime()) / 2;
672
- var S = JSON.parse(b.responseText);
673
- de(S.access_token, S.refresh_token, S.id_token, _), o.onAuthRefreshSuccess && o.onAuthRefreshSuccess();
674
- for (var E = f.pop(); E != null; E = f.pop())
675
- E.setSuccess(!0);
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
- U("[KEYCLOAK] Failed to refresh token"), b.status == 400 && o.clearToken(), o.onAuthRefreshError && o.onAuthRefreshError();
678
- for (var E = f.pop(); E != null; E = f.pop())
679
- E.setError(!0);
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(C);
758
+ }, b.send(A);
682
759
  }
683
760
  }
684
761
  };
685
- if (l.enable) {
686
- var w = re();
687
- w.then(function() {
688
- g();
689
- }).catch(function(m) {
690
- c.setError(m);
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
- g();
694
- return c.promise;
770
+ p();
771
+ return a.promise;
695
772
  }, o.clearToken = function() {
696
- o.token && (de(null, null, null), o.onAuthLogout && o.onAuthLogout(), o.loginRequired && o.login());
697
- };
698
- function j() {
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 he() {
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 Q(s, c) {
706
- var g = s.code, w = s.error, m = s.prompt, C = (/* @__PURE__ */ new Date()).getTime();
707
- if (s.kc_action_status && o.onActionUpdate && o.onActionUpdate(s.kc_action_status), w) {
708
- if (m != "none") {
709
- var v = { error: w, error_description: s.error_description };
710
- o.onAuthError && o.onAuthError(v), c && c.setError(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
- c && c.setSuccess();
789
+ a && a.setSuccess();
713
790
  return;
714
791
  } else
715
- o.flow != "standard" && (s.access_token || s.id_token) && E(s.access_token, null, s.id_token, !0);
716
- if (o.flow != "implicit" && g) {
717
- var b = "code=" + g + "&grant_type=authorization_code", _ = o.endpoints.token(), S = new XMLHttpRequest();
718
- S.open("POST", _, !0), S.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), S.withCredentials = !0, S.onreadystatechange = function() {
719
- if (S.readyState == 4)
720
- if (S.status == 200) {
721
- var L = JSON.parse(S.responseText);
722
- E(L.access_token, L.refresh_token, L.id_token, o.flow === "standard"), N();
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(), c && c.setError();
725
- }, S.send(b);
801
+ o.onAuthError && o.onAuthError(), a && a.setError();
802
+ }, E.send(b);
726
803
  }
727
- function E(L, G, ne, $) {
728
- C = (C + (/* @__PURE__ */ new Date()).getTime()) / 2, de(L, G, ne, C), x && (o.tokenParsed && o.tokenParsed.nonce != s.storedNonce || o.refreshTokenParsed && o.refreshTokenParsed.nonce != s.storedNonce || o.idTokenParsed && o.idTokenParsed.nonce != s.storedNonce) ? (B("[KEYCLOAK] Invalid nonce, clearing token"), o.clearToken(), c && c.setError()) : $ && (o.onAuthSuccess && o.onAuthSuccess(), c && c.setSuccess());
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 ie(s) {
732
- var c = M(), g;
733
- a ? typeof a == "string" && (g = a) : g = "keycloak.json";
734
- function w(S) {
735
- S ? o.endpoints = {
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 S.authorization_endpoint;
814
+ return E.authorization_endpoint;
738
815
  },
739
816
  token: function() {
740
- return S.token_endpoint;
817
+ return E.token_endpoint;
741
818
  },
742
819
  logout: function() {
743
- if (!S.end_session_endpoint)
820
+ if (!E.end_session_endpoint)
744
821
  throw "Not supported by the OIDC server";
745
- return S.end_session_endpoint;
822
+ return E.end_session_endpoint;
746
823
  },
747
824
  checkSessionIframe: function() {
748
- if (!S.check_session_iframe)
825
+ if (!E.check_session_iframe)
749
826
  throw "Not supported by the OIDC server";
750
- return S.check_session_iframe;
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 (!S.userinfo_endpoint)
833
+ if (!E.userinfo_endpoint)
757
834
  throw "Not supported by the OIDC server";
758
- return S.userinfo_endpoint;
835
+ return E.userinfo_endpoint;
759
836
  }
760
837
  } : o.endpoints = {
761
838
  authorize: function() {
762
- return j() + "/protocol/openid-connect/auth";
839
+ return ce() + "/protocol/openid-connect/auth";
763
840
  },
764
841
  token: function() {
765
- return j() + "/protocol/openid-connect/token";
842
+ return ce() + "/protocol/openid-connect/token";
766
843
  },
767
844
  logout: function() {
768
- return j() + "/protocol/openid-connect/logout";
845
+ return ce() + "/protocol/openid-connect/logout";
769
846
  },
770
847
  checkSessionIframe: function() {
771
- var E = j() + "/protocol/openid-connect/login-status-iframe.html";
772
- return o.iframeVersion && (E = E + "?version=" + o.iframeVersion), E;
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 E = j() + "/protocol/openid-connect/3p-cookies/step1.html";
776
- return o.iframeVersion && (E = E + "?version=" + o.iframeVersion), E;
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 j() + "/protocol/openid-connect/registrations";
856
+ return ce() + "/protocol/openid-connect/registrations";
780
857
  },
781
858
  userinfo: function() {
782
- return j() + "/protocol/openid-connect/userinfo";
859
+ return ce() + "/protocol/openid-connect/userinfo";
783
860
  }
784
861
  };
785
862
  }
786
- if (g) {
787
- var m = new XMLHttpRequest();
788
- m.open("GET", g, !0), m.setRequestHeader("Accept", "application/json"), m.onreadystatechange = function() {
789
- if (m.readyState == 4)
790
- if (m.status == 200 || Se(m)) {
791
- var S = JSON.parse(m.responseText);
792
- o.authServerUrl = S["auth-server-url"], o.realm = S.realm, o.clientId = S.resource, w(null), c.setSuccess();
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
- c.setError();
795
- }, m.send();
871
+ a.setError();
872
+ }, l.send();
796
873
  } else {
797
- if (!a.clientId)
874
+ if (!c.clientId)
798
875
  throw "clientId missing";
799
- o.clientId = a.clientId;
800
- var C = a.oidcProvider;
801
- if (C)
802
- if (typeof C == "string") {
876
+ o.clientId = c.clientId;
877
+ var A = c.oidcProvider;
878
+ if (A)
879
+ if (typeof A == "string") {
803
880
  var _;
804
- C.charAt(C.length - 1) == "/" ? _ = C + ".well-known/openid-configuration" : _ = C + "/.well-known/openid-configuration";
805
- var m = new XMLHttpRequest();
806
- m.open("GET", _, !0), m.setRequestHeader("Accept", "application/json"), m.onreadystatechange = function() {
807
- if (m.readyState == 4)
808
- if (m.status == 200 || Se(m)) {
809
- var E = JSON.parse(m.responseText);
810
- w(E), c.setSuccess();
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
- c.setError();
813
- }, m.send();
889
+ a.setError();
890
+ }, l.send();
814
891
  } else
815
- w(C), c.setSuccess();
892
+ m(A), a.setSuccess();
816
893
  else {
817
- if (!a.url) {
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
- a.url = v[b].src.substr(0, v[b].src.indexOf("/js/keycloak.js"));
897
+ c.url = v[b].src.substr(0, v[b].src.indexOf("/js/keycloak.js"));
821
898
  break;
822
899
  }
823
900
  }
824
- if (!a.realm)
901
+ if (!c.realm)
825
902
  throw "realm missing";
826
- o.authServerUrl = a.url, o.realm = a.realm, w(null), c.setSuccess();
903
+ o.authServerUrl = c.url, o.realm = c.realm, m(null), a.setSuccess();
827
904
  }
828
905
  }
829
- return c.promise;
906
+ return a.promise;
830
907
  }
831
- function Se(s) {
908
+ function we(s) {
832
909
  return s.status == 0 && s.responseText && s.responseURL.startsWith("file:");
833
910
  }
834
- function de(s, c, g, w) {
835
- if (o.tokenTimeoutHandle && (clearTimeout(o.tokenTimeoutHandle), o.tokenTimeoutHandle = null), c ? (o.refreshToken = c, o.refreshTokenParsed = _e(c)) : (delete o.refreshToken, delete o.refreshTokenParsed), g ? (o.idToken = g, o.idTokenParsed = _e(g)) : (delete o.idToken, delete o.idTokenParsed), s) {
836
- if (o.token = s, o.tokenParsed = _e(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, w && (o.timeSkew = Math.floor(w / 1e3) - o.tokenParsed.iat), o.timeSkew != null && (B("[KEYCLOAK] Estimated time difference between browser and server is " + o.timeSkew + " seconds"), o.onTokenExpired)) {
837
- var m = (o.tokenParsed.exp - (/* @__PURE__ */ new Date()).getTime() / 1e3 + o.timeSkew) * 1e3;
838
- B("[KEYCLOAK] Token expires in " + Math.round(m / 1e3) + " s"), m <= 0 ? o.onTokenExpired() : o.tokenTimeoutHandle = setTimeout(o.onTokenExpired, m);
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 _e(s) {
844
- switch (s = s.split(".")[1], s = s.replace(/-/g, "+"), s = s.replace(/_/g, "/"), s.length % 4) {
845
- case 0:
846
- break;
847
- case 2:
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 ae(s) {
865
- var c = Ne(s);
866
- if (c) {
867
- var g = k.get(c.state);
868
- return g && (c.valid = !0, c.redirectUri = g.redirectUri, c.storedNonce = g.nonce, c.prompt = g.prompt, c.pkceCodeVerifier = g.pkceCodeVerifier), c;
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 Ne(s) {
872
- var c;
933
+ function I(s) {
934
+ var a;
873
935
  switch (o.flow) {
874
936
  case "standard":
875
- c = ["code", "state", "session_state", "kc_action_status", "iss"];
937
+ a = ["code", "state", "session_state", "kc_action_status", "iss"];
876
938
  break;
877
939
  case "implicit":
878
- c = ["access_token", "token_type", "id_token", "state", "session_state", "expires_in", "kc_action_status", "iss"];
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
- c = ["access_token", "token_type", "id_token", "code", "state", "session_state", "expires_in", "kc_action_status", "iss"];
943
+ a = ["access_token", "token_type", "id_token", "code", "state", "session_state", "expires_in", "kc_action_status", "iss"];
882
944
  break;
883
945
  }
884
- c.push("error"), c.push("error_description"), c.push("error_uri");
885
- var g = s.indexOf("?"), w = s.indexOf("#"), m, C;
886
- if (o.responseMode === "query" && g !== -1 ? (m = s.substring(0, g), C = Le(s.substring(g + 1, w !== -1 ? w : s.length), c), C.paramsString !== "" && (m += "?" + C.paramsString), w !== -1 && (m += s.substring(w))) : o.responseMode === "fragment" && w !== -1 && (m = s.substring(0, w), C = Le(s.substring(w + 1), c), C.paramsString !== "" && (m += "#" + C.paramsString)), C && C.oauthParams) {
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 ((C.oauthParams.code || C.oauthParams.error) && C.oauthParams.state)
889
- return C.oauthParams.newUrl = m, C.oauthParams;
890
- } else if (o.flow === "implicit" && (C.oauthParams.access_token || C.oauthParams.error) && C.oauthParams.state)
891
- return C.oauthParams.newUrl = m, C.oauthParams;
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 Le(s, c) {
895
- for (var g = s.split("&"), w = {
956
+ function C(s, a) {
957
+ for (var p = s.split("&"), m = {
896
958
  paramsString: "",
897
959
  oauthParams: {}
898
- }, m = 0; m < g.length; m++) {
899
- var C = g[m].indexOf("="), v = g[m].slice(0, C);
900
- c.indexOf(v) !== -1 ? w.oauthParams[v] = g[m].slice(C + 1) : (w.paramsString !== "" && (w.paramsString += "&"), w.paramsString += g[m]);
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 w;
964
+ return m;
903
965
  }
904
- function M() {
966
+ function S() {
905
967
  var s = {
906
- setSuccess: function(c) {
907
- s.resolve(c);
968
+ setSuccess: function(a) {
969
+ s.resolve(a);
908
970
  },
909
- setError: function(c) {
910
- s.reject(c);
971
+ setError: function(a) {
972
+ s.reject(a);
911
973
  }
912
974
  };
913
- return s.promise = new Promise(function(c, g) {
914
- s.resolve = c, s.reject = g;
975
+ return s.promise = new Promise(function(a, p) {
976
+ s.resolve = a, s.reject = p;
915
977
  }), s;
916
978
  }
917
- function d(s, c, g) {
918
- var w = null, m = new Promise(function(C, v) {
919
- w = setTimeout(function() {
920
- v({ error: g || "Promise is not settled within timeout of " + c + "ms" });
921
- }, c);
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, m]).finally(function() {
924
- clearTimeout(w);
985
+ return Promise.race([s, l]).finally(function() {
986
+ clearTimeout(m);
925
987
  });
926
988
  }
927
- function ce() {
928
- var s = M();
929
- if (!l.enable || l.iframe)
989
+ function i() {
990
+ var s = S();
991
+ if (!k.enable || k.iframe)
930
992
  return s.setSuccess(), s.promise;
931
- var c = document.createElement("iframe");
932
- l.iframe = c, c.onload = function() {
933
- var m = o.endpoints.authorize();
934
- m.charAt(0) === "/" ? l.iframeOrigin = he() : l.iframeOrigin = m.substring(0, m.indexOf("/", 8)), s.setSuccess();
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 g = o.endpoints.checkSessionIframe();
937
- c.setAttribute("src", g), c.setAttribute("sandbox", "allow-scripts allow-same-origin"), c.setAttribute("title", "keycloak-session-iframe"), c.style.display = "none", document.body.appendChild(c);
938
- var w = function(m) {
939
- if (!(m.origin !== l.iframeOrigin || l.iframe.contentWindow !== m.source) && (m.data == "unchanged" || m.data == "changed" || m.data == "error")) {
940
- m.data != "unchanged" && o.clearToken();
941
- for (var C = l.callbackList.splice(0, l.callbackList.length), v = C.length - 1; v >= 0; --v) {
942
- var b = C[v];
943
- m.data == "error" ? b.setError() : b.setSuccess(m.data == "unchanged");
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", w, !1), s.promise;
1009
+ return window.addEventListener("message", m, !1), s.promise;
948
1010
  }
949
- function N() {
950
- l.enable && o.token && setTimeout(function() {
951
- re().then(function(s) {
952
- s && N();
1011
+ function g() {
1012
+ k.enable && o.token && setTimeout(function() {
1013
+ T().then(function(s) {
1014
+ s && g();
953
1015
  });
954
- }, l.interval * 1e3);
1016
+ }, k.interval * 1e3);
955
1017
  }
956
- function re() {
957
- var s = M();
958
- if (l.iframe && l.iframeOrigin) {
959
- var c = o.clientId + " " + (o.sessionId ? o.sessionId : "");
960
- l.callbackList.push(s);
961
- var g = l.iframeOrigin;
962
- l.callbackList.length == 1 && l.iframe.contentWindow.postMessage(c, g);
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 Y() {
968
- var s = M();
969
- if (l.enable || o.silentCheckSsoRedirectUri) {
970
- var c = document.createElement("iframe");
971
- c.setAttribute("src", o.endpoints.thirdPartyCookiesIframe()), c.setAttribute("sandbox", "allow-scripts allow-same-origin"), c.setAttribute("title", "keycloak-3p-check-iframe"), c.style.display = "none", document.body.appendChild(c);
972
- var g = function(w) {
973
- c.contentWindow === w.source && (w.data !== "supported" && w.data !== "unsupported" || (w.data === "unsupported" && (U(
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
- ), l.enable = !1, o.silentCheckSsoFallback && (o.silentCheckSsoRedirectUri = !1)), document.body.removeChild(c), window.removeEventListener("message", g), s.setSuccess()));
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", g, !1);
1044
+ window.addEventListener("message", p, !1);
983
1045
  } else
984
1046
  s.setSuccess();
985
- return d(s.promise, o.messageReceiveTimeout, "Timeout when waiting for 3rd party check iframe message.");
1047
+ return w(s.promise, o.messageReceiveTimeout, "Timeout when waiting for 3rd party check iframe message.");
986
1048
  }
987
- function I(s) {
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)), M().promise;
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)), M().promise;
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)), M().promise;
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 M().promise;
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
- l.enable = !1;
1013
- var c = function(v, b, _) {
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
- }, g = function(v) {
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
- }, w = function(v) {
1081
+ }, m = function(v) {
1020
1082
  return Object.keys(v).reduce(function(b, _) {
1021
1083
  return b.push(_ + "=" + v[_]), b;
1022
1084
  }, []).join(",");
1023
- }, m = function(v) {
1024
- var b = g(v);
1025
- return b.location = "no", v && v.prompt == "none" && (b.hidden = "yes"), w(b);
1026
- }, C = o.redirectUri || "http://localhost";
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 = M(), _ = m(v), S = o.createLoginUrl(v), E = c(S, "_blank", _), L = !1, G = !1, ne = function() {
1030
- G = !0, E.close();
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 E.addEventListener("loadstart", function($) {
1033
- if ($.url.indexOf(C) == 0) {
1034
- var pe = ae($.url);
1035
- Q(pe, b), ne(), L = !0;
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
- }), E.addEventListener("loaderror", function($) {
1038
- if (!L)
1039
- if ($.url.indexOf(C) == 0) {
1040
- var pe = ae($.url);
1041
- Q(pe, b), ne(), L = !0;
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(), ne();
1044
- }), E.addEventListener("exit", function($) {
1045
- G || b.setError({
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 = M(), _ = o.createLogoutUrl(v), S = c(_, "_blank", "location=no,hidden=yes,clearcache=yes"), E;
1052
- return S.addEventListener("loadstart", function(L) {
1053
- L.url.indexOf(C) == 0 && S.close();
1054
- }), S.addEventListener("loaderror", function(L) {
1055
- L.url.indexOf(C) == 0 || (E = !0), S.close();
1056
- }), S.addEventListener("exit", function(L) {
1057
- E ? b.setError() : (o.clearToken(), b.setSuccess());
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 = M(), _ = o.createRegisterUrl(), S = m(v), E = c(_, "_blank", S);
1062
- return E.addEventListener("loadstart", function(L) {
1063
- if (L.url.indexOf(C) == 0) {
1064
- E.close();
1065
- var G = ae(L.url);
1066
- Q(G, b);
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 = c(v, "_blank", "location=no");
1137
+ var b = a(v, "_blank", "location=no");
1074
1138
  b.addEventListener("loadstart", function(_) {
1075
- _.url.indexOf(C) == 0 && b.close();
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 C;
1145
+ return A();
1082
1146
  }
1083
1147
  };
1084
1148
  }
1085
1149
  if (s == "cordova-native")
1086
- return l.enable = !1, {
1150
+ return k.enable = !1, {
1087
1151
  login: function(v) {
1088
- var b = M(), _ = o.createLoginUrl(v);
1089
- return universalLinks.subscribe("keycloak", function(S) {
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 E = ae(S.url);
1092
- Q(E, b);
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 = M(), _ = o.createLogoutUrl(v);
1097
- return universalLinks.subscribe("keycloak", function(S) {
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 = M(), _ = o.createRegisterUrl(v);
1103
- return universalLinks.subscribe("keycloak", function(S) {
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 E = ae(S.url);
1106
- Q(E, b);
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 le = function() {
1123
- if (!(this instanceof le))
1124
- return new le();
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 c() {
1128
- for (var g = (/* @__PURE__ */ new Date()).getTime(), w = 0; w < localStorage.length; w++) {
1129
- var m = localStorage.key(w);
1130
- if (m && m.indexOf("kc-callback-") == 0) {
1131
- var C = localStorage.getItem(m);
1132
- if (C)
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(C).expires;
1135
- (!v || v < g) && localStorage.removeItem(m);
1198
+ var v = JSON.parse(A).expires;
1199
+ (!v || v < p) && localStorage.removeItem(l);
1136
1200
  } catch {
1137
- localStorage.removeItem(m);
1201
+ localStorage.removeItem(l);
1138
1202
  }
1139
1203
  }
1140
1204
  }
1141
1205
  }
1142
- s.get = function(g) {
1143
- if (g) {
1144
- var w = "kc-callback-" + g, m = localStorage.getItem(w);
1145
- return m && (localStorage.removeItem(w), m = JSON.parse(m)), c(), m;
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(g) {
1148
- c();
1149
- var w = "kc-callback-" + g.state;
1150
- g.expires = (/* @__PURE__ */ new Date()).getTime() + 60 * 60 * 1e3, localStorage.setItem(w, JSON.stringify(g));
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
- }, ve = function() {
1153
- if (!(this instanceof ve))
1154
- return new ve();
1216
+ }, Z = function() {
1217
+ if (!(this instanceof Z))
1218
+ return new Z();
1155
1219
  var s = this;
1156
- s.get = function(m) {
1157
- if (m) {
1158
- var C = g("kc-callback-" + m);
1159
- if (w("kc-callback-" + m, "", c(-100)), C)
1160
- return JSON.parse(C);
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(m) {
1163
- w("kc-callback-" + m.state, JSON.stringify(m), c(60));
1164
- }, s.removeItem = function(m) {
1165
- w(m, "", c(-100));
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 c = function(m) {
1168
- var C = /* @__PURE__ */ new Date();
1169
- return C.setTime(C.getTime() + m * 60 * 1e3), C;
1170
- }, g = function(m) {
1171
- for (var C = m + "=", v = document.cookie.split(";"), b = 0; b < v.length; b++) {
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(C) == 0)
1175
- return _.substring(C.length, _.length);
1238
+ if (_.indexOf(A) == 0)
1239
+ return _.substring(A.length, _.length);
1176
1240
  }
1177
1241
  return "";
1178
- }, w = function(m, C, v) {
1179
- var b = m + "=" + C + "; expires=" + v.toUTCString() + "; ";
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 be() {
1247
+ function H() {
1184
1248
  try {
1185
- return new le();
1249
+ return new F();
1186
1250
  } catch {
1187
1251
  }
1188
- return new ve();
1252
+ return new Z();
1189
1253
  }
1190
- function Ae(s) {
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 keycloakInstance = new Keycloak(), Login = (a, o) => {
1197
- keycloakInstance.init({ onLoad: "login-required" }).then(async (u) => {
1198
- u && await FetchUserInfo(), a();
1199
- }).catch((u) => {
1200
- o(u);
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
- }, FetchUserInfo = async () => {
1203
- const a = await keycloakInstance.loadUserInfo();
1204
- AuthService.User.email = a.email ?? "", AuthService.User.emailVerified = a.email_verified === !0, AuthService.User.firstName = a.given_name ?? "", AuthService.User.lastName = a.family_name ?? "", AuthService.User.name = a.name ?? "", AuthService.User.sub = a.sub ?? "", AuthService.User.username = a.preferred_username ?? "", AuthService.User.roles = [...a.role ?? []], AuthService.User.groups = [...a.group ?? []], AuthService.User.IsInRole = (o) => AuthService.User.roles.includes(o);
1205
- }, Logout = () => {
1206
- keycloakInstance.logout({
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
- }, AuthService = {
1212
- Instance: keycloakInstance,
1275
+ }, se = {
1276
+ Instance: ot,
1213
1277
  User: {},
1214
- CallLogin: Login,
1215
- CallLogout: Logout
1278
+ CallLogin: Ps,
1279
+ CallLogout: Bs
1216
1280
  };
1217
- var sweetalert2 = { exports: {} };
1281
+ var vn = { exports: {} };
1218
1282
  /*!
1219
1283
  * sweetalert2 v11.4.8
1220
1284
  * Released under the MIT License.
1221
1285
  */
1222
- (function(a, o) {
1223
- (function(u, f) {
1224
- a.exports = f();
1225
- })(commonjsGlobal, function() {
1226
- const u = "SweetAlert2:", f = (e) => {
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
- }, k = (e) => e.charAt(0).toUpperCase() + e.slice(1), l = (e) => Array.prototype.slice.call(e), y = (e) => {
1232
- console.warn("".concat(u, " ").concat(typeof e == "object" ? e.join(" ") : e));
1233
- }, h = (e) => {
1234
- console.error("".concat(u, " ").concat(e));
1235
- }, x = [], B = (e) => {
1236
- x.includes(e) || (x.push(e), y(e));
1237
- }, U = (e, t) => {
1238
- B('"'.concat(e, '" is deprecated and will be removed in the next major release. Please use "').concat(t, '" instead.'));
1239
- }, R = (e) => typeof e == "function" ? e() : e, V = (e) => e && typeof e.toPromise == "function", T = (e) => V(e) ? e.toPromise() : Promise.resolve(e), J = (e) => e && Promise.resolve(e) === e, D = {
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
- }, j = ["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"], he = {}, Q = ["allowOutsideClick", "allowEnterKey", "backdrop", "focusConfirm", "focusDeny", "focusCancel", "returnFocus", "heightAuto", "keydownListenerCapture"], ie = (e) => Object.prototype.hasOwnProperty.call(D, e), Se = (e) => j.indexOf(e) !== -1, de = (e) => he[e], _e = (e) => {
1328
- ie(e) || y('Unknown parameter "'.concat(e, '"'));
1329
- }, Fe = (e) => {
1330
- Q.includes(e) && y('The parameter "'.concat(e, '" is incompatible with toasts'));
1331
- }, ae = (e) => {
1332
- de(e) && U(e, de(e));
1333
- }, Ne = (e) => {
1334
- !e.backdrop && e.allowOutsideClick && y('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');
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
- _e(t), e.toast && Fe(t), ae(t);
1337
- }, Le = "swal2-", M = (e) => {
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]] = Le + e[n];
1404
+ t[e[n]] = S + e[n];
1341
1405
  return t;
1342
- }, d = M(["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"]), ce = M(["success", "warning", "info", "question", "error"]), N = () => document.body.querySelector(".".concat(d.container)), re = (e) => {
1343
- const t = N();
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
- }, Y = (e) => re(".".concat(e)), I = () => Y(d.popup), le = () => Y(d.icon), ve = () => Y(d.title), be = () => Y(d["html-container"]), Ae = () => Y(d.image), s = () => Y(d["progress-steps"]), c = () => Y(d["validation-message"]), g = () => re(".".concat(d.actions, " .").concat(d.confirm)), w = () => re(".".concat(d.actions, " .").concat(d.deny)), m = () => Y(d["input-label"]), C = () => re(".".concat(d.loader)), v = () => re(".".concat(d.actions, " .").concat(d.cancel)), b = () => Y(d.actions), _ = () => Y(d.footer), S = () => Y(d["timer-progress-bar"]), E = () => Y(d.close), L = `
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
- `, G = () => {
1361
- const e = l(I().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((n, r) => {
1362
- const p = parseInt(n.getAttribute("tabindex")), A = parseInt(r.getAttribute("tabindex"));
1363
- return p > A ? 1 : p < A ? -1 : 0;
1364
- }), t = l(I().querySelectorAll(L)).filter((n) => n.getAttribute("tabindex") !== "-1");
1365
- return f(e.concat(t)).filter((n) => ee(n));
1366
- }, ne = () => ue(document.body, d.shown) && !ue(document.body, d["toast-shown"]) && !ue(document.body, d["no-backdrop"]), $ = () => I() && ue(I(), d.toast), pe = () => I().hasAttribute("data-loading"), we = {
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
- }, q = (e, t) => {
1432
+ }, te = (e, t) => {
1369
1433
  if (e.textContent = "", t) {
1370
1434
  const r = new DOMParser().parseFromString(t, "text/html");
1371
- l(r.querySelector("head").childNodes).forEach((p) => {
1372
- e.appendChild(p);
1373
- }), l(r.querySelector("body").childNodes).forEach((p) => {
1374
- e.appendChild(p);
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
- }, ue = (e, t) => {
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
- }, Ft = (e, t) => {
1386
- l(e.classList).forEach((n) => {
1387
- !Object.values(d).includes(n) && !Object.values(ce).includes(n) && !Object.values(t.showClass).includes(n) && e.classList.remove(n);
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
- }, oe = (e, t, n) => {
1390
- if (Ft(e, t), t.customClass && t.customClass[n]) {
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 y("Invalid type of customClass.".concat(n, '! Expected string or iterable object, got "').concat(typeof t.customClass[n], '"'));
1393
- F(e, t.customClass[n]);
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
- }, Ve = (e, t) => {
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(d.popup, " > .").concat(d[t]));
1466
+ return e.querySelector(".".concat(i.popup, " > .").concat(i[t]));
1403
1467
  case "checkbox":
1404
- return e.querySelector(".".concat(d.popup, " > .").concat(d.checkbox, " input"));
1468
+ return e.querySelector(".".concat(i.popup, " > .").concat(i.checkbox, " input"));
1405
1469
  case "radio":
1406
- return e.querySelector(".".concat(d.popup, " > .").concat(d.radio, " input:checked")) || e.querySelector(".".concat(d.popup, " > .").concat(d.radio, " input:first-child"));
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(d.popup, " > .").concat(d.range, " input"));
1472
+ return e.querySelector(".".concat(i.popup, " > .").concat(i.range, " input"));
1409
1473
  default:
1410
- return e.querySelector(".".concat(d.popup, " > .").concat(d.input));
1474
+ return e.querySelector(".".concat(i.popup, " > .").concat(i.input));
1411
1475
  }
1412
- }, Qe = (e) => {
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
- }, et = (e, t, n) => {
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((p) => {
1420
- n ? p.classList.add(r) : p.classList.remove(r);
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
- }, F = (e, t) => {
1424
- et(e, t, !0);
1425
- }, se = (e, t) => {
1426
- et(e, t, !1);
1427
- }, fe = (e, t) => {
1428
- const n = l(e.childNodes);
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 (ue(n[r], t))
1494
+ if (Ce(n[r], t))
1431
1495
  return n[r];
1432
- }, Ee = (e, t, n) => {
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
- }, X = function(e) {
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
- }, z = (e) => {
1501
+ }, ne = (e) => {
1438
1502
  e.style.display = "none";
1439
- }, tt = (e, t, n, r) => {
1440
- const p = e.querySelector(t);
1441
- p && (p.style[n] = r);
1442
- }, Re = (e, t, n) => {
1443
- t ? X(e, n) : z(e);
1444
- }, ee = (e) => !!(e && (e.offsetWidth || e.offsetHeight || e.getClientRects().length)), Lt = () => !ee(g()) && !ee(w()) && !ee(v()), nt = (e) => e.scrollHeight > e.clientHeight, ot = (e) => {
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
- }, De = function(e) {
1511
+ }, st = function(e) {
1448
1512
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
1449
- const n = S();
1450
- ee(n) && (t && (n.style.transition = "none", n.style.width = "100%"), setTimeout(() => {
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
- }, Rt = () => {
1454
- const e = S(), t = parseInt(window.getComputedStyle(e).width);
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
- }, rt = () => typeof window > "u" || typeof document > "u", Ut = 100, P = {}, Mt = () => {
1459
- P.previousActiveElement && P.previousActiveElement.focus ? (P.previousActiveElement.focus(), P.previousActiveElement = null) : document.body && document.body.focus();
1460
- }, Ot = (e) => new Promise((t) => {
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
- P.restoreFocusTimeout = setTimeout(() => {
1465
- Mt(), t();
1466
- }, Ut), window.scrollTo(n, r);
1467
- }), Nt = `
1468
- <div aria-labelledby="`.concat(d.title, '" aria-describedby="').concat(d["html-container"], '" class="').concat(d.popup, `" tabindex="-1">
1469
- <button type="button" class="`).concat(d.close, `"></button>
1470
- <ul class="`).concat(d["progress-steps"], `"></ul>
1471
- <div class="`).concat(d.icon, `"></div>
1472
- <img class="`).concat(d.image, `" />
1473
- <h2 class="`).concat(d.title, '" id="').concat(d.title, `"></h2>
1474
- <div class="`).concat(d["html-container"], '" id="').concat(d["html-container"], `"></div>
1475
- <input class="`).concat(d.input, `" />
1476
- <input type="file" class="`).concat(d.file, `" />
1477
- <div class="`).concat(d.range, `">
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(d.select, `"></select>
1482
- <div class="`).concat(d.radio, `"></div>
1483
- <label for="`).concat(d.checkbox, '" class="').concat(d.checkbox, `">
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(d.label, `"></span>
1549
+ <span class="`).concat(i.label, `"></span>
1486
1550
  </label>
1487
- <textarea class="`).concat(d.textarea, `"></textarea>
1488
- <div class="`).concat(d["validation-message"], '" id="').concat(d["validation-message"], `"></div>
1489
- <div class="`).concat(d.actions, `">
1490
- <div class="`).concat(d.loader, `"></div>
1491
- <button type="button" class="`).concat(d.confirm, `"></button>
1492
- <button type="button" class="`).concat(d.deny, `"></button>
1493
- <button type="button" class="`).concat(d.cancel, `"></button>
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(d.footer, `"></div>
1496
- <div class="`).concat(d["timer-progress-bar-container"], `">
1497
- <div class="`).concat(d["timer-progress-bar"], `"></div>
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, ""), Vt = () => {
1501
- const e = N();
1502
- return e ? (e.remove(), se([document.documentElement, document.body], [d["no-backdrop"], d["toast-shown"], d["has-column"]]), !0) : !1;
1503
- }, me = () => {
1504
- P.currentInstance.resetValidationMessage();
1505
- }, Dt = () => {
1506
- const e = I(), t = fe(e, d.input), n = fe(e, d.file), r = e.querySelector(".".concat(d.range, " input")), p = e.querySelector(".".concat(d.range, " output")), A = fe(e, d.select), O = e.querySelector(".".concat(d.checkbox, " input")), te = fe(e, d.textarea);
1507
- t.oninput = me, n.onchange = me, A.onchange = me, O.onchange = me, te.oninput = me, r.oninput = () => {
1508
- me(), p.value = r.value;
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
- me(), r.nextSibling.value = r.value;
1574
+ Be(), r.nextSibling.value = r.value;
1511
1575
  };
1512
- }, jt = (e) => typeof e == "string" ? document.querySelector(e) : e, $t = (e) => {
1513
- const t = I();
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
- }, Xt = (e) => {
1516
- window.getComputedStyle(e).direction === "rtl" && F(N(), d.rtl);
1517
- }, qt = (e) => {
1518
- const t = Vt();
1519
- if (rt()) {
1520
- h("SweetAlert2 requires document to initialize");
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 = d.container, t && F(n, d["no-transition"]), q(n, Nt);
1525
- const r = jt(e.target);
1526
- r.appendChild(n), $t(e), Xt(r), Dt();
1527
- }, je = (e, t) => {
1528
- e instanceof HTMLElement ? t.appendChild(e) : typeof e == "object" ? zt(e, t) : e && q(t, e);
1529
- }, zt = (e, t) => {
1530
- e.jquery ? Wt(t, e) : q(t, e.toString());
1531
- }, Wt = (e, t) => {
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
- }, Be = (() => {
1538
- if (rt())
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
- })(), Kt = () => {
1614
+ })(), Un = () => {
1551
1615
  const e = document.createElement("div");
1552
- e.className = d["scrollbar-measure"], document.body.appendChild(e);
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
- }, Jt = (e, t) => {
1556
- const n = b(), r = C();
1557
- !t.showConfirmButton && !t.showDenyButton && !t.showCancelButton ? z(n) : X(n), oe(n, t, "actions"), Yt(n, r, t), q(r, t.loaderHtml), oe(r, t, "loader");
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 Yt(e, t, n) {
1560
- const r = g(), p = w(), A = v();
1561
- $e(r, "confirm", n), $e(p, "deny", n), $e(A, "cancel", n), Gt(r, p, A, n), n.reverseButtons && (n.toast ? (e.insertBefore(A, r), e.insertBefore(p, r)) : (e.insertBefore(A, t), e.insertBefore(p, t), e.insertBefore(r, t)));
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 Gt(e, t, n, r) {
1627
+ function Rn(e, t, n, r) {
1564
1628
  if (!r.buttonsStyling)
1565
- return se([e, t, n], d.styled);
1566
- F([e, t, n], d.styled), r.confirmButtonColor && (e.style.backgroundColor = r.confirmButtonColor, F(e, d["default-outline"])), r.denyButtonColor && (t.style.backgroundColor = r.denyButtonColor, F(t, d["default-outline"])), r.cancelButtonColor && (n.style.backgroundColor = r.cancelButtonColor, F(n, d["default-outline"]));
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 $e(e, t, n) {
1569
- Re(e, n["show".concat(k(t), "Button")], "inline-block"), q(e, n["".concat(t, "ButtonText")]), e.setAttribute("aria-label", n["".concat(t, "ButtonAriaLabel")]), e.className = d[t], oe(e, n, "".concat(t, "Button")), F(e, n["".concat(t, "ButtonClass")]);
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 Zt(e, t) {
1572
- typeof t == "string" ? e.style.background = t : t || F([document.documentElement, document.body], d["no-backdrop"]);
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 Qt(e, t) {
1575
- t in d ? F(e, d[t]) : (y('The "position" parameter is not valid, defaulting to "center"'), F(e, d.center));
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 en(e, t) {
1641
+ function Dn(e, t) {
1578
1642
  if (t && typeof t == "string") {
1579
1643
  const n = "grow-".concat(t);
1580
- n in d && F(e, d[n]);
1644
+ n in i && D(e, i[n]);
1581
1645
  }
1582
1646
  }
1583
- const tn = (e, t) => {
1584
- const n = N();
1585
- n && (Zt(n, t.backdrop), Qt(n, t.position), en(n, t.grow), oe(n, t, "container"));
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 H = {
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 nn = ["input", "file", "range", "select", "radio", "checkbox", "textarea"], on = (e, t) => {
1594
- const n = I(), r = H.innerParams.get(e), p = !r || t.input !== r.input;
1595
- nn.forEach((A) => {
1596
- const O = d[A], te = fe(n, O);
1597
- an(A, t.inputAttributes), te.className = O, p && z(te);
1598
- }), t.input && (p && rn(t), cn(t));
1599
- }, rn = (e) => {
1600
- if (!Z[e.input])
1601
- return h('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input, '"'));
1602
- const t = st(e.input), n = Z[e.input](t, e);
1603
- X(n), setTimeout(() => {
1604
- Qe(n);
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
- }, sn = (e) => {
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
- }, an = (e, t) => {
1612
- const n = Ve(I(), e);
1675
+ }, Kn = (e, t) => {
1676
+ const n = rt(F(), e);
1613
1677
  if (n) {
1614
- sn(n);
1678
+ Wn(n);
1615
1679
  for (const r in t)
1616
1680
  n.setAttribute(r, t[r]);
1617
1681
  }
1618
- }, cn = (e) => {
1619
- const t = st(e.input);
1620
- e.customClass && F(t, e.customClass.input);
1621
- }, Xe = (e, t) => {
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
- }, Te = (e, t, n) => {
1687
+ }, Ve = (e, t, n) => {
1624
1688
  if (n.inputLabel) {
1625
- e.id = d.input;
1626
- const r = document.createElement("label"), p = d["input-label"];
1627
- r.setAttribute("for", e.id), r.className = p, F(r, n.customClass.inputLabel), r.innerText = n.inputLabel, t.insertAdjacentElement("beforebegin", r);
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
- }, st = (e) => {
1630
- const t = d[e] ? d[e] : d.input;
1631
- return fe(I(), t);
1632
- }, Z = {};
1633
- Z.text = Z.email = Z.password = Z.number = Z.tel = Z.url = (e, t) => (typeof t.inputValue == "string" || typeof t.inputValue == "number" ? e.value = t.inputValue : J(t.inputValue) || y('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue, '"')), Te(e, e, t), Xe(e, t), e.type = t.input, e), Z.file = (e, t) => (Te(e, e, t), Xe(e, t), e), Z.range = (e, t) => {
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, Te(n, e, t), e;
1636
- }, Z.select = (e, t) => {
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
- q(n, t.inputPlaceholder), n.value = "", n.disabled = !0, n.selected = !0, e.appendChild(n);
1703
+ te(n, t.inputPlaceholder), n.value = "", n.disabled = !0, n.selected = !0, e.appendChild(n);
1640
1704
  }
1641
- return Te(e, e, t), e;
1642
- }, Z.radio = (e) => (e.textContent = "", e), Z.checkbox = (e, t) => {
1643
- const n = Ve(I(), "checkbox");
1644
- n.value = "1", n.id = d.checkbox, n.checked = !!t.inputValue;
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 q(r, t.inputPlaceholder), e;
1647
- }, Z.textarea = (e, t) => {
1648
- e.value = t.inputValue, Xe(e, t), Te(e, e, t);
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(I()).width), p = () => {
1653
- const A = e.offsetWidth + n(e);
1654
- A > r ? I().style.width = "".concat(A, "px") : I().style.width = null;
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(p).observe(e, {
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 ln = (e, t) => {
1664
- const n = be();
1665
- oe(n, t, "htmlContainer"), t.html ? (je(t.html, n), X(n, "block")) : t.text ? (n.textContent = t.text, X(n, "block")) : z(n), on(e, t);
1666
- }, un = (e, t) => {
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
- q(n, t.closeButtonHtml), oe(n, t, "closeButton"), Re(n, t.showCloseButton), n.setAttribute("aria-label", t.closeButtonAriaLabel);
1672
- }, fn = (e, t) => {
1673
- const n = H.innerParams.get(e), r = le();
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
- at(r, t), it(r, t);
1739
+ Pt(r, t), Et(r, t);
1676
1740
  return;
1677
1741
  }
1678
1742
  if (!t.icon && !t.iconHtml)
1679
- return z(r);
1680
- if (t.icon && Object.keys(ce).indexOf(t.icon) === -1)
1681
- return h('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(t.icon, '"')), z(r);
1682
- X(r), at(r, t), it(r, t), F(r, t.showClass.icon);
1683
- }, it = (e, t) => {
1684
- for (const n in ce)
1685
- t.icon !== n && se(e, ce[n]);
1686
- F(e, ce[t.icon]), gn(e, t), hn(), oe(e, t, "icon");
1687
- }, hn = () => {
1688
- const e = I(), t = window.getComputedStyle(e).getPropertyValue("background-color"), n = e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");
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
- }, pn = `
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
- `, mn = `
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
- `, at = (e, t) => {
1702
- e.textContent = "", t.iconHtml ? q(e, ct(t.iconHtml)) : t.icon === "success" ? q(e, pn) : t.icon === "error" ? q(e, mn) : q(e, ct({
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
- }, gn = (e, t) => {
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
- tt(e, n, "backgroundColor", t.iconColor);
1712
- tt(e, ".swal2-success-ring", "borderColor", t.iconColor);
1775
+ xt(e, n, "backgroundColor", t.iconColor);
1776
+ xt(e, ".swal2-success-ring", "borderColor", t.iconColor);
1713
1777
  }
1714
- }, ct = (e) => '<div class="'.concat(d["icon-content"], '">').concat(e, "</div>"), vn = (e, t) => {
1715
- const n = Ae();
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 z(n);
1718
- X(n, ""), n.setAttribute("src", t.imageUrl), n.setAttribute("alt", t.imageAlt), Ee(n, "width", t.imageWidth), Ee(n, "height", t.imageHeight), n.className = d.image, oe(n, t, "image");
1719
- }, bn = (e) => {
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 F(t, d["progress-step"]), q(t, e), t;
1722
- }, wn = (e) => {
1785
+ return D(t, i["progress-step"]), te(t, e), t;
1786
+ }, ro = (e) => {
1723
1787
  const t = document.createElement("li");
1724
- return F(t, d["progress-step-line"]), e.progressStepsDistance && (t.style.width = e.progressStepsDistance), t;
1725
- }, yn = (e, t) => {
1726
- const n = s();
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 z(n);
1729
- X(n), n.textContent = "", t.currentProgressStep >= t.progressSteps.length && y("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"), t.progressSteps.forEach((r, p) => {
1730
- const A = bn(r);
1731
- if (n.appendChild(A), p === t.currentProgressStep && F(A, d["active-progress-step"]), p !== t.progressSteps.length - 1) {
1732
- const O = wn(t);
1733
- n.appendChild(O);
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
- }, kn = (e, t) => {
1737
- const n = ve();
1738
- Re(n, t.title || t.titleText, "block"), t.title && je(t.title, n), t.titleText && (n.innerText = t.titleText), oe(n, t, "title");
1739
- }, Cn = (e, t) => {
1740
- const n = N(), r = I();
1741
- t.toast ? (Ee(n, "width", t.width), r.style.width = "100%", r.insertBefore(C(), le())) : Ee(r, "width", t.width), Ee(r, "padding", t.padding), t.color && (r.style.color = t.color), t.background && (r.style.background = t.background), z(c()), xn(r, t);
1742
- }, xn = (e, t) => {
1743
- e.className = "".concat(d.popup, " ").concat(ee(e) ? t.showClass.popup : ""), t.toast ? (F([document.documentElement, document.body], d["toast-shown"]), F(e, d.toast)) : F(e, d.modal), oe(e, t, "popup"), typeof t.customClass == "string" && F(e, t.customClass), t.icon && F(e, d["icon-".concat(t.icon)]);
1744
- }, lt = (e, t) => {
1745
- Cn(e, t), tn(e, t), yn(e, t), fn(e, t), vn(e, t), kn(e, t), dn(e, t), ln(e, t), Jt(e, t), un(e, t), typeof t.didRender == "function" && t.didRender(I());
1746
- }, ye = Object.freeze({
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
- }), Sn = () => {
1753
- l(document.body.children).forEach((t) => {
1754
- t === N() || t.contains(N()) || (t.hasAttribute("aria-hidden") && t.setAttribute("data-previous-aria-hidden", t.getAttribute("aria-hidden")), t.setAttribute("aria-hidden", "true"));
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
- }, ut = () => {
1757
- l(document.body.children).forEach((t) => {
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
- }, dt = ["swal-title", "swal-html", "swal-footer"], _n = (e) => {
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 In(n), Object.assign(An(n), En(n), Bn(n), Tn(n), Pn(n), Hn(n, dt));
1766
- }, An = (e) => {
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 l(e.querySelectorAll("swal-param")).forEach((n) => {
1769
- ge(n, ["name", "value"]);
1770
- const r = n.getAttribute("name"), p = n.getAttribute("value");
1771
- typeof D[r] == "boolean" && p === "false" && (t[r] = !1), typeof D[r] == "object" && (t[r] = JSON.parse(p));
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
- }, En = (e) => {
1837
+ }, ho = (e) => {
1774
1838
  const t = {};
1775
- return l(e.querySelectorAll("swal-button")).forEach((n) => {
1776
- ge(n, ["type", "color", "aria-label"]);
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(k(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"));
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
- }, Bn = (e) => {
1844
+ }, po = (e) => {
1781
1845
  const t = {}, n = e.querySelector("swal-image");
1782
- return n && (ge(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;
1783
- }, Tn = (e) => {
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 && (ge(n, ["type", "color"]), n.hasAttribute("type") && (t.icon = n.getAttribute("type")), n.hasAttribute("color") && (t.iconColor = n.getAttribute("color")), t.iconHtml = n.innerHTML), t;
1786
- }, Pn = (e) => {
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 && (ge(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")));
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 = {}, l(r).forEach((p) => {
1791
- ge(p, ["value"]);
1792
- const A = p.getAttribute("value"), O = p.innerHTML;
1793
- t.inputOptions[A] = O;
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
- }, Hn = (e, t) => {
1859
+ }, vo = (e, t) => {
1796
1860
  const n = {};
1797
1861
  for (const r in t) {
1798
- const p = t[r], A = e.querySelector(p);
1799
- A && (ge(A, []), n[p.replace(/^swal-/, "")] = A.innerHTML.trim());
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
- }, In = (e) => {
1803
- const t = dt.concat(["swal-param", "swal-button", "swal-image", "swal-icon", "swal-input", "swal-input-option"]);
1804
- l(e.children).forEach((n) => {
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 && y("Unrecognized element <".concat(r, ">"));
1870
+ t.indexOf(r) === -1 && B("Unrecognized element <".concat(r, ">"));
1807
1871
  });
1808
- }, ge = (e, t) => {
1809
- l(e.attributes).forEach((n) => {
1810
- t.indexOf(n.name) === -1 && y(['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.")]);
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 ft = {
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 Fn(e) {
1818
- e.inputValidator || Object.keys(ft).forEach((t) => {
1819
- e.input === t && (e.inputValidator = ft[t]);
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 Ln(e) {
1823
- (!e.target || typeof e.target == "string" && !document.querySelector(e.target) || typeof e.target != "string" && !e.target.appendChild) && (y('Target parameter is not valid, defaulting to "body"'), e.target = "body");
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 Rn(e) {
1826
- Fn(e), e.showLoaderOnConfirm && !e.preConfirm && y(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
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`), Ln(e), typeof e.title == "string" && (e.title = e.title.split(`
1829
- `).join("<br />")), qt(e);
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 Un {
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 Mn = () => {
1853
- we.previousBodyPadding === null && document.body.scrollHeight > window.innerHeight && (we.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = "".concat(we.previousBodyPadding + Kt(), "px"));
1854
- }, On = () => {
1855
- we.previousBodyPadding !== null && (document.body.style.paddingRight = "".concat(we.previousBodyPadding, "px"), we.previousBodyPadding = null);
1856
- }, Nn = () => {
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) && !ue(document.body, d.iosfix)) {
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"), F(document.body, d.iosfix), Dn(), Vn();
1924
+ document.body.style.top = "".concat(t * -1, "px"), D(document.body, i.iosfix), Eo(), _o();
1861
1925
  }
1862
- }, Vn = () => {
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) && I().scrollHeight > window.innerHeight - 44 && (N().style.paddingBottom = "".concat(44, "px"));
1865
- }, Dn = () => {
1866
- const e = N();
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 = jn(n);
1933
+ t = Po(n);
1870
1934
  }, e.ontouchmove = (n) => {
1871
1935
  t && (n.preventDefault(), n.stopPropagation());
1872
1936
  };
1873
- }, jn = (e) => {
1874
- const t = e.target, n = N();
1875
- return $n(e) || Xn(e) ? !1 : t === n || !nt(n) && t.tagName !== "INPUT" && // #1603
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
- !(nt(be()) && // #1944
1878
- be().contains(t));
1879
- }, $n = (e) => e.touches && e.touches.length && e.touches[0].touchType === "stylus", Xn = (e) => e.touches && e.touches.length > 1, qn = () => {
1880
- if (ue(document.body, d.iosfix)) {
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
- se(document.body, d.iosfix), document.body.style.top = "", document.body.scrollTop = e * -1;
1946
+ ke(document.body, i.iosfix), document.body.style.top = "", document.body.scrollTop = e * -1;
1883
1947
  }
1884
- }, ht = 10, zn = (e) => {
1885
- const t = N(), n = I();
1948
+ }, Ut = 10, Fo = (e) => {
1949
+ const t = T(), n = F();
1886
1950
  typeof e.willOpen == "function" && e.willOpen(n);
1887
- const p = window.getComputedStyle(document.body).overflowY;
1888
- Jn(t, n, e), setTimeout(() => {
1889
- Wn(t, n);
1890
- }, ht), ne() && (Kn(t, e.scrollbarPadding, p), Sn()), !$() && !P.previousActiveElement && (P.previousActiveElement = document.activeElement), typeof e.didOpen == "function" && setTimeout(() => e.didOpen(n)), se(t, d["no-transition"]);
1891
- }, pt = (e) => {
1892
- const t = I();
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 = N();
1896
- t.removeEventListener(Be, pt), n.style.overflowY = "auto";
1897
- }, Wn = (e, t) => {
1898
- Be && ot(t) ? (e.style.overflowY = "hidden", t.addEventListener(Be, pt)) : e.style.overflowY = "auto";
1899
- }, Kn = (e, t, n) => {
1900
- Nn(), t && n !== "hidden" && Mn(), setTimeout(() => {
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
- }, Jn = (e, t, n) => {
1904
- F(e, n.showClass.backdrop), t.style.setProperty("opacity", "0", "important"), X(t, "grid"), setTimeout(() => {
1905
- F(t, n.showClass.popup), t.style.removeProperty("opacity");
1906
- }, ht), F([document.documentElement, document.body], d.shown), n.heightAuto && n.backdrop && !n.toast && F([document.documentElement, document.body], d["height-auto"]);
1907
- }, ke = (e) => {
1908
- let t = I();
1909
- t || new Oe(), t = I();
1910
- const n = C();
1911
- $() ? z(le()) : Yn(t, e), X(n), t.setAttribute("data-loading", !0), t.setAttribute("aria-busy", !0), t.focus();
1912
- }, Yn = (e, t) => {
1913
- const n = b(), r = C();
1914
- !t && ee(g()) && (t = g()), X(n), t && (z(t), r.setAttribute("data-button-to-replace", t.className)), r.parentNode.insertBefore(r, t), F([e, n], d.loading);
1915
- }, Gn = (e, t) => {
1916
- t.input === "select" || t.input === "radio" ? no(e, t) : ["text", "email", "number", "tel", "textarea"].includes(t.input) && (V(t.inputValue) || J(t.inputValue)) && (ke(g()), oo(e, t));
1917
- }, Zn = (e, t) => {
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 Qn(n);
1987
+ return jo(n);
1924
1988
  case "radio":
1925
- return eo(n);
1989
+ return Do(n);
1926
1990
  case "file":
1927
- return to(n);
1991
+ return Vo(n);
1928
1992
  default:
1929
1993
  return t.inputAutoTrim ? n.value.trim() : n.value;
1930
1994
  }
1931
- }, Qn = (e) => e.checked ? 1 : 0, eo = (e) => e.checked ? e.value : null, to = (e) => e.files.length ? e.getAttribute("multiple") !== null ? e.files : e.files[0] : null, no = (e, t) => {
1932
- const n = I(), r = (p) => ro[t.input](n, qe(p), t);
1933
- V(t.inputOptions) || J(t.inputOptions) ? (ke(g()), T(t.inputOptions).then((p) => {
1934
- e.hideLoading(), r(p);
1935
- })) : typeof t.inputOptions == "object" ? r(t.inputOptions) : h("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof t.inputOptions));
1936
- }, oo = (e, t) => {
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
- z(n), T(t.inputValue).then((r) => {
1939
- n.value = t.input === "number" ? parseFloat(r) || 0 : "".concat(r), X(n), n.focus(), e.hideLoading();
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
- h("Error in inputValue promise: ".concat(r)), n.value = "", X(n), n.focus(), e.hideLoading();
2005
+ M("Error in inputValue promise: ".concat(r)), n.value = "", G(n), n.focus(), e.hideLoading();
1942
2006
  });
1943
- }, ro = {
2007
+ }, qo = {
1944
2008
  select: (e, t, n) => {
1945
- const r = fe(e, d.select), p = (A, O, te) => {
1946
- const W = document.createElement("option");
1947
- W.value = te, q(W, O), W.selected = mt(te, n.inputValue), A.appendChild(W);
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((A) => {
1950
- const O = A[0], te = A[1];
1951
- if (Array.isArray(te)) {
1952
- const W = document.createElement("optgroup");
1953
- W.label = O, W.disabled = !1, r.appendChild(W), te.forEach((xe) => p(W, xe[1], xe[0]));
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
- p(r, te, O);
2019
+ d(r, ue, J);
1956
2020
  }), r.focus();
1957
2021
  },
1958
2022
  radio: (e, t, n) => {
1959
- const r = fe(e, d.radio);
1960
- t.forEach((A) => {
1961
- const O = A[0], te = A[1], W = document.createElement("input"), xe = document.createElement("label");
1962
- W.type = "radio", W.name = d.radio, W.value = O, mt(O, n.inputValue) && (W.checked = !0);
1963
- const Ze = document.createElement("span");
1964
- q(Ze, te), Ze.className = d.label, xe.appendChild(W), xe.appendChild(Ze), r.appendChild(xe);
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 p = r.querySelectorAll("input");
1967
- p.length && p[0].focus();
2030
+ const d = r.querySelectorAll("input");
2031
+ d.length && d[0].focus();
1968
2032
  }
1969
- }, qe = (e) => {
2033
+ }, lt = (e) => {
1970
2034
  const t = [];
1971
2035
  return typeof Map < "u" && e instanceof Map ? e.forEach((n, r) => {
1972
- let p = n;
1973
- typeof p == "object" && (p = qe(p)), t.push([r, p]);
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 = qe(r)), t.push([n, r]);
2040
+ typeof r == "object" && (r = lt(r)), t.push([n, r]);
1977
2041
  }), t;
1978
- }, mt = (e, t) => t && t.toString() === e.toString();
1979
- function gt() {
1980
- const e = H.innerParams.get(this);
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 = H.domCache.get(this);
1984
- z(t.loader), $() ? e.icon && X(le()) : so(t), se([t.popup, t.actions], d.loading), t.popup.removeAttribute("aria-busy"), t.popup.removeAttribute("data-loading"), t.confirmButton.disabled = !1, t.denyButton.disabled = !1, t.cancelButton.disabled = !1;
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 so = (e) => {
2050
+ const Wo = (e) => {
1987
2051
  const t = e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));
1988
- t.length ? X(t[0], "inline-block") : Lt() && z(e.actions);
2052
+ t.length ? G(t[0], "inline-block") : yn() && ne(e.actions);
1989
2053
  };
1990
- function io(e) {
1991
- const t = H.innerParams.get(e || this), n = H.domCache.get(e || this);
1992
- return n ? Ve(n.popup, t.input) : null;
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 Pe = {
2058
+ var Ne = {
1995
2059
  swalPromiseResolve: /* @__PURE__ */ new WeakMap(),
1996
2060
  swalPromiseReject: /* @__PURE__ */ new WeakMap()
1997
2061
  };
1998
- const ao = () => ee(I()), vt = () => g() && g().click(), co = () => w() && w().click(), lo = () => v() && v().click(), bt = (e) => {
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
- }, uo = (e, t, n, r) => {
2003
- bt(t), n.toast || (t.keydownHandler = (p) => ho(e, p, r), t.keydownTarget = n.keydownListenerCapture ? window : I(), t.keydownListenerCapture = n.keydownListenerCapture, t.keydownTarget.addEventListener("keydown", t.keydownHandler, {
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
- }, ze = (e, t, n) => {
2007
- const r = G();
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
- I().focus();
2011
- }, wt = ["ArrowRight", "ArrowDown"], fo = ["ArrowLeft", "ArrowUp"], ho = (e, t, n) => {
2012
- const r = H.innerParams.get(e);
2013
- r && (t.isComposing || t.keyCode === 229 || (r.stopKeydownPropagation && t.stopPropagation(), t.key === "Enter" ? po(e, t, r) : t.key === "Tab" ? mo(t, r) : [...wt, ...fo].includes(t.key) ? go(t.key) : t.key === "Escape" && vo(t, r, n)));
2014
- }, po = (e, t, n) => {
2015
- if (R(n.allowEnterKey) && t.target && e.getInput() && t.target.outerHTML === e.getInput().outerHTML) {
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
- vt(), t.preventDefault();
2082
+ Ht(), t.preventDefault();
2019
2083
  }
2020
- }, mo = (e, t) => {
2021
- const n = e.target, r = G();
2022
- let p = -1;
2023
- for (let A = 0; A < r.length; A++)
2024
- if (n === r[A]) {
2025
- p = A;
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 ? ze(t, p, -1) : ze(t, p, 1), e.stopPropagation(), e.preventDefault();
2029
- }, go = (e) => {
2030
- const t = g(), n = w(), r = v();
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 p = wt.includes(e) ? "nextElementSibling" : "previousElementSibling";
2034
- let A = document.activeElement;
2035
- for (let O = 0; O < b().children.length; O++) {
2036
- if (A = A[p], !A)
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 (ee(A) && A instanceof HTMLButtonElement)
2102
+ if (le(P) && P instanceof HTMLButtonElement)
2039
2103
  break;
2040
2104
  }
2041
- A instanceof HTMLButtonElement && A.focus();
2042
- }, vo = (e, t, n) => {
2043
- R(t.allowEscapeKey) && (e.preventDefault(), n(ye.esc));
2105
+ P instanceof HTMLButtonElement && P.focus();
2106
+ }, nr = (e, t, n) => {
2107
+ Y(t.allowEscapeKey) && (e.preventDefault(), n(Ue.esc));
2044
2108
  };
2045
- function yt(e, t, n, r) {
2046
- $() ? kt(e, r) : (Ot(n).then(() => kt(e, r)), bt(P)), /^((?!chrome|android).)*safari/i.test(navigator.userAgent) ? (t.setAttribute("style", "display:none !important"), t.removeAttribute("class"), t.innerHTML = "") : t.remove(), ne() && (On(), qn(), ut()), bo();
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 bo() {
2049
- se([document.documentElement, document.body], [d.shown, d["height-auto"], d["no-backdrop"], d["toast-shown"]]);
2112
+ function or() {
2113
+ ke([document.documentElement, document.body], [i.shown, i["height-auto"], i["no-backdrop"], i["toast-shown"]]);
2050
2114
  }
2051
- function Ue(e) {
2052
- e = Co(e);
2053
- const t = Pe.swalPromiseResolve.get(this), n = yo(this);
2054
- this.isAwaitingPromise() ? e.isDismissed || (He(this), t(e)) : n && t(e);
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 wo() {
2057
- return !!H.awaitingPromise.get(this);
2120
+ function rr() {
2121
+ return !!R.awaitingPromise.get(this);
2058
2122
  }
2059
- const yo = (e) => {
2060
- const t = I();
2123
+ const sr = (e) => {
2124
+ const t = F();
2061
2125
  if (!t)
2062
2126
  return !1;
2063
- const n = H.innerParams.get(e);
2064
- if (!n || ue(t, n.hideClass.popup))
2127
+ const n = R.innerParams.get(e);
2128
+ if (!n || Ce(t, n.hideClass.popup))
2065
2129
  return !1;
2066
- se(t, n.showClass.popup), F(t, n.hideClass.popup);
2067
- const r = N();
2068
- return se(r, n.showClass.backdrop), F(r, n.hideClass.backdrop), xo(e, t, n), !0;
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 ko(e) {
2071
- const t = Pe.swalPromiseReject.get(this);
2072
- He(this), t && t(e);
2134
+ function ir(e) {
2135
+ const t = Ne.swalPromiseReject.get(this);
2136
+ $e(this), t && t(e);
2073
2137
  }
2074
- const He = (e) => {
2075
- e.isAwaitingPromise() && (H.awaitingPromise.delete(e), H.innerParams.get(e) || e._destroy());
2076
- }, Co = (e) => typeof e > "u" ? {
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), xo = (e, t, n) => {
2085
- const r = N(), p = Be && ot(t);
2086
- typeof n.willClose == "function" && n.willClose(t), p ? So(e, t, r, n.returnFocus, n.didClose) : yt(e, r, n.returnFocus, n.didClose);
2087
- }, So = (e, t, n, r, p) => {
2088
- P.swalCloseEventFinishedCallback = yt.bind(null, e, n, r, p), t.addEventListener(Be, function(A) {
2089
- A.target === t && (P.swalCloseEventFinishedCallback(), delete P.swalCloseEventFinishedCallback);
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
- }, kt = (e, t) => {
2155
+ }, Nt = (e, t) => {
2092
2156
  setTimeout(() => {
2093
2157
  typeof t == "function" && t.bind(e.params)(), e._destroy();
2094
2158
  });
2095
2159
  };
2096
- function Ct(e, t, n) {
2097
- const r = H.domCache.get(e);
2098
- t.forEach((p) => {
2099
- r[p].disabled = n;
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 xt(e, t) {
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 p = 0; p < r.length; p++)
2108
- r[p].disabled = t;
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 _o() {
2113
- Ct(this, ["confirmButton", "denyButton", "cancelButton"], !1);
2176
+ function ur() {
2177
+ $t(this, ["confirmButton", "denyButton", "cancelButton"], !1);
2114
2178
  }
2115
- function Ao() {
2116
- Ct(this, ["confirmButton", "denyButton", "cancelButton"], !0);
2179
+ function dr() {
2180
+ $t(this, ["confirmButton", "denyButton", "cancelButton"], !0);
2117
2181
  }
2118
- function Eo() {
2119
- return xt(this.getInput(), !1);
2182
+ function fr() {
2183
+ return qt(this.getInput(), !1);
2120
2184
  }
2121
- function Bo() {
2122
- return xt(this.getInput(), !0);
2185
+ function hr() {
2186
+ return qt(this.getInput(), !0);
2123
2187
  }
2124
- function To(e) {
2125
- const t = H.domCache.get(this), n = H.innerParams.get(this);
2126
- q(t.validationMessage, e), t.validationMessage.className = d["validation-message"], n.customClass && n.customClass.validationMessage && F(t.validationMessage, n.customClass.validationMessage), X(t.validationMessage);
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", d["validation-message"]), Qe(r), F(r, d.inputerror));
2192
+ r && (r.setAttribute("aria-invalid", !0), r.setAttribute("aria-describedby", i["validation-message"]), yt(r), D(r, i.inputerror));
2129
2193
  }
2130
- function Po() {
2131
- const e = H.domCache.get(this);
2132
- e.validationMessage && z(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"), se(t, d.inputerror));
2198
+ t && (t.removeAttribute("aria-invalid"), t.removeAttribute("aria-describedby"), ke(t, i.inputerror));
2135
2199
  }
2136
- function Ho() {
2137
- return H.domCache.get(this).progressSteps;
2200
+ function mr() {
2201
+ return R.domCache.get(this).progressSteps;
2138
2202
  }
2139
- function Io(e) {
2140
- const t = I(), n = H.innerParams.get(this);
2141
- if (!t || ue(t, n.hideClass.popup))
2142
- return y("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.");
2143
- const r = Fo(e), p = Object.assign({}, n, r);
2144
- lt(this, p), H.innerParams.set(this, p), Object.defineProperties(this, {
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 Fo = (e) => {
2216
+ const br = (e) => {
2153
2217
  const t = {};
2154
2218
  return Object.keys(e).forEach((n) => {
2155
- Se(n) ? t[n] = e[n] : y('Invalid parameter to update: "'.concat(n, `". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js
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 Lo() {
2161
- const e = H.domCache.get(this), t = H.innerParams.get(this);
2224
+ function wr() {
2225
+ const e = R.domCache.get(this), t = R.innerParams.get(this);
2162
2226
  if (!t) {
2163
- St(this);
2227
+ Wt(this);
2164
2228
  return;
2165
2229
  }
2166
- e.popup && P.swalCloseEventFinishedCallback && (P.swalCloseEventFinishedCallback(), delete P.swalCloseEventFinishedCallback), P.deferDisposalTimer && (clearTimeout(P.deferDisposalTimer), delete P.deferDisposalTimer), typeof t.didDestroy == "function" && t.didDestroy(), Ro(this);
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 Ro = (e) => {
2169
- St(e), delete e.params, delete P.keydownHandler, delete P.keydownTarget, delete P.currentInstance;
2170
- }, St = (e) => {
2171
- e.isAwaitingPromise() ? (We(H, e), H.awaitingPromise.set(e, !0)) : (We(Pe, e), We(H, e));
2172
- }, We = (e, t) => {
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 _t = /* @__PURE__ */ Object.freeze({
2177
- hideLoading: gt,
2178
- disableLoading: gt,
2179
- getInput: io,
2180
- close: Ue,
2181
- isAwaitingPromise: wo,
2182
- rejectPromise: ko,
2183
- handleAwaitingPromise: He,
2184
- closePopup: Ue,
2185
- closeModal: Ue,
2186
- closeToast: Ue,
2187
- enableButtons: _o,
2188
- disableButtons: Ao,
2189
- enableInput: Eo,
2190
- disableInput: Bo,
2191
- showValidationMessage: To,
2192
- resetValidationMessage: Po,
2193
- getProgressSteps: Ho,
2194
- update: Io,
2195
- _destroy: Lo
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 Uo = (e) => {
2198
- const t = H.innerParams.get(e);
2199
- e.disableButtons(), t.input ? At(e, "confirm") : Je(e, !0);
2200
- }, Mo = (e) => {
2201
- const t = H.innerParams.get(e);
2202
- e.disableButtons(), t.returnInputValueOnDeny ? At(e, "deny") : Ke(e, !1);
2203
- }, Oo = (e, t) => {
2204
- e.disableButtons(), t(ye.cancel);
2205
- }, At = (e, t) => {
2206
- const n = H.innerParams.get(e);
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 h('The "input" parameter is needed to be set when using returnInputValueOn'.concat(k(t)));
2209
- const r = Zn(e, n);
2210
- n.inputValidator ? No(e, r, t) : e.getInput().checkValidity() ? t === "deny" ? Ke(e, r) : Je(e, r) : (e.enableButtons(), e.showValidationMessage(n.validationMessage));
2211
- }, No = (e, t, n) => {
2212
- const r = H.innerParams.get(e);
2213
- e.disableInput(), Promise.resolve().then(() => T(r.inputValidator(t, r.validationMessage))).then((A) => {
2214
- e.enableButtons(), e.enableInput(), A ? e.showValidationMessage(A) : n === "deny" ? Ke(e, t) : Je(e, t);
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
- }, Ke = (e, t) => {
2217
- const n = H.innerParams.get(e || void 0);
2218
- n.showLoaderOnDeny && ke(w()), n.preDeny ? (H.awaitingPromise.set(e || void 0, !0), Promise.resolve().then(() => T(n.preDeny(t, n.validationMessage))).then((p) => {
2219
- p === !1 ? (e.hideLoading(), He(e)) : e.closePopup({
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 p > "u" ? t : p
2285
+ value: typeof d > "u" ? t : d
2222
2286
  });
2223
- }).catch((p) => Bt(e || void 0, p))) : e.closePopup({
2287
+ }).catch((d) => Yt(e || void 0, d))) : e.closePopup({
2224
2288
  isDenied: !0,
2225
2289
  value: t
2226
2290
  });
2227
- }, Et = (e, t) => {
2291
+ }, Jt = (e, t) => {
2228
2292
  e.closePopup({
2229
2293
  isConfirmed: !0,
2230
2294
  value: t
2231
2295
  });
2232
- }, Bt = (e, t) => {
2296
+ }, Yt = (e, t) => {
2233
2297
  e.rejectPromise(t);
2234
- }, Je = (e, t) => {
2235
- const n = H.innerParams.get(e || void 0);
2236
- n.showLoaderOnConfirm && ke(), n.preConfirm ? (e.resetValidationMessage(), H.awaitingPromise.set(e || void 0, !0), Promise.resolve().then(() => T(n.preConfirm(t, n.validationMessage))).then((p) => {
2237
- ee(c()) || p === !1 ? (e.hideLoading(), He(e)) : Et(e, typeof p > "u" ? t : p);
2238
- }).catch((p) => Bt(e || void 0, p))) : Et(e, t);
2239
- }, Vo = (e, t, n) => {
2240
- H.innerParams.get(e).toast ? Do(e, t, n) : ($o(t), Xo(t), qo(e, t, n));
2241
- }, Do = (e, t, n) => {
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 = H.innerParams.get(e);
2244
- r && (jo(r) || r.timer || r.input) || n(ye.close);
2307
+ const r = R.innerParams.get(e);
2308
+ r && (Er(r) || r.timer || r.input) || n(Ue.close);
2245
2309
  };
2246
- }, jo = (e) => e.showConfirmButton || e.showDenyButton || e.showCancelButton || e.showCloseButton;
2247
- let Me = !1;
2248
- const $o = (e) => {
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 && (Me = !0);
2315
+ e.container.onmouseup = void 0, t.target === e.container && (Ge = !0);
2252
2316
  };
2253
2317
  };
2254
- }, Xo = (e) => {
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)) && (Me = !0);
2321
+ e.popup.onmouseup = void 0, (t.target === e.popup || e.popup.contains(t.target)) && (Ge = !0);
2258
2322
  };
2259
2323
  };
2260
- }, qo = (e, t, n) => {
2324
+ }, Br = (e, t, n) => {
2261
2325
  t.container.onclick = (r) => {
2262
- const p = H.innerParams.get(e);
2263
- if (Me) {
2264
- Me = !1;
2326
+ const d = R.innerParams.get(e);
2327
+ if (Ge) {
2328
+ Ge = !1;
2265
2329
  return;
2266
2330
  }
2267
- r.target === t.container && R(p.allowOutsideClick) && n(ye.backdrop);
2331
+ r.target === t.container && Y(d.allowOutsideClick) && n(Ue.backdrop);
2268
2332
  };
2269
- }, zo = (e) => typeof e == "object" && e.jquery, Tt = (e) => e instanceof Element || zo(e), Wo = (e) => {
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" && !Tt(e[0]) ? Object.assign(t, e[0]) : ["title", "html", "icon"].forEach((n, r) => {
2272
- const p = e[r];
2273
- typeof p == "string" || Tt(p) ? t[n] = p : p !== void 0 && h("Unexpected type of ".concat(n, '! Expected "string" or "Element", got ').concat(typeof p));
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 Ko() {
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 Jo(e) {
2346
+ function Ur(e) {
2283
2347
  class t extends this {
2284
- _main(r, p) {
2285
- return super._main(r, Object.assign({}, e, p));
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 Yo = () => P.timeout && P.timeout.getTimerLeft(), Pt = () => {
2291
- if (P.timeout)
2292
- return Rt(), P.timeout.stop();
2293
- }, Ht = () => {
2294
- if (P.timeout) {
2295
- const e = P.timeout.start();
2296
- return De(e), e;
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
- }, Go = () => {
2299
- const e = P.timeout;
2300
- return e && (e.running ? Pt() : Ht());
2301
- }, Zo = (e) => {
2302
- if (P.timeout) {
2303
- const t = P.timeout.increase(e);
2304
- return De(t, !0), t;
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
- }, Qo = () => P.timeout && P.timeout.isRunning();
2307
- let It = !1;
2308
- const Ye = {};
2309
- function er() {
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
- Ye[e] = this, It || (document.body.addEventListener("click", tr), It = !0);
2375
+ pt[e] = this, Qt || (document.body.addEventListener("click", Dr), Qt = !0);
2312
2376
  }
2313
- const tr = (e) => {
2377
+ const Dr = (e) => {
2314
2378
  for (let t = e.target; t && t !== document; t = t.parentNode)
2315
- for (const n in Ye) {
2379
+ for (const n in pt) {
2316
2380
  const r = t.getAttribute(n);
2317
2381
  if (r) {
2318
- Ye[n].fire({
2382
+ pt[n].fire({
2319
2383
  template: r
2320
2384
  });
2321
2385
  return;
2322
2386
  }
2323
2387
  }
2324
2388
  };
2325
- var nr = /* @__PURE__ */ Object.freeze({
2326
- isValidParameter: ie,
2327
- isUpdatableParameter: Se,
2328
- isDeprecatedParameter: de,
2329
- argsToParams: Wo,
2330
- isVisible: ao,
2331
- clickConfirm: vt,
2332
- clickDeny: co,
2333
- clickCancel: lo,
2334
- getContainer: N,
2335
- getPopup: I,
2336
- getTitle: ve,
2337
- getHtmlContainer: be,
2338
- getImage: Ae,
2339
- getIcon: le,
2340
- getInputLabel: m,
2341
- getCloseButton: E,
2342
- getActions: b,
2343
- getConfirmButton: g,
2344
- getDenyButton: w,
2345
- getCancelButton: v,
2346
- getLoader: C,
2347
- getFooter: _,
2348
- getTimerProgressBar: S,
2349
- getFocusableElements: G,
2350
- getValidationMessage: c,
2351
- isLoading: pe,
2352
- fire: Ko,
2353
- mixin: Jo,
2354
- showLoading: ke,
2355
- enableLoading: ke,
2356
- getTimerLeft: Yo,
2357
- stopTimer: Pt,
2358
- resumeTimer: Ht,
2359
- toggleTimer: Go,
2360
- increaseTimer: Zo,
2361
- isTimerRunning: Qo,
2362
- bindClickHandler: er
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 Ge;
2365
- class Ce {
2428
+ let gt;
2429
+ class Oe {
2366
2430
  constructor() {
2367
2431
  if (typeof window > "u")
2368
2432
  return;
2369
- Ge = this;
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 p = Object.freeze(this.constructor.argsToParams(n));
2436
+ const d = Object.freeze(this.constructor.argsToParams(n));
2373
2437
  Object.defineProperties(this, {
2374
2438
  params: {
2375
- value: p,
2439
+ value: d,
2376
2440
  writable: !1,
2377
2441
  enumerable: !0,
2378
2442
  configurable: !0
2379
2443
  }
2380
2444
  });
2381
- const A = this._main(this.params);
2382
- H.promise.set(this, A);
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
- Ne(Object.assign({}, n, t)), P.currentInstance && (P.currentInstance._destroy(), ne() && ut()), P.currentInstance = this;
2387
- const r = rr(t, n);
2388
- Rn(r), Object.freeze(r), P.timeout && (P.timeout.stop(), delete P.timeout), clearTimeout(P.restoreFocusTimeout);
2389
- const p = sr(this);
2390
- return lt(this, r), H.innerParams.set(this, r), or(this, p, r);
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 H.promise.get(this).then(t);
2458
+ return R.promise.get(this).then(t);
2395
2459
  }
2396
2460
  finally(t) {
2397
- return H.promise.get(this).finally(t);
2461
+ return R.promise.get(this).finally(t);
2398
2462
  }
2399
2463
  }
2400
- const or = (e, t, n) => new Promise((r, p) => {
2401
- const A = (O) => {
2464
+ const Nr = (e, t, n) => new Promise((r, d) => {
2465
+ const P = (J) => {
2402
2466
  e.closePopup({
2403
2467
  isDismissed: !0,
2404
- dismiss: O
2468
+ dismiss: J
2405
2469
  });
2406
2470
  };
2407
- Pe.swalPromiseResolve.set(e, r), Pe.swalPromiseReject.set(e, p), t.confirmButton.onclick = () => Uo(e), t.denyButton.onclick = () => Mo(e), t.cancelButton.onclick = () => Oo(e, A), t.closeButton.onclick = () => A(ye.close), Vo(e, t, A), uo(e, P, n, A), Gn(e, n), zn(n), ir(P, n, A), ar(t, n), setTimeout(() => {
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
- }), rr = (e, t) => {
2411
- const n = _n(e), r = Object.assign({}, D, t, n, e);
2412
- return r.showClass = Object.assign({}, D.showClass, r.showClass), r.hideClass = Object.assign({}, D.hideClass, r.hideClass), r;
2413
- }, sr = (e) => {
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: I(),
2416
- container: N(),
2417
- actions: b(),
2418
- confirmButton: g(),
2419
- denyButton: w(),
2420
- cancelButton: v(),
2421
- loader: C(),
2422
- closeButton: E(),
2423
- validationMessage: c(),
2424
- progressSteps: s()
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 H.domCache.set(e, t), t;
2427
- }, ir = (e, t, n) => {
2428
- const r = S();
2429
- z(r), t.timer && (e.timeout = new Un(() => {
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 && (X(r), oe(r, t, "timerProgressBar"), setTimeout(() => {
2432
- e.timeout && e.timeout.running && De(t.timer);
2495
+ }, t.timer), t.timerProgressBar && (G(r), pe(r, t, "timerProgressBar"), setTimeout(() => {
2496
+ e.timeout && e.timeout.running && st(t.timer);
2433
2497
  })));
2434
- }, ar = (e, t) => {
2498
+ }, Kr = (e, t) => {
2435
2499
  if (!t.toast) {
2436
- if (!R(t.allowEnterKey))
2437
- return lr();
2438
- cr(e, t) || ze(t, -1, 1);
2500
+ if (!Y(t.allowEnterKey))
2501
+ return Jr();
2502
+ zr(e, t) || ut(t, -1, 1);
2439
2503
  }
2440
- }, cr = (e, t) => t.focusDeny && ee(e.denyButton) ? (e.denyButton.focus(), !0) : t.focusCancel && ee(e.cancelButton) ? (e.cancelButton.focus(), !0) : t.focusConfirm && ee(e.confirmButton) ? (e.confirmButton.focus(), !0) : !1, lr = () => {
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(Ce.prototype, _t), Object.assign(Ce, nr), Object.keys(_t).forEach((e) => {
2444
- Ce[e] = function() {
2445
- if (Ge)
2446
- return Ge[e](...arguments);
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
- }), Ce.DismissReason = ye, Ce.version = "11.4.8";
2449
- const Oe = Ce;
2450
- return Oe.default = Oe, Oe;
2451
- }), typeof commonjsGlobal < "u" && commonjsGlobal.Sweetalert2 && (commonjsGlobal.swal = commonjsGlobal.sweetAlert = commonjsGlobal.Swal = commonjsGlobal.SweetAlert = commonjsGlobal.Sweetalert2);
2452
- })(sweetalert2);
2453
- var sweetalert2Exports = sweetalert2.exports;
2454
- const Swal = /* @__PURE__ */ getDefaultExportFromCjs(sweetalert2Exports);
2455
- class DialogService {
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 Swal.isVisible();
2521
+ return tn.isVisible();
2458
2522
  }
2459
2523
  async ConfirmAsync(o) {
2460
- return new Promise((u) => {
2461
- Swal.fire({
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((f) => {
2471
- u(f.isConfirmed === !0);
2534
+ }).then((y) => {
2535
+ f(y.isConfirmed === !0);
2472
2536
  });
2473
2537
  });
2474
2538
  }
2475
2539
  }
2476
- const service = new DialogService(), UseDialogService = () => service, _hoisted_1$5 = ["data-cor"], _sfc_main$7 = /* @__PURE__ */ defineComponent({
2540
+ const Ls = new Fs(), Us = () => Ls, Ms = ["data-cor"], Os = /* @__PURE__ */ Te({
2477
2541
  __name: "HeaderAvatar",
2478
- setup(a) {
2479
- const o = UseDialogService(), u = k();
2480
- async function f() {
2542
+ setup(c) {
2543
+ const o = Us(), f = L();
2544
+ async function y() {
2481
2545
  await o.ConfirmAsync({
2482
- message: `${AuthService.User.username} - ${AuthService.User.name}.<br /><br />Você deseja sair da conta?`,
2546
+ message: `${se.User.username} - ${se.User.name}.<br /><br />Você deseja sair da conta?`,
2483
2547
  confirmLabel: "sair"
2484
- }) && AuthService.CallLogout();
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 y = AuthService.User.name;
2488
- let h = "?";
2489
- if (!y)
2490
- return h;
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": l(),
2501
- onClick: f
2502
- }, toDisplayString(unref(u)), 9, _hoisted_1$5));
2564
+ "data-cor": k(),
2565
+ onClick: y
2566
+ }, tt(Ee(f)), 9, Ms));
2503
2567
  }
2504
- }), _sfc_main$6 = {}, _hoisted_1$4 = {
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
- }, _hoisted_2$4 = /* @__PURE__ */ createElementVNode("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), _hoisted_3$2 = [
2511
- _hoisted_2$4
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 _sfc_render(a, o) {
2514
- return openBlock(), createElementBlock("svg", _hoisted_1$4, _hoisted_3$2);
2577
+ function Vs(c, o) {
2578
+ return oe(), ve("svg", Hs, Ds);
2515
2579
  }
2516
- const MenuIcon = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]);
2517
- class ThemeToggle {
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 ThemeToggleBase = (() => new ThemeToggle())(), _hoisted_1$3 = /* @__PURE__ */ createStaticVNode('<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), _hoisted_2$3 = [
2544
- _hoisted_1$3
2545
- ], _sfc_main$5 = /* @__PURE__ */ defineComponent({
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(a) {
2548
- return (o, u) => (openBlock(), createElementBlock("button", {
2611
+ setup(c) {
2612
+ return (o, f) => (oe(), ve("button", {
2549
2613
  id: "sf-theme-toggle",
2550
- onClick: u[0] || (u[0] = //@ts-ignore
2551
- (...f) => unref(ThemeToggleBase).Toggle && unref(ThemeToggleBase).Toggle(...f))
2552
- }, _hoisted_2$3));
2614
+ onClick: f[0] || (f[0] = //@ts-ignore
2615
+ (...y) => Ee(wt).Toggle && Ee(wt).Toggle(...y))
2616
+ }, Ws));
2553
2617
  }
2554
- }), _hoisted_1$2 = { id: "sf-layout" }, _hoisted_2$2 = /* @__PURE__ */ createElementVNode("div", { class: "sf-layout-menu-toggler-logo" }, null, -1), _hoisted_3$1 = { class: "title" }, _hoisted_4$1 = { class: "sf-layout-nav-header" }, _hoisted_5$1 = /* @__PURE__ */ createElementVNode("span", null, "Menu", -1), _hoisted_6$1 = { class: "sf-layout-nav-content" }, _hoisted_7$1 = /* @__PURE__ */ createElementVNode("section", { id: "sf-layout-page-title" }, null, -1), _hoisted_8 = { id: "sf-layout-content" }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
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(a) {
2557
- const o = UseNavMenuService();
2558
- return (u, f) => (openBlock(), createElementBlock("div", _hoisted_1$2, [
2559
- createElementVNode("header", null, [
2560
- createElementVNode("div", {
2561
- class: normalizeClass([
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: unref(o).IsVisible }
2627
+ { invert: Ee(o).IsVisible }
2564
2628
  ]),
2565
- onClick: f[0] || (f[0] = (k) => unref(o).Toggle())
2629
+ onClick: y[0] || (y[0] = (L) => Ee(o).Toggle())
2566
2630
  }, [
2567
- _hoisted_2$2,
2568
- createVNode(MenuIcon)
2631
+ Js,
2632
+ We(Ns)
2569
2633
  ], 2),
2570
- createElementVNode("div", _hoisted_3$1, [
2571
- renderSlot(u.$slots, "title")
2634
+ q("div", Ys, [
2635
+ Pe(f.$slots, "title")
2572
2636
  ]),
2573
- renderSlot(u.$slots, "action"),
2574
- createVNode(_sfc_main$5),
2575
- createVNode(_sfc_main$7)
2637
+ Pe(f.$slots, "action"),
2638
+ We(Ks),
2639
+ We(Os)
2576
2640
  ]),
2577
- createElementVNode("nav", {
2578
- class: normalizeClass({ visible: unref(o).IsVisible })
2641
+ q("nav", {
2642
+ class: me({ visible: Ee(o).IsVisible })
2579
2643
  }, [
2580
- createElementVNode("div", _hoisted_4$1, [
2581
- _hoisted_5$1,
2582
- createVNode(_sfc_main$8, {
2644
+ q("div", Xs, [
2645
+ Zs,
2646
+ We(fn, {
2583
2647
  icone: "close",
2584
2648
  button: "",
2585
- onClick: f[1] || (f[1] = (k) => unref(o).Close())
2649
+ onClick: y[1] || (y[1] = (L) => Ee(o).Close())
2586
2650
  })
2587
2651
  ]),
2588
- createElementVNode("div", _hoisted_6$1, [
2589
- renderSlot(u.$slots, "menu")
2652
+ q("div", Gs, [
2653
+ Pe(f.$slots, "menu")
2590
2654
  ])
2591
2655
  ], 2),
2592
- createElementVNode("main", {
2593
- class: normalizeClass({ "menu-visible": unref(o).IsVisible })
2656
+ q("main", {
2657
+ class: me({ "menu-visible": Ee(o).IsVisible })
2594
2658
  }, [
2595
- _hoisted_7$1,
2596
- createElementVNode("section", _hoisted_8, [
2597
- renderSlot(u.$slots, "content")
2659
+ Qs,
2660
+ q("section", ei, [
2661
+ Pe(f.$slots, "content")
2598
2662
  ])
2599
2663
  ], 2)
2600
2664
  ]));
2601
2665
  }
2602
- }), _hoisted_1$1 = ["href", "data-active", "onClick"], _hoisted_2$1 = { class: "sf-navmenulink-text" }, _sfc_main$3 = /* @__PURE__ */ defineComponent({
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(a) {
2610
- const o = a, u = UseNavMenuService();
2611
- function f(k, l) {
2612
- k.preventDefault();
2613
- const h = k.target.closest(".sf-layout-nav-content");
2614
- l(), h && h.clientWidth + 10 > document.body.clientWidth && u.Close();
2615
- }
2616
- return (k, l) => {
2617
- const y = resolveComponent("router-link");
2618
- return openBlock(), createBlock(y, {
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: withCtx(({ href: h, navigate: x, isExactActive: B }) => [
2623
- createElementVNode("a", {
2687
+ default: an(({ href: M, navigate: h, isExactActive: K, isActive: W }) => [
2688
+ q("a", {
2624
2689
  class: "sf-navmenulink",
2625
- href: h,
2626
- "data-active": B,
2627
- onClick: (U) => f(U, x)
2690
+ href: M,
2691
+ "data-active": o.exact ? K : W,
2692
+ onClick: (Y) => y(Y, h)
2628
2693
  }, [
2629
- o.icon ? (openBlock(), createBlock(_sfc_main$8, {
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"])) : createCommentVNode("", !0),
2634
- createElementVNode("span", _hoisted_2$1, toDisplayString(o.text), 1)
2635
- ], 8, _hoisted_1$1)
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
- }), _sfc_main$2 = /* @__PURE__ */ defineComponent({
2706
+ }), oi = /* @__PURE__ */ Te({
2642
2707
  __name: "ScrollToTop",
2643
- setup(a) {
2644
- const o = ref(!1), u = `--${+/* @__PURE__ */ new Date()}`;
2645
- let f = null;
2646
- function k() {
2647
- f == null || f.scrollTo(0, 0);
2648
- }
2649
- return onMounted(() => {
2650
- var l;
2651
- f = ((l = document.getElementById(u)) == null ? void 0 : l.parentElement) ?? null, f && f.addEventListener("scroll", function() {
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
- }), (l, y) => (openBlock(), createElementBlock("button", {
2655
- id: u,
2656
- class: normalizeClass(["sf-scrollToTop", { "sf-scrollToTop-visible": o.value }]),
2657
- onClick: k
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
- }), _sfc_main$1 = /* @__PURE__ */ defineComponent({
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(a) {
2670
- const o = a;
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 CssClassBuilder("sf-content-body").AddClass("sf-content-no-padding", o.disableBodyPadding).Build();
2737
+ return new ze("sf-content").AddClass(o.class, !!o.class).Build();
2676
2738
  }
2677
- function k() {
2678
- return new CssClassBuilder("sf-content-header").AddClass("sf-content-no-padding", o.disableHeaderPadding).Build();
2739
+ function y() {
2740
+ return new ze("sf-content-body").AddClass("sf-content-no-padding", o.disableBodyPadding).Build();
2679
2741
  }
2680
- function l() {
2681
- return new CssClassBuilder("sf-content-footer").AddClass("sf-content-no-padding", o.disableFooterPadding).Build();
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 (y, h) => (openBlock(), createElementBlock("div", {
2684
- class: normalizeClass(u()),
2685
- style: normalizeStyle(o.style)
2748
+ return (B, M) => (oe(), ve("div", {
2749
+ class: me(f()),
2750
+ style: nn(o.style)
2686
2751
  }, [
2687
- createElementVNode("div", {
2688
- class: normalizeClass(k())
2752
+ q("div", {
2753
+ class: me(L())
2689
2754
  }, [
2690
- renderSlot(y.$slots, "header")
2755
+ Pe(B.$slots, "header")
2691
2756
  ], 2),
2692
- createElementVNode("div", {
2693
- class: normalizeClass(f())
2757
+ q("div", {
2758
+ class: me(y())
2694
2759
  }, [
2695
- renderSlot(y.$slots, "default"),
2696
- createVNode(_sfc_main$2)
2760
+ Pe(B.$slots, "default"),
2761
+ We(oi)
2697
2762
  ], 2),
2698
- createElementVNode("div", {
2699
- class: normalizeClass(l())
2763
+ q("div", {
2764
+ class: me(k())
2700
2765
  }, [
2701
- renderSlot(y.$slots, "footer")
2766
+ Pe(B.$slots, "footer")
2702
2767
  ], 2)
2703
2768
  ], 6));
2704
2769
  }
2705
- }), _hoisted_1 = { class: "sf-tab-navigation" }, _hoisted_2 = /* @__PURE__ */ createElementVNode("svg", {
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__ */ createElementVNode("path", {
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), _hoisted_3 = [
2719
- _hoisted_2
2720
- ], _hoisted_4 = ["data-active"], _hoisted_5 = ["href", "onClick"], _hoisted_6 = /* @__PURE__ */ createElementVNode("svg", {
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__ */ createElementVNode("path", {
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), _hoisted_7 = [
2734
- _hoisted_6
2735
- ], _sfc_main = /* @__PURE__ */ defineComponent({
2798
+ ], -1), ui = [
2799
+ li
2800
+ ], mi = /* @__PURE__ */ Te({
2736
2801
  __name: "TabNavigation",
2737
2802
  props: {
2738
2803
  tabs: {}
2739
2804
  },
2740
- setup(a) {
2741
- const o = a, u = ref(null), f = new ResizeObserver((x) => {
2742
- h();
2743
- }), k = ref(!1), l = ref(!1);
2744
- function y(x = !1) {
2745
- const B = u.value.clientWidth;
2746
- u.value.scrollLeft += x ? -B : B;
2747
- }
2748
- function h() {
2749
- const x = u.value.scrollWidth - u.value.clientWidth;
2750
- k.value = u.value.scrollLeft > 10, l.value = u.value.scrollLeft < x - 10;
2751
- }
2752
- return onMounted(() => {
2753
- u.value.addEventListener("scroll", h), f.observe(u.value);
2754
- }), onBeforeUnmount(() => {
2755
- var x;
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
- (x = u.value) == null || x.removeEventListener(
2822
+ (h = f.value) == null || h.removeEventListener(
2758
2823
  "scroll",
2759
- h
2760
- ), f.unobserve(u.value), f.disconnect();
2824
+ M
2825
+ ), y.unobserve(f.value), y.disconnect();
2761
2826
  } catch {
2762
2827
  }
2763
- }), (x, B) => {
2764
- const U = resolveComponent("RouterLink");
2765
- return openBlock(), createElementBlock("div", _hoisted_1, [
2766
- createElementVNode("div", {
2767
- class: normalizeClass(["left-arrow", { active: k.value }]),
2768
- onClick: B[0] || (B[0] = (R) => y(!0))
2769
- }, _hoisted_3, 2),
2770
- createElementVNode("ul", {
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: u
2837
+ ref: f
2773
2838
  }, [
2774
- (openBlock(!0), createElementBlock(Fragment, null, renderList(o.tabs, (R) => (openBlock(), createBlock(U, {
2775
- to: R.route,
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: withCtx(({ navigate: V, isActive: T }) => [
2779
- createElementVNode("li", { "data-active": T }, [
2780
- renderSlot(x.$slots, "item", {
2781
- item: R,
2782
- navigate: V,
2783
- isActive: T
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
- createElementVNode("a", {
2786
- href: R.route,
2787
- class: normalizeClass({ active: T }),
2788
- onClick: V
2789
- }, toDisplayString(R.text), 11, _hoisted_5)
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, _hoisted_4)
2856
+ ], 8, ai)
2792
2857
  ]),
2793
2858
  _: 2
2794
2859
  }, 1032, ["to"]))), 256))
2795
2860
  ], 512),
2796
- createElementVNode("div", {
2797
- class: normalizeClass(["right-arrow", { active: l.value }]),
2798
- onClick: B[1] || (B[1] = (R) => y())
2799
- }, _hoisted_7, 2)
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 AppResult {
2869
+ class vi {
2805
2870
  constructor(o = null) {
2806
- Ie(this, "errors", []);
2807
- Ie(this, "_value", null);
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 a() {
2829
- nextTick(() => {
2892
+ function c() {
2893
+ ns(() => {
2830
2894
  setTimeout(() => {
2831
- var u;
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
- `${((u = window.visualViewport) == null ? void 0 : u.height) ?? window.innerHeight}px`
2900
+ `${((f = window.visualViewport) == null ? void 0 : f.height) ?? window.innerHeight}px`
2837
2901
  );
2838
2902
  }, 1);
2839
2903
  });
2840
2904
  }
2841
- a(), window.addEventListener("resize", a);
2905
+ c(), window.addEventListener("resize", c);
2842
2906
  })();
2843
- ThemeToggleBase.SetInitialTheme();
2907
+ wt.SetInitialTheme();
2844
2908
  export {
2845
- AppResult,
2846
- AuthService,
2847
- Cor,
2848
- _sfc_main$1 as SfContent,
2849
- _sfc_main$8 as SfIcon,
2850
- _sfc_main$4 as SfLayout,
2851
- _sfc_main$3 as SfNavMenuLink,
2852
- _sfc_main as SfTabNavigation,
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