@vezham/hooks 0.0.4 → 0.0.5

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,17 +1,328 @@
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 p, { forwardRef as Zn, isValidElement as ct, useState as _e, useCallback as V, useRef as be, useLayoutEffect as er, useEffect as ve, useMemo as tr } from "react";
2
+ import nr from "react-dom";
3
+ const rr = process.env.NODE_ENV !== "production";
4
+ process.env.NODE_ENV;
5
+ process.env.NODE_ENV;
6
+ const Oe = "v0xapp", or = () => (/* @__PURE__ */ new Date()).toISOString(), He = (e, t, n) => `[vezham] [${or()}] [${e}] [${t}] ${n}`, ut = () => !rr, z = {
7
+ log: (e = Oe, t, n) => {
8
+ console.log(
9
+ He("LOG", e, t),
10
+ n || ""
11
+ );
12
+ },
13
+ debug: (e = Oe, t, n) => {
14
+ },
15
+ info: (e = Oe, t, n) => {
16
+ ut() || console.info(
17
+ He("INFO", e, t),
18
+ n || ""
19
+ );
20
+ },
21
+ warn: (e = Oe, t, n) => {
22
+ ut() || console.warn(
23
+ He("WARN", e, t),
24
+ n || ""
25
+ );
26
+ },
27
+ error: (e = Oe, t, n) => {
28
+ ut() || console.error(
29
+ He("ERROR", e, t),
30
+ n || ""
31
+ );
32
+ }
33
+ // trace: (namespace = APP_NAME, message: string, object?: any) => {
34
+ // if (strictLog()) return
35
+ // let log_msg = getLoggerMessage(logs_type.Trace, namespace, message);
36
+ // if (!(object instanceof Error)) console.trace(log_msg, object);
37
+ // else console.trace(log_msg, object)
38
+ // }
39
+ };
40
+ var sr = (e) => {
41
+ switch (e) {
42
+ case "success":
43
+ return lr;
44
+ case "info":
45
+ return ur;
46
+ case "warning":
47
+ return cr;
48
+ case "error":
49
+ return dr;
50
+ default:
51
+ return null;
52
+ }
53
+ }, ar = Array(12).fill(0), ir = ({ visible: e, className: t }) => p.createElement("div", { className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "), "data-visible": e }, p.createElement("div", { className: "sonner-spinner" }, ar.map((n, r) => p.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${r}` })))), lr = 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" })), cr = 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" })), ur = 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" })), dr = 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" })), fr = 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" })), pr = () => {
54
+ let [e, t] = p.useState(document.hidden);
55
+ return p.useEffect(() => {
56
+ let n = () => {
57
+ t(document.hidden);
58
+ };
59
+ return document.addEventListener("visibilitychange", n), () => window.removeEventListener("visibilitychange", n);
60
+ }, []), e;
61
+ }, yt = 1, hr = class {
62
+ constructor() {
63
+ this.subscribe = (e) => (this.subscribers.push(e), () => {
64
+ let t = this.subscribers.indexOf(e);
65
+ this.subscribers.splice(t, 1);
66
+ }), this.publish = (e) => {
67
+ this.subscribers.forEach((t) => t(e));
68
+ }, this.addToast = (e) => {
69
+ this.publish(e), this.toasts = [...this.toasts, e];
70
+ }, this.create = (e) => {
71
+ var t;
72
+ 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 : yt++, s = this.toasts.find((i) => i.id === o), a = e.dismissible === void 0 ? !0 : e.dismissible;
73
+ 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;
74
+ }, this.dismiss = (e) => (this.dismissedToasts.add(e), e || this.toasts.forEach((t) => {
75
+ this.subscribers.forEach((n) => n({ id: t.id, dismiss: !0 }));
76
+ }), 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) => {
77
+ if (!t) return;
78
+ let n;
79
+ t.loading !== void 0 && (n = this.create({ ...t, promise: e, type: "loading", message: t.loading, description: typeof t.description != "function" ? t.description : void 0 }));
80
+ let r = e instanceof Promise ? e : e(), o = n !== void 0, s, a = r.then(async (d) => {
81
+ if (s = ["resolve", d], p.isValidElement(d)) o = !1, this.create({ id: n, type: "default", message: d });
82
+ else if (gr(d) && !d.ok) {
83
+ o = !1;
84
+ 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;
85
+ this.create({ id: n, type: "error", message: u, description: f });
86
+ } else if (t.success !== void 0) {
87
+ o = !1;
88
+ let u = typeof t.success == "function" ? await t.success(d) : t.success, f = typeof t.description == "function" ? await t.description(d) : t.description;
89
+ this.create({ id: n, type: "success", message: u, description: f });
90
+ }
91
+ }).catch(async (d) => {
92
+ if (s = ["reject", d], t.error !== void 0) {
93
+ o = !1;
94
+ let u = typeof t.error == "function" ? await t.error(d) : t.error, f = typeof t.description == "function" ? await t.description(d) : t.description;
95
+ this.create({ id: n, type: "error", message: u, description: f });
96
+ }
97
+ }).finally(() => {
98
+ var d;
99
+ o && (this.dismiss(n), n = void 0), (d = t.finally) == null || d.call(t);
100
+ }), i = () => new Promise((d, u) => a.then(() => s[0] === "reject" ? u(s[1]) : d(s[1])).catch(u));
101
+ return typeof n != "string" && typeof n != "number" ? { unwrap: i } : Object.assign(n, { unwrap: i });
102
+ }, this.custom = (e, t) => {
103
+ let n = (t == null ? void 0 : t.id) || yt++;
104
+ return this.create({ jsx: e(n), id: n, ...t }), n;
105
+ }, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
106
+ }
107
+ }, H = new hr(), mr = (e, t) => {
108
+ let n = (t == null ? void 0 : t.id) || yt++;
109
+ return H.addToast({ title: e, ...t, id: n }), n;
110
+ }, gr = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", wr = mr, yr = () => H.toasts, br = () => H.getActiveToasts(), vr = Object.assign(wr, { 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: yr, getToasts: br });
111
+ function xr(e, { insertAt: t } = {}) {
112
+ if (typeof document > "u") return;
113
+ let n = document.head || document.getElementsByTagName("head")[0], r = document.createElement("style");
114
+ 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));
115
+ }
116
+ xr(`: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%)}
117
+ `);
118
+ function Ue(e) {
119
+ return e.label !== void 0;
120
+ }
121
+ var Er = 3, Sr = "32px", Tr = "16px", jt = 4e3, Rr = 356, Or = 14, Ar = 20, kr = 200;
122
+ function G(...e) {
123
+ return e.filter(Boolean).join(" ");
124
+ }
125
+ function Nr(e) {
126
+ let [t, n] = e.split("-"), r = [];
127
+ return t && r.push(t), n && r.push(n), r;
128
+ }
129
+ var Lr = (e) => {
130
+ var t, n, r, o, s, a, i, d, u, f, h;
131
+ let { invert: y, toast: l, unstyled: w, interacting: g, setHeights: m, visibleToasts: S, heights: T, index: R, toasts: D, expanded: L, removeToast: x, defaultRichColors: M, closeButton: F, style: Z, cancelButtonStyle: nt, actionButtonStyle: Pe, className: te = "", descriptionClassName: Be = "", duration: fe, position: Ie, gap: ae, loadingIcon: ne, expandByDefault: De, classNames: E, icons: q, closeButtonAriaLabel: rt = "Close toast", pauseWhenPageIsHidden: k } = e, [N, C] = p.useState(null), [j, pe] = p.useState(null), [P, ot] = p.useState(!1), [Se, Fe] = p.useState(!1), [Te, st] = p.useState(!1), [_t, Hn] = p.useState(!1), [Un, Ct] = p.useState(!1), [qn, at] = p.useState(0), [zn, Mt] = p.useState(0), Re = p.useRef(l.duration || fe || jt), Pt = p.useRef(null), ie = p.useRef(null), $n = R === 0, Wn = R + 1 <= S, W = l.type, he = l.dismissible !== !1, Jn = l.className || "", Vn = l.descriptionClassName || "", je = p.useMemo(() => T.findIndex((b) => b.toastId === l.id) || 0, [T, l.id]), Kn = p.useMemo(() => {
132
+ var b;
133
+ return (b = l.closeButton) != null ? b : F;
134
+ }, [l.closeButton, F]), Bt = p.useMemo(() => l.duration || fe || jt, [l.duration, fe]), it = p.useRef(0), me = p.useRef(0), It = p.useRef(0), ge = p.useRef(null), [Yn, Xn] = Ie.split("-"), Dt = p.useMemo(() => T.reduce((b, O, _) => _ >= je ? b : b + O.height, 0), [T, je]), Ft = pr(), Gn = l.invert || y, lt = W === "loading";
135
+ me.current = p.useMemo(() => je * ae + Dt, [je, Dt]), p.useEffect(() => {
136
+ Re.current = Bt;
137
+ }, [Bt]), p.useEffect(() => {
138
+ ot(!0);
139
+ }, []), p.useEffect(() => {
140
+ let b = ie.current;
141
+ if (b) {
142
+ let O = b.getBoundingClientRect().height;
143
+ return Mt(O), m((_) => [{ toastId: l.id, height: O, position: l.position }, ..._]), () => m((_) => _.filter((K) => K.toastId !== l.id));
144
+ }
145
+ }, [m, l.id]), p.useLayoutEffect(() => {
146
+ if (!P) return;
147
+ let b = ie.current, O = b.style.height;
148
+ b.style.height = "auto";
149
+ let _ = b.getBoundingClientRect().height;
150
+ b.style.height = O, Mt(_), m((K) => K.find((Y) => Y.toastId === l.id) ? K.map((Y) => Y.toastId === l.id ? { ...Y, height: _ } : Y) : [{ toastId: l.id, height: _, position: l.position }, ...K]);
151
+ }, [P, l.title, l.description, m, l.id]);
152
+ let re = p.useCallback(() => {
153
+ Fe(!0), at(me.current), m((b) => b.filter((O) => O.toastId !== l.id)), setTimeout(() => {
154
+ x(l);
155
+ }, kr);
156
+ }, [l, x, m, me]);
157
+ p.useEffect(() => {
158
+ if (l.promise && W === "loading" || l.duration === 1 / 0 || l.type === "loading") return;
159
+ let b;
160
+ return L || g || k && Ft ? (() => {
161
+ if (It.current < it.current) {
162
+ let O = (/* @__PURE__ */ new Date()).getTime() - it.current;
163
+ Re.current = Re.current - O;
164
+ }
165
+ It.current = (/* @__PURE__ */ new Date()).getTime();
166
+ })() : Re.current !== 1 / 0 && (it.current = (/* @__PURE__ */ new Date()).getTime(), b = setTimeout(() => {
167
+ var O;
168
+ (O = l.onAutoClose) == null || O.call(l, l), re();
169
+ }, Re.current)), () => clearTimeout(b);
170
+ }, [L, g, l, W, k, Ft, re]), p.useEffect(() => {
171
+ l.delete && re();
172
+ }, [re, l.delete]);
173
+ function Qn() {
174
+ var b, O, _;
175
+ return q != null && q.loading ? p.createElement("div", { className: G(E == null ? void 0 : E.loader, (b = l == null ? void 0 : l.classNames) == null ? void 0 : b.loader, "sonner-loader"), "data-visible": W === "loading" }, q.loading) : ne ? p.createElement("div", { className: G(E == null ? void 0 : E.loader, (O = l == null ? void 0 : l.classNames) == null ? void 0 : O.loader, "sonner-loader"), "data-visible": W === "loading" }, ne) : p.createElement(ir, { className: G(E == null ? void 0 : E.loader, (_ = l == null ? void 0 : l.classNames) == null ? void 0 : _.loader), visible: W === "loading" });
176
+ }
177
+ return p.createElement("li", { tabIndex: 0, ref: ie, className: G(te, Jn, 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[W], (n = l == null ? void 0 : l.classNames) == null ? void 0 : n[W]), "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": Un, "data-removed": Se, "data-visible": Wn, "data-y-position": Yn, "data-x-position": Xn, "data-index": R, "data-front": $n, "data-swiping": Te, "data-dismissible": he, "data-type": W, "data-invert": Gn, "data-swipe-out": _t, "data-swipe-direction": j, "data-expanded": !!(L || De && P), style: { "--index": R, "--toasts-before": R, "--z-index": D.length - R, "--offset": `${Se ? qn : me.current}px`, "--initial-height": De ? "auto" : `${zn}px`, ...Z, ...l.style }, onDragEnd: () => {
178
+ st(!1), C(null), ge.current = null;
179
+ }, onPointerDown: (b) => {
180
+ lt || !he || (Pt.current = /* @__PURE__ */ new Date(), at(me.current), b.target.setPointerCapture(b.pointerId), b.target.tagName !== "BUTTON" && (st(!0), ge.current = { x: b.clientX, y: b.clientY }));
181
+ }, onPointerUp: () => {
182
+ var b, O, _, K;
183
+ if (_t || !he) return;
184
+ ge.current = null;
185
+ let Y = Number(((b = ie.current) == null ? void 0 : b.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), oe = Number(((O = ie.current) == null ? void 0 : O.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), le = (/* @__PURE__ */ new Date()).getTime() - ((_ = Pt.current) == null ? void 0 : _.getTime()), X = N === "x" ? Y : oe, se = Math.abs(X) / le;
186
+ if (Math.abs(X) >= Ar || se > 0.11) {
187
+ at(me.current), (K = l.onDismiss) == null || K.call(l, l), pe(N === "x" ? Y > 0 ? "right" : "left" : oe > 0 ? "down" : "up"), re(), Hn(!0), Ct(!1);
188
+ return;
189
+ }
190
+ st(!1), C(null);
191
+ }, onPointerMove: (b) => {
192
+ var O, _, K, Y;
193
+ if (!ge.current || !he || ((O = window.getSelection()) == null ? void 0 : O.toString().length) > 0) return;
194
+ let oe = b.clientY - ge.current.y, le = b.clientX - ge.current.x, X = (_ = e.swipeDirections) != null ? _ : Nr(Ie);
195
+ !N && (Math.abs(le) > 1 || Math.abs(oe) > 1) && C(Math.abs(le) > Math.abs(oe) ? "x" : "y");
196
+ let se = { x: 0, y: 0 };
197
+ N === "y" ? (X.includes("top") || X.includes("bottom")) && (X.includes("top") && oe < 0 || X.includes("bottom") && oe > 0) && (se.y = oe) : N === "x" && (X.includes("left") || X.includes("right")) && (X.includes("left") && le < 0 || X.includes("right") && le > 0) && (se.x = le), (Math.abs(se.x) > 0 || Math.abs(se.y) > 0) && Ct(!0), (K = ie.current) == null || K.style.setProperty("--swipe-amount-x", `${se.x}px`), (Y = ie.current) == null || Y.style.setProperty("--swipe-amount-y", `${se.y}px`);
198
+ } }, Kn && !l.jsx ? p.createElement("button", { "aria-label": rt, "data-disabled": lt, "data-close-button": !0, onClick: lt || !he ? () => {
199
+ } : () => {
200
+ var b;
201
+ re(), (b = l.onDismiss) == null || b.call(l, l);
202
+ }, className: G(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 : fr) : null, l.jsx || ct(l.title) ? l.jsx ? l.jsx : typeof l.title == "function" ? l.title() : l.title : p.createElement(p.Fragment, null, W || l.icon || l.promise ? p.createElement("div", { "data-icon": "", className: G(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 || Qn() : null, l.type !== "loading" ? l.icon || (q == null ? void 0 : q[W]) || sr(W) : null) : null, p.createElement("div", { "data-content": "", className: G(E == null ? void 0 : E.content, (i = l == null ? void 0 : l.classNames) == null ? void 0 : i.content) }, p.createElement("div", { "data-title": "", className: G(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: G(Be, Vn, 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), ct(l.cancel) ? l.cancel : l.cancel && Ue(l.cancel) ? p.createElement("button", { "data-button": !0, "data-cancel": !0, style: l.cancelButtonStyle || nt, onClick: (b) => {
203
+ var O, _;
204
+ Ue(l.cancel) && he && ((_ = (O = l.cancel).onClick) == null || _.call(O, b), re());
205
+ }, className: G(E == null ? void 0 : E.cancelButton, (f = l == null ? void 0 : l.classNames) == null ? void 0 : f.cancelButton) }, l.cancel.label) : null, ct(l.action) ? l.action : l.action && Ue(l.action) ? p.createElement("button", { "data-button": !0, "data-action": !0, style: l.actionButtonStyle || Pe, onClick: (b) => {
206
+ var O, _;
207
+ Ue(l.action) && ((_ = (O = l.action).onClick) == null || _.call(O, b), !b.defaultPrevented && re());
208
+ }, className: G(E == null ? void 0 : E.actionButton, (h = l == null ? void 0 : l.classNames) == null ? void 0 : h.actionButton) }, l.action.label) : null));
209
+ };
210
+ function Ht() {
211
+ if (typeof window > "u" || typeof document > "u") return "ltr";
212
+ let e = document.documentElement.getAttribute("dir");
213
+ return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
214
+ }
215
+ function _r(e, t) {
216
+ let n = {};
217
+ return [e, t].forEach((r, o) => {
218
+ let s = o === 1, a = s ? "--mobile-offset" : "--offset", i = s ? Tr : Sr;
219
+ function d(u) {
220
+ ["top", "right", "bottom", "left"].forEach((f) => {
221
+ n[`${a}-${f}`] = typeof u == "number" ? `${u}px` : u;
222
+ });
223
+ }
224
+ typeof r == "number" || typeof r == "string" ? d(r) : typeof r == "object" ? ["top", "right", "bottom", "left"].forEach((u) => {
225
+ r[u] === void 0 ? n[`${a}-${u}`] = i : n[`${a}-${u}`] = typeof r[u] == "number" ? `${r[u]}px` : r[u];
226
+ }) : d(i);
227
+ }), n;
228
+ }
229
+ Zn(function(e, t) {
230
+ 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 = Er, toastOptions: g, dir: m = Ht(), gap: S = Or, loadingIcon: T, icons: R, containerAriaLabel: D = "Notifications", pauseWhenPageIsHidden: L } = 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]), [Z, nt] = p.useState([]), [Pe, te] = p.useState(!1), [Be, fe] = p.useState(!1), [Ie, ae] = p.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), ne = p.useRef(null), De = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), E = p.useRef(null), q = p.useRef(!1), rt = p.useCallback((k) => {
231
+ M((N) => {
232
+ var C;
233
+ return (C = N.find((j) => j.id === k.id)) != null && C.delete || H.dismiss(k.id), N.filter(({ id: j }) => j !== k.id);
234
+ });
235
+ }, []);
236
+ return p.useEffect(() => H.subscribe((k) => {
237
+ if (k.dismiss) {
238
+ M((N) => N.map((C) => C.id === k.id ? { ...C, delete: !0 } : C));
239
+ return;
240
+ }
241
+ setTimeout(() => {
242
+ nr.flushSync(() => {
243
+ M((N) => {
244
+ let C = N.findIndex((j) => j.id === k.id);
245
+ return C !== -1 ? [...N.slice(0, C), { ...N[C], ...k }, ...N.slice(C + 1)] : [k, ...N];
246
+ });
247
+ });
248
+ });
249
+ }), []), p.useEffect(() => {
250
+ if (f !== "system") {
251
+ ae(f);
252
+ return;
253
+ }
254
+ if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? ae("dark") : ae("light")), typeof window > "u") return;
255
+ let k = window.matchMedia("(prefers-color-scheme: dark)");
256
+ try {
257
+ k.addEventListener("change", ({ matches: N }) => {
258
+ ae(N ? "dark" : "light");
259
+ });
260
+ } catch {
261
+ k.addListener(({ matches: C }) => {
262
+ try {
263
+ ae(C ? "dark" : "light");
264
+ } catch (j) {
265
+ console.error(j);
266
+ }
267
+ });
268
+ }
269
+ }, [f]), p.useEffect(() => {
270
+ x.length <= 1 && te(!1);
271
+ }, [x]), p.useEffect(() => {
272
+ let k = (N) => {
273
+ var C, j;
274
+ o.every((pe) => N[pe] || N.code === pe) && (te(!0), (C = ne.current) == null || C.focus()), N.code === "Escape" && (document.activeElement === ne.current || (j = ne.current) != null && j.contains(document.activeElement)) && te(!1);
275
+ };
276
+ return document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
277
+ }, [o]), p.useEffect(() => {
278
+ if (ne.current) return () => {
279
+ E.current && (E.current.focus({ preventScroll: !0 }), E.current = null, q.current = !1);
280
+ };
281
+ }, [ne.current]), p.createElement("section", { ref: t, "aria-label": `${D} ${De}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, F.map((k, N) => {
282
+ var C;
283
+ let [j, pe] = k.split("-");
284
+ return x.length ? p.createElement("ol", { key: k, dir: m === "auto" ? Ht() : m, tabIndex: -1, ref: ne, className: i, "data-sonner-toaster": !0, "data-theme": Ie, "data-y-position": j, "data-lifted": Pe && x.length > 1 && !s, "data-x-position": pe, style: { "--front-toast-height": `${((C = Z[0]) == null ? void 0 : C.height) || 0}px`, "--width": `${Rr}px`, "--gap": `${S}px`, ...l, ..._r(d, u) }, onBlur: (P) => {
285
+ q.current && !P.currentTarget.contains(P.relatedTarget) && (q.current = !1, E.current && (E.current.focus({ preventScroll: !0 }), E.current = null));
286
+ }, onFocus: (P) => {
287
+ P.target instanceof HTMLElement && P.target.dataset.dismissible === "false" || q.current || (q.current = !0, E.current = P.relatedTarget);
288
+ }, onMouseEnter: () => te(!0), onMouseMove: () => te(!0), onMouseLeave: () => {
289
+ Be || te(!1);
290
+ }, onDragEnd: () => te(!1), onPointerDown: (P) => {
291
+ P.target instanceof HTMLElement && P.target.dataset.dismissible === "false" || fe(!0);
292
+ }, onPointerUp: () => fe(!1) }, x.filter((P) => !P.position && N === 0 || P.position === k).map((P, ot) => {
293
+ var Se, Fe;
294
+ return p.createElement(Lr, { key: P.id, icons: R, index: ot, toast: P, defaultRichColors: h, duration: (Se = g == null ? void 0 : g.duration) != null ? Se : y, className: g == null ? void 0 : g.className, descriptionClassName: g == null ? void 0 : g.descriptionClassName, invert: n, visibleToasts: w, closeButton: (Fe = g == null ? void 0 : g.closeButton) != null ? Fe : a, interacting: Be, 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: rt, toasts: x.filter((Te) => Te.position == P.position), heights: Z.filter((Te) => Te.position == P.position), setHeights: nt, expandByDefault: s, gap: S, loadingIcon: T, expanded: Pe, pauseWhenPageIsHidden: L, swipeDirections: e.swipeDirections });
295
+ })) : null;
296
+ }));
297
+ });
298
+ function zs() {
299
+ return { toast: async ({
300
+ id: t,
301
+ title: n,
302
+ description: r,
303
+ action: o = {
304
+ label: "",
305
+ onClick: () => {
306
+ }
307
+ },
308
+ ...s
309
+ }) => {
310
+ const a = { description: r };
311
+ o.label && (a.action = { label: o.label, onClick: o.onClick }), vr(n, a);
312
+ } };
313
+ }
314
+ var qe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
315
+ function Cr(e) {
5
316
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6
317
  }
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();
318
+ var Mr = "Expected a function", Ut = NaN, Pr = "[object Symbol]", Br = /^\s+|\s+$/g, Ir = /^[-+]0x[0-9a-f]+$/i, Dr = /^0b[01]+$/i, Fr = /^0o[0-7]+$/i, jr = parseInt, Hr = typeof qe == "object" && qe && qe.Object === Object && qe, Ur = typeof self == "object" && self && self.Object === Object && self, qr = Hr || Ur || Function("return this")(), zr = Object.prototype, $r = zr.toString, Wr = Math.max, Jr = Math.min, dt = function() {
319
+ return qr.Date.now();
9
320
  };
10
- function wr(e, t, n) {
321
+ function Vr(e, t, n) {
11
322
  var r, o, s, a, i, d, u = 0, f = !1, h = !1, y = !0;
12
323
  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);
324
+ throw new TypeError(Mr);
325
+ t = qt(t) || 0, bt(n) && (f = !!n.leading, h = "maxWait" in n, s = h ? Wr(qt(n.maxWait) || 0, t) : s, y = "trailing" in n ? !!n.trailing : y);
15
326
  function l(x) {
16
327
  var M = r, F = o;
17
328
  return r = o = void 0, u = x, a = e.apply(F, M), a;
@@ -20,15 +331,15 @@ function wr(e, t, n) {
20
331
  return u = x, i = setTimeout(S, t), f ? l(x) : a;
21
332
  }
22
333
  function g(x) {
23
- var M = x - d, F = x - u, Q = t - M;
24
- return h ? gr(Q, s - F) : Q;
334
+ var M = x - d, F = x - u, Z = t - M;
335
+ return h ? Jr(Z, s - F) : Z;
25
336
  }
26
337
  function m(x) {
27
338
  var M = x - d, F = x - u;
28
339
  return d === void 0 || M >= t || M < 0 || h && F >= s;
29
340
  }
30
341
  function S() {
31
- var x = ct();
342
+ var x = dt();
32
343
  if (m(x))
33
344
  return T(x);
34
345
  i = setTimeout(S, g(x));
@@ -40,10 +351,10 @@ function wr(e, t, n) {
40
351
  i !== void 0 && clearTimeout(i), u = 0, r = d = o = i = void 0;
41
352
  }
42
353
  function D() {
43
- return i === void 0 ? a : T(ct());
354
+ return i === void 0 ? a : T(dt());
44
355
  }
45
- function _() {
46
- var x = ct(), M = m(x);
356
+ function L() {
357
+ var x = dt(), M = m(x);
47
358
  if (r = arguments, o = this, d = x, M) {
48
359
  if (i === void 0)
49
360
  return w(d);
@@ -52,53 +363,53 @@ function wr(e, t, n) {
52
363
  }
53
364
  return i === void 0 && (i = setTimeout(S, t)), a;
54
365
  }
55
- return _.cancel = R, _.flush = D, _;
366
+ return L.cancel = R, L.flush = D, L;
56
367
  }
57
- function wt(e) {
368
+ function bt(e) {
58
369
  var t = typeof e;
59
370
  return !!e && (t == "object" || t == "function");
60
371
  }
61
- function yr(e) {
372
+ function Kr(e) {
62
373
  return !!e && typeof e == "object";
63
374
  }
64
- function br(e) {
65
- return typeof e == "symbol" || yr(e) && hr.call(e) == or;
375
+ function Yr(e) {
376
+ return typeof e == "symbol" || Kr(e) && $r.call(e) == Pr;
66
377
  }
67
- function jt(e) {
378
+ function qt(e) {
68
379
  if (typeof e == "number")
69
380
  return e;
70
- if (br(e))
71
- return Ft;
72
- if (wt(e)) {
381
+ if (Yr(e))
382
+ return Ut;
383
+ if (bt(e)) {
73
384
  var t = typeof e.valueOf == "function" ? e.valueOf() : e;
74
- e = wt(t) ? t + "" : t;
385
+ e = bt(t) ? t + "" : t;
75
386
  }
76
387
  if (typeof e != "string")
77
388
  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;
389
+ e = e.replace(Br, "");
390
+ var n = Dr.test(e);
391
+ return n || Fr.test(e) ? jr(e.slice(2), n ? 2 : 8) : Ir.test(e) ? Ut : +e;
81
392
  }
82
- var vr = wr;
83
- const Ht = /* @__PURE__ */ nr(vr);
84
- function Us(e = !1) {
393
+ var Xr = Vr;
394
+ const zt = /* @__PURE__ */ Cr(Xr);
395
+ function $s(e = !1) {
85
396
  if (typeof e != "boolean")
86
397
  throw new Error("defaultValue must be `true` or `false`");
87
- const [t, n] = ke(e), r = J(() => {
398
+ const [t, n] = _e(e), r = V(() => {
88
399
  n(!0);
89
- }, []), o = J(() => {
400
+ }, []), o = V(() => {
90
401
  n(!1);
91
- }, []), s = J(() => {
402
+ }, []), s = V(() => {
92
403
  n((a) => !a);
93
404
  }, []);
94
405
  return { value: t, setValue: n, setTrue: r, setFalse: o, toggle: s };
95
406
  }
96
- var ye = typeof window < "u" ? Qn : _e;
97
- function Oe(e, t, n, r) {
98
- const o = Ne(t);
407
+ var ye = typeof window < "u" ? er : ve;
408
+ function Ne(e, t, n, r) {
409
+ const o = be(t);
99
410
  ye(() => {
100
411
  o.current = t;
101
- }, [t]), _e(() => {
412
+ }, [t]), ve(() => {
102
413
  const s = (n == null ? void 0 : n.current) ?? window;
103
414
  if (!(s && s.addEventListener))
104
415
  return;
@@ -110,23 +421,23 @@ function Oe(e, t, n, r) {
110
421
  };
111
422
  }, [e, n, r]);
112
423
  }
113
- function Ut(e) {
114
- const t = Ne(() => {
424
+ function $t(e) {
425
+ const t = be(() => {
115
426
  throw new Error("Cannot call an event handler while rendering.");
116
427
  });
117
428
  return ye(() => {
118
429
  t.current = e;
119
- }, [e]), J((...n) => {
430
+ }, [e]), V((...n) => {
120
431
  var r;
121
432
  return (r = t.current) == null ? void 0 : r.call(t, ...n);
122
433
  }, [t]);
123
434
  }
124
- var ut = typeof window > "u";
125
- function qs(e, t, n = {}) {
126
- const { initializeWithValue: r = !0 } = n, o = J(
435
+ var Ae = "useLocalStorage", ft = typeof window > "u";
436
+ function Ws(e, t, n = {}) {
437
+ const { initializeWithValue: r = !0 } = n, o = V(
127
438
  (y) => n.serializer ? n.serializer(y) : JSON.stringify(y),
128
439
  [n]
129
- ), s = J(
440
+ ), s = V(
130
441
  (y) => {
131
442
  if (n.deserializer)
132
443
  return n.deserializer(y);
@@ -137,55 +448,65 @@ function qs(e, t, n = {}) {
137
448
  try {
138
449
  w = JSON.parse(y);
139
450
  } catch (g) {
140
- return console.error("Error parsing JSON:", g), l;
451
+ return z.error(Ae, "Error parsing JSON:", g), l;
141
452
  }
142
453
  return w;
143
454
  },
144
455
  [n, t]
145
- ), a = J(() => {
456
+ ), a = V(() => {
146
457
  const y = t instanceof Function ? t() : t;
147
- if (ut)
458
+ if (ft)
148
459
  return y;
149
460
  try {
150
461
  const l = window.localStorage.getItem(e);
151
462
  return l ? s(l) : y;
152
463
  } catch (l) {
153
- return console.warn(`Error reading localStorage key “${e}”:`, l), y;
464
+ return z.error(
465
+ Ae,
466
+ `Error reading localStorage key “${e}”:`,
467
+ l
468
+ ), y;
154
469
  }
155
- }, [t, e, s]), [i, d] = ke(() => r ? a() : t instanceof Function ? t() : t), u = Ut((y) => {
156
- ut && console.warn(
470
+ }, [t, e, s]), [i, d] = _e(() => r ? a() : t instanceof Function ? t() : t), u = $t((y) => {
471
+ ft && z.warn(
472
+ Ae,
157
473
  `Tried setting localStorage key “${e}” even though environment is not a client`
158
474
  );
159
475
  try {
160
476
  const l = y instanceof Function ? y(a()) : y;
161
477
  window.localStorage.setItem(e, o(l)), d(l), window.dispatchEvent(new StorageEvent("local-storage", { key: e }));
162
478
  } catch (l) {
163
- console.warn(`Error setting localStorage key “${e}”:`, l);
479
+ z.warn(
480
+ Ae,
481
+ `Error setting localStorage key “${e}”:`,
482
+ l
483
+ );
164
484
  }
165
- }), f = Ut(() => {
166
- ut && console.warn(
485
+ }), f = $t(() => {
486
+ ft && z.warn(
487
+ Ae,
167
488
  `Tried removing localStorage key “${e}” even though environment is not a client`
168
489
  );
169
490
  const y = t instanceof Function ? t() : t;
170
491
  window.localStorage.removeItem(e), d(y), window.dispatchEvent(new StorageEvent("local-storage", { key: e }));
171
492
  });
172
- _e(() => {
493
+ ve(() => {
173
494
  d(a());
174
495
  }, [e]);
175
- const h = J(
496
+ const h = V(
176
497
  (y) => {
177
498
  y.key && y.key !== e || d(a());
178
499
  },
179
500
  [e, a]
180
501
  );
181
- return Oe("storage", h), Oe("local-storage", h), [i, u, f];
502
+ return Ne("storage", h), Ne("local-storage", h), [i, u, f];
182
503
  }
183
- var xr = typeof window > "u";
184
- function zs(e, {
504
+ var Gr = typeof window > "u";
505
+ function Js(e, {
185
506
  defaultValue: t = !1,
186
507
  initializeWithValue: n = !0
187
508
  } = {}) {
188
- const r = (i) => xr ? t : window.matchMedia(i).matches, [o, s] = ke(() => n ? r(e) : t);
509
+ const r = (i) => Gr ? t : window.matchMedia(i).matches, [o, s] = _e(() => n ? r(e) : t);
189
510
  function a() {
190
511
  s(r(e));
191
512
  }
@@ -196,65 +517,76 @@ function zs(e, {
196
517
  };
197
518
  }, [e]), o;
198
519
  }
199
- function un(e) {
200
- const t = Ne(e);
201
- t.current = e, _e(
520
+ function dn(e) {
521
+ const t = be(e);
522
+ t.current = e, ve(
202
523
  () => () => {
203
524
  t.current();
204
525
  },
205
526
  []
206
527
  );
207
528
  }
208
- function Er(e, t = 500, n) {
209
- const r = Ne();
210
- un(() => {
529
+ function Qr(e, t = 500, n) {
530
+ const r = be();
531
+ dn(() => {
211
532
  r.current && r.current.cancel();
212
533
  });
213
- const o = Zn(() => {
214
- const s = Ht(e, t, n), a = (...i) => s(...i);
534
+ const o = tr(() => {
535
+ const s = zt(e, t, n), a = (...i) => s(...i);
215
536
  return a.cancel = () => {
216
537
  s.cancel();
217
538
  }, a.isPending = () => !!r.current, a.flush = () => s.flush(), a;
218
539
  }, [e, t, n]);
219
- return _e(() => {
220
- r.current = Ht(e, t, n);
540
+ return ve(() => {
541
+ r.current = zt(e, t, n);
221
542
  }, [e, t, n]), o;
222
543
  }
223
- function $s(e, t = {}) {
224
- const { preserveTitleOnUnmount: n = !0 } = t, r = Ne(null);
544
+ function Vs(e, t = {}) {
545
+ const { preserveTitleOnUnmount: n = !0 } = t, r = be(null);
225
546
  ye(() => {
226
547
  r.current = window.document.title;
227
548
  }, []), ye(() => {
228
549
  window.document.title = e;
229
- }, [e]), un(() => {
550
+ }, [e]), dn(() => {
230
551
  !n && r.current && (window.document.title = r.current);
231
552
  });
232
553
  }
233
- function Ws(e = /* @__PURE__ */ new Map()) {
234
- const [t, n] = ke(new Map(e)), r = {
235
- set: J((o, s) => {
554
+ function Zr() {
555
+ const e = be(!0);
556
+ return e.current ? (e.current = !1, !0) : e.current;
557
+ }
558
+ function Ks(e, t) {
559
+ const n = Zr();
560
+ ve(() => {
561
+ if (!n)
562
+ return e();
563
+ }, t);
564
+ }
565
+ function Ys(e = /* @__PURE__ */ new Map()) {
566
+ const [t, n] = _e(new Map(e)), r = {
567
+ set: V((o, s) => {
236
568
  n((a) => {
237
569
  const i = new Map(a);
238
570
  return i.set(o, s), i;
239
571
  });
240
572
  }, []),
241
- setAll: J((o) => {
573
+ setAll: V((o) => {
242
574
  n(() => new Map(o));
243
575
  }, []),
244
- remove: J((o) => {
576
+ remove: V((o) => {
245
577
  n((s) => {
246
578
  const a = new Map(s);
247
579
  return a.delete(o), a;
248
580
  });
249
581
  }, []),
250
- reset: J(() => {
582
+ reset: V(() => {
251
583
  n(() => /* @__PURE__ */ new Map());
252
584
  }, [])
253
585
  };
254
586
  return [t, r];
255
587
  }
256
- function Js(e, t, n = "mousedown", r = {}) {
257
- Oe(
588
+ function Xs(e, t, n = "mousedown", r = {}) {
589
+ Ne(
258
590
  n,
259
591
  (o) => {
260
592
  const s = o.target;
@@ -266,17 +598,17 @@ function Js(e, t, n = "mousedown", r = {}) {
266
598
  r
267
599
  );
268
600
  }
269
- var Sr = typeof window > "u";
270
- function Vs(e = {}) {
601
+ var eo = typeof window > "u";
602
+ function Gs(e = {}) {
271
603
  let { initializeWithValue: t = !0 } = e;
272
- Sr && (t = !1);
273
- const [n, r] = ke(() => t ? {
604
+ eo && (t = !1);
605
+ const [n, r] = _e(() => t ? {
274
606
  width: window.innerWidth,
275
607
  height: window.innerHeight
276
608
  } : {
277
609
  width: void 0,
278
610
  height: void 0
279
- }), o = Er(
611
+ }), o = Qr(
280
612
  r,
281
613
  e.debounceDelay
282
614
  );
@@ -286,42 +618,42 @@ function Vs(e = {}) {
286
618
  height: window.innerHeight
287
619
  });
288
620
  }
289
- return Oe("resize", s), ye(() => {
621
+ return Ne("resize", s), ye(() => {
290
622
  s();
291
623
  }, []), n;
292
624
  }
293
- function dn(e, t) {
625
+ function fn(e, t) {
294
626
  return function() {
295
627
  return e.apply(t, arguments);
296
628
  };
297
629
  }
298
- const { toString: Tr } = Object.prototype, { getPrototypeOf: At } = Object, Ye = /* @__PURE__ */ ((e) => (t) => {
299
- const n = Tr.call(t);
630
+ const { toString: to } = Object.prototype, { getPrototypeOf: kt } = Object, Xe = /* @__PURE__ */ ((e) => (t) => {
631
+ const n = to.call(t);
300
632
  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);
633
+ })(/* @__PURE__ */ Object.create(null)), Q = (e) => (e = e.toLowerCase(), (t) => Xe(t) === e), Ge = (e) => (t) => typeof t === e, { isArray: xe } = Array, Le = Ge("undefined");
634
+ function no(e) {
635
+ return e !== null && !Le(e) && e.constructor !== null && !Le(e.constructor) && $(e.constructor.isBuffer) && e.constructor.isBuffer(e);
304
636
  }
305
- const fn = G("ArrayBuffer");
306
- function Or(e) {
637
+ const pn = Q("ArrayBuffer");
638
+ function ro(e) {
307
639
  let t;
308
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && fn(e.buffer), t;
640
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && pn(e.buffer), t;
309
641
  }
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")
642
+ const oo = Ge("string"), $ = Ge("function"), hn = Ge("number"), Qe = (e) => e !== null && typeof e == "object", so = (e) => e === !0 || e === !1, We = (e) => {
643
+ if (Xe(e) !== "object")
312
644
  return !1;
313
- const t = At(e);
645
+ const t = kt(e);
314
646
  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) => {
647
+ }, ao = Q("Date"), io = Q("File"), lo = Q("Blob"), co = Q("FileList"), uo = (e) => Qe(e) && $(e.pipe), fo = (e) => {
316
648
  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 } = {}) {
649
+ return e && (typeof FormData == "function" && e instanceof FormData || $(e.append) && ((t = Xe(e)) === "formdata" || // detect form-data instance
650
+ t === "object" && $(e.toString) && e.toString() === "[object FormData]"));
651
+ }, po = Q("URLSearchParams"), [ho, mo, go, wo] = ["ReadableStream", "Request", "Response", "Headers"].map(Q), yo = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
652
+ function Ce(e, t, { allOwnKeys: n = !1 } = {}) {
321
653
  if (e === null || typeof e > "u")
322
654
  return;
323
655
  let r, o;
324
- if (typeof e != "object" && (e = [e]), be(e))
656
+ if (typeof e != "object" && (e = [e]), xe(e))
325
657
  for (r = 0, o = e.length; r < o; r++)
326
658
  t.call(null, e[r], r, e);
327
659
  else {
@@ -331,7 +663,7 @@ function Le(e, t, { allOwnKeys: n = !1 } = {}) {
331
663
  i = s[r], t.call(null, e[i], i, e);
332
664
  }
333
665
  }
334
- function hn(e, t) {
666
+ function mn(e, t) {
335
667
  t = t.toLowerCase();
336
668
  const n = Object.keys(e);
337
669
  let r = n.length, o;
@@ -340,75 +672,75 @@ function hn(e, t) {
340
672
  return o;
341
673
  return null;
342
674
  }
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;
675
+ const ce = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, gn = (e) => !Le(e) && e !== ce;
676
+ function vt() {
677
+ const { caseless: e } = gn(this) && this || {}, t = {}, n = (r, o) => {
678
+ const s = e && mn(t, o) || o;
679
+ We(t[s]) && We(r) ? t[s] = vt(t[s], r) : We(r) ? t[s] = vt({}, r) : xe(r) ? t[s] = r.slice() : t[s] = r;
348
680
  };
349
681
  for (let r = 0, o = arguments.length; r < o; r++)
350
- arguments[r] && Le(arguments[r], n);
682
+ arguments[r] && Ce(arguments[r], n);
351
683
  return t;
352
684
  }
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) => {
685
+ const bo = (e, t, n, { allOwnKeys: r } = {}) => (Ce(t, (o, s) => {
686
+ n && $(o) ? e[s] = fn(o, n) : e[s] = o;
687
+ }, { allOwnKeys: r }), e), vo = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), xo = (e, t, n, r) => {
356
688
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
357
689
  value: t.prototype
358
690
  }), n && Object.assign(e.prototype, n);
359
- }, $r = (e, t, n, r) => {
691
+ }, Eo = (e, t, n, r) => {
360
692
  let o, s, a;
361
693
  const i = {};
362
694
  if (t = t || {}, e == null) return t;
363
695
  do {
364
696
  for (o = Object.getOwnPropertyNames(e), s = o.length; s-- > 0; )
365
697
  a = o[s], (!r || r(a, e, t)) && !i[a] && (t[a] = e[a], i[a] = !0);
366
- e = n !== !1 && At(e);
698
+ e = n !== !1 && kt(e);
367
699
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
368
700
  return t;
369
- }, Wr = (e, t, n) => {
701
+ }, So = (e, t, n) => {
370
702
  e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
371
703
  const r = e.indexOf(t, n);
372
704
  return r !== -1 && r === n;
373
- }, Jr = (e) => {
705
+ }, To = (e) => {
374
706
  if (!e) return null;
375
- if (be(e)) return e;
707
+ if (xe(e)) return e;
376
708
  let t = e.length;
377
- if (!pn(t)) return null;
709
+ if (!hn(t)) return null;
378
710
  const n = new Array(t);
379
711
  for (; t-- > 0; )
380
712
  n[t] = e[t];
381
713
  return n;
382
- }, Vr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && At(Uint8Array)), Kr = (e, t) => {
714
+ }, Ro = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && kt(Uint8Array)), Oo = (e, t) => {
383
715
  const r = (e && e[Symbol.iterator]).call(e);
384
716
  let o;
385
717
  for (; (o = r.next()) && !o.done; ) {
386
718
  const s = o.value;
387
719
  t.call(e, s[0], s[1]);
388
720
  }
389
- }, Yr = (e, t) => {
721
+ }, Ao = (e, t) => {
390
722
  let n;
391
723
  const r = [];
392
724
  for (; (n = e.exec(t)) !== null; )
393
725
  r.push(n);
394
726
  return r;
395
- }, Xr = G("HTMLFormElement"), Gr = (e) => e.toLowerCase().replace(
727
+ }, ko = Q("HTMLFormElement"), No = (e) => e.toLowerCase().replace(
396
728
  /[-_\s]([a-z\d])(\w*)/g,
397
729
  function(n, r, o) {
398
730
  return r.toUpperCase() + o;
399
731
  }
400
- ), qt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Qr = G("RegExp"), gn = (e, t) => {
732
+ ), Wt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Lo = Q("RegExp"), wn = (e, t) => {
401
733
  const n = Object.getOwnPropertyDescriptors(e), r = {};
402
- Le(n, (o, s) => {
734
+ Ce(n, (o, s) => {
403
735
  let a;
404
736
  (a = t(o, s, e)) !== !1 && (r[s] = a || o);
405
737
  }), Object.defineProperties(e, r);
406
- }, Zr = (e) => {
407
- gn(e, (t, n) => {
408
- if (z(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
738
+ }, _o = (e) => {
739
+ wn(e, (t, n) => {
740
+ if ($(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
409
741
  return !1;
410
742
  const r = e[n];
411
- if (z(r)) {
743
+ if ($(r)) {
412
744
  if (t.enumerable = !1, "writable" in t) {
413
745
  t.writable = !1;
414
746
  return;
@@ -418,111 +750,111 @@ const Ur = (e, t, n, { allOwnKeys: r } = {}) => (Le(t, (o, s) => {
418
750
  });
419
751
  }
420
752
  });
421
- }, eo = (e, t) => {
753
+ }, Co = (e, t) => {
422
754
  const n = {}, r = (o) => {
423
755
  o.forEach((s) => {
424
756
  n[s] = !0;
425
757
  });
426
758
  };
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) => {
759
+ return xe(e) ? r(e) : r(String(e).split(t)), n;
760
+ }, Mo = () => {
761
+ }, Po = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, pt = "abcdefghijklmnopqrstuvwxyz", Jt = "0123456789", yn = {
762
+ DIGIT: Jt,
763
+ ALPHA: pt,
764
+ ALPHA_DIGIT: pt + pt.toUpperCase() + Jt
765
+ }, Bo = (e = 16, t = yn.ALPHA_DIGIT) => {
434
766
  let n = "";
435
767
  const { length: r } = t;
436
768
  for (; e--; )
437
769
  n += t[Math.random() * r | 0];
438
770
  return n;
439
771
  };
440
- function oo(e) {
441
- return !!(e && z(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
772
+ function Io(e) {
773
+ return !!(e && $(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
442
774
  }
443
- const so = (e) => {
775
+ const Do = (e) => {
444
776
  const t = new Array(10), n = (r, o) => {
445
- if (Ge(r)) {
777
+ if (Qe(r)) {
446
778
  if (t.indexOf(r) >= 0)
447
779
  return;
448
780
  if (!("toJSON" in r)) {
449
781
  t[o] = r;
450
- const s = be(r) ? [] : {};
451
- return Le(r, (a, i) => {
782
+ const s = xe(r) ? [] : {};
783
+ return Ce(r, (a, i) => {
452
784
  const d = n(a, o + 1);
453
- !Ae(d) && (s[i] = d);
785
+ !Le(d) && (s[i] = d);
454
786
  }), t[o] = void 0, s;
455
787
  }
456
788
  }
457
789
  return r;
458
790
  };
459
791
  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 }) => {
792
+ }, Fo = Q("AsyncFunction"), jo = (e) => e && (Qe(e) || $(e)) && $(e.then) && $(e.catch), bn = ((e, t) => e ? setImmediate : t ? ((n, r) => (ce.addEventListener("message", ({ source: o, data: s }) => {
461
793
  o === ce && s === n && r.length && r.shift()();
462
794
  }, !1), (o) => {
463
795
  r.push(o), ce.postMessage(n, "*");
464
796
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
465
797
  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,
798
+ $(ce.postMessage)
799
+ ), Ho = typeof queueMicrotask < "u" ? queueMicrotask.bind(ce) : typeof process < "u" && process.nextTick || bn, c = {
800
+ isArray: xe,
801
+ isArrayBuffer: pn,
802
+ isBuffer: no,
803
+ isFormData: fo,
804
+ isArrayBufferView: ro,
805
+ isString: oo,
806
+ isNumber: hn,
807
+ isBoolean: so,
808
+ isObject: Qe,
809
+ isPlainObject: We,
810
+ isReadableStream: ho,
811
+ isRequest: mo,
812
+ isResponse: go,
813
+ isHeaders: wo,
814
+ isUndefined: Le,
815
+ isDate: ao,
816
+ isFile: io,
817
+ isBlob: lo,
818
+ isRegExp: Lo,
819
+ isFunction: $,
820
+ isStream: uo,
821
+ isURLSearchParams: po,
822
+ isTypedArray: Ro,
823
+ isFileList: co,
824
+ forEach: Ce,
825
+ merge: vt,
826
+ extend: bo,
827
+ trim: yo,
828
+ stripBOM: vo,
829
+ inherits: xo,
830
+ toFlatObject: Eo,
831
+ kindOf: Xe,
832
+ kindOfTest: Q,
833
+ endsWith: So,
834
+ toArray: To,
835
+ forEachEntry: Oo,
836
+ matchAll: Ao,
837
+ isHTMLForm: ko,
838
+ hasOwnProperty: Wt,
839
+ hasOwnProp: Wt,
508
840
  // 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,
841
+ reduceDescriptors: wn,
842
+ freezeMethods: _o,
843
+ toObjectSet: Co,
844
+ toCamelCase: No,
845
+ noop: Mo,
846
+ toFiniteNumber: Po,
847
+ findKey: mn,
516
848
  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
849
+ isContextDefined: gn,
850
+ ALPHABET: yn,
851
+ generateString: Bo,
852
+ isSpecCompliantForm: Io,
853
+ toJSONObject: Do,
854
+ isAsyncFn: Fo,
855
+ isThenable: jo,
856
+ setImmediate: bn,
857
+ asap: Ho
526
858
  };
527
859
  function v(e, t, n, r, o) {
528
860
  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);
@@ -548,7 +880,7 @@ c.inherits(v, Error, {
548
880
  };
549
881
  }
550
882
  });
551
- const bn = v.prototype, vn = {};
883
+ const vn = v.prototype, xn = {};
552
884
  [
553
885
  "ERR_BAD_OPTION_VALUE",
554
886
  "ERR_BAD_OPTION",
@@ -564,35 +896,35 @@ const bn = v.prototype, vn = {};
564
896
  "ERR_INVALID_URL"
565
897
  // eslint-disable-next-line func-names
566
898
  ].forEach((e) => {
567
- vn[e] = { value: e };
899
+ xn[e] = { value: e };
568
900
  });
569
- Object.defineProperties(v, vn);
570
- Object.defineProperty(bn, "isAxiosError", { value: !0 });
901
+ Object.defineProperties(v, xn);
902
+ Object.defineProperty(vn, "isAxiosError", { value: !0 });
571
903
  v.from = (e, t, n, r, o, s) => {
572
- const a = Object.create(bn);
904
+ const a = Object.create(vn);
573
905
  return c.toFlatObject(e, a, function(d) {
574
906
  return d !== Error.prototype;
575
907
  }, (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
908
  };
577
- const co = null;
578
- function bt(e) {
909
+ const Uo = null;
910
+ function xt(e) {
579
911
  return c.isPlainObject(e) || c.isArray(e);
580
912
  }
581
- function xn(e) {
913
+ function En(e) {
582
914
  return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
583
915
  }
584
- function $t(e, t, n) {
916
+ function Vt(e, t, n) {
585
917
  return e ? e.concat(t).map(function(o, s) {
586
- return o = xn(o), !n && s ? "[" + o + "]" : o;
918
+ return o = En(o), !n && s ? "[" + o + "]" : o;
587
919
  }).join(n ? "." : "") : t;
588
920
  }
589
- function uo(e) {
590
- return c.isArray(e) && !e.some(bt);
921
+ function qo(e) {
922
+ return c.isArray(e) && !e.some(xt);
591
923
  }
592
- const fo = c.toFlatObject(c, {}, null, function(t) {
924
+ const zo = c.toFlatObject(c, {}, null, function(t) {
593
925
  return /^is[A-Z]/.test(t);
594
926
  });
595
- function Qe(e, t, n) {
927
+ function Ze(e, t, n) {
596
928
  if (!c.isObject(e))
597
929
  throw new TypeError("target must be an object");
598
930
  t = t || new FormData(), n = c.toFlatObject(n, {
@@ -618,21 +950,21 @@ function Qe(e, t, n) {
618
950
  if (w && !m && typeof w == "object") {
619
951
  if (c.endsWith(g, "{}"))
620
952
  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) {
953
+ else if (c.isArray(w) && qo(w) || (c.isFileList(w) || c.endsWith(g, "[]")) && (S = c.toArray(w)))
954
+ return g = En(g), S.forEach(function(R, D) {
623
955
  !(c.isUndefined(R) || R === null) && t.append(
624
956
  // eslint-disable-next-line no-nested-ternary
625
- a === !0 ? $t([g], D, s) : a === null ? g : g + "[]",
957
+ a === !0 ? Vt([g], D, s) : a === null ? g : g + "[]",
626
958
  u(R)
627
959
  );
628
960
  }), !1;
629
961
  }
630
- return bt(w) ? !0 : (t.append($t(m, g, s), u(w)), !1);
962
+ return xt(w) ? !0 : (t.append(Vt(m, g, s), u(w)), !1);
631
963
  }
632
- const h = [], y = Object.assign(fo, {
964
+ const h = [], y = Object.assign(zo, {
633
965
  defaultVisitor: f,
634
966
  convertValue: u,
635
- isVisitable: bt
967
+ isVisitable: xt
636
968
  });
637
969
  function l(w, g) {
638
970
  if (!c.isUndefined(w)) {
@@ -653,7 +985,7 @@ function Qe(e, t, n) {
653
985
  throw new TypeError("data must be an object");
654
986
  return l(e), t;
655
987
  }
656
- function Wt(e) {
988
+ function Kt(e) {
657
989
  const t = {
658
990
  "!": "%21",
659
991
  "'": "%27",
@@ -667,40 +999,40 @@ function Wt(e) {
667
999
  return t[r];
668
1000
  });
669
1001
  }
670
- function kt(e, t) {
671
- this._pairs = [], e && Qe(e, this, t);
1002
+ function Nt(e, t) {
1003
+ this._pairs = [], e && Ze(e, this, t);
672
1004
  }
673
- const En = kt.prototype;
674
- En.append = function(t, n) {
1005
+ const Sn = Nt.prototype;
1006
+ Sn.append = function(t, n) {
675
1007
  this._pairs.push([t, n]);
676
1008
  };
677
- En.toString = function(t) {
1009
+ Sn.toString = function(t) {
678
1010
  const n = t ? function(r) {
679
- return t.call(this, r, Wt);
680
- } : Wt;
1011
+ return t.call(this, r, Kt);
1012
+ } : Kt;
681
1013
  return this._pairs.map(function(o) {
682
1014
  return n(o[0]) + "=" + n(o[1]);
683
1015
  }, "").join("&");
684
1016
  };
685
- function po(e) {
1017
+ function $o(e) {
686
1018
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
687
1019
  }
688
- function Sn(e, t, n) {
1020
+ function Tn(e, t, n) {
689
1021
  if (!t)
690
1022
  return e;
691
- const r = n && n.encode || po;
1023
+ const r = n && n.encode || $o;
692
1024
  c.isFunction(n) && (n = {
693
1025
  serialize: n
694
1026
  });
695
1027
  const o = n && n.serialize;
696
1028
  let s;
697
- if (o ? s = o(t, n) : s = c.isURLSearchParams(t) ? t.toString() : new kt(t, n).toString(r), s) {
1029
+ if (o ? s = o(t, n) : s = c.isURLSearchParams(t) ? t.toString() : new Nt(t, n).toString(r), s) {
698
1030
  const a = e.indexOf("#");
699
1031
  a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
700
1032
  }
701
1033
  return e;
702
1034
  }
703
- class Jt {
1035
+ class Yt {
704
1036
  constructor() {
705
1037
  this.handlers = [];
706
1038
  }
@@ -754,41 +1086,41 @@ class Jt {
754
1086
  });
755
1087
  }
756
1088
  }
757
- const Tn = {
1089
+ const Rn = {
758
1090
  silentJSONParsing: !0,
759
1091
  forcedJSONParsing: !0,
760
1092
  clarifyTimeoutError: !1
761
- }, ho = typeof URLSearchParams < "u" ? URLSearchParams : kt, mo = typeof FormData < "u" ? FormData : null, go = typeof Blob < "u" ? Blob : null, wo = {
1093
+ }, Wo = typeof URLSearchParams < "u" ? URLSearchParams : Nt, Jo = typeof FormData < "u" ? FormData : null, Vo = typeof Blob < "u" ? Blob : null, Ko = {
762
1094
  isBrowser: !0,
763
1095
  classes: {
764
- URLSearchParams: ho,
765
- FormData: mo,
766
- Blob: go
1096
+ URLSearchParams: Wo,
1097
+ FormData: Jo,
1098
+ Blob: Vo
767
1099
  },
768
1100
  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({
1101
+ }, Lt = typeof window < "u" && typeof document < "u", Et = typeof navigator == "object" && navigator || void 0, Yo = Lt && (!Et || ["ReactNative", "NativeScript", "NS"].indexOf(Et.product) < 0), Xo = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
1102
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Go = Lt && window.location.href || "http://localhost", Qo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
771
1103
  __proto__: null,
772
- hasBrowserEnv: Nt,
773
- hasStandardBrowserEnv: yo,
774
- hasStandardBrowserWebWorkerEnv: bo,
775
- navigator: vt,
776
- origin: vo
1104
+ hasBrowserEnv: Lt,
1105
+ hasStandardBrowserEnv: Yo,
1106
+ hasStandardBrowserWebWorkerEnv: Xo,
1107
+ navigator: Et,
1108
+ origin: Go
777
1109
  }, Symbol.toStringTag, { value: "Module" })), I = {
778
- ...xo,
779
- ...wo
1110
+ ...Qo,
1111
+ ...Ko
780
1112
  };
781
- function Eo(e, t) {
782
- return Qe(e, new I.classes.URLSearchParams(), Object.assign({
1113
+ function Zo(e, t) {
1114
+ return Ze(e, new I.classes.URLSearchParams(), Object.assign({
783
1115
  visitor: function(n, r, o, s) {
784
1116
  return I.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
785
1117
  }
786
1118
  }, t));
787
1119
  }
788
- function So(e) {
1120
+ function es(e) {
789
1121
  return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
790
1122
  }
791
- function To(e) {
1123
+ function ts(e) {
792
1124
  const t = {}, n = Object.keys(e);
793
1125
  let r;
794
1126
  const o = n.length;
@@ -797,22 +1129,22 @@ function To(e) {
797
1129
  s = n[r], t[s] = e[s];
798
1130
  return t;
799
1131
  }
800
- function Rn(e) {
1132
+ function On(e) {
801
1133
  function t(n, r, o, s) {
802
1134
  let a = n[s++];
803
1135
  if (a === "__proto__") return !0;
804
1136
  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);
1137
+ 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] = ts(o[a])), !i);
806
1138
  }
807
1139
  if (c.isFormData(e) && c.isFunction(e.entries)) {
808
1140
  const n = {};
809
1141
  return c.forEachEntry(e, (r, o) => {
810
- t(So(r), o, n, 0);
1142
+ t(es(r), o, n, 0);
811
1143
  }), n;
812
1144
  }
813
1145
  return null;
814
1146
  }
815
- function Ro(e, t, n) {
1147
+ function ns(e, t, n) {
816
1148
  if (c.isString(e))
817
1149
  try {
818
1150
  return (t || JSON.parse)(e), c.trim(e);
@@ -822,13 +1154,13 @@ function Ro(e, t, n) {
822
1154
  }
823
1155
  return (n || JSON.stringify)(e);
824
1156
  }
825
- const Ce = {
826
- transitional: Tn,
1157
+ const Me = {
1158
+ transitional: Rn,
827
1159
  adapter: ["xhr", "http", "fetch"],
828
1160
  transformRequest: [function(t, n) {
829
1161
  const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = c.isObject(t);
830
1162
  if (s && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
831
- return o ? JSON.stringify(Rn(t)) : t;
1163
+ return o ? JSON.stringify(On(t)) : t;
832
1164
  if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
833
1165
  return t;
834
1166
  if (c.isArrayBufferView(t))
@@ -838,20 +1170,20 @@ const Ce = {
838
1170
  let i;
839
1171
  if (s) {
840
1172
  if (r.indexOf("application/x-www-form-urlencoded") > -1)
841
- return Eo(t, this.formSerializer).toString();
1173
+ return Zo(t, this.formSerializer).toString();
842
1174
  if ((i = c.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
843
1175
  const d = this.env && this.env.FormData;
844
- return Qe(
1176
+ return Ze(
845
1177
  i ? { "files[]": t } : t,
846
1178
  d && new d(),
847
1179
  this.formSerializer
848
1180
  );
849
1181
  }
850
1182
  }
851
- return s || o ? (n.setContentType("application/json", !1), Ro(t)) : t;
1183
+ return s || o ? (n.setContentType("application/json", !1), ns(t)) : t;
852
1184
  }],
853
1185
  transformResponse: [function(t) {
854
- const n = this.transitional || Ce.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
1186
+ const n = this.transitional || Me.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
855
1187
  if (c.isResponse(t) || c.isReadableStream(t))
856
1188
  return t;
857
1189
  if (t && c.isString(t) && (r && !this.responseType || o)) {
@@ -889,9 +1221,9 @@ const Ce = {
889
1221
  }
890
1222
  };
891
1223
  c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
892
- Ce.headers[e] = {};
1224
+ Me.headers[e] = {};
893
1225
  });
894
- const Oo = c.toObjectSet([
1226
+ const rs = c.toObjectSet([
895
1227
  "age",
896
1228
  "authorization",
897
1229
  "content-length",
@@ -909,29 +1241,29 @@ const Oo = c.toObjectSet([
909
1241
  "referer",
910
1242
  "retry-after",
911
1243
  "user-agent"
912
- ]), Ao = (e) => {
1244
+ ]), os = (e) => {
913
1245
  const t = {};
914
1246
  let n, r, o;
915
1247
  return e && e.split(`
916
1248
  `).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);
1249
+ o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] && rs[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
918
1250
  }), t;
919
- }, Vt = Symbol("internals");
920
- function Te(e) {
1251
+ }, Xt = Symbol("internals");
1252
+ function ke(e) {
921
1253
  return e && String(e).trim().toLowerCase();
922
1254
  }
923
- function We(e) {
924
- return e === !1 || e == null ? e : c.isArray(e) ? e.map(We) : String(e);
1255
+ function Je(e) {
1256
+ return e === !1 || e == null ? e : c.isArray(e) ? e.map(Je) : String(e);
925
1257
  }
926
- function ko(e) {
1258
+ function ss(e) {
927
1259
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
928
1260
  let r;
929
1261
  for (; r = n.exec(e); )
930
1262
  t[r[1]] = r[2];
931
1263
  return t;
932
1264
  }
933
- const No = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
934
- function ft(e, t, n, r, o) {
1265
+ const as = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
1266
+ function ht(e, t, n, r, o) {
935
1267
  if (c.isFunction(r))
936
1268
  return r.call(this, t, n);
937
1269
  if (o && (t = n), !!c.isString(t)) {
@@ -941,10 +1273,10 @@ function ft(e, t, n, r, o) {
941
1273
  return r.test(t);
942
1274
  }
943
1275
  }
944
- function _o(e) {
1276
+ function is(e) {
945
1277
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
946
1278
  }
947
- function Lo(e, t) {
1279
+ function ls(e, t) {
948
1280
  const n = c.toCamelCase(" " + t);
949
1281
  ["get", "set", "has"].forEach((r) => {
950
1282
  Object.defineProperty(e, r + n, {
@@ -962,17 +1294,17 @@ let U = class {
962
1294
  set(t, n, r) {
963
1295
  const o = this;
964
1296
  function s(i, d, u) {
965
- const f = Te(d);
1297
+ const f = ke(d);
966
1298
  if (!f)
967
1299
  throw new Error("header name must be a non-empty string");
968
1300
  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));
1301
+ (!h || o[h] === void 0 || u === !0 || u === void 0 && o[h] !== !1) && (o[h || d] = Je(i));
970
1302
  }
971
1303
  const a = (i, d) => c.forEach(i, (u, f) => s(u, f, d));
972
1304
  if (c.isPlainObject(t) || t instanceof this.constructor)
973
1305
  a(t, n);
974
- else if (c.isString(t) && (t = t.trim()) && !No(t))
975
- a(Ao(t), n);
1306
+ else if (c.isString(t) && (t = t.trim()) && !as(t))
1307
+ a(os(t), n);
976
1308
  else if (c.isHeaders(t))
977
1309
  for (const [i, d] of t.entries())
978
1310
  s(d, i, r);
@@ -981,14 +1313,14 @@ let U = class {
981
1313
  return this;
982
1314
  }
983
1315
  get(t, n) {
984
- if (t = Te(t), t) {
1316
+ if (t = ke(t), t) {
985
1317
  const r = c.findKey(this, t);
986
1318
  if (r) {
987
1319
  const o = this[r];
988
1320
  if (!n)
989
1321
  return o;
990
1322
  if (n === !0)
991
- return ko(o);
1323
+ return ss(o);
992
1324
  if (c.isFunction(n))
993
1325
  return n.call(this, o, r);
994
1326
  if (c.isRegExp(n))
@@ -998,9 +1330,9 @@ let U = class {
998
1330
  }
999
1331
  }
1000
1332
  has(t, n) {
1001
- if (t = Te(t), t) {
1333
+ if (t = ke(t), t) {
1002
1334
  const r = c.findKey(this, t);
1003
- return !!(r && this[r] !== void 0 && (!n || ft(this, this[r], r, n)));
1335
+ return !!(r && this[r] !== void 0 && (!n || ht(this, this[r], r, n)));
1004
1336
  }
1005
1337
  return !1;
1006
1338
  }
@@ -1008,9 +1340,9 @@ let U = class {
1008
1340
  const r = this;
1009
1341
  let o = !1;
1010
1342
  function s(a) {
1011
- if (a = Te(a), a) {
1343
+ if (a = ke(a), a) {
1012
1344
  const i = c.findKey(r, a);
1013
- i && (!n || ft(r, r[i], i, n)) && (delete r[i], o = !0);
1345
+ i && (!n || ht(r, r[i], i, n)) && (delete r[i], o = !0);
1014
1346
  }
1015
1347
  }
1016
1348
  return c.isArray(t) ? t.forEach(s) : s(t), o;
@@ -1020,7 +1352,7 @@ let U = class {
1020
1352
  let r = n.length, o = !1;
1021
1353
  for (; r--; ) {
1022
1354
  const s = n[r];
1023
- (!t || ft(this, this[s], s, t, !0)) && (delete this[s], o = !0);
1355
+ (!t || ht(this, this[s], s, t, !0)) && (delete this[s], o = !0);
1024
1356
  }
1025
1357
  return o;
1026
1358
  }
@@ -1029,11 +1361,11 @@ let U = class {
1029
1361
  return c.forEach(this, (o, s) => {
1030
1362
  const a = c.findKey(r, s);
1031
1363
  if (a) {
1032
- n[a] = We(o), delete n[s];
1364
+ n[a] = Je(o), delete n[s];
1033
1365
  return;
1034
1366
  }
1035
- const i = t ? _o(s) : String(s).trim();
1036
- i !== s && delete n[s], n[i] = We(o), r[i] = !0;
1367
+ const i = t ? is(s) : String(s).trim();
1368
+ i !== s && delete n[s], n[i] = Je(o), r[i] = !0;
1037
1369
  }), this;
1038
1370
  }
1039
1371
  concat(...t) {
@@ -1063,12 +1395,12 @@ let U = class {
1063
1395
  return n.forEach((o) => r.set(o)), r;
1064
1396
  }
1065
1397
  static accessor(t) {
1066
- const r = (this[Vt] = this[Vt] = {
1398
+ const r = (this[Xt] = this[Xt] = {
1067
1399
  accessors: {}
1068
1400
  }).accessors, o = this.prototype;
1069
1401
  function s(a) {
1070
- const i = Te(a);
1071
- r[i] || (Lo(o, a), r[i] = !0);
1402
+ const i = ke(a);
1403
+ r[i] || (ls(o, a), r[i] = !0);
1072
1404
  }
1073
1405
  return c.isArray(t) ? t.forEach(s) : s(t), this;
1074
1406
  }
@@ -1084,23 +1416,23 @@ c.reduceDescriptors(U.prototype, ({ value: e }, t) => {
1084
1416
  };
1085
1417
  });
1086
1418
  c.freezeMethods(U);
1087
- function pt(e, t) {
1088
- const n = this || Ce, r = t || n, o = U.from(r.headers);
1419
+ function mt(e, t) {
1420
+ const n = this || Me, r = t || n, o = U.from(r.headers);
1089
1421
  let s = r.data;
1090
1422
  return c.forEach(e, function(i) {
1091
1423
  s = i.call(n, s, o.normalize(), t ? t.status : void 0);
1092
1424
  }), o.normalize(), s;
1093
1425
  }
1094
- function On(e) {
1426
+ function An(e) {
1095
1427
  return !!(e && e.__CANCEL__);
1096
1428
  }
1097
- function ve(e, t, n) {
1429
+ function Ee(e, t, n) {
1098
1430
  v.call(this, e ?? "canceled", v.ERR_CANCELED, t, n), this.name = "CanceledError";
1099
1431
  }
1100
- c.inherits(ve, v, {
1432
+ c.inherits(Ee, v, {
1101
1433
  __CANCEL__: !0
1102
1434
  });
1103
- function An(e, t, n) {
1435
+ function kn(e, t, n) {
1104
1436
  const r = n.config.validateStatus;
1105
1437
  !n.status || !r || r(n.status) ? e(n) : t(new v(
1106
1438
  "Request failed with status code " + n.status,
@@ -1110,11 +1442,11 @@ function An(e, t, n) {
1110
1442
  n
1111
1443
  ));
1112
1444
  }
1113
- function Co(e) {
1445
+ function cs(e) {
1114
1446
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
1115
1447
  return t && t[1] || "";
1116
1448
  }
1117
- function Mo(e, t) {
1449
+ function us(e, t) {
1118
1450
  e = e || 10;
1119
1451
  const n = new Array(e), r = new Array(e);
1120
1452
  let o = 0, s = 0, a;
@@ -1130,7 +1462,7 @@ function Mo(e, t) {
1130
1462
  return l ? Math.round(y * 1e3 / l) : void 0;
1131
1463
  };
1132
1464
  }
1133
- function Po(e, t) {
1465
+ function ds(e, t) {
1134
1466
  let n = 0, r = 1e3 / t, o, s;
1135
1467
  const a = (u, f = Date.now()) => {
1136
1468
  n = f, o = null, s && (clearTimeout(s), s = null), e.apply(null, u);
@@ -1142,10 +1474,10 @@ function Po(e, t) {
1142
1474
  }, r - h)));
1143
1475
  }, () => o && a(o)];
1144
1476
  }
1145
- const Ve = (e, t, n = 3) => {
1477
+ const Ke = (e, t, n = 3) => {
1146
1478
  let r = 0;
1147
- const o = Mo(50, 250);
1148
- return Po((s) => {
1479
+ const o = us(50, 250);
1480
+ return ds((s) => {
1149
1481
  const a = s.loaded, i = s.lengthComputable ? s.total : void 0, d = a - r, u = o(d), f = a <= i;
1150
1482
  r = a;
1151
1483
  const h = {
@@ -1161,17 +1493,17 @@ const Ve = (e, t, n = 3) => {
1161
1493
  };
1162
1494
  e(h);
1163
1495
  }, n);
1164
- }, Kt = (e, t) => {
1496
+ }, Gt = (e, t) => {
1165
1497
  const n = e != null;
1166
1498
  return [(r) => t[0]({
1167
1499
  lengthComputable: n,
1168
1500
  total: e,
1169
1501
  loaded: r
1170
1502
  }), 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)))(
1503
+ }, Qt = (e) => (...t) => c.asap(() => e(...t)), fs = 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
1504
  new URL(I.origin),
1173
1505
  I.navigator && /(msie|trident)/i.test(I.navigator.userAgent)
1174
- ) : () => !0, Io = I.hasStandardBrowserEnv ? (
1506
+ ) : () => !0, ps = I.hasStandardBrowserEnv ? (
1175
1507
  // Standard browser envs support document.cookie
1176
1508
  {
1177
1509
  write(e, t, n, r, o, s) {
@@ -1198,16 +1530,16 @@ const Ve = (e, t, n = 3) => {
1198
1530
  }
1199
1531
  }
1200
1532
  );
1201
- function Do(e) {
1533
+ function hs(e) {
1202
1534
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1203
1535
  }
1204
- function Fo(e, t) {
1536
+ function ms(e, t) {
1205
1537
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1206
1538
  }
1207
- function kn(e, t) {
1208
- return e && !Do(t) ? Fo(e, t) : t;
1539
+ function Nn(e, t) {
1540
+ return e && !hs(t) ? ms(e, t) : t;
1209
1541
  }
1210
- const Xt = (e) => e instanceof U ? { ...e } : e;
1542
+ const Zt = (e) => e instanceof U ? { ...e } : e;
1211
1543
  function de(e, t) {
1212
1544
  t = t || {};
1213
1545
  const n = {};
@@ -1265,17 +1597,17 @@ function de(e, t) {
1265
1597
  socketPath: a,
1266
1598
  responseEncoding: a,
1267
1599
  validateStatus: i,
1268
- headers: (u, f, h) => o(Xt(u), Xt(f), h, !0)
1600
+ headers: (u, f, h) => o(Zt(u), Zt(f), h, !0)
1269
1601
  };
1270
1602
  return c.forEach(Object.keys(Object.assign({}, e, t)), function(f) {
1271
1603
  const h = d[f] || o, y = h(e[f], t[f], f);
1272
1604
  c.isUndefined(y) && h !== i || (n[f] = y);
1273
1605
  }), n;
1274
1606
  }
1275
- const Nn = (e) => {
1607
+ const Ln = (e) => {
1276
1608
  const t = de({}, e);
1277
1609
  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(
1610
+ t.headers = a = U.from(a), t.url = Tn(Nn(t.baseURL, t.url), e.params, e.paramsSerializer), i && a.set(
1279
1611
  "Authorization",
1280
1612
  "Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : ""))
1281
1613
  );
@@ -1288,14 +1620,14 @@ const Nn = (e) => {
1288
1620
  a.setContentType([u || "multipart/form-data", ...f].join("; "));
1289
1621
  }
1290
1622
  }
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);
1623
+ if (I.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && fs(t.url))) {
1624
+ const u = o && s && ps.read(s);
1293
1625
  u && a.set(o, u);
1294
1626
  }
1295
1627
  return t;
1296
- }, jo = typeof XMLHttpRequest < "u", Ho = jo && function(e) {
1628
+ }, gs = typeof XMLHttpRequest < "u", ws = gs && function(e) {
1297
1629
  return new Promise(function(n, r) {
1298
- const o = Nn(e);
1630
+ const o = Ln(e);
1299
1631
  let s = o.data;
1300
1632
  const a = U.from(o.headers).normalize();
1301
1633
  let { responseType: i, onUploadProgress: d, onDownloadProgress: u } = o, f, h, y, l, w;
@@ -1309,7 +1641,7 @@ const Nn = (e) => {
1309
1641
  return;
1310
1642
  const R = U.from(
1311
1643
  "getAllResponseHeaders" in m && m.getAllResponseHeaders()
1312
- ), _ = {
1644
+ ), L = {
1313
1645
  data: !i || i === "text" || i === "json" ? m.responseText : m.response,
1314
1646
  status: m.status,
1315
1647
  statusText: m.statusText,
@@ -1317,11 +1649,11 @@ const Nn = (e) => {
1317
1649
  config: e,
1318
1650
  request: m
1319
1651
  };
1320
- An(function(M) {
1652
+ kn(function(M) {
1321
1653
  n(M), g();
1322
1654
  }, function(M) {
1323
1655
  r(M), g();
1324
- }, _), m = null;
1656
+ }, L), m = null;
1325
1657
  }
1326
1658
  "onloadend" in m ? m.onloadend = S : m.onreadystatechange = function() {
1327
1659
  !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(S);
@@ -1331,26 +1663,26 @@ const Nn = (e) => {
1331
1663
  r(new v("Network Error", v.ERR_NETWORK, e, m)), m = null;
1332
1664
  }, m.ontimeout = function() {
1333
1665
  let D = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
1334
- const _ = o.transitional || Tn;
1666
+ const L = o.transitional || Rn;
1335
1667
  o.timeoutErrorMessage && (D = o.timeoutErrorMessage), r(new v(
1336
1668
  D,
1337
- _.clarifyTimeoutError ? v.ETIMEDOUT : v.ECONNABORTED,
1669
+ L.clarifyTimeoutError ? v.ETIMEDOUT : v.ECONNABORTED,
1338
1670
  e,
1339
1671
  m
1340
1672
  )), 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);
1673
+ }, s === void 0 && a.setContentType(null), "setRequestHeader" in m && c.forEach(a.toJSON(), function(D, L) {
1674
+ m.setRequestHeader(L, D);
1675
+ }), c.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), i && i !== "json" && (m.responseType = o.responseType), u && ([y, w] = Ke(u, !0), m.addEventListener("progress", y)), d && m.upload && ([h, l] = Ke(d), m.upload.addEventListener("progress", h), m.upload.addEventListener("loadend", l)), (o.cancelToken || o.signal) && (f = (R) => {
1676
+ m && (r(!R || R.type ? new Ee(null, e, m) : R), m.abort(), m = null);
1345
1677
  }, o.cancelToken && o.cancelToken.subscribe(f), o.signal && (o.signal.aborted ? f() : o.signal.addEventListener("abort", f)));
1346
- const T = Co(o.url);
1678
+ const T = cs(o.url);
1347
1679
  if (T && I.protocols.indexOf(T) === -1) {
1348
1680
  r(new v("Unsupported protocol " + T + ":", v.ERR_BAD_REQUEST, e));
1349
1681
  return;
1350
1682
  }
1351
1683
  m.send(s || null);
1352
1684
  });
1353
- }, Uo = (e, t) => {
1685
+ }, ys = (e, t) => {
1354
1686
  const { length: n } = e = e ? e.filter(Boolean) : [];
1355
1687
  if (t || n) {
1356
1688
  let r = new AbortController(), o;
@@ -1358,7 +1690,7 @@ const Nn = (e) => {
1358
1690
  if (!o) {
1359
1691
  o = !0, i();
1360
1692
  const f = u instanceof Error ? u : this.reason;
1361
- r.abort(f instanceof v ? f : new ve(f instanceof Error ? f.message : f));
1693
+ r.abort(f instanceof v ? f : new Ee(f instanceof Error ? f.message : f));
1362
1694
  }
1363
1695
  };
1364
1696
  let a = t && setTimeout(() => {
@@ -1373,7 +1705,7 @@ const Nn = (e) => {
1373
1705
  const { signal: d } = r;
1374
1706
  return d.unsubscribe = () => c.asap(i), d;
1375
1707
  }
1376
- }, qo = function* (e, t) {
1708
+ }, bs = function* (e, t) {
1377
1709
  let n = e.byteLength;
1378
1710
  if (n < t) {
1379
1711
  yield e;
@@ -1382,10 +1714,10 @@ const Nn = (e) => {
1382
1714
  let r = 0, o;
1383
1715
  for (; r < n; )
1384
1716
  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) {
1717
+ }, vs = async function* (e, t) {
1718
+ for await (const n of xs(e))
1719
+ yield* bs(n, t);
1720
+ }, xs = async function* (e) {
1389
1721
  if (e[Symbol.asyncIterator]) {
1390
1722
  yield* e;
1391
1723
  return;
@@ -1401,8 +1733,8 @@ const Nn = (e) => {
1401
1733
  } finally {
1402
1734
  await t.cancel();
1403
1735
  }
1404
- }, Gt = (e, t, n, r) => {
1405
- const o = zo(e, t);
1736
+ }, en = (e, t, n, r) => {
1737
+ const o = vs(e, t);
1406
1738
  let s = 0, a, i = (d) => {
1407
1739
  a || (a = !0, r && r(d));
1408
1740
  };
@@ -1430,13 +1762,13 @@ const Nn = (e) => {
1430
1762
  }, {
1431
1763
  highWaterMark: 2
1432
1764
  });
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) => {
1765
+ }, et = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", _n = et && typeof ReadableStream == "function", Es = et && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Cn = (e, ...t) => {
1434
1766
  try {
1435
1767
  return !!e(...t);
1436
1768
  } catch {
1437
1769
  return !1;
1438
1770
  }
1439
- }, Jo = _n && Ln(() => {
1771
+ }, Ss = _n && Cn(() => {
1440
1772
  let e = !1;
1441
1773
  const t = new Request(I.origin, {
1442
1774
  body: new ReadableStream(),
@@ -1446,17 +1778,17 @@ const Nn = (e) => {
1446
1778
  }
1447
1779
  }).headers.has("Content-Type");
1448
1780
  return e && !t;
1449
- }), Qt = 64 * 1024, xt = _n && Ln(() => c.isReadableStream(new Response("").body)), Ke = {
1450
- stream: xt && ((e) => e.body)
1781
+ }), tn = 64 * 1024, St = _n && Cn(() => c.isReadableStream(new Response("").body)), Ye = {
1782
+ stream: St && ((e) => e.body)
1451
1783
  };
1452
- Ze && ((e) => {
1784
+ et && ((e) => {
1453
1785
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
1454
- !Ke[t] && (Ke[t] = c.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
1786
+ !Ye[t] && (Ye[t] = c.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
1455
1787
  throw new v(`Response type '${t}' is not supported`, v.ERR_NOT_SUPPORT, r);
1456
1788
  });
1457
1789
  });
1458
1790
  })(new Response());
1459
- const Vo = async (e) => {
1791
+ const Ts = async (e) => {
1460
1792
  if (e == null)
1461
1793
  return 0;
1462
1794
  if (c.isBlob(e))
@@ -1469,11 +1801,11 @@ const Vo = async (e) => {
1469
1801
  if (c.isArrayBufferView(e) || c.isArrayBuffer(e))
1470
1802
  return e.byteLength;
1471
1803
  if (c.isURLSearchParams(e) && (e = e + ""), c.isString(e))
1472
- return (await Wo(e)).byteLength;
1473
- }, Ko = async (e, t) => {
1804
+ return (await Es(e)).byteLength;
1805
+ }, Rs = async (e, t) => {
1474
1806
  const n = c.toFiniteNumber(e.getContentLength());
1475
- return n ?? Vo(t);
1476
- }, Yo = Ze && (async (e) => {
1807
+ return n ?? Ts(t);
1808
+ }, Os = et && (async (e) => {
1477
1809
  let {
1478
1810
  url: t,
1479
1811
  method: n,
@@ -1487,26 +1819,26 @@ const Vo = async (e) => {
1487
1819
  headers: f,
1488
1820
  withCredentials: h = "same-origin",
1489
1821
  fetchOptions: y
1490
- } = Nn(e);
1822
+ } = Ln(e);
1491
1823
  u = u ? (u + "").toLowerCase() : "text";
1492
- let l = Uo([o, s && s.toAbortSignal()], a), w;
1824
+ let l = ys([o, s && s.toAbortSignal()], a), w;
1493
1825
  const g = l && l.unsubscribe && (() => {
1494
1826
  l.unsubscribe();
1495
1827
  });
1496
1828
  let m;
1497
1829
  try {
1498
- if (d && Jo && n !== "get" && n !== "head" && (m = await Ko(f, r)) !== 0) {
1499
- let _ = new Request(t, {
1830
+ if (d && Ss && n !== "get" && n !== "head" && (m = await Rs(f, r)) !== 0) {
1831
+ let L = new Request(t, {
1500
1832
  method: "POST",
1501
1833
  body: r,
1502
1834
  duplex: "half"
1503
1835
  }), x;
1504
- if (c.isFormData(r) && (x = _.headers.get("content-type")) && f.setContentType(x), _.body) {
1505
- const [M, F] = Kt(
1836
+ if (c.isFormData(r) && (x = L.headers.get("content-type")) && f.setContentType(x), L.body) {
1837
+ const [M, F] = Gt(
1506
1838
  m,
1507
- Ve(Yt(d))
1839
+ Ke(Qt(d))
1508
1840
  );
1509
- r = Gt(_.body, Qt, M, F);
1841
+ r = en(L.body, tn, M, F);
1510
1842
  }
1511
1843
  }
1512
1844
  c.isString(h) || (h = h ? "include" : "omit");
@@ -1521,27 +1853,27 @@ const Vo = async (e) => {
1521
1853
  credentials: S ? h : void 0
1522
1854
  });
1523
1855
  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];
1856
+ const R = St && (u === "stream" || u === "response");
1857
+ if (St && (i || R && g)) {
1858
+ const L = {};
1859
+ ["status", "statusText", "headers"].forEach((Z) => {
1860
+ L[Z] = T[Z];
1529
1861
  });
1530
- const x = c.toFiniteNumber(T.headers.get("content-length")), [M, F] = i && Kt(
1862
+ const x = c.toFiniteNumber(T.headers.get("content-length")), [M, F] = i && Gt(
1531
1863
  x,
1532
- Ve(Yt(i), !0)
1864
+ Ke(Qt(i), !0)
1533
1865
  ) || [];
1534
1866
  T = new Response(
1535
- Gt(T.body, Qt, M, () => {
1867
+ en(T.body, tn, M, () => {
1536
1868
  F && F(), g && g();
1537
1869
  }),
1538
- _
1870
+ L
1539
1871
  );
1540
1872
  }
1541
1873
  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, {
1874
+ let D = await Ye[c.findKey(Ye, u) || "text"](T, e);
1875
+ return !R && g && g(), await new Promise((L, x) => {
1876
+ kn(L, x, {
1545
1877
  data: D,
1546
1878
  headers: U.from(T.headers),
1547
1879
  status: T.status,
@@ -1558,12 +1890,12 @@ const Vo = async (e) => {
1558
1890
  }
1559
1891
  ) : v.from(S, S && S.code, e, w);
1560
1892
  }
1561
- }), Et = {
1562
- http: co,
1563
- xhr: Ho,
1564
- fetch: Yo
1893
+ }), Tt = {
1894
+ http: Uo,
1895
+ xhr: ws,
1896
+ fetch: Os
1565
1897
  };
1566
- c.forEach(Et, (e, t) => {
1898
+ c.forEach(Tt, (e, t) => {
1567
1899
  if (e) {
1568
1900
  try {
1569
1901
  Object.defineProperty(e, "name", { value: t });
@@ -1572,7 +1904,7 @@ c.forEach(Et, (e, t) => {
1572
1904
  Object.defineProperty(e, "adapterName", { value: t });
1573
1905
  }
1574
1906
  });
1575
- const Zt = (e) => `- ${e}`, Xo = (e) => c.isFunction(e) || e === null || e === !1, Cn = {
1907
+ const nn = (e) => `- ${e}`, As = (e) => c.isFunction(e) || e === null || e === !1, Mn = {
1576
1908
  getAdapter: (e) => {
1577
1909
  e = c.isArray(e) ? e : [e];
1578
1910
  const { length: t } = e;
@@ -1581,7 +1913,7 @@ const Zt = (e) => `- ${e}`, Xo = (e) => c.isFunction(e) || e === null || e === !
1581
1913
  for (let s = 0; s < t; s++) {
1582
1914
  n = e[s];
1583
1915
  let a;
1584
- if (r = n, !Xo(n) && (r = Et[(a = String(n)).toLowerCase()], r === void 0))
1916
+ if (r = n, !As(n) && (r = Tt[(a = String(n)).toLowerCase()], r === void 0))
1585
1917
  throw new v(`Unknown adapter '${a}'`);
1586
1918
  if (r)
1587
1919
  break;
@@ -1592,8 +1924,8 @@ const Zt = (e) => `- ${e}`, Xo = (e) => c.isFunction(e) || e === null || e === !
1592
1924
  ([i, d]) => `adapter ${i} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
1593
1925
  );
1594
1926
  let a = t ? s.length > 1 ? `since :
1595
- ` + s.map(Zt).join(`
1596
- `) : " " + Zt(s[0]) : "as no adapter specified";
1927
+ ` + s.map(nn).join(`
1928
+ `) : " " + nn(s[0]) : "as no adapter specified";
1597
1929
  throw new v(
1598
1930
  "There is no suitable adapter to dispatch the request " + a,
1599
1931
  "ERR_NOT_SUPPORT"
@@ -1601,40 +1933,40 @@ const Zt = (e) => `- ${e}`, Xo = (e) => c.isFunction(e) || e === null || e === !
1601
1933
  }
1602
1934
  return r;
1603
1935
  },
1604
- adapters: Et
1936
+ adapters: Tt
1605
1937
  };
1606
- function ht(e) {
1938
+ function gt(e) {
1607
1939
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1608
- throw new ve(null, e);
1940
+ throw new Ee(null, e);
1609
1941
  }
1610
- function en(e) {
1611
- return ht(e), e.headers = U.from(e.headers), e.data = pt.call(
1942
+ function rn(e) {
1943
+ return gt(e), e.headers = U.from(e.headers), e.data = mt.call(
1612
1944
  e,
1613
1945
  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(
1946
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Mn.getAdapter(e.adapter || Me.adapter)(e).then(function(r) {
1947
+ return gt(e), r.data = mt.call(
1616
1948
  e,
1617
1949
  e.transformResponse,
1618
1950
  r
1619
1951
  ), r.headers = U.from(r.headers), r;
1620
1952
  }, function(r) {
1621
- return On(r) || (ht(e), r && r.response && (r.response.data = pt.call(
1953
+ return An(r) || (gt(e), r && r.response && (r.response.data = mt.call(
1622
1954
  e,
1623
1955
  e.transformResponse,
1624
1956
  r.response
1625
1957
  ), r.response.headers = U.from(r.response.headers))), Promise.reject(r);
1626
1958
  });
1627
1959
  }
1628
- const Mn = "1.7.9", et = {};
1960
+ const Pn = "1.7.9", tt = {};
1629
1961
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1630
- et[e] = function(r) {
1962
+ tt[e] = function(r) {
1631
1963
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1632
1964
  };
1633
1965
  });
1634
- const tn = {};
1635
- et.transitional = function(t, n, r) {
1966
+ const on = {};
1967
+ tt.transitional = function(t, n, r) {
1636
1968
  function o(s, a) {
1637
- return "[Axios v" + Mn + "] Transitional option '" + s + "'" + a + (r ? ". " + r : "");
1969
+ return "[Axios v" + Pn + "] Transitional option '" + s + "'" + a + (r ? ". " + r : "");
1638
1970
  }
1639
1971
  return (s, a, i) => {
1640
1972
  if (t === !1)
@@ -1642,7 +1974,7 @@ et.transitional = function(t, n, r) {
1642
1974
  o(a, " has been removed" + (n ? " in " + n : "")),
1643
1975
  v.ERR_DEPRECATED
1644
1976
  );
1645
- return n && !tn[a] && (tn[a] = !0, console.warn(
1977
+ return n && !on[a] && (on[a] = !0, console.warn(
1646
1978
  o(
1647
1979
  a,
1648
1980
  " has been deprecated since v" + n + " and will be removed in the near future"
@@ -1650,10 +1982,10 @@ et.transitional = function(t, n, r) {
1650
1982
  )), t ? t(s, a, i) : !0;
1651
1983
  };
1652
1984
  };
1653
- et.spelling = function(t) {
1985
+ tt.spelling = function(t) {
1654
1986
  return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
1655
1987
  };
1656
- function Go(e, t, n) {
1988
+ function ks(e, t, n) {
1657
1989
  if (typeof e != "object")
1658
1990
  throw new v("options must be an object", v.ERR_BAD_OPTION_VALUE);
1659
1991
  const r = Object.keys(e);
@@ -1670,15 +2002,15 @@ function Go(e, t, n) {
1670
2002
  throw new v("Unknown option " + s, v.ERR_BAD_OPTION);
1671
2003
  }
1672
2004
  }
1673
- const Je = {
1674
- assertOptions: Go,
1675
- validators: et
1676
- }, Z = Je.validators;
2005
+ const Ve = {
2006
+ assertOptions: ks,
2007
+ validators: tt
2008
+ }, ee = Ve.validators;
1677
2009
  let ue = class {
1678
2010
  constructor(t) {
1679
2011
  this.defaults = t, this.interceptors = {
1680
- request: new Jt(),
1681
- response: new Jt()
2012
+ request: new Yt(),
2013
+ response: new Yt()
1682
2014
  };
1683
2015
  }
1684
2016
  /**
@@ -1709,18 +2041,18 @@ let ue = class {
1709
2041
  _request(t, n) {
1710
2042
  typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = de(this.defaults, n);
1711
2043
  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)
2044
+ r !== void 0 && Ve.assertOptions(r, {
2045
+ silentJSONParsing: ee.transitional(ee.boolean),
2046
+ forcedJSONParsing: ee.transitional(ee.boolean),
2047
+ clarifyTimeoutError: ee.transitional(ee.boolean)
1716
2048
  }, !1), o != null && (c.isFunction(o) ? n.paramsSerializer = {
1717
2049
  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")
2050
+ } : Ve.assertOptions(o, {
2051
+ encode: ee.function,
2052
+ serialize: ee.function
2053
+ }, !0)), Ve.assertOptions(n, {
2054
+ baseUrl: ee.spelling("baseURL"),
2055
+ withXsrfToken: ee.spelling("withXSRFToken")
1724
2056
  }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1725
2057
  let a = s && c.merge(
1726
2058
  s.common,
@@ -1743,7 +2075,7 @@ let ue = class {
1743
2075
  });
1744
2076
  let f, h = 0, y;
1745
2077
  if (!d) {
1746
- const w = [en.bind(this), void 0];
2078
+ const w = [rn.bind(this), void 0];
1747
2079
  for (w.unshift.apply(w, i), w.push.apply(w, u), y = w.length, f = Promise.resolve(n); h < y; )
1748
2080
  f = f.then(w[h++], w[h++]);
1749
2081
  return f;
@@ -1760,7 +2092,7 @@ let ue = class {
1760
2092
  }
1761
2093
  }
1762
2094
  try {
1763
- f = en.call(this, l);
2095
+ f = rn.call(this, l);
1764
2096
  } catch (w) {
1765
2097
  return Promise.reject(w);
1766
2098
  }
@@ -1770,8 +2102,8 @@ let ue = class {
1770
2102
  }
1771
2103
  getUri(t) {
1772
2104
  t = de(this.defaults, t);
1773
- const n = kn(t.baseURL, t.url);
1774
- return Sn(n, t.params, t.paramsSerializer);
2105
+ const n = Nn(t.baseURL, t.url);
2106
+ return Tn(n, t.params, t.paramsSerializer);
1775
2107
  }
1776
2108
  };
1777
2109
  c.forEach(["delete", "get", "head", "options"], function(t) {
@@ -1798,7 +2130,7 @@ c.forEach(["post", "put", "patch"], function(t) {
1798
2130
  }
1799
2131
  ue.prototype[t] = n(), ue.prototype[t + "Form"] = n(!0);
1800
2132
  });
1801
- let Qo = class Pn {
2133
+ let Ns = class Bn {
1802
2134
  constructor(t) {
1803
2135
  if (typeof t != "function")
1804
2136
  throw new TypeError("executor must be a function.");
@@ -1822,7 +2154,7 @@ let Qo = class Pn {
1822
2154
  r.unsubscribe(s);
1823
2155
  }, a;
1824
2156
  }, t(function(s, a, i) {
1825
- r.reason || (r.reason = new ve(s, a, i), n(r.reason));
2157
+ r.reason || (r.reason = new Ee(s, a, i), n(r.reason));
1826
2158
  });
1827
2159
  }
1828
2160
  /**
@@ -1864,22 +2196,22 @@ let Qo = class Pn {
1864
2196
  static source() {
1865
2197
  let t;
1866
2198
  return {
1867
- token: new Pn(function(o) {
2199
+ token: new Bn(function(o) {
1868
2200
  t = o;
1869
2201
  }),
1870
2202
  cancel: t
1871
2203
  };
1872
2204
  }
1873
2205
  };
1874
- function Zo(e) {
2206
+ function Ls(e) {
1875
2207
  return function(n) {
1876
2208
  return e.apply(null, n);
1877
2209
  };
1878
2210
  }
1879
- function es(e) {
2211
+ function _s(e) {
1880
2212
  return c.isObject(e) && e.isAxiosError === !0;
1881
2213
  }
1882
- const St = {
2214
+ const Rt = {
1883
2215
  Continue: 100,
1884
2216
  SwitchingProtocols: 101,
1885
2217
  Processing: 102,
@@ -1944,99 +2276,63 @@ const St = {
1944
2276
  NotExtended: 510,
1945
2277
  NetworkAuthenticationRequired: 511
1946
2278
  };
1947
- Object.entries(St).forEach(([e, t]) => {
1948
- St[t] = e;
2279
+ Object.entries(Rt).forEach(([e, t]) => {
2280
+ Rt[t] = e;
1949
2281
  });
1950
- function Bn(e) {
1951
- const t = new ue(e), n = dn(ue.prototype.request, t);
2282
+ function In(e) {
2283
+ const t = new ue(e), n = fn(ue.prototype.request, t);
1952
2284
  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));
2285
+ return In(de(e, o));
1954
2286
  }, n;
1955
2287
  }
1956
- const A = Bn(Ce);
2288
+ const A = In(Me);
1957
2289
  A.Axios = ue;
1958
- A.CanceledError = ve;
1959
- A.CancelToken = Qo;
1960
- A.isCancel = On;
1961
- A.VERSION = Mn;
1962
- A.toFormData = Qe;
2290
+ A.CanceledError = Ee;
2291
+ A.CancelToken = Ns;
2292
+ A.isCancel = An;
2293
+ A.VERSION = Pn;
2294
+ A.toFormData = Ze;
1963
2295
  A.AxiosError = v;
1964
2296
  A.Cancel = A.CanceledError;
1965
2297
  A.all = function(t) {
1966
2298
  return Promise.all(t);
1967
2299
  };
1968
- A.spread = Zo;
1969
- A.isAxiosError = es;
2300
+ A.spread = Ls;
2301
+ A.isAxiosError = _s;
1970
2302
  A.mergeConfig = de;
1971
2303
  A.AxiosHeaders = U;
1972
- A.formToJSON = (e) => Rn(c.isHTMLForm(e) ? new FormData(e) : e);
1973
- A.getAdapter = Cn.getAdapter;
1974
- A.HttpStatusCode = St;
2304
+ A.formToJSON = (e) => On(c.isHTMLForm(e) ? new FormData(e) : e);
2305
+ A.getAdapter = Mn.getAdapter;
2306
+ A.HttpStatusCode = Rt;
1975
2307
  A.default = A;
1976
2308
  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) => {
2309
+ Axios: ea,
2310
+ AxiosError: ta,
2311
+ CanceledError: na,
2312
+ isCancel: ra,
2313
+ CancelToken: oa,
2314
+ VERSION: sa,
2315
+ all: aa,
2316
+ Cancel: ia,
2317
+ isAxiosError: la,
2318
+ spread: ca,
2319
+ toFormData: ua,
2320
+ AxiosHeaders: da,
2321
+ HttpStatusCode: fa,
2322
+ formToJSON: pa,
2323
+ getAdapter: ha,
2324
+ mergeConfig: ma
2325
+ } = A;
2326
+ var Ot = /* @__PURE__ */ ((e) => (e[e.DEFAULT = 0] = "DEFAULT", e[e.SANDBOX = 1] = "SANDBOX", e[e.DC = 2] = "DC", e))(Ot || {});
2327
+ const At = "useAxios", Cs = async (e = (n) => {
2328
+ }, t) => (t.domain_type === Ot.SANDBOX || (t.domain_type, Ot.DC), t.baseURL = void 0, z.debug(At, `baseURL::${t.baseURL}`), e(t), t), Ms = async (e = (n) => {
2033
2329
  }, t) => {
2034
2330
  var r;
2035
2331
  if (e(t), t.response.status !== 500) {
2036
2332
  if (t.response.status <= 401)
2037
- return se.info(Rt, t.response.data.meta), Promise.reject(t.response.data.meta);
2333
+ return z.info(At, t.response.data.meta), Promise.reject(t.response.data.meta);
2038
2334
  if (t.response.status === 404)
2039
- return se.info(Rt, t.response.data.meta), Promise.reject(t.response.data.meta);
2335
+ return z.info(At, t.response.data.meta), Promise.reject(t.response.data.meta);
2040
2336
  }
2041
2337
  let n;
2042
2338
  try {
@@ -2046,19 +2342,19 @@ const Rt = "useAxios", rs = async (e = (n) => {
2046
2342
  (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
2343
  }
2048
2344
  return n;
2049
- }, Ue = "useAxios", fa = ({ onRequest: e, onError: t }) => {
2050
- A.interceptors.request.use((n) => rs(e, n)), A.interceptors.response.use(
2345
+ }, ze = "useAxios", ga = ({ onRequest: e, onError: t }) => {
2346
+ A.interceptors.request.use((n) => Cs(e, n)), A.interceptors.response.use(
2051
2347
  (n) => n.data.data,
2052
- (n) => os(t, n)
2348
+ (n) => Ms(t, n)
2053
2349
  ), 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))
2350
+ }, wa = {
2351
+ get: async (e, t) => (z.debug(ze, `[get] url | ${e}`), A.get(e, t)),
2352
+ post: async (e, t, n) => (z.debug(ze, `[post] url | ${e} | payload | ${t}`), A.post(e, t, n)),
2353
+ put: async (e, t, n) => (z.debug(ze, `[put] url | ${e} | payload | ${t}`), A.put(e, t, n)),
2354
+ delete: async (e, t) => (z.debug(ze, `[delete] url | ${e}`), A.delete(e, t))
2059
2355
  };
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 = {
2356
+ var J = /* @__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))(J || {});
2357
+ const sn = {
2062
2358
  /* suresh/NOTE: iPhone 15 device size */
2063
2359
  iphone_15: { width: { min: 850, max: 854 }, height: { min: 390, max: 395 } },
2064
2360
  /* suresh/NOTE: Iphone 14 pro max device size */
@@ -2124,18 +2420,18 @@ const nn = {
2124
2420
  },
2125
2421
  /* suresh/NOTE: Nokia N9 device size */
2126
2422
  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();
2423
+ }, Dn = () => ({ width: window.innerWidth, height: window.innerHeight }), Ps = ({ width: e, height: t }) => {
2424
+ const { width: n, height: r } = Dn();
2129
2425
  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 = {
2426
+ }, Bs = () => {
2427
+ for (const r of Object.keys(sn)) {
2428
+ const o = sn[r];
2429
+ if (Ps(o))
2430
+ return o.vdevice || J.MOBILE_LANDSCAPE_XL;
2431
+ }
2432
+ const { width: e, height: t } = Dn(), n = t >= e;
2433
+ return e <= 320 ? J.MINI_MOBILE : e <= 480 && e >= 320 ? J.MOBILE_PORTRAIT : e <= 767 && e >= 481 ? J.MOBILE_LANDSCAPE : e <= 1024 && e >= 768 ? n ? J.TAB_PORTRAIT : J.TAB_LANDSCAPE : e <= 1280 && e >= 1025 ? J.LAPTOP : (e >= 1281, J.DESKTOP);
2434
+ }, Is = ["h1", "h3", "blockquote", "br"], Ds = {
2139
2435
  strong: "*",
2140
2436
  b: "*",
2141
2437
  i: "_",
@@ -2190,12 +2486,12 @@ const nn = {
2190
2486
  // vtypes
2191
2487
  gdrive_url: /(?:https:\/\/drive\.google\.com\/file\/d\/(.*?)\/view)/,
2192
2488
  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) => {
2489
+ }, wt = (e) => e.replace(/\*/g, "&ast;").replace(/\_/g, "&#95;").replace(/\~/g, "&#126;"), Fs = (e) => e.replace(/&ast;/g, "*").replace(/&#95;/g, "_").replace(/&#126;/g, "~"), an = (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) => {
2194
2490
  let n = "", r = "";
2195
2491
  return (e[0] === `
2196
2492
  ` || e[0] === " ") && (n = e[0]), (e[e.length - 1] === `
2197
2493
  ` || e[e.length - 1] === " ") && (r = e[e.length - 1]), n + t + r;
2198
- }, on = (e) => new RegExp(`<${e}.*?/?>`, "gm"), sn = (e) => {
2494
+ }, ln = (e) => new RegExp(`<${e}.*?/?>`, "gm"), cn = (e) => {
2199
2495
  let t = e.match(B.gdrive_url);
2200
2496
  if (t && t.length > 1 && t[1])
2201
2497
  return `http://docs.google.com/uc?export=open&id=${t[1]}`;
@@ -2205,7 +2501,7 @@ const nn = {
2205
2501
  return `http://docs.google.com/uc?export=open&id=${n[1]}`;
2206
2502
  }
2207
2503
  return e;
2208
- }, an = (e = "", t = "", n = "", r = "") => {
2504
+ }, un = (e = "", t = "", n = "", r = "") => {
2209
2505
  let o = "image";
2210
2506
  if (r.length) {
2211
2507
  let s = r.match(B.vtype);
@@ -2216,9 +2512,9 @@ const nn = {
2216
2512
  </audio>` : o == "video" ? `<video vmd="video" controls ${r}>
2217
2513
  <source src="${n}" type="video/mp4"/>
2218
2514
  </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()),
2515
+ }, ya = {
2516
+ applyReverseMarkdown: (e) => (e = e.replace(ln("br"), `
2517
+ `), e = an(e), e = Markdown.reverseAnchor(e), e = e.replace(ln("hr"), " --- "), e = Markdown.reverseRecursive(e), e.trim()),
2222
2518
  reverseRecursive: (e) => {
2223
2519
  let n = new DOMParser().parseFromString(e, "text/html").body.childNodes, r = e === `
2224
2520
  ` ? `
@@ -2230,12 +2526,12 @@ const nn = {
2230
2526
  `)) || s || a === "br") {
2231
2527
  if (s)
2232
2528
  return r += o.data;
2233
- let d = ls[a] || "", u = o.childNodes.length ? Markdown.reverseRecursive(o.innerHTML) : i;
2529
+ let d = Ds[a] || "", u = o.childNodes.length ? Markdown.reverseRecursive(o.innerHTML) : i;
2234
2530
  r += !u.trim() && u.includes(`
2235
2531
  `) ? `
2236
2532
  ` : "";
2237
2533
  let f = u[u.length - 1] === `
2238
- `, h = is.includes(a) ? "" : d;
2534
+ `, h = Is.includes(a) ? "" : d;
2239
2535
  r += d + (f ? u.slice(0, u.length - 1) + h + `
2240
2536
  ` : u + h);
2241
2537
  }
@@ -2252,8 +2548,8 @@ const nn = {
2252
2548
  });
2253
2549
  },
2254
2550
  // 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>"),
2551
+ applyMarkdown: (e, t = !1) => typeof e != "string" ? e : (e = an(e), e = e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/<br>/g, `
2552
+ `).trim(), e = Markdown.applyRecursive(e, t), e = Markdown.applyOnce(e), e = Markdown.applyNextLine(e), e = Fs(e), '<div class="vmd">' + e + "</div>"),
2257
2553
  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
2554
  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
2555
  applyNextLine: (e) => e.replace(B.nextline, Markdown.getNextLineHTML),
@@ -2266,14 +2562,14 @@ const nn = {
2266
2562
  let r = t.length;
2267
2563
  return we(
2268
2564
  e,
2269
- " <h" + r + ` vmd="h${r}">` + gt(n) + "</h" + r + "> "
2565
+ " <h" + r + ` vmd="h${r}">` + wt(n) + "</h" + r + "> "
2270
2566
  );
2271
2567
  },
2272
2568
  getBlockQuoteHTML: (e, t) => (t = t.trim(), t.length ? we(
2273
2569
  e,
2274
2570
  ' <blockquote vmd="blockquote"><p>' + Markdown.applyRecursive(t) + "</p></blockquote> "
2275
2571
  ) : 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> ",
2572
+ 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;' + wt(n) + "&rdquo;</code> ",
2277
2573
  getCodeblockHTML: (e, t, n) => n.trim().length === 0 ? e : t + ' <pre vmd="codeblock"> ' + Markdown.applyRecursive(n) + "</pre>",
2278
2574
  getNextLineHTML: (e, t, n, r) => t + ' <br vmd="br" > ' + r,
2279
2575
  getLineHTML: (e, t, n, r) => t + '<hr vmd="line" class="hr w100">' + Markdown.applyRecursive(r.trim()),
@@ -2281,14 +2577,14 @@ const nn = {
2281
2577
  var s = r.startsWith("www.") ? "http://" + r : r;
2282
2578
  return t + ` <a vmd="link" href="${encodeURI(
2283
2579
  s
2284
- )}" rel="noopener noreferrer" ${o}>${gt(n)}</a>`;
2580
+ )}" rel="noopener noreferrer" ${o}>${wt(n)}</a>`;
2285
2581
  },
2286
2582
  getImageHTML: (e, t, n, r, o) => {
2287
- let s = an(t, r, sn(n), o);
2583
+ let s = un(t, r, cn(n), o);
2288
2584
  return we(e, s);
2289
2585
  },
2290
2586
  getVideoHTML: (e, t, n, r, o, s, a, i) => {
2291
- let d = an(t, r, sn(n), o);
2587
+ let d = un(t, r, cn(n), o);
2292
2588
  return we(
2293
2589
  e,
2294
2590
  `<a vmd="hyperlink" href="${s}" title="${a}" rel="noreferrer" ${i}>${d}</a>`
@@ -2321,7 +2617,7 @@ const nn = {
2321
2617
  })(e) + "</ol> "
2322
2618
  ) : e
2323
2619
  };
