@vezham/hooks 0.2.0 → 0.2.1

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