UNPKG

snack-alert

Version:

A simple React toast notification library with Tailwind CSS

1,647 lines (1,646 loc) 843 kB
import Og, { forwardRef as qb, createElement as Dg, createContext as KS, useContext as kS, useRef as $S, useState as WS } from "react"; import Yb from "react-dom"; var ev = { exports: {} }, e0 = {}; /** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Db; function FS() { if (Db) return e0; Db = 1; var j = Symbol.for("react.transitional.element"), ue = Symbol.for("react.fragment"); function re(x, qe, Ye) { var ct = null; if (Ye !== void 0 && (ct = "" + Ye), qe.key !== void 0 && (ct = "" + qe.key), "key" in qe) { Ye = {}; for (var Ct in qe) Ct !== "key" && (Ye[Ct] = qe[Ct]); } else Ye = qe; return qe = Ye.ref, { $$typeof: j, type: x, key: ct, ref: qe !== void 0 ? qe : null, props: Ye }; } return e0.Fragment = ue, e0.jsx = re, e0.jsxs = re, e0; } var t0 = {}; /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Ob; function IS() { return Ob || (Ob = 1, process.env.NODE_ENV !== "production" && function() { function j(N) { if (N == null) return null; if (typeof N == "function") return N.$$typeof === gt ? null : N.displayName || N.name || null; if (typeof N == "string") return N; switch (N) { case ql: return "Fragment"; case Pe: return "Profiler"; case ot: return "StrictMode"; case Yl: return "Suspense"; case xt: return "SuspenseList"; case te: return "Activity"; } if (typeof N == "object") switch (typeof N.tag == "number" && console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), N.$$typeof) { case ht: return "Portal"; case Ut: return (N.displayName || "Context") + ".Provider"; case ga: return (N._context.displayName || "Context") + ".Consumer"; case ml: var P = N.render; return N = N.displayName, N || (N = P.displayName || P.name || "", N = N !== "" ? "ForwardRef(" + N + ")" : "ForwardRef"), N; case Ve: return P = N.displayName || null, P !== null ? P : j(N.type) || "Memo"; case Lt: P = N._payload, N = N._init; try { return j(N(P)); } catch { } } return null; } function ue(N) { return "" + N; } function re(N) { try { ue(N); var P = !1; } catch { P = !0; } if (P) { P = console; var K = P.error, ie = typeof Symbol == "function" && Symbol.toStringTag && N[Symbol.toStringTag] || N.constructor.name || "Object"; return K.call( P, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", ie ), ue(N); } } function x(N) { if (N === ql) return "<>"; if (typeof N == "object" && N !== null && N.$$typeof === Lt) return "<...>"; try { var P = j(N); return P ? "<" + P + ">" : "<...>"; } catch { return "<...>"; } } function qe() { var N = we.A; return N === null ? null : N.getOwner(); } function Ye() { return Error("react-stack-top-frame"); } function ct(N) { if (ye.call(N, "key")) { var P = Object.getOwnPropertyDescriptor(N, "key").get; if (P && P.isReactWarning) return !1; } return N.key !== void 0; } function Ct(N, P) { function K() { qt || (qt = !0, console.error( "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", P )); } K.isReactWarning = !0, Object.defineProperty(N, "key", { get: K, configurable: !0 }); } function J() { var N = j(this.type); return A[N] || (A[N] = !0, console.error( "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." )), N = this.props.ref, N !== void 0 ? N : null; } function Mt(N, P, K, ie, ze, lt, He, Uu) { return K = lt.ref, N = { $$typeof: vt, type: N, key: P, props: lt, _owner: ze }, (K !== void 0 ? K : null) !== null ? Object.defineProperty(N, "ref", { enumerable: !1, get: J }) : Object.defineProperty(N, "ref", { enumerable: !1, value: null }), N._store = {}, Object.defineProperty(N._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: 0 }), Object.defineProperty(N, "_debugInfo", { configurable: !1, enumerable: !1, writable: !0, value: null }), Object.defineProperty(N, "_debugStack", { configurable: !1, enumerable: !1, writable: !0, value: He }), Object.defineProperty(N, "_debugTask", { configurable: !1, enumerable: !1, writable: !0, value: Uu }), Object.freeze && (Object.freeze(N.props), Object.freeze(N)), N; } function _e(N, P, K, ie, ze, lt, He, Uu) { var bt = P.children; if (bt !== void 0) if (ie) if (Jt(bt)) { for (ie = 0; ie < bt.length; ie++) tt(bt[ie]); Object.freeze && Object.freeze(bt); } else console.error( "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead." ); else tt(bt); if (ye.call(P, "key")) { bt = j(N); var ll = Object.keys(P).filter(function(Ei) { return Ei !== "key"; }); ie = 0 < ll.length ? "{key: someKey, " + ll.join(": ..., ") + ": ...}" : "{key: someKey}", ne[bt + ie] || (ll = 0 < ll.length ? "{" + ll.join(": ..., ") + ": ...}" : "{}", console.error( `A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`, ie, bt, ll, bt ), ne[bt + ie] = !0); } if (bt = null, K !== void 0 && (re(K), bt = "" + K), ct(P) && (re(P.key), bt = "" + P.key), "key" in P) { K = {}; for (var ba in P) ba !== "key" && (K[ba] = P[ba]); } else K = P; return bt && Ct( K, typeof N == "function" ? N.displayName || N.name || "Unknown" : N ), Mt( N, bt, lt, ze, qe(), K, He, Uu ); } function tt(N) { typeof N == "object" && N !== null && N.$$typeof === vt && N._store && (N._store.validated = 1); } var Se = Og, vt = Symbol.for("react.transitional.element"), ht = Symbol.for("react.portal"), ql = Symbol.for("react.fragment"), ot = Symbol.for("react.strict_mode"), Pe = Symbol.for("react.profiler"), ga = Symbol.for("react.consumer"), Ut = Symbol.for("react.context"), ml = Symbol.for("react.forward_ref"), Yl = Symbol.for("react.suspense"), xt = Symbol.for("react.suspense_list"), Ve = Symbol.for("react.memo"), Lt = Symbol.for("react.lazy"), te = Symbol.for("react.activity"), gt = Symbol.for("react.client.reference"), we = Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ye = Object.prototype.hasOwnProperty, Jt = Array.isArray, Rl = console.createTask ? console.createTask : function() { return null; }; Se = { react_stack_bottom_frame: function(N) { return N(); } }; var qt, A = {}, Q = Se.react_stack_bottom_frame.bind( Se, Ye )(), w = Rl(x(Ye)), ne = {}; t0.Fragment = ql, t0.jsx = function(N, P, K, ie, ze) { var lt = 1e4 > we.recentlyCreatedOwnerStacks++; return _e( N, P, K, !1, ie, ze, lt ? Error("react-stack-top-frame") : Q, lt ? Rl(x(N)) : w ); }, t0.jsxs = function(N, P, K, ie, ze) { var lt = 1e4 > we.recentlyCreatedOwnerStacks++; return _e( N, P, K, !0, ie, ze, lt ? Error("react-stack-top-frame") : Q, lt ? Rl(x(N)) : w ); }; }()), t0; } var Mb; function PS() { return Mb || (Mb = 1, process.env.NODE_ENV === "production" ? ev.exports = FS() : ev.exports = IS()), ev.exports; } var ea = PS(), Gs = /* @__PURE__ */ ((j) => (j.SUCCESS = "success", j.ERROR = "error", j.INFO = "info", j.WARNING = "warning", j))(Gs || {}); /** * @license lucide-react v0.539.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const e2 = (j) => j.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), t2 = (j) => j.replace( /^([A-Z])|[\s-_]+(\w)/g, (ue, re, x) => x ? x.toUpperCase() : re.toLowerCase() ), Ub = (j) => { const ue = t2(j); return ue.charAt(0).toUpperCase() + ue.slice(1); }, Gb = (...j) => j.filter((ue, re, x) => !!ue && ue.trim() !== "" && x.indexOf(ue) === re).join(" ").trim(), l2 = (j) => { for (const ue in j) if (ue.startsWith("aria-") || ue === "role" || ue === "title") return !0; }; /** * @license lucide-react v0.539.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ var a2 = { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }; /** * @license lucide-react v0.539.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const n2 = qb( ({ color: j = "currentColor", size: ue = 24, strokeWidth: re = 2, absoluteStrokeWidth: x, className: qe = "", children: Ye, iconNode: ct, ...Ct }, J) => Dg( "svg", { ref: J, ...a2, width: ue, height: ue, stroke: j, strokeWidth: x ? Number(re) * 24 / Number(ue) : re, className: Gb("lucide", qe), ...!Ye && !l2(Ct) && { "aria-hidden": "true" }, ...Ct }, [ ...ct.map(([Mt, _e]) => Dg(Mt, _e)), ...Array.isArray(Ye) ? Ye : [Ye] ] ) ); /** * @license lucide-react v0.539.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const n0 = (j, ue) => { const re = qb( ({ className: x, ...qe }, Ye) => Dg(n2, { ref: Ye, iconNode: ue, className: Gb( `lucide-${e2(Ub(j))}`, `lucide-${j}`, x ), ...qe }) ); return re.displayName = Ub(j), re; }; /** * @license lucide-react v0.539.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const u2 = [ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }], ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }] ], i2 = n0("circle-alert", u2); /** * @license lucide-react v0.539.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const c2 = [ ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }], ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }] ], o2 = n0("circle-check-big", c2); /** * @license lucide-react v0.539.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const f2 = [ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], ["path", { d: "M12 16v-4", key: "1dtifu" }], ["path", { d: "M12 8h.01", key: "e9boi3" }] ], s2 = n0("info", f2); /** * @license lucide-react v0.539.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const r2 = [ [ "path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3", key: "wmoenq" } ], ["path", { d: "M12 9v4", key: "juzpu7" }], ["path", { d: "M12 17h.01", key: "p32p05" }] ], d2 = n0("triangle-alert", r2); /** * @license lucide-react v0.539.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const h2 = [ ["path", { d: "M18 6 6 18", key: "1bl5f8" }], ["path", { d: "m6 6 12 12", key: "d8bk6v" }] ], y2 = n0("x", h2); function m2({ show: j, message: ue, type: re, clearAlert: x }) { return /* @__PURE__ */ ea.jsx("div", { className: `alert-container ${j ? "show" : "hide"}`, children: /* @__PURE__ */ ea.jsxs("div", { className: `alert alert-${re}`, children: [ /* @__PURE__ */ ea.jsxs("span", { className: "alert-icon", children: [ re === Gs.SUCCESS ? /* @__PURE__ */ ea.jsx(o2, { className: "size-[16px]" }) : null, re === Gs.ERROR ? /* @__PURE__ */ ea.jsx(d2, { className: "size-[16px]" }) : null, re === Gs.INFO ? /* @__PURE__ */ ea.jsx(s2, { className: "size-[16px]" }) : null, re === Gs.WARNING ? /* @__PURE__ */ ea.jsx(i2, { className: "size-[16px]" }) : null ] }), /* @__PURE__ */ ea.jsx("span", { className: "alert-message", children: ue }), /* @__PURE__ */ ea.jsx("div", { className: "ml-2", onClick: x, children: /* @__PURE__ */ ea.jsx(y2, { className: "size-[16px] cursor-pointer" }) }) ] }) }); } const Vb = KS(null), p2 = () => { const j = kS(Vb); if (!j) throw new Error("useAlert must be used within an AlertProvider"); return j; }; function v2() { const { show: j, message: ue, type: re, clearAlert: x } = p2(); return /* @__PURE__ */ ea.jsx( m2, { show: j, message: ue, type: re, clearAlert: x } ); } const Xb = ({ children: j }) => { const ue = $S(null), [re, x] = WS(null), qe = () => { ue.current && (clearTimeout(ue.current), ue.current = null), x((ct) => ct ? { ...ct, show: !1 } : null), setTimeout(() => { x(null); }, 300); }, Ye = ({ message: ct, type: Ct = Gs.INFO }) => { ue.current && (clearTimeout(ue.current), ue.current = null), x({ show: !0, message: ct, type: Ct, clearAlert: qe }), ue.current = setTimeout(() => { x((J) => J ? { ...J, show: !1 } : null), ue.current = setTimeout(() => { x(null), ue.current = null; }, 300); }, 3e3); }; return /* @__PURE__ */ ea.jsx( Vb.Provider, { value: { show: re?.show ?? !1, message: re?.message ?? "", type: re?.type ?? Gs.INFO, showAlert: Ye, clearAlert: qe }, children: j } ); }, D2 = (j) => () => /* @__PURE__ */ ea.jsx(Xb, { children: /* @__PURE__ */ ea.jsx(j, {}) }); var tv = { exports: {} }, l0 = {}, lv = { exports: {} }, Rg = {}; /** * @license React * scheduler.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var xb; function g2() { return xb || (xb = 1, function(j) { function ue(A, Q) { var w = A.length; A.push(Q); e: for (; 0 < w; ) { var ne = w - 1 >>> 1, N = A[ne]; if (0 < qe(N, Q)) A[ne] = Q, A[w] = N, w = ne; else break e; } } function re(A) { return A.length === 0 ? null : A[0]; } function x(A) { if (A.length === 0) return null; var Q = A[0], w = A.pop(); if (w !== Q) { A[0] = w; e: for (var ne = 0, N = A.length, P = N >>> 1; ne < P; ) { var K = 2 * (ne + 1) - 1, ie = A[K], ze = K + 1, lt = A[ze]; if (0 > qe(ie, w)) ze < N && 0 > qe(lt, ie) ? (A[ne] = lt, A[ze] = w, ne = ze) : (A[ne] = ie, A[K] = w, ne = K); else if (ze < N && 0 > qe(lt, w)) A[ne] = lt, A[ze] = w, ne = ze; else break e; } } return Q; } function qe(A, Q) { var w = A.sortIndex - Q.sortIndex; return w !== 0 ? w : A.id - Q.id; } if (j.unstable_now = void 0, typeof performance == "object" && typeof performance.now == "function") { var Ye = performance; j.unstable_now = function() { return Ye.now(); }; } else { var ct = Date, Ct = ct.now(); j.unstable_now = function() { return ct.now() - Ct; }; } var J = [], Mt = [], _e = 1, tt = null, Se = 3, vt = !1, ht = !1, ql = !1, ot = !1, Pe = typeof setTimeout == "function" ? setTimeout : null, ga = typeof clearTimeout == "function" ? clearTimeout : null, Ut = typeof setImmediate < "u" ? setImmediate : null; function ml(A) { for (var Q = re(Mt); Q !== null; ) { if (Q.callback === null) x(Mt); else if (Q.startTime <= A) x(Mt), Q.sortIndex = Q.expirationTime, ue(J, Q); else break; Q = re(Mt); } } function Yl(A) { if (ql = !1, ml(A), !ht) if (re(J) !== null) ht = !0, xt || (xt = !0, ye()); else { var Q = re(Mt); Q !== null && qt(Yl, Q.startTime - A); } } var xt = !1, Ve = -1, Lt = 5, te = -1; function gt() { return ot ? !0 : !(j.unstable_now() - te < Lt); } function we() { if (ot = !1, xt) { var A = j.unstable_now(); te = A; var Q = !0; try { e: { ht = !1, ql && (ql = !1, ga(Ve), Ve = -1), vt = !0; var w = Se; try { t: { for (ml(A), tt = re(J); tt !== null && !(tt.expirationTime > A && gt()); ) { var ne = tt.callback; if (typeof ne == "function") { tt.callback = null, Se = tt.priorityLevel; var N = ne( tt.expirationTime <= A ); if (A = j.unstable_now(), typeof N == "function") { tt.callback = N, ml(A), Q = !0; break t; } tt === re(J) && x(J), ml(A); } else x(J); tt = re(J); } if (tt !== null) Q = !0; else { var P = re(Mt); P !== null && qt( Yl, P.startTime - A ), Q = !1; } } break e; } finally { tt = null, Se = w, vt = !1; } Q = void 0; } } finally { Q ? ye() : xt = !1; } } } var ye; if (typeof Ut == "function") ye = function() { Ut(we); }; else if (typeof MessageChannel < "u") { var Jt = new MessageChannel(), Rl = Jt.port2; Jt.port1.onmessage = we, ye = function() { Rl.postMessage(null); }; } else ye = function() { Pe(we, 0); }; function qt(A, Q) { Ve = Pe(function() { A(j.unstable_now()); }, Q); } j.unstable_IdlePriority = 5, j.unstable_ImmediatePriority = 1, j.unstable_LowPriority = 4, j.unstable_NormalPriority = 3, j.unstable_Profiling = null, j.unstable_UserBlockingPriority = 2, j.unstable_cancelCallback = function(A) { A.callback = null; }, j.unstable_forceFrameRate = function(A) { 0 > A || 125 < A ? console.error( "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported" ) : Lt = 0 < A ? Math.floor(1e3 / A) : 5; }, j.unstable_getCurrentPriorityLevel = function() { return Se; }, j.unstable_next = function(A) { switch (Se) { case 1: case 2: case 3: var Q = 3; break; default: Q = Se; } var w = Se; Se = Q; try { return A(); } finally { Se = w; } }, j.unstable_requestPaint = function() { ot = !0; }, j.unstable_runWithPriority = function(A, Q) { switch (A) { case 1: case 2: case 3: case 4: case 5: break; default: A = 3; } var w = Se; Se = A; try { return Q(); } finally { Se = w; } }, j.unstable_scheduleCallback = function(A, Q, w) { var ne = j.unstable_now(); switch (typeof w == "object" && w !== null ? (w = w.delay, w = typeof w == "number" && 0 < w ? ne + w : ne) : w = ne, A) { case 1: var N = -1; break; case 2: N = 250; break; case 5: N = 1073741823; break; case 4: N = 1e4; break; default: N = 5e3; } return N = w + N, A = { id: _e++, callback: Q, priorityLevel: A, startTime: w, expirationTime: N, sortIndex: -1 }, w > ne ? (A.sortIndex = w, ue(Mt, A), re(J) === null && A === re(Mt) && (ql ? (ga(Ve), Ve = -1) : ql = !0, qt(Yl, w - ne))) : (A.sortIndex = N, ue(J, A), ht || vt || (ht = !0, xt || (xt = !0, ye()))), A; }, j.unstable_shouldYield = gt, j.unstable_wrapCallback = function(A) { var Q = Se; return function() { var w = Se; Se = Q; try { return A.apply(this, arguments); } finally { Se = w; } }; }; }(Rg)), Rg; } var zg = {}; /** * @license React * scheduler.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Hb; function b2() { return Hb || (Hb = 1, function(j) { process.env.NODE_ENV !== "production" && function() { function ue() { if (Yl = !1, te) { var A = j.unstable_now(); ye = A; var Q = !0; try { e: { Ut = !1, ml && (ml = !1, Ve(gt), gt = -1), ga = !0; var w = Pe; try { t: { for (ct(A), ot = x(vt); ot !== null && !(ot.expirationTime > A && J()); ) { var ne = ot.callback; if (typeof ne == "function") { ot.callback = null, Pe = ot.priorityLevel; var N = ne( ot.expirationTime <= A ); if (A = j.unstable_now(), typeof N == "function") { ot.callback = N, ct(A), Q = !0; break t; } ot === x(vt) && qe(vt), ct(A); } else qe(vt); ot = x(vt); } if (ot !== null) Q = !0; else { var P = x(ht); P !== null && Mt( Ct, P.startTime - A ), Q = !1; } } break e; } finally { ot = null, Pe = w, ga = !1; } Q = void 0; } } finally { Q ? Jt() : te = !1; } } } function re(A, Q) { var w = A.length; A.push(Q); e: for (; 0 < w; ) { var ne = w - 1 >>> 1, N = A[ne]; if (0 < Ye(N, Q)) A[ne] = Q, A[w] = N, w = ne; else break e; } } function x(A) { return A.length === 0 ? null : A[0]; } function qe(A) { if (A.length === 0) return null; var Q = A[0], w = A.pop(); if (w !== Q) { A[0] = w; e: for (var ne = 0, N = A.length, P = N >>> 1; ne < P; ) { var K = 2 * (ne + 1) - 1, ie = A[K], ze = K + 1, lt = A[ze]; if (0 > Ye(ie, w)) ze < N && 0 > Ye(lt, ie) ? (A[ne] = lt, A[ze] = w, ne = ze) : (A[ne] = ie, A[K] = w, ne = K); else if (ze < N && 0 > Ye(lt, w)) A[ne] = lt, A[ze] = w, ne = ze; else break e; } } return Q; } function Ye(A, Q) { var w = A.sortIndex - Q.sortIndex; return w !== 0 ? w : A.id - Q.id; } function ct(A) { for (var Q = x(ht); Q !== null; ) { if (Q.callback === null) qe(ht); else if (Q.startTime <= A) qe(ht), Q.sortIndex = Q.expirationTime, re(vt, Q); else break; Q = x(ht); } } function Ct(A) { if (ml = !1, ct(A), !Ut) if (x(vt) !== null) Ut = !0, te || (te = !0, Jt()); else { var Q = x(ht); Q !== null && Mt( Ct, Q.startTime - A ); } } function J() { return Yl ? !0 : !(j.unstable_now() - ye < we); } function Mt(A, Q) { gt = xt(function() { A(j.unstable_now()); }, Q); } if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()), j.unstable_now = void 0, typeof performance == "object" && typeof performance.now == "function") { var _e = performance; j.unstable_now = function() { return _e.now(); }; } else { var tt = Date, Se = tt.now(); j.unstable_now = function() { return tt.now() - Se; }; } var vt = [], ht = [], ql = 1, ot = null, Pe = 3, ga = !1, Ut = !1, ml = !1, Yl = !1, xt = typeof setTimeout == "function" ? setTimeout : null, Ve = typeof clearTimeout == "function" ? clearTimeout : null, Lt = typeof setImmediate < "u" ? setImmediate : null, te = !1, gt = -1, we = 5, ye = -1; if (typeof Lt == "function") var Jt = function() { Lt(ue); }; else if (typeof MessageChannel < "u") { var Rl = new MessageChannel(), qt = Rl.port2; Rl.port1.onmessage = ue, Jt = function() { qt.postMessage(null); }; } else Jt = function() { xt(ue, 0); }; j.unstable_IdlePriority = 5, j.unstable_ImmediatePriority = 1, j.unstable_LowPriority = 4, j.unstable_NormalPriority = 3, j.unstable_Profiling = null, j.unstable_UserBlockingPriority = 2, j.unstable_cancelCallback = function(A) { A.callback = null; }, j.unstable_forceFrameRate = function(A) { 0 > A || 125 < A ? console.error( "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported" ) : we = 0 < A ? Math.floor(1e3 / A) : 5; }, j.unstable_getCurrentPriorityLevel = function() { return Pe; }, j.unstable_next = function(A) { switch (Pe) { case 1: case 2: case 3: var Q = 3; break; default: Q = Pe; } var w = Pe; Pe = Q; try { return A(); } finally { Pe = w; } }, j.unstable_requestPaint = function() { Yl = !0; }, j.unstable_runWithPriority = function(A, Q) { switch (A) { case 1: case 2: case 3: case 4: case 5: break; default: A = 3; } var w = Pe; Pe = A; try { return Q(); } finally { Pe = w; } }, j.unstable_scheduleCallback = function(A, Q, w) { var ne = j.unstable_now(); switch (typeof w == "object" && w !== null ? (w = w.delay, w = typeof w == "number" && 0 < w ? ne + w : ne) : w = ne, A) { case 1: var N = -1; break; case 2: N = 250; break; case 5: N = 1073741823; break; case 4: N = 1e4; break; default: N = 5e3; } return N = w + N, A = { id: ql++, callback: Q, priorityLevel: A, startTime: w, expirationTime: N, sortIndex: -1 }, w > ne ? (A.sortIndex = w, re(ht, A), x(vt) === null && A === x(ht) && (ml ? (Ve(gt), gt = -1) : ml = !0, Mt(Ct, w - ne))) : (A.sortIndex = N, re(vt, A), Ut || ga || (Ut = !0, te || (te = !0, Jt()))), A; }, j.unstable_shouldYield = J, j.unstable_wrapCallback = function(A) { var Q = Pe; return function() { var w = Pe; Pe = Q; try { return A.apply(this, arguments); } finally { Pe = w; } }; }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); }(); }(zg)), zg; } var Cb; function jb() { return Cb || (Cb = 1, process.env.NODE_ENV === "production" ? lv.exports = g2() : lv.exports = b2()), lv.exports; } /** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Nb; function S2() { if (Nb) return l0; Nb = 1; var j = jb(), ue = Og, re = Yb; function x(l) { var n = "https://react.dev/errors/" + l; if (1 < arguments.length) { n += "?args[]=" + encodeURIComponent(arguments[1]); for (var u = 2; u < arguments.length; u++) n += "&args[]=" + encodeURIComponent(arguments[u]); } return "Minified React error #" + l + "; visit " + n + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."; } function qe(l) { return !(!l || l.nodeType !== 1 && l.nodeType !== 9 && l.nodeType !== 11); } function Ye(l) { var n = l, u = l; if (l.alternate) for (; n.return; ) n = n.return; else { l = n; do n = l, (n.flags & 4098) !== 0 && (u = n.return), l = n.return; while (l); } return n.tag === 3 ? u : null; } function ct(l) { if (l.tag === 13) { var n = l.memoizedState; if (n === null && (l = l.alternate, l !== null && (n = l.memoizedState)), n !== null) return n.dehydrated; } return null; } function Ct(l) { if (Ye(l) !== l) throw Error(x(188)); } function J(l) { var n = l.alternate; if (!n) { if (n = Ye(l), n === null) throw Error(x(188)); return n !== l ? null : l; } for (var u = l, c = n; ; ) { var s = u.return; if (s === null) break; var r = s.alternate; if (r === null) { if (c = s.return, c !== null) { u = c; continue; } break; } if (s.child === r.child) { for (r = s.child; r; ) { if (r === u) return Ct(s), l; if (r === c) return Ct(s), n; r = r.sibling; } throw Error(x(188)); } if (u.return !== c.return) u = s, c = r; else { for (var y = !1, m = s.child; m; ) { if (m === u) { y = !0, u = s, c = r; break; } if (m === c) { y = !0, c = s, u = r; break; } m = m.sibling; } if (!y) { for (m = r.child; m; ) { if (m === u) { y = !0, u = r, c = s; break; } if (m === c) { y = !0, c = r, u = s; break; } m = m.sibling; } if (!y) throw Error(x(189)); } } if (u.alternate !== c) throw Error(x(190)); } if (u.tag !== 3) throw Error(x(188)); return u.stateNode.current === u ? l : n; } function Mt(l) { var n = l.tag; if (n === 5 || n === 26 || n === 27 || n === 6) return l; for (l = l.child; l !== null; ) { if (n = Mt(l), n !== null) return n; l = l.sibling; } return null; } var _e = Object.assign, tt = Symbol.for("react.element"), Se = Symbol.for("react.transitional.element"), vt = Symbol.for("react.portal"), ht = Symbol.for("react.fragment"), ql = Symbol.for("react.strict_mode"), ot = Symbol.for("react.profiler"), Pe = Symbol.for("react.provider"), ga = Symbol.for("react.consumer"), Ut = Symbol.for("react.context"), ml = Symbol.for("react.forward_ref"), Yl = Symbol.for("react.suspense"), xt = Symbol.for("react.suspense_list"), Ve = Symbol.for("react.memo"), Lt = Symbol.for("react.lazy"), te = Symbol.for("react.activity"), gt = Symbol.for("react.memo_cache_sentinel"), we = Symbol.iterator; function ye(l) { return l === null || typeof l != "object" ? null : (l = we && l[we] || l["@@iterator"], typeof l == "function" ? l : null); } var Jt = Symbol.for("react.client.reference"); function Rl(l) { if (l == null) return null; if (typeof l == "function") return l.$$typeof === Jt ? null : l.displayName || l.name || null; if (typeof l == "string") return l; switch (l) { case ht: return "Fragment"; case ot: return "Profiler"; case ql: return "StrictMode"; case Yl: return "Suspense"; case xt: return "SuspenseList"; case te: return "Activity"; } if (typeof l == "object") switch (l.$$typeof) { case vt: return "Portal"; case Ut: return (l.displayName || "Context") + ".Provider"; case ga: return (l._context.displayName || "Context") + ".Consumer"; case ml: var n = l.render; return l = l.displayName, l || (l = n.displayName || n.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l; case Ve: return n = l.displayName || null, n !== null ? n : Rl(l.type) || "Memo"; case Lt: n = l._payload, l = l._init; try { return Rl(l(n)); } catch { } } return null; } var qt = Array.isArray, A = ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Q = re.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, w = { pending: !1, data: null, method: null, action: null }, ne = [], N = -1; function P(l) { return { current: l }; } function K(l) { 0 > N || (l.current = ne[N], ne[N] = null, N--); } function ie(l, n) { N++, ne[N] = l.current, l.current = n; } var ze = P(null), lt = P(null), He = P(null), Uu = P(null); function bt(l, n) { switch (ie(He, n), ie(lt, l), ie(ze, null), n.nodeType) { case 9: case 11: l = (l = n.documentElement) && (l = l.namespaceURI) ? gu(l) : 0; break; default: if (l = n.tagName, n = n.namespaceURI) n = gu(n), l = Do(n, l); else switch (l) { case "svg": l = 1; break; case "math": l = 2; break; default: l = 0; } } K(ze), ie(ze, l); } function ll() { K(ze), K(lt), K(He); } function ba(l) { l.memoizedState !== null && ie(Uu, l); var n = ze.current, u = Do(n, l.type); n !== u && (ie(lt, l), ie(ze, u)); } function Ei(l) { lt.current === l && (K(ze), K(lt)), Uu.current === l && (K(Uu), Il._currentValue = w); } var Vs = Object.prototype.hasOwnProperty, Ai = j.unstable_scheduleCallback, oh = j.unstable_cancelCallback, av = j.unstable_shouldYield, Ri = j.unstable_requestPaint, ta = j.unstable_now, Wo = j.unstable_getCurrentPriorityLevel, u0 = j.unstable_ImmediatePriority, fh = j.unstable_UserBlockingPriority, Fo = j.unstable_NormalPriority, sh = j.unstable_LowPriority, Cc = j.unstable_IdlePriority, nv = j.log, i0 = j.unstable_setDisableYieldValue, Nc = null, zl = null; function $n(l) { if (typeof nv == "function" && i0(l), zl && typeof zl.setStrictMode == "function") try { zl.setStrictMode(Nc, l); } catch { } } var Gl = Math.clz32 ? Math.clz32 : uv, rh = Math.log, c0 = Math.LN2; function uv(l) { return l >>>= 0, l === 0 ? 32 : 31 - (rh(l) / c0 | 0) | 0; } var _c = 256, Wn = 4194304; function la(l) { var n = l & 42; if (n !== 0) return n; switch (l & -l) { case 1: return 1; case 2: return 2; case 4: return 4; case 8: return 8; case 16: return 16; case 32: return 32; case 64: return 64; case 128: return 128; case 256: case 512: case 1024: case 2048: case 4096: case 8192: case 16384: case 32768: case 65536: case 131072: case 262144: case 524288: case 1048576: case 2097152: return l & 4194048; case 4194304: case 8388608: case 16777216: case 33554432: return l & 62914560; case 67108864: return 67108864; case 134217728: return 134217728; case 268435456: return 268435456; case 536870912: return 536870912; case 1073741824: return 0; default: return l; } } function xu(l, n, u) { var c = l.pendingLanes; if (c === 0) return 0; var s = 0, r = l.suspendedLanes, y = l.pingedLanes; l = l.warmLanes; var m = c & 134217727; return m !== 0 ? (c = m & ~r, c !== 0 ? s = la(c) : (y &= m, y !== 0 ? s = la(y) : u || (u = m & ~l, u !== 0 && (s = la(u))))) : (m = c & ~r, m !== 0 ? s = la(m) : y !== 0 ? s = la(y) : u || (u = c & ~l, u !== 0 && (s = la(u)))), s === 0 ? 0 : n !== 0 && n !== s && (n & r) === 0 && (r = s & -s, u = n & -n, r >= u || r === 32 && (u & 4194048) !== 0) ? n : s; } function nn(l, n) { return (l.pendingLanes & ~(l.suspendedLanes & ~l.pingedLanes) & n) === 0; } function Kt(l, n) { switch (l) { case 1: case 2: case 4: case 8: case 64: return n + 250; case 16: case 32: case 128: case 256: case 512: case 1024: case 2048: case 4096: case 8192: case 16384: case 32768: case 65536: case 131072: case 262144: case 524288: case 1048576: case 2097152: return n + 5e3; case 4194304: case 8388608: case 16777216: case 33554432: return -1; case 67108864: case 134217728: case 268435456: case 536870912: case 1073741824: return -1; default: return -1; } } function Hu() { var l = _c; return _c <<= 1, (_c & 4194048) === 0 && (_c = 256), l; } function zi() { var l = Wn; return Wn <<= 1, (Wn & 62914560) === 0 && (Wn = 4194304), l; } function Cu(l) { for (var n = [], u = 0; 31 > u; u++) n.push(l); return n; } function Di(l, n) { l.pendingLanes |= n, n !== 268435456 && (l.suspendedLanes = 0, l.pingedLanes = 0, l.warmLanes = 0); } function o0(l, n, u, c, s, r) { var y = l.pendingLanes; l.pendingLanes = u, l.suspendedLanes = 0, l.pingedLanes = 0, l.warmLanes = 0, l.expiredLanes &= u, l.entangledLanes &= u, l.errorRecoveryDisabledLanes &= u, l.shellSuspendCounter = 0; var m = l.entanglements, g = l.expirationTimes, D = l.hiddenUpdates; for (u = y & ~u; 0 < u; ) { var G = 31 - Gl(u), X = 1 << G; m[G] = 0, g[G] = -1; var M = D[G]; if (M !== null) for (D[G] = null, G = 0; G < M.length; G++) { var H = M[G]; H !== null && (H.lane &= -536870913); } u &= ~X; } c !== 0 && Io(l, c, 0), r !== 0 && s === 0 && l.tag !== 0 && (l.suspendedLanes |= r & ~(y & ~n)); } function Io(l, n, u) { l.pendingLanes |= n, l.suspendedLanes &= ~n; var c = 31 - Gl(n); l.entangledLanes |= n, l.entanglements[c] = l.entanglements[c] | 1073741824 | u & 4194090; } function Po(l, n) { var u = l.entangledLanes |= n; for (l = l.entanglements; u; ) { var c = 31 - Gl(u), s = 1 << c; s & n | l[c] & n && (l[c] |= n), u &= ~s; } } function Va(l) { switch (l) { case 2: l = 1; break; case 8: l = 4; break; case 32: l = 16; break; case 256: case 512: case 1024: case 2048: case 4096: case 8192: case 16384: case 32768: case 65536: case 131072: case 262144: case 524288: case 1048576: case 2097152: case 4194304: case 8388608: case 16777216: case 33554432: l = 128; break; case 268435456: l = 134217728; break; default: l = 0; } return l; } function Xs(l) { return l &= -l, 2 < l ? 8 < l ? (l & 134217727) !== 0 ? 32 : 268435456 : 8 : 2; } function f0() { var l = Q.p; return l !== 0 ? l : (l = window.event, l === void 0 ? 32 : mm(l.type)); } function iv(l, n) { var u = Q.p; try { return Q.p = l, n(); } finally { Q.p = u; } } var Yt = Math.random().toString(36).slice(2), kt = "__reactFiber$" + Yt, Dl = "__reactProps$" + Yt, Bc = "__reactContainer$" + Yt, js = "__reactEvents$" + Yt, s0 = "__reactListeners$" + Yt, Qs = "__reactHandles$" + Yt, r0 = "__reactResources$" + Yt, W = "__reactMarker$" + Yt; function ef(l) { delete l[kt], delete l[Dl], delete l[js], delete l[s0], delete l[Qs]; } function al(l) { var n = l[kt]; if (n) return n; for (var u = l.parentNode; u; ) { if (n = u[Bc] || u[kt]) { if (u = n.alternate, n.child !== null || u !== null && u.child !== null) for (l = sl(l); l !== null; ) { if (u = l[kt]) return u; l = sl(l); } return n; } l = u, u = l.parentNode; } return null; } function Oi(l) { if (l = l[kt] || l[Bc]) { var n = l.tag; if (n === 5 || n === 6 || n === 13 || n === 26 || n === 27 || n === 3) return l; } return null; } function tf(l) { var n = l.tag; if (n === 5 || n === 26 || n === 27 || n === 6) return l.stateNode; throw Error(x(33)); } function Fn(l) { var n = l[r0]; return n || (n = l[r0] = { hoistableStyles: /* @__PURE__ */ new Map(), hoistableScripts: /* @__PURE__ */ new Map() }), n; } function Gt(l) { l[W] = !0; } var lf = /* @__PURE__ */ new Set(), aa = {}; function Nu(l, n) { _u(l, n), _u(l + "Capture", n); } function _u(l, n) { for (aa[l] = n, l = 0; l < n.length; l++) lf.add(n[l]); } var d0 = RegExp( "^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$" ), Zs = {}, dh = {}; function h0(l) { return Vs.call(dh, l) ? !0 : Vs.call(Zs, l) ? !1 : d0.test(l) ? dh[l] = !0 : (Zs[l] = !0, !1); } function In(l, n, u) { if (h0(n)) if (u === null) l.removeAttribute(n); else { switch (typeof u) { case "undefined": case "function": case "symbol": l.removeAttribute(n); return; case "boolean": var c = n.toLowerCase().slice(0, 5); if (c !== "data-" && c !== "aria-") { l.removeAttribute(n); return; } } l.setAttribute(n, "" + u); } } function af(l, n, u) { if (u === null) l.removeAttribute(n); else { switch (typeof u) { case "undefined": case "function": case "symbol": case "boolean": l.removeAttribute(n); return; } l.setAttribute(n, "" + u); } } function un(l, n, u, c) { if (c === null) l.removeAttribute(u); else { switch (typeof c) { case "undefined": case "function": case "symbol": case "boolean": l.removeAttribute(u); return; } l.setAttributeNS(n, u, "" + c); } } var ws, hh; function Mi(l) { if (ws === void 0) try { throw Error(); } catch (u) { var n = u.stack.trim().match(/\n( *(at )?)/); ws = n && n[1] || "", hh = -1 < u.stack.indexOf(` at`) ? " (<anonymous>)" : -1 < u.stack.indexOf("@") ? "@unknown:0:0" : ""; } return ` ` + ws + l + hh; } var Ol = !1; function Bu(l, n) { if (!l || Ol) return ""; Ol = !0; var u = Error.prepareStackTrace; Error.prepareStackTrace = void 0; try { var c = { DetermineComponentFrameRoot: function() { try { if (n) { var X = function() { throw Error(); }; if (Object.defineProperty(X.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(X, []); } catch (H) { var M = H; } Reflect.construct(l, [], X); } else { try { X.call(); } catch (H) { M = H; } l.call(X.prototype); } } else { try { throw Error(); } catch (H) { M = H; } (X = l()) && typeof X.catch == "function" && X.catch(function() { }); } } catch (H) { if (H && M && typeof H.stack == "string") return [H.stack, M.stack]; } return [null, null]; } }; c.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot"; var s = Object.getOwnPropertyDescriptor( c.DetermineComponentFrameRoot, "name" ); s && s.configurable && Object.defineProperty( c.DetermineComponentFrameRoot, "name", { value: "DetermineComponentFrameRoot" } ); var r = c.DetermineComponentFrameRoot(), y = r[0], m = r[1]; if (y && m) { var g = y.split(` `), D = m.split(` `); for (s = c = 0; c < g.length && !g[c].includes("DetermineComponentFrameRoot"); ) c++; for (; s < D.length && !D[s].includes( "DetermineComponentFrameRoot" ); ) s++; if (c === g.length || s === D.length) for (c = g.length - 1, s = D.length - 1; 1 <= c && 0 <= s && g[c] !== D[s]; ) s--; for (; 1 <= c && 0 <= s; c--, s--) if (g[c] !== D[s]) { if (c !== 1 || s !== 1) do if (c--, s--, 0 > s || g[c] !== D[s]) { var G = ` ` + g[c].replace(" at new ", " at "); return l.displayName && G.includes("<anonymous>") && (G = G.replace("<anonymous>", l.displayName)), G; } while (1 <= c && 0 <= s); break; } } } finally { Ol = !1, Error.prepareStackTrace = u; } return (u = l ? l.displayName || l.name : "") ? Mi(u) : ""; } function Ui(l) { switch (l.tag) { case 26: case 27: case 5: return Mi(l.type); case 16: return Mi("Lazy"); case 13: return Mi("Suspense"); case 19: return Mi("SuspenseList"); case 0: case 15: return Bu(l.type, !1); case 11: return Bu(l.type.render, !1); case 1: return Bu(l.type, !0); case 31: return Mi("Activity"); default: return ""; } } function yh(l) { try { var n = ""; do n += Ui(l), l = l.return; while (l); return n; } catch (u) { return ` Error generating stack: ` + u.message + ` ` + u.stack; } } function pl(l) { switch (typeof l) { case "bigint": case "boolean": case "number": case "string": case "undefined": return l; case "object": return l; default: return "";