2324
- function ma() {
2620
+ function ba() {
2325
2621
  return { toTop: () => {
2326
2622
  window.scrollTo({
2327
2623
  top: 0,
@@ -2336,8 +2632,8 @@ function ma() {
2336
2632
  const a = document.getElementById(o);
2337
2633
  let i = "start";
2338
2634
  if (s) {
2339
- const d = as();
2340
- i = d === W.MINI_MOBILE || d === W.MOBILE_PORTRAIT ? "start" : "center";
2635
+ const d = Bs();
2636
+ i = d === J.MINI_MOBILE || d === J.MOBILE_PORTRAIT ? "start" : "center";
2341
2637
  }
2342
2638
  a == null || a.scrollIntoView({
2343
2639
  behavior: "smooth",
@@ -2351,14 +2647,14 @@ function ma() {
2351
2647
  });
2352
2648
  } };
2353
2649
  }
2354
- function ga({
2650
+ function va({
2355
2651
  meta: e = !1,
2356
2652
  ctrl: t = !1,
2357
2653
  shift: n = !1,
2358
2654
  key: r,
2359
2655
  handler: o
2360
2656
  }) {
2361
- Oe("keydown", (s) => {
2657
+ Ne("keydown", (s) => {
2362
2658
  if (s.metaKey === e) {
2363
2659
  if (s.ctrlKey !== t) return;
2364
2660
  if (s.shiftKey !== n) return;
@@ -2366,320 +2662,47 @@ function ga({
2366
2662
  }
2367
2663
  });
2368
2664
  }
2369
- const us = "useStore";
2370
- let Dn = "vapp", Fn = "1.0.4";
2371
- function qe(e) {
2372
- return `vezham-ls-${Dn}-${Fn}-${e}`;
2665
+ const js = "useStore";
2666
+ let Fn = "v0xapp", jn = "1.0.5-alpha";
2667
+ function $e(e) {
2668
+ return `vezham-ls-${Fn}-${jn}-${e}`;
2373
2669
  }
2374
- const wa = (e) => {
2375
- e.pretext && (Dn = e.pretext), e.version && (Fn = e.version);
2376
- }, ds = {
2670
+ const xa = (e) => {
2671
+ e.pretext && (Fn = e.pretext), e.version && (jn = e.version);
2672
+ }, Hs = {
2377
2673
  get: (e, t) => {
2378
2674
  try {
2379
- const n = window.localStorage.getItem(qe(e));
2675
+ const n = window.localStorage.getItem($e(e));
2380
2676
  return n && n !== "undefined" ? n : t || "";
2381
2677
  } catch (n) {
2382
- return se.error(us, `key | ${qe(e)} | err: `, n), t || "";
2678
+ return z.error(js, `key | ${$e(e)} | err: `, n), t || "";
2383
2679
  }
2384
2680
  },
2385
- has: (e) => !!ds.get(e),
2386
- set: (e, t) => window.localStorage.setItem(qe(e), t),
2387
- delete: (e) => window.localStorage.removeItem(qe(e)),
2681
+ has: (e) => !!Hs.get(e),
2682
+ set: (e, t) => window.localStorage.setItem($e(e), t),
2683
+ delete: (e) => window.localStorage.removeItem($e(e)),
2388
2684
  purge: () => window.localStorage.clear()
2389
2685
  };
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
2686
  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
2687
+ Bs as GetDevice,
2688
+ J as Vdevice,
2689
+ ga as defineAxios,
2690
+ xa as defineStore,
2691
+ wa as useAxios,
2692
+ $s as useBoolean,
2693
+ Vs as useDocumentTitle,
2694
+ Ks as useEffect,
2695
+ Ne as useEventListener,
2696
+ Ws as useLocalStorage,
2697
+ z as useLogger,
2698
+ Ys as useMap,
2699
+ ya as useMarkdown,
2700
+ Js as useMediaQuery,
2701
+ Xs as useOnClickOutside,
2702
+ ba as useScrollTo,
2703
+ va as useShortcut,
2704
+ Hs as useStore,
2705
+ zs as useToast,
2706
+ dn as useUnmount,
2707
+ Gs as useWindowSize
2685
2708
  };