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