@vezham/hooks 0.1.0 → 0.2.0-poc-env-1

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/index.mjs CHANGED
@@ -1,107 +1,649 @@
1
- import p, { useState as ke, useCallback as J, useRef as Ne, useLayoutEffect as Qn, useEffect as _e, useMemo as Zn, forwardRef as er, isValidElement as lt } from "react";
2
- import tr from "react-dom";
3
- var je = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
4
- function nr(e) {
1
+ import w, { forwardRef as yr, isValidElement as wt, useLayoutEffect as br, useEffect as H, useState as P, useCallback as R, useRef as z, useMemo as vr } from "react";
2
+ import Er from "react-dom";
3
+ var qe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
4
+ function Sr(e) {
5
5
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6
6
  }
7
- var rr = "Expected a function", Ft = NaN, or = "[object Symbol]", sr = /^\s+|\s+$/g, ar = /^[-+]0x[0-9a-f]+$/i, ir = /^0b[01]+$/i, lr = /^0o[0-7]+$/i, cr = parseInt, ur = typeof je == "object" && je && je.Object === Object && je, dr = typeof self == "object" && self && self.Object === Object && self, fr = ur || dr || Function("return this")(), pr = Object.prototype, hr = pr.toString, mr = Math.max, gr = Math.min, ct = function() {
8
- return fr.Date.now();
7
+ function xr(e) {
8
+ if (e.__esModule) return e;
9
+ var t = e.default;
10
+ if (typeof t == "function") {
11
+ var n = function r() {
12
+ return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
13
+ };
14
+ n.prototype = t.prototype;
15
+ } else n = {};
16
+ return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
17
+ var o = Object.getOwnPropertyDescriptor(e, r);
18
+ Object.defineProperty(n, r, o.get ? o : {
19
+ enumerable: !0,
20
+ get: function() {
21
+ return e[r];
22
+ }
23
+ });
24
+ }), n;
25
+ }
26
+ var ue = { exports: {} };
27
+ const Tr = {}, _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
28
+ __proto__: null,
29
+ default: Tr
30
+ }, Symbol.toStringTag, { value: "Module" })), rt = /* @__PURE__ */ xr(_r), Rr = "16.4.7", Or = {
31
+ version: Rr
32
+ }, Ot = rt, Bt = rt, Nr = rt, Ar = rt, Cr = Or, Ft = Cr.version, kr = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
33
+ function Lr(e) {
34
+ const t = {};
35
+ let n = e.toString();
36
+ n = n.replace(/\r\n?/mg, `
37
+ `);
38
+ let r;
39
+ for (; (r = kr.exec(n)) != null; ) {
40
+ const o = r[1];
41
+ let s = r[2] || "";
42
+ s = s.trim();
43
+ const a = s[0];
44
+ s = s.replace(/^(['"`])([\s\S]*)\1$/mg, "$2"), a === '"' && (s = s.replace(/\\n/g, `
45
+ `), s = s.replace(/\\r/g, "\r")), t[o] = s;
46
+ }
47
+ return t;
48
+ }
49
+ function Dr(e) {
50
+ const t = Nn(e), n = B.configDotenv({ path: t });
51
+ if (!n.parsed) {
52
+ const a = new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);
53
+ throw a.code = "MISSING_DATA", a;
54
+ }
55
+ const r = On(e).split(","), o = r.length;
56
+ let s;
57
+ for (let a = 0; a < o; a++)
58
+ try {
59
+ const i = r[a].trim(), u = Pr(n, i);
60
+ s = B.decrypt(u.ciphertext, u.key);
61
+ break;
62
+ } catch (i) {
63
+ if (a + 1 >= o)
64
+ throw i;
65
+ }
66
+ return B.parse(s);
67
+ }
68
+ function Mr(e) {
69
+ console.log(`[dotenv@${Ft}][INFO] ${e}`);
70
+ }
71
+ function Ir(e) {
72
+ console.log(`[dotenv@${Ft}][WARN] ${e}`);
73
+ }
74
+ function Ze(e) {
75
+ console.log(`[dotenv@${Ft}][DEBUG] ${e}`);
76
+ }
77
+ function On(e) {
78
+ return e && e.DOTENV_KEY && e.DOTENV_KEY.length > 0 ? e.DOTENV_KEY : process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0 ? process.env.DOTENV_KEY : "";
79
+ }
80
+ function Pr(e, t) {
81
+ let n;
82
+ try {
83
+ n = new URL(t);
84
+ } catch (i) {
85
+ if (i.code === "ERR_INVALID_URL") {
86
+ const u = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
87
+ throw u.code = "INVALID_DOTENV_KEY", u;
88
+ }
89
+ throw i;
90
+ }
91
+ const r = n.password;
92
+ if (!r) {
93
+ const i = new Error("INVALID_DOTENV_KEY: Missing key part");
94
+ throw i.code = "INVALID_DOTENV_KEY", i;
95
+ }
96
+ const o = n.searchParams.get("environment");
97
+ if (!o) {
98
+ const i = new Error("INVALID_DOTENV_KEY: Missing environment part");
99
+ throw i.code = "INVALID_DOTENV_KEY", i;
100
+ }
101
+ const s = `DOTENV_VAULT_${o.toUpperCase()}`, a = e.parsed[s];
102
+ if (!a) {
103
+ const i = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);
104
+ throw i.code = "NOT_FOUND_DOTENV_ENVIRONMENT", i;
105
+ }
106
+ return { ciphertext: a, key: r };
107
+ }
108
+ function Nn(e) {
109
+ let t = null;
110
+ if (e && e.path && e.path.length > 0)
111
+ if (Array.isArray(e.path))
112
+ for (const n of e.path)
113
+ Ot.existsSync(n) && (t = n.endsWith(".vault") ? n : `${n}.vault`);
114
+ else
115
+ t = e.path.endsWith(".vault") ? e.path : `${e.path}.vault`;
116
+ else
117
+ t = Bt.resolve(process.cwd(), ".env.vault");
118
+ return Ot.existsSync(t) ? t : null;
119
+ }
120
+ function Xt(e) {
121
+ return e[0] === "~" ? Bt.join(Nr.homedir(), e.slice(1)) : e;
122
+ }
123
+ function Br(e) {
124
+ Mr("Loading env from encrypted .env.vault");
125
+ const t = B._parseVault(e);
126
+ let n = process.env;
127
+ return e && e.processEnv != null && (n = e.processEnv), B.populate(n, t, e), { parsed: t };
128
+ }
129
+ function Fr(e) {
130
+ const t = Bt.resolve(process.cwd(), ".env");
131
+ let n = "utf8";
132
+ const r = !!(e && e.debug);
133
+ e && e.encoding ? n = e.encoding : r && Ze("No encoding is specified. UTF-8 is used by default");
134
+ let o = [t];
135
+ if (e && e.path)
136
+ if (!Array.isArray(e.path))
137
+ o = [Xt(e.path)];
138
+ else {
139
+ o = [];
140
+ for (const u of e.path)
141
+ o.push(Xt(u));
142
+ }
143
+ let s;
144
+ const a = {};
145
+ for (const u of o)
146
+ try {
147
+ const c = B.parse(Ot.readFileSync(u, { encoding: n }));
148
+ B.populate(a, c, e);
149
+ } catch (c) {
150
+ r && Ze(`Failed to load ${u} ${c.message}`), s = c;
151
+ }
152
+ let i = process.env;
153
+ return e && e.processEnv != null && (i = e.processEnv), B.populate(i, a, e), s ? { parsed: a, error: s } : { parsed: a };
154
+ }
155
+ function Ur(e) {
156
+ if (On(e).length === 0)
157
+ return B.configDotenv(e);
158
+ const t = Nn(e);
159
+ return t ? B._configVault(e) : (Ir(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`), B.configDotenv(e));
160
+ }
161
+ function jr(e, t) {
162
+ const n = Buffer.from(t.slice(-64), "hex");
163
+ let r = Buffer.from(e, "base64");
164
+ const o = r.subarray(0, 12), s = r.subarray(-16);
165
+ r = r.subarray(12, -16);
166
+ try {
167
+ const a = Ar.createDecipheriv("aes-256-gcm", n, o);
168
+ return a.setAuthTag(s), `${a.update(r)}${a.final()}`;
169
+ } catch (a) {
170
+ const i = a instanceof RangeError, u = a.message === "Invalid key length", c = a.message === "Unsupported state or unable to authenticate data";
171
+ if (i || u) {
172
+ const d = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
173
+ throw d.code = "INVALID_DOTENV_KEY", d;
174
+ } else if (c) {
175
+ const d = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
176
+ throw d.code = "DECRYPTION_FAILED", d;
177
+ } else
178
+ throw a;
179
+ }
180
+ }
181
+ function $r(e, t, n = {}) {
182
+ const r = !!(n && n.debug), o = !!(n && n.override);
183
+ if (typeof t != "object") {
184
+ const s = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
185
+ throw s.code = "OBJECT_REQUIRED", s;
186
+ }
187
+ for (const s of Object.keys(t))
188
+ Object.prototype.hasOwnProperty.call(e, s) ? (o === !0 && (e[s] = t[s]), r && Ze(o === !0 ? `"${s}" is already defined and WAS overwritten` : `"${s}" is already defined and was NOT overwritten`)) : e[s] = t[s];
189
+ }
190
+ const B = {
191
+ configDotenv: Fr,
192
+ _configVault: Br,
193
+ _parseVault: Dr,
194
+ config: Ur,
195
+ decrypt: jr,
196
+ parse: Lr,
197
+ populate: $r
9
198
  };
10
- function wr(e, t, n) {
11
- var r, o, s, a, i, d, u = 0, f = !1, h = !1, y = !0;
12
- if (typeof e != "function")
13
- throw new TypeError(rr);
14
- t = jt(t) || 0, wt(n) && (f = !!n.leading, h = "maxWait" in n, s = h ? mr(jt(n.maxWait) || 0, t) : s, y = "trailing" in n ? !!n.trailing : y);
15
- function l(x) {
16
- var M = r, F = o;
17
- return r = o = void 0, u = x, a = e.apply(F, M), a;
199
+ ue.exports.configDotenv = B.configDotenv;
200
+ ue.exports._configVault = B._configVault;
201
+ ue.exports._parseVault = B._parseVault;
202
+ ue.exports.config = B.config;
203
+ ue.exports.decrypt = B.decrypt;
204
+ ue.exports.parse = B.parse;
205
+ ue.exports.populate = B.populate;
206
+ ue.exports = B;
207
+ var Hr = ue.exports;
208
+ const Re = {};
209
+ process.env.DOTENV_CONFIG_ENCODING != null && (Re.encoding = process.env.DOTENV_CONFIG_ENCODING);
210
+ process.env.DOTENV_CONFIG_PATH != null && (Re.path = process.env.DOTENV_CONFIG_PATH);
211
+ process.env.DOTENV_CONFIG_DEBUG != null && (Re.debug = process.env.DOTENV_CONFIG_DEBUG);
212
+ process.env.DOTENV_CONFIG_OVERRIDE != null && (Re.override = process.env.DOTENV_CONFIG_OVERRIDE);
213
+ process.env.DOTENV_CONFIG_DOTENV_KEY != null && (Re.DOTENV_KEY = process.env.DOTENV_CONFIG_DOTENV_KEY);
214
+ var zr = Re;
215
+ const Vr = /^dotenv_config_(encoding|path|debug|override|DOTENV_KEY)=(.+)$/;
216
+ var qr = function(t) {
217
+ return t.reduce(function(n, r) {
218
+ const o = r.match(Vr);
219
+ return o && (n[o[1]] = o[2]), n;
220
+ }, {});
221
+ };
222
+ (function() {
223
+ Hr.config(
224
+ Object.assign(
225
+ {},
226
+ zr,
227
+ qr(process.argv)
228
+ )
229
+ );
230
+ })();
231
+ const Wr = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 };
232
+ console.log("import");
233
+ console.table({ ...Wr });
234
+ console.log("process");
235
+ console.table({ ...process.env });
236
+ const ie = { ...process.env };
237
+ console.table(ie);
238
+ const Kr = ie.NODE_ENV !== "production", Yr = ie.V_IS_DEBUG === "true", Le = ie.V_APP_NAME || "v0xapp", Qt = ie.V_BASE_API_URL || "api", Jr = () => Qt === "local" ? ie.V_MOCK_LOCAL_API_URL : Qt === "mock" ? ie.V_MOCK_API_URL : config.domain_type === IAM.DomainType.SANDBOX ? ie.V_APP_SANDBOX_API_URL : config.domain_type === IAM.DomainType.DC ? ie.V_APP_DC_API_URL : ie.V_APP_API_URL, Gr = () => (/* @__PURE__ */ new Date()).toISOString(), De = (e, t, n) => `[vezham] [${Gr()}] [${e}] [${t}] ${n}`, yt = () => !Kr, j = {
239
+ log: (e = Le, t, n) => {
240
+ console.log(
241
+ De("LOG", e, t),
242
+ n || ""
243
+ );
244
+ },
245
+ debug: (e = Le, t, n) => {
246
+ Yr && console.info(
247
+ De("DEBUG", e, t),
248
+ n || ""
249
+ );
250
+ },
251
+ info: (e = Le, t, n) => {
252
+ yt() || console.info(
253
+ De("INFO", e, t),
254
+ n || ""
255
+ );
256
+ },
257
+ warn: (e = Le, t, n) => {
258
+ yt() || console.warn(
259
+ De("WARN", e, t),
260
+ n || ""
261
+ );
262
+ },
263
+ error: (e = Le, t, n) => {
264
+ yt() || console.error(
265
+ De("ERROR", e, t),
266
+ n || ""
267
+ );
18
268
  }
19
- function w(x) {
20
- return u = x, i = setTimeout(S, t), f ? l(x) : a;
269
+ // trace: (namespace = APP_NAME, message: string, object?: any) => {
270
+ // if (strictLog()) return
271
+ // let log_msg = getLoggerMessage(logs_type.Trace, namespace, message);
272
+ // if (!(object instanceof Error)) console.trace(log_msg, object);
273
+ // else console.trace(log_msg, object)
274
+ // }
275
+ };
276
+ var Xr = (e) => {
277
+ switch (e) {
278
+ case "success":
279
+ return eo;
280
+ case "info":
281
+ return no;
282
+ case "warning":
283
+ return to;
284
+ case "error":
285
+ return ro;
286
+ default:
287
+ return null;
21
288
  }
22
- function g(x) {
23
- var M = x - d, F = x - u, Q = t - M;
24
- return h ? gr(Q, s - F) : Q;
289
+ }, Qr = Array(12).fill(0), Zr = ({ visible: e, className: t }) => w.createElement("div", { className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "), "data-visible": e }, w.createElement("div", { className: "sonner-spinner" }, Qr.map((n, r) => w.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${r}` })))), eo = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" })), to = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })), no = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" })), ro = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })), oo = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, w.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), w.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })), so = () => {
290
+ let [e, t] = w.useState(document.hidden);
291
+ return w.useEffect(() => {
292
+ let n = () => {
293
+ t(document.hidden);
294
+ };
295
+ return document.addEventListener("visibilitychange", n), () => window.removeEventListener("visibilitychange", n);
296
+ }, []), e;
297
+ }, Nt = 1, ao = class {
298
+ constructor() {
299
+ this.subscribe = (e) => (this.subscribers.push(e), () => {
300
+ let t = this.subscribers.indexOf(e);
301
+ this.subscribers.splice(t, 1);
302
+ }), this.publish = (e) => {
303
+ this.subscribers.forEach((t) => t(e));
304
+ }, this.addToast = (e) => {
305
+ this.publish(e), this.toasts = [...this.toasts, e];
306
+ }, this.create = (e) => {
307
+ var t;
308
+ let { message: n, ...r } = e, o = typeof (e == null ? void 0 : e.id) == "number" || ((t = e.id) == null ? void 0 : t.length) > 0 ? e.id : Nt++, s = this.toasts.find((i) => i.id === o), a = e.dismissible === void 0 ? !0 : e.dismissible;
309
+ return this.dismissedToasts.has(o) && this.dismissedToasts.delete(o), s ? this.toasts = this.toasts.map((i) => i.id === o ? (this.publish({ ...i, ...e, id: o, title: n }), { ...i, ...e, id: o, dismissible: a, title: n }) : i) : this.addToast({ title: n, ...r, dismissible: a, id: o }), o;
310
+ }, this.dismiss = (e) => (this.dismissedToasts.add(e), e || this.toasts.forEach((t) => {
311
+ this.subscribers.forEach((n) => n({ id: t.id, dismiss: !0 }));
312
+ }), this.subscribers.forEach((t) => t({ id: e, dismiss: !0 })), e), this.message = (e, t) => this.create({ ...t, message: e }), this.error = (e, t) => this.create({ ...t, message: e, type: "error" }), this.success = (e, t) => this.create({ ...t, type: "success", message: e }), this.info = (e, t) => this.create({ ...t, type: "info", message: e }), this.warning = (e, t) => this.create({ ...t, type: "warning", message: e }), this.loading = (e, t) => this.create({ ...t, type: "loading", message: e }), this.promise = (e, t) => {
313
+ if (!t) return;
314
+ let n;
315
+ t.loading !== void 0 && (n = this.create({ ...t, promise: e, type: "loading", message: t.loading, description: typeof t.description != "function" ? t.description : void 0 }));
316
+ let r = e instanceof Promise ? e : e(), o = n !== void 0, s, a = r.then(async (u) => {
317
+ if (s = ["resolve", u], w.isValidElement(u)) o = !1, this.create({ id: n, type: "default", message: u });
318
+ else if (lo(u) && !u.ok) {
319
+ o = !1;
320
+ let c = typeof t.error == "function" ? await t.error(`HTTP error! status: ${u.status}`) : t.error, d = typeof t.description == "function" ? await t.description(`HTTP error! status: ${u.status}`) : t.description;
321
+ this.create({ id: n, type: "error", message: c, description: d });
322
+ } else if (t.success !== void 0) {
323
+ o = !1;
324
+ let c = typeof t.success == "function" ? await t.success(u) : t.success, d = typeof t.description == "function" ? await t.description(u) : t.description;
325
+ this.create({ id: n, type: "success", message: c, description: d });
326
+ }
327
+ }).catch(async (u) => {
328
+ if (s = ["reject", u], t.error !== void 0) {
329
+ o = !1;
330
+ let c = typeof t.error == "function" ? await t.error(u) : t.error, d = typeof t.description == "function" ? await t.description(u) : t.description;
331
+ this.create({ id: n, type: "error", message: c, description: d });
332
+ }
333
+ }).finally(() => {
334
+ var u;
335
+ o && (this.dismiss(n), n = void 0), (u = t.finally) == null || u.call(t);
336
+ }), i = () => new Promise((u, c) => a.then(() => s[0] === "reject" ? c(s[1]) : u(s[1])).catch(c));
337
+ return typeof n != "string" && typeof n != "number" ? { unwrap: i } : Object.assign(n, { unwrap: i });
338
+ }, this.custom = (e, t) => {
339
+ let n = (t == null ? void 0 : t.id) || Nt++;
340
+ return this.create({ jsx: e(n), id: n, ...t }), n;
341
+ }, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
25
342
  }
26
- function m(x) {
27
- var M = x - d, F = x - u;
28
- return d === void 0 || M >= t || M < 0 || h && F >= s;
343
+ }, W = new ao(), io = (e, t) => {
344
+ let n = (t == null ? void 0 : t.id) || Nt++;
345
+ return W.addToast({ title: e, ...t, id: n }), n;
346
+ }, lo = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", co = io, uo = () => W.toasts, fo = () => W.getActiveToasts(), po = Object.assign(co, { success: W.success, info: W.info, warning: W.warning, error: W.error, custom: W.custom, message: W.message, promise: W.promise, dismiss: W.dismiss, loading: W.loading }, { getHistory: uo, getToasts: fo });
347
+ function ho(e, { insertAt: t } = {}) {
348
+ if (typeof document > "u") return;
349
+ let n = document.head || document.getElementsByTagName("head")[0], r = document.createElement("style");
350
+ r.type = "text/css", t === "top" && n.firstChild ? n.insertBefore(r, n.firstChild) : n.appendChild(r), r.styleSheet ? r.styleSheet.cssText = e : r.appendChild(document.createTextNode(e));
351
+ }
352
+ ho(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
353
+ `);
354
+ function We(e) {
355
+ return e.label !== void 0;
356
+ }
357
+ var mo = 3, go = "32px", wo = "16px", Zt = 4e3, yo = 356, bo = 14, vo = 20, Eo = 200;
358
+ function ne(...e) {
359
+ return e.filter(Boolean).join(" ");
360
+ }
361
+ function So(e) {
362
+ let [t, n] = e.split("-"), r = [];
363
+ return t && r.push(t), n && r.push(n), r;
364
+ }
365
+ var xo = (e) => {
366
+ var t, n, r, o, s, a, i, u, c, d, h;
367
+ let { invert: p, toast: l, unstyled: g, interacting: m, setHeights: y, visibleToasts: T, heights: S, index: _, toasts: U, expanded: k, removeToast: E, defaultRichColors: M, closeButton: V, style: se, cancelButtonStyle: ut, actionButtonStyle: Ue, className: le = "", descriptionClassName: je = "", duration: ve, position: $e, gap: he, loadingIcon: ce, expandByDefault: He, classNames: x, icons: Y, closeButtonAriaLabel: dt = "Close toast", pauseWhenPageIsHidden: A } = e, [C, D] = w.useState(null), [q, Ee] = w.useState(null), [I, ft] = w.useState(!1), [Ae, ze] = w.useState(!1), [Ce, pt] = w.useState(!1), [zt, sr] = w.useState(!1), [ar, Vt] = w.useState(!1), [ir, ht] = w.useState(0), [lr, qt] = w.useState(0), ke = w.useRef(l.duration || ve || Zt), Wt = w.useRef(null), me = w.useRef(null), cr = _ === 0, ur = _ + 1 <= T, X = l.type, Se = l.dismissible !== !1, dr = l.className || "", fr = l.descriptionClassName || "", Ve = w.useMemo(() => S.findIndex((b) => b.toastId === l.id) || 0, [S, l.id]), pr = w.useMemo(() => {
368
+ var b;
369
+ return (b = l.closeButton) != null ? b : V;
370
+ }, [l.closeButton, V]), Kt = w.useMemo(() => l.duration || ve || Zt, [l.duration, ve]), mt = w.useRef(0), xe = w.useRef(0), Yt = w.useRef(0), Te = w.useRef(null), [hr, mr] = $e.split("-"), Jt = w.useMemo(() => S.reduce((b, O, L) => L >= Ve ? b : b + O.height, 0), [S, Ve]), Gt = so(), gr = l.invert || p, gt = X === "loading";
371
+ xe.current = w.useMemo(() => Ve * he + Jt, [Ve, Jt]), w.useEffect(() => {
372
+ ke.current = Kt;
373
+ }, [Kt]), w.useEffect(() => {
374
+ ft(!0);
375
+ }, []), w.useEffect(() => {
376
+ let b = me.current;
377
+ if (b) {
378
+ let O = b.getBoundingClientRect().height;
379
+ return qt(O), y((L) => [{ toastId: l.id, height: O, position: l.position }, ...L]), () => y((L) => L.filter((Z) => Z.toastId !== l.id));
380
+ }
381
+ }, [y, l.id]), w.useLayoutEffect(() => {
382
+ if (!I) return;
383
+ let b = me.current, O = b.style.height;
384
+ b.style.height = "auto";
385
+ let L = b.getBoundingClientRect().height;
386
+ b.style.height = O, qt(L), y((Z) => Z.find((ee) => ee.toastId === l.id) ? Z.map((ee) => ee.toastId === l.id ? { ...ee, height: L } : ee) : [{ toastId: l.id, height: L, position: l.position }, ...Z]);
387
+ }, [I, l.title, l.description, y, l.id]);
388
+ let de = w.useCallback(() => {
389
+ ze(!0), ht(xe.current), y((b) => b.filter((O) => O.toastId !== l.id)), setTimeout(() => {
390
+ E(l);
391
+ }, Eo);
392
+ }, [l, E, y, xe]);
393
+ w.useEffect(() => {
394
+ if (l.promise && X === "loading" || l.duration === 1 / 0 || l.type === "loading") return;
395
+ let b;
396
+ return k || m || A && Gt ? (() => {
397
+ if (Yt.current < mt.current) {
398
+ let O = (/* @__PURE__ */ new Date()).getTime() - mt.current;
399
+ ke.current = ke.current - O;
400
+ }
401
+ Yt.current = (/* @__PURE__ */ new Date()).getTime();
402
+ })() : ke.current !== 1 / 0 && (mt.current = (/* @__PURE__ */ new Date()).getTime(), b = setTimeout(() => {
403
+ var O;
404
+ (O = l.onAutoClose) == null || O.call(l, l), de();
405
+ }, ke.current)), () => clearTimeout(b);
406
+ }, [k, m, l, X, A, Gt, de]), w.useEffect(() => {
407
+ l.delete && de();
408
+ }, [de, l.delete]);
409
+ function wr() {
410
+ var b, O, L;
411
+ return Y != null && Y.loading ? w.createElement("div", { className: ne(x == null ? void 0 : x.loader, (b = l == null ? void 0 : l.classNames) == null ? void 0 : b.loader, "sonner-loader"), "data-visible": X === "loading" }, Y.loading) : ce ? w.createElement("div", { className: ne(x == null ? void 0 : x.loader, (O = l == null ? void 0 : l.classNames) == null ? void 0 : O.loader, "sonner-loader"), "data-visible": X === "loading" }, ce) : w.createElement(Zr, { className: ne(x == null ? void 0 : x.loader, (L = l == null ? void 0 : l.classNames) == null ? void 0 : L.loader), visible: X === "loading" });
412
+ }
413
+ return w.createElement("li", { tabIndex: 0, ref: me, className: ne(le, dr, x == null ? void 0 : x.toast, (t = l == null ? void 0 : l.classNames) == null ? void 0 : t.toast, x == null ? void 0 : x.default, x == null ? void 0 : x[X], (n = l == null ? void 0 : l.classNames) == null ? void 0 : n[X]), "data-sonner-toast": "", "data-rich-colors": (r = l.richColors) != null ? r : M, "data-styled": !(l.jsx || l.unstyled || g), "data-mounted": I, "data-promise": !!l.promise, "data-swiped": ar, "data-removed": Ae, "data-visible": ur, "data-y-position": hr, "data-x-position": mr, "data-index": _, "data-front": cr, "data-swiping": Ce, "data-dismissible": Se, "data-type": X, "data-invert": gr, "data-swipe-out": zt, "data-swipe-direction": q, "data-expanded": !!(k || He && I), style: { "--index": _, "--toasts-before": _, "--z-index": U.length - _, "--offset": `${Ae ? ir : xe.current}px`, "--initial-height": He ? "auto" : `${lr}px`, ...se, ...l.style }, onDragEnd: () => {
414
+ pt(!1), D(null), Te.current = null;
415
+ }, onPointerDown: (b) => {
416
+ gt || !Se || (Wt.current = /* @__PURE__ */ new Date(), ht(xe.current), b.target.setPointerCapture(b.pointerId), b.target.tagName !== "BUTTON" && (pt(!0), Te.current = { x: b.clientX, y: b.clientY }));
417
+ }, onPointerUp: () => {
418
+ var b, O, L, Z;
419
+ if (zt || !Se) return;
420
+ Te.current = null;
421
+ let ee = Number(((b = me.current) == null ? void 0 : b.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), fe = Number(((O = me.current) == null ? void 0 : O.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), ge = (/* @__PURE__ */ new Date()).getTime() - ((L = Wt.current) == null ? void 0 : L.getTime()), te = C === "x" ? ee : fe, pe = Math.abs(te) / ge;
422
+ if (Math.abs(te) >= vo || pe > 0.11) {
423
+ ht(xe.current), (Z = l.onDismiss) == null || Z.call(l, l), Ee(C === "x" ? ee > 0 ? "right" : "left" : fe > 0 ? "down" : "up"), de(), sr(!0), Vt(!1);
424
+ return;
425
+ }
426
+ pt(!1), D(null);
427
+ }, onPointerMove: (b) => {
428
+ var O, L, Z, ee;
429
+ if (!Te.current || !Se || ((O = window.getSelection()) == null ? void 0 : O.toString().length) > 0) return;
430
+ let fe = b.clientY - Te.current.y, ge = b.clientX - Te.current.x, te = (L = e.swipeDirections) != null ? L : So($e);
431
+ !C && (Math.abs(ge) > 1 || Math.abs(fe) > 1) && D(Math.abs(ge) > Math.abs(fe) ? "x" : "y");
432
+ let pe = { x: 0, y: 0 };
433
+ C === "y" ? (te.includes("top") || te.includes("bottom")) && (te.includes("top") && fe < 0 || te.includes("bottom") && fe > 0) && (pe.y = fe) : C === "x" && (te.includes("left") || te.includes("right")) && (te.includes("left") && ge < 0 || te.includes("right") && ge > 0) && (pe.x = ge), (Math.abs(pe.x) > 0 || Math.abs(pe.y) > 0) && Vt(!0), (Z = me.current) == null || Z.style.setProperty("--swipe-amount-x", `${pe.x}px`), (ee = me.current) == null || ee.style.setProperty("--swipe-amount-y", `${pe.y}px`);
434
+ } }, pr && !l.jsx ? w.createElement("button", { "aria-label": dt, "data-disabled": gt, "data-close-button": !0, onClick: gt || !Se ? () => {
435
+ } : () => {
436
+ var b;
437
+ de(), (b = l.onDismiss) == null || b.call(l, l);
438
+ }, className: ne(x == null ? void 0 : x.closeButton, (o = l == null ? void 0 : l.classNames) == null ? void 0 : o.closeButton) }, (s = Y == null ? void 0 : Y.close) != null ? s : oo) : null, l.jsx || wt(l.title) ? l.jsx ? l.jsx : typeof l.title == "function" ? l.title() : l.title : w.createElement(w.Fragment, null, X || l.icon || l.promise ? w.createElement("div", { "data-icon": "", className: ne(x == null ? void 0 : x.icon, (a = l == null ? void 0 : l.classNames) == null ? void 0 : a.icon) }, l.promise || l.type === "loading" && !l.icon ? l.icon || wr() : null, l.type !== "loading" ? l.icon || (Y == null ? void 0 : Y[X]) || Xr(X) : null) : null, w.createElement("div", { "data-content": "", className: ne(x == null ? void 0 : x.content, (i = l == null ? void 0 : l.classNames) == null ? void 0 : i.content) }, w.createElement("div", { "data-title": "", className: ne(x == null ? void 0 : x.title, (u = l == null ? void 0 : l.classNames) == null ? void 0 : u.title) }, typeof l.title == "function" ? l.title() : l.title), l.description ? w.createElement("div", { "data-description": "", className: ne(je, fr, x == null ? void 0 : x.description, (c = l == null ? void 0 : l.classNames) == null ? void 0 : c.description) }, typeof l.description == "function" ? l.description() : l.description) : null), wt(l.cancel) ? l.cancel : l.cancel && We(l.cancel) ? w.createElement("button", { "data-button": !0, "data-cancel": !0, style: l.cancelButtonStyle || ut, onClick: (b) => {
439
+ var O, L;
440
+ We(l.cancel) && Se && ((L = (O = l.cancel).onClick) == null || L.call(O, b), de());
441
+ }, className: ne(x == null ? void 0 : x.cancelButton, (d = l == null ? void 0 : l.classNames) == null ? void 0 : d.cancelButton) }, l.cancel.label) : null, wt(l.action) ? l.action : l.action && We(l.action) ? w.createElement("button", { "data-button": !0, "data-action": !0, style: l.actionButtonStyle || Ue, onClick: (b) => {
442
+ var O, L;
443
+ We(l.action) && ((L = (O = l.action).onClick) == null || L.call(O, b), !b.defaultPrevented && de());
444
+ }, className: ne(x == null ? void 0 : x.actionButton, (h = l == null ? void 0 : l.classNames) == null ? void 0 : h.actionButton) }, l.action.label) : null));
445
+ };
446
+ function en() {
447
+ if (typeof window > "u" || typeof document > "u") return "ltr";
448
+ let e = document.documentElement.getAttribute("dir");
449
+ return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
450
+ }
451
+ function To(e, t) {
452
+ let n = {};
453
+ return [e, t].forEach((r, o) => {
454
+ let s = o === 1, a = s ? "--mobile-offset" : "--offset", i = s ? wo : go;
455
+ function u(c) {
456
+ ["top", "right", "bottom", "left"].forEach((d) => {
457
+ n[`${a}-${d}`] = typeof c == "number" ? `${c}px` : c;
458
+ });
459
+ }
460
+ typeof r == "number" || typeof r == "string" ? u(r) : typeof r == "object" ? ["top", "right", "bottom", "left"].forEach((c) => {
461
+ r[c] === void 0 ? n[`${a}-${c}`] = i : n[`${a}-${c}`] = typeof r[c] == "number" ? `${r[c]}px` : r[c];
462
+ }) : u(i);
463
+ }), n;
464
+ }
465
+ yr(function(e, t) {
466
+ let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: a, className: i, offset: u, mobileOffset: c, theme: d = "light", richColors: h, duration: p, style: l, visibleToasts: g = mo, toastOptions: m, dir: y = en(), gap: T = bo, loadingIcon: S, icons: _, containerAriaLabel: U = "Notifications", pauseWhenPageIsHidden: k } = e, [E, M] = w.useState([]), V = w.useMemo(() => Array.from(new Set([r].concat(E.filter((A) => A.position).map((A) => A.position)))), [E, r]), [se, ut] = w.useState([]), [Ue, le] = w.useState(!1), [je, ve] = w.useState(!1), [$e, he] = w.useState(d !== "system" ? d : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), ce = w.useRef(null), He = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), x = w.useRef(null), Y = w.useRef(!1), dt = w.useCallback((A) => {
467
+ M((C) => {
468
+ var D;
469
+ return (D = C.find((q) => q.id === A.id)) != null && D.delete || W.dismiss(A.id), C.filter(({ id: q }) => q !== A.id);
470
+ });
471
+ }, []);
472
+ return w.useEffect(() => W.subscribe((A) => {
473
+ if (A.dismiss) {
474
+ M((C) => C.map((D) => D.id === A.id ? { ...D, delete: !0 } : D));
475
+ return;
476
+ }
477
+ setTimeout(() => {
478
+ Er.flushSync(() => {
479
+ M((C) => {
480
+ let D = C.findIndex((q) => q.id === A.id);
481
+ return D !== -1 ? [...C.slice(0, D), { ...C[D], ...A }, ...C.slice(D + 1)] : [A, ...C];
482
+ });
483
+ });
484
+ });
485
+ }), []), w.useEffect(() => {
486
+ if (d !== "system") {
487
+ he(d);
488
+ return;
489
+ }
490
+ if (d === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? he("dark") : he("light")), typeof window > "u") return;
491
+ let A = window.matchMedia("(prefers-color-scheme: dark)");
492
+ try {
493
+ A.addEventListener("change", ({ matches: C }) => {
494
+ he(C ? "dark" : "light");
495
+ });
496
+ } catch {
497
+ A.addListener(({ matches: D }) => {
498
+ try {
499
+ he(D ? "dark" : "light");
500
+ } catch (q) {
501
+ console.error(q);
502
+ }
503
+ });
504
+ }
505
+ }, [d]), w.useEffect(() => {
506
+ E.length <= 1 && le(!1);
507
+ }, [E]), w.useEffect(() => {
508
+ let A = (C) => {
509
+ var D, q;
510
+ o.every((Ee) => C[Ee] || C.code === Ee) && (le(!0), (D = ce.current) == null || D.focus()), C.code === "Escape" && (document.activeElement === ce.current || (q = ce.current) != null && q.contains(document.activeElement)) && le(!1);
511
+ };
512
+ return document.addEventListener("keydown", A), () => document.removeEventListener("keydown", A);
513
+ }, [o]), w.useEffect(() => {
514
+ if (ce.current) return () => {
515
+ x.current && (x.current.focus({ preventScroll: !0 }), x.current = null, Y.current = !1);
516
+ };
517
+ }, [ce.current]), w.createElement("section", { ref: t, "aria-label": `${U} ${He}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, V.map((A, C) => {
518
+ var D;
519
+ let [q, Ee] = A.split("-");
520
+ return E.length ? w.createElement("ol", { key: A, dir: y === "auto" ? en() : y, tabIndex: -1, ref: ce, className: i, "data-sonner-toaster": !0, "data-theme": $e, "data-y-position": q, "data-lifted": Ue && E.length > 1 && !s, "data-x-position": Ee, style: { "--front-toast-height": `${((D = se[0]) == null ? void 0 : D.height) || 0}px`, "--width": `${yo}px`, "--gap": `${T}px`, ...l, ...To(u, c) }, onBlur: (I) => {
521
+ Y.current && !I.currentTarget.contains(I.relatedTarget) && (Y.current = !1, x.current && (x.current.focus({ preventScroll: !0 }), x.current = null));
522
+ }, onFocus: (I) => {
523
+ I.target instanceof HTMLElement && I.target.dataset.dismissible === "false" || Y.current || (Y.current = !0, x.current = I.relatedTarget);
524
+ }, onMouseEnter: () => le(!0), onMouseMove: () => le(!0), onMouseLeave: () => {
525
+ je || le(!1);
526
+ }, onDragEnd: () => le(!1), onPointerDown: (I) => {
527
+ I.target instanceof HTMLElement && I.target.dataset.dismissible === "false" || ve(!0);
528
+ }, onPointerUp: () => ve(!1) }, E.filter((I) => !I.position && C === 0 || I.position === A).map((I, ft) => {
529
+ var Ae, ze;
530
+ return w.createElement(xo, { key: I.id, icons: _, index: ft, toast: I, defaultRichColors: h, duration: (Ae = m == null ? void 0 : m.duration) != null ? Ae : p, className: m == null ? void 0 : m.className, descriptionClassName: m == null ? void 0 : m.descriptionClassName, invert: n, visibleToasts: g, closeButton: (ze = m == null ? void 0 : m.closeButton) != null ? ze : a, interacting: je, position: A, style: m == null ? void 0 : m.style, unstyled: m == null ? void 0 : m.unstyled, classNames: m == null ? void 0 : m.classNames, cancelButtonStyle: m == null ? void 0 : m.cancelButtonStyle, actionButtonStyle: m == null ? void 0 : m.actionButtonStyle, removeToast: dt, toasts: E.filter((Ce) => Ce.position == I.position), heights: se.filter((Ce) => Ce.position == I.position), setHeights: ut, expandByDefault: s, gap: T, loadingIcon: S, expanded: Ue, pauseWhenPageIsHidden: k, swipeDirections: e.swipeDirections });
531
+ })) : null;
532
+ }));
533
+ });
534
+ function _o() {
535
+ return { toast: async ({
536
+ id: t,
537
+ title: n,
538
+ description: r,
539
+ action: o = {
540
+ label: "",
541
+ onClick: () => {
542
+ }
543
+ },
544
+ ...s
545
+ }) => {
546
+ const a = { description: r };
547
+ o.label && (a.action = { label: o.label, onClick: o.onClick }), po(n, a);
548
+ } };
549
+ }
550
+ var Ro = "Expected a function", tn = NaN, Oo = "[object Symbol]", No = /^\s+|\s+$/g, Ao = /^[-+]0x[0-9a-f]+$/i, Co = /^0b[01]+$/i, ko = /^0o[0-7]+$/i, Lo = parseInt, Do = typeof qe == "object" && qe && qe.Object === Object && qe, Mo = typeof self == "object" && self && self.Object === Object && self, Io = Do || Mo || Function("return this")(), Po = Object.prototype, Bo = Po.toString, Fo = Math.max, Uo = Math.min, bt = function() {
551
+ return Io.Date.now();
552
+ };
553
+ function jo(e, t, n) {
554
+ var r, o, s, a, i, u, c = 0, d = !1, h = !1, p = !0;
555
+ if (typeof e != "function")
556
+ throw new TypeError(Ro);
557
+ t = nn(t) || 0, At(n) && (d = !!n.leading, h = "maxWait" in n, s = h ? Fo(nn(n.maxWait) || 0, t) : s, p = "trailing" in n ? !!n.trailing : p);
558
+ function l(E) {
559
+ var M = r, V = o;
560
+ return r = o = void 0, c = E, a = e.apply(V, M), a;
29
561
  }
30
- function S() {
31
- var x = ct();
32
- if (m(x))
33
- return T(x);
34
- i = setTimeout(S, g(x));
562
+ function g(E) {
563
+ return c = E, i = setTimeout(T, t), d ? l(E) : a;
35
564
  }
36
- function T(x) {
37
- return i = void 0, y && r ? l(x) : (r = o = void 0, a);
565
+ function m(E) {
566
+ var M = E - u, V = E - c, se = t - M;
567
+ return h ? Uo(se, s - V) : se;
38
568
  }
39
- function R() {
40
- i !== void 0 && clearTimeout(i), u = 0, r = d = o = i = void 0;
569
+ function y(E) {
570
+ var M = E - u, V = E - c;
571
+ return u === void 0 || M >= t || M < 0 || h && V >= s;
41
572
  }
42
- function D() {
43
- return i === void 0 ? a : T(ct());
573
+ function T() {
574
+ var E = bt();
575
+ if (y(E))
576
+ return S(E);
577
+ i = setTimeout(T, m(E));
578
+ }
579
+ function S(E) {
580
+ return i = void 0, p && r ? l(E) : (r = o = void 0, a);
44
581
  }
45
582
  function _() {
46
- var x = ct(), M = m(x);
47
- if (r = arguments, o = this, d = x, M) {
583
+ i !== void 0 && clearTimeout(i), c = 0, r = u = o = i = void 0;
584
+ }
585
+ function U() {
586
+ return i === void 0 ? a : S(bt());
587
+ }
588
+ function k() {
589
+ var E = bt(), M = y(E);
590
+ if (r = arguments, o = this, u = E, M) {
48
591
  if (i === void 0)
49
- return w(d);
592
+ return g(u);
50
593
  if (h)
51
- return i = setTimeout(S, t), l(d);
594
+ return i = setTimeout(T, t), l(u);
52
595
  }
53
- return i === void 0 && (i = setTimeout(S, t)), a;
596
+ return i === void 0 && (i = setTimeout(T, t)), a;
54
597
  }
55
- return _.cancel = R, _.flush = D, _;
598
+ return k.cancel = _, k.flush = U, k;
56
599
  }
57
- function wt(e) {
600
+ function At(e) {
58
601
  var t = typeof e;
59
602
  return !!e && (t == "object" || t == "function");
60
603
  }
61
- function yr(e) {
604
+ function $o(e) {
62
605
  return !!e && typeof e == "object";
63
606
  }
64
- function br(e) {
65
- return typeof e == "symbol" || yr(e) && hr.call(e) == or;
607
+ function Ho(e) {
608
+ return typeof e == "symbol" || $o(e) && Bo.call(e) == Oo;
66
609
  }
67
- function jt(e) {
610
+ function nn(e) {
68
611
  if (typeof e == "number")
69
612
  return e;
70
- if (br(e))
71
- return Ft;
72
- if (wt(e)) {
613
+ if (Ho(e))
614
+ return tn;
615
+ if (At(e)) {
73
616
  var t = typeof e.valueOf == "function" ? e.valueOf() : e;
74
- e = wt(t) ? t + "" : t;
617
+ e = At(t) ? t + "" : t;
75
618
  }
76
619
  if (typeof e != "string")
77
620
  return e === 0 ? e : +e;
78
- e = e.replace(sr, "");
79
- var n = ir.test(e);
80
- return n || lr.test(e) ? cr(e.slice(2), n ? 2 : 8) : ar.test(e) ? Ft : +e;
621
+ e = e.replace(No, "");
622
+ var n = Co.test(e);
623
+ return n || ko.test(e) ? Lo(e.slice(2), n ? 2 : 8) : Ao.test(e) ? tn : +e;
81
624
  }
82
- var vr = wr;
83
- const Ht = /* @__PURE__ */ nr(vr);
84
- function Us(e = !1) {
625
+ var zo = jo;
626
+ const rn = /* @__PURE__ */ Sr(zo);
627
+ function Vo(e = !1) {
85
628
  if (typeof e != "boolean")
86
629
  throw new Error("defaultValue must be `true` or `false`");
87
- const [t, n] = ke(e), r = J(() => {
630
+ const [t, n] = P(e), r = R(() => {
88
631
  n(!0);
89
- }, []), o = J(() => {
632
+ }, []), o = R(() => {
90
633
  n(!1);
91
- }, []), s = J(() => {
634
+ }, []), s = R(() => {
92
635
  n((a) => !a);
93
636
  }, []);
94
637
  return { value: t, setValue: n, setTrue: r, setFalse: o, toggle: s };
95
638
  }
96
- var ye = typeof window < "u" ? Qn : _e;
97
- function Oe(e, t, n, r) {
98
- const o = Ne(t);
99
- ye(() => {
639
+ var re = typeof window < "u" ? br : H;
640
+ function G(e, t, n, r) {
641
+ const o = z(t);
642
+ re(() => {
100
643
  o.current = t;
101
- }, [t]), _e(() => {
644
+ }, [t]), H(() => {
102
645
  const s = (n == null ? void 0 : n.current) ?? window;
103
- if (!(s && s.addEventListener))
104
- return;
646
+ if (!(s && s.addEventListener)) return;
105
647
  const a = (i) => {
106
648
  o.current(i);
107
649
  };
@@ -110,155 +652,365 @@ function Oe(e, t, n, r) {
110
652
  };
111
653
  }, [e, n, r]);
112
654
  }
113
- function Ut(e) {
114
- const t = Ne(() => {
655
+ function za(e) {
656
+ G("click", (t) => {
657
+ e(t);
658
+ });
659
+ }
660
+ var vt = "useCopyToClipboard";
661
+ function Va() {
662
+ const [e, t] = P(null), { toast: n } = _o(), r = R(async (s) => {
663
+ if (!(navigator != null && navigator.clipboard))
664
+ return j.log(vt, "not supported"), !1;
665
+ try {
666
+ return await navigator.clipboard.writeText(s), t(s), !0;
667
+ } catch (a) {
668
+ return j.error(vt, "Copy failed", a), t(null), !1;
669
+ }
670
+ }, []);
671
+ return { value: e, copy: r, copyWithToast: async (s = "", a = "copied to clipboard") => {
672
+ const i = await r(s);
673
+ return i && (j.debug(vt, a), n({ title: a })), i;
674
+ } };
675
+ }
676
+ function qo(e) {
677
+ const [t, n] = P(e ?? 0), r = R(() => {
678
+ n((a) => a + 1);
679
+ }, []), o = R(() => {
680
+ n((a) => a - 1);
681
+ }, []), s = R(() => {
682
+ n(e ?? 0);
683
+ }, [e]);
684
+ return {
685
+ count: t,
686
+ increment: r,
687
+ decrement: o,
688
+ reset: s,
689
+ setCount: n
690
+ };
691
+ }
692
+ function Wo(e, t) {
693
+ const n = z(e);
694
+ re(() => {
695
+ n.current = e;
696
+ }, [e]), H(() => {
697
+ if (t === null)
698
+ return;
699
+ const r = setInterval(() => {
700
+ n.current();
701
+ }, t);
702
+ return () => {
703
+ clearInterval(r);
704
+ };
705
+ }, [t]);
706
+ }
707
+ function qa({
708
+ countStart: e,
709
+ countStop: t = 0,
710
+ intervalMs: n = 1e3,
711
+ isIncrement: r = !1
712
+ }) {
713
+ const {
714
+ count: o,
715
+ increment: s,
716
+ decrement: a,
717
+ reset: i
718
+ } = qo(e), {
719
+ value: u,
720
+ setTrue: c,
721
+ setFalse: d
722
+ } = Vo(!1), h = R(() => {
723
+ d(), i();
724
+ }, [d, i]), p = R(() => {
725
+ if (o === t) {
726
+ d();
727
+ return;
728
+ }
729
+ r ? s() : a();
730
+ }, [o, t, a, s, r, d]);
731
+ return Wo(p, u ? n : null), [o, { startCountdown: c, stopCountdown: d, resetCountdown: h }];
732
+ }
733
+ function et(e) {
734
+ const t = z(() => {
115
735
  throw new Error("Cannot call an event handler while rendering.");
116
736
  });
117
- return ye(() => {
737
+ return re(() => {
118
738
  t.current = e;
119
- }, [e]), J((...n) => {
739
+ }, [e]), R((...n) => {
120
740
  var r;
121
741
  return (r = t.current) == null ? void 0 : r.call(t, ...n);
122
742
  }, [t]);
123
743
  }
124
- var ut = typeof window > "u";
125
- function qs(e, t, n = {}) {
126
- const { initializeWithValue: r = !0 } = n, o = J(
127
- (y) => n.serializer ? n.serializer(y) : JSON.stringify(y),
744
+ var Me = "useLocalStorage", Et = typeof window > "u";
745
+ function An(e, t, n = {}) {
746
+ const { initializeWithValue: r = !0 } = n, o = R(
747
+ (p) => n.serializer ? n.serializer(p) : JSON.stringify(p),
128
748
  [n]
129
- ), s = J(
130
- (y) => {
749
+ ), s = R(
750
+ (p) => {
131
751
  if (n.deserializer)
132
- return n.deserializer(y);
133
- if (y === "undefined")
752
+ return n.deserializer(p);
753
+ if (p === "undefined")
134
754
  return;
135
755
  const l = t instanceof Function ? t() : t;
136
- let w;
756
+ let g;
137
757
  try {
138
- w = JSON.parse(y);
139
- } catch (g) {
140
- return console.error("Error parsing JSON:", g), l;
758
+ g = JSON.parse(p);
759
+ } catch (m) {
760
+ return j.error(Me, "Error parsing JSON:", m), l;
141
761
  }
142
- return w;
762
+ return g;
143
763
  },
144
764
  [n, t]
145
- ), a = J(() => {
146
- const y = t instanceof Function ? t() : t;
147
- if (ut)
148
- return y;
765
+ ), a = R(() => {
766
+ const p = t instanceof Function ? t() : t;
767
+ if (Et)
768
+ return p;
149
769
  try {
150
770
  const l = window.localStorage.getItem(e);
151
- return l ? s(l) : y;
771
+ return l ? s(l) : p;
152
772
  } catch (l) {
153
- return console.warn(`Error reading localStorage key “${e}”:`, l), y;
773
+ return j.error(
774
+ Me,
775
+ `Error reading localStorage key “${e}”:`,
776
+ l
777
+ ), p;
154
778
  }
155
- }, [t, e, s]), [i, d] = ke(() => r ? a() : t instanceof Function ? t() : t), u = Ut((y) => {
156
- ut && console.warn(
779
+ }, [t, e, s]), [i, u] = P(() => r ? a() : t instanceof Function ? t() : t), c = et((p) => {
780
+ Et && j.warn(
781
+ Me,
157
782
  `Tried setting localStorage key “${e}” even though environment is not a client`
158
783
  );
159
784
  try {
160
- const l = y instanceof Function ? y(a()) : y;
161
- window.localStorage.setItem(e, o(l)), d(l), window.dispatchEvent(new StorageEvent("local-storage", { key: e }));
785
+ const l = p instanceof Function ? p(a()) : p;
786
+ window.localStorage.setItem(e, o(l)), u(l), window.dispatchEvent(new StorageEvent("local-storage", { key: e }));
162
787
  } catch (l) {
163
- console.warn(`Error setting localStorage key “${e}”:`, l);
788
+ j.warn(
789
+ Me,
790
+ `Error setting localStorage key “${e}”:`,
791
+ l
792
+ );
164
793
  }
165
- }), f = Ut(() => {
166
- ut && console.warn(
794
+ }), d = et(() => {
795
+ Et && j.warn(
796
+ Me,
167
797
  `Tried removing localStorage key “${e}” even though environment is not a client`
168
798
  );
169
- const y = t instanceof Function ? t() : t;
170
- window.localStorage.removeItem(e), d(y), window.dispatchEvent(new StorageEvent("local-storage", { key: e }));
799
+ const p = t instanceof Function ? t() : t;
800
+ window.localStorage.removeItem(e), u(p), window.dispatchEvent(new StorageEvent("local-storage", { key: e }));
171
801
  });
172
- _e(() => {
173
- d(a());
802
+ H(() => {
803
+ u(a());
174
804
  }, [e]);
175
- const h = J(
176
- (y) => {
177
- y.key && y.key !== e || d(a());
805
+ const h = R(
806
+ (p) => {
807
+ p.key && p.key !== e || u(a());
178
808
  },
179
809
  [e, a]
180
810
  );
181
- return Oe("storage", h), Oe("local-storage", h), [i, u, f];
811
+ return G("storage", h), G("local-storage", h), [i, c, d];
182
812
  }
183
- var xr = typeof window > "u";
184
- function zs(e, {
813
+ var Ko = typeof window > "u";
814
+ function Cn(e, {
185
815
  defaultValue: t = !1,
186
816
  initializeWithValue: n = !0
187
817
  } = {}) {
188
- const r = (i) => xr ? t : window.matchMedia(i).matches, [o, s] = ke(() => n ? r(e) : t);
818
+ const r = (i) => Ko ? t : window.matchMedia(i).matches, [o, s] = P(() => n ? r(e) : t);
189
819
  function a() {
190
820
  s(r(e));
191
821
  }
192
- return ye(() => {
822
+ return re(() => {
193
823
  const i = window.matchMedia(e);
194
824
  return a(), i.addListener ? i.addListener(a) : i.addEventListener("change", a), () => {
195
825
  i.removeListener ? i.removeListener(a) : i.removeEventListener("change", a);
196
826
  };
197
827
  }, [e]), o;
198
828
  }
199
- function un(e) {
200
- const t = Ne(e);
201
- t.current = e, _e(
829
+ var Yo = "(prefers-color-scheme: dark)", Jo = "usehooks-ts-dark-mode";
830
+ function Wa(e = {}) {
831
+ const {
832
+ defaultValue: t,
833
+ localStorageKey: n = Jo,
834
+ initializeWithValue: r = !0
835
+ } = e, o = Cn(Yo, {
836
+ initializeWithValue: r,
837
+ defaultValue: t
838
+ }), [s, a] = An(
839
+ n,
840
+ t ?? o ?? !1,
841
+ { initializeWithValue: r }
842
+ );
843
+ return re(() => {
844
+ o !== s && a(o);
845
+ }, [o]), {
846
+ isDarkMode: s,
847
+ toggle: () => {
848
+ a((i) => !i);
849
+ },
850
+ enable: () => {
851
+ a(!0);
852
+ },
853
+ disable: () => {
854
+ a(!1);
855
+ },
856
+ set: (i) => {
857
+ a(i);
858
+ }
859
+ };
860
+ }
861
+ function kn(e) {
862
+ const t = z(e);
863
+ t.current = e, H(
202
864
  () => () => {
203
865
  t.current();
204
866
  },
205
867
  []
206
868
  );
207
869
  }
208
- function Er(e, t = 500, n) {
209
- const r = Ne();
210
- un(() => {
870
+ function Ut(e, t = 500, n) {
871
+ const r = z();
872
+ kn(() => {
211
873
  r.current && r.current.cancel();
212
874
  });
213
- const o = Zn(() => {
214
- const s = Ht(e, t, n), a = (...i) => s(...i);
875
+ const o = vr(() => {
876
+ const s = rn(e, t, n), a = (...i) => s(...i);
215
877
  return a.cancel = () => {
216
878
  s.cancel();
217
879
  }, a.isPending = () => !!r.current, a.flush = () => s.flush(), a;
218
880
  }, [e, t, n]);
219
- return _e(() => {
220
- r.current = Ht(e, t, n);
881
+ return H(() => {
882
+ r.current = rn(e, t, n);
221
883
  }, [e, t, n]), o;
222
884
  }
223
- function $s(e, t = {}) {
224
- const { preserveTitleOnUnmount: n = !0 } = t, r = Ne(null);
225
- ye(() => {
885
+ function Ka(e, t, n) {
886
+ const r = (n == null ? void 0 : n.equalityFn) ?? ((c, d) => c === d), o = e instanceof Function ? e() : e, [s, a] = P(o), i = z(o), u = Ut(
887
+ a,
888
+ t,
889
+ n
890
+ );
891
+ return r(i.current, o) || (u(o), i.current = o), [s, u];
892
+ }
893
+ function Ya(e, t = {}) {
894
+ const { preserveTitleOnUnmount: n = !0 } = t, r = z(null);
895
+ re(() => {
226
896
  r.current = window.document.title;
227
- }, []), ye(() => {
897
+ }, []), re(() => {
228
898
  window.document.title = e;
229
- }, [e]), un(() => {
899
+ }, [e]), kn(() => {
230
900
  !n && r.current && (window.document.title = r.current);
231
901
  });
232
902
  }
233
- function Ws(e = /* @__PURE__ */ new Map()) {
234
- const [t, n] = ke(new Map(e)), r = {
235
- set: J((o, s) => {
903
+ function Go() {
904
+ const e = z(!0);
905
+ return e.current ? (e.current = !1, !0) : e.current;
906
+ }
907
+ function Ja(e, t) {
908
+ const n = Go();
909
+ H(() => {
910
+ if (!n)
911
+ return e();
912
+ }, t);
913
+ }
914
+ function Ga(e) {
915
+ const [t, n] = P(!1), r = () => {
916
+ n(!0);
917
+ }, o = () => {
918
+ n(!1);
919
+ };
920
+ return G("mouseenter", r, e), G("mouseleave", o, e), t;
921
+ }
922
+ function Xa({
923
+ threshold: e = 0,
924
+ root: t = null,
925
+ rootMargin: n = "0%",
926
+ freezeOnceVisible: r = !1,
927
+ initialIsIntersecting: o = !1,
928
+ onChange: s
929
+ } = {}) {
930
+ var a;
931
+ const [i, u] = P(null), [c, d] = P(() => ({
932
+ isIntersecting: o,
933
+ entry: void 0
934
+ })), h = z();
935
+ h.current = s;
936
+ const p = ((a = c.entry) == null ? void 0 : a.isIntersecting) && r;
937
+ H(() => {
938
+ if (!i || !("IntersectionObserver" in window) || p) return;
939
+ const m = new IntersectionObserver(
940
+ (y) => {
941
+ const T = Array.isArray(m.thresholds) ? m.thresholds : [m.thresholds];
942
+ y.forEach((S) => {
943
+ const _ = S.isIntersecting && T.some((U) => S.intersectionRatio >= U);
944
+ d({ isIntersecting: _, entry: S }), h.current && h.current(_, S);
945
+ });
946
+ },
947
+ { threshold: e, root: t, rootMargin: n }
948
+ );
949
+ return m.observe(i), () => {
950
+ m.disconnect();
951
+ };
952
+ }, [
953
+ i,
954
+ // eslint-disable-next-line react-hooks/exhaustive-deps
955
+ JSON.stringify(e),
956
+ t,
957
+ n,
958
+ p,
959
+ r
960
+ ]);
961
+ const l = z(null);
962
+ H(() => {
963
+ var m;
964
+ !i && ((m = c.entry) != null && m.target) && !r && !p && l.current !== c.entry.target && (l.current = c.entry.target, d({ isIntersecting: o, entry: void 0 }));
965
+ }, [i, c.entry, r, p, o]);
966
+ const g = [
967
+ u,
968
+ !!c.isIntersecting,
969
+ c.entry
970
+ ];
971
+ return g.ref = g[0], g.isIntersecting = g[1], g.entry = g[2], g;
972
+ }
973
+ function Qa() {
974
+ const [e, t] = P(!1);
975
+ return H(() => {
976
+ t(!0);
977
+ }, []), e;
978
+ }
979
+ function Xo() {
980
+ const e = z(!1);
981
+ return H(() => (e.current = !0, () => {
982
+ e.current = !1;
983
+ }), []), R(() => e.current, []);
984
+ }
985
+ function Za(e = /* @__PURE__ */ new Map()) {
986
+ const [t, n] = P(new Map(e)), r = {
987
+ set: R((o, s) => {
236
988
  n((a) => {
237
989
  const i = new Map(a);
238
990
  return i.set(o, s), i;
239
991
  });
240
992
  }, []),
241
- setAll: J((o) => {
993
+ setAll: R((o) => {
242
994
  n(() => new Map(o));
243
995
  }, []),
244
- remove: J((o) => {
996
+ remove: R((o) => {
245
997
  n((s) => {
246
998
  const a = new Map(s);
247
999
  return a.delete(o), a;
248
1000
  });
249
1001
  }, []),
250
- reset: J(() => {
1002
+ reset: R(() => {
251
1003
  n(() => /* @__PURE__ */ new Map());
252
1004
  }, [])
253
1005
  };
254
1006
  return [t, r];
255
1007
  }
256
- function Js(e, t, n = "mousedown", r = {}) {
257
- Oe(
1008
+ function ei(e, t, n = "mousedown", r = {}) {
1009
+ G(
258
1010
  n,
259
1011
  (o) => {
260
1012
  const s = o.target;
261
- if (!s || !s.isConnected)
1013
+ if (!(s != null && s.isConnected))
262
1014
  return;
263
1015
  (Array.isArray(e) ? e.filter((i) => !!i.current).every((i) => i.current && !i.current.contains(s)) : e.current && !e.current.contains(s)) && t(o);
264
1016
  },
@@ -266,17 +1018,324 @@ function Js(e, t, n = "mousedown", r = {}) {
266
1018
  r
267
1019
  );
268
1020
  }
269
- var Sr = typeof window > "u";
270
- function Vs(e = {}) {
1021
+ var on = typeof window > "u";
1022
+ function ti(e, t = {}) {
1023
+ let { initializeWithValue: n = !0 } = t;
1024
+ on && (n = !1);
1025
+ const r = R(
1026
+ (u) => {
1027
+ if (t.deserializer)
1028
+ return t.deserializer(u);
1029
+ if (u === "undefined")
1030
+ return;
1031
+ let c;
1032
+ try {
1033
+ c = JSON.parse(u);
1034
+ } catch (d) {
1035
+ return console.error("Error parsing JSON:", d), null;
1036
+ }
1037
+ return c;
1038
+ },
1039
+ [t]
1040
+ ), o = R(() => {
1041
+ if (on)
1042
+ return null;
1043
+ try {
1044
+ const u = window.localStorage.getItem(e);
1045
+ return u ? r(u) : null;
1046
+ } catch (u) {
1047
+ return console.warn(`Error reading localStorage key “${e}”:`, u), null;
1048
+ }
1049
+ }, [e, r]), [s, a] = P(() => {
1050
+ if (n)
1051
+ return o();
1052
+ });
1053
+ H(() => {
1054
+ a(o());
1055
+ }, [e]);
1056
+ const i = R(
1057
+ (u) => {
1058
+ u.key && u.key !== e || a(o());
1059
+ },
1060
+ [e, o]
1061
+ );
1062
+ return G("storage", i), G("local-storage", i), s;
1063
+ }
1064
+ var sn = {
1065
+ width: void 0,
1066
+ height: void 0
1067
+ };
1068
+ function ni(e) {
1069
+ const { ref: t, box: n = "content-box" } = e, [{ width: r, height: o }, s] = P(sn), a = Xo(), i = z({ ...sn }), u = z(void 0);
1070
+ return u.current = e.onResize, H(() => {
1071
+ if (!t.current || typeof window > "u" || !("ResizeObserver" in window)) return;
1072
+ const c = new ResizeObserver(([d]) => {
1073
+ const h = n === "border-box" ? "borderBoxSize" : n === "device-pixel-content-box" ? "devicePixelContentBoxSize" : "contentBoxSize", p = an(d, h, "inlineSize"), l = an(d, h, "blockSize");
1074
+ if (i.current.width !== p || i.current.height !== l) {
1075
+ const m = { width: p, height: l };
1076
+ i.current.width = p, i.current.height = l, u.current ? u.current(m) : a() && s(m);
1077
+ }
1078
+ });
1079
+ return c.observe(t.current, { box: n }), () => {
1080
+ c.disconnect();
1081
+ };
1082
+ }, [n, t, a]), { width: r, height: o };
1083
+ }
1084
+ function an(e, t, n) {
1085
+ return e[t] ? Array.isArray(e[t]) ? (
1086
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
1087
+ e[t][0][n]
1088
+ ) : (
1089
+ // @ts-ignore Support Firefox's non-standard behavior
1090
+ e[t][n]
1091
+ ) : t === "contentBoxSize" ? e.contentRect[n === "inlineSize" ? "width" : "height"] : void 0;
1092
+ }
1093
+ var ln = typeof window > "u";
1094
+ function ri(e = {}) {
271
1095
  let { initializeWithValue: t = !0 } = e;
272
- Sr && (t = !1);
273
- const [n, r] = ke(() => t ? {
1096
+ ln && (t = !1);
1097
+ const n = () => {
1098
+ if (!ln)
1099
+ return window.screen;
1100
+ }, [r, o] = P(() => {
1101
+ if (t)
1102
+ return n();
1103
+ }), s = Ut(
1104
+ o,
1105
+ e.debounceDelay
1106
+ );
1107
+ function a() {
1108
+ const i = n(), u = e.debounceDelay ? s : o;
1109
+ if (i) {
1110
+ const {
1111
+ width: c,
1112
+ height: d,
1113
+ availHeight: h,
1114
+ availWidth: p,
1115
+ colorDepth: l,
1116
+ orientation: g,
1117
+ pixelDepth: m
1118
+ } = i;
1119
+ u({
1120
+ width: c,
1121
+ height: d,
1122
+ availHeight: h,
1123
+ availWidth: p,
1124
+ colorDepth: l,
1125
+ orientation: g,
1126
+ pixelDepth: m
1127
+ });
1128
+ }
1129
+ }
1130
+ return G("resize", a), re(() => {
1131
+ a();
1132
+ }, []), r;
1133
+ }
1134
+ var Ke = /* @__PURE__ */ new Map();
1135
+ function Qo(e) {
1136
+ const t = document.querySelector(
1137
+ `script[src="${e}"]`
1138
+ ), n = t == null ? void 0 : t.getAttribute("data-status");
1139
+ return {
1140
+ node: t,
1141
+ status: n
1142
+ };
1143
+ }
1144
+ function oi(e, t) {
1145
+ const [n, r] = P(() => !e || t != null && t.shouldPreventLoad ? "idle" : typeof window > "u" ? "loading" : Ke.get(e) ?? "loading");
1146
+ return H(() => {
1147
+ if (!e || t != null && t.shouldPreventLoad)
1148
+ return;
1149
+ const o = Ke.get(e);
1150
+ if (o === "ready" || o === "error") {
1151
+ r(o);
1152
+ return;
1153
+ }
1154
+ const s = Qo(e);
1155
+ let a = s.node;
1156
+ if (a)
1157
+ r(s.status ?? o ?? "loading");
1158
+ else {
1159
+ a = document.createElement("script"), a.src = e, a.async = !0, t != null && t.id && (a.id = t.id), a.setAttribute("data-status", "loading"), document.body.appendChild(a);
1160
+ const u = (c) => {
1161
+ const d = c.type === "load" ? "ready" : "error";
1162
+ a == null || a.setAttribute("data-status", d);
1163
+ };
1164
+ a.addEventListener("load", u), a.addEventListener("error", u);
1165
+ }
1166
+ const i = (u) => {
1167
+ const c = u.type === "load" ? "ready" : "error";
1168
+ r(c), Ke.set(e, c);
1169
+ };
1170
+ return a.addEventListener("load", i), a.addEventListener("error", i), () => {
1171
+ a && (a.removeEventListener("load", i), a.removeEventListener("error", i)), a && (t != null && t.removeOnUnmount) && (a.remove(), Ke.delete(e));
1172
+ };
1173
+ }, [e, t == null ? void 0 : t.shouldPreventLoad, t == null ? void 0 : t.removeOnUnmount, t == null ? void 0 : t.id]), n;
1174
+ }
1175
+ var Zo = typeof window > "u";
1176
+ function si(e = {}) {
1177
+ const { autoLock: t = !0, lockTarget: n, widthReflow: r = !0 } = e, [o, s] = P(!1), a = z(null), i = z(null), u = () => {
1178
+ if (a.current) {
1179
+ const { overflow: d, paddingRight: h } = a.current.style;
1180
+ if (i.current = { overflow: d, paddingRight: h }, r) {
1181
+ const p = a.current === document.body ? window.innerWidth : a.current.offsetWidth, l = parseInt(window.getComputedStyle(a.current).paddingRight, 10) || 0, g = p - a.current.scrollWidth;
1182
+ a.current.style.paddingRight = `${g + l}px`;
1183
+ }
1184
+ a.current.style.overflow = "hidden", s(!0);
1185
+ }
1186
+ }, c = () => {
1187
+ a.current && i.current && (a.current.style.overflow = i.current.overflow, r && (a.current.style.paddingRight = i.current.paddingRight)), s(!1);
1188
+ };
1189
+ return re(() => {
1190
+ if (!Zo)
1191
+ return n && (a.current = typeof n == "string" ? document.querySelector(n) : n), a.current || (a.current = document.body), t && u(), () => {
1192
+ c();
1193
+ };
1194
+ }, [t, n, r]), { isLocked: o, lock: u, unlock: c };
1195
+ }
1196
+ var St = typeof window > "u";
1197
+ function ai(e, t, n = {}) {
1198
+ const { initializeWithValue: r = !0 } = n, o = R(
1199
+ (p) => n.serializer ? n.serializer(p) : JSON.stringify(p),
1200
+ [n]
1201
+ ), s = R(
1202
+ (p) => {
1203
+ if (n.deserializer)
1204
+ return n.deserializer(p);
1205
+ if (p === "undefined")
1206
+ return;
1207
+ const l = t instanceof Function ? t() : t;
1208
+ let g;
1209
+ try {
1210
+ g = JSON.parse(p);
1211
+ } catch (m) {
1212
+ return console.error("Error parsing JSON:", m), l;
1213
+ }
1214
+ return g;
1215
+ },
1216
+ [n, t]
1217
+ ), a = R(() => {
1218
+ const p = t instanceof Function ? t() : t;
1219
+ if (St)
1220
+ return p;
1221
+ try {
1222
+ const l = window.sessionStorage.getItem(e);
1223
+ return l ? s(l) : p;
1224
+ } catch (l) {
1225
+ return console.warn(`Error reading sessionStorage key “${e}”:`, l), p;
1226
+ }
1227
+ }, [t, e, s]), [i, u] = P(() => r ? a() : t instanceof Function ? t() : t), c = et((p) => {
1228
+ St && console.warn(
1229
+ `Tried setting sessionStorage key “${e}” even though environment is not a client`
1230
+ );
1231
+ try {
1232
+ const l = p instanceof Function ? p(a()) : p;
1233
+ window.sessionStorage.setItem(e, o(l)), u(l), window.dispatchEvent(new StorageEvent("session-storage", { key: e }));
1234
+ } catch (l) {
1235
+ console.warn(`Error setting sessionStorage key “${e}”:`, l);
1236
+ }
1237
+ }), d = et(() => {
1238
+ St && console.warn(
1239
+ `Tried removing sessionStorage key “${e}” even though environment is not a client`
1240
+ );
1241
+ const p = t instanceof Function ? t() : t;
1242
+ window.sessionStorage.removeItem(e), u(p), window.dispatchEvent(new StorageEvent("session-storage", { key: e }));
1243
+ });
1244
+ H(() => {
1245
+ u(a());
1246
+ }, [e]);
1247
+ const h = R(
1248
+ (p) => {
1249
+ p.key && p.key !== e || u(a());
1250
+ },
1251
+ [e, a]
1252
+ );
1253
+ return G("storage", h), G("session-storage", h), [i, c, d];
1254
+ }
1255
+ function ii(e) {
1256
+ const [t, n] = P(1), r = t + 1 <= e, o = t - 1 > 0, s = R(
1257
+ (c) => {
1258
+ const d = c instanceof Function ? c(t) : c;
1259
+ if (d >= 1 && d <= e) {
1260
+ n(d);
1261
+ return;
1262
+ }
1263
+ throw new Error("Step not valid");
1264
+ },
1265
+ [e, t]
1266
+ ), a = R(() => {
1267
+ r && n((c) => c + 1);
1268
+ }, [r]), i = R(() => {
1269
+ o && n((c) => c - 1);
1270
+ }, [o]), u = R(() => {
1271
+ n(1);
1272
+ }, []);
1273
+ return [
1274
+ t,
1275
+ {
1276
+ goToNextStep: a,
1277
+ goToPrevStep: i,
1278
+ canGoToNextStep: r,
1279
+ canGoToPrevStep: o,
1280
+ setStep: s,
1281
+ reset: u
1282
+ }
1283
+ ];
1284
+ }
1285
+ var es = "(prefers-color-scheme: dark)", ts = "usehooks-ts-ternary-dark-mode";
1286
+ function li({
1287
+ defaultValue: e = "system",
1288
+ localStorageKey: t = ts,
1289
+ initializeWithValue: n = !0
1290
+ } = {}) {
1291
+ const r = Cn(es, { initializeWithValue: n }), [o, s] = An(t, e, {
1292
+ initializeWithValue: n
1293
+ });
1294
+ return {
1295
+ isDarkMode: o === "dark" || o === "system" && r,
1296
+ ternaryDarkMode: o,
1297
+ setTernaryDarkMode: s,
1298
+ toggleTernaryDarkMode: () => {
1299
+ const u = ["light", "system", "dark"];
1300
+ s((c) => {
1301
+ const d = (u.indexOf(c) + 1) % u.length;
1302
+ return u[d];
1303
+ });
1304
+ }
1305
+ };
1306
+ }
1307
+ function ci(e, t) {
1308
+ const n = z(e);
1309
+ re(() => {
1310
+ n.current = e;
1311
+ }, [e]), H(() => {
1312
+ if (!t && t !== 0)
1313
+ return;
1314
+ const r = setTimeout(() => {
1315
+ n.current();
1316
+ }, t);
1317
+ return () => {
1318
+ clearTimeout(r);
1319
+ };
1320
+ }, [t]);
1321
+ }
1322
+ function ui(e) {
1323
+ const [t, n] = P(!!e), r = R(() => {
1324
+ n((o) => !o);
1325
+ }, []);
1326
+ return [t, r, n];
1327
+ }
1328
+ var ns = typeof window > "u";
1329
+ function di(e = {}) {
1330
+ let { initializeWithValue: t = !0 } = e;
1331
+ ns && (t = !1);
1332
+ const [n, r] = P(() => t ? {
274
1333
  width: window.innerWidth,
275
1334
  height: window.innerHeight
276
1335
  } : {
277
1336
  width: void 0,
278
1337
  height: void 0
279
- }), o = Er(
1338
+ }), o = Ut(
280
1339
  r,
281
1340
  e.debounceDelay
282
1341
  );
@@ -286,42 +1345,42 @@ function Vs(e = {}) {
286
1345
  height: window.innerHeight
287
1346
  });
288
1347
  }
289
- return Oe("resize", s), ye(() => {
1348
+ return G("resize", s), re(() => {
290
1349
  s();
291
1350
  }, []), n;
292
1351
  }
293
- function dn(e, t) {
1352
+ function Ln(e, t) {
294
1353
  return function() {
295
1354
  return e.apply(t, arguments);
296
1355
  };
297
1356
  }
298
- const { toString: Tr } = Object.prototype, { getPrototypeOf: At } = Object, Ye = /* @__PURE__ */ ((e) => (t) => {
299
- const n = Tr.call(t);
1357
+ const { toString: rs } = Object.prototype, { getPrototypeOf: jt } = Object, ot = /* @__PURE__ */ ((e) => (t) => {
1358
+ const n = rs.call(t);
300
1359
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
301
- })(/* @__PURE__ */ Object.create(null)), G = (e) => (e = e.toLowerCase(), (t) => Ye(t) === e), Xe = (e) => (t) => typeof t === e, { isArray: be } = Array, Ae = Xe("undefined");
302
- function Rr(e) {
303
- return e !== null && !Ae(e) && e.constructor !== null && !Ae(e.constructor) && z(e.constructor.isBuffer) && e.constructor.isBuffer(e);
1360
+ })(/* @__PURE__ */ Object.create(null)), oe = (e) => (e = e.toLowerCase(), (t) => ot(t) === e), st = (e) => (t) => typeof t === e, { isArray: Oe } = Array, Pe = st("undefined");
1361
+ function os(e) {
1362
+ return e !== null && !Pe(e) && e.constructor !== null && !Pe(e.constructor) && J(e.constructor.isBuffer) && e.constructor.isBuffer(e);
304
1363
  }
305
- const fn = G("ArrayBuffer");
306
- function Or(e) {
1364
+ const Dn = oe("ArrayBuffer");
1365
+ function ss(e) {
307
1366
  let t;
308
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && fn(e.buffer), t;
1367
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Dn(e.buffer), t;
309
1368
  }
310
- const Ar = Xe("string"), z = Xe("function"), pn = Xe("number"), Ge = (e) => e !== null && typeof e == "object", kr = (e) => e === !0 || e === !1, $e = (e) => {
311
- if (Ye(e) !== "object")
1369
+ const as = st("string"), J = st("function"), Mn = st("number"), at = (e) => e !== null && typeof e == "object", is = (e) => e === !0 || e === !1, Ge = (e) => {
1370
+ if (ot(e) !== "object")
312
1371
  return !1;
313
- const t = At(e);
1372
+ const t = jt(e);
314
1373
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
315
- }, Nr = G("Date"), _r = G("File"), Lr = G("Blob"), Cr = G("FileList"), Mr = (e) => Ge(e) && z(e.pipe), Pr = (e) => {
1374
+ }, ls = oe("Date"), cs = oe("File"), us = oe("Blob"), ds = oe("FileList"), fs = (e) => at(e) && J(e.pipe), ps = (e) => {
316
1375
  let t;
317
- return e && (typeof FormData == "function" && e instanceof FormData || z(e.append) && ((t = Ye(e)) === "formdata" || // detect form-data instance
318
- t === "object" && z(e.toString) && e.toString() === "[object FormData]"));
319
- }, Br = G("URLSearchParams"), [Ir, Dr, Fr, jr] = ["ReadableStream", "Request", "Response", "Headers"].map(G), Hr = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
320
- function Le(e, t, { allOwnKeys: n = !1 } = {}) {
1376
+ return e && (typeof FormData == "function" && e instanceof FormData || J(e.append) && ((t = ot(e)) === "formdata" || // detect form-data instance
1377
+ t === "object" && J(e.toString) && e.toString() === "[object FormData]"));
1378
+ }, hs = oe("URLSearchParams"), [ms, gs, ws, ys] = ["ReadableStream", "Request", "Response", "Headers"].map(oe), bs = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
1379
+ function Be(e, t, { allOwnKeys: n = !1 } = {}) {
321
1380
  if (e === null || typeof e > "u")
322
1381
  return;
323
1382
  let r, o;
324
- if (typeof e != "object" && (e = [e]), be(e))
1383
+ if (typeof e != "object" && (e = [e]), Oe(e))
325
1384
  for (r = 0, o = e.length; r < o; r++)
326
1385
  t.call(null, e[r], r, e);
327
1386
  else {
@@ -331,7 +1390,7 @@ function Le(e, t, { allOwnKeys: n = !1 } = {}) {
331
1390
  i = s[r], t.call(null, e[i], i, e);
332
1391
  }
333
1392
  }
334
- function hn(e, t) {
1393
+ function In(e, t) {
335
1394
  t = t.toLowerCase();
336
1395
  const n = Object.keys(e);
337
1396
  let r = n.length, o;
@@ -340,75 +1399,75 @@ function hn(e, t) {
340
1399
  return o;
341
1400
  return null;
342
1401
  }
343
- const ce = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, mn = (e) => !Ae(e) && e !== ce;
344
- function yt() {
345
- const { caseless: e } = mn(this) && this || {}, t = {}, n = (r, o) => {
346
- const s = e && hn(t, o) || o;
347
- $e(t[s]) && $e(r) ? t[s] = yt(t[s], r) : $e(r) ? t[s] = yt({}, r) : be(r) ? t[s] = r.slice() : t[s] = r;
1402
+ const we = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Pn = (e) => !Pe(e) && e !== we;
1403
+ function Ct() {
1404
+ const { caseless: e } = Pn(this) && this || {}, t = {}, n = (r, o) => {
1405
+ const s = e && In(t, o) || o;
1406
+ Ge(t[s]) && Ge(r) ? t[s] = Ct(t[s], r) : Ge(r) ? t[s] = Ct({}, r) : Oe(r) ? t[s] = r.slice() : t[s] = r;
348
1407
  };
349
1408
  for (let r = 0, o = arguments.length; r < o; r++)
350
- arguments[r] && Le(arguments[r], n);
1409
+ arguments[r] && Be(arguments[r], n);
351
1410
  return t;
352
1411
  }
353
- const Ur = (e, t, n, { allOwnKeys: r } = {}) => (Le(t, (o, s) => {
354
- n && z(o) ? e[s] = dn(o, n) : e[s] = o;
355
- }, { allOwnKeys: r }), e), qr = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), zr = (e, t, n, r) => {
1412
+ const vs = (e, t, n, { allOwnKeys: r } = {}) => (Be(t, (o, s) => {
1413
+ n && J(o) ? e[s] = Ln(o, n) : e[s] = o;
1414
+ }, { allOwnKeys: r }), e), Es = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ss = (e, t, n, r) => {
356
1415
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
357
1416
  value: t.prototype
358
1417
  }), n && Object.assign(e.prototype, n);
359
- }, $r = (e, t, n, r) => {
1418
+ }, xs = (e, t, n, r) => {
360
1419
  let o, s, a;
361
1420
  const i = {};
362
1421
  if (t = t || {}, e == null) return t;
363
1422
  do {
364
1423
  for (o = Object.getOwnPropertyNames(e), s = o.length; s-- > 0; )
365
1424
  a = o[s], (!r || r(a, e, t)) && !i[a] && (t[a] = e[a], i[a] = !0);
366
- e = n !== !1 && At(e);
1425
+ e = n !== !1 && jt(e);
367
1426
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
368
1427
  return t;
369
- }, Wr = (e, t, n) => {
1428
+ }, Ts = (e, t, n) => {
370
1429
  e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
371
1430
  const r = e.indexOf(t, n);
372
1431
  return r !== -1 && r === n;
373
- }, Jr = (e) => {
1432
+ }, _s = (e) => {
374
1433
  if (!e) return null;
375
- if (be(e)) return e;
1434
+ if (Oe(e)) return e;
376
1435
  let t = e.length;
377
- if (!pn(t)) return null;
1436
+ if (!Mn(t)) return null;
378
1437
  const n = new Array(t);
379
1438
  for (; t-- > 0; )
380
1439
  n[t] = e[t];
381
1440
  return n;
382
- }, Vr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && At(Uint8Array)), Kr = (e, t) => {
1441
+ }, Rs = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && jt(Uint8Array)), Os = (e, t) => {
383
1442
  const r = (e && e[Symbol.iterator]).call(e);
384
1443
  let o;
385
1444
  for (; (o = r.next()) && !o.done; ) {
386
1445
  const s = o.value;
387
1446
  t.call(e, s[0], s[1]);
388
1447
  }
389
- }, Yr = (e, t) => {
1448
+ }, Ns = (e, t) => {
390
1449
  let n;
391
1450
  const r = [];
392
1451
  for (; (n = e.exec(t)) !== null; )
393
1452
  r.push(n);
394
1453
  return r;
395
- }, Xr = G("HTMLFormElement"), Gr = (e) => e.toLowerCase().replace(
1454
+ }, As = oe("HTMLFormElement"), Cs = (e) => e.toLowerCase().replace(
396
1455
  /[-_\s]([a-z\d])(\w*)/g,
397
1456
  function(n, r, o) {
398
1457
  return r.toUpperCase() + o;
399
1458
  }
400
- ), qt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Qr = G("RegExp"), gn = (e, t) => {
1459
+ ), cn = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ks = oe("RegExp"), Bn = (e, t) => {
401
1460
  const n = Object.getOwnPropertyDescriptors(e), r = {};
402
- Le(n, (o, s) => {
1461
+ Be(n, (o, s) => {
403
1462
  let a;
404
1463
  (a = t(o, s, e)) !== !1 && (r[s] = a || o);
405
1464
  }), Object.defineProperties(e, r);
406
- }, Zr = (e) => {
407
- gn(e, (t, n) => {
408
- if (z(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
1465
+ }, Ls = (e) => {
1466
+ Bn(e, (t, n) => {
1467
+ if (J(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
409
1468
  return !1;
410
1469
  const r = e[n];
411
- if (z(r)) {
1470
+ if (J(r)) {
412
1471
  if (t.enumerable = !1, "writable" in t) {
413
1472
  t.writable = !1;
414
1473
  return;
@@ -418,116 +1477,104 @@ const Ur = (e, t, n, { allOwnKeys: r } = {}) => (Le(t, (o, s) => {
418
1477
  });
419
1478
  }
420
1479
  });
421
- }, eo = (e, t) => {
1480
+ }, Ds = (e, t) => {
422
1481
  const n = {}, r = (o) => {
423
1482
  o.forEach((s) => {
424
1483
  n[s] = !0;
425
1484
  });
426
1485
  };
427
- return be(e) ? r(e) : r(String(e).split(t)), n;
428
- }, to = () => {
429
- }, no = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, dt = "abcdefghijklmnopqrstuvwxyz", zt = "0123456789", wn = {
430
- DIGIT: zt,
431
- ALPHA: dt,
432
- ALPHA_DIGIT: dt + dt.toUpperCase() + zt
433
- }, ro = (e = 16, t = wn.ALPHA_DIGIT) => {
434
- let n = "";
435
- const { length: r } = t;
436
- for (; e--; )
437
- n += t[Math.random() * r | 0];
438
- return n;
439
- };
440
- function oo(e) {
441
- return !!(e && z(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
1486
+ return Oe(e) ? r(e) : r(String(e).split(t)), n;
1487
+ }, Ms = () => {
1488
+ }, Is = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
1489
+ function Ps(e) {
1490
+ return !!(e && J(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
442
1491
  }
443
- const so = (e) => {
1492
+ const Bs = (e) => {
444
1493
  const t = new Array(10), n = (r, o) => {
445
- if (Ge(r)) {
1494
+ if (at(r)) {
446
1495
  if (t.indexOf(r) >= 0)
447
1496
  return;
448
1497
  if (!("toJSON" in r)) {
449
1498
  t[o] = r;
450
- const s = be(r) ? [] : {};
451
- return Le(r, (a, i) => {
452
- const d = n(a, o + 1);
453
- !Ae(d) && (s[i] = d);
1499
+ const s = Oe(r) ? [] : {};
1500
+ return Be(r, (a, i) => {
1501
+ const u = n(a, o + 1);
1502
+ !Pe(u) && (s[i] = u);
454
1503
  }), t[o] = void 0, s;
455
1504
  }
456
1505
  }
457
1506
  return r;
458
1507
  };
459
1508
  return n(e, 0);
460
- }, ao = G("AsyncFunction"), io = (e) => e && (Ge(e) || z(e)) && z(e.then) && z(e.catch), yn = ((e, t) => e ? setImmediate : t ? ((n, r) => (ce.addEventListener("message", ({ source: o, data: s }) => {
461
- o === ce && s === n && r.length && r.shift()();
1509
+ }, Fs = oe("AsyncFunction"), Us = (e) => e && (at(e) || J(e)) && J(e.then) && J(e.catch), Fn = ((e, t) => e ? setImmediate : t ? ((n, r) => (we.addEventListener("message", ({ source: o, data: s }) => {
1510
+ o === we && s === n && r.length && r.shift()();
462
1511
  }, !1), (o) => {
463
- r.push(o), ce.postMessage(n, "*");
1512
+ r.push(o), we.postMessage(n, "*");
464
1513
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
465
1514
  typeof setImmediate == "function",
466
- z(ce.postMessage)
467
- ), lo = typeof queueMicrotask < "u" ? queueMicrotask.bind(ce) : typeof process < "u" && process.nextTick || yn, c = {
468
- isArray: be,
469
- isArrayBuffer: fn,
470
- isBuffer: Rr,
471
- isFormData: Pr,
472
- isArrayBufferView: Or,
473
- isString: Ar,
474
- isNumber: pn,
475
- isBoolean: kr,
476
- isObject: Ge,
477
- isPlainObject: $e,
478
- isReadableStream: Ir,
479
- isRequest: Dr,
480
- isResponse: Fr,
481
- isHeaders: jr,
482
- isUndefined: Ae,
483
- isDate: Nr,
484
- isFile: _r,
485
- isBlob: Lr,
486
- isRegExp: Qr,
487
- isFunction: z,
488
- isStream: Mr,
489
- isURLSearchParams: Br,
490
- isTypedArray: Vr,
491
- isFileList: Cr,
492
- forEach: Le,
493
- merge: yt,
494
- extend: Ur,
495
- trim: Hr,
496
- stripBOM: qr,
497
- inherits: zr,
498
- toFlatObject: $r,
499
- kindOf: Ye,
500
- kindOfTest: G,
501
- endsWith: Wr,
502
- toArray: Jr,
503
- forEachEntry: Kr,
504
- matchAll: Yr,
505
- isHTMLForm: Xr,
506
- hasOwnProperty: qt,
507
- hasOwnProp: qt,
1515
+ J(we.postMessage)
1516
+ ), js = typeof queueMicrotask < "u" ? queueMicrotask.bind(we) : typeof process < "u" && process.nextTick || Fn, f = {
1517
+ isArray: Oe,
1518
+ isArrayBuffer: Dn,
1519
+ isBuffer: os,
1520
+ isFormData: ps,
1521
+ isArrayBufferView: ss,
1522
+ isString: as,
1523
+ isNumber: Mn,
1524
+ isBoolean: is,
1525
+ isObject: at,
1526
+ isPlainObject: Ge,
1527
+ isReadableStream: ms,
1528
+ isRequest: gs,
1529
+ isResponse: ws,
1530
+ isHeaders: ys,
1531
+ isUndefined: Pe,
1532
+ isDate: ls,
1533
+ isFile: cs,
1534
+ isBlob: us,
1535
+ isRegExp: ks,
1536
+ isFunction: J,
1537
+ isStream: fs,
1538
+ isURLSearchParams: hs,
1539
+ isTypedArray: Rs,
1540
+ isFileList: ds,
1541
+ forEach: Be,
1542
+ merge: Ct,
1543
+ extend: vs,
1544
+ trim: bs,
1545
+ stripBOM: Es,
1546
+ inherits: Ss,
1547
+ toFlatObject: xs,
1548
+ kindOf: ot,
1549
+ kindOfTest: oe,
1550
+ endsWith: Ts,
1551
+ toArray: _s,
1552
+ forEachEntry: Os,
1553
+ matchAll: Ns,
1554
+ isHTMLForm: As,
1555
+ hasOwnProperty: cn,
1556
+ hasOwnProp: cn,
508
1557
  // an alias to avoid ESLint no-prototype-builtins detection
509
- reduceDescriptors: gn,
510
- freezeMethods: Zr,
511
- toObjectSet: eo,
512
- toCamelCase: Gr,
513
- noop: to,
514
- toFiniteNumber: no,
515
- findKey: hn,
516
- global: ce,
517
- isContextDefined: mn,
518
- ALPHABET: wn,
519
- generateString: ro,
520
- isSpecCompliantForm: oo,
521
- toJSONObject: so,
522
- isAsyncFn: ao,
523
- isThenable: io,
524
- setImmediate: yn,
525
- asap: lo
1558
+ reduceDescriptors: Bn,
1559
+ freezeMethods: Ls,
1560
+ toObjectSet: Ds,
1561
+ toCamelCase: Cs,
1562
+ noop: Ms,
1563
+ toFiniteNumber: Is,
1564
+ findKey: In,
1565
+ global: we,
1566
+ isContextDefined: Pn,
1567
+ isSpecCompliantForm: Ps,
1568
+ toJSONObject: Bs,
1569
+ isAsyncFn: Fs,
1570
+ isThenable: Us,
1571
+ setImmediate: Fn,
1572
+ asap: js
526
1573
  };
527
1574
  function v(e, t, n, r, o) {
528
1575
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
529
1576
  }
530
- c.inherits(v, Error, {
1577
+ f.inherits(v, Error, {
531
1578
  toJSON: function() {
532
1579
  return {
533
1580
  // Standard
@@ -542,13 +1589,13 @@ c.inherits(v, Error, {
542
1589
  columnNumber: this.columnNumber,
543
1590
  stack: this.stack,
544
1591
  // Axios
545
- config: c.toJSONObject(this.config),
1592
+ config: f.toJSONObject(this.config),
546
1593
  code: this.code,
547
1594
  status: this.status
548
1595
  };
549
1596
  }
550
1597
  });
551
- const bn = v.prototype, vn = {};
1598
+ const Un = v.prototype, jn = {};
552
1599
  [
553
1600
  "ERR_BAD_OPTION_VALUE",
554
1601
  "ERR_BAD_OPTION",
@@ -564,96 +1611,96 @@ const bn = v.prototype, vn = {};
564
1611
  "ERR_INVALID_URL"
565
1612
  // eslint-disable-next-line func-names
566
1613
  ].forEach((e) => {
567
- vn[e] = { value: e };
1614
+ jn[e] = { value: e };
568
1615
  });
569
- Object.defineProperties(v, vn);
570
- Object.defineProperty(bn, "isAxiosError", { value: !0 });
1616
+ Object.defineProperties(v, jn);
1617
+ Object.defineProperty(Un, "isAxiosError", { value: !0 });
571
1618
  v.from = (e, t, n, r, o, s) => {
572
- const a = Object.create(bn);
573
- return c.toFlatObject(e, a, function(d) {
574
- return d !== Error.prototype;
1619
+ const a = Object.create(Un);
1620
+ return f.toFlatObject(e, a, function(u) {
1621
+ return u !== Error.prototype;
575
1622
  }, (i) => i !== "isAxiosError"), v.call(a, e.message, t, n, r, o), a.cause = e, a.name = e.name, s && Object.assign(a, s), a;
576
1623
  };
577
- const co = null;
578
- function bt(e) {
579
- return c.isPlainObject(e) || c.isArray(e);
1624
+ const $s = null;
1625
+ function kt(e) {
1626
+ return f.isPlainObject(e) || f.isArray(e);
580
1627
  }
581
- function xn(e) {
582
- return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
1628
+ function $n(e) {
1629
+ return f.endsWith(e, "[]") ? e.slice(0, -2) : e;
583
1630
  }
584
- function $t(e, t, n) {
1631
+ function un(e, t, n) {
585
1632
  return e ? e.concat(t).map(function(o, s) {
586
- return o = xn(o), !n && s ? "[" + o + "]" : o;
1633
+ return o = $n(o), !n && s ? "[" + o + "]" : o;
587
1634
  }).join(n ? "." : "") : t;
588
1635
  }
589
- function uo(e) {
590
- return c.isArray(e) && !e.some(bt);
1636
+ function Hs(e) {
1637
+ return f.isArray(e) && !e.some(kt);
591
1638
  }
592
- const fo = c.toFlatObject(c, {}, null, function(t) {
1639
+ const zs = f.toFlatObject(f, {}, null, function(t) {
593
1640
  return /^is[A-Z]/.test(t);
594
1641
  });
595
- function Qe(e, t, n) {
596
- if (!c.isObject(e))
1642
+ function it(e, t, n) {
1643
+ if (!f.isObject(e))
597
1644
  throw new TypeError("target must be an object");
598
- t = t || new FormData(), n = c.toFlatObject(n, {
1645
+ t = t || new FormData(), n = f.toFlatObject(n, {
599
1646
  metaTokens: !0,
600
1647
  dots: !1,
601
1648
  indexes: !1
602
- }, !1, function(g, m) {
603
- return !c.isUndefined(m[g]);
1649
+ }, !1, function(m, y) {
1650
+ return !f.isUndefined(y[m]);
604
1651
  });
605
- const r = n.metaTokens, o = n.visitor || f, s = n.dots, a = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
606
- if (!c.isFunction(o))
1652
+ const r = n.metaTokens, o = n.visitor || d, s = n.dots, a = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && f.isSpecCompliantForm(t);
1653
+ if (!f.isFunction(o))
607
1654
  throw new TypeError("visitor must be a function");
608
- function u(w) {
609
- if (w === null) return "";
610
- if (c.isDate(w))
611
- return w.toISOString();
612
- if (!d && c.isBlob(w))
1655
+ function c(g) {
1656
+ if (g === null) return "";
1657
+ if (f.isDate(g))
1658
+ return g.toISOString();
1659
+ if (!u && f.isBlob(g))
613
1660
  throw new v("Blob is not supported. Use a Buffer instead.");
614
- return c.isArrayBuffer(w) || c.isTypedArray(w) ? d && typeof Blob == "function" ? new Blob([w]) : Buffer.from(w) : w;
615
- }
616
- function f(w, g, m) {
617
- let S = w;
618
- if (w && !m && typeof w == "object") {
619
- if (c.endsWith(g, "{}"))
620
- g = r ? g : g.slice(0, -2), w = JSON.stringify(w);
621
- else if (c.isArray(w) && uo(w) || (c.isFileList(w) || c.endsWith(g, "[]")) && (S = c.toArray(w)))
622
- return g = xn(g), S.forEach(function(R, D) {
623
- !(c.isUndefined(R) || R === null) && t.append(
1661
+ return f.isArrayBuffer(g) || f.isTypedArray(g) ? u && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
1662
+ }
1663
+ function d(g, m, y) {
1664
+ let T = g;
1665
+ if (g && !y && typeof g == "object") {
1666
+ if (f.endsWith(m, "{}"))
1667
+ m = r ? m : m.slice(0, -2), g = JSON.stringify(g);
1668
+ else if (f.isArray(g) && Hs(g) || (f.isFileList(g) || f.endsWith(m, "[]")) && (T = f.toArray(g)))
1669
+ return m = $n(m), T.forEach(function(_, U) {
1670
+ !(f.isUndefined(_) || _ === null) && t.append(
624
1671
  // eslint-disable-next-line no-nested-ternary
625
- a === !0 ? $t([g], D, s) : a === null ? g : g + "[]",
626
- u(R)
1672
+ a === !0 ? un([m], U, s) : a === null ? m : m + "[]",
1673
+ c(_)
627
1674
  );
628
1675
  }), !1;
629
1676
  }
630
- return bt(w) ? !0 : (t.append($t(m, g, s), u(w)), !1);
1677
+ return kt(g) ? !0 : (t.append(un(y, m, s), c(g)), !1);
631
1678
  }
632
- const h = [], y = Object.assign(fo, {
633
- defaultVisitor: f,
634
- convertValue: u,
635
- isVisitable: bt
1679
+ const h = [], p = Object.assign(zs, {
1680
+ defaultVisitor: d,
1681
+ convertValue: c,
1682
+ isVisitable: kt
636
1683
  });
637
- function l(w, g) {
638
- if (!c.isUndefined(w)) {
639
- if (h.indexOf(w) !== -1)
640
- throw Error("Circular reference detected in " + g.join("."));
641
- h.push(w), c.forEach(w, function(S, T) {
642
- (!(c.isUndefined(S) || S === null) && o.call(
1684
+ function l(g, m) {
1685
+ if (!f.isUndefined(g)) {
1686
+ if (h.indexOf(g) !== -1)
1687
+ throw Error("Circular reference detected in " + m.join("."));
1688
+ h.push(g), f.forEach(g, function(T, S) {
1689
+ (!(f.isUndefined(T) || T === null) && o.call(
643
1690
  t,
644
- S,
645
- c.isString(T) ? T.trim() : T,
646
- g,
647
- y
648
- )) === !0 && l(S, g ? g.concat(T) : [T]);
1691
+ T,
1692
+ f.isString(S) ? S.trim() : S,
1693
+ m,
1694
+ p
1695
+ )) === !0 && l(T, m ? m.concat(S) : [S]);
649
1696
  }), h.pop();
650
1697
  }
651
1698
  }
652
- if (!c.isObject(e))
1699
+ if (!f.isObject(e))
653
1700
  throw new TypeError("data must be an object");
654
1701
  return l(e), t;
655
1702
  }
656
- function Wt(e) {
1703
+ function dn(e) {
657
1704
  const t = {
658
1705
  "!": "%21",
659
1706
  "'": "%27",
@@ -667,40 +1714,40 @@ function Wt(e) {
667
1714
  return t[r];
668
1715
  });
669
1716
  }
670
- function kt(e, t) {
671
- this._pairs = [], e && Qe(e, this, t);
1717
+ function $t(e, t) {
1718
+ this._pairs = [], e && it(e, this, t);
672
1719
  }
673
- const En = kt.prototype;
674
- En.append = function(t, n) {
1720
+ const Hn = $t.prototype;
1721
+ Hn.append = function(t, n) {
675
1722
  this._pairs.push([t, n]);
676
1723
  };
677
- En.toString = function(t) {
1724
+ Hn.toString = function(t) {
678
1725
  const n = t ? function(r) {
679
- return t.call(this, r, Wt);
680
- } : Wt;
1726
+ return t.call(this, r, dn);
1727
+ } : dn;
681
1728
  return this._pairs.map(function(o) {
682
1729
  return n(o[0]) + "=" + n(o[1]);
683
1730
  }, "").join("&");
684
1731
  };
685
- function po(e) {
1732
+ function Vs(e) {
686
1733
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
687
1734
  }
688
- function Sn(e, t, n) {
1735
+ function zn(e, t, n) {
689
1736
  if (!t)
690
1737
  return e;
691
- const r = n && n.encode || po;
692
- c.isFunction(n) && (n = {
1738
+ const r = n && n.encode || Vs;
1739
+ f.isFunction(n) && (n = {
693
1740
  serialize: n
694
1741
  });
695
1742
  const o = n && n.serialize;
696
1743
  let s;
697
- if (o ? s = o(t, n) : s = c.isURLSearchParams(t) ? t.toString() : new kt(t, n).toString(r), s) {
1744
+ if (o ? s = o(t, n) : s = f.isURLSearchParams(t) ? t.toString() : new $t(t, n).toString(r), s) {
698
1745
  const a = e.indexOf("#");
699
1746
  a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
700
1747
  }
701
1748
  return e;
702
1749
  }
703
- class Jt {
1750
+ class fn {
704
1751
  constructor() {
705
1752
  this.handlers = [];
706
1753
  }
@@ -749,46 +1796,46 @@ class Jt {
749
1796
  * @returns {void}
750
1797
  */
751
1798
  forEach(t) {
752
- c.forEach(this.handlers, function(r) {
1799
+ f.forEach(this.handlers, function(r) {
753
1800
  r !== null && t(r);
754
1801
  });
755
1802
  }
756
1803
  }
757
- const Tn = {
1804
+ const Vn = {
758
1805
  silentJSONParsing: !0,
759
1806
  forcedJSONParsing: !0,
760
1807
  clarifyTimeoutError: !1
761
- }, ho = typeof URLSearchParams < "u" ? URLSearchParams : kt, mo = typeof FormData < "u" ? FormData : null, go = typeof Blob < "u" ? Blob : null, wo = {
1808
+ }, qs = typeof URLSearchParams < "u" ? URLSearchParams : $t, Ws = typeof FormData < "u" ? FormData : null, Ks = typeof Blob < "u" ? Blob : null, Ys = {
762
1809
  isBrowser: !0,
763
1810
  classes: {
764
- URLSearchParams: ho,
765
- FormData: mo,
766
- Blob: go
1811
+ URLSearchParams: qs,
1812
+ FormData: Ws,
1813
+ Blob: Ks
767
1814
  },
768
1815
  protocols: ["http", "https", "file", "blob", "url", "data"]
769
- }, Nt = typeof window < "u" && typeof document < "u", vt = typeof navigator == "object" && navigator || void 0, yo = Nt && (!vt || ["ReactNative", "NativeScript", "NS"].indexOf(vt.product) < 0), bo = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
770
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", vo = Nt && window.location.href || "http://localhost", xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1816
+ }, Ht = typeof window < "u" && typeof document < "u", Lt = typeof navigator == "object" && navigator || void 0, Js = Ht && (!Lt || ["ReactNative", "NativeScript", "NS"].indexOf(Lt.product) < 0), Gs = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
1817
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Xs = Ht && window.location.href || "http://localhost", Qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
771
1818
  __proto__: null,
772
- hasBrowserEnv: Nt,
773
- hasStandardBrowserEnv: yo,
774
- hasStandardBrowserWebWorkerEnv: bo,
775
- navigator: vt,
776
- origin: vo
777
- }, Symbol.toStringTag, { value: "Module" })), I = {
778
- ...xo,
779
- ...wo
1819
+ hasBrowserEnv: Ht,
1820
+ hasStandardBrowserEnv: Js,
1821
+ hasStandardBrowserWebWorkerEnv: Gs,
1822
+ navigator: Lt,
1823
+ origin: Xs
1824
+ }, Symbol.toStringTag, { value: "Module" })), $ = {
1825
+ ...Qs,
1826
+ ...Ys
780
1827
  };
781
- function Eo(e, t) {
782
- return Qe(e, new I.classes.URLSearchParams(), Object.assign({
1828
+ function Zs(e, t) {
1829
+ return it(e, new $.classes.URLSearchParams(), Object.assign({
783
1830
  visitor: function(n, r, o, s) {
784
- return I.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1831
+ return $.isNode && f.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
785
1832
  }
786
1833
  }, t));
787
1834
  }
788
- function So(e) {
789
- return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
1835
+ function ea(e) {
1836
+ return f.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
790
1837
  }
791
- function To(e) {
1838
+ function ta(e) {
792
1839
  const t = {}, n = Object.keys(e);
793
1840
  let r;
794
1841
  const o = n.length;
@@ -797,64 +1844,64 @@ function To(e) {
797
1844
  s = n[r], t[s] = e[s];
798
1845
  return t;
799
1846
  }
800
- function Rn(e) {
1847
+ function qn(e) {
801
1848
  function t(n, r, o, s) {
802
1849
  let a = n[s++];
803
1850
  if (a === "__proto__") return !0;
804
- const i = Number.isFinite(+a), d = s >= n.length;
805
- return a = !a && c.isArray(o) ? o.length : a, d ? (c.hasOwnProp(o, a) ? o[a] = [o[a], r] : o[a] = r, !i) : ((!o[a] || !c.isObject(o[a])) && (o[a] = []), t(n, r, o[a], s) && c.isArray(o[a]) && (o[a] = To(o[a])), !i);
1851
+ const i = Number.isFinite(+a), u = s >= n.length;
1852
+ return a = !a && f.isArray(o) ? o.length : a, u ? (f.hasOwnProp(o, a) ? o[a] = [o[a], r] : o[a] = r, !i) : ((!o[a] || !f.isObject(o[a])) && (o[a] = []), t(n, r, o[a], s) && f.isArray(o[a]) && (o[a] = ta(o[a])), !i);
806
1853
  }
807
- if (c.isFormData(e) && c.isFunction(e.entries)) {
1854
+ if (f.isFormData(e) && f.isFunction(e.entries)) {
808
1855
  const n = {};
809
- return c.forEachEntry(e, (r, o) => {
810
- t(So(r), o, n, 0);
1856
+ return f.forEachEntry(e, (r, o) => {
1857
+ t(ea(r), o, n, 0);
811
1858
  }), n;
812
1859
  }
813
1860
  return null;
814
1861
  }
815
- function Ro(e, t, n) {
816
- if (c.isString(e))
1862
+ function na(e, t, n) {
1863
+ if (f.isString(e))
817
1864
  try {
818
- return (t || JSON.parse)(e), c.trim(e);
1865
+ return (t || JSON.parse)(e), f.trim(e);
819
1866
  } catch (r) {
820
1867
  if (r.name !== "SyntaxError")
821
1868
  throw r;
822
1869
  }
823
1870
  return (n || JSON.stringify)(e);
824
1871
  }
825
- const Ce = {
826
- transitional: Tn,
1872
+ const Fe = {
1873
+ transitional: Vn,
827
1874
  adapter: ["xhr", "http", "fetch"],
828
1875
  transformRequest: [function(t, n) {
829
- const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = c.isObject(t);
830
- if (s && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
831
- return o ? JSON.stringify(Rn(t)) : t;
832
- if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
1876
+ const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = f.isObject(t);
1877
+ if (s && f.isHTMLForm(t) && (t = new FormData(t)), f.isFormData(t))
1878
+ return o ? JSON.stringify(qn(t)) : t;
1879
+ if (f.isArrayBuffer(t) || f.isBuffer(t) || f.isStream(t) || f.isFile(t) || f.isBlob(t) || f.isReadableStream(t))
833
1880
  return t;
834
- if (c.isArrayBufferView(t))
1881
+ if (f.isArrayBufferView(t))
835
1882
  return t.buffer;
836
- if (c.isURLSearchParams(t))
1883
+ if (f.isURLSearchParams(t))
837
1884
  return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
838
1885
  let i;
839
1886
  if (s) {
840
1887
  if (r.indexOf("application/x-www-form-urlencoded") > -1)
841
- return Eo(t, this.formSerializer).toString();
842
- if ((i = c.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
843
- const d = this.env && this.env.FormData;
844
- return Qe(
1888
+ return Zs(t, this.formSerializer).toString();
1889
+ if ((i = f.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
1890
+ const u = this.env && this.env.FormData;
1891
+ return it(
845
1892
  i ? { "files[]": t } : t,
846
- d && new d(),
1893
+ u && new u(),
847
1894
  this.formSerializer
848
1895
  );
849
1896
  }
850
1897
  }
851
- return s || o ? (n.setContentType("application/json", !1), Ro(t)) : t;
1898
+ return s || o ? (n.setContentType("application/json", !1), na(t)) : t;
852
1899
  }],
853
1900
  transformResponse: [function(t) {
854
- const n = this.transitional || Ce.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
855
- if (c.isResponse(t) || c.isReadableStream(t))
1901
+ const n = this.transitional || Fe.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
1902
+ if (f.isResponse(t) || f.isReadableStream(t))
856
1903
  return t;
857
- if (t && c.isString(t) && (r && !this.responseType || o)) {
1904
+ if (t && f.isString(t) && (r && !this.responseType || o)) {
858
1905
  const a = !(n && n.silentJSONParsing) && o;
859
1906
  try {
860
1907
  return JSON.parse(t);
@@ -875,8 +1922,8 @@ const Ce = {
875
1922
  maxContentLength: -1,
876
1923
  maxBodyLength: -1,
877
1924
  env: {
878
- FormData: I.classes.FormData,
879
- Blob: I.classes.Blob
1925
+ FormData: $.classes.FormData,
1926
+ Blob: $.classes.Blob
880
1927
  },
881
1928
  validateStatus: function(t) {
882
1929
  return t >= 200 && t < 300;
@@ -888,10 +1935,10 @@ const Ce = {
888
1935
  }
889
1936
  }
890
1937
  };
891
- c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
892
- Ce.headers[e] = {};
1938
+ f.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
1939
+ Fe.headers[e] = {};
893
1940
  });
894
- const Oo = c.toObjectSet([
1941
+ const ra = f.toObjectSet([
895
1942
  "age",
896
1943
  "authorization",
897
1944
  "content-length",
@@ -909,43 +1956,43 @@ const Oo = c.toObjectSet([
909
1956
  "referer",
910
1957
  "retry-after",
911
1958
  "user-agent"
912
- ]), Ao = (e) => {
1959
+ ]), oa = (e) => {
913
1960
  const t = {};
914
1961
  let n, r, o;
915
1962
  return e && e.split(`
916
1963
  `).forEach(function(a) {
917
- o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] && Oo[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
1964
+ o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] && ra[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
918
1965
  }), t;
919
- }, Vt = Symbol("internals");
920
- function Te(e) {
1966
+ }, pn = Symbol("internals");
1967
+ function Ie(e) {
921
1968
  return e && String(e).trim().toLowerCase();
922
1969
  }
923
- function We(e) {
924
- return e === !1 || e == null ? e : c.isArray(e) ? e.map(We) : String(e);
1970
+ function Xe(e) {
1971
+ return e === !1 || e == null ? e : f.isArray(e) ? e.map(Xe) : String(e);
925
1972
  }
926
- function ko(e) {
1973
+ function sa(e) {
927
1974
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
928
1975
  let r;
929
1976
  for (; r = n.exec(e); )
930
1977
  t[r[1]] = r[2];
931
1978
  return t;
932
1979
  }
933
- const No = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
934
- function ft(e, t, n, r, o) {
935
- if (c.isFunction(r))
1980
+ const aa = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
1981
+ function xt(e, t, n, r, o) {
1982
+ if (f.isFunction(r))
936
1983
  return r.call(this, t, n);
937
- if (o && (t = n), !!c.isString(t)) {
938
- if (c.isString(r))
1984
+ if (o && (t = n), !!f.isString(t)) {
1985
+ if (f.isString(r))
939
1986
  return t.indexOf(r) !== -1;
940
- if (c.isRegExp(r))
1987
+ if (f.isRegExp(r))
941
1988
  return r.test(t);
942
1989
  }
943
1990
  }
944
- function _o(e) {
1991
+ function ia(e) {
945
1992
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
946
1993
  }
947
- function Lo(e, t) {
948
- const n = c.toCamelCase(" " + t);
1994
+ function la(e, t) {
1995
+ const n = f.toCamelCase(" " + t);
949
1996
  ["get", "set", "has"].forEach((r) => {
950
1997
  Object.defineProperty(e, r + n, {
951
1998
  value: function(o, s, a) {
@@ -955,52 +2002,52 @@ function Lo(e, t) {
955
2002
  });
956
2003
  });
957
2004
  }
958
- let U = class {
2005
+ let K = class {
959
2006
  constructor(t) {
960
2007
  t && this.set(t);
961
2008
  }
962
2009
  set(t, n, r) {
963
2010
  const o = this;
964
- function s(i, d, u) {
965
- const f = Te(d);
966
- if (!f)
2011
+ function s(i, u, c) {
2012
+ const d = Ie(u);
2013
+ if (!d)
967
2014
  throw new Error("header name must be a non-empty string");
968
- const h = c.findKey(o, f);
969
- (!h || o[h] === void 0 || u === !0 || u === void 0 && o[h] !== !1) && (o[h || d] = We(i));
2015
+ const h = f.findKey(o, d);
2016
+ (!h || o[h] === void 0 || c === !0 || c === void 0 && o[h] !== !1) && (o[h || u] = Xe(i));
970
2017
  }
971
- const a = (i, d) => c.forEach(i, (u, f) => s(u, f, d));
972
- if (c.isPlainObject(t) || t instanceof this.constructor)
2018
+ const a = (i, u) => f.forEach(i, (c, d) => s(c, d, u));
2019
+ if (f.isPlainObject(t) || t instanceof this.constructor)
973
2020
  a(t, n);
974
- else if (c.isString(t) && (t = t.trim()) && !No(t))
975
- a(Ao(t), n);
976
- else if (c.isHeaders(t))
977
- for (const [i, d] of t.entries())
978
- s(d, i, r);
2021
+ else if (f.isString(t) && (t = t.trim()) && !aa(t))
2022
+ a(oa(t), n);
2023
+ else if (f.isHeaders(t))
2024
+ for (const [i, u] of t.entries())
2025
+ s(u, i, r);
979
2026
  else
980
2027
  t != null && s(n, t, r);
981
2028
  return this;
982
2029
  }
983
2030
  get(t, n) {
984
- if (t = Te(t), t) {
985
- const r = c.findKey(this, t);
2031
+ if (t = Ie(t), t) {
2032
+ const r = f.findKey(this, t);
986
2033
  if (r) {
987
2034
  const o = this[r];
988
2035
  if (!n)
989
2036
  return o;
990
2037
  if (n === !0)
991
- return ko(o);
992
- if (c.isFunction(n))
2038
+ return sa(o);
2039
+ if (f.isFunction(n))
993
2040
  return n.call(this, o, r);
994
- if (c.isRegExp(n))
2041
+ if (f.isRegExp(n))
995
2042
  return n.exec(o);
996
2043
  throw new TypeError("parser must be boolean|regexp|function");
997
2044
  }
998
2045
  }
999
2046
  }
1000
2047
  has(t, n) {
1001
- if (t = Te(t), t) {
1002
- const r = c.findKey(this, t);
1003
- return !!(r && this[r] !== void 0 && (!n || ft(this, this[r], r, n)));
2048
+ if (t = Ie(t), t) {
2049
+ const r = f.findKey(this, t);
2050
+ return !!(r && this[r] !== void 0 && (!n || xt(this, this[r], r, n)));
1004
2051
  }
1005
2052
  return !1;
1006
2053
  }
@@ -1008,32 +2055,32 @@ let U = class {
1008
2055
  const r = this;
1009
2056
  let o = !1;
1010
2057
  function s(a) {
1011
- if (a = Te(a), a) {
1012
- const i = c.findKey(r, a);
1013
- i && (!n || ft(r, r[i], i, n)) && (delete r[i], o = !0);
2058
+ if (a = Ie(a), a) {
2059
+ const i = f.findKey(r, a);
2060
+ i && (!n || xt(r, r[i], i, n)) && (delete r[i], o = !0);
1014
2061
  }
1015
2062
  }
1016
- return c.isArray(t) ? t.forEach(s) : s(t), o;
2063
+ return f.isArray(t) ? t.forEach(s) : s(t), o;
1017
2064
  }
1018
2065
  clear(t) {
1019
2066
  const n = Object.keys(this);
1020
2067
  let r = n.length, o = !1;
1021
2068
  for (; r--; ) {
1022
2069
  const s = n[r];
1023
- (!t || ft(this, this[s], s, t, !0)) && (delete this[s], o = !0);
2070
+ (!t || xt(this, this[s], s, t, !0)) && (delete this[s], o = !0);
1024
2071
  }
1025
2072
  return o;
1026
2073
  }
1027
2074
  normalize(t) {
1028
2075
  const n = this, r = {};
1029
- return c.forEach(this, (o, s) => {
1030
- const a = c.findKey(r, s);
2076
+ return f.forEach(this, (o, s) => {
2077
+ const a = f.findKey(r, s);
1031
2078
  if (a) {
1032
- n[a] = We(o), delete n[s];
2079
+ n[a] = Xe(o), delete n[s];
1033
2080
  return;
1034
2081
  }
1035
- const i = t ? _o(s) : String(s).trim();
1036
- i !== s && delete n[s], n[i] = We(o), r[i] = !0;
2082
+ const i = t ? ia(s) : String(s).trim();
2083
+ i !== s && delete n[s], n[i] = Xe(o), r[i] = !0;
1037
2084
  }), this;
1038
2085
  }
1039
2086
  concat(...t) {
@@ -1041,8 +2088,8 @@ let U = class {
1041
2088
  }
1042
2089
  toJSON(t) {
1043
2090
  const n = /* @__PURE__ */ Object.create(null);
1044
- return c.forEach(this, (r, o) => {
1045
- r != null && r !== !1 && (n[o] = t && c.isArray(r) ? r.join(", ") : r);
2091
+ return f.forEach(this, (r, o) => {
2092
+ r != null && r !== !1 && (n[o] = t && f.isArray(r) ? r.join(", ") : r);
1046
2093
  }), n;
1047
2094
  }
1048
2095
  [Symbol.iterator]() {
@@ -1063,18 +2110,18 @@ let U = class {
1063
2110
  return n.forEach((o) => r.set(o)), r;
1064
2111
  }
1065
2112
  static accessor(t) {
1066
- const r = (this[Vt] = this[Vt] = {
2113
+ const r = (this[pn] = this[pn] = {
1067
2114
  accessors: {}
1068
2115
  }).accessors, o = this.prototype;
1069
2116
  function s(a) {
1070
- const i = Te(a);
1071
- r[i] || (Lo(o, a), r[i] = !0);
2117
+ const i = Ie(a);
2118
+ r[i] || (la(o, a), r[i] = !0);
1072
2119
  }
1073
- return c.isArray(t) ? t.forEach(s) : s(t), this;
2120
+ return f.isArray(t) ? t.forEach(s) : s(t), this;
1074
2121
  }
1075
2122
  };
1076
- U.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1077
- c.reduceDescriptors(U.prototype, ({ value: e }, t) => {
2123
+ K.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
2124
+ f.reduceDescriptors(K.prototype, ({ value: e }, t) => {
1078
2125
  let n = t[0].toUpperCase() + t.slice(1);
1079
2126
  return {
1080
2127
  get: () => e,
@@ -1083,24 +2130,24 @@ c.reduceDescriptors(U.prototype, ({ value: e }, t) => {
1083
2130
  }
1084
2131
  };
1085
2132
  });
1086
- c.freezeMethods(U);
1087
- function pt(e, t) {
1088
- const n = this || Ce, r = t || n, o = U.from(r.headers);
2133
+ f.freezeMethods(K);
2134
+ function Tt(e, t) {
2135
+ const n = this || Fe, r = t || n, o = K.from(r.headers);
1089
2136
  let s = r.data;
1090
- return c.forEach(e, function(i) {
2137
+ return f.forEach(e, function(i) {
1091
2138
  s = i.call(n, s, o.normalize(), t ? t.status : void 0);
1092
2139
  }), o.normalize(), s;
1093
2140
  }
1094
- function On(e) {
2141
+ function Wn(e) {
1095
2142
  return !!(e && e.__CANCEL__);
1096
2143
  }
1097
- function ve(e, t, n) {
2144
+ function Ne(e, t, n) {
1098
2145
  v.call(this, e ?? "canceled", v.ERR_CANCELED, t, n), this.name = "CanceledError";
1099
2146
  }
1100
- c.inherits(ve, v, {
2147
+ f.inherits(Ne, v, {
1101
2148
  __CANCEL__: !0
1102
2149
  });
1103
- function An(e, t, n) {
2150
+ function Kn(e, t, n) {
1104
2151
  const r = n.config.validateStatus;
1105
2152
  !n.status || !r || r(n.status) ? e(n) : t(new v(
1106
2153
  "Request failed with status code " + n.status,
@@ -1110,73 +2157,73 @@ function An(e, t, n) {
1110
2157
  n
1111
2158
  ));
1112
2159
  }
1113
- function Co(e) {
2160
+ function ca(e) {
1114
2161
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
1115
2162
  return t && t[1] || "";
1116
2163
  }
1117
- function Mo(e, t) {
2164
+ function ua(e, t) {
1118
2165
  e = e || 10;
1119
2166
  const n = new Array(e), r = new Array(e);
1120
2167
  let o = 0, s = 0, a;
1121
- return t = t !== void 0 ? t : 1e3, function(d) {
1122
- const u = Date.now(), f = r[s];
1123
- a || (a = u), n[o] = d, r[o] = u;
1124
- let h = s, y = 0;
2168
+ return t = t !== void 0 ? t : 1e3, function(u) {
2169
+ const c = Date.now(), d = r[s];
2170
+ a || (a = c), n[o] = u, r[o] = c;
2171
+ let h = s, p = 0;
1125
2172
  for (; h !== o; )
1126
- y += n[h++], h = h % e;
1127
- if (o = (o + 1) % e, o === s && (s = (s + 1) % e), u - a < t)
2173
+ p += n[h++], h = h % e;
2174
+ if (o = (o + 1) % e, o === s && (s = (s + 1) % e), c - a < t)
1128
2175
  return;
1129
- const l = f && u - f;
1130
- return l ? Math.round(y * 1e3 / l) : void 0;
2176
+ const l = d && c - d;
2177
+ return l ? Math.round(p * 1e3 / l) : void 0;
1131
2178
  };
1132
2179
  }
1133
- function Po(e, t) {
2180
+ function da(e, t) {
1134
2181
  let n = 0, r = 1e3 / t, o, s;
1135
- const a = (u, f = Date.now()) => {
1136
- n = f, o = null, s && (clearTimeout(s), s = null), e.apply(null, u);
2182
+ const a = (c, d = Date.now()) => {
2183
+ n = d, o = null, s && (clearTimeout(s), s = null), e.apply(null, c);
1137
2184
  };
1138
- return [(...u) => {
1139
- const f = Date.now(), h = f - n;
1140
- h >= r ? a(u, f) : (o = u, s || (s = setTimeout(() => {
2185
+ return [(...c) => {
2186
+ const d = Date.now(), h = d - n;
2187
+ h >= r ? a(c, d) : (o = c, s || (s = setTimeout(() => {
1141
2188
  s = null, a(o);
1142
2189
  }, r - h)));
1143
2190
  }, () => o && a(o)];
1144
2191
  }
1145
- const Ve = (e, t, n = 3) => {
2192
+ const tt = (e, t, n = 3) => {
1146
2193
  let r = 0;
1147
- const o = Mo(50, 250);
1148
- return Po((s) => {
1149
- const a = s.loaded, i = s.lengthComputable ? s.total : void 0, d = a - r, u = o(d), f = a <= i;
2194
+ const o = ua(50, 250);
2195
+ return da((s) => {
2196
+ const a = s.loaded, i = s.lengthComputable ? s.total : void 0, u = a - r, c = o(u), d = a <= i;
1150
2197
  r = a;
1151
2198
  const h = {
1152
2199
  loaded: a,
1153
2200
  total: i,
1154
2201
  progress: i ? a / i : void 0,
1155
- bytes: d,
1156
- rate: u || void 0,
1157
- estimated: u && i && f ? (i - a) / u : void 0,
2202
+ bytes: u,
2203
+ rate: c || void 0,
2204
+ estimated: c && i && d ? (i - a) / c : void 0,
1158
2205
  event: s,
1159
2206
  lengthComputable: i != null,
1160
2207
  [t ? "download" : "upload"]: !0
1161
2208
  };
1162
2209
  e(h);
1163
2210
  }, n);
1164
- }, Kt = (e, t) => {
2211
+ }, hn = (e, t) => {
1165
2212
  const n = e != null;
1166
2213
  return [(r) => t[0]({
1167
2214
  lengthComputable: n,
1168
2215
  total: e,
1169
2216
  loaded: r
1170
2217
  }), t[1]];
1171
- }, Yt = (e) => (...t) => c.asap(() => e(...t)), Bo = I.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, I.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1172
- new URL(I.origin),
1173
- I.navigator && /(msie|trident)/i.test(I.navigator.userAgent)
1174
- ) : () => !0, Io = I.hasStandardBrowserEnv ? (
2218
+ }, mn = (e) => (...t) => f.asap(() => e(...t)), fa = $.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, $.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
2219
+ new URL($.origin),
2220
+ $.navigator && /(msie|trident)/i.test($.navigator.userAgent)
2221
+ ) : () => !0, pa = $.hasStandardBrowserEnv ? (
1175
2222
  // Standard browser envs support document.cookie
1176
2223
  {
1177
2224
  write(e, t, n, r, o, s) {
1178
2225
  const a = [e + "=" + encodeURIComponent(t)];
1179
- c.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), c.isString(r) && a.push("path=" + r), c.isString(o) && a.push("domain=" + o), s === !0 && a.push("secure"), document.cookie = a.join("; ");
2226
+ f.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), f.isString(r) && a.push("path=" + r), f.isString(o) && a.push("domain=" + o), s === !0 && a.push("secure"), document.cookie = a.join("; ");
1180
2227
  },
1181
2228
  read(e) {
1182
2229
  const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
@@ -1198,45 +2245,46 @@ const Ve = (e, t, n = 3) => {
1198
2245
  }
1199
2246
  }
1200
2247
  );
1201
- function Do(e) {
2248
+ function ha(e) {
1202
2249
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1203
2250
  }
1204
- function Fo(e, t) {
2251
+ function ma(e, t) {
1205
2252
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1206
2253
  }
1207
- function kn(e, t) {
1208
- return e && !Do(t) ? Fo(e, t) : t;
2254
+ function Yn(e, t, n) {
2255
+ let r = !ha(t);
2256
+ return e && r || n == !1 ? ma(e, t) : t;
1209
2257
  }
1210
- const Xt = (e) => e instanceof U ? { ...e } : e;
1211
- function de(e, t) {
2258
+ const gn = (e) => e instanceof K ? { ...e } : e;
2259
+ function be(e, t) {
1212
2260
  t = t || {};
1213
2261
  const n = {};
1214
- function r(u, f, h, y) {
1215
- return c.isPlainObject(u) && c.isPlainObject(f) ? c.merge.call({ caseless: y }, u, f) : c.isPlainObject(f) ? c.merge({}, f) : c.isArray(f) ? f.slice() : f;
1216
- }
1217
- function o(u, f, h, y) {
1218
- if (c.isUndefined(f)) {
1219
- if (!c.isUndefined(u))
1220
- return r(void 0, u, h, y);
1221
- } else return r(u, f, h, y);
1222
- }
1223
- function s(u, f) {
1224
- if (!c.isUndefined(f))
1225
- return r(void 0, f);
1226
- }
1227
- function a(u, f) {
1228
- if (c.isUndefined(f)) {
1229
- if (!c.isUndefined(u))
1230
- return r(void 0, u);
1231
- } else return r(void 0, f);
1232
- }
1233
- function i(u, f, h) {
2262
+ function r(c, d, h, p) {
2263
+ return f.isPlainObject(c) && f.isPlainObject(d) ? f.merge.call({ caseless: p }, c, d) : f.isPlainObject(d) ? f.merge({}, d) : f.isArray(d) ? d.slice() : d;
2264
+ }
2265
+ function o(c, d, h, p) {
2266
+ if (f.isUndefined(d)) {
2267
+ if (!f.isUndefined(c))
2268
+ return r(void 0, c, h, p);
2269
+ } else return r(c, d, h, p);
2270
+ }
2271
+ function s(c, d) {
2272
+ if (!f.isUndefined(d))
2273
+ return r(void 0, d);
2274
+ }
2275
+ function a(c, d) {
2276
+ if (f.isUndefined(d)) {
2277
+ if (!f.isUndefined(c))
2278
+ return r(void 0, c);
2279
+ } else return r(void 0, d);
2280
+ }
2281
+ function i(c, d, h) {
1234
2282
  if (h in t)
1235
- return r(u, f);
2283
+ return r(c, d);
1236
2284
  if (h in e)
1237
- return r(void 0, u);
2285
+ return r(void 0, c);
1238
2286
  }
1239
- const d = {
2287
+ const u = {
1240
2288
  url: s,
1241
2289
  method: s,
1242
2290
  data: s,
@@ -1265,115 +2313,115 @@ function de(e, t) {
1265
2313
  socketPath: a,
1266
2314
  responseEncoding: a,
1267
2315
  validateStatus: i,
1268
- headers: (u, f, h) => o(Xt(u), Xt(f), h, !0)
2316
+ headers: (c, d, h) => o(gn(c), gn(d), h, !0)
1269
2317
  };
1270
- return c.forEach(Object.keys(Object.assign({}, e, t)), function(f) {
1271
- const h = d[f] || o, y = h(e[f], t[f], f);
1272
- c.isUndefined(y) && h !== i || (n[f] = y);
2318
+ return f.forEach(Object.keys(Object.assign({}, e, t)), function(d) {
2319
+ const h = u[d] || o, p = h(e[d], t[d], d);
2320
+ f.isUndefined(p) && h !== i || (n[d] = p);
1273
2321
  }), n;
1274
2322
  }
1275
- const Nn = (e) => {
1276
- const t = de({}, e);
2323
+ const Jn = (e) => {
2324
+ const t = be({}, e);
1277
2325
  let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: a, auth: i } = t;
1278
- t.headers = a = U.from(a), t.url = Sn(kn(t.baseURL, t.url), e.params, e.paramsSerializer), i && a.set(
2326
+ t.headers = a = K.from(a), t.url = zn(Yn(t.baseURL, t.url), e.params, e.paramsSerializer), i && a.set(
1279
2327
  "Authorization",
1280
2328
  "Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : ""))
1281
2329
  );
1282
- let d;
1283
- if (c.isFormData(n)) {
1284
- if (I.hasStandardBrowserEnv || I.hasStandardBrowserWebWorkerEnv)
2330
+ let u;
2331
+ if (f.isFormData(n)) {
2332
+ if ($.hasStandardBrowserEnv || $.hasStandardBrowserWebWorkerEnv)
1285
2333
  a.setContentType(void 0);
1286
- else if ((d = a.getContentType()) !== !1) {
1287
- const [u, ...f] = d ? d.split(";").map((h) => h.trim()).filter(Boolean) : [];
1288
- a.setContentType([u || "multipart/form-data", ...f].join("; "));
2334
+ else if ((u = a.getContentType()) !== !1) {
2335
+ const [c, ...d] = u ? u.split(";").map((h) => h.trim()).filter(Boolean) : [];
2336
+ a.setContentType([c || "multipart/form-data", ...d].join("; "));
1289
2337
  }
1290
2338
  }
1291
- if (I.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && Bo(t.url))) {
1292
- const u = o && s && Io.read(s);
1293
- u && a.set(o, u);
2339
+ if ($.hasStandardBrowserEnv && (r && f.isFunction(r) && (r = r(t)), r || r !== !1 && fa(t.url))) {
2340
+ const c = o && s && pa.read(s);
2341
+ c && a.set(o, c);
1294
2342
  }
1295
2343
  return t;
1296
- }, jo = typeof XMLHttpRequest < "u", Ho = jo && function(e) {
2344
+ }, ga = typeof XMLHttpRequest < "u", wa = ga && function(e) {
1297
2345
  return new Promise(function(n, r) {
1298
- const o = Nn(e);
2346
+ const o = Jn(e);
1299
2347
  let s = o.data;
1300
- const a = U.from(o.headers).normalize();
1301
- let { responseType: i, onUploadProgress: d, onDownloadProgress: u } = o, f, h, y, l, w;
1302
- function g() {
1303
- l && l(), w && w(), o.cancelToken && o.cancelToken.unsubscribe(f), o.signal && o.signal.removeEventListener("abort", f);
1304
- }
1305
- let m = new XMLHttpRequest();
1306
- m.open(o.method.toUpperCase(), o.url, !0), m.timeout = o.timeout;
1307
- function S() {
1308
- if (!m)
2348
+ const a = K.from(o.headers).normalize();
2349
+ let { responseType: i, onUploadProgress: u, onDownloadProgress: c } = o, d, h, p, l, g;
2350
+ function m() {
2351
+ l && l(), g && g(), o.cancelToken && o.cancelToken.unsubscribe(d), o.signal && o.signal.removeEventListener("abort", d);
2352
+ }
2353
+ let y = new XMLHttpRequest();
2354
+ y.open(o.method.toUpperCase(), o.url, !0), y.timeout = o.timeout;
2355
+ function T() {
2356
+ if (!y)
1309
2357
  return;
1310
- const R = U.from(
1311
- "getAllResponseHeaders" in m && m.getAllResponseHeaders()
1312
- ), _ = {
1313
- data: !i || i === "text" || i === "json" ? m.responseText : m.response,
1314
- status: m.status,
1315
- statusText: m.statusText,
1316
- headers: R,
2358
+ const _ = K.from(
2359
+ "getAllResponseHeaders" in y && y.getAllResponseHeaders()
2360
+ ), k = {
2361
+ data: !i || i === "text" || i === "json" ? y.responseText : y.response,
2362
+ status: y.status,
2363
+ statusText: y.statusText,
2364
+ headers: _,
1317
2365
  config: e,
1318
- request: m
2366
+ request: y
1319
2367
  };
1320
- An(function(M) {
1321
- n(M), g();
2368
+ Kn(function(M) {
2369
+ n(M), m();
1322
2370
  }, function(M) {
1323
- r(M), g();
1324
- }, _), m = null;
1325
- }
1326
- "onloadend" in m ? m.onloadend = S : m.onreadystatechange = function() {
1327
- !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(S);
1328
- }, m.onabort = function() {
1329
- m && (r(new v("Request aborted", v.ECONNABORTED, e, m)), m = null);
1330
- }, m.onerror = function() {
1331
- r(new v("Network Error", v.ERR_NETWORK, e, m)), m = null;
1332
- }, m.ontimeout = function() {
1333
- let D = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
1334
- const _ = o.transitional || Tn;
1335
- o.timeoutErrorMessage && (D = o.timeoutErrorMessage), r(new v(
1336
- D,
1337
- _.clarifyTimeoutError ? v.ETIMEDOUT : v.ECONNABORTED,
2371
+ r(M), m();
2372
+ }, k), y = null;
2373
+ }
2374
+ "onloadend" in y ? y.onloadend = T : y.onreadystatechange = function() {
2375
+ !y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout(T);
2376
+ }, y.onabort = function() {
2377
+ y && (r(new v("Request aborted", v.ECONNABORTED, e, y)), y = null);
2378
+ }, y.onerror = function() {
2379
+ r(new v("Network Error", v.ERR_NETWORK, e, y)), y = null;
2380
+ }, y.ontimeout = function() {
2381
+ let U = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
2382
+ const k = o.transitional || Vn;
2383
+ o.timeoutErrorMessage && (U = o.timeoutErrorMessage), r(new v(
2384
+ U,
2385
+ k.clarifyTimeoutError ? v.ETIMEDOUT : v.ECONNABORTED,
1338
2386
  e,
1339
- m
1340
- )), m = null;
1341
- }, s === void 0 && a.setContentType(null), "setRequestHeader" in m && c.forEach(a.toJSON(), function(D, _) {
1342
- m.setRequestHeader(_, D);
1343
- }), c.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), i && i !== "json" && (m.responseType = o.responseType), u && ([y, w] = Ve(u, !0), m.addEventListener("progress", y)), d && m.upload && ([h, l] = Ve(d), m.upload.addEventListener("progress", h), m.upload.addEventListener("loadend", l)), (o.cancelToken || o.signal) && (f = (R) => {
1344
- m && (r(!R || R.type ? new ve(null, e, m) : R), m.abort(), m = null);
1345
- }, o.cancelToken && o.cancelToken.subscribe(f), o.signal && (o.signal.aborted ? f() : o.signal.addEventListener("abort", f)));
1346
- const T = Co(o.url);
1347
- if (T && I.protocols.indexOf(T) === -1) {
1348
- r(new v("Unsupported protocol " + T + ":", v.ERR_BAD_REQUEST, e));
2387
+ y
2388
+ )), y = null;
2389
+ }, s === void 0 && a.setContentType(null), "setRequestHeader" in y && f.forEach(a.toJSON(), function(U, k) {
2390
+ y.setRequestHeader(k, U);
2391
+ }), f.isUndefined(o.withCredentials) || (y.withCredentials = !!o.withCredentials), i && i !== "json" && (y.responseType = o.responseType), c && ([p, g] = tt(c, !0), y.addEventListener("progress", p)), u && y.upload && ([h, l] = tt(u), y.upload.addEventListener("progress", h), y.upload.addEventListener("loadend", l)), (o.cancelToken || o.signal) && (d = (_) => {
2392
+ y && (r(!_ || _.type ? new Ne(null, e, y) : _), y.abort(), y = null);
2393
+ }, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
2394
+ const S = ca(o.url);
2395
+ if (S && $.protocols.indexOf(S) === -1) {
2396
+ r(new v("Unsupported protocol " + S + ":", v.ERR_BAD_REQUEST, e));
1349
2397
  return;
1350
2398
  }
1351
- m.send(s || null);
2399
+ y.send(s || null);
1352
2400
  });
1353
- }, Uo = (e, t) => {
2401
+ }, ya = (e, t) => {
1354
2402
  const { length: n } = e = e ? e.filter(Boolean) : [];
1355
2403
  if (t || n) {
1356
2404
  let r = new AbortController(), o;
1357
- const s = function(u) {
2405
+ const s = function(c) {
1358
2406
  if (!o) {
1359
2407
  o = !0, i();
1360
- const f = u instanceof Error ? u : this.reason;
1361
- r.abort(f instanceof v ? f : new ve(f instanceof Error ? f.message : f));
2408
+ const d = c instanceof Error ? c : this.reason;
2409
+ r.abort(d instanceof v ? d : new Ne(d instanceof Error ? d.message : d));
1362
2410
  }
1363
2411
  };
1364
2412
  let a = t && setTimeout(() => {
1365
2413
  a = null, s(new v(`timeout ${t} of ms exceeded`, v.ETIMEDOUT));
1366
2414
  }, t);
1367
2415
  const i = () => {
1368
- e && (a && clearTimeout(a), a = null, e.forEach((u) => {
1369
- u.unsubscribe ? u.unsubscribe(s) : u.removeEventListener("abort", s);
2416
+ e && (a && clearTimeout(a), a = null, e.forEach((c) => {
2417
+ c.unsubscribe ? c.unsubscribe(s) : c.removeEventListener("abort", s);
1370
2418
  }), e = null);
1371
2419
  };
1372
- e.forEach((u) => u.addEventListener("abort", s));
1373
- const { signal: d } = r;
1374
- return d.unsubscribe = () => c.asap(i), d;
2420
+ e.forEach((c) => c.addEventListener("abort", s));
2421
+ const { signal: u } = r;
2422
+ return u.unsubscribe = () => f.asap(i), u;
1375
2423
  }
1376
- }, qo = function* (e, t) {
2424
+ }, ba = function* (e, t) {
1377
2425
  let n = e.byteLength;
1378
2426
  if (n < t) {
1379
2427
  yield e;
@@ -1382,10 +2430,10 @@ const Nn = (e) => {
1382
2430
  let r = 0, o;
1383
2431
  for (; r < n; )
1384
2432
  o = r + t, yield e.slice(r, o), r = o;
1385
- }, zo = async function* (e, t) {
1386
- for await (const n of $o(e))
1387
- yield* qo(n, t);
1388
- }, $o = async function* (e) {
2433
+ }, va = async function* (e, t) {
2434
+ for await (const n of Ea(e))
2435
+ yield* ba(n, t);
2436
+ }, Ea = async function* (e) {
1389
2437
  if (e[Symbol.asyncIterator]) {
1390
2438
  yield* e;
1391
2439
  return;
@@ -1401,44 +2449,44 @@ const Nn = (e) => {
1401
2449
  } finally {
1402
2450
  await t.cancel();
1403
2451
  }
1404
- }, Gt = (e, t, n, r) => {
1405
- const o = zo(e, t);
1406
- let s = 0, a, i = (d) => {
1407
- a || (a = !0, r && r(d));
2452
+ }, wn = (e, t, n, r) => {
2453
+ const o = va(e, t);
2454
+ let s = 0, a, i = (u) => {
2455
+ a || (a = !0, r && r(u));
1408
2456
  };
1409
2457
  return new ReadableStream({
1410
- async pull(d) {
2458
+ async pull(u) {
1411
2459
  try {
1412
- const { done: u, value: f } = await o.next();
1413
- if (u) {
1414
- i(), d.close();
2460
+ const { done: c, value: d } = await o.next();
2461
+ if (c) {
2462
+ i(), u.close();
1415
2463
  return;
1416
2464
  }
1417
- let h = f.byteLength;
2465
+ let h = d.byteLength;
1418
2466
  if (n) {
1419
- let y = s += h;
1420
- n(y);
2467
+ let p = s += h;
2468
+ n(p);
1421
2469
  }
1422
- d.enqueue(new Uint8Array(f));
1423
- } catch (u) {
1424
- throw i(u), u;
2470
+ u.enqueue(new Uint8Array(d));
2471
+ } catch (c) {
2472
+ throw i(c), c;
1425
2473
  }
1426
2474
  },
1427
- cancel(d) {
1428
- return i(d), o.return();
2475
+ cancel(u) {
2476
+ return i(u), o.return();
1429
2477
  }
1430
2478
  }, {
1431
2479
  highWaterMark: 2
1432
2480
  });
1433
- }, Ze = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", _n = Ze && typeof ReadableStream == "function", Wo = Ze && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Ln = (e, ...t) => {
2481
+ }, lt = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Gn = lt && typeof ReadableStream == "function", Sa = lt && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Xn = (e, ...t) => {
1434
2482
  try {
1435
2483
  return !!e(...t);
1436
2484
  } catch {
1437
2485
  return !1;
1438
2486
  }
1439
- }, Jo = _n && Ln(() => {
2487
+ }, xa = Gn && Xn(() => {
1440
2488
  let e = !1;
1441
- const t = new Request(I.origin, {
2489
+ const t = new Request($.origin, {
1442
2490
  body: new ReadableStream(),
1443
2491
  method: "POST",
1444
2492
  get duplex() {
@@ -1446,34 +2494,34 @@ const Nn = (e) => {
1446
2494
  }
1447
2495
  }).headers.has("Content-Type");
1448
2496
  return e && !t;
1449
- }), Qt = 64 * 1024, xt = _n && Ln(() => c.isReadableStream(new Response("").body)), Ke = {
1450
- stream: xt && ((e) => e.body)
2497
+ }), yn = 64 * 1024, Dt = Gn && Xn(() => f.isReadableStream(new Response("").body)), nt = {
2498
+ stream: Dt && ((e) => e.body)
1451
2499
  };
1452
- Ze && ((e) => {
2500
+ lt && ((e) => {
1453
2501
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
1454
- !Ke[t] && (Ke[t] = c.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
2502
+ !nt[t] && (nt[t] = f.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
1455
2503
  throw new v(`Response type '${t}' is not supported`, v.ERR_NOT_SUPPORT, r);
1456
2504
  });
1457
2505
  });
1458
2506
  })(new Response());
1459
- const Vo = async (e) => {
2507
+ const Ta = async (e) => {
1460
2508
  if (e == null)
1461
2509
  return 0;
1462
- if (c.isBlob(e))
2510
+ if (f.isBlob(e))
1463
2511
  return e.size;
1464
- if (c.isSpecCompliantForm(e))
1465
- return (await new Request(I.origin, {
2512
+ if (f.isSpecCompliantForm(e))
2513
+ return (await new Request($.origin, {
1466
2514
  method: "POST",
1467
2515
  body: e
1468
2516
  }).arrayBuffer()).byteLength;
1469
- if (c.isArrayBufferView(e) || c.isArrayBuffer(e))
2517
+ if (f.isArrayBufferView(e) || f.isArrayBuffer(e))
1470
2518
  return e.byteLength;
1471
- if (c.isURLSearchParams(e) && (e = e + ""), c.isString(e))
1472
- return (await Wo(e)).byteLength;
1473
- }, Ko = async (e, t) => {
1474
- const n = c.toFiniteNumber(e.getContentLength());
1475
- return n ?? Vo(t);
1476
- }, Yo = Ze && (async (e) => {
2519
+ if (f.isURLSearchParams(e) && (e = e + ""), f.isString(e))
2520
+ return (await Sa(e)).byteLength;
2521
+ }, _a = async (e, t) => {
2522
+ const n = f.toFiniteNumber(e.getContentLength());
2523
+ return n ?? Ta(t);
2524
+ }, Ra = lt && (async (e) => {
1477
2525
  let {
1478
2526
  url: t,
1479
2527
  method: n,
@@ -1482,88 +2530,88 @@ const Vo = async (e) => {
1482
2530
  cancelToken: s,
1483
2531
  timeout: a,
1484
2532
  onDownloadProgress: i,
1485
- onUploadProgress: d,
1486
- responseType: u,
1487
- headers: f,
2533
+ onUploadProgress: u,
2534
+ responseType: c,
2535
+ headers: d,
1488
2536
  withCredentials: h = "same-origin",
1489
- fetchOptions: y
1490
- } = Nn(e);
1491
- u = u ? (u + "").toLowerCase() : "text";
1492
- let l = Uo([o, s && s.toAbortSignal()], a), w;
1493
- const g = l && l.unsubscribe && (() => {
2537
+ fetchOptions: p
2538
+ } = Jn(e);
2539
+ c = c ? (c + "").toLowerCase() : "text";
2540
+ let l = ya([o, s && s.toAbortSignal()], a), g;
2541
+ const m = l && l.unsubscribe && (() => {
1494
2542
  l.unsubscribe();
1495
2543
  });
1496
- let m;
2544
+ let y;
1497
2545
  try {
1498
- if (d && Jo && n !== "get" && n !== "head" && (m = await Ko(f, r)) !== 0) {
1499
- let _ = new Request(t, {
2546
+ if (u && xa && n !== "get" && n !== "head" && (y = await _a(d, r)) !== 0) {
2547
+ let k = new Request(t, {
1500
2548
  method: "POST",
1501
2549
  body: r,
1502
2550
  duplex: "half"
1503
- }), x;
1504
- if (c.isFormData(r) && (x = _.headers.get("content-type")) && f.setContentType(x), _.body) {
1505
- const [M, F] = Kt(
1506
- m,
1507
- Ve(Yt(d))
2551
+ }), E;
2552
+ if (f.isFormData(r) && (E = k.headers.get("content-type")) && d.setContentType(E), k.body) {
2553
+ const [M, V] = hn(
2554
+ y,
2555
+ tt(mn(u))
1508
2556
  );
1509
- r = Gt(_.body, Qt, M, F);
2557
+ r = wn(k.body, yn, M, V);
1510
2558
  }
1511
2559
  }
1512
- c.isString(h) || (h = h ? "include" : "omit");
1513
- const S = "credentials" in Request.prototype;
1514
- w = new Request(t, {
1515
- ...y,
2560
+ f.isString(h) || (h = h ? "include" : "omit");
2561
+ const T = "credentials" in Request.prototype;
2562
+ g = new Request(t, {
2563
+ ...p,
1516
2564
  signal: l,
1517
2565
  method: n.toUpperCase(),
1518
- headers: f.normalize().toJSON(),
2566
+ headers: d.normalize().toJSON(),
1519
2567
  body: r,
1520
2568
  duplex: "half",
1521
- credentials: S ? h : void 0
2569
+ credentials: T ? h : void 0
1522
2570
  });
1523
- let T = await fetch(w);
1524
- const R = xt && (u === "stream" || u === "response");
1525
- if (xt && (i || R && g)) {
1526
- const _ = {};
1527
- ["status", "statusText", "headers"].forEach((Q) => {
1528
- _[Q] = T[Q];
2571
+ let S = await fetch(g);
2572
+ const _ = Dt && (c === "stream" || c === "response");
2573
+ if (Dt && (i || _ && m)) {
2574
+ const k = {};
2575
+ ["status", "statusText", "headers"].forEach((se) => {
2576
+ k[se] = S[se];
1529
2577
  });
1530
- const x = c.toFiniteNumber(T.headers.get("content-length")), [M, F] = i && Kt(
1531
- x,
1532
- Ve(Yt(i), !0)
2578
+ const E = f.toFiniteNumber(S.headers.get("content-length")), [M, V] = i && hn(
2579
+ E,
2580
+ tt(mn(i), !0)
1533
2581
  ) || [];
1534
- T = new Response(
1535
- Gt(T.body, Qt, M, () => {
1536
- F && F(), g && g();
2582
+ S = new Response(
2583
+ wn(S.body, yn, M, () => {
2584
+ V && V(), m && m();
1537
2585
  }),
1538
- _
2586
+ k
1539
2587
  );
1540
2588
  }
1541
- u = u || "text";
1542
- let D = await Ke[c.findKey(Ke, u) || "text"](T, e);
1543
- return !R && g && g(), await new Promise((_, x) => {
1544
- An(_, x, {
1545
- data: D,
1546
- headers: U.from(T.headers),
1547
- status: T.status,
1548
- statusText: T.statusText,
2589
+ c = c || "text";
2590
+ let U = await nt[f.findKey(nt, c) || "text"](S, e);
2591
+ return !_ && m && m(), await new Promise((k, E) => {
2592
+ Kn(k, E, {
2593
+ data: U,
2594
+ headers: K.from(S.headers),
2595
+ status: S.status,
2596
+ statusText: S.statusText,
1549
2597
  config: e,
1550
- request: w
2598
+ request: g
1551
2599
  });
1552
2600
  });
1553
- } catch (S) {
1554
- throw g && g(), S && S.name === "TypeError" && /fetch/i.test(S.message) ? Object.assign(
1555
- new v("Network Error", v.ERR_NETWORK, e, w),
2601
+ } catch (T) {
2602
+ throw m && m(), T && T.name === "TypeError" && /fetch/i.test(T.message) ? Object.assign(
2603
+ new v("Network Error", v.ERR_NETWORK, e, g),
1556
2604
  {
1557
- cause: S.cause || S
2605
+ cause: T.cause || T
1558
2606
  }
1559
- ) : v.from(S, S && S.code, e, w);
2607
+ ) : v.from(T, T && T.code, e, g);
1560
2608
  }
1561
- }), Et = {
1562
- http: co,
1563
- xhr: Ho,
1564
- fetch: Yo
2609
+ }), Mt = {
2610
+ http: $s,
2611
+ xhr: wa,
2612
+ fetch: Ra
1565
2613
  };
1566
- c.forEach(Et, (e, t) => {
2614
+ f.forEach(Mt, (e, t) => {
1567
2615
  if (e) {
1568
2616
  try {
1569
2617
  Object.defineProperty(e, "name", { value: t });
@@ -1572,16 +2620,16 @@ c.forEach(Et, (e, t) => {
1572
2620
  Object.defineProperty(e, "adapterName", { value: t });
1573
2621
  }
1574
2622
  });
1575
- const Zt = (e) => `- ${e}`, Xo = (e) => c.isFunction(e) || e === null || e === !1, Cn = {
2623
+ const bn = (e) => `- ${e}`, Oa = (e) => f.isFunction(e) || e === null || e === !1, Qn = {
1576
2624
  getAdapter: (e) => {
1577
- e = c.isArray(e) ? e : [e];
2625
+ e = f.isArray(e) ? e : [e];
1578
2626
  const { length: t } = e;
1579
2627
  let n, r;
1580
2628
  const o = {};
1581
2629
  for (let s = 0; s < t; s++) {
1582
2630
  n = e[s];
1583
2631
  let a;
1584
- if (r = n, !Xo(n) && (r = Et[(a = String(n)).toLowerCase()], r === void 0))
2632
+ if (r = n, !Oa(n) && (r = Mt[(a = String(n)).toLowerCase()], r === void 0))
1585
2633
  throw new v(`Unknown adapter '${a}'`);
1586
2634
  if (r)
1587
2635
  break;
@@ -1589,11 +2637,11 @@ const Zt = (e) => `- ${e}`, Xo = (e) => c.isFunction(e) || e === null || e === !
1589
2637
  }
1590
2638
  if (!r) {
1591
2639
  const s = Object.entries(o).map(
1592
- ([i, d]) => `adapter ${i} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
2640
+ ([i, u]) => `adapter ${i} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
1593
2641
  );
1594
2642
  let a = t ? s.length > 1 ? `since :
1595
- ` + s.map(Zt).join(`
1596
- `) : " " + Zt(s[0]) : "as no adapter specified";
2643
+ ` + s.map(bn).join(`
2644
+ `) : " " + bn(s[0]) : "as no adapter specified";
1597
2645
  throw new v(
1598
2646
  "There is no suitable adapter to dispatch the request " + a,
1599
2647
  "ERR_NOT_SUPPORT"
@@ -1601,40 +2649,40 @@ const Zt = (e) => `- ${e}`, Xo = (e) => c.isFunction(e) || e === null || e === !
1601
2649
  }
1602
2650
  return r;
1603
2651
  },
1604
- adapters: Et
2652
+ adapters: Mt
1605
2653
  };
1606
- function ht(e) {
2654
+ function _t(e) {
1607
2655
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1608
- throw new ve(null, e);
2656
+ throw new Ne(null, e);
1609
2657
  }
1610
- function en(e) {
1611
- return ht(e), e.headers = U.from(e.headers), e.data = pt.call(
2658
+ function vn(e) {
2659
+ return _t(e), e.headers = K.from(e.headers), e.data = Tt.call(
1612
2660
  e,
1613
2661
  e.transformRequest
1614
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Cn.getAdapter(e.adapter || Ce.adapter)(e).then(function(r) {
1615
- return ht(e), r.data = pt.call(
2662
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Qn.getAdapter(e.adapter || Fe.adapter)(e).then(function(r) {
2663
+ return _t(e), r.data = Tt.call(
1616
2664
  e,
1617
2665
  e.transformResponse,
1618
2666
  r
1619
- ), r.headers = U.from(r.headers), r;
2667
+ ), r.headers = K.from(r.headers), r;
1620
2668
  }, function(r) {
1621
- return On(r) || (ht(e), r && r.response && (r.response.data = pt.call(
2669
+ return Wn(r) || (_t(e), r && r.response && (r.response.data = Tt.call(
1622
2670
  e,
1623
2671
  e.transformResponse,
1624
2672
  r.response
1625
- ), r.response.headers = U.from(r.response.headers))), Promise.reject(r);
2673
+ ), r.response.headers = K.from(r.response.headers))), Promise.reject(r);
1626
2674
  });
1627
2675
  }
1628
- const Mn = "1.7.9", et = {};
2676
+ const Zn = "1.8.2", ct = {};
1629
2677
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1630
- et[e] = function(r) {
2678
+ ct[e] = function(r) {
1631
2679
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1632
2680
  };
1633
2681
  });
1634
- const tn = {};
1635
- et.transitional = function(t, n, r) {
2682
+ const En = {};
2683
+ ct.transitional = function(t, n, r) {
1636
2684
  function o(s, a) {
1637
- return "[Axios v" + Mn + "] Transitional option '" + s + "'" + a + (r ? ". " + r : "");
2685
+ return "[Axios v" + Zn + "] Transitional option '" + s + "'" + a + (r ? ". " + r : "");
1638
2686
  }
1639
2687
  return (s, a, i) => {
1640
2688
  if (t === !1)
@@ -1642,7 +2690,7 @@ et.transitional = function(t, n, r) {
1642
2690
  o(a, " has been removed" + (n ? " in " + n : "")),
1643
2691
  v.ERR_DEPRECATED
1644
2692
  );
1645
- return n && !tn[a] && (tn[a] = !0, console.warn(
2693
+ return n && !En[a] && (En[a] = !0, console.warn(
1646
2694
  o(
1647
2695
  a,
1648
2696
  " has been deprecated since v" + n + " and will be removed in the near future"
@@ -1650,10 +2698,10 @@ et.transitional = function(t, n, r) {
1650
2698
  )), t ? t(s, a, i) : !0;
1651
2699
  };
1652
2700
  };
1653
- et.spelling = function(t) {
2701
+ ct.spelling = function(t) {
1654
2702
  return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
1655
2703
  };
1656
- function Go(e, t, n) {
2704
+ function Na(e, t, n) {
1657
2705
  if (typeof e != "object")
1658
2706
  throw new v("options must be an object", v.ERR_BAD_OPTION_VALUE);
1659
2707
  const r = Object.keys(e);
@@ -1661,24 +2709,24 @@ function Go(e, t, n) {
1661
2709
  for (; o-- > 0; ) {
1662
2710
  const s = r[o], a = t[s];
1663
2711
  if (a) {
1664
- const i = e[s], d = i === void 0 || a(i, s, e);
1665
- if (d !== !0)
1666
- throw new v("option " + s + " must be " + d, v.ERR_BAD_OPTION_VALUE);
2712
+ const i = e[s], u = i === void 0 || a(i, s, e);
2713
+ if (u !== !0)
2714
+ throw new v("option " + s + " must be " + u, v.ERR_BAD_OPTION_VALUE);
1667
2715
  continue;
1668
2716
  }
1669
2717
  if (n !== !0)
1670
2718
  throw new v("Unknown option " + s, v.ERR_BAD_OPTION);
1671
2719
  }
1672
2720
  }
1673
- const Je = {
1674
- assertOptions: Go,
1675
- validators: et
1676
- }, Z = Je.validators;
1677
- let ue = class {
2721
+ const Qe = {
2722
+ assertOptions: Na,
2723
+ validators: ct
2724
+ }, ae = Qe.validators;
2725
+ let ye = class {
1678
2726
  constructor(t) {
1679
2727
  this.defaults = t, this.interceptors = {
1680
- request: new Jt(),
1681
- response: new Jt()
2728
+ request: new fn(),
2729
+ response: new fn()
1682
2730
  };
1683
2731
  }
1684
2732
  /**
@@ -1707,86 +2755,86 @@ let ue = class {
1707
2755
  }
1708
2756
  }
1709
2757
  _request(t, n) {
1710
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = de(this.defaults, n);
2758
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = be(this.defaults, n);
1711
2759
  const { transitional: r, paramsSerializer: o, headers: s } = n;
1712
- r !== void 0 && Je.assertOptions(r, {
1713
- silentJSONParsing: Z.transitional(Z.boolean),
1714
- forcedJSONParsing: Z.transitional(Z.boolean),
1715
- clarifyTimeoutError: Z.transitional(Z.boolean)
1716
- }, !1), o != null && (c.isFunction(o) ? n.paramsSerializer = {
2760
+ r !== void 0 && Qe.assertOptions(r, {
2761
+ silentJSONParsing: ae.transitional(ae.boolean),
2762
+ forcedJSONParsing: ae.transitional(ae.boolean),
2763
+ clarifyTimeoutError: ae.transitional(ae.boolean)
2764
+ }, !1), o != null && (f.isFunction(o) ? n.paramsSerializer = {
1717
2765
  serialize: o
1718
- } : Je.assertOptions(o, {
1719
- encode: Z.function,
1720
- serialize: Z.function
1721
- }, !0)), Je.assertOptions(n, {
1722
- baseUrl: Z.spelling("baseURL"),
1723
- withXsrfToken: Z.spelling("withXSRFToken")
2766
+ } : Qe.assertOptions(o, {
2767
+ encode: ae.function,
2768
+ serialize: ae.function
2769
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Qe.assertOptions(n, {
2770
+ baseUrl: ae.spelling("baseURL"),
2771
+ withXsrfToken: ae.spelling("withXSRFToken")
1724
2772
  }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1725
- let a = s && c.merge(
2773
+ let a = s && f.merge(
1726
2774
  s.common,
1727
2775
  s[n.method]
1728
2776
  );
1729
- s && c.forEach(
2777
+ s && f.forEach(
1730
2778
  ["delete", "get", "head", "post", "put", "patch", "common"],
1731
- (w) => {
1732
- delete s[w];
2779
+ (g) => {
2780
+ delete s[g];
1733
2781
  }
1734
- ), n.headers = U.concat(a, s);
2782
+ ), n.headers = K.concat(a, s);
1735
2783
  const i = [];
1736
- let d = !0;
1737
- this.interceptors.request.forEach(function(g) {
1738
- typeof g.runWhen == "function" && g.runWhen(n) === !1 || (d = d && g.synchronous, i.unshift(g.fulfilled, g.rejected));
2784
+ let u = !0;
2785
+ this.interceptors.request.forEach(function(m) {
2786
+ typeof m.runWhen == "function" && m.runWhen(n) === !1 || (u = u && m.synchronous, i.unshift(m.fulfilled, m.rejected));
1739
2787
  });
1740
- const u = [];
1741
- this.interceptors.response.forEach(function(g) {
1742
- u.push(g.fulfilled, g.rejected);
2788
+ const c = [];
2789
+ this.interceptors.response.forEach(function(m) {
2790
+ c.push(m.fulfilled, m.rejected);
1743
2791
  });
1744
- let f, h = 0, y;
1745
- if (!d) {
1746
- const w = [en.bind(this), void 0];
1747
- for (w.unshift.apply(w, i), w.push.apply(w, u), y = w.length, f = Promise.resolve(n); h < y; )
1748
- f = f.then(w[h++], w[h++]);
1749
- return f;
1750
- }
1751
- y = i.length;
2792
+ let d, h = 0, p;
2793
+ if (!u) {
2794
+ const g = [vn.bind(this), void 0];
2795
+ for (g.unshift.apply(g, i), g.push.apply(g, c), p = g.length, d = Promise.resolve(n); h < p; )
2796
+ d = d.then(g[h++], g[h++]);
2797
+ return d;
2798
+ }
2799
+ p = i.length;
1752
2800
  let l = n;
1753
- for (h = 0; h < y; ) {
1754
- const w = i[h++], g = i[h++];
2801
+ for (h = 0; h < p; ) {
2802
+ const g = i[h++], m = i[h++];
1755
2803
  try {
1756
- l = w(l);
1757
- } catch (m) {
1758
- g.call(this, m);
2804
+ l = g(l);
2805
+ } catch (y) {
2806
+ m.call(this, y);
1759
2807
  break;
1760
2808
  }
1761
2809
  }
1762
2810
  try {
1763
- f = en.call(this, l);
1764
- } catch (w) {
1765
- return Promise.reject(w);
2811
+ d = vn.call(this, l);
2812
+ } catch (g) {
2813
+ return Promise.reject(g);
1766
2814
  }
1767
- for (h = 0, y = u.length; h < y; )
1768
- f = f.then(u[h++], u[h++]);
1769
- return f;
2815
+ for (h = 0, p = c.length; h < p; )
2816
+ d = d.then(c[h++], c[h++]);
2817
+ return d;
1770
2818
  }
1771
2819
  getUri(t) {
1772
- t = de(this.defaults, t);
1773
- const n = kn(t.baseURL, t.url);
1774
- return Sn(n, t.params, t.paramsSerializer);
2820
+ t = be(this.defaults, t);
2821
+ const n = Yn(t.baseURL, t.url, t.allowAbsoluteUrls);
2822
+ return zn(n, t.params, t.paramsSerializer);
1775
2823
  }
1776
2824
  };
1777
- c.forEach(["delete", "get", "head", "options"], function(t) {
1778
- ue.prototype[t] = function(n, r) {
1779
- return this.request(de(r || {}, {
2825
+ f.forEach(["delete", "get", "head", "options"], function(t) {
2826
+ ye.prototype[t] = function(n, r) {
2827
+ return this.request(be(r || {}, {
1780
2828
  method: t,
1781
2829
  url: n,
1782
2830
  data: (r || {}).data
1783
2831
  }));
1784
2832
  };
1785
2833
  });
1786
- c.forEach(["post", "put", "patch"], function(t) {
2834
+ f.forEach(["post", "put", "patch"], function(t) {
1787
2835
  function n(r) {
1788
2836
  return function(s, a, i) {
1789
- return this.request(de(i || {}, {
2837
+ return this.request(be(i || {}, {
1790
2838
  method: t,
1791
2839
  headers: r ? {
1792
2840
  "Content-Type": "multipart/form-data"
@@ -1796,9 +2844,9 @@ c.forEach(["post", "put", "patch"], function(t) {
1796
2844
  }));
1797
2845
  };
1798
2846
  }
1799
- ue.prototype[t] = n(), ue.prototype[t + "Form"] = n(!0);
2847
+ ye.prototype[t] = n(), ye.prototype[t + "Form"] = n(!0);
1800
2848
  });
1801
- let Qo = class Pn {
2849
+ let Aa = class er {
1802
2850
  constructor(t) {
1803
2851
  if (typeof t != "function")
1804
2852
  throw new TypeError("executor must be a function.");
@@ -1822,7 +2870,7 @@ let Qo = class Pn {
1822
2870
  r.unsubscribe(s);
1823
2871
  }, a;
1824
2872
  }, t(function(s, a, i) {
1825
- r.reason || (r.reason = new ve(s, a, i), n(r.reason));
2873
+ r.reason || (r.reason = new Ne(s, a, i), n(r.reason));
1826
2874
  });
1827
2875
  }
1828
2876
  /**
@@ -1864,22 +2912,22 @@ let Qo = class Pn {
1864
2912
  static source() {
1865
2913
  let t;
1866
2914
  return {
1867
- token: new Pn(function(o) {
2915
+ token: new er(function(o) {
1868
2916
  t = o;
1869
2917
  }),
1870
2918
  cancel: t
1871
2919
  };
1872
2920
  }
1873
2921
  };
1874
- function Zo(e) {
2922
+ function Ca(e) {
1875
2923
  return function(n) {
1876
2924
  return e.apply(null, n);
1877
2925
  };
1878
2926
  }
1879
- function es(e) {
1880
- return c.isObject(e) && e.isAxiosError === !0;
2927
+ function ka(e) {
2928
+ return f.isObject(e) && e.isAxiosError === !0;
1881
2929
  }
1882
- const St = {
2930
+ const It = {
1883
2931
  Continue: 100,
1884
2932
  SwitchingProtocols: 101,
1885
2933
  Processing: 102,
@@ -1944,121 +2992,83 @@ const St = {
1944
2992
  NotExtended: 510,
1945
2993
  NetworkAuthenticationRequired: 511
1946
2994
  };
1947
- Object.entries(St).forEach(([e, t]) => {
1948
- St[t] = e;
2995
+ Object.entries(It).forEach(([e, t]) => {
2996
+ It[t] = e;
1949
2997
  });
1950
- function Bn(e) {
1951
- const t = new ue(e), n = dn(ue.prototype.request, t);
1952
- return c.extend(n, ue.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
1953
- return Bn(de(e, o));
2998
+ function tr(e) {
2999
+ const t = new ye(e), n = Ln(ye.prototype.request, t);
3000
+ return f.extend(n, ye.prototype, t, { allOwnKeys: !0 }), f.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
3001
+ return tr(be(e, o));
1954
3002
  }, n;
1955
3003
  }
1956
- const A = Bn(Ce);
1957
- A.Axios = ue;
1958
- A.CanceledError = ve;
1959
- A.CancelToken = Qo;
1960
- A.isCancel = On;
1961
- A.VERSION = Mn;
1962
- A.toFormData = Qe;
1963
- A.AxiosError = v;
1964
- A.Cancel = A.CanceledError;
1965
- A.all = function(t) {
3004
+ const N = tr(Fe);
3005
+ N.Axios = ye;
3006
+ N.CanceledError = Ne;
3007
+ N.CancelToken = Aa;
3008
+ N.isCancel = Wn;
3009
+ N.VERSION = Zn;
3010
+ N.toFormData = it;
3011
+ N.AxiosError = v;
3012
+ N.Cancel = N.CanceledError;
3013
+ N.all = function(t) {
1966
3014
  return Promise.all(t);
1967
3015
  };
1968
- A.spread = Zo;
1969
- A.isAxiosError = es;
1970
- A.mergeConfig = de;
1971
- A.AxiosHeaders = U;
1972
- A.formToJSON = (e) => Rn(c.isHTMLForm(e) ? new FormData(e) : e);
1973
- A.getAdapter = Cn.getAdapter;
1974
- A.HttpStatusCode = St;
1975
- A.default = A;
3016
+ N.spread = Ca;
3017
+ N.isAxiosError = ka;
3018
+ N.mergeConfig = be;
3019
+ N.AxiosHeaders = K;
3020
+ N.formToJSON = (e) => qn(f.isHTMLForm(e) ? new FormData(e) : e);
3021
+ N.getAdapter = Qn.getAdapter;
3022
+ N.HttpStatusCode = It;
3023
+ N.default = N;
1976
3024
  const {
1977
- Axios: Xs,
1978
- AxiosError: Gs,
1979
- CanceledError: Qs,
1980
- isCancel: Zs,
1981
- CancelToken: ea,
1982
- VERSION: ta,
1983
- all: na,
1984
- Cancel: ra,
1985
- isAxiosError: oa,
1986
- spread: sa,
1987
- toFormData: aa,
1988
- AxiosHeaders: ia,
1989
- HttpStatusCode: la,
1990
- formToJSON: ca,
1991
- getAdapter: ua,
1992
- mergeConfig: da
1993
- } = A, ts = process.env.NODE_ENV !== "production";
1994
- process.env.NODE_ENV;
1995
- process.env.NODE_ENV;
1996
- const Re = "vapp", ns = () => (/* @__PURE__ */ new Date()).toISOString(), He = (e, t, n) => `[vezham] [${ns()}] [${e}] [${t}] ${n}`, mt = () => !ts, se = {
1997
- log: (e = Re, t, n) => {
1998
- console.log(
1999
- He("LOG", e, t),
2000
- n || ""
2001
- );
2002
- },
2003
- debug: (e = Re, t, n) => {
2004
- },
2005
- info: (e = Re, t, n) => {
2006
- mt() || console.info(
2007
- He("INFO", e, t),
2008
- n || ""
2009
- );
2010
- },
2011
- warn: (e = Re, t, n) => {
2012
- mt() || console.warn(
2013
- He("WARN", e, t),
2014
- n || ""
2015
- );
2016
- },
2017
- error: (e = Re, t, n) => {
2018
- mt() || console.error(
2019
- He("ERROR", e, t),
2020
- n || ""
2021
- );
2022
- }
2023
- // trace: (namespace = APP_NAME, message: string, object?: any) => {
2024
- // if (strictLog()) return
2025
- // let log_msg = getLoggerMessage(logs_type.Trace, namespace, message);
2026
- // if (!(object instanceof Error)) console.trace(log_msg, object);
2027
- // else console.trace(log_msg, object)
2028
- // }
2029
- };
2030
- var Tt = /* @__PURE__ */ ((e) => (e[e.DEFAULT = 0] = "DEFAULT", e[e.SANDBOX = 1] = "SANDBOX", e[e.DC = 2] = "DC", e))(Tt || {});
2031
- const Rt = "useAxios", rs = async (e = (n) => {
2032
- }, t) => (t.domain_type === Tt.SANDBOX || (t.domain_type, Tt.DC), t.baseURL = void 0, se.debug(Rt, `baseURL::${t.baseURL}`), e(t), t), os = async (e = (n) => {
3025
+ Axios: hi,
3026
+ AxiosError: mi,
3027
+ CanceledError: gi,
3028
+ isCancel: wi,
3029
+ CancelToken: yi,
3030
+ VERSION: bi,
3031
+ all: vi,
3032
+ Cancel: Ei,
3033
+ isAxiosError: Si,
3034
+ spread: xi,
3035
+ toFormData: Ti,
3036
+ AxiosHeaders: _i,
3037
+ HttpStatusCode: Ri,
3038
+ formToJSON: Oi,
3039
+ getAdapter: Ni,
3040
+ mergeConfig: Ai
3041
+ } = N, Pt = "useAxios", La = async (e = (n) => {
3042
+ }, t) => (t.baseURL = Jr(), j.debug(Pt, `baseURL::${t.baseURL}`), e(t), t), Da = async (e = (n) => {
2033
3043
  }, t) => {
2034
3044
  var r;
2035
3045
  if (e(t), t.response.status !== 500) {
2036
3046
  if (t.response.status <= 401)
2037
- return se.info(Rt, t.response.data.meta), Promise.reject(t.response.data.meta);
3047
+ return j.info(Pt, t.response.data.meta), Promise.reject(t.response.data.meta);
2038
3048
  if (t.response.status === 404)
2039
- return se.info(Rt, t.response.data.meta), Promise.reject(t.response.data.meta);
3049
+ return j.info(Pt, t.response.data.meta), Promise.reject(t.response.data.meta);
2040
3050
  }
2041
3051
  let n;
2042
3052
  try {
2043
3053
  let o = "";
2044
- t.request.config && t.request.config.token_type ? o = t.request.config.token_type : t.response.config && t.response.config.token_type && (o = t.response.config.token_type), n = A(t.response.config);
3054
+ t.request.config && t.request.config.token_type ? o = t.request.config.token_type : t.response.config && t.response.config.token_type && (o = t.response.config.token_type), n = N(t.response.config);
2045
3055
  } catch (o) {
2046
3056
  (r = o == null ? void 0 : o.data) != null && r.meta ? n = Promise.reject(o.data.meta) : o.data ? n = Promise.reject(o.data) : n = Promise.reject(o);
2047
3057
  }
2048
3058
  return n;
2049
- }, Ue = "useAxios", fa = ({ onRequest: e, onError: t }) => {
2050
- A.interceptors.request.use((n) => rs(e, n)), A.interceptors.response.use(
3059
+ }, Ye = "useAxios", Ci = ({ onRequest: e, onError: t }) => {
3060
+ N.interceptors.request.use((n) => La(e, n)), N.interceptors.response.use(
2051
3061
  (n) => n.data.data,
2052
- (n) => os(t, n)
2053
- ), A.defaults.headers.common["content-type"] = "application/json";
2054
- }, pa = {
2055
- get: async (e, t) => (se.debug(Ue, `[get] url | ${e}`), A.get(e, t)),
2056
- post: async (e, t, n) => (se.debug(Ue, `[post] url | ${e} | payload | ${t}`), A.post(e, t, n)),
2057
- put: async (e, t, n) => (se.debug(Ue, `[put] url | ${e} | payload | ${t}`), A.put(e, t, n)),
2058
- delete: async (e, t) => (se.debug(Ue, `[delete] url | ${e}`), A.delete(e, t))
3062
+ (n) => Da(t, n)
3063
+ ), N.defaults.headers.common["content-type"] = "application/json";
3064
+ }, ki = {
3065
+ get: async (e, t) => (j.debug(Ye, `[get] url | ${e}`), N.get(e, t)),
3066
+ post: async (e, t, n) => (j.debug(Ye, `[post] url | ${e} | payload | ${t}`), N.post(e, t, n)),
3067
+ put: async (e, t, n) => (j.debug(Ye, `[put] url | ${e} | payload | ${t}`), N.put(e, t, n)),
3068
+ delete: async (e, t) => (j.debug(Ye, `[delete] url | ${e}`), N.delete(e, t))
2059
3069
  };
2060
- var W = /* @__PURE__ */ ((e) => (e.MINI_MOBILE = "mob-sm", e.MOBILE_PORTRAIT = "mob", e.MOBILE_LANDSCAPE = "mob-l", e.MOBILE_LANDSCAPE_XL = "mob-xl", e.TAB_PORTRAIT = "tab", e.TAB_LANDSCAPE = "tab-l", e.LAPTOP = "lap", e.DESKTOP = "desk", e))(W || {});
2061
- const nn = {
3070
+ var Q = /* @__PURE__ */ ((e) => (e.MINI_MOBILE = "mob-sm", e.MOBILE_PORTRAIT = "mob", e.MOBILE_LANDSCAPE = "mob-l", e.MOBILE_LANDSCAPE_XL = "mob-xl", e.TAB_PORTRAIT = "tab", e.TAB_LANDSCAPE = "tab-l", e.LAPTOP = "lap", e.DESKTOP = "desk", e))(Q || {});
3071
+ const Sn = {
2062
3072
  /* suresh/NOTE: iPhone 15 device size */
2063
3073
  iphone_15: { width: { min: 850, max: 854 }, height: { min: 390, max: 395 } },
2064
3074
  /* suresh/NOTE: Iphone 14 pro max device size */
@@ -2124,18 +3134,18 @@ const nn = {
2124
3134
  },
2125
3135
  /* suresh/NOTE: Nokia N9 device size */
2126
3136
  nokia_n9: { width: { min: 853, max: 855 }, height: { min: 478, max: 482 } }
2127
- }, In = () => ({ width: window.innerWidth, height: window.innerHeight }), ss = ({ width: e, height: t }) => {
2128
- const { width: n, height: r } = In();
3137
+ }, nr = () => ({ width: window.innerWidth, height: window.innerHeight }), Ma = ({ width: e, height: t }) => {
3138
+ const { width: n, height: r } = nr();
2129
3139
  return e.min <= n && e.max >= n && t.min <= r && t.max >= r;
2130
- }, as = () => {
2131
- for (const r of Object.keys(nn)) {
2132
- const o = nn[r];
2133
- if (ss(o))
2134
- return o.vdevice || W.MOBILE_LANDSCAPE_XL;
2135
- }
2136
- const { width: e, height: t } = In(), n = t >= e;
2137
- return e <= 320 ? W.MINI_MOBILE : e <= 480 && e >= 320 ? W.MOBILE_PORTRAIT : e <= 767 && e >= 481 ? W.MOBILE_LANDSCAPE : e <= 1024 && e >= 768 ? n ? W.TAB_PORTRAIT : W.TAB_LANDSCAPE : e <= 1280 && e >= 1025 ? W.LAPTOP : (e >= 1281, W.DESKTOP);
2138
- }, is = ["h1", "h3", "blockquote", "br"], ls = {
3140
+ }, Ia = () => {
3141
+ for (const r of Object.keys(Sn)) {
3142
+ const o = Sn[r];
3143
+ if (Ma(o))
3144
+ return o.vdevice || Q.MOBILE_LANDSCAPE_XL;
3145
+ }
3146
+ const { width: e, height: t } = nr(), n = t >= e;
3147
+ return e <= 320 ? Q.MINI_MOBILE : e <= 480 && e >= 320 ? Q.MOBILE_PORTRAIT : e <= 767 && e >= 481 ? Q.MOBILE_LANDSCAPE : e <= 1024 && e >= 768 ? n ? Q.TAB_PORTRAIT : Q.TAB_LANDSCAPE : e <= 1280 && e >= 1025 ? Q.LAPTOP : (e >= 1281, Q.DESKTOP);
3148
+ }, Pa = ["h1", "h3", "blockquote", "br"], Ba = {
2139
3149
  strong: "*",
2140
3150
  b: "*",
2141
3151
  i: "_",
@@ -2148,7 +3158,7 @@ const nn = {
2148
3158
  h3: "### ",
2149
3159
  br: `
2150
3160
  `
2151
- }, B = {
3161
+ }, F = {
2152
3162
  bold: /(^|\s|[{\[])\*{1,2}(.*?\S *)?\*{1,2}(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,
2153
3163
  // *md*
2154
3164
  italic: /(^|\s|[{\[])\_(.*?\S *)?\_(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,
@@ -2190,13 +3200,13 @@ const nn = {
2190
3200
  // vtypes
2191
3201
  gdrive_url: /(?:https:\/\/drive\.google\.com\/file\/d\/(.*?)\/view)/,
2192
3202
  vtype: /(?:vtype=(?:'|"|&quot;)(image|audio|video)(?:'|"|&quot;))/
2193
- }, gt = (e) => e.replace(/\*/g, "&ast;").replace(/\_/g, "&#95;").replace(/\~/g, "&#126;"), cs = (e) => e.replace(/&ast;/g, "*").replace(/&#95;/g, "_").replace(/&#126;/g, "~"), rn = (e) => (e && typeof e == "string" && (e = e.replace(/&#39;|&#x27;/g, "'").replace(/&quot;/g, '"').replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&amp;/g, "&").replace(/&#x2F;/g, "/").replace(/&nbsp;/g, " ").replace(/%2C/g, ",")), e), we = (e, t) => {
3203
+ }, Rt = (e) => e.replace(/\*/g, "&ast;").replace(/\_/g, "&#95;").replace(/\~/g, "&#126;"), Fa = (e) => e.replace(/&ast;/g, "*").replace(/&#95;/g, "_").replace(/&#126;/g, "~"), xn = (e) => (e && typeof e == "string" && (e = e.replace(/&#39;|&#x27;/g, "'").replace(/&quot;/g, '"').replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&amp;/g, "&").replace(/&#x2F;/g, "/").replace(/&nbsp;/g, " ").replace(/%2C/g, ",")), e), _e = (e, t) => {
2194
3204
  let n = "", r = "";
2195
3205
  return (e[0] === `
2196
3206
  ` || e[0] === " ") && (n = e[0]), (e[e.length - 1] === `
2197
3207
  ` || e[e.length - 1] === " ") && (r = e[e.length - 1]), n + t + r;
2198
- }, on = (e) => new RegExp(`<${e}.*?/?>`, "gm"), sn = (e) => {
2199
- let t = e.match(B.gdrive_url);
3208
+ }, Tn = (e) => new RegExp(`<${e}.*?/?>`, "gm"), _n = (e) => {
3209
+ let t = e.match(F.gdrive_url);
2200
3210
  if (t && t.length > 1 && t[1])
2201
3211
  return `http://docs.google.com/uc?export=open&id=${t[1]}`;
2202
3212
  if (e.startsWith("@")) {
@@ -2205,10 +3215,10 @@ const nn = {
2205
3215
  return `http://docs.google.com/uc?export=open&id=${n[1]}`;
2206
3216
  }
2207
3217
  return e;
2208
- }, an = (e = "", t = "", n = "", r = "") => {
3218
+ }, Rn = (e = "", t = "", n = "", r = "") => {
2209
3219
  let o = "image";
2210
3220
  if (r.length) {
2211
- let s = r.match(B.vtype);
3221
+ let s = r.match(F.vtype);
2212
3222
  s && s.length > 1 && s[1] && (o = s[1]);
2213
3223
  }
2214
3224
  return o == "audio" ? `<audio vmd="audio" controls ${r}>
@@ -2216,9 +3226,9 @@ const nn = {
2216
3226
  </audio>` : o == "video" ? `<video vmd="video" controls ${r}>
2217
3227
  <source src="${n}" type="video/mp4"/>
2218
3228
  </video>` : `<img vmd="image" src="${n}" alt="${e}" title="${t}" ${r}>`;
2219
- }, ha = {
2220
- applyReverseMarkdown: (e) => (e = e.replace(on("br"), `
2221
- `), e = rn(e), e = Markdown.reverseAnchor(e), e = e.replace(on("hr"), " --- "), e = Markdown.reverseRecursive(e), e.trim()),
3229
+ }, Li = {
3230
+ applyReverseMarkdown: (e) => (e = e.replace(Tn("br"), `
3231
+ `), e = xn(e), e = Markdown.reverseAnchor(e), e = e.replace(Tn("hr"), " --- "), e = Markdown.reverseRecursive(e), e.trim()),
2222
3232
  reverseRecursive: (e) => {
2223
3233
  let n = new DOMParser().parseFromString(e, "text/html").body.childNodes, r = e === `
2224
3234
  ` ? `
@@ -2230,33 +3240,33 @@ const nn = {
2230
3240
  `)) || s || a === "br") {
2231
3241
  if (s)
2232
3242
  return r += o.data;
2233
- let d = ls[a] || "", u = o.childNodes.length ? Markdown.reverseRecursive(o.innerHTML) : i;
2234
- r += !u.trim() && u.includes(`
3243
+ let u = Ba[a] || "", c = o.childNodes.length ? Markdown.reverseRecursive(o.innerHTML) : i;
3244
+ r += !c.trim() && c.includes(`
2235
3245
  `) ? `
2236
3246
  ` : "";
2237
- let f = u[u.length - 1] === `
2238
- `, h = is.includes(a) ? "" : d;
2239
- r += d + (f ? u.slice(0, u.length - 1) + h + `
2240
- ` : u + h);
3247
+ let d = c[c.length - 1] === `
3248
+ `, h = Pa.includes(a) ? "" : u;
3249
+ r += u + (d ? c.slice(0, c.length - 1) + h + `
3250
+ ` : c + h);
2241
3251
  }
2242
3252
  }), r;
2243
3253
  },
2244
3254
  reverseAnchor: (e) => {
2245
- let { anchor_tag: t, href: n } = B;
3255
+ let { anchor_tag: t, href: n } = F;
2246
3256
  return e.replace(t, (r, o, s) => {
2247
3257
  const a = s;
2248
3258
  let i;
2249
- return o.replace(n, (d, u) => {
2250
- i = u;
3259
+ return o.replace(n, (u, c) => {
3260
+ i = c;
2251
3261
  }), i.includes("mailto:") ? i.replace("mailto:", "") : `${e[e.indexOf(r) - 1] !== " " ? " " : ""}[${a}](${encodeURI(i)})`;
2252
3262
  });
2253
3263
  },
2254
3264
  // md-apply
2255
- applyMarkdown: (e, t = !1) => typeof e != "string" ? e : (e = rn(e), e = e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/<br>/g, `
2256
- `).trim(), e = Markdown.applyRecursive(e, t), e = Markdown.applyOnce(e), e = Markdown.applyNextLine(e), e = cs(e), '<div class="vmd">' + e + "</div>"),
2257
- applyRecursive: (e, t = !1) => (e = e.replace(B.bold, Markdown.getBoldHTML), e = e.replace(B.italic, Markdown.getItalicHTML), e = e.replace(B.underline, Markdown.getUnderLineHTML), e = e.replace(B.strike, Markdown.getStrikeHTML), e = e.replace(B.line, Markdown.getLineHTML), e = e.replace(B.bullet, Markdown.getBulletHTML), e = e.replace(B.numlist, Markdown.getNumlistHTML), t || (e = e.replace(B.video, Markdown.getVideoHTML), e = e.replace(B.image, Markdown.getImageHTML)), e = e.replace(B.link, Markdown.getLinkHTML), e),
2258
- applyOnce: (e) => (e = e.replace(B.blockquote, Markdown.getBlockQuoteHTML), e = e.replace(B.heading, Markdown.getHeadingHTML), e = e.replace(B.codeblock, Markdown.getCodeblockHTML), e = e.replace(B.monospace, Markdown.getMonoSpaceHTML), e),
2259
- applyNextLine: (e) => e.replace(B.nextline, Markdown.getNextLineHTML),
3265
+ applyMarkdown: (e, t = !1) => typeof e != "string" ? e : (e = xn(e), e = e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/<br>/g, `
3266
+ `).trim(), e = Markdown.applyRecursive(e, t), e = Markdown.applyOnce(e), e = Markdown.applyNextLine(e), e = Fa(e), '<div class="vmd">' + e + "</div>"),
3267
+ applyRecursive: (e, t = !1) => (e = e.replace(F.bold, Markdown.getBoldHTML), e = e.replace(F.italic, Markdown.getItalicHTML), e = e.replace(F.underline, Markdown.getUnderLineHTML), e = e.replace(F.strike, Markdown.getStrikeHTML), e = e.replace(F.line, Markdown.getLineHTML), e = e.replace(F.bullet, Markdown.getBulletHTML), e = e.replace(F.numlist, Markdown.getNumlistHTML), t || (e = e.replace(F.video, Markdown.getVideoHTML), e = e.replace(F.image, Markdown.getImageHTML)), e = e.replace(F.link, Markdown.getLinkHTML), e),
3268
+ applyOnce: (e) => (e = e.replace(F.blockquote, Markdown.getBlockQuoteHTML), e = e.replace(F.heading, Markdown.getHeadingHTML), e = e.replace(F.codeblock, Markdown.getCodeblockHTML), e = e.replace(F.monospace, Markdown.getMonoSpaceHTML), e),
3269
+ applyNextLine: (e) => e.replace(F.nextline, Markdown.getNextLineHTML),
2260
3270
  // md-helper
2261
3271
  getBoldHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "*" || n[n.length - 1] === "*" || n[0] === " " && n[n.length - 1] === " " || !n ? e : t + ' <strong vmd="bold">' + Markdown.applyRecursive(n) + "</strong> ",
2262
3272
  getItalicHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "_" || n[n.length - 1] === "_" || n[0] === " " && n[n.length - 1] === " " || !n ? e : t + ' <i vmd="italic">' + Markdown.applyRecursive(n) + "</i> ",
@@ -2264,16 +3274,16 @@ const nn = {
2264
3274
  getStrikeHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "~" || n[n.length - 1] === "~" || n[0] === " " && n[n.length - 1] === " " || !n ? e : t + ' <strike vmd="strike">' + Markdown.applyRecursive(n) + "</strike> ",
2265
3275
  getHeadingHTML: (e, t, n) => {
2266
3276
  let r = t.length;
2267
- return we(
3277
+ return _e(
2268
3278
  e,
2269
- " <h" + r + ` vmd="h${r}">` + gt(n) + "</h" + r + "> "
3279
+ " <h" + r + ` vmd="h${r}">` + Rt(n) + "</h" + r + "> "
2270
3280
  );
2271
3281
  },
2272
- getBlockQuoteHTML: (e, t) => (t = t.trim(), t.length ? we(
3282
+ getBlockQuoteHTML: (e, t) => (t = t.trim(), t.length ? _e(
2273
3283
  e,
2274
3284
  ' <blockquote vmd="blockquote"><p>' + Markdown.applyRecursive(t) + "</p></blockquote> "
2275
3285
  ) : e),
2276
- getMonoSpaceHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "`" || n[n.length - 1] === "`" || n[0] === " " && n[n.length - 1] === " " ? e : t + ' <code vmd="monospace" class="code">&ldquo;' + gt(n) + "&rdquo;</code> ",
3286
+ getMonoSpaceHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "`" || n[n.length - 1] === "`" || n[0] === " " && n[n.length - 1] === " " ? e : t + ' <code vmd="monospace" class="code">&ldquo;' + Rt(n) + "&rdquo;</code> ",
2277
3287
  getCodeblockHTML: (e, t, n) => n.trim().length === 0 ? e : t + ' <pre vmd="codeblock"> ' + Markdown.applyRecursive(n) + "</pre>",
2278
3288
  getNextLineHTML: (e, t, n, r) => t + ' <br vmd="br" > ' + r,
2279
3289
  getLineHTML: (e, t, n, r) => t + '<hr vmd="line" class="hr w100">' + Markdown.applyRecursive(r.trim()),
@@ -2281,17 +3291,17 @@ const nn = {
2281
3291
  var s = r.startsWith("www.") ? "http://" + r : r;
2282
3292
  return t + ` <a vmd="link" href="${encodeURI(
2283
3293
  s
2284
- )}" rel="noopener noreferrer" ${o}>${gt(n)}</a>`;
3294
+ )}" rel="noopener noreferrer" ${o}>${Rt(n)}</a>`;
2285
3295
  },
2286
3296
  getImageHTML: (e, t, n, r, o) => {
2287
- let s = an(t, r, sn(n), o);
2288
- return we(e, s);
3297
+ let s = Rn(t, r, _n(n), o);
3298
+ return _e(e, s);
2289
3299
  },
2290
3300
  getVideoHTML: (e, t, n, r, o, s, a, i) => {
2291
- let d = an(t, r, sn(n), o);
2292
- return we(
3301
+ let u = Rn(t, r, _n(n), o);
3302
+ return _e(
2293
3303
  e,
2294
- `<a vmd="hyperlink" href="${s}" title="${a}" rel="noreferrer" ${i}>${d}</a>`
3304
+ `<a vmd="hyperlink" href="${s}" title="${a}" rel="noreferrer" ${i}>${u}</a>`
2295
3305
  );
2296
3306
  },
2297
3307
  getBulletHTML: (e) => {
@@ -2299,7 +3309,7 @@ const nn = {
2299
3309
  if (e.replace(/\s/g, "").replace(/\*/g, "").length == 0)
2300
3310
  return e;
2301
3311
  } else return e;
2302
- return we(
3312
+ return _e(
2303
3313
  e,
2304
3314
  ' <ul vmd="list-bullet" style="list-style-type: disc; list-style: inherit;">' + ((n) => {
2305
3315
  let r = "";
@@ -2310,7 +3320,7 @@ const nn = {
2310
3320
  })(e) + "</ul> "
2311
3321
  );
2312
3322
  },
2313
- getNumlistHTML: (e) => isNaN(e) ? we(
3323
+ getNumlistHTML: (e) => isNaN(e) ? _e(
2314
3324
  e,
2315
3325
  ' <ol vmd="list-number">' + ((n) => {
2316
3326
  let r = "";
@@ -2321,7 +3331,7 @@ const nn = {
2321
3331
  })(e) + "</ol> "
2322
3332
  ) : e
2323
3333
  };
2324
- function ma() {
3334
+ function Di() {
2325
3335
  return { toTop: () => {
2326
3336
  window.scrollTo({
2327
3337
  top: 0,
@@ -2336,29 +3346,29 @@ function ma() {
2336
3346
  const a = document.getElementById(o);
2337
3347
  let i = "start";
2338
3348
  if (s) {
2339
- const d = as();
2340
- i = d === W.MINI_MOBILE || d === W.MOBILE_PORTRAIT ? "start" : "center";
3349
+ const u = Ia();
3350
+ i = u === Q.MINI_MOBILE || u === Q.MOBILE_PORTRAIT ? "start" : "center";
2341
3351
  }
2342
3352
  a == null || a.scrollIntoView({
2343
3353
  behavior: "smooth",
2344
3354
  block: i
2345
3355
  });
2346
3356
  }, byIdOffSet: (o = "") => {
2347
- const s = document.getElementById(o), a = 75, i = document.body.getBoundingClientRect().top, f = s.getBoundingClientRect().top - i - a;
3357
+ const s = document.getElementById(o), a = 75, i = document.body.getBoundingClientRect().top, d = s.getBoundingClientRect().top - i - a;
2348
3358
  window.scroll({
2349
- top: f,
3359
+ top: d,
2350
3360
  behavior: "smooth"
2351
3361
  });
2352
3362
  } };
2353
3363
  }
2354
- function ga({
3364
+ function Mi({
2355
3365
  meta: e = !1,
2356
3366
  ctrl: t = !1,
2357
3367
  shift: n = !1,
2358
3368
  key: r,
2359
3369
  handler: o
2360
3370
  }) {
2361
- Oe("keydown", (s) => {
3371
+ G("keydown", (s) => {
2362
3372
  if (s.metaKey === e) {
2363
3373
  if (s.ctrlKey !== t) return;
2364
3374
  if (s.shiftKey !== n) return;
@@ -2366,320 +3376,72 @@ function ga({
2366
3376
  }
2367
3377
  });
2368
3378
  }
2369
- const us = "useStore";
2370
- let Dn = "vapp", Fn = "1.0.4";
2371
- function qe(e) {
2372
- return `vezham-ls-${Dn}-${Fn}-${e}`;
3379
+ const Ua = "useStore";
3380
+ let rr = "v0xapp", or = "1.0.5-alpha";
3381
+ function Je(e) {
3382
+ return `vezham-ls-${rr}-${or}-${e}`;
2373
3383
  }
2374
- const wa = (e) => {
2375
- e.pretext && (Dn = e.pretext), e.version && (Fn = e.version);
2376
- }, ds = {
3384
+ const Ii = (e) => {
3385
+ e.pretext && (rr = e.pretext), e.version && (or = e.version);
3386
+ }, ja = {
2377
3387
  get: (e, t) => {
2378
3388
  try {
2379
- const n = window.localStorage.getItem(qe(e));
3389
+ const n = window.localStorage.getItem(Je(e));
2380
3390
  return n && n !== "undefined" ? n : t || "";
2381
3391
  } catch (n) {
2382
- return se.error(us, `key | ${qe(e)} | err: `, n), t || "";
3392
+ return j.error(Ua, `key | ${Je(e)} | err: `, n), t || "";
2383
3393
  }
2384
3394
  },
2385
- has: (e) => !!ds.get(e),
2386
- set: (e, t) => window.localStorage.setItem(qe(e), t),
2387
- delete: (e) => window.localStorage.removeItem(qe(e)),
3395
+ has: (e) => !!ja.get(e),
3396
+ set: (e, t) => window.localStorage.setItem(Je(e), t),
3397
+ delete: (e) => window.localStorage.removeItem(Je(e)),
2388
3398
  purge: () => window.localStorage.clear()
2389
3399
  };
2390
- var fs = (e) => {
2391
- switch (e) {
2392
- case "success":
2393
- return ms;
2394
- case "info":
2395
- return ws;
2396
- case "warning":
2397
- return gs;
2398
- case "error":
2399
- return ys;
2400
- default:
2401
- return null;
2402
- }
2403
- }, ps = Array(12).fill(0), hs = ({ visible: e, className: t }) => p.createElement("div", { className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "), "data-visible": e }, p.createElement("div", { className: "sonner-spinner" }, ps.map((n, r) => p.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${r}` })))), ms = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" })), gs = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })), ws = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" })), ys = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })), bs = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, p.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), p.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })), vs = () => {
2404
- let [e, t] = p.useState(document.hidden);
2405
- return p.useEffect(() => {
2406
- let n = () => {
2407
- t(document.hidden);
2408
- };
2409
- return document.addEventListener("visibilitychange", n), () => window.removeEventListener("visibilitychange", n);
2410
- }, []), e;
2411
- }, Ot = 1, xs = class {
2412
- constructor() {
2413
- this.subscribe = (e) => (this.subscribers.push(e), () => {
2414
- let t = this.subscribers.indexOf(e);
2415
- this.subscribers.splice(t, 1);
2416
- }), this.publish = (e) => {
2417
- this.subscribers.forEach((t) => t(e));
2418
- }, this.addToast = (e) => {
2419
- this.publish(e), this.toasts = [...this.toasts, e];
2420
- }, this.create = (e) => {
2421
- var t;
2422
- let { message: n, ...r } = e, o = typeof (e == null ? void 0 : e.id) == "number" || ((t = e.id) == null ? void 0 : t.length) > 0 ? e.id : Ot++, s = this.toasts.find((i) => i.id === o), a = e.dismissible === void 0 ? !0 : e.dismissible;
2423
- return this.dismissedToasts.has(o) && this.dismissedToasts.delete(o), s ? this.toasts = this.toasts.map((i) => i.id === o ? (this.publish({ ...i, ...e, id: o, title: n }), { ...i, ...e, id: o, dismissible: a, title: n }) : i) : this.addToast({ title: n, ...r, dismissible: a, id: o }), o;
2424
- }, this.dismiss = (e) => (this.dismissedToasts.add(e), e || this.toasts.forEach((t) => {
2425
- this.subscribers.forEach((n) => n({ id: t.id, dismiss: !0 }));
2426
- }), this.subscribers.forEach((t) => t({ id: e, dismiss: !0 })), e), this.message = (e, t) => this.create({ ...t, message: e }), this.error = (e, t) => this.create({ ...t, message: e, type: "error" }), this.success = (e, t) => this.create({ ...t, type: "success", message: e }), this.info = (e, t) => this.create({ ...t, type: "info", message: e }), this.warning = (e, t) => this.create({ ...t, type: "warning", message: e }), this.loading = (e, t) => this.create({ ...t, type: "loading", message: e }), this.promise = (e, t) => {
2427
- if (!t) return;
2428
- let n;
2429
- t.loading !== void 0 && (n = this.create({ ...t, promise: e, type: "loading", message: t.loading, description: typeof t.description != "function" ? t.description : void 0 }));
2430
- let r = e instanceof Promise ? e : e(), o = n !== void 0, s, a = r.then(async (d) => {
2431
- if (s = ["resolve", d], p.isValidElement(d)) o = !1, this.create({ id: n, type: "default", message: d });
2432
- else if (Ss(d) && !d.ok) {
2433
- o = !1;
2434
- let u = typeof t.error == "function" ? await t.error(`HTTP error! status: ${d.status}`) : t.error, f = typeof t.description == "function" ? await t.description(`HTTP error! status: ${d.status}`) : t.description;
2435
- this.create({ id: n, type: "error", message: u, description: f });
2436
- } else if (t.success !== void 0) {
2437
- o = !1;
2438
- let u = typeof t.success == "function" ? await t.success(d) : t.success, f = typeof t.description == "function" ? await t.description(d) : t.description;
2439
- this.create({ id: n, type: "success", message: u, description: f });
2440
- }
2441
- }).catch(async (d) => {
2442
- if (s = ["reject", d], t.error !== void 0) {
2443
- o = !1;
2444
- let u = typeof t.error == "function" ? await t.error(d) : t.error, f = typeof t.description == "function" ? await t.description(d) : t.description;
2445
- this.create({ id: n, type: "error", message: u, description: f });
2446
- }
2447
- }).finally(() => {
2448
- var d;
2449
- o && (this.dismiss(n), n = void 0), (d = t.finally) == null || d.call(t);
2450
- }), i = () => new Promise((d, u) => a.then(() => s[0] === "reject" ? u(s[1]) : d(s[1])).catch(u));
2451
- return typeof n != "string" && typeof n != "number" ? { unwrap: i } : Object.assign(n, { unwrap: i });
2452
- }, this.custom = (e, t) => {
2453
- let n = (t == null ? void 0 : t.id) || Ot++;
2454
- return this.create({ jsx: e(n), id: n, ...t }), n;
2455
- }, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
2456
- }
2457
- }, H = new xs(), Es = (e, t) => {
2458
- let n = (t == null ? void 0 : t.id) || Ot++;
2459
- return H.addToast({ title: e, ...t, id: n }), n;
2460
- }, Ss = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", Ts = Es, Rs = () => H.toasts, Os = () => H.getActiveToasts(), As = Object.assign(Ts, { success: H.success, info: H.info, warning: H.warning, error: H.error, custom: H.custom, message: H.message, promise: H.promise, dismiss: H.dismiss, loading: H.loading }, { getHistory: Rs, getToasts: Os });
2461
- function ks(e, { insertAt: t } = {}) {
2462
- if (typeof document > "u") return;
2463
- let n = document.head || document.getElementsByTagName("head")[0], r = document.createElement("style");
2464
- r.type = "text/css", t === "top" && n.firstChild ? n.insertBefore(r, n.firstChild) : n.appendChild(r), r.styleSheet ? r.styleSheet.cssText = e : r.appendChild(document.createTextNode(e));
2465
- }
2466
- ks(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
2467
- `);
2468
- function ze(e) {
2469
- return e.label !== void 0;
2470
- }
2471
- var Ns = 3, _s = "32px", Ls = "16px", ln = 4e3, Cs = 356, Ms = 14, Ps = 20, Bs = 200;
2472
- function X(...e) {
2473
- return e.filter(Boolean).join(" ");
2474
- }
2475
- function Is(e) {
2476
- let [t, n] = e.split("-"), r = [];
2477
- return t && r.push(t), n && r.push(n), r;
2478
- }
2479
- var Ds = (e) => {
2480
- var t, n, r, o, s, a, i, d, u, f, h;
2481
- let { invert: y, toast: l, unstyled: w, interacting: g, setHeights: m, visibleToasts: S, heights: T, index: R, toasts: D, expanded: _, removeToast: x, defaultRichColors: M, closeButton: F, style: Q, cancelButtonStyle: tt, actionButtonStyle: Me, className: ee = "", descriptionClassName: Pe = "", duration: fe, position: Be, gap: ae, loadingIcon: te, expandByDefault: Ie, classNames: E, icons: q, closeButtonAriaLabel: nt = "Close toast", pauseWhenPageIsHidden: k } = e, [N, C] = p.useState(null), [j, pe] = p.useState(null), [P, rt] = p.useState(!1), [xe, De] = p.useState(!1), [Ee, ot] = p.useState(!1), [_t, jn] = p.useState(!1), [Hn, Lt] = p.useState(!1), [Un, st] = p.useState(0), [qn, Ct] = p.useState(0), Se = p.useRef(l.duration || fe || ln), Mt = p.useRef(null), ie = p.useRef(null), zn = R === 0, $n = R + 1 <= S, $ = l.type, he = l.dismissible !== !1, Wn = l.className || "", Jn = l.descriptionClassName || "", Fe = p.useMemo(() => T.findIndex((b) => b.toastId === l.id) || 0, [T, l.id]), Vn = p.useMemo(() => {
2482
- var b;
2483
- return (b = l.closeButton) != null ? b : F;
2484
- }, [l.closeButton, F]), Pt = p.useMemo(() => l.duration || fe || ln, [l.duration, fe]), at = p.useRef(0), me = p.useRef(0), Bt = p.useRef(0), ge = p.useRef(null), [Kn, Yn] = Be.split("-"), It = p.useMemo(() => T.reduce((b, O, L) => L >= Fe ? b : b + O.height, 0), [T, Fe]), Dt = vs(), Xn = l.invert || y, it = $ === "loading";
2485
- me.current = p.useMemo(() => Fe * ae + It, [Fe, It]), p.useEffect(() => {
2486
- Se.current = Pt;
2487
- }, [Pt]), p.useEffect(() => {
2488
- rt(!0);
2489
- }, []), p.useEffect(() => {
2490
- let b = ie.current;
2491
- if (b) {
2492
- let O = b.getBoundingClientRect().height;
2493
- return Ct(O), m((L) => [{ toastId: l.id, height: O, position: l.position }, ...L]), () => m((L) => L.filter((V) => V.toastId !== l.id));
2494
- }
2495
- }, [m, l.id]), p.useLayoutEffect(() => {
2496
- if (!P) return;
2497
- let b = ie.current, O = b.style.height;
2498
- b.style.height = "auto";
2499
- let L = b.getBoundingClientRect().height;
2500
- b.style.height = O, Ct(L), m((V) => V.find((K) => K.toastId === l.id) ? V.map((K) => K.toastId === l.id ? { ...K, height: L } : K) : [{ toastId: l.id, height: L, position: l.position }, ...V]);
2501
- }, [P, l.title, l.description, m, l.id]);
2502
- let ne = p.useCallback(() => {
2503
- De(!0), st(me.current), m((b) => b.filter((O) => O.toastId !== l.id)), setTimeout(() => {
2504
- x(l);
2505
- }, Bs);
2506
- }, [l, x, m, me]);
2507
- p.useEffect(() => {
2508
- if (l.promise && $ === "loading" || l.duration === 1 / 0 || l.type === "loading") return;
2509
- let b;
2510
- return _ || g || k && Dt ? (() => {
2511
- if (Bt.current < at.current) {
2512
- let O = (/* @__PURE__ */ new Date()).getTime() - at.current;
2513
- Se.current = Se.current - O;
2514
- }
2515
- Bt.current = (/* @__PURE__ */ new Date()).getTime();
2516
- })() : Se.current !== 1 / 0 && (at.current = (/* @__PURE__ */ new Date()).getTime(), b = setTimeout(() => {
2517
- var O;
2518
- (O = l.onAutoClose) == null || O.call(l, l), ne();
2519
- }, Se.current)), () => clearTimeout(b);
2520
- }, [_, g, l, $, k, Dt, ne]), p.useEffect(() => {
2521
- l.delete && ne();
2522
- }, [ne, l.delete]);
2523
- function Gn() {
2524
- var b, O, L;
2525
- return q != null && q.loading ? p.createElement("div", { className: X(E == null ? void 0 : E.loader, (b = l == null ? void 0 : l.classNames) == null ? void 0 : b.loader, "sonner-loader"), "data-visible": $ === "loading" }, q.loading) : te ? p.createElement("div", { className: X(E == null ? void 0 : E.loader, (O = l == null ? void 0 : l.classNames) == null ? void 0 : O.loader, "sonner-loader"), "data-visible": $ === "loading" }, te) : p.createElement(hs, { className: X(E == null ? void 0 : E.loader, (L = l == null ? void 0 : l.classNames) == null ? void 0 : L.loader), visible: $ === "loading" });
2526
- }
2527
- return p.createElement("li", { tabIndex: 0, ref: ie, className: X(ee, Wn, E == null ? void 0 : E.toast, (t = l == null ? void 0 : l.classNames) == null ? void 0 : t.toast, E == null ? void 0 : E.default, E == null ? void 0 : E[$], (n = l == null ? void 0 : l.classNames) == null ? void 0 : n[$]), "data-sonner-toast": "", "data-rich-colors": (r = l.richColors) != null ? r : M, "data-styled": !(l.jsx || l.unstyled || w), "data-mounted": P, "data-promise": !!l.promise, "data-swiped": Hn, "data-removed": xe, "data-visible": $n, "data-y-position": Kn, "data-x-position": Yn, "data-index": R, "data-front": zn, "data-swiping": Ee, "data-dismissible": he, "data-type": $, "data-invert": Xn, "data-swipe-out": _t, "data-swipe-direction": j, "data-expanded": !!(_ || Ie && P), style: { "--index": R, "--toasts-before": R, "--z-index": D.length - R, "--offset": `${xe ? Un : me.current}px`, "--initial-height": Ie ? "auto" : `${qn}px`, ...Q, ...l.style }, onDragEnd: () => {
2528
- ot(!1), C(null), ge.current = null;
2529
- }, onPointerDown: (b) => {
2530
- it || !he || (Mt.current = /* @__PURE__ */ new Date(), st(me.current), b.target.setPointerCapture(b.pointerId), b.target.tagName !== "BUTTON" && (ot(!0), ge.current = { x: b.clientX, y: b.clientY }));
2531
- }, onPointerUp: () => {
2532
- var b, O, L, V;
2533
- if (_t || !he) return;
2534
- ge.current = null;
2535
- let K = Number(((b = ie.current) == null ? void 0 : b.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), re = Number(((O = ie.current) == null ? void 0 : O.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), le = (/* @__PURE__ */ new Date()).getTime() - ((L = Mt.current) == null ? void 0 : L.getTime()), Y = N === "x" ? K : re, oe = Math.abs(Y) / le;
2536
- if (Math.abs(Y) >= Ps || oe > 0.11) {
2537
- st(me.current), (V = l.onDismiss) == null || V.call(l, l), pe(N === "x" ? K > 0 ? "right" : "left" : re > 0 ? "down" : "up"), ne(), jn(!0), Lt(!1);
2538
- return;
2539
- }
2540
- ot(!1), C(null);
2541
- }, onPointerMove: (b) => {
2542
- var O, L, V, K;
2543
- if (!ge.current || !he || ((O = window.getSelection()) == null ? void 0 : O.toString().length) > 0) return;
2544
- let re = b.clientY - ge.current.y, le = b.clientX - ge.current.x, Y = (L = e.swipeDirections) != null ? L : Is(Be);
2545
- !N && (Math.abs(le) > 1 || Math.abs(re) > 1) && C(Math.abs(le) > Math.abs(re) ? "x" : "y");
2546
- let oe = { x: 0, y: 0 };
2547
- N === "y" ? (Y.includes("top") || Y.includes("bottom")) && (Y.includes("top") && re < 0 || Y.includes("bottom") && re > 0) && (oe.y = re) : N === "x" && (Y.includes("left") || Y.includes("right")) && (Y.includes("left") && le < 0 || Y.includes("right") && le > 0) && (oe.x = le), (Math.abs(oe.x) > 0 || Math.abs(oe.y) > 0) && Lt(!0), (V = ie.current) == null || V.style.setProperty("--swipe-amount-x", `${oe.x}px`), (K = ie.current) == null || K.style.setProperty("--swipe-amount-y", `${oe.y}px`);
2548
- } }, Vn && !l.jsx ? p.createElement("button", { "aria-label": nt, "data-disabled": it, "data-close-button": !0, onClick: it || !he ? () => {
2549
- } : () => {
2550
- var b;
2551
- ne(), (b = l.onDismiss) == null || b.call(l, l);
2552
- }, className: X(E == null ? void 0 : E.closeButton, (o = l == null ? void 0 : l.classNames) == null ? void 0 : o.closeButton) }, (s = q == null ? void 0 : q.close) != null ? s : bs) : null, l.jsx || lt(l.title) ? l.jsx ? l.jsx : typeof l.title == "function" ? l.title() : l.title : p.createElement(p.Fragment, null, $ || l.icon || l.promise ? p.createElement("div", { "data-icon": "", className: X(E == null ? void 0 : E.icon, (a = l == null ? void 0 : l.classNames) == null ? void 0 : a.icon) }, l.promise || l.type === "loading" && !l.icon ? l.icon || Gn() : null, l.type !== "loading" ? l.icon || (q == null ? void 0 : q[$]) || fs($) : null) : null, p.createElement("div", { "data-content": "", className: X(E == null ? void 0 : E.content, (i = l == null ? void 0 : l.classNames) == null ? void 0 : i.content) }, p.createElement("div", { "data-title": "", className: X(E == null ? void 0 : E.title, (d = l == null ? void 0 : l.classNames) == null ? void 0 : d.title) }, typeof l.title == "function" ? l.title() : l.title), l.description ? p.createElement("div", { "data-description": "", className: X(Pe, Jn, E == null ? void 0 : E.description, (u = l == null ? void 0 : l.classNames) == null ? void 0 : u.description) }, typeof l.description == "function" ? l.description() : l.description) : null), lt(l.cancel) ? l.cancel : l.cancel && ze(l.cancel) ? p.createElement("button", { "data-button": !0, "data-cancel": !0, style: l.cancelButtonStyle || tt, onClick: (b) => {
2553
- var O, L;
2554
- ze(l.cancel) && he && ((L = (O = l.cancel).onClick) == null || L.call(O, b), ne());
2555
- }, className: X(E == null ? void 0 : E.cancelButton, (f = l == null ? void 0 : l.classNames) == null ? void 0 : f.cancelButton) }, l.cancel.label) : null, lt(l.action) ? l.action : l.action && ze(l.action) ? p.createElement("button", { "data-button": !0, "data-action": !0, style: l.actionButtonStyle || Me, onClick: (b) => {
2556
- var O, L;
2557
- ze(l.action) && ((L = (O = l.action).onClick) == null || L.call(O, b), !b.defaultPrevented && ne());
2558
- }, className: X(E == null ? void 0 : E.actionButton, (h = l == null ? void 0 : l.classNames) == null ? void 0 : h.actionButton) }, l.action.label) : null));
2559
- };
2560
- function cn() {
2561
- if (typeof window > "u" || typeof document > "u") return "ltr";
2562
- let e = document.documentElement.getAttribute("dir");
2563
- return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
2564
- }
2565
- function Fs(e, t) {
2566
- let n = {};
2567
- return [e, t].forEach((r, o) => {
2568
- let s = o === 1, a = s ? "--mobile-offset" : "--offset", i = s ? Ls : _s;
2569
- function d(u) {
2570
- ["top", "right", "bottom", "left"].forEach((f) => {
2571
- n[`${a}-${f}`] = typeof u == "number" ? `${u}px` : u;
2572
- });
2573
- }
2574
- typeof r == "number" || typeof r == "string" ? d(r) : typeof r == "object" ? ["top", "right", "bottom", "left"].forEach((u) => {
2575
- r[u] === void 0 ? n[`${a}-${u}`] = i : n[`${a}-${u}`] = typeof r[u] == "number" ? `${r[u]}px` : r[u];
2576
- }) : d(i);
2577
- }), n;
2578
- }
2579
- er(function(e, t) {
2580
- let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: a, className: i, offset: d, mobileOffset: u, theme: f = "light", richColors: h, duration: y, style: l, visibleToasts: w = Ns, toastOptions: g, dir: m = cn(), gap: S = Ms, loadingIcon: T, icons: R, containerAriaLabel: D = "Notifications", pauseWhenPageIsHidden: _ } = e, [x, M] = p.useState([]), F = p.useMemo(() => Array.from(new Set([r].concat(x.filter((k) => k.position).map((k) => k.position)))), [x, r]), [Q, tt] = p.useState([]), [Me, ee] = p.useState(!1), [Pe, fe] = p.useState(!1), [Be, ae] = p.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), te = p.useRef(null), Ie = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), E = p.useRef(null), q = p.useRef(!1), nt = p.useCallback((k) => {
2581
- M((N) => {
2582
- var C;
2583
- return (C = N.find((j) => j.id === k.id)) != null && C.delete || H.dismiss(k.id), N.filter(({ id: j }) => j !== k.id);
2584
- });
2585
- }, []);
2586
- return p.useEffect(() => H.subscribe((k) => {
2587
- if (k.dismiss) {
2588
- M((N) => N.map((C) => C.id === k.id ? { ...C, delete: !0 } : C));
2589
- return;
2590
- }
2591
- setTimeout(() => {
2592
- tr.flushSync(() => {
2593
- M((N) => {
2594
- let C = N.findIndex((j) => j.id === k.id);
2595
- return C !== -1 ? [...N.slice(0, C), { ...N[C], ...k }, ...N.slice(C + 1)] : [k, ...N];
2596
- });
2597
- });
2598
- });
2599
- }), []), p.useEffect(() => {
2600
- if (f !== "system") {
2601
- ae(f);
2602
- return;
2603
- }
2604
- if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? ae("dark") : ae("light")), typeof window > "u") return;
2605
- let k = window.matchMedia("(prefers-color-scheme: dark)");
2606
- try {
2607
- k.addEventListener("change", ({ matches: N }) => {
2608
- ae(N ? "dark" : "light");
2609
- });
2610
- } catch {
2611
- k.addListener(({ matches: C }) => {
2612
- try {
2613
- ae(C ? "dark" : "light");
2614
- } catch (j) {
2615
- console.error(j);
2616
- }
2617
- });
2618
- }
2619
- }, [f]), p.useEffect(() => {
2620
- x.length <= 1 && ee(!1);
2621
- }, [x]), p.useEffect(() => {
2622
- let k = (N) => {
2623
- var C, j;
2624
- o.every((pe) => N[pe] || N.code === pe) && (ee(!0), (C = te.current) == null || C.focus()), N.code === "Escape" && (document.activeElement === te.current || (j = te.current) != null && j.contains(document.activeElement)) && ee(!1);
2625
- };
2626
- return document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
2627
- }, [o]), p.useEffect(() => {
2628
- if (te.current) return () => {
2629
- E.current && (E.current.focus({ preventScroll: !0 }), E.current = null, q.current = !1);
2630
- };
2631
- }, [te.current]), p.createElement("section", { ref: t, "aria-label": `${D} ${Ie}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, F.map((k, N) => {
2632
- var C;
2633
- let [j, pe] = k.split("-");
2634
- return x.length ? p.createElement("ol", { key: k, dir: m === "auto" ? cn() : m, tabIndex: -1, ref: te, className: i, "data-sonner-toaster": !0, "data-theme": Be, "data-y-position": j, "data-lifted": Me && x.length > 1 && !s, "data-x-position": pe, style: { "--front-toast-height": `${((C = Q[0]) == null ? void 0 : C.height) || 0}px`, "--width": `${Cs}px`, "--gap": `${S}px`, ...l, ...Fs(d, u) }, onBlur: (P) => {
2635
- q.current && !P.currentTarget.contains(P.relatedTarget) && (q.current = !1, E.current && (E.current.focus({ preventScroll: !0 }), E.current = null));
2636
- }, onFocus: (P) => {
2637
- P.target instanceof HTMLElement && P.target.dataset.dismissible === "false" || q.current || (q.current = !0, E.current = P.relatedTarget);
2638
- }, onMouseEnter: () => ee(!0), onMouseMove: () => ee(!0), onMouseLeave: () => {
2639
- Pe || ee(!1);
2640
- }, onDragEnd: () => ee(!1), onPointerDown: (P) => {
2641
- P.target instanceof HTMLElement && P.target.dataset.dismissible === "false" || fe(!0);
2642
- }, onPointerUp: () => fe(!1) }, x.filter((P) => !P.position && N === 0 || P.position === k).map((P, rt) => {
2643
- var xe, De;
2644
- return p.createElement(Ds, { key: P.id, icons: R, index: rt, toast: P, defaultRichColors: h, duration: (xe = g == null ? void 0 : g.duration) != null ? xe : y, className: g == null ? void 0 : g.className, descriptionClassName: g == null ? void 0 : g.descriptionClassName, invert: n, visibleToasts: w, closeButton: (De = g == null ? void 0 : g.closeButton) != null ? De : a, interacting: Pe, position: k, style: g == null ? void 0 : g.style, unstyled: g == null ? void 0 : g.unstyled, classNames: g == null ? void 0 : g.classNames, cancelButtonStyle: g == null ? void 0 : g.cancelButtonStyle, actionButtonStyle: g == null ? void 0 : g.actionButtonStyle, removeToast: nt, toasts: x.filter((Ee) => Ee.position == P.position), heights: Q.filter((Ee) => Ee.position == P.position), setHeights: tt, expandByDefault: s, gap: S, loadingIcon: T, expanded: Me, pauseWhenPageIsHidden: _, swipeDirections: e.swipeDirections });
2645
- })) : null;
2646
- }));
2647
- });
2648
- function ya() {
2649
- return { toast: async ({
2650
- id: t,
2651
- title: n,
2652
- description: r,
2653
- action: o = {
2654
- label: "",
2655
- onClick: () => {
2656
- }
2657
- },
2658
- ...s
2659
- }) => {
2660
- const a = { description: r };
2661
- o.label && (a.action = { label: o.label, onClick: o.onClick }), As(n, a);
2662
- } };
2663
- }
2664
3400
  export {
2665
- as as GetDevice,
2666
- W as Vdevice,
2667
- fa as startAxios,
2668
- wa as startStore,
2669
- pa as useAxios,
2670
- Us as useBoolean,
2671
- $s as useDocumentTitle,
2672
- Oe as useEventListener,
2673
- qs as useLocalStorage,
2674
- se as useLogger,
2675
- Ws as useMap,
2676
- ha as useMarkdown,
2677
- zs as useMediaQuery,
2678
- Js as useOnClickOutside,
2679
- ma as useScrollTo,
2680
- ga as useShortcut,
2681
- ds as useStore,
2682
- ya as useToast,
2683
- un as useUnmount,
2684
- Vs as useWindowSize
3401
+ Ia as GetDevice,
3402
+ Q as Vdevice,
3403
+ Ci as defineAxios,
3404
+ Ii as defineStore,
3405
+ ki as useAxios,
3406
+ Vo as useBoolean,
3407
+ za as useClickAnyWhere,
3408
+ Va as useCopyToClipboard,
3409
+ qa as useCountdown,
3410
+ qo as useCounter,
3411
+ Wa as useDarkMode,
3412
+ Ut as useDebounceCallback,
3413
+ Ka as useDebounceValue,
3414
+ Ya as useDocumentTitle,
3415
+ Ja as useEffect,
3416
+ et as useEventCallback,
3417
+ G as useEventListener,
3418
+ Ga as useHover,
3419
+ Xa as useIntersectionObserver,
3420
+ Wo as useInterval,
3421
+ Qa as useIsClient,
3422
+ Go as useIsFirstRender,
3423
+ Xo as useIsMounted,
3424
+ re as useIsomorphicLayoutEffect,
3425
+ An as useLocalStorage,
3426
+ j as useLogger,
3427
+ Za as useMap,
3428
+ Li as useMarkdown,
3429
+ Cn as useMediaQuery,
3430
+ ei as useOnClickOutside,
3431
+ ti as useReadLocalStorage,
3432
+ ni as useResizeObserver,
3433
+ ri as useScreen,
3434
+ oi as useScript,
3435
+ si as useScrollLock,
3436
+ Di as useScrollTo,
3437
+ ai as useSessionStorage,
3438
+ Mi as useShortcut,
3439
+ ii as useStep,
3440
+ ja as useStore,
3441
+ li as useTernaryDarkMode,
3442
+ ci as useTimeout,
3443
+ _o as useToast,
3444
+ ui as useToggle,
3445
+ kn as useUnmount,
3446
+ di as useWindowSize
2685
3447
  };