var wS = Object.defineProperty; var AS = (e, t, n) => t in e ? wS(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var O = (e, t, n) => AS(e, typeof t != "symbol" ? t + "" : t, n); function bS(e, t) { for (var n = 0; n < t.length; n++) { const r = t[n]; if (typeof r != "string" && !Array.isArray(r)) { for (const i in r) if (i !== "default" && !(i in e)) { const s = Object.getOwnPropertyDescriptor(r, i); s && Object.defineProperty(e, i, s.get ? s : { enumerable: !0, get: () => r[i] }); } } } return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" })); } const Ot = { BASE_URL: "/", DEV: !1, MODE: "production", NZ_AWS_REGION: "us-east-1", PROD: !0, SSR: !1, STAGE: "prod" }; let CS = 0; function Xt(e, t) { const n = `atom${++CS}`, r = { toString() { return (Ot ? "production" : void 0) !== "production" && this.debugLabel ? n + ":" + this.debugLabel : n; } }; return typeof e == "function" ? r.read = e : (r.init = e, r.read = OS, r.write = TS), t && (r.write = t), r; } function OS(e) { return e(this); } function TS(e, t, n) { return t( this, typeof n == "function" ? n(e(this)) : n ); } const Xf = (e, t) => e.unstable_is ? e.unstable_is(t) : t === e, Ul = (e) => "init" in e, Vl = (e) => !!e.write, Yo = /* @__PURE__ */ new WeakMap(), Mu = (e) => { var t; return Uu(e) && !((t = Yo.get(e)) != null && t[1]); }, xS = (e, t) => { const n = Yo.get(e); if (n) n[1] = !0, n[0].forEach((r) => r(t)); else if ((Ot ? "production" : void 0) !== "production") throw new Error("[Bug] cancelable promise not found"); }, RS = (e) => { if (Yo.has(e)) return; const t = [/* @__PURE__ */ new Set(), !1]; Yo.set(e, t); const n = () => { t[1] = !0; }; e.then(n, n), e.onCancel = (r) => { t[0].add(r); }; }, Uu = (e) => typeof (e == null ? void 0 : e.then) == "function", Zf = (e) => "v" in e || "e" in e, no = (e) => { if ("e" in e) throw e.e; if ((Ot ? "production" : void 0) !== "production" && !("v" in e)) throw new Error("[Bug] atom state is not initialized"); return e.v; }, Bm = (e, t, n) => { n.p.has(e) || (n.p.add(e), t.then( () => { n.p.delete(e); }, () => { n.p.delete(e); } )); }, eh = (e, t, n, r, i) => { var s; if ((Ot ? "production" : void 0) !== "production" && r === t) throw new Error("[Bug] atom cannot depend on itself"); n.d.set(r, i.n), Mu(n.v) && Bm(t, n.v, i), (s = i.m) == null || s.t.add(t), e && IS(e, r, t); }, Tr = () => [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map(), /* @__PURE__ */ new Set()], jl = (e, t, n) => { e[0].has(t) || e[0].set(t, /* @__PURE__ */ new Set()), e[1].set(t, n); }, IS = (e, t, n) => { const r = e[0].get(t); r && r.add(n); }, PS = (e, t) => e[0].get(t), th = (e, t) => { e[2].add(t); }, Jn = (e) => { for (; e[1].size || e[2].size; ) { e[0].clear(); const t = new Set(e[1].values()); e[1].clear(); const n = new Set(e[2]); e[2].clear(), t.forEach((r) => { var i; return (i = r.m) == null ? void 0 : i.l.forEach((s) => s()); }), n.forEach((r) => r()); } }, zm = (e) => { let t; (Ot ? "production" : void 0) !== "production" && (t = /* @__PURE__ */ new Set()); const n = (m, k, h) => { const p = "v" in k, y = k.v, S = Mu(k.v) ? k.v : null; if (Uu(h)) { RS(h); for (const N of k.d.keys()) Bm( m, h, e(N, k) ); k.v = h, delete k.e; } else k.v = h, delete k.e; (!p || !Object.is(y, k.v)) && (++k.n, S && xS(S, h)); }, r = (m, k, h, p) => { var y; if (!(p != null && p(k)) && Zf(h) && (h.m || Array.from(h.d).every( ([I, F]) => ( // Recursively, read the atom state of the dependency, and // check if the atom epoch number is unchanged r(m, I, e(I, h), p).n === F ) ))) return h; h.d.clear(); let S = !0; const N = (I) => { if (Xf(k, I)) { const P = e(I, h); if (!Zf(P)) if (Ul(I)) n(I, P, I.init); else throw new Error("no atom init"); return no(P); } const F = r( m, I, e(I, h), p ); if (S) eh(m, k, h, I, F); else { const P = Tr(); eh(P, k, h, I, F), u(P, k, h), Jn(P); } return no(F); }; let E, A; const b = { get signal() { return E || (E = new AbortController()), E.signal; }, get setSelf() { return (Ot ? "production" : void 0) !== "production" && !Vl(k) && console.warn("setSelf function cannot be used with read-only atom"), !A && Vl(k) && (A = (...I) => { if ((Ot ? "production" : void 0) !== "production" && S && console.warn("setSelf function cannot be called in sync"), !S) return l(k, ...I); }), A; } }; try { const I = k.read(N, b); if (n(k, h, I), Uu(I)) { (y = I.onCancel) == null || y.call(I, () => E == null ? void 0 : E.abort()); const F = () => { if (h.m) { const P = Tr(); u(P, k, h), Jn(P); } }; I.then(F, F); } return h; } catch (I) { return delete h.v, h.e = I, ++h.n, h; } finally { S = !1; } }, i = (m) => no(r(void 0, m, e(m))), s = (m, k, h) => { var p, y; const S = /* @__PURE__ */ new Map(); for (const N of ((p = h.m) == null ? void 0 : p.t) || []) S.set(N, e(N, h)); for (const N of h.p) S.set( N, e(N, h) ); return (y = PS(m, k)) == null || y.forEach((N) => { S.set(N, e(N, h)); }), S; }, o = (m, k, h) => { const p = [], y = /* @__PURE__ */ new Set(), S = (A, b) => { if (!y.has(A)) { y.add(A); for (const [I, F] of s(m, A, b)) A !== I && S(I, F); p.push([A, b, b.n]); } }; S(k, h); const N = /* @__PURE__ */ new Set([k]), E = (A) => y.has(A); for (let A = p.length - 1; A >= 0; --A) { const [b, I, F] = p[A]; let P = !1; for (const W of I.d.keys()) if (W !== b && N.has(W)) { P = !0; break; } P && (r(m, b, I, E), u(m, b, I), F !== I.n && (jl(m, b, I), N.add(b))), y.delete(b); } }, a = (m, k, h, ...p) => { const y = (E) => no(r(m, E, e(E, h))), S = (E, ...A) => { const b = e(E, h); let I; if (Xf(k, E)) { if (!Ul(E)) throw new Error("atom not writable"); const F = "v" in b, P = b.v, W = A[0]; n(E, b, W), u(m, E, b), (!F || !Object.is(P, b.v)) && (jl(m, E, b), o(m, E, b)); } else I = a(m, E, b, ...A); return Jn(m), I; }; return k.write(y, S, ...p); }, l = (m, ...k) => { const h = Tr(), p = a(h, m, e(m), ...k); return Jn(h), p; }, u = (m, k, h) => { if (h.m && !Mu(h.v)) { for (const p of h.d.keys()) h.m.d.has(p) || (c(m, p, e(p, h)).t.add(k), h.m.d.add(p)); for (const p of h.m.d || []) if (!h.d.has(p)) { h.m.d.delete(p); const y = d(m, p, e(p, h)); y == null || y.t.delete(k); } } }, c = (m, k, h) => { if (!h.m) { r(m, k, h); for (const p of h.d.keys()) c(m, p, e(p, h)).t.add(k); if (h.m = { l: /* @__PURE__ */ new Set(), d: new Set(h.d.keys()), t: /* @__PURE__ */ new Set() }, (Ot ? "production" : void 0) !== "production" && t.add(k), Vl(k) && k.onMount) { const p = h.m, { onMount: y } = k; th(m, () => { const S = y( (...N) => a(m, k, h, ...N) ); S && (p.u = S); }); } } return h.m; }, d = (m, k, h) => { if (h.m && !h.m.l.size && !Array.from(h.m.t).some( (p) => { var y; return (y = e(p, h).m) == null ? void 0 : y.d.has(k); } )) { const p = h.m.u; p && th(m, p), delete h.m, (Ot ? "production" : void 0) !== "production" && t.delete(k); for (const y of h.d.keys()) { const S = d(m, y, e(y, h)); S == null || S.t.delete(k); } return; } return h.m; }, g = { get: i, set: l, sub: (m, k) => { const h = Tr(), p = e(m), y = c(h, m, p); Jn(h); const S = y.l; return S.add(k), () => { S.delete(k); const N = Tr(); d(N, m, p), Jn(N); }; }, unstable_derive: (m) => zm(...m(e)) }; return (Ot ? "production" : void 0) !== "production" && Object.assign(g, { // store dev methods (these are tentative and subject to change without notice) dev4_get_internal_weak_map: () => ({ get: (k) => { const h = e(k); if (h.n !== 0) return h; } }), dev4_get_mounted_atoms: () => t, dev4_restore_atoms: (k) => { const h = Tr(); for (const [p, y] of k) if (Ul(p)) { const S = e(p), N = "v" in S, E = S.v; n(p, S, y), u(h, p, S), (!N || !Object.is(E, S.v)) && (jl(h, p, S), o(h, p, S)); } Jn(h); } }), g; }, LS = () => { const e = /* @__PURE__ */ new WeakMap(); return zm((n) => { let r = e.get(n); return r || (r = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 }, e.set(n, r)), r; }); }; let xi; const FS = () => (xi || (xi = LS(), (Ot ? "production" : void 0) !== "production" && (globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = xi), globalThis.__JOTAI_DEFAULT_STORE__ !== xi && console.warn( "Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044" ))), xi); var Sd = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function za(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var Hm = { exports: {} }, q = {}; /** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var js = Symbol.for("react.element"), DS = Symbol.for("react.portal"), $S = Symbol.for("react.fragment"), MS = Symbol.for("react.strict_mode"), US = Symbol.for("react.profiler"), VS = Symbol.for("react.provider"), jS = Symbol.for("react.context"), BS = Symbol.for("react.forward_ref"), zS = Symbol.for("react.suspense"), HS = Symbol.for("react.memo"), GS = Symbol.for("react.lazy"), nh = Symbol.iterator; function WS(e) { return e === null || typeof e != "object" ? null : (e = nh && e[nh] || e["@@iterator"], typeof e == "function" ? e : null); } var Gm = { isMounted: function() { return !1; }, enqueueForceUpdate: function() { }, enqueueReplaceState: function() { }, enqueueSetState: function() { } }, Wm = Object.assign, qm = {}; function yi(e, t, n) { this.props = e, this.context = t, this.refs = qm, this.updater = n || Gm; } yi.prototype.isReactComponent = {}; yi.prototype.setState = function(e, t) { if (typeof e != "object" && typeof e != "function" && e != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); this.updater.enqueueSetState(this, e, t, "setState"); }; yi.prototype.forceUpdate = function(e) { this.updater.enqueueForceUpdate(this, e, "forceUpdate"); }; function Km() { } Km.prototype = yi.prototype; function _d(e, t, n) { this.props = e, this.context = t, this.refs = qm, this.updater = n || Gm; } var Nd = _d.prototype = new Km(); Nd.constructor = _d; Wm(Nd, yi.prototype); Nd.isPureReactComponent = !0; var rh = Array.isArray, Qm = Object.prototype.hasOwnProperty, Ed = { current: null }, Jm = { key: !0, ref: !0, __self: !0, __source: !0 }; function Ym(e, t, n) { var r, i = {}, s = null, o = null; if (t != null) for (r in t.ref !== void 0 && (o = t.ref), t.key !== void 0 && (s = "" + t.key), t) Qm.call(t, r) && !Jm.hasOwnProperty(r) && (i[r] = t[r]); var a = arguments.length - 2; if (a === 1) i.children = n; else if (1 < a) { for (var l = Array(a), u = 0; u < a; u++) l[u] = arguments[u + 2]; i.children = l; } if (e && e.defaultProps) for (r in a = e.defaultProps, a) i[r] === void 0 && (i[r] = a[r]); return { $$typeof: js, type: e, key: s, ref: o, props: i, _owner: Ed.current }; } function qS(e, t) { return { $$typeof: js, type: e.type, key: t, ref: e.ref, props: e.props, _owner: e._owner }; } function wd(e) { return typeof e == "object" && e !== null && e.$$typeof === js; } function KS(e) { var t = { "=": "=0", ":": "=2" }; return "$" + e.replace(/[=:]/g, function(n) { return t[n]; }); } var ih = /\/+/g; function Bl(e, t) { return typeof e == "object" && e !== null && e.key != null ? KS("" + e.key) : t.toString(36); } function Io(e, t, n, r, i) { var s = typeof e; (s === "undefined" || s === "boolean") && (e = null); var o = !1; if (e === null) o = !0; else switch (s) { case "string": case "number": o = !0; break; case "object": switch (e.$$typeof) { case js: case DS: o = !0; } } if (o) return o = e, i = i(o), e = r === "" ? "." + Bl(o, 0) : r, rh(i) ? (n = "", e != null && (n = e.replace(ih, "$&/") + "/"), Io(i, t, n, "", function(u) { return u; })) : i != null && (wd(i) && (i = qS(i, n + (!i.key || o && o.key === i.key ? "" : ("" + i.key).replace(ih, "$&/") + "/") + e)), t.push(i)), 1; if (o = 0, r = r === "" ? "." : r + ":", rh(e)) for (var a = 0; a < e.length; a++) { s = e[a]; var l = r + Bl(s, a); o += Io(s, t, n, l, i); } else if (l = WS(e), typeof l == "function") for (e = l.call(e), a = 0; !(s = e.next()).done; ) s = s.value, l = r + Bl(s, a++), o += Io(s, t, n, l, i); else if (s === "object") throw t = String(e), Error("Objects are not valid as a React child (found: " + (t === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : t) + "). If you meant to render a collection of children, use an array instead."); return o; } function ro(e, t, n) { if (e == null) return e; var r = [], i = 0; return Io(e, r, "", "", function(s) { return t.call(n, s, i++); }), r; } function QS(e) { if (e._status === -1) { var t = e._result; t = t(), t.then(function(n) { (e._status === 0 || e._status === -1) && (e._status = 1, e._result = n); }, function(n) { (e._status === 0 || e._status === -1) && (e._status = 2, e._result = n); }), e._status === -1 && (e._status = 0, e._result = t); } if (e._status === 1) return e._result.default; throw e._result; } var $e = { current: null }, Po = { transition: null }, JS = { ReactCurrentDispatcher: $e, ReactCurrentBatchConfig: Po, ReactCurrentOwner: Ed }; function Xm() { throw Error("act(...) is not supported in production builds of React."); } q.Children = { map: ro, forEach: function(e, t, n) { ro(e, function() { t.apply(this, arguments); }, n); }, count: function(e) { var t = 0; return ro(e, function() { t++; }), t; }, toArray: function(e) { return ro(e, function(t) { return t; }) || []; }, only: function(e) { if (!wd(e)) throw Error("React.Children.only expected to receive a single React element child."); return e; } }; q.Component = yi; q.Fragment = $S; q.Profiler = US; q.PureComponent = _d; q.StrictMode = MS; q.Suspense = zS; q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = JS; q.act = Xm; q.cloneElement = function(e, t, n) { if (e == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + "."); var r = Wm({}, e.props), i = e.key, s = e.ref, o = e._owner; if (t != null) { if (t.ref !== void 0 && (s = t.ref, o = Ed.current), t.key !== void 0 && (i = "" + t.key), e.type && e.type.defaultProps) var a = e.type.defaultProps; for (l in t) Qm.call(t, l) && !Jm.hasOwnProperty(l) && (r[l] = t[l] === void 0 && a !== void 0 ? a[l] : t[l]); } var l = arguments.length - 2; if (l === 1) r.children = n; else if (1 < l) { a = Array(l); for (var u = 0; u < l; u++) a[u] = arguments[u + 2]; r.children = a; } return { $$typeof: js, type: e.type, key: i, ref: s, props: r, _owner: o }; }; q.createContext = function(e) { return e = { $$typeof: jS, _currentValue: e, _currentValue2: e, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, e.Provider = { $$typeof: VS, _context: e }, e.Consumer = e; }; q.createElement = Ym; q.createFactory = function(e) { var t = Ym.bind(null, e); return t.type = e, t; }; q.createRef = function() { return { current: null }; }; q.forwardRef = function(e) { return { $$typeof: BS, render: e }; }; q.isValidElement = wd; q.lazy = function(e) { return { $$typeof: GS, _payload: { _status: -1, _result: e }, _init: QS }; }; q.memo = function(e, t) { return { $$typeof: HS, type: e, compare: t === void 0 ? null : t }; }; q.startTransition = function(e) { var t = Po.transition; Po.transition = {}; try { e(); } finally { Po.transition = t; } }; q.unstable_act = Xm; q.useCallback = function(e, t) { return $e.current.useCallback(e, t); }; q.useContext = function(e) { return $e.current.useContext(e); }; q.useDebugValue = function() { }; q.useDeferredValue = function(e) { return $e.current.useDeferredValue(e); }; q.useEffect = function(e, t) { return $e.current.useEffect(e, t); }; q.useId = function() { return $e.current.useId(); }; q.useImperativeHandle = function(e, t, n) { return $e.current.useImperativeHandle(e, t, n); }; q.useInsertionEffect = function(e, t) { return $e.current.useInsertionEffect(e, t); }; q.useLayoutEffect = function(e, t) { return $e.current.useLayoutEffect(e, t); }; q.useMemo = function(e, t) { return $e.current.useMemo(e, t); }; q.useReducer = function(e, t, n) { return $e.current.useReducer(e, t, n); }; q.useRef = function(e) { return $e.current.useRef(e); }; q.useState = function(e) { return $e.current.useState(e); }; q.useSyncExternalStore = function(e, t, n) { return $e.current.useSyncExternalStore(e, t, n); }; q.useTransition = function() { return $e.current.useTransition(); }; q.version = "18.3.1"; Hm.exports = q; var U = Hm.exports; const Vu = /* @__PURE__ */ za(U), Zm = { BASE_URL: "/", DEV: !1, MODE: "production", NZ_AWS_REGION: "us-east-1", PROD: !0, SSR: !1, STAGE: "prod" }, YS = U.createContext( void 0 ), eg = (e) => U.useContext(YS) || FS(), tg = (e) => typeof (e == null ? void 0 : e.then) == "function", XS = (e) => { e.status = "pending", e.then( (t) => { e.status = "fulfilled", e.value = t; }, (t) => { e.status = "rejected", e.reason = t; } ); }, ZS = Vu.use || ((e) => { if (e.status === "pending") throw e; if (e.status === "fulfilled") return e.value; throw e.status === "rejected" ? e.reason : (XS(e), e); }), zl = /* @__PURE__ */ new WeakMap(), e_ = (e) => { let t = zl.get(e); return t || (t = new Promise((n, r) => { let i = e; const s = (l) => (u) => { i === l && n(u); }, o = (l) => (u) => { i === l && r(u); }, a = (l) => { "onCancel" in l && typeof l.onCancel == "function" && l.onCancel((u) => { if ((Zm ? "production" : void 0) !== "production" && u === l) throw new Error("[Bug] p is not updated even after cancelation"); tg(u) ? (zl.set(u, t), i = u, u.then(s(u), o(u)), a(u)) : n(u); }); }; e.then(s(e), o(e)), a(e); }), zl.set(e, t)), t; }; function Xo(e, t) { const n = eg(), [[r, i, s], o] = U.useReducer( (u) => { const c = n.get(e); return Object.is(u[0], c) && u[1] === n && u[2] === e ? u : [c, n, e]; }, void 0, () => [n.get(e), n, e] ); let a = r; if ((i !== n || s !== e) && (o(), a = n.get(e)), U.useEffect(() => { const u = n.sub(e, () => { o(); }); return o(), u; }, [n, e, void 0]), U.useDebugValue(a), tg(a)) { const u = e_(a); return ZS(u); } return a; } function Ad(e, t) { const n = eg(); return U.useCallback( (...i) => { if ((Zm ? "production" : void 0) !== "production" && !("write" in e)) throw new Error("not writable atom"); return n.set(e, ...i); }, [n, e] ); } function Hl(e, t) { return [ Xo(e), // We do wrong type assertion here, which results in throwing an error. Ad(e) ]; } const ng = Xt(null); ng.debugLabel = "accountAtom"; const t_ = { BASE_URL: "/", DEV: !1, MODE: "production", NZ_AWS_REGION: "us-east-1", PROD: !0, SSR: !1, STAGE: "prod" }, { NZ_AWS_REGION: n_, NZ_BACKOFFICE_BACK_URL: r_, NZ_CORE_SERVICES_GRAPHQL_URL: i_, NZ_CORE_SERVICES_REST_URL: s_ } = t_, Bn = { AWS: { region: n_, cognito: { userPoolId: "us-east-1_EZ7wuZ4ig", userPoolWebClientId: "2jok7cst8ebf6ppscrhji57gvr" } }, // Back services apiUrls: { restV1: r_ || "https://b133h34s56.execute-api.us-east-1.amazonaws.com", restV2: s_ || "https://core-services-prod.nizza.com/api", graphql: i_ || "https://core-services-prod.nizza.com/graphql", corsProxy: "https://3hvqfl2xcg.execute-api.us-east-1.amazonaws.com" }, publicUrls: { // Public app url platformSite: "https://platform.nizza.com", // Nizza CDN nizzaCdn: "https://cdn.nizza.com", // Bundle bundleSite: "https://bundle.nizza.com", // WSS IVS CHAT wssIVSChat: "wss://edge.ivschat.us-east-1.amazonaws.com", // Global Page globalPage: "https://live.nizza.com" } }; function bd(e, t) { let n = null; const r = () => { n || (n = t().log.createLogger(e)); }, i = (o, a) => typeof o[a] == "function", s = { get(o, a, l) { r(); const u = (c) => (...d) => { if (!n) return; const f = n[c]; if (typeof f == "function") return f.apply(n, d); }; return n && i(n, a) ? u(a) : n ? n[a] : void 0; } }; return new Proxy({}, s); } function re(e) { return e != null && typeof e == "object" && e["@@functional/placeholder"] === !0; } function nt(e) { return function t(n) { return arguments.length === 0 || re(n) ? t : e.apply(this, arguments); }; } function Je(e) { return function t(n, r) { switch (arguments.length) { case 0: return t; case 1: return re(n) ? t : nt(function(i) { return e(n, i); }); default: return re(n) && re(r) ? t : re(n) ? nt(function(i) { return e(i, r); }) : re(r) ? nt(function(i) { return e(n, i); }) : e(n, r); } }; } function Ha(e, t) { switch (e) { case 0: return function() { return t.apply(this, arguments); }; case 1: return function(n) { return t.apply(this, arguments); }; case 2: return function(n, r) { return t.apply(this, arguments); }; case 3: return function(n, r, i) { return t.apply(this, arguments); }; case 4: return function(n, r, i, s) { return t.apply(this, arguments); }; case 5: return function(n, r, i, s, o) { return t.apply(this, arguments); }; case 6: return function(n, r, i, s, o, a) { return t.apply(this, arguments); }; case 7: return function(n, r, i, s, o, a, l) { return t.apply(this, arguments); }; case 8: return function(n, r, i, s, o, a, l, u) { return t.apply(this, arguments); }; case 9: return function(n, r, i, s, o, a, l, u, c) { return t.apply(this, arguments); }; case 10: return function(n, r, i, s, o, a, l, u, c, d) { return t.apply(this, arguments); }; default: throw new Error("First argument to _arity must be a non-negative integer no greater than ten"); } } function rg(e, t, n) { return function() { for (var r = [], i = 0, s = e, o = 0, a = !1; o < t.length || i < arguments.length; ) { var l; o < t.length && (!re(t[o]) || i >= arguments.length) ? l = t[o] : (l = arguments[i], i += 1), r[o] = l, re(l) ? a = !0 : s -= 1, o += 1; } return !a && s <= 0 ? n.apply(this, r) : Ha(Math.max(0, s), rg(e, r, n)); }; } var ig = /* @__PURE__ */ Je(function(t, n) { return t === 1 ? nt(n) : Ha(t, rg(t, [], n)); }); function Cd(e) { return function t(n, r, i) { switch (arguments.length) { case 0: return t; case 1: return re(n) ? t : Je(function(s, o) { return e(n, s, o); }); case 2: return re(n) && re(r) ? t : re(n) ? Je(function(s, o) { return e(s, r, o); }) : re(r) ? Je(function(s, o) { return e(n, s, o); }) : nt(function(s) { return e(n, r, s); }); default: return re(n) && re(r) && re(i) ? t : re(n) && re(r) ? Je(function(s, o) { return e(s, o, i); }) : re(n) && re(i) ? Je(function(s, o) { return e(s, r, o); }) : re(r) && re(i) ? Je(function(s, o) { return e(n, s, o); }) : re(n) ? nt(function(s) { return e(s, r, i); }) : re(r) ? nt(function(s) { return e(n, s, i); }) : re(i) ? nt(function(s) { return e(n, r, s); }) : e(n, r, i); } }; } const sg = Array.isArray || function(t) { return t != null && t.length >= 0 && Object.prototype.toString.call(t) === "[object Array]"; }, og = Number.isInteger || function(t) { return t << 0 === t; }; function ag(e) { return Object.prototype.toString.call(e) === "[object String]"; } function lg(e, t) { var n = e < 0 ? t.length + e : e; return ag(t) ? t.charAt(n) : t[n]; } var o_ = /* @__PURE__ */ Je(function(t, n) { if (n != null) return og(t) ? lg(t, n) : n[t]; }), a_ = /* @__PURE__ */ nt(function(t) { return sg(t) ? !0 : !t || typeof t != "object" || ag(t) ? !1 : t.length === 0 ? !0 : t.length > 0 ? t.hasOwnProperty(0) && t.hasOwnProperty(t.length - 1) : !1; }), sh = typeof Symbol < "u" ? Symbol.iterator : "@@iterator"; function l_(e, t, n) { return function(i, s, o) { if (a_(o)) return e(i, s, o); if (o == null) return s; if (typeof o["fantasy-land/reduce"] == "function") return t(i, s, o, "fantasy-land/reduce"); if (o[sh] != null) return n(i, s, o[sh]()); if (typeof o.next == "function") return n(i, s, o); if (typeof o.reduce == "function") return t(i, s, o, "reduce"); throw new TypeError("reduce: list must be array or iterable"); }; } function u_(e, t, n) { for (var r = 0, i = n.length; r < i; ) { if (t = e["@@transducer/step"](t, n[r]), t && t["@@transducer/reduced"]) { t = t["@@transducer/value"]; break; } r += 1; } return e["@@transducer/result"](t); } var c_ = /* @__PURE__ */ Je(function(t, n) { return Ha(t.length, function() { return t.apply(n, arguments); }); }); function d_(e, t, n) { for (var r = n.next(); !r.done; ) { if (t = e["@@transducer/step"](t, r.value), t && t["@@transducer/reduced"]) { t = t["@@transducer/value"]; break; } r = n.next(); } return e["@@transducer/result"](t); } function f_(e, t, n, r) { return e["@@transducer/result"](n[r](c_(e["@@transducer/step"], e), t)); } var h_ = /* @__PURE__ */ l_(u_, f_, d_), p_ = /* @__PURE__ */ function() { function e(t) { this.f = t; } return e.prototype["@@transducer/init"] = function() { throw new Error("init not implemented on XWrap"); }, e.prototype["@@transducer/result"] = function(t) { return t; }, e.prototype["@@transducer/step"] = function(t, n) { return this.f(t, n); }, e; }(); function m_(e) { return new p_(e); } var g_ = /* @__PURE__ */ Cd(function(e, t, n) { return h_(typeof e == "function" ? m_(e) : e, t, n); }), v_ = /* @__PURE__ */ nt(function(t) { return function() { return t; }; }), y_ = /* @__PURE__ */ nt(function(t) { return ig(t.length, t); }), k_ = /* @__PURE__ */ nt(function(t) { return t == null; }), S_ = /* @__PURE__ */ Je(function(t, n) { switch (t) { case 0: return function() { return n.call(this); }; case 1: return function(r) { return n.call(this, r); }; case 2: return function(r, i) { return n.call(this, r, i); }; case 3: return function(r, i, s) { return n.call(this, r, i, s); }; case 4: return function(r, i, s, o) { return n.call(this, r, i, s, o); }; case 5: return function(r, i, s, o, a) { return n.call(this, r, i, s, o, a); }; case 6: return function(r, i, s, o, a, l) { return n.call(this, r, i, s, o, a, l); }; case 7: return function(r, i, s, o, a, l, u) { return n.call(this, r, i, s, o, a, l, u); }; case 8: return function(r, i, s, o, a, l, u, c) { return n.call(this, r, i, s, o, a, l, u, c); }; case 9: return function(r, i, s, o, a, l, u, c, d) { return n.call(this, r, i, s, o, a, l, u, c, d); }; case 10: return function(r, i, s, o, a, l, u, c, d, f) { return n.call(this, r, i, s, o, a, l, u, c, d, f); }; default: throw new Error("First argument to nAry must be a non-negative integer no greater than ten"); } }); function __(e, t) { return function() { return t.call(this, e.apply(this, arguments)); }; } function ug(e, t) { return function() { var n = arguments.length; if (n === 0) return t(); var r = arguments[n - 1]; return sg(r) || typeof r[e] != "function" ? t.apply(this, arguments) : r[e].apply(r, Array.prototype.slice.call(arguments, 0, n - 1)); }; } var N_ = /* @__PURE__ */ Cd(/* @__PURE__ */ ug("slice", function(t, n, r) { return Array.prototype.slice.call(r, t, n); })), E_ = /* @__PURE__ */ nt(/* @__PURE__ */ ug("tail", /* @__PURE__ */ N_(1, 1 / 0))); function oh() { if (arguments.length === 0) throw new Error("pipe requires at least one argument"); return Ha(arguments[0].length, g_(__, arguments[0], E_(arguments))); } var w_ = /* @__PURE__ */ Je(function(t, n) { if (t > 10) throw new Error("Constructor with greater than ten arguments"); return t === 0 ? function() { return new n(); } : y_(S_(t, function(r, i, s, o, a, l, u, c, d, f) { switch (t) { case 1: return new n(r); case 2: return new n(r, i); case 3: return new n(r, i, s); case 4: return new n(r, i, s, o); case 5: return new n(r, i, s, o, a); case 6: return new n(r, i, s, o, a, l); case 7: return new n(r, i, s, o, a, l, u); case 8: return new n(r, i, s, o, a, l, u, c); case 9: return new n(r, i, s, o, a, l, u, c, d); case 10: return new n(r, i, s, o, a, l, u, c, d, f); } })); }), A_ = /* @__PURE__ */ Cd(function(t, n, r) { return ig(Math.max(t.length, n.length, r.length), function() { return t.apply(this, arguments) ? n.apply(this, arguments) : r.apply(this, arguments); }); }); function b_(e, t) { for (var n = t, r = 0; r < e.length; r += 1) { if (n == null) return; var i = e[r]; og(i) ? n = lg(i, n) : n = n[i]; } return n; } var ah = /* @__PURE__ */ Je(function(t, n) { for (var r = {}, i = {}, s = 0, o = t.length; s < o; ) i[t[s]] = 1, s += 1; for (var a in n) i.hasOwnProperty(a) || (r[a] = n[a]); return r; }), C_ = /* @__PURE__ */ Je(b_); class Nr extends Error { /** * Creates a new instance of DomainError. * @param name - The name of the error. * @param message - A detailed message describing the error. * @param value - Optional value that provides additional context about the error. */ constructor(t, n, r) { super(n), this.value = r, this.name = t, Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); } /** * Converts the DomainError to a plain object for transfer or logging. * @returns An object representing the error in a more readable format. */ toDTO() { return { name: this.name, message: this.message, ...this.value && { value: this.value }, // Include a human-readable stack trace if available. ...this.stack && { stack: this.formatStack() } }; } /** * Formats the error stack trace into a human-readable string. * @returns A formatted stack trace string. */ formatStack() { return this.stack ? this.stack.split(` `).map((t) => t.trim()).join(" | ") : ""; } } class fs extends Nr { constructor(t) { super( "RESOURCE_NOT_FOUND_ERROR", `Resource with id '${t}' not found.`, t ); } } class Ve extends Nr { constructor(t) { super( "APP_UNEXPECTED_ERROR", t.message ?? "An unexpected error occurred.", t ); } } class Ga extends Nr { constructor() { super("APP_ACCOUNT_INVALID_ERROR", "Account not defined"); } } class cg extends Nr { constructor(t) { super( "INVALID_NIZZA_GLOBAL_OBJECT_ERROR", ` Configuration property invalid: "${t}". It looks like you are trying to use a configuration property that is required but is "undefined", make sure you have initialized the global object "nizza". * If you are using the @nizza/core library: import { getNizza } from '@nizza/core'; const nizza = getNizza(); nizza.configure({ account: env.account, ... }); * If you are using the window: window.nizza.configure({ account: env.account, ... }); ` ); } } function O_(e, t) { t.forEach((n) => { if (k_(C_(n.split("."), e))) throw new cg(n); }); } function Y(e) { for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r]; throw new Error(typeof e == "number" ? "[MobX] minified error nr: " + e + (n.length ? " " + n.map(String).join(",") : "") + ". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts" : "[MobX] " + e); } var T_ = {}; function dg() { return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : T_; } var fg = Object.assign, Zo = Object.getOwnPropertyDescriptor, Gt = Object.defineProperty, Wa = Object.prototype, ju = []; Object.freeze(ju); var Od = {}; Object.freeze(Od); var x_ = typeof Proxy < "u", R_ = /* @__PURE__ */ Object.toString(); function hg() { x_ || Y("Proxy not available"); } function pg(e) { var t = !1; return function() { if (!t) return t = !0, e.apply(this, arguments); }; } var Mr = function() { }; function Lt(e) { return typeof e == "function"; } function fr(e) { var t = typeof e; switch (t) { case "string": case "symbol": case "number": return !0; } return !1; } function qa(e) { return e !== null && typeof e == "object"; } function Dn(e) { if (!qa(e)) return !1; var t = Object.getPrototypeOf(e); if (t == null) return !0; var n = Object.hasOwnProperty.call(t, "constructor") && t.constructor; return typeof n == "function" && n.toString() === R_; } function mg(e) { var t = e == null ? void 0 : e.constructor; return t ? t.name === "GeneratorFunction" || t.displayName === "GeneratorFunction" : !1; } function Ka(e, t, n) { Gt(e, t, { enumerable: !1, writable: !0, configurable: !0, value: n }); } function gg(e, t, n) { Gt(e, t, { enumerable: !1, writable: !1, configurable: !0, value: n }); } function Er(e, t) { var n = "isMobX" + e; return t.prototype[n] = !0, function(r) { return qa(r) && r[n] === !0; }; } function ki(e) { return e != null && Object.prototype.toString.call(e) === "[object Map]"; } function I_(e) { var t = Object.getPrototypeOf(e), n = Object.getPrototypeOf(t), r = Object.getPrototypeOf(n); return r === null; } function Zt(e) { return e != null && Object.prototype.toString.call(e) === "[object Set]"; } var vg = typeof Object.getOwnPropertySymbols < "u"; function P_(e) { var t = Object.keys(e); if (!vg) return t; var n = Object.getOwnPropertySymbols(e); return n.length ? [].concat(t, n.filter(function(r) { return Wa.propertyIsEnumerable.call(e, r); })) : t; } var Qa = typeof Reflect < "u" && Reflect.ownKeys ? Reflect.ownKeys : vg ? function(e) { return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)); } : ( /* istanbul ignore next */ Object.getOwnPropertyNames ); function yg(e) { return e === null ? null : typeof e == "object" ? "" + e : e; } function rn(e, t) { return Wa.hasOwnProperty.call(e, t); } var L_ = Object.getOwnPropertyDescriptors || function(t) { var n = {}; return Qa(t).forEach(function(r) { n[r] = Zo(t, r); }), n; }; function Ze(e, t) { return !!(e & t); } function et(e, t, n) { return n ? e |= t : e &= ~t, e; } function lh(e, t) { (t == null || t > e.length) && (t = e.length); for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n]; return r; } function F_(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, $_(r.key), r); } } function Si(e, t, n) { return t && F_(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function Ur(e, t) { var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; if (n) return (n = n.call(e)).next.bind(n); if (Array.isArray(e) || (n = M_(e)) || t) { n && (e = n); var r = 0; return function() { return r >= e.length ? { done: !0 } : { done: !1, value: e[r++] }; }; } throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } function $n() { return $n = Object.assign ? Object.assign.bind() : function(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t]; for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]); } return e; }, $n.apply(null, arguments); } function kg(e, t) { e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Bu(e, t); } function Bu(e, t) { return Bu = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) { return n.__proto__ = r, n; }, Bu(e, t); } function D_(e, t) { if (typeof e != "object" || !e) return e; var n = e[Symbol.toPrimitive]; if (n !== void 0) { var r = n.call(e, t); if (typeof r != "object") return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); } function $_(e) { var t = D_(e, "string"); return typeof t == "symbol" ? t : t + ""; } function M_(e, t) { if (e) { if (typeof e == "string") return lh(e, t); var n = {}.toString.call(e).slice(8, -1); return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? lh(e, t) : void 0; } } var Bt = /* @__PURE__ */ Symbol("mobx-stored-annotations"); function Wt(e) { function t(n, r) { if (Bs(r)) return e.decorate_20223_(n, r); _i(n, r, e); } return Object.assign(t, e); } function _i(e, t, n) { rn(e, Bt) || Ka(e, Bt, $n({}, e[Bt])), q_(n) || (e[Bt][t] = n); } function U_(e) { return rn(e, Bt) || Ka(e, Bt, $n({}, e[Bt])), e[Bt]; } function Bs(e) { return typeof e == "object" && typeof e.kind == "string"; } var z = /* @__PURE__ */ Symbol("mobx administration"), zn = /* @__PURE__ */ function() { function e(n) { n === void 0 && (n = "Atom"), this.name_ = void 0, this.flags_ = 0, this.observers_ = /* @__PURE__ */ new Set(), this.lastAccessedBy_ = 0, this.lowestObserverState_ = J.NOT_TRACKING_, this.onBOL = void 0, this.onBUOL = void 0, this.name_ = n; } var t = e.prototype; return t.onBO = function() { this.onBOL && this.onBOL.forEach(function(r) { return r(); }); }, t.onBUO = function() { this.onBUOL && this.onBUOL.forEach(function(r) { return r(); }); }, t.reportObserved = function() { return Fg(this); }, t.reportChanged = function() { gt(), Dg(this), vt(); }, t.toString = function() { return this.name_; }, Si(e, [{ key: "isBeingObserved", get: function() { return Ze(this.flags_, e.isBeingObservedMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isBeingObservedMask_, r); } }, { key: "isPendingUnobservation", get: function() { return Ze(this.flags_, e.isPendingUnobservationMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isPendingUnobservationMask_, r); } }, { key: "diffValue", get: function() { return Ze(this.flags_, e.diffValueMask_) ? 1 : 0; }, set: function(r) { this.flags_ = et(this.flags_, e.diffValueMask_, r === 1); } }]); }(); zn.isBeingObservedMask_ = 1; zn.isPendingUnobservationMask_ = 2; zn.diffValueMask_ = 4; var Td = /* @__PURE__ */ Er("Atom", zn); function Sg(e, t, n) { t === void 0 && (t = Mr), n === void 0 && (n = Mr); var r = new zn(e); return t !== Mr && JN(r, t), n !== Mr && Bg(r, n), r; } function V_(e, t) { return e === t; } function j_(e, t) { return Ld(e, t); } function B_(e, t) { return Ld(e, t, 1); } function z_(e, t) { return Object.is ? Object.is(e, t) : e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t; } var ai = { identity: V_, structural: j_, default: z_, shallow: B_ }; function hr(e, t, n) { return Gg(e) ? e : Array.isArray(e) ? pe.array(e, { name: n }) : Dn(e) ? pe.object(e, void 0, { name: n }) : ki(e) ? pe.map(e, { name: n }) : Zt(e) ? pe.set(e, { name: n }) : typeof e == "function" && !tl(e) && !ps(e) ? mg(e) ? li(e) : hs(n, e) : e; } function H_(e, t, n) { if (e == null || il(e) || rl(e) || Ar(e) || Ni(e)) return e; if (Array.isArray(e)) return pe.array(e, { name: n, deep: !1 }); if (Dn(e)) return pe.object(e, void 0, { name: n, deep: !1 }); if (ki(e)) return pe.map(e, { name: n, deep: !1 }); if (Zt(e)) return pe.set(e, { name: n, deep: !1 }); } function Ja(e) { return e; } function G_(e, t) { return Ld(e, t) ? t : e; } var W_ = "override"; function q_(e) { return e.annotationType_ === W_; } function zs(e, t) { return { annotationType_: e, options_: t, make_: K_, extend_: Q_, decorate_20223_: J_ }; } function K_(e, t, n, r) { var i; if ((i = this.options_) != null && i.bound) return this.extend_(e, t, n, !1) === null ? 0 : 1; if (r === e.target_) return this.extend_(e, t, n, !1) === null ? 0 : 2; if (tl(n.value)) return 1; var s = _g(e, this, t, n, !1); return Gt(r, t, s), 2; } function Q_(e, t, n, r) { var i = _g(e, this, t, n); return e.defineProperty_(t, i, r); } function J_(e, t) { var n = t.kind, r = t.name, i = t.addInitializer, s = this, o = function(u) { var c, d, f, v; return Mn((c = (d = s.options_) == null ? void 0 : d.name) != null ? c : r.toString(), u, (f = (v = s.options_) == null ? void 0 : v.autoAction) != null ? f : !1); }; if (n == "field") { i(function() { _i(this, r, s); }); return; } if (n == "method") { var a; return tl(e) || (e = o(e)), (a = this.options_) != null && a.bound && i(function() { var l = this, u = l[r].bind(l); u.isMobxAction = !0, l[r] = u; }), e; } Y("Cannot apply '" + s.annotationType_ + "' to '" + String(r) + "' (kind: " + n + "):" + (` '` + s.annotationType_ + "' can only be used on properties with a function value.")); } function Y_(e, t, n, r) { t.annotationType_, r.value; } function _g(e, t, n, r, i) { var s, o, a, l, u, c, d; i === void 0 && (i = D.safeDescriptors), Y_(e, t, n, r); var f = r.value; if ((s = t.options_) != null && s.bound) { var v; f = f.bind((v = e.proxy_) != null ? v : e.target_); } return { value: Mn( (o = (a = t.options_) == null ? void 0 : a.name) != null ? o : n.toString(), f, (l = (u = t.options_) == null ? void 0 : u.autoAction) != null ? l : !1, // https://github.com/mobxjs/mobx/discussions/3140 (c = t.options_) != null && c.bound ? (d = e.proxy_) != null ? d : e.target_ : void 0 ), // Non-configurable for classes // prevents accidental field redefinition in subclass configurable: i ? e.isPlainObject_ : !0, // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058 enumerable: !1, // Non-obsevable, therefore non-writable // Also prevents rewriting in subclass constructor writable: !i }; } function Ng(e, t) { return { annotationType_: e, options_: t, make_: X_, extend_: Z_, decorate_20223_: eN }; } function X_(e, t, n, r) { var i; if (r === e.target_) return this.extend_(e, t, n, !1) === null ? 0 : 2; if ((i = this.options_) != null && i.bound && (!rn(e.target_, t) || !ps(e.target_[t])) && this.extend_(e, t, n, !1) === null) return 0; if (ps(n.value)) return 1; var s = Eg(e, this, t, n, !1, !1); return Gt(r, t, s), 2; } function Z_(e, t, n, r) { var i, s = Eg(e, this, t, n, (i = this.options_) == null ? void 0 : i.bound); return e.defineProperty_(t, s, r); } function eN(e, t) { var n, r = t.name, i = t.addInitializer; return ps(e) || (e = li(e)), (n = this.options_) != null && n.bound && i(function() { var s = this, o = s[r].bind(s); o.isMobXFlow = !0, s[r] = o; }), e; } function tN(e, t, n, r) { t.annotationType_, r.value; } function Eg(e, t, n, r, i, s) { s === void 0 && (s = D.safeDescriptors), tN(e, t, n, r); var o = r.value; if (ps(o) || (o = li(o)), i) { var a; o = o.bind((a = e.proxy_) != null ? a : e.target_), o.isMobXFlow = !0; } return { value: o, // Non-configurable for classes // prevents accidental field redefinition in subclass configurable: s ? e.isPlainObject_ : !0, // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058 enumerable: !1, // Non-obsevable, therefore non-writable // Also prevents rewriting in subclass constructor writable: !s }; } function xd(e, t) { return { annotationType_: e, options_: t, make_: nN, extend_: rN, decorate_20223_: iN }; } function nN(e, t, n) { return this.extend_(e, t, n, !1) === null ? 0 : 1; } function rN(e, t, n, r) { return sN(e, this, t, n), e.defineComputedProperty_(t, $n({}, this.options_, { get: n.get, set: n.set }), r); } function iN(e, t) { var n = this, r = t.name, i = t.addInitializer; return i(function() { var s = Ei(this)[z], o = $n({}, n.options_, { get: e, context: this }); o.name || (o.name = "ObservableObject." + r.toString()), s.values_.set(r, new Ft(o)); }), function() { return this[z].getObservablePropValue_(r); }; } function sN(e, t, n, r) { t.annotationType_, r.get; } function Ya(e, t) { return { annotationType_: e, options_: t, make_: oN, extend_: aN, decorate_20223_: lN }; } function oN(e, t, n) { return this.extend_(e, t, n, !1) === null ? 0 : 1; } function aN(e, t, n, r) { var i, s; return uN(e, this), e.defineObservableProperty_(t, n.value, (i = (s = this.options_) == null ? void 0 : s.enhancer) != null ? i : hr, r); } function lN(e, t) { var n = this, r = t.kind, i = t.name, s = /* @__PURE__ */ new WeakSet(); function o(a, l) { var u, c, d = Ei(a)[z], f = new ar(l, (u = (c = n.options_) == null ? void 0 : c.enhancer) != null ? u : hr, "ObservableObject." + i.toString(), !1); d.values_.set(i, f), s.add(a); } if (r == "accessor") return { get: function() { return s.has(this) || o(this, e.get.call(this)), this[z].getObservablePropValue_(i); }, set: function(l) { return s.has(this) || o(this, l), this[z].setObservablePropValue_(i, l); }, init: function(l) { return s.has(this) || o(this, l), l; } }; } function uN(e, t, n, r) { t.annotationType_; } var cN = "true", dN = /* @__PURE__ */ wg(); function wg(e) { return { annotationType_: cN, options_: e, make_: fN, extend_: hN, decorate_20223_: pN }; } function fN(e, t, n, r) { var i, s; if (n.get) return _n.make_(e, t, n, r); if (n.set) { var o = Mn(t.toString(), n.set); return r === e.target_ ? e.defineProperty_(t, { configurable: D.safeDescriptors ? e.isPlainObject_ : !0, set: o }) === null ? 0 : 2 : (Gt(r, t, { configurable: !0, set: o }), 2); } if (r !== e.target_ && typeof n.value == "function") { var a; if (mg(n.value)) { var l, u = (l = this.options_) != null && l.autoBind ? li.bound : li; return u.make_(e, t, n, r); } var c = (a = this.options_) != null && a.autoBind ? hs.bound : hs; return c.make_(e, t, n, r); } var d = ((i = this.options_) == null ? void 0 : i.deep) === !1 ? pe.ref : pe; if (typeof n.value == "function" && (s = this.options_) != null && s.autoBind) { var f; n.value = n.value.bind((f = e.proxy_) != null ? f : e.target_); } return d.make_(e, t, n, r); } function hN(e, t, n, r) { var i, s; if (n.get) return _n.extend_(e, t, n, r); if (n.set) return e.defineProperty_(t, { configurable: D.safeDescriptors ? e.isPlainObject_ : !0, set: Mn(t.toString(), n.set) }, r); if (typeof n.value == "function" && (i = this.options_) != null && i.autoBind) { var o; n.value = n.value.bind((o = e.proxy_) != null ? o : e.target_); } var a = ((s = this.options_) == null ? void 0 : s.deep) === !1 ? pe.ref : pe; return a.extend_(e, t, n, r); } function pN(e, t) { Y("'" + this.annotationType_ + "' cannot be used as a decorator"); } var mN = "observable", gN = "observable.ref", vN = "observable.shallow", yN = "observable.struct", Ag = { deep: !0, name: void 0, defaultDecorator: void 0, proxy: !0 }; Object.freeze(Ag); function io(e) { return e || Ag; } var zu = /* @__PURE__ */ Ya(mN), kN = /* @__PURE__ */ Ya(gN, { enhancer: Ja }), SN = /* @__PURE__ */ Ya(vN, { enhancer: H_ }), _N = /* @__PURE__ */ Ya(yN, { enhancer: G_ }), bg = /* @__PURE__ */ Wt(zu); function so(e) { return e.deep === !0 ? hr : e.deep === !1 ? Ja : EN(e.defaultDecorator); } function NN(e) { var t; return e ? (t = e.defaultDecorator) != null ? t : wg(e) : void 0; } function EN(e) { var t, n; return e && (t = (n = e.options_) == null ? void 0 : n.enhancer) != null ? t : hr; } function Cg(e, t, n) { if (Bs(t)) return zu.decorate_20223_(e, t); if (fr(t)) { _i(e, t, zu); return; } return Gg(e) ? e : Dn(e) ? pe.object(e, t, n) : Array.isArray(e) ? pe.array(e, t) : ki(e) ? pe.map(e, t) : Zt(e) ? pe.set(e, t) : typeof e == "object" && e !== null ? e : pe.box(e, t); } fg(Cg, bg); var wN = { box: function(t, n) { var r = io(n); return new ar(t, so(r), r.name, !0, r.equals); }, array: function(t, n) { var r = io(n); return (D.useProxies === !1 || r.proxy === !1 ? vE : aE)(t, so(r), r.name); }, map: function(t, n) { var r = io(n); return new Qg(t, so(r), r.name); }, set: function(t, n) { var r = io(n); return new Jg(t, so(r), r.name); }, object: function(t, n, r) { return br(function() { return YN(D.useProxies === !1 || (r == null ? void 0 : r.proxy) === !1 ? Ei({}, r) : rE({}, r), t, n); }); }, ref: /* @__PURE__ */ Wt(kN), shallow: /* @__PURE__ */ Wt(SN), deep: bg, struct: /* @__PURE__ */ Wt(_N) }, pe = /* @__PURE__ */ fg(Cg, wN), Og = "computed", AN = "computed.struct", Hu = /* @__PURE__ */ xd(Og), bN = /* @__PURE__ */ xd(AN, { equals: ai.structural }), _n = function(t, n) { if (Bs(n)) return Hu.decorate_20223_(t, n); if (fr(n)) return _i(t, n, Hu); if (Dn(t)) return Wt(xd(Og, t)); var r = Dn(n) ? n : {}; return r.get = t, r.name || (r.name = t.name || ""), new Ft(r); }; Object.assign(_n, Hu); _n.struct = /* @__PURE__ */ Wt(bN); var uh, ch, ea = 0, CN = 1, ON = (uh = (ch = /* @__PURE__ */ Zo(function() { }, "name")) == null ? void 0 : ch.configurable) != null ? uh : !1, dh = { value: "action", configurable: !0, writable: !1, enumerable: !1 }; function Mn(e, t, n, r) { n === void 0 && (n = !1); function i() { return TN(e, n, t, r || this, arguments); } return i.isMobxAction = !0, i.toString = function() { return t.toString(); }, ON && (dh.value = e, Gt(i, "name", dh)), i; } function TN(e, t, n, r, i) { var s = xN(e, t); try { return n.apply(r, i); } catch (o) { throw s.error_ = o, o; } finally { RN(s); } } function xN(e, t, n, r) { var i = !1, s = 0, o = D.trackingDerivation, a = !t || !o; gt(); var l = D.allowStateChanges; a && (wr(), l = Xa(!0)); var u = Rd(!0), c = { runAsAction_: a, prevDerivation_: o, prevAllowStateChanges_: l, prevAllowStateReads_: u, notifySpy_: i, startTime_: s, actionId_: CN++, parentActionId_: ea }; return ea = c.actionId_, c; } function RN(e) { ea !== e.actionId_ && Y(30), ea = e.parentActionId_, e.error_ !== void 0 && (D.suppressReactionErrors = !0), Za(e.prevAllowStateChanges_), Qi(e.prevAllowStateReads_), vt(), e.runAsAction_ && sn(e.prevDerivation_), D.suppressReactionErrors = !1; } function Tg(e, t) { var n = Xa(e); try { return t(); } finally { Za(n); } } function Xa(e) { var t = D.allowStateChanges; return D.allowStateChanges = e, t; } function Za(e) { D.allowStateChanges = e; } var ar = /* @__PURE__ */ function(e) { function t(r, i, s, o, a) { var l; return s === void 0 && (s = "ObservableValue"), a === void 0 && (a = ai.default), l = e.call(this, s) || this, l.enhancer = void 0, l.name_ = void 0, l.equals = void 0, l.hasUnreportedChange_ = !1, l.interceptors_ = void 0, l.changeListeners_ = void 0, l.value_ = void 0, l.dehancer = void 0, l.enhancer = i, l.name_ = s, l.equals = a, l.value_ = i(r, void 0, s), l; } kg(t, e); var n = t.prototype; return n.dehanceValue = function(i) { return this.dehancer !== void 0 ? this.dehancer(i) : i; }, n.set = function(i) { this.value_, i = this.prepareNewValue_(i), i !== D.UNCHANGED && this.setNewValue_(i); }, n.prepareNewValue_ = function(i) { if (pt(this)) { var s = mt(this, { object: this, type: qt, newValue: i }); if (!s) return D.UNCHANGED; i = s.newValue; } return i = this.enhancer(i, this.value_, this.name_), this.equals(this.value_, i) ? D.UNCHANGED : i; }, n.setNewValue_ = function(i) { var s = this.value_; this.value_ = i, this.reportChanged(), xt(this) && Rt(this, { type: qt, object: this, newValue: i, oldValue: s }); }, n.get = function() { return this.reportObserved(), this.dehanceValue(this.value_); }, n.intercept_ = function(i) { return Hs(this, i); }, n.observe_ = function(i, s) { return s && i({ observableKind: "value", debugObjectName: this.name_, object: this, type: qt, newValue: this.value_, oldValue: void 0 }), Gs(this, i); }, n.raw = function() { return this.value_; }, n.toJSON = function() { return this.get(); }, n.toString = function() { return this.name_ + "[" + this.value_ + "]"; }, n.valueOf = function() { return yg(this.get()); }, n[Symbol.toPrimitive] = function() { return this.valueOf(); }, t; }(zn), Ft = /* @__PURE__ */ function() { function e(n) { this.dependenciesState_ = J.NOT_TRACKING_, this.observing_ = [], this.newObserving_ = null, this.observers_ = /* @__PURE__ */ new Set(), this.runId_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = J.UP_TO_DATE_, this.unboundDepsCount_ = 0, this.value_ = new na(null), this.name_ = void 0, this.triggeredBy_ = void 0, this.flags_ = 0, this.derivation = void 0, this.setter_ = void 0, this.isTracing_ = ta.NONE, this.scope_ = void 0, this.equals_ = void 0, this.requiresReaction_ = void 0, this.keepAlive_ = void 0, this.onBOL = void 0, this.onBUOL = void 0, n.get || Y(31), this.derivation = n.get, this.name_ = n.name || "ComputedValue", n.set && (this.setter_ = Mn("ComputedValue-setter", n.set)), this.equals_ = n.equals || (n.compareStructural || n.struct ? ai.structural : ai.default), this.scope_ = n.context, this.requiresReaction_ = n.requiresReaction, this.keepAlive_ = !!n.keepAlive; } var t = e.prototype; return t.onBecomeStale_ = function() { FN(this); }, t.onBO = function() { this.onBOL && this.onBOL.forEach(function(r) { return r(); }); }, t.onBUO = function() { this.onBUOL && this.onBUOL.forEach(function(r) { return r(); }); }, t.get = function() { if (this.isComputing && Y(32, this.name_, this.derivation), D.inBatch === 0 && // !globalState.trackingDerivatpion && this.observers_.size === 0 && !this.keepAlive_) Gu(this) && (this.warnAboutUntrackedRead_(), gt(), this.value_ = this.computeValue_(!1), vt()); else if (Fg(this), Gu(this)) { var r = D.trackingContext; this.keepAlive_ && !r && (D.trackingContext = this), this.trackAndCompute() && LN(this), D.trackingContext = r; } var i = this.value_; if (Lo(i)) throw i.cause; return i; }, t.set = function(r) { if (this.setter_) { this.isRunningSetter && Y(33, this.name_), this.isRunningSetter = !0; try { this.setter_.call(this.scope_, r); } finally { this.isRunningSetter = !1; } } else Y(34, this.name_); }, t.trackAndCompute = function() { var r = this.value_, i = ( /* see #1208 */ this.dependenciesState_ === J.NOT_TRACKING_ ), s = this.computeValue_(!0), o = i || Lo(r) || Lo(s) || !this.equals_(r, s); return o && (this.value_ = s), o; }, t.computeValue_ = function(r) { this.isComputing = !0; var i = Xa(!1), s; if (r) s = xg(this, this.derivation, this.scope_); else if (D.disableErrorBoundaries === !0) s = this.derivation.call(this.scope_); else try { s = this.derivation.call(this.scope_); } catch (o) { s = new na(o); } return Za(i), this.isComputing = !1, s; }, t.suspend_ = function() { this.keepAlive_ || (Wu(this), this.value_ = void 0); }, t.observe_ = function(r, i) { var s = this, o = !0, a = void 0; return nl(function() { var l = s.get(); if (!o || i) { var u = wr(); r({ observableKind: "computed", debugObjectName: s.name_, type: qt, object: s, newValue: l, oldValue: a }), sn(u); } o = !1, a = l; }); }, t.warnAboutUntrackedRead_ = function() { }, t.toString = function() { return this.name_ + "[" + this.derivation.toString() + "]"; }, t.valueOf = function() { return yg(this.get()); }, t[Symbol.toPrimitive] = function() { return this.valueOf(); }, Si(e, [{ key: "isComputing", get: function() { return Ze(this.flags_, e.isComputingMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isComputingMask_, r); } }, { key: "isRunningSetter", get: function() { return Ze(this.flags_, e.isRunningSetterMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isRunningSetterMask_, r); } }, { key: "isBeingObserved", get: function() { return Ze(this.flags_, e.isBeingObservedMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isBeingObservedMask_, r); } }, { key: "isPendingUnobservation", get: function() { return Ze(this.flags_, e.isPendingUnobservationMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isPendingUnobservationMask_, r); } }, { key: "diffValue", get: function() { return Ze(this.flags_, e.diffValueMask_) ? 1 : 0; }, set: function(r) { this.flags_ = et(this.flags_, e.diffValueMask_, r === 1); } }]); }(); Ft.isComputingMask_ = 1; Ft.isRunningSetterMask_ = 2; Ft.isBeingObservedMask_ = 4; Ft.isPendingUnobservationMask_ = 8; Ft.diffValueMask_ = 16; var el = /* @__PURE__ */ Er("ComputedValue", Ft), J; (function(e) { e[e.NOT_TRACKING_ = -1] = "NOT_TRACKING_", e[e.UP_TO_DATE_ = 0] = "UP_TO_DATE_", e[e.POSSIBLY_STALE_ = 1] = "POSSIBLY_STALE_", e[e.STALE_ = 2] = "STALE_"; })(J || (J = {})); var ta; (function(e) { e[e.NONE = 0] = "NONE", e[e.LOG = 1] = "LOG", e[e.BREAK = 2] = "BREAK"; })(ta || (ta = {})); var na = function(t) { this.cause = void 0, this.cause = t; }; function Lo(e) { return e instanceof na; } function Gu(e) { switch (e.dependenciesState_) { case J.UP_TO_DATE_: return !1; case J.NOT_TRACKING_: case J.STALE_: return !0; case J.POSSIBLY_STALE_: { for (var t = Rd(!0), n = wr(), r = e.observing_, i = r.length, s = 0; s < i; s++) { var o = r[s]; if (el(o)) { if (D.disableErrorBoundaries) o.get(); else try { o.get(); } catch { return sn(n), Qi(t), !0; } if (e.dependenciesState_ === J.STALE_) return sn(n), Qi(t), !0; } } return Ig(e), sn(n), Qi(t), !1; } } } function xg(e, t, n) { var r = Rd(!0); Ig(e), e.newObserving_ = new Array( // Reserve constant space for initial dependencies, dynamic space otherwise. // See https://github.com/mobxjs/mobx/pull/3833 e.runId_ === 0 ? 100 : e.observing_.length ), e.unboundDepsCount_ = 0, e.runId_ = ++D.runId; var i = D.trackingDerivation; D.trackingDerivation = e, D.inBatch++; var s; if (D.disableErrorBoundaries === !0) s = t.call(n); else try { s = t.call(n); } catch (o) { s = new na(o); } return D.inBatch--, D.trackingDerivation = i, IN(e), Qi(r), s; } function IN(e) { for (var t = e.observing_, n = e.observing_ = e.newObserving_, r = J.UP_TO_DATE_, i = 0, s = e.unboundDepsCount_, o = 0; o < s; o++) { var a = n[o]; a.diffValue === 0 && (a.diffValue = 1, i !== o && (n[i] = a), i++), a.dependenciesState_ > r && (r = a.dependenciesState_); } for (n.length = i, e.newObserving_ = null, s = t.length; s--; ) { var l = t[s]; l.diffValue === 0 && Pg(l, e), l.diffValue = 0; } for (; i--; ) { var u = n[i]; u.diffValue === 1 && (u.diffValue = 0, PN(u, e)); } r !== J.UP_TO_DATE_ && (e.dependenciesState_ = r, e.onBecomeStale_()); } function Wu(e) { var t = e.observing_; e.observing_ = []; for (var n = t.length; n--; ) Pg(t[n], e); e.dependenciesState_ = J.NOT_TRACKING_; } function Rg(e) { var t = wr(); try { return e(); } finally { sn(t); } } function wr() { var e = D.trackingDerivation; return D.trackingDerivation = null, e; } function sn(e) { D.trackingDerivation = e; } function Rd(e) { var t = D.allowStateReads; return D.allowStateReads = e, t; } function Qi(e) { D.allowStateReads = e; } function Ig(e) { if (e.dependenciesState_ !== J.UP_TO_DATE_) { e.dependenciesState_ = J.UP_TO_DATE_; for (var t = e.observing_, n = t.length; n--; ) t[n].lowestObserverState_ = J.UP_TO_DATE_; } } var Gl = function() { this.version = 6, this.UNCHANGED = {}, this.trackingDerivation = null, this.trackingContext = null, this.runId = 0, this.mobxGuid = 0, this.inBatch = 0, this.pendingUnobservations = [], this.pendingReactions = [], this.isRunningReactions = !1, this.allowStateChanges = !1, this.allowStateReads = !0, this.enforceActions = !0, this.spyListeners = [], this.globalReactionErrorHandlers = [], this.computedRequiresReaction = !1, this.reactionRequiresObservable = !1, this.observableRequiresReaction = !1, this.disableErrorBoundaries = !1, this.suppressReactionErrors = !1, this.useProxies = !0, this.verifyProxies = !1, this.safeDescriptors = !0; }, Wl = !0, D = /* @__PURE__ */ function() { var e = /* @__PURE__ */ dg(); return e.__mobxInstanceCount > 0 && !e.__mobxGlobals && (Wl = !1), e.__mobxGlobals && e.__mobxGlobals.version !== new Gl().version && (Wl = !1), Wl ? e.__mobxGlobals ? (e.__mobxInstanceCount += 1, e.__mobxGlobals.UNCHANGED || (e.__mobxGlobals.UNCHANGED = {}), e.__mobxGlobals) : (e.__mobxInstanceCount = 1, e.__mobxGlobals = /* @__PURE__ */ new Gl()) : (setTimeout(function() { Y(35); }, 1), new Gl()); }(); function PN(e, t) { e.observers_.add(t), e.lowestObserverState_ > t.dependenciesState_ && (e.lowestObserverState_ = t.dependenciesState_); } function Pg(e, t) { e.observers_.delete(t), e.observers_.size === 0 && Lg(e); } function Lg(e) { e.isPendingUnobservation === !1 && (e.isPendingUnobservation = !0, D.pendingUnobservations.push(e)); } function gt() { D.inBatch++; } function vt() { if (--D.inBatch === 0) { $g(); for (var e = D.pendingUnobservations, t = 0; t < e.length; t++) { var n = e[t]; n.isPendingUnobservation = !1, n.observers_.size === 0 && (n.isBeingObserved && (n.isBeingObserved = !1, n.onBUO()), n instanceof Ft && n.suspend_()); } D.pendingUnobservations = []; } } function Fg(e) { var t = D.trackingDerivation; return t !== null ? (t.runId_ !== e.lastAccessedBy_ && (e.lastAccessedBy_ = t.runId_, t.newObserving_[t.unboundDepsCount_++] = e, !e.isBeingObserved && D.trackingContext && (e.isBeingObserved = !0, e.onBO())), e.isBeingObserved) : (e.observers_.size === 0 && D.inBatch > 0 && Lg(e), !1); } function Dg(e) { e.lowestObserverState_ !== J.STALE_ && (e.lowestObserverState_ = J.STALE_, e.observers_.forEach(function(t) { t.dependenciesState_ === J.UP_TO_DATE_ && t.onBecomeStale_(), t.dependenciesState_ = J.STALE_; })); } function LN(e) { e.lowestObserverState_ !== J.STALE_ && (e.lowestObserverState_ = J.STALE_, e.observers_.forEach(function(t) { t.dependenciesState_ === J.POSSIBLY_STALE_ ? t.dependenciesState_ = J.STALE_ : t.dependenciesState_ === J.UP_TO_DATE_ && (e.lowestObserverState_ = J.UP_TO_DATE_); })); } function FN(e) { e.lowestObserverState_ === J.UP_TO_DATE_ && (e.lowestObserverState_ = J.POSSIBLY_STALE_, e.observers_.forEach(function(t) { t.dependenciesState_ === J.UP_TO_DATE_ && (t.dependenciesState_ = J.POSSIBLY_STALE_, t.onBecomeStale_()); })); } var an = /* @__PURE__ */ function() { function e(n, r, i, s) { n === void 0 && (n = "Reaction"), this.name_ = void 0, this.onInvalidate_ = void 0, this.errorHandler_ = void 0, this.requiresObservable_ = void 0, this.observing_ = [], this.newObserving_ = [], this.dependenciesState_ = J.NOT_TRACKING_, this.runId_ = 0, this.unboundDepsCount_ = 0, this.flags_ = 0, this.isTracing_ = ta.NONE, this.name_ = n, this.onInvalidate_ = r, this.errorHandler_ = i, this.requiresObservable_ = s; } var t = e.prototype; return t.onBecomeStale_ = function() { this.schedule_(); }, t.schedule_ = function() { this.isScheduled || (this.isScheduled = !0, D.pendingReactions.push(this), $g()); }, t.runReaction_ = function() { if (!this.isDisposed) { gt(), this.isScheduled = !1; var r = D.trackingContext; if (D.trackingContext = this, Gu(this)) { this.isTrackPending = !0; try { this.onInvalidate_(); } catch (i) { this.reportExceptionInDerivation_(i); } } D.trackingContext = r, vt(); } }, t.track = function(r) { if (!this.isDisposed) { gt(), this.isRunning = !0; var i = D.trackingContext; D.trackingContext = this; var s = xg(this, r, void 0); D.trackingContext = i, this.isRunning = !1, this.isTrackPending = !1, this.isDisposed && Wu(this), Lo(s) && this.reportExceptionInDerivation_(s.cause), vt(); } }, t.reportExceptionInDerivation_ = function(r) { var i = this; if (this.errorHandler_) { this.errorHandler_(r, this); return; } if (D.disableErrorBoundaries) throw r; var s = "[mobx] uncaught error in '" + this + "'"; D.suppressReactionErrors || console.error(s, r), D.globalReactionErrorHandlers.forEach(function(o) { return o(r, i); }); }, t.dispose = function() { this.isDisposed || (this.isDisposed = !0, this.isRunning || (gt(), Wu(this), vt())); }, t.getDisposer_ = function(r) { var i = this, s = function o() { i.dispose(), r == null || r.removeEventListener == null || r.removeEventListener("abort", o); }; return r == null || r.addEventListener == null || r.addEventListener("abort", s), s[z] = this, s; }, t.toString = function() { return "Reaction[" + this.name_ + "]"; }, t.trace = function(r) { }, Si(e, [{ key: "isDisposed", get: function() { return Ze(this.flags_, e.isDisposedMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isDisposedMask_, r); } }, { key: "isScheduled", get: function() { return Ze(this.flags_, e.isScheduledMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isScheduledMask_, r); } }, { key: "isTrackPending", get: function() { return Ze(this.flags_, e.isTrackPendingMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isTrackPendingMask_, r); } }, { key: "isRunning", get: function() { return Ze(this.flags_, e.isRunningMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isRunningMask_, r); } }, { key: "diffValue", get: function() { return Ze(this.flags_, e.diffValueMask_) ? 1 : 0; }, set: function(r) { this.flags_ = et(this.flags_, e.diffValueMask_, r === 1); } }]); }(); an.isDisposedMask_ = 1; an.isScheduledMask_ = 2; an.isTrackPendingMask_ = 4; an.isRunningMask_ = 8; an.diffValueMask_ = 16; var DN = 100, $N = function(t) { return t(); }; function $g() { D.inBatch > 0 || D.isRunningReactions || $N(MN); } function MN() { D.isRunningReactions = !0; for (var e = D.pendingReactions, t = 0; e.length > 0; ) { ++t === DN && (console.error("[mobx] cycle in reaction: " + e[0]), e.splice(0)); for (var n = e.splice(0), r = 0, i = n.length; r < i; r++) n[r].runReaction_(); } D.isRunningReactions = !1; } var ra = /* @__PURE__ */ Er("Reaction", an); function Ji() { return !1; } function UN(e) { return console.warn("[mobx.spy] Is a no-op in production builds"), function() { }; } var Mg = "action", VN = "action.bound", Ug = "autoAction", jN = "autoAction.bound", BN = "", qu = /* @__PURE__ */ zs(Mg), zN = /* @__PURE__ */ zs(VN, { bound: !0 }), Ku = /* @__PURE__ */ zs(Ug, { autoAction: !0 }), HN = /* @__PURE__ */ zs(jN, { autoAction: !0, bound: !0 }); function Vg(e) { var t = function(r, i) { if (Lt(r)) return Mn(r.name || BN, r, e); if (Lt(i)) return Mn(r, i, e); if (Bs(i)) return (e ? Ku : qu).decorate_20223_(r, i); if (fr(i)) return _i(r, i, e ? Ku : qu); if (fr(r)) return Wt(zs(e ? Ug : Mg, { name: r, autoAction: e })); }; return t; } var Ye = /* @__PURE__ */ Vg(!1); Object.assign(Ye, qu); var hs = /* @__PURE__ */ Vg(!0); Object.assign(hs, Ku); Ye.bound = /* @__PURE__ */ Wt(zN); hs.bound = /* @__PURE__ */ Wt(HN); function tl(e) { return Lt(e) && e.isMobxAction === !0; } function nl(e, t) { var n, r, i, s; t === void 0 && (t = Od); var o = (n = (r = t) == null ? void 0 : r.name) != null ? n : "Autorun", a = !t.scheduler && !t.delay, l; if (a) l = new an(o, function() { this.track(d); }, t.onError, t.requiresObservable); else { var u = jg(t), c = !1; l = new an(o, function() { c || (c = !0, u(function() { c = !1, l.isDisposed || l.track(d); })); }, t.onError, t.requiresObservable); } function d() { e(l); } return (i = t) != null && (i = i.signal) != null && i.aborted || l.schedule_(), l.getDisposer_((s = t) == null ? void 0 : s.signal); } var GN = function(t) { return t(); }; function jg(e) { return e.scheduler ? e.scheduler : e.delay ? function(t) { return setTimeout(t, e.delay); } : GN; } function WN(e, t, n) { var r, i, s; n === void 0 && (n = Od); var o = (r = n.name) != null ? r : "Reaction", a = Ye(o, n.onError ? qN(n.onError, t) : t), l = !n.scheduler && !n.delay, u = jg(n), c = !0, d = !1, f, v = n.compareStructural ? ai.structural : n.equals || ai.default, g = new an(o, function() { c || l ? m() : d || (d = !0, u(m)); }, n.onError, n.requiresObservable); function m() { if (d = !1, !g.isDisposed) { var k = !1, h = f; g.track(function() { var p = Tg(!1, function() { return e(g); }); k = c || !v(f, p), f = p; }), (c && n.fireImmediately || !c && k) && a(f, h, g), c = !1; } } return (i = n) != null && (i = i.signal) != null && i.aborted || g.schedule_(), g.getDisposer_((s = n) == null ? void 0 : s.signal); } function qN(e, t) { return function() { try { return t.apply(this, arguments); } catch (n) { e.call(this, n); } }; } var KN = "onBO", QN = "onBUO"; function JN(e, t, n) { return zg(KN, e, t, n); } function Bg(e, t, n) { return zg(QN, e, t, n); } function zg(e, t, n, r) { var i = Qu(t), s = Lt(r) ? r : n, o = e + "L"; return i[o] ? i[o].add(s) : i[o] = /* @__PURE__ */ new Set([s]), function() { var a = i[o]; a && (a.delete(s), a.size === 0 && delete i[o]); }; } function YN(e, t, n, r) { var i = L_(t); return br(function() { var s = Ei(e, r)[z]; Qa(i).forEach(function(o) { s.extend_( o, i[o], // must pass "undefined" for { key: undefined } n && o in n ? n[o] : !0 ); }); }), e; } var XN = 0; function Hg() { this.message = "FLOW_CANCELLED"; } Hg.prototype = /* @__PURE__ */ Object.create(Error.prototype); var ql = /* @__PURE__ */ Ng("flow"), ZN = /* @__PURE__ */ Ng("flow.bound", { bound: !0 }), li = /* @__PURE__ */ Object.assign(function(t, n) { if (Bs(n)) return ql.decorate_20223_(t, n); if (fr(n)) return _i(t, n, ql); var r = t, i = r.name || "", s = function() { var a = this, l = arguments, u = ++XN, c = Ye(i + " - runid: " + u + " - init", r).apply(a, l), d, f = void 0, v = new Promise(function(g, m) { var k = 0; d = m; function h(S) { f = void 0; var N; try { N = Ye(i + " - runid: " + u + " - yield " + k++, c.next).call(c, S); } catch (E) { return m(E); } y(N); } function p(S) { f = void 0; var N; try { N = Ye(i + " - runid: " + u + " - yield " + k++, c.throw).call(c, S); } catch (E) { return m(E); } y(N); } function y(S) { if (Lt(S == null ? void 0 : S.then)) { S.then(y, m); return; } return S.done ? g(S.value) : (f = Promise.resolve(S.value), f.then(h, p)); } h(void 0); }); return v.cancel = Ye(i + " - runid: " + u + " - cancel", function() { try { f && fh(f); var g = c.return(void 0), m = Promise.resolve(g.value); m.then(Mr, Mr), fh(m), d(new Hg()); } catch (k) { d(k); } }), v; }; return s.isMobXFlow = !0, s; }, ql); li.bound = /* @__PURE__ */ Wt(ZN); function fh(e) { Lt(e.cancel) && e.cancel(); } function ps(e) { return (e == null ? void 0 : e.isMobXFlow) === !0; } function eE(e, t) { return e ? il(e) || !!e[z] || Td(e) || ra(e) || el(e) : !1; } function Gg(e) { return eE(e); } function en(e, t) { t === void 0 && (t = void 0), gt(); try { return e.apply(t); } finally { vt(); } } function Wg(e, t, n) { return arguments.length === 1 || t && typeof t == "object" ? tE(e, t) : qg(e, t, {}); } function qg(e, t, n) { var r; if (typeof n.timeout == "number") { var i = new Error("WHEN_TIMEOUT"); r = setTimeout(function() { if (!o[z].isDisposed) if (o(), n.onError) n.onError(i); else throw i; }, n.timeout); } n.name = "When"; var s = Mn("When-effect", t), o = nl(function(a) { var l = Tg(!1, e); l && (a.dispose(), r && clearTimeout(r), s()); }, n); return o; } function tE(e, t) { var n; if (t != null && (n = t.signal) != null && n.aborted) return Object.assign(Promise.reject(new Error("WHEN_ABORTED")), { cancel: function() { return null; } }); var r, i, s = new Promise(function(o, a) { var l, u = qg(e, o, $n({}, t, { onError: a })); r = function() { u(), a(new Error("WHEN_CANCELLED")); }, i = function() { u(), a(new Error("WHEN_ABORTED")); }, t == null || (l = t.signal) == null || l.addEventListener == null || l.addEventListener("abort", i); }).finally(function() { var o; return t == null || (o = t.signal) == null || o.removeEventListener == null ? void 0 : o.removeEventListener("abort", i); }); return s.cancel = r, s; } function xr(e) { return e[z]; } var nE = { has: function(t, n) { return xr(t).has_(n); }, get: function(t, n) { return xr(t).get_(n); }, set: function(t, n, r) { var i; return fr(n) ? (i = xr(t).set_(n, r, !0)) != null ? i : !0 : !1; }, deleteProperty: function(t, n) { var r; return fr(n) ? (r = xr(t).delete_(n, !0)) != null ? r : !0 : !1; }, defineProperty: function(t, n, r) { var i; return (i = xr(t).defineProperty_(n, r)) != null ? i : !0; }, ownKeys: function(t) { return xr(t).ownKeys_(); }, preventExtensions: function(t) { Y(13); } }; function rE(e, t) { var n, r; return hg(), e = Ei(e, t), (r = (n = e[z]).proxy_) != null ? r : n.proxy_ = new Proxy(e, nE); } function pt(e) { return e.interceptors_ !== void 0 && e.interceptors_.length > 0; } function Hs(e, t) { var n = e.interceptors_ || (e.interceptors_ = []); return n.push(t), pg(function() { var r = n.indexOf(t); r !== -1 && n.splice(r, 1); }); } function mt(e, t) { var n = wr(); try { for (var r = [].concat(e.interceptors_ || []), i = 0, s = r.length; i < s && (t = r[i](t), t && !t.type && Y(14), !!t); i++) ; return t; } finally { sn(n); } } function xt(e) { return e.changeListeners_ !== void 0 && e.changeListeners_.length > 0; } function Gs(e, t) { var n = e.changeListeners_ || (e.changeListeners_ = []); return n.push(t), pg(function() { var r = n.indexOf(t); r !== -1 && n.splice(r, 1); }); } function Rt(e, t) { var n = wr(), r = e.changeListeners_; if (r) { r = r.slice(); for (var i = 0, s = r.length; i < s; i++) r[i](t); sn(n); } } function iE(e, t, n) { return br(function() { var r, i = Ei(e, n)[z]; (r = t) != null || (t = U_(e)), Qa(t).forEach(function(s) { return i.make_(s, t[s]); }); }), e; } var hh = "splice", qt = "update", sE = 1e4, oE = { get: function(t, n) { var r = t[z]; return n === z ? r : n === "length" ? r.getArrayLength_() : typeof n == "string" && !isNaN(n) ? r.get_(parseInt(n)) : rn(ia, n) ? ia[n] : t[n]; }, set: function(t, n, r) { var i = t[z]; return n === "length" && i.setArrayLength_(r), typeof n == "symbol" || isNaN(n) ? t[n] = r : i.set_(parseInt(n), r), !0; }, preventExtensions: function() { Y(15); } }, Id = /* @__PURE__ */ function() { function e(n, r, i, s) { n === void 0 && (n = "ObservableArray"), this.owned_ = void 0, this.legacyMode_ = void 0, this.atom_ = void 0, this.values_ = [], this.interceptors_ = void 0, this.changeListeners_ = void 0, this.enhancer_ = void 0, this.dehancer = void 0, this.proxy_ = void 0, this.lastKnownLength_ = 0, this.owned_ = i, this.legacyMode_ = s, this.atom_ = new zn(n), this.enhancer_ = function(o, a) { return r(o, a, "ObservableArray[..]"); }; } var t = e.prototype; return t.dehanceValue_ = function(r) { return this.dehancer !== void 0 ? this.dehancer(r) : r; }, t.dehanceValues_ = function(r) { return this.dehancer !== void 0 && r.length > 0 ? r.map(this.dehancer) : r; }, t.intercept_ = function(r) { return Hs(this, r); }, t.observe_ = function(r, i) { return i === void 0 && (i = !1), i && r({ observableKind: "array", object: this.proxy_, debugObjectName: this.atom_.name_, type: "splice", index: 0, added: this.values_.slice(), addedCount: this.values_.length, removed: [], removedCount: 0 }), Gs(this, r); }, t.getArrayLength_ = function() { return this.atom_.reportObserved(), this.values_.length; }, t.setArrayLength_ = function(r) { (typeof r != "number" || isNaN(r) || r < 0) && Y("Out of range: " + r); var i = this.values_.length; if (r !== i) if (r > i) { for (var s = new Array(r - i), o = 0; o < r - i; o++) s[o] = void 0; this.spliceWithArray_(i, 0, s); } else this.spliceWithArray_(r, i - r); }, t.updateArrayLength_ = function(r, i) { r !== this.lastKnownLength_ && Y(16), this.lastKnownLength_ += i, this.legacyMode_ && i > 0 && ev(r + i + 1); }, t.spliceWithArray_ = function(r, i, s) { var o = this; this.atom_; var a = this.values_.length; if (r === void 0 ? r = 0 : r > a ? r = a : r < 0 && (r = Math.max(0, a + r)), arguments.length === 1 ? i = a - r : i == null ? i = 0 : i = Math.max(0, Math.min(i, a - r)), s === void 0 && (s = ju), pt(this)) { var l = mt(this, { object: this.proxy_, type: hh, index: r, removedCount: i, added: s }); if (!l) return ju; i = l.removedCount, s = l.added; } if (s = s.length === 0 ? s : s.map(function(d) { return o.enhancer_(d, void 0); }), this.legacyMode_) { var u = s.length - i; this.updateArrayLength_(a, u); } var c = this.spliceItemsIntoValues_(r, i, s); return (i !== 0 || s.length !== 0) && this.notifyArraySplice_(r, s, c), this.dehanceValues_(c); }, t.spliceItemsIntoValues_ = function(r, i, s) { if (s.length < sE) { var o; return (o = this.values_).splice.apply(o, [r, i].concat(s)); } else { var a = this.values_.slice(r, r + i), l = this.values_.slice(r + i); this.values_.length += s.length - i; for (var u = 0; u < s.length; u++) this.values_[r + u] = s[u]; for (var c = 0; c < l.length; c++) this.values_[r + s.length + c] = l[c]; return a; } }, t.notifyArrayChildUpdate_ = function(r, i, s) { var o = !this.owned_ && Ji(), a = xt(this), l = a || o ? { observableKind: "array", object: this.proxy_, type: qt, debugObjectName: this.atom_.name_, index: r, newValue: i, oldValue: s } : null; this.atom_.reportChanged(), a && Rt(this, l); }, t.notifyArraySplice_ = function(r, i, s) { var o = !this.owned_ && Ji(), a = xt(this), l = a || o ? { observableKind: "array", object: this.proxy_, debugObjectName: this.atom_.name_, type: hh, index: r, removed: s, added: i, removedCount: s.length, addedCount: i.length } : null; this.atom_.reportChanged(), a && Rt(this, l); }, t.get_ = function(r) { if (this.legacyMode_ && r >= this.values_.length) { console.warn("[mobx] Out of bounds read: " + r); return; } return this.atom_.reportObserved(), this.dehanceValue_(this.values_[r]); }, t.set_ = function(r, i) { var s = this.values_; if (this.legacyMode_ && r > s.length && Y(17, r, s.length), r < s.length) { this.atom_; var o = s[r]; if (pt(this)) { var a = mt(this, { type: qt, object: this.proxy_, // since "this" is the real array we need to pass its proxy index: r, newValue: i }); if (!a) return; i = a.newValue; } i = this.enhancer_(i, o); var l = i !== o; l && (s[r] = i, this.notifyArrayChildUpdate_(r, i, o)); } else { for (var u = new Array(r + 1 - s.length), c = 0; c < u.length - 1; c++) u[c] = void 0; u[u.length - 1] = i, this.spliceWithArray_(s.length, 0, u); } }, e; }(); function aE(e, t, n, r) { return n === void 0 && (n = "ObservableArray"), r === void 0 && (r = !1), hg(), br(function() { var i = new Id(n, t, r, !1); gg(i.values_, z, i); var s = new Proxy(i.values_, oE); return i.proxy_ = s, e && e.length && i.spliceWithArray_(0, 0, e), s; }); } var ia = { clear: function() { return this.splice(0); }, replace: function(t) { var n = this[z]; return n.spliceWithArray_(0, n.values_.length, t); }, // Used by JSON.stringify toJSON: function() { return this.slice(); }, /* * functions that do alter the internal structure of the array, (based on lib.es6.d.ts) * since these functions alter the inner structure of the array, the have side effects. * Because the have side effects, they should not be used in computed function, * and for that reason the do not call dependencyState.notifyObserved */ splice: function(t, n) { for (var r = arguments.length, i = new Array(r > 2 ? r - 2 : 0), s = 2; s < r; s++) i[s - 2] = arguments[s]; var o = this[z]; switch (arguments.length) { case 0: return []; case 1: return o.spliceWithArray_(t); case 2: return o.spliceWithArray_(t, n); } return o.spliceWithArray_(t, n, i); }, spliceWithArray: function(t, n, r) { return this[z].spliceWithArray_(t, n, r); }, push: function() { for (var t = this[z], n = arguments.length, r = new Array(n), i = 0; i < n; i++) r[i] = arguments[i]; return t.spliceWithArray_(t.values_.length, 0, r), t.values_.length; }, pop: function() { return this.splice(Math.max(this[z].values_.length - 1, 0), 1)[0]; }, shift: function() { return this.splice(0, 1)[0]; }, unshift: function() { for (var t = this[z], n = arguments.length, r = new Array(n), i = 0; i < n; i++) r[i] = arguments[i]; return t.spliceWithArray_(0, 0, r), t.values_.length; }, reverse: function() { return D.trackingDerivation && Y(37, "reverse"), this.replace(this.slice().reverse()), this; }, sort: function() { D.trackingDerivation && Y(37, "sort"); var t = this.slice(); return t.sort.apply(t, arguments), this.replace(t), this; }, remove: function(t) { var n = this[z], r = n.dehanceValues_(n.values_).indexOf(t); return r > -1 ? (this.splice(r, 1), !0) : !1; } }; te("at", lt); te("concat", lt); te("flat", lt); te("includes", lt); te("indexOf", lt); te("join", lt); te("lastIndexOf", lt); te("slice", lt); te("toString", lt); te("toLocaleString", lt); te("toSorted", lt); te("toSpliced", lt); te("with", lt); te("every", $t); te("filter", $t); te("find", $t); te("findIndex", $t); te("findLast", $t); te("findLastIndex", $t); te("flatMap", $t); te("forEach", $t); te("map", $t); te("some", $t); te("toReversed", $t); te("reduce", Kg); te("reduceRight", Kg); function te(e, t) { typeof Array.prototype[e] == "function" && (ia[e] = t(e)); } function lt(e) { return function() { var t = this[z]; t.atom_.reportObserved(); var n = t.dehanceValues_(t.values_); return n[e].apply(n, arguments); }; } function $t(e) { return function(t, n) { var r = this, i = this[z]; i.atom_.reportObserved(); var s = i.dehanceValues_(i.values_); return s[e](function(o, a) { return t.call(n, o, a, r); }); }; } function Kg(e) { return function() { var t = this, n = this[z]; n.atom_.reportObserved(); var r = n.dehanceValues_(n.values_), i = arguments[0]; return arguments[0] = function(s, o, a) { return i(s, o, a, t); }, r[e].apply(r, arguments); }; } var lE = /* @__PURE__ */ Er("ObservableArrayAdministration", Id); function rl(e) { return qa(e) && lE(e[z]); } var uE = {}, Nn = "add", sa = "delete", Qg = /* @__PURE__ */ function() { function e(n, r, i) { var s = this; r === void 0 && (r = hr), i === void 0 && (i = "ObservableMap"), this.enhancer_ = void 0, this.name_ = void 0, this[z] = uE, this.data_ = void 0, this.hasMap_ = void 0, this.keysAtom_ = void 0, this.interceptors_ = void 0, this.changeListeners_ = void 0, this.dehancer = void 0, this.enhancer_ = r, this.name_ = i, Lt(Map) || Y(18), br(function() { s.keysAtom_ = Sg("ObservableMap.keys()"), s.data_ = /* @__PURE__ */ new Map(), s.hasMap_ = /* @__PURE__ */ new Map(), n && s.merge(n); }); } var t = e.prototype; return t.has_ = function(r) { return this.data_.has(r); }, t.has = function(r) { var i = this; if (!D.trackingDerivation) return this.has_(r); var s = this.hasMap_.get(r); if (!s) { var o = s = new ar(this.has_(r), Ja, "ObservableMap.key?", !1); this.hasMap_.set(r, o), Bg(o, function() { return i.hasMap_.delete(r); }); } return s.get(); }, t.set = function(r, i) { var s = this.has_(r); if (pt(this)) { var o = mt(this, { type: s ? qt : Nn, object: this, newValue: i, name: r }); if (!o) return this; i = o.newValue; } return s ? this.updateValue_(r, i) : this.addValue_(r, i), this; }, t.delete = function(r) { var i = this; if (this.keysAtom_, pt(this)) { var s = mt(this, { type: sa, object: this, name: r }); if (!s) return !1; } if (this.has_(r)) { var o = Ji(), a = xt(this), l = a || o ? { observableKind: "map", debugObjectName: this.name_, type: sa, object: this, oldValue: this.data_.get(r).value_, name: r } : null; return en(function() { var u; i.keysAtom_.reportChanged(), (u = i.hasMap_.get(r)) == null || u.setNewValue_(!1); var c = i.data_.get(r); c.setNewValue_(void 0), i.data_.delete(r); }), a && Rt(this, l), !0; } return !1; }, t.updateValue_ = function(r, i) { var s = this.data_.get(r); if (i = s.prepareNewValue_(i), i !== D.UNCHANGED) { var o = Ji(), a = xt(this), l = a || o ? { observableKind: "map", debugObjectName: this.name_, type: qt, object: this, oldValue: s.value_, name: r, newValue: i } : null; s.setNewValue_(i), a && Rt(this, l); } }, t.addValue_ = function(r, i) { var s = this; this.keysAtom_, en(function() { var u, c = new ar(i, s.enhancer_, "ObservableMap.key", !1); s.data_.set(r, c), i = c.value_, (u = s.hasMap_.get(r)) == null || u.setNewValue_(!0), s.keysAtom_.reportChanged(); }); var o = Ji(), a = xt(this), l = a || o ? { observableKind: "map", debugObjectName: this.name_, type: Nn, object: this, name: r, newValue: i } : null; a && Rt(this, l); }, t.get = function(r) { return this.has(r) ? this.dehanceValue_(this.data_.get(r).get()) : this.dehanceValue_(void 0); }, t.dehanceValue_ = function(r) { return this.dehancer !== void 0 ? this.dehancer(r) : r; }, t.keys = function() { return this.keysAtom_.reportObserved(), this.data_.keys(); }, t.values = function() { var r = this, i = this.keys(); return ms({ next: function() { var o = i.next(), a = o.done, l = o.value; return { done: a, value: a ? void 0 : r.get(l) }; } }); }, t.entries = function() { var r = this, i = this.keys(); return ms({ next: function() { var o = i.next(), a = o.done, l = o.value; return { done: a, value: a ? void 0 : [l, r.get(l)] }; } }); }, t[Symbol.iterator] = function() { return this.entries(); }, t.forEach = function(r, i) { for (var s = Ur(this), o; !(o = s()).done; ) { var a = o.value, l = a[0], u = a[1]; r.call(i, u, l, this); } }, t.merge = function(r) { var i = this; return Ar(r) && (r = new Map(r)), en(function() { Dn(r) ? P_(r).forEach(function(s) { return i.set(s, r[s]); }) : Array.isArray(r) ? r.forEach(function(s) { var o = s[0], a = s[1]; return i.set(o, a); }) : ki(r) ? (I_(r) || Y(19, r), r.forEach(function(s, o) { return i.set(o, s); })) : r != null && Y(20, r); }), this; }, t.clear = function() { var r = this; en(function() { Rg(function() { for (var i = Ur(r.keys()), s; !(s = i()).done; ) { var o = s.value; r.delete(o); } }); }); }, t.replace = function(r) { var i = this; return en(function() { for (var s = cE(r), o = /* @__PURE__ */ new Map(), a = !1, l = Ur(i.data_.keys()), u; !(u = l()).done; ) { var c = u.value; if (!s.has(c)) { var d = i.delete(c); if (d) a = !0; else { var f = i.data_.get(c); o.set(c, f); } } } for (var v = Ur(s.entries()), g; !(g = v()).done; ) { var m = g.value, k = m[0], h = m[1], p = i.data_.has(k); if (i.set(k, h), i.data_.has(k)) { var y = i.data_.get(k); o.set(k, y), p || (a = !0); } } if (!a) if (i.data_.size !== o.size) i.keysAtom_.reportChanged(); else for (var S = i.data_.keys(), N = o.keys(), E = S.next(), A = N.next(); !E.done; ) { if (E.value !== A.value) { i.keysAtom_.reportChanged(); break; } E = S.next(), A = N.next(); } i.data_ = o; }), this; }, t.toString = function() { return "[object ObservableMap]"; }, t.toJSON = function() { return Array.from(this); }, t.observe_ = function(r, i) { return Gs(this, r); }, t.intercept_ = function(r) { return Hs(this, r); }, Si(e, [{ key: "size", get: function() { return this.keysAtom_.reportObserved(), this.data_.size; } }, { key: Symbol.toStringTag, get: function() { return "Map"; } }]); }(), Ar = /* @__PURE__ */ Er("ObservableMap", Qg); function cE(e) { if (ki(e) || Ar(e)) return e; if (Array.isArray(e)) return new Map(e); if (Dn(e)) { var t = /* @__PURE__ */ new Map(); for (var n in e) t.set(n, e[n]); return t; } else return Y(21, e); } var dE = {}, Jg = /* @__PURE__ */ function() { function e(n, r, i) { var s = this; r === void 0 && (r = hr), i === void 0 && (i = "ObservableSet"), this.name_ = void 0, this[z] = dE, this.data_ = /* @__PURE__ */ new Set(), this.atom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.dehancer = void 0, this.enhancer_ = void 0, this.name_ = i, Lt(Set) || Y(22), this.enhancer_ = function(o, a) { return r(o, a, i); }, br(function() { s.atom_ = Sg(s.name_), n && s.replace(n); }); } var t = e.prototype; return t.dehanceValue_ = function(r) { return this.dehancer !== void 0 ? this.dehancer(r) : r; }, t.clear = function() { var r = this; en(function() { Rg(function() { for (var i = Ur(r.data_.values()), s; !(s = i()).done; ) { var o = s.value; r.delete(o); } }); }); }, t.forEach = function(r, i) { for (var s = Ur(this), o; !(o = s()).done; ) { var a = o.value; r.call(i, a, a, this); } }, t.add = function(r) { var i = this; if (this.atom_, pt(this)) { var s = mt(this, { type: Nn, object: this, newValue: r }); if (!s) return this; } if (!this.has(r)) { en(function() { i.data_.add(i.enhancer_(r, void 0)), i.atom_.reportChanged(); }); var o = !1, a = xt(this), l = a || o ? { observableKind: "set", debugObjectName: this.name_, type: Nn, object: this, newValue: r } : null; a && Rt(this, l); } return this; }, t.delete = function(r) { var i = this; if (pt(this)) { var s = mt(this, { type: sa, object: this, oldValue: r }); if (!s) return !1; } if (this.has(r)) { var o = !1, a = xt(this), l = a || o ? { observableKind: "set", debugObjectName: this.name_, type: sa, object: this, oldValue: r } : null; return en(function() { i.atom_.reportChanged(), i.data_.delete(r); }), a && Rt(this, l), !0; } return !1; }, t.has = function(r) { return this.atom_.reportObserved(), this.data_.has(this.dehanceValue_(r)); }, t.entries = function() { var r = 0, i = Array.from(this.keys()), s = Array.from(this.values()); return ms({ next: function() { var a = r; return r += 1, a < s.length ? { value: [i[a], s[a]], done: !1 } : { done: !0 }; } }); }, t.keys = function() { return this.values(); }, t.values = function() { this.atom_.reportObserved(); var r = this, i = 0, s = Array.from(this.data_.values()); return ms({ next: function() { return i < s.length ? { value: r.dehanceValue_(s[i++]), done: !1 } : { done: !0 }; } }); }, t.intersection = function(r) { if (Zt(r)) return r.intersection(this); var i = new Set(this); return i.intersection(r); }, t.union = function(r) { if (Zt(r)) return r.union(this); var i = new Set(this); return i.union(r); }, t.difference = function(r) { return new Set(this).difference(r); }, t.symmetricDifference = function(r) { if (Zt(r)) return r.symmetricDifference(this); var i = new Set(this); return i.symmetricDifference(r); }, t.isSubsetOf = function(r) { return new Set(this).isSubsetOf(r); }, t.isSupersetOf = function(r) { return new Set(this).isSupersetOf(r); }, t.isDisjointFrom = function(r) { if (Zt(r)) return r.isDisjointFrom(this); var i = new Set(this); return i.isDisjointFrom(r); }, t.replace = function(r) { var i = this; return Ni(r) && (r = new Set(r)), en(function() { Array.isArray(r) ? (i.clear(), r.forEach(function(s) { return i.add(s); })) : Zt(r) ? (i.clear(), r.forEach(function(s) { return i.add(s); })) : r != null && Y("Cannot initialize set from " + r); }), this; }, t.observe_ = function(r, i) { return Gs(this, r); }, t.intercept_ = function(r) { return Hs(this, r); }, t.toJSON = function() { return Array.from(this); }, t.toString = function() { return "[object ObservableSet]"; }, t[Symbol.iterator] = function() { return this.values(); }, Si(e, [{ key: "size", get: function() { return this.atom_.reportObserved(), this.data_.size; } }, { key: Symbol.toStringTag, get: function() { return "Set"; } }]); }(), Ni = /* @__PURE__ */ Er("ObservableSet", Jg), ph = /* @__PURE__ */ Object.create(null), mh = "remove", Yg = /* @__PURE__ */ function() { function e(n, r, i, s) { r === void 0 && (r = /* @__PURE__ */ new Map()), s === void 0 && (s = dN), this.target_ = void 0, this.values_ = void 0, this.name_ = void 0, this.defaultAnnotation_ = void 0, this.keysAtom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.proxy_ = void 0, this.isPlainObject_ = void 0, this.appliedAnnotations_ = void 0, this.pendingKeys_ = void 0, this.target_ = n, this.values_ = r, this.name_ = i, this.defaultAnnotation_ = s, this.keysAtom_ = new zn("ObservableObject.keys"), this.isPlainObject_ = Dn(this.target_); } var t = e.prototype; return t.getObservablePropValue_ = function(r) { return this.values_.get(r).get(); }, t.setObservablePropValue_ = function(r, i) { var s = this.values_.get(r); if (s instanceof Ft) return s.set(i), !0; if (pt(this)) { var o = mt(this, { type: qt, object: this.proxy_ || this.target_, name: r, newValue: i }); if (!o) return null; i = o.newValue; } if (i = s.prepareNewValue_(i), i !== D.UNCHANGED) { var a = xt(this), l = !1, u = a || l ? { type: qt, observableKind: "object", debugObjectName: this.name_, object: this.proxy_ || this.target_, oldValue: s.value_, name: r, newValue: i } : null; s.setNewValue_(i), a && Rt(this, u); } return !0; }, t.get_ = function(r) { return D.trackingDerivation && !rn(this.target_, r) && this.has_(r), this.target_[r]; }, t.set_ = function(r, i, s) { return s === void 0 && (s = !1), rn(this.target_, r) ? this.values_.has(r) ? this.setObservablePropValue_(r, i) : s ? Reflect.set(this.target_, r, i) : (this.target_[r] = i, !0) : this.extend_(r, { value: i, enumerable: !0, writable: !0, configurable: !0 }, this.defaultAnnotation_, s); }, t.has_ = function(r) { if (!D.trackingDerivation) return r in this.target_; this.pendingKeys_ || (this.pendingKeys_ = /* @__PURE__ */ new Map()); var i = this.pendingKeys_.get(r); return i || (i = new ar(r in this.target_, Ja, "ObservableObject.key?", !1), this.pendingKeys_.set(r, i)), i.get(); }, t.make_ = function(r, i) { if (i === !0 && (i = this.defaultAnnotation_), i !== !1) { if (!(r in this.target_)) { var s; if ((s = this.target_[Bt]) != null && s[r]) return; Y(1, i.annotationType_, this.name_ + "." + r.toString()); } for (var o = this.target_; o && o !== Wa; ) { var a = Zo(o, r); if (a) { var l = i.make_(this, r, a, o); if (l === 0) return; if (l === 1) break; } o = Object.getPrototypeOf(o); } vh(this, i, r); } }, t.extend_ = function(r, i, s, o) { if (o === void 0 && (o = !1), s === !0 && (s = this.defaultAnnotation_), s === !1) return this.defineProperty_(r, i, o); var a = s.extend_(this, r, i, o); return a && vh(this, s, r), a; }, t.defineProperty_ = function(r, i, s) { s === void 0 && (s = !1), this.keysAtom_; try { gt(); var o = this.delete_(r); if (!o) return o; if (pt(this)) { var a = mt(this, { object: this.proxy_ || this.target_, name: r, type: Nn, newValue: i.value }); if (!a) return null; var l = a.newValue; i.value !== l && (i = $n({}, i, { value: l })); } if (s) { if (!Reflect.defineProperty(this.target_, r, i)) return !1; } else Gt(this.target_, r, i); this.notifyPropertyAddition_(r, i.value); } finally { vt(); } return !0; }, t.defineObservableProperty_ = function(r, i, s, o) { o === void 0 && (o = !1), this.keysAtom_; try { gt(); var a = this.delete_(r); if (!a) return a; if (pt(this)) { var l = mt(this, { object: this.proxy_ || this.target_, name: r, type: Nn, newValue: i }); if (!l) return null; i = l.newValue; } var u = gh(r), c = { configurable: D.safeDescriptors ? this.isPlainObject_ : !0, enumerable: !0, get: u.get, set: u.set }; if (o) { if (!Reflect.defineProperty(this.target_, r, c)) return !1; } else Gt(this.target_, r, c); var d = new ar(i, s, "ObservableObject.key", !1); this.values_.set(r, d), this.notifyPropertyAddition_(r, d.value_); } finally { vt(); } return !0; }, t.defineComputedProperty_ = function(r, i, s) { s === void 0 && (s = !1), this.keysAtom_; try { gt(); var o = this.delete_(r); if (!o) return o; if (pt(this)) { var a = mt(this, { object: this.proxy_ || this.target_, name: r, type: Nn, newValue: void 0 }); if (!a) return null; } i.name || (i.name = "ObservableObject.key"), i.context = this.proxy_ || this.target_; var l = gh(r), u = { configurable: D.safeDescriptors ? this.isPlainObject_ : !0, enumerable: !1, get: l.get, set: l.set }; if (s) { if (!Reflect.defineProperty(this.target_, r, u)) return !1; } else Gt(this.target_, r, u); this.values_.set(r, new Ft(i)), this.notifyPropertyAddition_(r, void 0); } finally { vt(); } return !0; }, t.delete_ = function(r, i) { if (i === void 0 && (i = !1), this.keysAtom_, !rn(this.target_, r)) return !0; if (pt(this)) { var s = mt(this, { object: this.proxy_ || this.target_, name: r, type: mh }); if (!s) return null; } try { var o; gt(); var a = xt(this), l = !1, u = this.values_.get(r), c = void 0; if (!u && (a || l)) { var d; c = (d = Zo(this.target_, r)) == null ? void 0 : d.value; } if (i) { if (!Reflect.deleteProperty(this.target_, r)) return !1; } else delete this.target_[r]; if (u && (this.values_.delete(r), u instanceof ar && (c = u.value_), Dg(u)), this.keysAtom_.reportChanged(), (o = this.pendingKeys_) == null || (o = o.get(r)) == null || o.set(r in this.target_), a || l) { var f = { type: mh, observableKind: "object", object: this.proxy_ || this.target_, debugObjectName: this.name_, oldValue: c, name: r }; a && Rt(this, f); } } finally { vt(); } return !0; }, t.observe_ = function(r, i) { return Gs(this, r); }, t.intercept_ = function(r) { return Hs(this, r); }, t.notifyPropertyAddition_ = function(r, i) { var s, o = xt(this), a = !1; if (o || a) { var l = o || a ? { type: Nn, observableKind: "object", debugObjectName: this.name_, object: this.proxy_ || this.target_, name: r, newValue: i } : null; o && Rt(this, l); } (s = this.pendingKeys_) == null || (s = s.get(r)) == null || s.set(!0), this.keysAtom_.reportChanged(); }, t.ownKeys_ = function() { return this.keysAtom_.reportObserved(), Qa(this.target_); }, t.keys_ = function() { return this.keysAtom_.reportObserved(), Object.keys(this.target_); }, e; }(); function Ei(e, t) { var n; if (rn(e, z)) return e; var r = (n = t == null ? void 0 : t.name) != null ? n : "ObservableObject", i = new Yg(e, /* @__PURE__ */ new Map(), String(r), NN(t)); return Ka(e, z, i), e; } var fE = /* @__PURE__ */ Er("ObservableObjectAdministration", Yg); function gh(e) { return ph[e] || (ph[e] = { get: function() { return this[z].getObservablePropValue_(e); }, set: function(n) { return this[z].setObservablePropValue_(e, n); } }); } function il(e) { return qa(e) ? fE(e[z]) : !1; } function vh(e, t, n) { var r; (r = e.target_[Bt]) == null || delete r[n]; } var hE = /* @__PURE__ */ Zg(0), pE = /* @__PURE__ */ function() { var e = !1, t = {}; return Object.defineProperty(t, "0", { set: function() { e = !0; } }), Object.create(t)[0] = 1, e === !1; }(), Kl = 0, Xg = function() { }; function mE(e, t) { Object.setPrototypeOf ? Object.setPrototypeOf(e.prototype, t) : e.prototype.__proto__ !== void 0 ? e.prototype.__proto__ = t : e.prototype = t; } mE(Xg, Array.prototype); var Pd = /* @__PURE__ */ function(e) { function t(r, i, s, o) { var a; return s === void 0 && (s = "ObservableArray"), o === void 0 && (o = !1), a = e.call(this) || this, br(function() { var l = new Id(s, i, o, !0); l.proxy_ = a, gg(a, z, l), r && r.length && a.spliceWithArray(0, 0, r), pE && Object.defineProperty(a, "0", hE); }), a; } kg(t, e); var n = t.prototype; return n.concat = function() { this[z].atom_.reportObserved(); for (var i = arguments.length, s = new Array(i), o = 0; o < i; o++) s[o] = arguments[o]; return Array.prototype.concat.apply( this.slice(), //@ts-ignore s.map(function(a) { return rl(a) ? a.slice() : a; }) ); }, n[Symbol.iterator] = function() { var r = this, i = 0; return ms({ next: function() { return i < r.length ? { value: r[i++], done: !1 } : { done: !0, value: void 0 }; } }); }, Si(t, [{ key: "length", get: function() { return this[z].getArrayLength_(); }, set: function(i) { this[z].setArrayLength_(i); } }, { key: Symbol.toStringTag, get: function() { return "Array"; } }]); }(Xg); Object.entries(ia).forEach(function(e) { var t = e[0], n = e[1]; t !== "concat" && Ka(Pd.prototype, t, n); }); function Zg(e) { return { enumerable: !1, configurable: !0, get: function() { return this[z].get_(e); }, set: function(n) { this[z].set_(e, n); } }; } function gE(e) { Gt(Pd.prototype, "" + e, Zg(e)); } function ev(e) { if (e > Kl) { for (var t = Kl; t < e + 100; t++) gE(t); Kl = e; } } ev(1e3); function vE(e, t, n) { return new Pd(e, t, n); } function Qu(e, t) { if (typeof e == "object" && e !== null) { if (rl(e)) return t !== void 0 && Y(23), e[z].atom_; if (Ni(e)) return e.atom_; if (Ar(e)) { if (t === void 0) return e.keysAtom_; var n = e.data_.get(t) || e.hasMap_.get(t); return n || Y(25, t, Ju(e)), n; } if (il(e)) { if (!t) return Y(26); var r = e[z].values_.get(t); return r || Y(27, t, Ju(e)), r; } if (Td(e) || el(e) || ra(e)) return e; } else if (Lt(e) && ra(e[z])) return e[z]; Y(28); } function yE(e, t) { if (e || Y(29), Td(e) || el(e) || ra(e) || Ar(e) || Ni(e)) return e; if (e[z]) return e[z]; Y(24, e); } function Ju(e, t) { var n; if (t !== void 0) n = Qu(e, t); else { if (tl(e)) return e.name; il(e) || Ar(e) || Ni(e) ? n = yE(e) : n = Qu(e); } return n.name_; } function br(e) { var t = wr(), n = Xa(!0); gt(); try { return e(); } finally { vt(), Za(n), sn(t); } } var yh = Wa.toString; function Ld(e, t, n) { return n === void 0 && (n = -1), Yu(e, t, n); } function Yu(e, t, n, r, i) { if (e === t) return e !== 0 || 1 / e === 1 / t; if (e == null || t == null) return !1; if (e !== e) return t !== t; var s = typeof e; if (s !== "function" && s !== "object" && typeof t != "object") return !1; var o = yh.call(e); if (o !== yh.call(t)) return !1; switch (o) { case "[object RegExp]": case "[object String]": return "" + e == "" + t; case "[object Number]": return +e != +e ? +t != +t : +e == 0 ? 1 / +e === 1 / t : +e == +t; case "[object Date]": case "[object Boolean]": return +e == +t; case "[object Symbol]": return typeof Symbol < "u" && Symbol.valueOf.call(e) === Symbol.valueOf.call(t); case "[object Map]": case "[object Set]": n >= 0 && n++; break; } e = kh(e), t = kh(t); var a = o === "[object Array]"; if (!a) { if (typeof e != "object" || typeof t != "object") return !1; var l = e.constructor, u = t.constructor; if (l !== u && !(Lt(l) && l instanceof l && Lt(u) && u instanceof u) && "constructor" in e && "constructor" in t) return !1; } if (n === 0) return !1; n < 0 && (n = -1), r = r || [], i = i || []; for (var c = r.length; c--; ) if (r[c] === e) return i[c] === t; if (r.push(e), i.push(t), a) { if (c = e.length, c !== t.length) return !1; for (; c--; ) if (!Yu(e[c], t[c], n - 1, r, i)) return !1; } else { var d = Object.keys(e), f; if (c = d.length, Object.keys(t).length !== c) return !1; for (; c--; ) if (f = d[c], !(rn(t, f) && Yu(e[f], t[f], n - 1, r, i))) return !1; } return r.pop(), i.pop(), !0; } function kh(e) { return rl(e) ? e.slice() : ki(e) || Ar(e) || Zt(e) || Ni(e) ? Array.from(e.entries()) : e; } function ms(e) { return e[Symbol.iterator] = kE, e; } function kE() { return this; } ["Symbol", "Map", "Set"].forEach(function(e) { var t = dg(); typeof t[e] > "u" && Y("MobX requires global '" + e + "' to be available or polyfilled"); }); typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ == "object" && __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({ spy: UN, extras: { getDebugName: Ju }, $mobx: z }); function SE(e, t = []) { U.useEffect(() => { const n = nl(e); return () => n(); }, t); } function tv(e, t = {}) { const { defaultValue: n, deps: r = [] } = t, i = U.useMemo(() => e, r), [s, o] = U.useState( () => i() || n ); return U.useEffect(() => { const a = nl(() => o(i())); return () => a(); }, [i, ...r]), s; } function _E(e, t, n = []) { const r = U.useMemo(() => e, n), i = U.useMemo(() => t, n); U.useEffect(() => { const s = WN(r, i); return () => s(); }, [r, i]); } var nv = { exports: {} }, sl = {}; /** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var NE = U, EE = Symbol.for("react.element"), wE = Symbol.for("react.fragment"), AE = Object.prototype.hasOwnProperty, bE = NE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, CE = { key: !0, ref: !0, __self: !0, __source: !0 }; function rv(e, t, n) { var r, i = {}, s = null, o = null; n !== void 0 && (s = "" + n), t.key !== void 0 && (s = "" + t.key), t.ref !== void 0 && (o = t.ref); for (r in t) AE.call(t, r) && !CE.hasOwnProperty(r) && (i[r] = t[r]); if (e && e.defaultProps) for (r in t = e.defaultProps, t) i[r] === void 0 && (i[r] = t[r]); return { $$typeof: EE, type: e, key: s, ref: o, props: i, _owner: bE.current }; } sl.Fragment = wE; sl.jsx = rv; sl.jsxs = rv; nv.exports = sl; var gs = nv.exports; let Fd = /* @__PURE__ */ new Map(); const Xu = U.createContext(Fd), OE = ({ children: e, stores: t }) => { const n = U.useContext(Xu), r = U.useMemo(() => { const i = /* @__PURE__ */ new Map(); return t.forEach((s) => i.set(s.class, s.value)), Fd = new Map([...n, ...i]); }, []); return /* @__PURE__ */ gs.jsx(Xu.Provider, { value: r, children: e }); }; function TE(e) { return U.useContext(Xu).get(e); } function xE(e) { return Fd.get(e); } class iv { constructor(t, n) { O(this, "logger"); O(this, "channel"); O(this, "listeners", /* @__PURE__ */ new Map()); O(this, "eventQueue", /* @__PURE__ */ new Map()); this.logger = St.withPrefix(n, "EventBus"); try { this.logger.debug(`Creating BroadcastChannel with name "${t}"`), this.channel = new BroadcastChannel(t), this.channel.onmessage = (r) => this.handleMessage(r), this.channel.onmessageerror = (r) => this.logger.error("NizzaBroadcastChannel error:", r); } catch (r) { throw this.logger.error("Failed to create NizzaBroadcastChannel:", r), r; } } /** * Subscribe a listener function to a specific event with wildcards. * * @param {string} pattern - The event name to subscribe to. You can use wildcards like 'user:*' or 'chat:**'. * @param {EventBusListener} listener - The listener function to handle the event. * @returns {EventBusSubscription} - A subscription object that includes the event name and the `off()` function for unsubscribing. * @example * const subscription = eventBus.on('user:*', (event) => { * console.log('User event:', event.name); * }); * const chatSubscription = eventBus.on('chat:**', (event) => { * console.log('Chat event:', event.name); * }); */ on(t, n) { return this.logger.debug(`Subscribing to pattern "${t}"`), this.subscribeToEvent(t, n), { off: () => this.unsubscribeFromEvent(t, n) }; } /** * Emit an event through the BroadcastChannel. * * @param {string} event - The event name to emit. * @param {any} data - The data associated with the event. * @param {Attributes} attrs - Optional attributes associated with the event. * @example * // Emit a user login event * eventBus.emit('user:login', { username: 'user123' }); * * // Emit a chat message event * eventBus.emit('chat:message', { text: 'Hello, world!' }); */ emit(t, n, r = {}) { this.logger.debug(`Emitting event "${t}" with data`, n), this.emitEvent(t, n, r); } /** * Handle messages received through the BroadcastChannel and call the corresponding listener functions. * * @private * @param {MessageEvent} event - The received message event. */ handleMessage(t) { const n = t.data, { name: r } = n; this.logger.debug(`Received message "${r}" with data`, n); for (const [i, s] of this.listeners.entries()) this.matchWildcard(i, r) && (this.logger.debug(`Matching pattern "${i}" for event "${r}"`), s.forEach( (o) => o({ ...n, wildcard: i }) )); } /** * Subscribe a listener function to a specific event. * * @private * @param {string} pattern - The pattern to subscribe to. * @param {EventBusListener} listener - The listener function to handle the event. */ subscribeToEvent(t, n) { if (typeof t != "string" || typeof n != "function") { const i = new Error("Invalid arguments"); throw this.logger.error(i), i; } this.listeners.has(t) || (this.logger.debug(`Adding new pattern "${t}"`), this.listeners.set(t, /* @__PURE__ */ new Set())); const r = Array.from(this.eventQueue).filter(([i]) => { const s = this.matchWildcard(t, i); return s && (this.eventQueue.delete(i), this.logger.debug(`Dequeued pending events for "${i}".`)), s; }).flatMap(([, i]) => i); for (const [i, s] of this.listeners.entries()) this.matchWildcard(i, t) && (this.logger.debug(`Adding listener to pattern "${i}"`), s.add(n), r.length && (this.logger.debug(`Delivering pending events for "${t}".`), r.forEach((o) => { n({ ...o, wildcard: i }); }))); } /** * Emit an event and deliver it to the corresponding listeners. * * @private * @param {string} event - The event name to emit. * @param {any} data - The data associated with the event. * @param {Attributes} attrs - Optional attributes associated with the event. */ emitEvent(t, n, r) { if (typeof t != "string") { const o = new Error("Invalid arguments"); throw this.logger.error(o), o; } const i = { name: t, data: n, attrs: r }, s = Array.from(this.getMatchingListeners(t)); if (s.length) { this.logger.debug(`Delivering event "${t}" to listeners`); for (const [o, a] of s) a({ ...i, wildcard: o }); } else this.logger.debug(`No listeners for event "${t}", enqueuing`), this.eventQueue.has(t) || this.eventQueue.set(t, []), this.eventQueue.get(t).push(i); this.logger.debug("Posting message to channel", i), this.channel.postMessage(i); } /** * Get listeners that match the event name pattern. * * @private * @param {string} event - The event name to match. * @returns {Iterable<[string, EventBusListener]>} - Iterable of matching listeners and their patterns. */ *getMatchingListeners(t) { this.logger.debug(`Getting matching listeners for event "${t}"`); for (const [n, r] of this.listeners.entries()) if (this.matchWildcard(n, t)) for (const i of r) yield [n, i]; } /** * Unsubscribe a listener function from a specific event. * * @private * @param {string} event - The event name to unsubscribe from. * @param {EventBusListener} listener - The listener function to unsubscribe. */ unsubscribeFromEvent(t, n) { if (this.listeners.has(t)) { this.logger.debug(`Unsubscribing from event "${t}"`); const r = this.listeners.get(t); r.delete(n), r.size === 0 && (this.logger.debug(`No more listeners for event "${t}", deleting`), this.listeners.delete(t)); } } /** * Match wildcards in event names. * * @private * @param {string} wildcard - The wildcard pattern to match. * @param {string} pattern - The event name to check. * @returns {boolean} - `true` if the event name matches the pattern, otherwise `false`. */ matchWildcard(t, n) { const r = t.replace(/\*/g, "[^:]*").replace(/\*\*/g, ".*"), s = new RegExp(`^${r}$`).test(n); return this.logger.debug( `Wildcard "${t}" matches with pattern "${n}": ${s}` ), s; } } const RE = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; let IE = (e = 21) => { let t = "", n = crypto.getRandomValues(new Uint8Array(e)); for (; e--; ) t += RE[n[e] & 63]; return t; }; const Un = (e = 8) => IE(e), lr = (e, t = !1) => { const n = Object.entries(e).reduce((r, [i, s]) => s !== void 0 && (!t || s !== null) ? `${r}${r ? "&" : ""}${i}=${s}` : r, ""); return n ? `?${n}` : ""; }, sv = (e) => { const t = document.getElementById(e); return t ? new URL(t.src).searchParams : new URLSearchParams(); }; function PE() { const e = new Error().stack.split(` `); return e.length < 3 ? "" : e[2].trim().substring(3); } function ov(e) { return new Promise((t) => setTimeout(t, e)); } var av = { exports: {} }; (function(e) { (function(t, n) { e.exports ? e.exports = n() : t.log = n(); })(Sd, function() { var t = function() { }, n = "undefined", r = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), i = [ "trace", "debug", "info", "warn", "error" ], s = {}, o = null; function a(m, k) { var h = m[k]; if (typeof h.bind == "function") return h.bind(m); try { return Function.prototype.bind.call(h, m); } catch { return function() { return Function.prototype.apply.apply(h, [m, arguments]); }; } } function l() { console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace(); } function u(m) { return m === "debug" && (m = "log"), typeof console === n ? !1 : m === "trace" && r ? l : console[m] !== void 0 ? a(console, m) : console.log !== void 0 ? a(console, "log") : t; } function c() { for (var m = this.getLevel(), k = 0; k < i.length; k++) { var h = i[k]; this[h] = k < m ? t : this.methodFactory(h, m, this.name); } if (this.log = this.debug, typeof console === n && m < this.levels.SILENT) return "No console available for logging"; } function d(m) { return function() { typeof console !== n && (c.call(this), this[m].apply(this, arguments)); }; } function f(m, k, h) { return u(m) || d.apply(this, arguments); } function v(m, k) { var h = this, p, y, S, N = "loglevel"; typeof m == "string" ? N += ":" + m : typeof m == "symbol" && (N = void 0); function E(P) { var W = (i[P] || "silent").toUpperCase(); if (!(typeof window === n || !N)) { try { window.localStorage[N] = W; return; } catch { } try { window.document.cookie = encodeURIComponent(N) + "=" + W + ";"; } catch { } } } function A() { var P; if (!(typeof window === n || !N)) { try { P = window.localStorage[N]; } catch { } if (typeof P === n) try { var W = window.document.cookie, me = encodeURIComponent(N), _ = W.indexOf(me + "="); _ !== -1 && (P = /^([^;]+)/.exec( W.slice(_ + me.length + 1) )[1]); } catch { } return h.levels[P] === void 0 && (P = void 0), P; } } function b() { if (!(typeof window === n || !N)) { try { window.localStorage.removeItem(N); } catch { } try { window.document.cookie = encodeURIComponent(N) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC"; } catch { } } } function I(P) { var W = P; if (typeof W == "string" && h.levels[W.toUpperCase()] !== void 0 && (W = h.levels[W.toUpperCase()]), typeof W == "number" && W >= 0 && W <= h.levels.SILENT) return W; throw new TypeError("log.setLevel() called with invalid level: " + P); } h.name = m, h.levels = { TRACE: 0, DEBUG: 1, INFO: 2, WARN: 3, ERROR: 4, SILENT: 5 }, h.methodFactory = k || f, h.getLevel = function() { return S ?? y ?? p; }, h.setLevel = function(P, W) { return S = I(P), W !== !1 && E(S), c.call(h); }, h.setDefaultLevel = function(P) { y = I(P), A() || h.setLevel(P, !1); }, h.resetLevel = function() { S = null, b(), c.call(h); }, h.enableAll = function(P) { h.setLevel(h.levels.TRACE, P); }, h.disableAll = function(P) { h.setLevel(h.levels.SILENT, P); }, h.rebuild = function() { if (o !== h && (p = I(o.getLevel())), c.call(h), o === h) for (var P in s) s[P].rebuild(); }, p = I( o ? o.getLevel() : "WARN" ); var F = A(); F != null && (S = I(F)), c.call(h); } o = new v(), o.getLogger = function(k) { if (typeof k != "symbol" && typeof k != "string" || k === "") throw new TypeError("You must supply a name when creating a logger."); var h = s[k]; return h || (h = s[k] = new v( k, o.methodFactory )), h; }; var g = typeof window !== n ? window.log : void 0; return o.noConflict = function() { return typeof window !== n && window.log === o && (window.log = g), o; }, o.getLoggers = function() { return s; }, o.default = o, o; }); })(av); var Zu = av.exports; const Ql = /* @__PURE__ */ za(Zu); var lv = { exports: {} }; (function(e) { (function(t, n) { e.exports ? e.exports = n() : t.prefix = n(t); })(Sd, function(t) { var n = function(c) { for (var d = 1, f = arguments.length, v; d < f; d++) for (v in arguments[d]) Object.prototype.hasOwnProperty.call(arguments[d], v) && (c[v] = arguments[d][v]); return c; }, r = { template: "[%t] %l:", levelFormatter: function(c) { return c.toUpperCase(); }, nameFormatter: function(c) { return c || "root"; }, timestampFormatter: function(c) { return c.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1"); }, format: void 0 }, i, s = {}, o = function(c) { if (!c || !c.getLogger) throw new TypeError("Argument is not a root logger"); i = c; }, a = function(c, d) { if (!c || !c.setLevel) throw new TypeError("Argument is not a logger"); var f = c.methodFactory, v = c.name || "", g = s[v] || s[""] || r; function m(k, h, p) { var y = f(k, h, p), S = s[p] || s[""], N = S.template.indexOf("%t") !== -1, E = S.template.indexOf("%l") !== -1, A = S.template.indexOf("%n") !== -1; return function() { for (var b = "", I = arguments.length, F = Array(I), P = 0; P < I; P++) F[P] = arguments[P]; if (v || !s[p]) { var W = S.timestampFormatter(/* @__PURE__ */ new Date()), me = S.levelFormatter(k), _ = S.nameFormatter(p); S.format ? b += S.format(me, _, W) : (b += S.template, N && (b = b.replace(/%t/, W)), E && (b = b.replace(/%l/, me)), A && (b = b.replace(/%n/, _))), F.length && typeof F[0] == "string" ? F[0] = b + " " + F[0] : F.unshift(b); } y.apply(void 0, F); }; } return s[v] || (c.methodFactory = m), d = d || {}, d.template && (d.format = void 0), s[v] = n({}, g, d), c.setLevel(c.getLevel()), i || c.warn( "It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md" ), c; }, l = { reg: o, apply: a }, u; return t && (u = t.prefix, l.noConflict = function() { return t.prefix === l && (t.prefix = u), l; }), l; }); })(lv); var LE = lv.exports; const Sh = /* @__PURE__ */ za(LE); var An; let St = (An = class { constructor(t = "") { O(this, "provider", Ql); O(this, "defaultLevel", this.getDefaultLevel()); this.namePrefix = t, this.namePrefix = t ? `${t}-` : "", this.provider.setDefaultLevel(this.defaultLevel), Sh.reg(Ql), Sh.apply(Ql, { template: "%l [%n]", nameFormatter: (n) => (n == null ? void 0 : n.toLowerCase()) ?? "", timestampFormatter: () => (/* @__PURE__ */ new Date()).toTimeString().slice(0, 8) }); } createLogger(t) { const n = `${this.namePrefix}${t.toLowerCase()}`, r = this.provider.getLogger(n), i = localStorage.getItem( `loglevel:${n}` ); return r.setLevel(i || this.defaultLevel), r; } static withPrefix(t, n) { const r = /\(\w+\)/, i = { get(s, o) { const a = s[o]; return typeof a == "function" && An.LOG_METHODS.includes(o) ? (...l) => (typeof l[0] == "string" && !r.test(l[0]) && (l[0] = `(${n}) ${l[0]}`), a.apply(s, l)) : a; } }; return new Proxy(t, i); } getDefaultLevel() { const t = localStorage.getItem("loglevel"); return An.LOG_METHODS.reduce((r, i) => { const s = i.toUpperCase(); return r[s] = Zu.levels[s], r; }, {})[t == null ? void 0 : t.toUpperCase()] ?? Zu.levels.INFO; } }, O(An, "LOG_METHODS", [ "trace", "debug", "info", "warn", "error", "log" ]), An); const dt = class dt { constructor() { O(this, "instanceId", Un()); O(this, "log", new St("nz")); O(this, "coreLogger", this.log.createLogger("core")); O(this, "_config", null); O(this, "_account"); O(this, "_accountStatus", "idle"); O(this, "_productDataSource"); O(this, "_eventBus", new iv("nizza", this.coreLogger)); // Track the current account fetch request ID O(this, "activeAccountFetchId", null); this.coreLogger = St.withPrefix( this.coreLogger, `NizzaStore:${this.instanceId}` ), iE( this, { _config: pe, _account: pe, _productDataSource: pe, _accountStatus: pe, config: _n, account: _n, accountName: _n, accountStatus: _n, setAccount: Ye, configure: Ye, refetchAccount: Ye, setProductDataSource: Ye, setAddToCartConfig: Ye, setProductId: Ye }, { name: "NizzaStore", autoBind: !0 } ), this.refetchAccount = this.refetchAccount.bind(this); } static instance() { var n; if (!!((n = window == null ? void 0 : window.nizza) != null && n.store)) dt._instance = window.nizza.store; else { const r = new dt(); dt._instance = r, dt._instance.coreLogger.debug("Created new NizzaStore instance"); } return window.nizza || (window.nizza = {}, window.nz = {}, dt._instance.coreLogger.debug("Initialized nizza window object")), window.nizza.store = dt._instance, window.nz = window.nizza, dt._instance; } async configure(t) { try { this.coreLogger.debug("Running configure with config:", t), await this.updateConfig(t); } catch (n) { this.setAccountStatus("error"), this.coreLogger.error("Error running configure", n); } } async updateConfig(t = {}) { var i; const { account: n, authToken: r } = this._config ?? {}; this._config = { ...this._config, ...t }, (i = this._config) != null && i.account && (n !== this._config.account || r !== this._config.authToken) ? (this.coreLogger.debug( `Fetching account data for account: ${this._config.account}, authToken provided: ${!!this._config.authToken}` ), await this.fetchAccount(this._config.account, this._config.authToken)) : this.coreLogger.debug( "Skipped fetching account data as the account or authToken did not change" ), t.getProductDataSource && this.setProductDataSource(await t.getProductDataSource()); } async fetchAccount(t, n) { this.setAccountStatus("loading"); const r = Un(); this.activeAccountFetchId = r; try { const i = await Nv(t, n); if (this.activeAccountFetchId !== r) { this.coreLogger.debug( "Fetch account request was superseded by a newer request" ); return; } this.setAccount(i), this.setAccountStatus("success"), this.coreLogger.debug("Account fetched and set successfully:", i); } catch { this.activeAccountFetchId === r && this.setAccountStatus("error"); } } setAccount(t) { this._account = t; } setAccountStatus(t) { this._accountStatus = t; } setProductDataSource(t) { this._productDataSource = t; } setProductId(t) { this._config && (this._config.productId = t); } setOrderFormId(t) { this._config && (this._config.orderFormId = t); } setAddToCartConfig(t) { if (!this._config) { const n = "You cannot set addToCartConfig before running configure()"; throw this.coreLogger.error(n), new Error(n); } this._config.addToCartConfig = t; } setAuthToken(t) { this.updateConfig({ authToken: t }); } async refetchAccount() { var t; (t = this._config) != null && t.account && await this.fetchAccount(this._config.account, this._config.authToken); } get version() { return dt.version; } get config() { return this._config; } get account() { return this._account; } get accountStatus() { return this._accountStatus; } get accountName() { var t; return (t = this._config) == null ? void 0 : t.account; } isPvtAccount(t) { var n; return !!(t && ((n = this._config) != null && n.authToken)); } isPubAccount(t) { var n; return !!(t && !((n = this._config) != null && n.authToken)); } get productDataSource() { return this._productDataSource; } get eventBus() { return this._eventBus; } }; O(dt, "version", "7"), O(dt, "_instance"); let oa = dt; const Le = (e) => { const t = oa.instance(); return Wg( () => !!t.account, () => e == null ? void 0 : e(t) ), t; }; function Dd() { return U.useMemo(() => Le(), []); } function uv(e, t) { const n = Dd(); return tv(() => e(n), t); } const { coreLogger: FE } = Le(), DE = St.withPrefix(FE, "CustomFetch"); async function tt(e) { const { url: t, method: n = "GET", body: r, raw: i = !1, contentTypeJson: s = !0, timeout: o, ...a } = e, l = new Headers({ ...s ? { "content-type": "application/json" } : {}, ...e.headers }); try { const u = new AbortController(), { signal: c } = u; let d; const f = fetch(t, { method: n, headers: l, body: r, signal: c, ...a }); o && (d = setTimeout(() => { u.abort(); }, o)); const v = await f; if (i) return v; const g = await v.json(); if (clearTimeout(d), !v.ok) { const m = g ? JSON.stringify(g) : v.statusText; throw new Error(m); } return g; } catch (u) { throw typeof t == "string" && !t.includes("accounts/v2") && DE.debug(u), u; } } const ec = (e) => tt({ ...e, contentTypeJson: !1, raw: !1 }); function $E(e, t, n) { fetch(t).then((r) => r.blob()).then((r) => cv(r, `${e}.${n}`)); } const cv = (e, t, n) => { const r = [e], i = new Blob(r, { type: n ?? "application/octet-stream" }); if (typeof window.navigator.msSaveBlob < "u") return window.navigator.msSaveBlob(i, t); const s = window.URL && window.URL.createObjectURL ? window.URL.createObjectURL(i) : window.webkitURL.createObjectURL(i), o = document.createElement("a"); return o.style.display = "none", o.href = s, o.setAttribute("download", t), typeof o.download > "u" && o.setAttribute("target", "_blank"), document.body.appendChild(o), o.click(), setTimeout(() => { document.body.removeChild(o), window.URL.revokeObjectURL(s); }, 200); }, { coreLogger: ME } = Le(), UE = St.withPrefix(ME, "getClientTimeZone"); function VE() { var r, i; let e = null, t = null, n = null; try { e = ((i = (r = Intl.DateTimeFormat()) == null ? void 0 : r.resolvedOptions()) == null ? void 0 : i.timeZone) ?? null; const s = -(/* @__PURE__ */ new Date()).getTimezoneOffset(); n = s; const o = s >= 0 ? "+" : "-", a = String( Math.floor(Math.abs(s) / 60) ).padStart(2, "0"), l = String(Math.abs(s) % 60).padStart( 2, "0" ); t = `${o}${a}:${l}`; } catch { UE.error("Error obtaining time zone or offset"); } return { offset: t, offsetValue: n, value: e, country: null, included: null, label: null }; } var Vr = /* @__PURE__ */ ((e) => (e.VTEX = "VTEX", e.VTEX_IO = "VTEX-IO", e.VTEX_CMS = "PORTAL-VTEX", e.PLATFORM = "PLATFORM", e.UNKNOWN = "UNKNOWN", e))(Vr || {}), dv = /* @__PURE__ */ ((e) => (e.PLATFORM = "platform_module", e.ADENDA = "subscription_module", e.APP_STORE = "app_store", e))(dv || {}), fv = /* @__PURE__ */ ((e) => (e.ACTIVE = "active_contract", e.INACTIVE = "inactive_contract", e))(fv || {}), hv = /* @__PURE__ */ ((e) => (e.LITE = "lite", e.STANDARD = "standard", e.PRO = "pro", e))(hv || {}), pv = /* @__PURE__ */ ((e) => (e.LITE = "PLAN_LITE", e.STANDARD = "PLAN_ESTANDAR", e.PRO = "PLAN_PRO", e.NONE = "NO_PLAN", e))(pv || {}), mv = /* @__PURE__ */ ((e) => (e.PAST = "past", e.LIVE = "live", e.FUTURE = "future", e))(mv || {}); class gv extends Nr { constructor(t) { super("CREATE_PLAN_ERROR", `Error creating plan: ${t.plan}`, t); } } const _h = `${Bn.apiUrls.restV1}/plans`; class vv { async get(t) { const r = `/info${lr({ planType: t })}`, i = _h + r, { data: s } = await tt({ url: i }); return s; } async create(t) { const n = `${_h}/create`, { success: r } = await tt({ url: n, method: "POST", body: JSON.stringify(t) }); if (!r) throw new gv(t); } } function jE(e) { const { host: t, account: n, username: r, createdAt: i, subscriptionType: s, installationDateApp: o, ...a } = e; return { ...a, account: n, host: t ?? null, username: r ?? n, createdAt: new Date(i), subscriptionType: s ?? null, installationDateApp: new Date(o) }; } function BE(e) { const { host: t, ...n } = e; return { ...n, host: t ?? null, plan: {} }; } const zE = `${Bn.apiUrls.restV1}/accounts/v2`; class yv { async get(t) { const n = `${zE}/${t}`, { data: r } = await tt({ url: n }); return r ? BE(r) : null; } } const HE = `${Bn.apiUrls.restV1}/accounts/v2/pvt`; class GE { async get(t, n) { const r = `${HE}/${t}`, { data: i } = await tt({ url: r, headers: { authorization: `Bearer ${n}` } }); return i ? jE(i) : null; } } class kv { constructor(t, n, r) { this.publicAccountRepo = t, this.privateAccountRepo = n, this.accountPlanRepo = r; } // async get(name: string, authToken: string): Promise; // async get(name: string, authToken?: undefined): Promise; async get(t, n) { try { const r = n ? await this.privateAccountRepo.get(t, n) : await this.publicAccountRepo.get(t); if (!r) throw new fs(t); const i = await this.accountPlanRepo.get(r.descriptionPlan); if (!i) throw new fs(r.descriptionPlan); return { ...r, plan: i }; } catch (r) { throw new Ve(r); } } } const WE = new yv(), qE = new GE(), KE = new vv(), Sv = new kv( WE, qE, KE ), _v = () => { const { account: e, accountName: t, accountStatus: n, refetchAccount: r, isPvtAccount: i, isPubAccount: s } = uv((u) => ({ account: u.account, accountName: u.accountName, accountStatus: u.accountStatus, refetchAccount: u.refetchAccount, isPvtAccount: u.isPvtAccount, isPubAccount: u.isPubAccount })), o = ["idle", "loading"].includes(n); return { account: e, accountName: t, isLoading: o, isError: n === "error", isSuccess: n === "success", accountStatus: n, refetchAccount: r, isPvtAccount: i, isPubAccount: s }; }; async function Nv(e, t) { return Sv.get(e, t); } var Ev = /* @__PURE__ */ ((e) => (e.CREATED = "CREATED", e.STARTING = "STARTING", e.LIVE = "LIVE", e.FINALIZED = "FINALIZED", e))(Ev || {}); const QE = { ALL: "*", CORE: "core:**", ADD_TO_CART_HOOKS: "core:addToCartHooks:**", LIVE_STREAMING_EVENT: "event:**", EVENT_CHAT: "event:chat:**", EVENT_PRODUCTS: "event:products:**", CUSTOMIZE_LIVE: "customize-live:**", PLAYER: "player:**", SNACK_SIZE_VIDEO: "ssv:**", SNACK_SIZE_VIDEO_ADMIN: "ssv-admin:**", UI: "ui:**", UTILS: "utils:**" }, wv = { EVENT_STATUS_CHANGED: "event:statusChanged", /** AddToCartHook events */ ATCH_ACTION_EXECUTED: "core:addToCartHooks:actionExecuted" }; var Av = /* @__PURE__ */ ((e) => (e.English = "en", e.Spanish = "es", e.Portuguese = "pt", e))(Av || {}), bv = /* @__PURE__ */ ((e) => (e.COMBO = "Combo", e.BADGE = "Badged", e))(bv || {}), bn = /* @__PURE__ */ ((e) => (e.VTEX = "VTEX", e.PLATFORM = "platform", e.CACE = "CACE", e.GLOBAL_PAGE = "globalPage", e.CUSTOMIZATION = "customization", e.FAST_STORE = "faststore", e.UNKNOWN = "unknown", e))(bn || {}); const JE = 4; var Cv = /* @__PURE__ */ ((e) => (e.Created = "CREATED", e.Finalized = "FINALIZED", e.Live = "LIVE", e.Starting = "STARTING", e))(Cv || {}), Ov = /* @__PURE__ */ ((e) => (e.Add = "add", e.Remove = "remove", e))(Ov || {}), Tv = /* @__PURE__ */ ((e) => (e.Active = "active", e.Inactive = "inactive", e))(Tv || {}); const xv = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "AddCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CreateCollectionInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Rv = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Iv = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Pv = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetAllCollections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Lv = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "ManageCollectionProduct" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ManageCollectionProductInInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "manageCollectionProduct" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Fv = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "SearchCollections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Dv = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "UpdateCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "UpdateCollectionInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updateCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, YE = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindMinimalEvent" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "FindEventInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findEvent" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EventData" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "eventName" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailsPath" } }, { kind: "Field", name: { kind: "Name", value: "recordVideoPath" } }, { kind: "Field", name: { kind: "Name", value: "createdAt" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "thumbnails" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, XE = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "SearchMinimalEvents" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "SearchEventInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchEvent" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EventArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "eventName" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailsPath" } }, { kind: "Field", name: { kind: "Name", value: "recordVideoPath" } }, { kind: "Field", name: { kind: "Name", value: "createdAt" } }, { kind: "Field", name: { kind: "Name", value: "status" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ZE = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "BlockUser" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "BlockUserInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "blockUser" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "BlockUserSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, ew = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "ChangeAccountUsername" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ChangeUsernameInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "changeAccountUsername" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ChangeUsernameSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, tw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteChatMessage" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "DeleteChatInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteChatMessage" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "DeleteChatMessageSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, nw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetAllChatMessage" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "GetAllChatMessageInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllChatMessage" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ChatMessageArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "connectionId" } }, { kind: "Field", name: { kind: "Name", value: "data" } }, { kind: "Field", name: { kind: "Name", value: "email" } }, { kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "idEvent" } }, { kind: "Field", name: { kind: "Name", value: "sendDate" } }, { kind: "Field", name: { kind: "Name", value: "sessionId" } }, { kind: "Field", name: { kind: "Name", value: "type" } }, { kind: "Field", name: { kind: "Name", value: "username" } }, { kind: "Field", name: { kind: "Name", value: "isAdmin" } }, { kind: "Field", name: { kind: "Name", value: "urlGif" } }, { kind: "Field", name: { kind: "Name", value: "second" } }, { kind: "Field", name: { kind: "Name", value: "ip" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, $v = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChatRoomToken" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "GetChatRoomInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getChatRoomToken" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ChatRoomTokenData" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "token" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, rw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "PinChatMessage" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "PinChatInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "pinChatMessage" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "PinChatMessageSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, iw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "highlightProduct" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "HighlightProductInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "highlightProduct" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "HighlightProductSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, sw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "deleteAllCustomization" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomPlayerInputAccount" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteAllCustomPlayer" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ow = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "getAllCustomization" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllCustomPlayer" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CustomPlayerSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "data" } }, { kind: "Field", name: { kind: "Name", value: "section" } }, { kind: "Field", name: { kind: "Name", value: "id" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, aw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "updateCustomization" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomPlayerInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updateCustomPlayer" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, lw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "sendAddToCart" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "AddToCartInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "sendAddToCart" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "AddToCartSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, uw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetTimeLine" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "GetTimeLineInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getTimeLine" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "TimeLineArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "time" } }, { kind: "Field", name: { kind: "Name", value: "likes" } }, { kind: "Field", name: { kind: "Name", value: "comments" } }, { kind: "Field", name: { kind: "Name", value: "viewers" } }, { kind: "Field", name: { kind: "Name", value: "orders" } }, { kind: "Field", name: { kind: "Name", value: "minute" } }, { kind: "Field", name: { kind: "Name", value: "hour" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, cw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "AppendProductsToSnackVideo" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "RelateToProductsSnackVideoInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "appendProductsSnackVideo" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ActionSnackVideoSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, dw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "CreatePlayList" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CreatePlayListInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createPlayList" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CreatePlayListSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, fw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "CreateSnackVideoBatch" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CreateSnackVideoInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createSnackVideos" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, hw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteRelationshipWithSnackVideo" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoRelationshipKeys" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteRelationshipSnackVideo" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ActionSnackVideoSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }] } }] } }] } }] }, pw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteSnackVideo" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "DeleteSnackVideoInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteSnackVideo" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ActionSnackVideoSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, mw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindManySnackVideos" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "FindManySnackVideoInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findManySnackVideos" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "url" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "uploadProgress" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "eventId" } }, { kind: "Field", name: { kind: "Name", value: "eventName" } }, { kind: "Field", name: { kind: "Name", value: "transmitionType" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, gw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetAllSnackVideos" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllSnackVideos" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoCreatedArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "snackVideos" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "url" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "uploadProgress" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "eventId" } }, { kind: "Field", name: { kind: "Name", value: "eventName" } }, { kind: "Field", name: { kind: "Name", value: "created" } }, { kind: "Field", name: { kind: "Name", value: "transmitionType" } }] } }, { kind: "Field", name: { kind: "Name", value: "cursor" } }, { kind: "Field", name: { kind: "Name", value: "totalItems" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, vw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetPlayLists" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getPlayLists" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "PlayListArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "created" } }, { kind: "Field", name: { kind: "Name", value: "videoAmount" } }, { kind: "Field", name: { kind: "Name", value: "productAmount" } }, { kind: "Field", name: { kind: "Name", value: "updated" } }, { kind: "Field", name: { kind: "Name", value: "videos" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "order" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "transmitionType" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, yw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetSnackVideoRelationships" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoRelationshipInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getRelationshipSnackVideos" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "RelationshipSnackVideoArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "sourceEntity" } }, { kind: "Field", name: { kind: "Name", value: "attributeId" } }] } }] } }] } }] } }] }, kw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "SearchSnackVideos" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "SearchInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchSnackVideos" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoCreatedArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "snackVideos" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "url" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "uploadProgress" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "eventId" } }, { kind: "Field", name: { kind: "Name", value: "eventName" } }, { kind: "Field", name: { kind: "Name", value: "created" } }] } }, { kind: "Field", name: { kind: "Name", value: "cursor" } }, { kind: "Field", name: { kind: "Name", value: "totalItems" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Sw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "UpdatePlayList" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "UpdatePlayListInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updatePlayList" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "UpdatePlayListSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, _w = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindByProductSnackVideo" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "FindByProductSnackVideoInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findByProductSnackVideo" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "url" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "transmitionType" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Nw = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetPlayList" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "GetPlayListQueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getPlayList" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "PlayListData" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "videos" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productId" } }, { kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "url" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "transmitionType" } }, { kind: "Field", name: { kind: "Name", value: "order" } }, { kind: "Field", name: { kind: "Name", value: "productName" } }, { kind: "Field", name: { kind: "Name", value: "productImageUrl" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Ew = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, AddCollectionDocument: xv, AppendProductsToSnackVideoDocument: cw, BlockUserDocument: ZE, ChangeAccountUsernameDocument: ew, CreatePlayListDocument: dw, CreateSnackVideoBatchDocument: fw, DeleteAllCustomizationDocument: sw, DeleteChatMessageDocument: tw, DeleteCollectionDocument: Rv, DeleteRelationshipWithSnackVideoDocument: hw, DeleteSnackVideoDocument: pw, EventStatus: Cv, FindByProductSnackVideoDocument: _w, FindCollectionDocument: Iv, FindManySnackVideosDocument: mw, FindMinimalEventDocument: YE, GetAllChatMessageDocument: nw, GetAllCollectionsDocument: Pv, GetAllCustomizationDocument: ow, GetAllSnackVideosDocument: gw, GetChatRoomTokenDocument: $v, GetPlayListDocument: Nw, GetPlayListsDocument: vw, GetSnackVideoRelationshipsDocument: yw, GetTimeLineDocument: uw, HighlightProductDocument: iw, ManageCollectionProductDocument: Lv, Methods: Ov, PinChatMessageDocument: rw, SearchCollectionsDocument: Fv, SearchMinimalEventsDocument: XE, SearchSnackVideosDocument: kw, SendAddToCartDocument: lw, Status: Tv, UpdateCollectionDocument: Dv, UpdateCustomizationDocument: aw, UpdatePlayListDocument: Sw }, Symbol.toStringTag, { value: "Module" })); var ol = /* @__PURE__ */ ((e) => (e.OPEN_TAB = "openTab", e.OPEN_VARIATION_SELECTOR = "openVariationSelector", e.ADD_TO_CART = "addToCart", e))(ol || {}); function ww(e) { return { class: e, _value: null, get value() { return this._value || (this._value = new e(), Object.freeze(this)), this._value; } }; } var rt = /* @__PURE__ */ ((e) => (e.Local = "local", e.VtexLegacy = "vtexlegacy", e.VtexIO = "vtexio", e.VtexFastStore = "faststore", e.Platform = "platform", e.External = "external", e))(rt || {}), $d = /* @__PURE__ */ ((e) => (e.PROD = "prod", e.DEV = "dev", e.LOCAL = "local", e))($d || {}); const { coreLogger: Aw } = Le(), tc = St.withPrefix(Aw, "addToCartHooks"), Jl = "addToCartHooks.notification.error", nc = { errorAddingToCart: Jl, errorOpeningVariationSelector: Jl, errorOpeningNewTab: Jl, successAddingToCart: "addToCartHooks.notification.success" }; async function bw(e) { const t = { ...e, action: { type: ol.ADD_TO_CART, exec: () => tc.error("action no implemented in validate hook") } }; try { const n = await Cw(t), r = await Ow(n); await Tw(r); } catch (n) { tc.error("error unhandled", n); } } async function Cw(e) { var s; const { context: t, userAddToCartConfig: n } = e, r = (s = n == null ? void 0 : n.hooks) == null ? void 0 : s.transform; let i = e.product; if (r) try { i = await r({ product: { ...i }, data: t.data ?? {} }); } catch (o) { aa("transform", o); } return { ...e, product: i }; } async function Ow(e) { var l; const { context: t, hookStrategy: n, userAddToCartConfig: r, product: i } = e, s = Mv(e), o = (l = r == null ? void 0 : r.hooks) == null ? void 0 : l.validate; let a = n.validate({ ...e, actionFactory: s }); if (o) try { a = await o({ product: { ...i }, defaultAction: { ...a }, action: s, data: t.data ?? {} }); } catch (u) { aa("validate", u); } return { ...e, action: a, actionFactory: s }; } async function Tw(e) { var k; const { eventBus: t } = Le(), { product: n, userAddToCartConfig: r, notifyFactory: i, action: s, actionFactory: o } = e, { isVariationSelectorOpen: a, data: l = {} } = e.context, u = (k = r == null ? void 0 : r.hooks) == null ? void 0 : k.end, c = s.type === ol.ADD_TO_CART; let d = null, f = !1; const v = () => { !c || !a || o.openVariationSelector(!1).exec(); }, g = () => { !c || f || (d ? i.error(nc.errorAddingToCart) : i.success(nc.successAddingToCart)); }, m = () => { const h = { product: n, actionType: s.type, success: !d, error: d }; t.emit(wv.ATCH_ACTION_EXECUTED, h); }; try { if (!s.type || !s.exec) throw new Error("Invalid action object, missing keys 'type' or 'exec'"); await s.exec(); } catch (h) { aa("end", h), d = h; } if (u) try { f = !!await u({ data: l, error: d, notify: i, actionExecuted: s }); } catch (h) { aa("end", h); } v(), g(), m(); } function Mv(e) { const { actionFactory: t, userAddToCartConfig: n } = e, r = (i) => Object.entries(i ?? {}).reduce( (s, [o, a]) => ({ ...s, [o]: (l) => ({ type: o, exec: () => a(l) }) }), {} ); return { ...r(t), ...r(n == null ? void 0 : n.actionFactory) }; } function aa(e, t) { tc.error(`addToCartHooks error running ${e}: `, t); } class Uv { constructor(t) { O(this, "aggregate"); O(this, "_numSetPropsApplied", 0); this.aggregate = t; } setProps(t) { for (const [n, r] of Object.entries(t)) n in this.aggregate && (this.aggregate[n] = r); this._numSetPropsApplied++; } get isFirstSetProps() { return this._numSetPropsApplied === 1; } } function al(e) { return new Uv(e); } class xw { constructor(t) { O(this, "_value"); t !== void 0 && (this._value = t); } get value() { return this._value; } } var Re = /* @__PURE__ */ ((e) => (e.GENERAL_ERROR = "GENERAL_ERROR", e.AXIOS_ERROR = "AXIOS_ERROR", e.NETWORK_ERROR = "NETWORK_ERROR", e.CONFIG_ERROR = "CONFIG_ERROR", e.TIMEOUT_ERROR = "TIMEOUT_ERROR", e.AUTH_ERROR = "AUTH_ERROR", e.NOT_FOUND = "NOT_FOUND", e.VALIDATION_ERROR = "VALIDATION_ERROR", e.SERVER_ERROR = "SERVER_ERROR", e.BAD_REQUEST = "BAD_REQUEST", e.UNAUTHORIZED = "UNAUTHORIZED", e.FORBIDDEN = "FORBIDDEN", e.CONFLICT = "CONFLICT", e.GONE = "GONE", e.UNSUPPORTED_MEDIA_TYPE = "UNSUPPORTED_MEDIA_TYPE", e.TOO_MANY_REQUESTS = "TOO_MANY_REQUESTS", e.INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR", e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e))(Re || {}); function Vv(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: Rw } = Object.prototype, { getPrototypeOf: Md } = Object, ll = /* @__PURE__ */ ((e) => (t) => { const n = Rw.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), Mt = (e) => (e = e.toLowerCase(), (t) => ll(t) === e), ul = (e) => (t) => typeof t === e, { isArray: wi } = Array, vs = ul("undefined"); function Iw(e) { return e !== null && !vs(e) && e.constructor !== null && !vs(e.constructor) && st(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const jv = Mt("ArrayBuffer"); function Pw(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && jv(e.buffer), t; } const Lw = ul("string"), st = ul("function"), Bv = ul("number"), cl = (e) => e !== null && typeof e == "object", Fw = (e) => e === !0 || e === !1, Fo = (e) => { if (ll(e) !== "object") return !1; const t = Md(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); }, Dw = Mt("Date"), $w = Mt("File"), Mw = Mt("Blob"), Uw = Mt("FileList"), Vw = (e) => cl(e) && st(e.pipe), jw = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || st(e.append) && ((t = ll(e)) === "formdata" || // detect form-data instance t === "object" && st(e.toString) && e.toString() === "[object FormData]")); }, Bw = Mt("URLSearchParams"), [zw, Hw, Gw, Ww] = ["ReadableStream", "Request", "Response", "Headers"].map(Mt), qw = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function Ws(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let r, i; if (typeof e != "object" && (e = [e]), wi(e)) for (r = 0, i = e.length; r < i; r++) t.call(null, e[r], r, e); else { const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = s.length; let a; for (r = 0; r < o; r++) a = s[r], t.call(null, e[a], a, e); } } function zv(e, t) { t = t.toLowerCase(); const n = Object.keys(e); let r = n.length, i; for (; r-- > 0; ) if (i = n[r], t === i.toLowerCase()) return i; return null; } const nr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Hv = (e) => !vs(e) && e !== nr; function rc() { const { caseless: e } = Hv(this) && this || {}, t = {}, n = (r, i) => { const s = e && zv(t, i) || i; Fo(t[s]) && Fo(r) ? t[s] = rc(t[s], r) : Fo(r) ? t[s] = rc({}, r) : wi(r) ? t[s] = r.slice() : t[s] = r; }; for (let r = 0, i = arguments.length; r < i; r++) arguments[r] && Ws(arguments[r], n); return t; } const Kw = (e, t, n, { allOwnKeys: r } = {}) => (Ws(t, (i, s) => { n && st(i) ? e[s] = Vv(i, n) : e[s] = i; }, { allOwnKeys: r }), e), Qw = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Jw = (e, t, n, r) => { e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n); }, Yw = (e, t, n, r) => { let i, s, o; const a = {}; if (t = t || {}, e == null) return t; do { for (i = Object.getOwnPropertyNames(e), s = i.length; s-- > 0; ) o = i[s], (!r || r(o, e, t)) && !a[o] && (t[o] = e[o], a[o] = !0); e = n !== !1 && Md(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, Xw = (e, t, n) => { e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length; const r = e.indexOf(t, n); return r !== -1 && r === n; }, Zw = (e) => { if (!e) return null; if (wi(e)) return e; let t = e.length; if (!Bv(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, e1 = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Md(Uint8Array)), t1 = (e, t) => { const r = (e && e[Symbol.iterator]).call(e); let i; for (; (i = r.next()) && !i.done; ) { const s = i.value; t.call(e, s[0], s[1]); } }, n1 = (e, t) => { let n; const r = []; for (; (n = e.exec(t)) !== null; ) r.push(n); return r; }, r1 = Mt("HTMLFormElement"), i1 = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(n, r, i) { return r.toUpperCase() + i; } ), Nh = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), s1 = Mt("RegExp"), Gv = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), r = {}; Ws(n, (i, s) => { let o; (o = t(i, s, e)) !== !1 && (r[s] = o || i); }), Object.defineProperties(e, r); }, o1 = (e) => { Gv(e, (t, n) => { if (st(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const r = e[n]; if (st(r)) { if (t.enumerable = !1, "writable" in t) { t.writable = !1; return; } t.set || (t.set = () => { throw Error("Can not rewrite read-only method '" + n + "'"); }); } }); }, a1 = (e, t) => { const n = {}, r = (i) => { i.forEach((s) => { n[s] = !0; }); }; return wi(e) ? r(e) : r(String(e).split(t)), n; }, l1 = () => { }, u1 = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Yl = "abcdefghijklmnopqrstuvwxyz", Eh = "0123456789", Wv = { DIGIT: Eh, ALPHA: Yl, ALPHA_DIGIT: Yl + Yl.toUpperCase() + Eh }, c1 = (e = 16, t = Wv.ALPHA_DIGIT) => { let n = ""; const { length: r } = t; for (; e--; ) n += t[Math.random() * r | 0]; return n; }; function d1(e) { return !!(e && st(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]); } const f1 = (e) => { const t = new Array(10), n = (r, i) => { if (cl(r)) { if (t.indexOf(r) >= 0) return; if (!("toJSON" in r)) { t[i] = r; const s = wi(r) ? [] : {}; return Ws(r, (o, a) => { const l = n(o, i + 1); !vs(l) && (s[a] = l); }), t[i] = void 0, s; } } return r; }; return n(e, 0); }, h1 = Mt("AsyncFunction"), p1 = (e) => e && (cl(e) || st(e)) && st(e.then) && st(e.catch), qv = ((e, t) => e ? setImmediate : t ? ((n, r) => (nr.addEventListener("message", ({ source: i, data: s }) => { i === nr && s === n && r.length && r.shift()(); }, !1), (i) => { r.push(i), nr.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", st(nr.postMessage) ), m1 = typeof queueMicrotask < "u" ? queueMicrotask.bind(nr) : typeof process < "u" && process.nextTick || qv, w = { isArray: wi, isArrayBuffer: jv, isBuffer: Iw, isFormData: jw, isArrayBufferView: Pw, isString: Lw, isNumber: Bv, isBoolean: Fw, isObject: cl, isPlainObject: Fo, isReadableStream: zw, isRequest: Hw, isResponse: Gw, isHeaders: Ww, isUndefined: vs, isDate: Dw, isFile: $w, isBlob: Mw, isRegExp: s1, isFunction: st, isStream: Vw, isURLSearchParams: Bw, isTypedArray: e1, isFileList: Uw, forEach: Ws, merge: rc, extend: Kw, trim: qw, stripBOM: Qw, inherits: Jw, toFlatObject: Yw, kindOf: ll, kindOfTest: Mt, endsWith: Xw, toArray: Zw, forEachEntry: t1, matchAll: n1, isHTMLForm: r1, hasOwnProperty: Nh, hasOwnProp: Nh, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: Gv, freezeMethods: o1, toObjectSet: a1, toCamelCase: i1, noop: l1, toFiniteNumber: u1, findKey: zv, global: nr, isContextDefined: Hv, ALPHABET: Wv, generateString: c1, isSpecCompliantForm: d1, toJSONObject: f1, isAsyncFn: h1, isThenable: p1, setImmediate: qv, asap: m1 }; function G(e, t, n, r, i) { 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), i && (this.response = i, this.status = i.status ? i.status : null); } w.inherits(G, Error, { toJSON: function() { return { // Standard message: this.message, name: this.name, // Microsoft description: this.description, number: this.number, // Mozilla fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, // Axios config: w.toJSONObject(this.config), code: this.code, status: this.status }; } }); const Kv = G.prototype, Qv = {}; [ "ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL" // eslint-disable-next-line func-names ].forEach((e) => { Qv[e] = { value: e }; }); Object.defineProperties(G, Qv); Object.defineProperty(Kv, "isAxiosError", { value: !0 }); G.from = (e, t, n, r, i, s) => { const o = Object.create(Kv); return w.toFlatObject(e, o, function(l) { return l !== Error.prototype; }, (a) => a !== "isAxiosError"), G.call(o, e.message, t, n, r, i), o.cause = e, o.name = e.name, s && Object.assign(o, s), o; }; const g1 = null; function ic(e) { return w.isPlainObject(e) || w.isArray(e); } function Jv(e) { return w.endsWith(e, "[]") ? e.slice(0, -2) : e; } function wh(e, t, n) { return e ? e.concat(t).map(function(i, s) { return i = Jv(i), !n && s ? "[" + i + "]" : i; }).join(n ? "." : "") : t; } function v1(e) { return w.isArray(e) && !e.some(ic); } const y1 = w.toFlatObject(w, {}, null, function(t) { return /^is[A-Z]/.test(t); }); function dl(e, t, n) { if (!w.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = w.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(m, k) { return !w.isUndefined(k[m]); }); const r = n.metaTokens, i = n.visitor || c, s = n.dots, o = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && w.isSpecCompliantForm(t); if (!w.isFunction(i)) throw new TypeError("visitor must be a function"); function u(g) { if (g === null) return ""; if (w.isDate(g)) return g.toISOString(); if (!l && w.isBlob(g)) throw new G("Blob is not supported. Use a Buffer instead."); return w.isArrayBuffer(g) || w.isTypedArray(g) ? l && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g; } function c(g, m, k) { let h = g; if (g && !k && typeof g == "object") { if (w.endsWith(m, "{}")) m = r ? m : m.slice(0, -2), g = JSON.stringify(g); else if (w.isArray(g) && v1(g) || (w.isFileList(g) || w.endsWith(m, "[]")) && (h = w.toArray(g))) return m = Jv(m), h.forEach(function(y, S) { !(w.isUndefined(y) || y === null) && t.append( // eslint-disable-next-line no-nested-ternary o === !0 ? wh([m], S, s) : o === null ? m : m + "[]", u(y) ); }), !1; } return ic(g) ? !0 : (t.append(wh(k, m, s), u(g)), !1); } const d = [], f = Object.assign(y1, { defaultVisitor: c, convertValue: u, isVisitable: ic }); function v(g, m) { if (!w.isUndefined(g)) { if (d.indexOf(g) !== -1) throw Error("Circular reference detected in " + m.join(".")); d.push(g), w.forEach(g, function(h, p) { (!(w.isUndefined(h) || h === null) && i.call( t, h, w.isString(p) ? p.trim() : p, m, f )) === !0 && v(h, m ? m.concat(p) : [p]); }), d.pop(); } } if (!w.isObject(e)) throw new TypeError("data must be an object"); return v(e), t; } function Ah(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) { return t[r]; }); } function Ud(e, t) { this._pairs = [], e && dl(e, this, t); } const Yv = Ud.prototype; Yv.append = function(t, n) { this._pairs.push([t, n]); }; Yv.toString = function(t) { const n = t ? function(r) { return t.call(this, r, Ah); } : Ah; return this._pairs.map(function(i) { return n(i[0]) + "=" + n(i[1]); }, "").join("&"); }; function k1(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function Xv(e, t, n) { if (!t) return e; const r = n && n.encode || k1, i = n && n.serialize; let s; if (i ? s = i(t, n) : s = w.isURLSearchParams(t) ? t.toString() : new Ud(t, n).toString(r), s) { const o = e.indexOf("#"); o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + s; } return e; } class bh { constructor() { this.handlers = []; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` * * @return {Number} An ID used to remove interceptor later */ use(t, n, r) { return this.handlers.push({ fulfilled: t, rejected: n, synchronous: r ? r.synchronous : !1, runWhen: r ? r.runWhen : null }), this.handlers.length - 1; } /** * Remove an interceptor from the stack * * @param {Number} id The ID that was returned by `use` * * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise */ eject(t) { this.handlers[t] && (this.handlers[t] = null); } /** * Clear all interceptors from the stack * * @returns {void} */ clear() { this.handlers && (this.handlers = []); } /** * Iterate over all the registered interceptors * * This method is particularly useful for skipping over any * interceptors that may have become `null` calling `eject`. * * @param {Function} fn The function to call for each interceptor * * @returns {void} */ forEach(t) { w.forEach(this.handlers, function(r) { r !== null && t(r); }); } } const Zv = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, S1 = typeof URLSearchParams < "u" ? URLSearchParams : Ud, _1 = typeof FormData < "u" ? FormData : null, N1 = typeof Blob < "u" ? Blob : null, E1 = { isBrowser: !0, classes: { URLSearchParams: S1, FormData: _1, Blob: N1 }, protocols: ["http", "https", "file", "blob", "url", "data"] }, Vd = typeof window < "u" && typeof document < "u", sc = typeof navigator == "object" && navigator || void 0, w1 = Vd && (!sc || ["ReactNative", "NativeScript", "NS"].indexOf(sc.product) < 0), A1 = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", b1 = Vd && window.location.href || "http://localhost", C1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: Vd, hasStandardBrowserEnv: w1, hasStandardBrowserWebWorkerEnv: A1, navigator: sc, origin: b1 }, Symbol.toStringTag, { value: "Module" })), He = { ...C1, ...E1 }; function O1(e, t) { return dl(e, new He.classes.URLSearchParams(), Object.assign({ visitor: function(n, r, i, s) { return He.isNode && w.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments); } }, t)); } function T1(e) { return w.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function x1(e) { const t = {}, n = Object.keys(e); let r; const i = n.length; let s; for (r = 0; r < i; r++) s = n[r], t[s] = e[s]; return t; } function ey(e) { function t(n, r, i, s) { let o = n[s++]; if (o === "__proto__") return !0; const a = Number.isFinite(+o), l = s >= n.length; return o = !o && w.isArray(i) ? i.length : o, l ? (w.hasOwnProp(i, o) ? i[o] = [i[o], r] : i[o] = r, !a) : ((!i[o] || !w.isObject(i[o])) && (i[o] = []), t(n, r, i[o], s) && w.isArray(i[o]) && (i[o] = x1(i[o])), !a); } if (w.isFormData(e) && w.isFunction(e.entries)) { const n = {}; return w.forEachEntry(e, (r, i) => { t(T1(r), i, n, 0); }), n; } return null; } function R1(e, t, n) { if (w.isString(e)) try { return (t || JSON.parse)(e), w.trim(e); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (n || JSON.stringify)(e); } const qs = { transitional: Zv, adapter: ["xhr", "http", "fetch"], transformRequest: [function(t, n) { const r = n.getContentType() || "", i = r.indexOf("application/json") > -1, s = w.isObject(t); if (s && w.isHTMLForm(t) && (t = new FormData(t)), w.isFormData(t)) return i ? JSON.stringify(ey(t)) : t; if (w.isArrayBuffer(t) || w.isBuffer(t) || w.isStream(t) || w.isFile(t) || w.isBlob(t) || w.isReadableStream(t)) return t; if (w.isArrayBufferView(t)) return t.buffer; if (w.isURLSearchParams(t)) return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString(); let a; if (s) { if (r.indexOf("application/x-www-form-urlencoded") > -1) return O1(t, this.formSerializer).toString(); if ((a = w.isFileList(t)) || r.indexOf("multipart/form-data") > -1) { const l = this.env && this.env.FormData; return dl( a ? { "files[]": t } : t, l && new l(), this.formSerializer ); } } return s || i ? (n.setContentType("application/json", !1), R1(t)) : t; }], transformResponse: [function(t) { const n = this.transitional || qs.transitional, r = n && n.forcedJSONParsing, i = this.responseType === "json"; if (w.isResponse(t) || w.isReadableStream(t)) return t; if (t && w.isString(t) && (r && !this.responseType || i)) { const o = !(n && n.silentJSONParsing) && i; try { return JSON.parse(t); } catch (a) { if (o) throw a.name === "SyntaxError" ? G.from(a, G.ERR_BAD_RESPONSE, this, null, this.response) : a; } } return t; }], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a * timeout is not created. */ timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", maxContentLength: -1, maxBodyLength: -1, env: { FormData: He.classes.FormData, Blob: He.classes.Blob }, validateStatus: function(t) { return t >= 200 && t < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; w.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { qs.headers[e] = {}; }); const I1 = w.toObjectSet([ "age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent" ]), P1 = (e) => { const t = {}; let n, r, i; return e && e.split(` `).forEach(function(o) { i = o.indexOf(":"), n = o.substring(0, i).trim().toLowerCase(), r = o.substring(i + 1).trim(), !(!n || t[n] && I1[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r); }), t; }, Ch = Symbol("internals"); function Ri(e) { return e && String(e).trim().toLowerCase(); } function Do(e) { return e === !1 || e == null ? e : w.isArray(e) ? e.map(Do) : String(e); } function L1(e) { const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let r; for (; r = n.exec(e); ) t[r[1]] = r[2]; return t; } const F1 = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function Xl(e, t, n, r, i) { if (w.isFunction(r)) return r.call(this, t, n); if (i && (t = n), !!w.isString(t)) { if (w.isString(r)) return t.indexOf(r) !== -1; if (w.isRegExp(r)) return r.test(t); } } function D1(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function $1(e, t) { const n = w.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e, r + n, { value: function(i, s, o) { return this[r].call(this, t, i, s, o); }, configurable: !0 }); }); } class Ge { constructor(t) { t && this.set(t); } set(t, n, r) { const i = this; function s(a, l, u) { const c = Ri(l); if (!c) throw new Error("header name must be a non-empty string"); const d = w.findKey(i, c); (!d || i[d] === void 0 || u === !0 || u === void 0 && i[d] !== !1) && (i[d || l] = Do(a)); } const o = (a, l) => w.forEach(a, (u, c) => s(u, c, l)); if (w.isPlainObject(t) || t instanceof this.constructor) o(t, n); else if (w.isString(t) && (t = t.trim()) && !F1(t)) o(P1(t), n); else if (w.isHeaders(t)) for (const [a, l] of t.entries()) s(l, a, r); else t != null && s(n, t, r); return this; } get(t, n) { if (t = Ri(t), t) { const r = w.findKey(this, t); if (r) { const i = this[r]; if (!n) return i; if (n === !0) return L1(i); if (w.isFunction(n)) return n.call(this, i, r); if (w.isRegExp(n)) return n.exec(i); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = Ri(t), t) { const r = w.findKey(this, t); return !!(r && this[r] !== void 0 && (!n || Xl(this, this[r], r, n))); } return !1; } delete(t, n) { const r = this; let i = !1; function s(o) { if (o = Ri(o), o) { const a = w.findKey(r, o); a && (!n || Xl(r, r[a], a, n)) && (delete r[a], i = !0); } } return w.isArray(t) ? t.forEach(s) : s(t), i; } clear(t) { const n = Object.keys(this); let r = n.length, i = !1; for (; r--; ) { const s = n[r]; (!t || Xl(this, this[s], s, t, !0)) && (delete this[s], i = !0); } return i; } normalize(t) { const n = this, r = {}; return w.forEach(this, (i, s) => { const o = w.findKey(r, s); if (o) { n[o] = Do(i), delete n[s]; return; } const a = t ? D1(s) : String(s).trim(); a !== s && delete n[s], n[a] = Do(i), r[a] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return w.forEach(this, (r, i) => { r != null && r !== !1 && (n[i] = t && w.isArray(r) ? r.join(", ") : r); }), n; } [Symbol.iterator]() { return Object.entries(this.toJSON())[Symbol.iterator](); } toString() { return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(` `); } get [Symbol.toStringTag]() { return "AxiosHeaders"; } static from(t) { return t instanceof this ? t : new this(t); } static concat(t, ...n) { const r = new this(t); return n.forEach((i) => r.set(i)), r; } static accessor(t) { const r = (this[Ch] = this[Ch] = { accessors: {} }).accessors, i = this.prototype; function s(o) { const a = Ri(o); r[a] || ($1(i, o), r[a] = !0); } return w.isArray(t) ? t.forEach(s) : s(t), this; } } Ge.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); w.reduceDescriptors(Ge.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(r) { this[n] = r; } }; }); w.freezeMethods(Ge); function Zl(e, t) { const n = this || qs, r = t || n, i = Ge.from(r.headers); let s = r.data; return w.forEach(e, function(a) { s = a.call(n, s, i.normalize(), t ? t.status : void 0); }), i.normalize(), s; } function ty(e) { return !!(e && e.__CANCEL__); } function Ai(e, t, n) { G.call(this, e ?? "canceled", G.ERR_CANCELED, t, n), this.name = "CanceledError"; } w.inherits(Ai, G, { __CANCEL__: !0 }); function ny(e, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e(n) : t(new G( "Request failed with status code " + n.status, [G.ERR_BAD_REQUEST, G.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function M1(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function U1(e, t) { e = e || 10; const n = new Array(e), r = new Array(e); let i = 0, s = 0, o; return t = t !== void 0 ? t : 1e3, function(l) { const u = Date.now(), c = r[s]; o || (o = u), n[i] = l, r[i] = u; let d = s, f = 0; for (; d !== i; ) f += n[d++], d = d % e; if (i = (i + 1) % e, i === s && (s = (s + 1) % e), u - o < t) return; const v = c && u - c; return v ? Math.round(f * 1e3 / v) : void 0; }; } function V1(e, t) { let n = 0, r = 1e3 / t, i, s; const o = (u, c = Date.now()) => { n = c, i = null, s && (clearTimeout(s), s = null), e.apply(null, u); }; return [(...u) => { const c = Date.now(), d = c - n; d >= r ? o(u, c) : (i = u, s || (s = setTimeout(() => { s = null, o(i); }, r - d))); }, () => i && o(i)]; } const la = (e, t, n = 3) => { let r = 0; const i = U1(50, 250); return V1((s) => { const o = s.loaded, a = s.lengthComputable ? s.total : void 0, l = o - r, u = i(l), c = o <= a; r = o; const d = { loaded: o, total: a, progress: a ? o / a : void 0, bytes: l, rate: u || void 0, estimated: u && a && c ? (a - o) / u : void 0, event: s, lengthComputable: a != null, [t ? "download" : "upload"]: !0 }; e(d); }, n); }, Oh = (e, t) => { const n = e != null; return [(r) => t[0]({ lengthComputable: n, total: e, loaded: r }), t[1]]; }, Th = (e) => (...t) => w.asap(() => e(...t)), j1 = He.hasStandardBrowserEnv ? ( // Standard browser envs have full support of the APIs needed to test // whether the request URL is of the same origin as current location. function() { const t = He.navigator && /(msie|trident)/i.test(He.navigator.userAgent), n = document.createElement("a"); let r; function i(s) { let o = s; return t && (n.setAttribute("href", o), o = n.href), n.setAttribute("href", o), { href: n.href, protocol: n.protocol ? n.protocol.replace(/:$/, "") : "", host: n.host, search: n.search ? n.search.replace(/^\?/, "") : "", hash: n.hash ? n.hash.replace(/^#/, "") : "", hostname: n.hostname, port: n.port, pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname }; } return r = i(window.location.href), function(o) { const a = w.isString(o) ? i(o) : o; return a.protocol === r.protocol && a.host === r.host; }; }() ) : ( // Non standard browser envs (web workers, react-native) lack needed support. /* @__PURE__ */ function() { return function() { return !0; }; }() ), B1 = He.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, r, i, s) { const o = [e + "=" + encodeURIComponent(t)]; w.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), w.isString(r) && o.push("path=" + r), w.isString(i) && o.push("domain=" + i), s === !0 && o.push("secure"), document.cookie = o.join("; "); }, read(e) { const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)")); return t ? decodeURIComponent(t[3]) : null; }, remove(e) { this.write(e, "", Date.now() - 864e5); } } ) : ( // Non-standard browser env (web workers, react-native) lack needed support. { write() { }, read() { return null; }, remove() { } } ); function z1(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function H1(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function ry(e, t) { return e && !z1(t) ? H1(e, t) : t; } const xh = (e) => e instanceof Ge ? { ...e } : e; function pr(e, t) { t = t || {}; const n = {}; function r(u, c, d) { return w.isPlainObject(u) && w.isPlainObject(c) ? w.merge.call({ caseless: d }, u, c) : w.isPlainObject(c) ? w.merge({}, c) : w.isArray(c) ? c.slice() : c; } function i(u, c, d) { if (w.isUndefined(c)) { if (!w.isUndefined(u)) return r(void 0, u, d); } else return r(u, c, d); } function s(u, c) { if (!w.isUndefined(c)) return r(void 0, c); } function o(u, c) { if (w.isUndefined(c)) { if (!w.isUndefined(u)) return r(void 0, u); } else return r(void 0, c); } function a(u, c, d) { if (d in t) return r(u, c); if (d in e) return r(void 0, u); } const l = { url: s, method: s, data: s, baseURL: o, transformRequest: o, transformResponse: o, paramsSerializer: o, timeout: o, timeoutMessage: o, withCredentials: o, withXSRFToken: o, adapter: o, responseType: o, xsrfCookieName: o, xsrfHeaderName: o, onUploadProgress: o, onDownloadProgress: o, decompress: o, maxContentLength: o, maxBodyLength: o, beforeRedirect: o, transport: o, httpAgent: o, httpsAgent: o, cancelToken: o, socketPath: o, responseEncoding: o, validateStatus: a, headers: (u, c) => i(xh(u), xh(c), !0) }; return w.forEach(Object.keys(Object.assign({}, e, t)), function(c) { const d = l[c] || i, f = d(e[c], t[c], c); w.isUndefined(f) && d !== a || (n[c] = f); }), n; } const iy = (e) => { const t = pr({}, e); let { data: n, withXSRFToken: r, xsrfHeaderName: i, xsrfCookieName: s, headers: o, auth: a } = t; t.headers = o = Ge.from(o), t.url = Xv(ry(t.baseURL, t.url), e.params, e.paramsSerializer), a && o.set( "Authorization", "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : "")) ); let l; if (w.isFormData(n)) { if (He.hasStandardBrowserEnv || He.hasStandardBrowserWebWorkerEnv) o.setContentType(void 0); else if ((l = o.getContentType()) !== !1) { const [u, ...c] = l ? l.split(";").map((d) => d.trim()).filter(Boolean) : []; o.setContentType([u || "multipart/form-data", ...c].join("; ")); } } if (He.hasStandardBrowserEnv && (r && w.isFunction(r) && (r = r(t)), r || r !== !1 && j1(t.url))) { const u = i && s && B1.read(s); u && o.set(i, u); } return t; }, G1 = typeof XMLHttpRequest < "u", W1 = G1 && function(e) { return new Promise(function(n, r) { const i = iy(e); let s = i.data; const o = Ge.from(i.headers).normalize(); let { responseType: a, onUploadProgress: l, onDownloadProgress: u } = i, c, d, f, v, g; function m() { v && v(), g && g(), i.cancelToken && i.cancelToken.unsubscribe(c), i.signal && i.signal.removeEventListener("abort", c); } let k = new XMLHttpRequest(); k.open(i.method.toUpperCase(), i.url, !0), k.timeout = i.timeout; function h() { if (!k) return; const y = Ge.from( "getAllResponseHeaders" in k && k.getAllResponseHeaders() ), N = { data: !a || a === "text" || a === "json" ? k.responseText : k.response, status: k.status, statusText: k.statusText, headers: y, config: e, request: k }; ny(function(A) { n(A), m(); }, function(A) { r(A), m(); }, N), k = null; } "onloadend" in k ? k.onloadend = h : k.onreadystatechange = function() { !k || k.readyState !== 4 || k.status === 0 && !(k.responseURL && k.responseURL.indexOf("file:") === 0) || setTimeout(h); }, k.onabort = function() { k && (r(new G("Request aborted", G.ECONNABORTED, e, k)), k = null); }, k.onerror = function() { r(new G("Network Error", G.ERR_NETWORK, e, k)), k = null; }, k.ontimeout = function() { let S = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded"; const N = i.transitional || Zv; i.timeoutErrorMessage && (S = i.timeoutErrorMessage), r(new G( S, N.clarifyTimeoutError ? G.ETIMEDOUT : G.ECONNABORTED, e, k )), k = null; }, s === void 0 && o.setContentType(null), "setRequestHeader" in k && w.forEach(o.toJSON(), function(S, N) { k.setRequestHeader(N, S); }), w.isUndefined(i.withCredentials) || (k.withCredentials = !!i.withCredentials), a && a !== "json" && (k.responseType = i.responseType), u && ([f, g] = la(u, !0), k.addEventListener("progress", f)), l && k.upload && ([d, v] = la(l), k.upload.addEventListener("progress", d), k.upload.addEventListener("loadend", v)), (i.cancelToken || i.signal) && (c = (y) => { k && (r(!y || y.type ? new Ai(null, e, k) : y), k.abort(), k = null); }, i.cancelToken && i.cancelToken.subscribe(c), i.signal && (i.signal.aborted ? c() : i.signal.addEventListener("abort", c))); const p = M1(i.url); if (p && He.protocols.indexOf(p) === -1) { r(new G("Unsupported protocol " + p + ":", G.ERR_BAD_REQUEST, e)); return; } k.send(s || null); }); }, q1 = (e, t) => { const { length: n } = e = e ? e.filter(Boolean) : []; if (t || n) { let r = new AbortController(), i; const s = function(u) { if (!i) { i = !0, a(); const c = u instanceof Error ? u : this.reason; r.abort(c instanceof G ? c : new Ai(c instanceof Error ? c.message : c)); } }; let o = t && setTimeout(() => { o = null, s(new G(`timeout ${t} of ms exceeded`, G.ETIMEDOUT)); }, t); const a = () => { e && (o && clearTimeout(o), o = null, e.forEach((u) => { u.unsubscribe ? u.unsubscribe(s) : u.removeEventListener("abort", s); }), e = null); }; e.forEach((u) => u.addEventListener("abort", s)); const { signal: l } = r; return l.unsubscribe = () => w.asap(a), l; } }, K1 = function* (e, t) { let n = e.byteLength; if (!t || n < t) { yield e; return; } let r = 0, i; for (; r < n; ) i = r + t, yield e.slice(r, i), r = i; }, Q1 = async function* (e, t) { for await (const n of J1(e)) yield* K1(n, t); }, J1 = async function* (e) { if (e[Symbol.asyncIterator]) { yield* e; return; } const t = e.getReader(); try { for (; ; ) { const { done: n, value: r } = await t.read(); if (n) break; yield r; } } finally { await t.cancel(); } }, Rh = (e, t, n, r) => { const i = Q1(e, t); let s = 0, o, a = (l) => { o || (o = !0, r && r(l)); }; return new ReadableStream({ async pull(l) { try { const { done: u, value: c } = await i.next(); if (u) { a(), l.close(); return; } let d = c.byteLength; if (n) { let f = s += d; n(f); } l.enqueue(new Uint8Array(c)); } catch (u) { throw a(u), u; } }, cancel(l) { return a(l), i.return(); } }, { highWaterMark: 2 }); }, fl = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", sy = fl && typeof ReadableStream == "function", Y1 = fl && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), oy = (e, ...t) => { try { return !!e(...t); } catch { return !1; } }, X1 = sy && oy(() => { let e = !1; const t = new Request(He.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e = !0, "half"; } }).headers.has("Content-Type"); return e && !t; }), Ih = 64 * 1024, oc = sy && oy(() => w.isReadableStream(new Response("").body)), ua = { stream: oc && ((e) => e.body) }; fl && ((e) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !ua[t] && (ua[t] = w.isFunction(e[t]) ? (n) => n[t]() : (n, r) => { throw new G(`Response type '${t}' is not supported`, G.ERR_NOT_SUPPORT, r); }); }); })(new Response()); const Z1 = async (e) => { if (e == null) return 0; if (w.isBlob(e)) return e.size; if (w.isSpecCompliantForm(e)) return (await new Request(He.origin, { method: "POST", body: e }).arrayBuffer()).byteLength; if (w.isArrayBufferView(e) || w.isArrayBuffer(e)) return e.byteLength; if (w.isURLSearchParams(e) && (e = e + ""), w.isString(e)) return (await Y1(e)).byteLength; }, eA = async (e, t) => { const n = w.toFiniteNumber(e.getContentLength()); return n ?? Z1(t); }, tA = fl && (async (e) => { let { url: t, method: n, data: r, signal: i, cancelToken: s, timeout: o, onDownloadProgress: a, onUploadProgress: l, responseType: u, headers: c, withCredentials: d = "same-origin", fetchOptions: f } = iy(e); u = u ? (u + "").toLowerCase() : "text"; let v = q1([i, s && s.toAbortSignal()], o), g; const m = v && v.unsubscribe && (() => { v.unsubscribe(); }); let k; try { if (l && X1 && n !== "get" && n !== "head" && (k = await eA(c, r)) !== 0) { let N = new Request(t, { method: "POST", body: r, duplex: "half" }), E; if (w.isFormData(r) && (E = N.headers.get("content-type")) && c.setContentType(E), N.body) { const [A, b] = Oh( k, la(Th(l)) ); r = Rh(N.body, Ih, A, b); } } w.isString(d) || (d = d ? "include" : "omit"); const h = "credentials" in Request.prototype; g = new Request(t, { ...f, signal: v, method: n.toUpperCase(), headers: c.normalize().toJSON(), body: r, duplex: "half", credentials: h ? d : void 0 }); let p = await fetch(g); const y = oc && (u === "stream" || u === "response"); if (oc && (a || y && m)) { const N = {}; ["status", "statusText", "headers"].forEach((I) => { N[I] = p[I]; }); const E = w.toFiniteNumber(p.headers.get("content-length")), [A, b] = a && Oh( E, la(Th(a), !0) ) || []; p = new Response( Rh(p.body, Ih, A, () => { b && b(), m && m(); }), N ); } u = u || "text"; let S = await ua[w.findKey(ua, u) || "text"](p, e); return !y && m && m(), await new Promise((N, E) => { ny(N, E, { data: S, headers: Ge.from(p.headers), status: p.status, statusText: p.statusText, config: e, request: g }); }); } catch (h) { throw m && m(), h && h.name === "TypeError" && /fetch/i.test(h.message) ? Object.assign( new G("Network Error", G.ERR_NETWORK, e, g), { cause: h.cause || h } ) : G.from(h, h && h.code, e, g); } }), ac = { http: g1, xhr: W1, fetch: tA }; w.forEach(ac, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch { } Object.defineProperty(e, "adapterName", { value: t }); } }); const Ph = (e) => `- ${e}`, nA = (e) => w.isFunction(e) || e === null || e === !1, ay = { getAdapter: (e) => { e = w.isArray(e) ? e : [e]; const { length: t } = e; let n, r; const i = {}; for (let s = 0; s < t; s++) { n = e[s]; let o; if (r = n, !nA(n) && (r = ac[(o = String(n)).toLowerCase()], r === void 0)) throw new G(`Unknown adapter '${o}'`); if (r) break; i[o || "#" + s] = r; } if (!r) { const s = Object.entries(i).map( ([a, l]) => `adapter ${a} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build") ); let o = t ? s.length > 1 ? `since : ` + s.map(Ph).join(` `) : " " + Ph(s[0]) : "as no adapter specified"; throw new G( "There is no suitable adapter to dispatch the request " + o, "ERR_NOT_SUPPORT" ); } return r; }, adapters: ac }; function eu(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Ai(null, e); } function Lh(e) { return eu(e), e.headers = Ge.from(e.headers), e.data = Zl.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), ay.getAdapter(e.adapter || qs.adapter)(e).then(function(r) { return eu(e), r.data = Zl.call( e, e.transformResponse, r ), r.headers = Ge.from(r.headers), r; }, function(r) { return ty(r) || (eu(e), r && r.response && (r.response.data = Zl.call( e, e.transformResponse, r.response ), r.response.headers = Ge.from(r.response.headers))), Promise.reject(r); }); } const ly = "1.7.7", jd = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { jd[e] = function(r) { return typeof r === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const Fh = {}; jd.transitional = function(t, n, r) { function i(s, o) { return "[Axios v" + ly + "] Transitional option '" + s + "'" + o + (r ? ". " + r : ""); } return (s, o, a) => { if (t === !1) throw new G( i(o, " has been removed" + (n ? " in " + n : "")), G.ERR_DEPRECATED ); return n && !Fh[o] && (Fh[o] = !0, console.warn( i( o, " has been deprecated since v" + n + " and will be removed in the near future" ) )), t ? t(s, o, a) : !0; }; }; function rA(e, t, n) { if (typeof e != "object") throw new G("options must be an object", G.ERR_BAD_OPTION_VALUE); const r = Object.keys(e); let i = r.length; for (; i-- > 0; ) { const s = r[i], o = t[s]; if (o) { const a = e[s], l = a === void 0 || o(a, s, e); if (l !== !0) throw new G("option " + s + " must be " + l, G.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new G("Unknown option " + s, G.ERR_BAD_OPTION); } } const lc = { assertOptions: rA, validators: jd }, pn = lc.validators; class ur { constructor(t) { this.defaults = t, this.interceptors = { request: new bh(), response: new bh() }; } /** * Dispatch a request * * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) * @param {?Object} config * * @returns {Promise} The Promise to be fulfilled */ async request(t, n) { try { return await this._request(t, n); } catch (r) { if (r instanceof Error) { let i; Error.captureStackTrace ? Error.captureStackTrace(i = {}) : i = new Error(); const s = i.stack ? i.stack.replace(/^.+\n/, "") : ""; try { r.stack ? s && !String(r.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (r.stack += ` ` + s) : r.stack = s; } catch { } } throw r; } } _request(t, n) { typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = pr(this.defaults, n); const { transitional: r, paramsSerializer: i, headers: s } = n; r !== void 0 && lc.assertOptions(r, { silentJSONParsing: pn.transitional(pn.boolean), forcedJSONParsing: pn.transitional(pn.boolean), clarifyTimeoutError: pn.transitional(pn.boolean) }, !1), i != null && (w.isFunction(i) ? n.paramsSerializer = { serialize: i } : lc.assertOptions(i, { encode: pn.function, serialize: pn.function }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let o = s && w.merge( s.common, s[n.method] ); s && w.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (g) => { delete s[g]; } ), n.headers = Ge.concat(o, s); const a = []; let l = !0; this.interceptors.request.forEach(function(m) { typeof m.runWhen == "function" && m.runWhen(n) === !1 || (l = l && m.synchronous, a.unshift(m.fulfilled, m.rejected)); }); const u = []; this.interceptors.response.forEach(function(m) { u.push(m.fulfilled, m.rejected); }); let c, d = 0, f; if (!l) { const g = [Lh.bind(this), void 0]; for (g.unshift.apply(g, a), g.push.apply(g, u), f = g.length, c = Promise.resolve(n); d < f; ) c = c.then(g[d++], g[d++]); return c; } f = a.length; let v = n; for (d = 0; d < f; ) { const g = a[d++], m = a[d++]; try { v = g(v); } catch (k) { m.call(this, k); break; } } try { c = Lh.call(this, v); } catch (g) { return Promise.reject(g); } for (d = 0, f = u.length; d < f; ) c = c.then(u[d++], u[d++]); return c; } getUri(t) { t = pr(this.defaults, t); const n = ry(t.baseURL, t.url); return Xv(n, t.params, t.paramsSerializer); } } w.forEach(["delete", "get", "head", "options"], function(t) { ur.prototype[t] = function(n, r) { return this.request(pr(r || {}, { method: t, url: n, data: (r || {}).data })); }; }); w.forEach(["post", "put", "patch"], function(t) { function n(r) { return function(s, o, a) { return this.request(pr(a || {}, { method: t, headers: r ? { "Content-Type": "multipart/form-data" } : {}, url: s, data: o })); }; } ur.prototype[t] = n(), ur.prototype[t + "Form"] = n(!0); }); class Bd { constructor(t) { if (typeof t != "function") throw new TypeError("executor must be a function."); let n; this.promise = new Promise(function(s) { n = s; }); const r = this; this.promise.then((i) => { if (!r._listeners) return; let s = r._listeners.length; for (; s-- > 0; ) r._listeners[s](i); r._listeners = null; }), this.promise.then = (i) => { let s; const o = new Promise((a) => { r.subscribe(a), s = a; }).then(i); return o.cancel = function() { r.unsubscribe(s); }, o; }, t(function(s, o, a) { r.reason || (r.reason = new Ai(s, o, a), n(r.reason)); }); } /** * Throws a `CanceledError` if cancellation has been requested. */ throwIfRequested() { if (this.reason) throw this.reason; } /** * Subscribe to the cancel signal */ subscribe(t) { if (this.reason) { t(this.reason); return; } this._listeners ? this._listeners.push(t) : this._listeners = [t]; } /** * Unsubscribe from the cancel signal */ unsubscribe(t) { if (!this._listeners) return; const n = this._listeners.indexOf(t); n !== -1 && this._listeners.splice(n, 1); } toAbortSignal() { const t = new AbortController(), n = (r) => { t.abort(r); }; return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal; } /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ static source() { let t; return { token: new Bd(function(i) { t = i; }), cancel: t }; } } function iA(e) { return function(n) { return e.apply(null, n); }; } function sA(e) { return w.isObject(e) && e.isAxiosError === !0; } const uc = { Continue: 100, SwitchingProtocols: 101, Processing: 102, EarlyHints: 103, Ok: 200, Created: 201, Accepted: 202, NonAuthoritativeInformation: 203, NoContent: 204, ResetContent: 205, PartialContent: 206, MultiStatus: 207, AlreadyReported: 208, ImUsed: 226, MultipleChoices: 300, MovedPermanently: 301, Found: 302, SeeOther: 303, NotModified: 304, UseProxy: 305, Unused: 306, TemporaryRedirect: 307, PermanentRedirect: 308, BadRequest: 400, Unauthorized: 401, PaymentRequired: 402, Forbidden: 403, NotFound: 404, MethodNotAllowed: 405, NotAcceptable: 406, ProxyAuthenticationRequired: 407, RequestTimeout: 408, Conflict: 409, Gone: 410, LengthRequired: 411, PreconditionFailed: 412, PayloadTooLarge: 413, UriTooLong: 414, UnsupportedMediaType: 415, RangeNotSatisfiable: 416, ExpectationFailed: 417, ImATeapot: 418, MisdirectedRequest: 421, UnprocessableEntity: 422, Locked: 423, FailedDependency: 424, TooEarly: 425, UpgradeRequired: 426, PreconditionRequired: 428, TooManyRequests: 429, RequestHeaderFieldsTooLarge: 431, UnavailableForLegalReasons: 451, InternalServerError: 500, NotImplemented: 501, BadGateway: 502, ServiceUnavailable: 503, GatewayTimeout: 504, HttpVersionNotSupported: 505, VariantAlsoNegotiates: 506, InsufficientStorage: 507, LoopDetected: 508, NotExtended: 510, NetworkAuthenticationRequired: 511 }; Object.entries(uc).forEach(([e, t]) => { uc[t] = e; }); function uy(e) { const t = new ur(e), n = Vv(ur.prototype.request, t); return w.extend(n, ur.prototype, t, { allOwnKeys: !0 }), w.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(i) { return uy(pr(e, i)); }, n; } const le = uy(qs); le.Axios = ur; le.CanceledError = Ai; le.CancelToken = Bd; le.isCancel = ty; le.VERSION = ly; le.toFormData = dl; le.AxiosError = G; le.Cancel = le.CanceledError; le.all = function(t) { return Promise.all(t); }; le.spread = iA; le.isAxiosError = sA; le.mergeConfig = pr; le.AxiosHeaders = Ge; le.formToJSON = (e) => ey(w.isHTMLForm(e) ? new FormData(e) : e); le.getAdapter = ay.getAdapter; le.HttpStatusCode = uc; le.default = le; const oA = { type: "logger", log(e) { this.output("log", e); }, warn(e) { this.output("warn", e); }, error(e) { this.output("error", e); }, output(e, t) { console && console[e] && console[e].apply(console, t); } }; class ca { constructor(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; this.init(t, n); } init(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; this.prefix = n.prefix || "i18next:", this.logger = t || oA, this.options = n, this.debug = n.debug; } log() { for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; return this.forward(n, "log", "", !0); } warn() { for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; return this.forward(n, "warn", "", !0); } error() { for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; return this.forward(n, "error", ""); } deprecate() { for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; return this.forward(n, "warn", "WARNING DEPRECATED: ", !0); } forward(t, n, r, i) { return i && !this.debug ? null : (typeof t[0] == "string" && (t[0] = `${r}${this.prefix} ${t[0]}`), this.logger[n](t)); } create(t) { return new ca(this.logger, { prefix: `${this.prefix}:${t}:`, ...this.options }); } clone(t) { return t = t || this.options, t.prefix = t.prefix || this.prefix, new ca(this.logger, t); } } var zt = new ca(); class hl { constructor() { this.observers = {}; } on(t, n) { return t.split(" ").forEach((r) => { this.observers[r] || (this.observers[r] = /* @__PURE__ */ new Map()); const i = this.observers[r].get(n) || 0; this.observers[r].set(n, i + 1); }), this; } off(t, n) { if (this.observers[t]) { if (!n) { delete this.observers[t]; return; } this.observers[t].delete(n); } } emit(t) { for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1; i < n; i++) r[i - 1] = arguments[i]; this.observers[t] && Array.from(this.observers[t].entries()).forEach((o) => { let [a, l] = o; for (let u = 0; u < l; u++) a(...r); }), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach((o) => { let [a, l] = o; for (let u = 0; u < l; u++) a.apply(a, [t, ...r]); }); } } const Ii = () => { let e, t; const n = new Promise((r, i) => { e = r, t = i; }); return n.resolve = e, n.reject = t, n; }, Dh = (e) => e == null ? "" : "" + e, aA = (e, t, n) => { e.forEach((r) => { t[r] && (n[r] = t[r]); }); }, lA = /###/g, $h = (e) => e && e.indexOf("###") > -1 ? e.replace(lA, ".") : e, Mh = (e) => !e || typeof e == "string", Yi = (e, t, n) => { const r = typeof t != "string" ? t : t.split("."); let i = 0; for (; i < r.length - 1; ) { if (Mh(e)) return {}; const s = $h(r[i]); !e[s] && n && (e[s] = new n()), Object.prototype.hasOwnProperty.call(e, s) ? e = e[s] : e = {}, ++i; } return Mh(e) ? {} : { obj: e, k: $h(r[i]) }; }, Uh = (e, t, n) => { const { obj: r, k: i } = Yi(e, t, Object); if (r !== void 0 || t.length === 1) { r[i] = n; return; } let s = t[t.length - 1], o = t.slice(0, t.length - 1), a = Yi(e, o, Object); for (; a.obj === void 0 && o.length; ) s = `${o[o.length - 1]}.${s}`, o = o.slice(0, o.length - 1), a = Yi(e, o, Object), a && a.obj && typeof a.obj[`${a.k}.${s}`] < "u" && (a.obj = void 0); a.obj[`${a.k}.${s}`] = n; }, uA = (e, t, n, r) => { const { obj: i, k: s } = Yi(e, t, Object); i[s] = i[s] || [], i[s].push(n); }, da = (e, t) => { const { obj: n, k: r } = Yi(e, t); if (n) return n[r]; }, cA = (e, t, n) => { const r = da(e, n); return r !== void 0 ? r : da(t, n); }, cy = (e, t, n) => { for (const r in t) r !== "__proto__" && r !== "constructor" && (r in e ? typeof e[r] == "string" || e[r] instanceof String || typeof t[r] == "string" || t[r] instanceof String ? n && (e[r] = t[r]) : cy(e[r], t[r], n) : e[r] = t[r]); return e; }, Rr = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); var dA = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }; const fA = (e) => typeof e == "string" ? e.replace(/[&<>"'\/]/g, (t) => dA[t]) : e; class hA { constructor(t) { this.capacity = t, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = []; } getRegExp(t) { const n = this.regExpMap.get(t); if (n !== void 0) return n; const r = new RegExp(t); return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(t, r), this.regExpQueue.push(t), r; } } const pA = [" ", ",", "?", "!", ";"], mA = new hA(20), gA = (e, t, n) => { t = t || "", n = n || ""; const r = pA.filter((o) => t.indexOf(o) < 0 && n.indexOf(o) < 0); if (r.length === 0) return !0; const i = mA.getRegExp(`(${r.map((o) => o === "?" ? "\\?" : o).join("|")})`); let s = !i.test(e); if (!s) { const o = e.indexOf(n); o > 0 && !i.test(e.substring(0, o)) && (s = !0); } return s; }, cc = function(e, t) { let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "."; if (!e) return; if (e[t]) return e[t]; const r = t.split(n); let i = e; for (let s = 0; s < r.length; ) { if (!i || typeof i != "object") return; let o, a = ""; for (let l = s; l < r.length; ++l) if (l !== s && (a += n), a += r[l], o = i[a], o !== void 0) { if (["string", "number", "boolean"].indexOf(typeof o) > -1 && l < r.length - 1) continue; s += l - s + 1; break; } i = o; } return i; }, fa = (e) => e && e.indexOf("_") > 0 ? e.replace("_", "-") : e; class Vh extends hl { constructor(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { ns: ["translation"], defaultNS: "translation" }; super(), this.data = t || {}, this.options = n, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0); } addNamespaces(t) { this.options.ns.indexOf(t) < 0 && this.options.ns.push(t); } removeNamespaces(t) { const n = this.options.ns.indexOf(t); n > -1 && this.options.ns.splice(n, 1); } getResource(t, n, r) { let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; const s = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, o = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure; let a; t.indexOf(".") > -1 ? a = t.split(".") : (a = [t, n], r && (Array.isArray(r) ? a.push(...r) : typeof r == "string" && s ? a.push(...r.split(s)) : a.push(r))); const l = da(this.data, a); return !l && !n && !r && t.indexOf(".") > -1 && (t = a[0], n = a[1], r = a.slice(2).join(".")), l || !o || typeof r != "string" ? l : cc(this.data && this.data[t] && this.data[t][n], r, s); } addResource(t, n, r, i) { let s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : { silent: !1 }; const o = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator; let a = [t, n]; r && (a = a.concat(o ? r.split(o) : r)), t.indexOf(".") > -1 && (a = t.split("."), i = n, n = a[1]), this.addNamespaces(n), Uh(this.data, a, i), s.silent || this.emit("added", t, n, r, i); } addResources(t, n, r) { let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : { silent: !1 }; for (const s in r) (typeof r[s] == "string" || Array.isArray(r[s])) && this.addResource(t, n, s, r[s], { silent: !0 }); i.silent || this.emit("added", t, n, r); } addResourceBundle(t, n, r, i, s) { let o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : { silent: !1, skipCopy: !1 }, a = [t, n]; t.indexOf(".") > -1 && (a = t.split("."), i = r, r = n, n = a[1]), this.addNamespaces(n); let l = da(this.data, a) || {}; o.skipCopy || (r = JSON.parse(JSON.stringify(r))), i ? cy(l, r, s) : l = { ...l, ...r }, Uh(this.data, a, l), o.silent || this.emit("added", t, n, r); } removeResourceBundle(t, n) { this.hasResourceBundle(t, n) && delete this.data[t][n], this.removeNamespaces(n), this.emit("removed", t, n); } hasResourceBundle(t, n) { return this.getResource(t, n) !== void 0; } getResourceBundle(t, n) { return n || (n = this.options.defaultNS), this.options.compatibilityAPI === "v1" ? { ...this.getResource(t, n) } : this.getResource(t, n); } getDataByLanguage(t) { return this.data[t]; } hasLanguageSomeTranslations(t) { const n = this.getDataByLanguage(t); return !!(n && Object.keys(n) || []).find((i) => n[i] && Object.keys(n[i]).length > 0); } toJSON() { return this.data; } } var dy = { processors: {}, addPostProcessor(e) { this.processors[e.name] = e; }, handle(e, t, n, r, i) { return e.forEach((s) => { this.processors[s] && (t = this.processors[s].process(t, n, r, i)); }), t; } }; const jh = {}; class ha extends hl { constructor(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; super(), aA(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], t, this), this.options = n, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = zt.create("translator"); } changeLanguage(t) { t && (this.language = t); } exists(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { interpolation: {} }; if (t == null) return !1; const r = this.resolve(t, n); return r && r.res !== void 0; } extractFromKey(t, n) { let r = n.nsSeparator !== void 0 ? n.nsSeparator : this.options.nsSeparator; r === void 0 && (r = ":"); const i = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator; let s = n.ns || this.options.defaultNS || []; const o = r && t.indexOf(r) > -1, a = !this.options.userDefinedKeySeparator && !n.keySeparator && !this.options.userDefinedNsSeparator && !n.nsSeparator && !gA(t, r, i); if (o && !a) { const l = t.match(this.interpolator.nestingRegexp); if (l && l.length > 0) return { key: t, namespaces: s }; const u = t.split(r); (r !== i || r === i && this.options.ns.indexOf(u[0]) > -1) && (s = u.shift()), t = u.join(i); } return typeof s == "string" && (s = [s]), { key: t, namespaces: s }; } translate(t, n, r) { if (typeof n != "object" && this.options.overloadTranslationOptionHandler && (n = this.options.overloadTranslationOptionHandler(arguments)), typeof n == "object" && (n = { ...n }), n || (n = {}), t == null) return ""; Array.isArray(t) || (t = [String(t)]); const i = n.returnDetails !== void 0 ? n.returnDetails : this.options.returnDetails, s = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator, { key: o, namespaces: a } = this.extractFromKey(t[t.length - 1], n), l = a[a.length - 1], u = n.lng || this.language, c = n.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode; if (u && u.toLowerCase() === "cimode") { if (c) { const S = n.nsSeparator || this.options.nsSeparator; return i ? { res: `${l}${S}${o}`, usedKey: o, exactUsedKey: o, usedLng: u, usedNS: l, usedParams: this.getUsedParamsDetails(n) } : `${l}${S}${o}`; } return i ? { res: o, usedKey: o, exactUsedKey: o, usedLng: u, usedNS: l, usedParams: this.getUsedParamsDetails(n) } : o; } const d = this.resolve(t, n); let f = d && d.res; const v = d && d.usedKey || o, g = d && d.exactUsedKey || o, m = Object.prototype.toString.apply(f), k = ["[object Number]", "[object Function]", "[object RegExp]"], h = n.joinArrays !== void 0 ? n.joinArrays : this.options.joinArrays, p = !this.i18nFormat || this.i18nFormat.handleAsObject; if (p && f && (typeof f != "string" && typeof f != "boolean" && typeof f != "number") && k.indexOf(m) < 0 && !(typeof h == "string" && Array.isArray(f))) { if (!n.returnObjects && !this.options.returnObjects) { this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!"); const S = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(v, f, { ...n, ns: a }) : `key '${o} (${this.language})' returned an object instead of string.`; return i ? (d.res = S, d.usedParams = this.getUsedParamsDetails(n), d) : S; } if (s) { const S = Array.isArray(f), N = S ? [] : {}, E = S ? g : v; for (const A in f) if (Object.prototype.hasOwnProperty.call(f, A)) { const b = `${E}${s}${A}`; N[A] = this.translate(b, { ...n, joinArrays: !1, ns: a }), N[A] === b && (N[A] = f[A]); } f = N; } } else if (p && typeof h == "string" && Array.isArray(f)) f = f.join(h), f && (f = this.extendTranslation(f, t, n, r)); else { let S = !1, N = !1; const E = n.count !== void 0 && typeof n.count != "string", A = ha.hasDefaultValue(n), b = E ? this.pluralResolver.getSuffix(u, n.count, n) : "", I = n.ordinal && E ? this.pluralResolver.getSuffix(u, n.count, { ordinal: !1 }) : "", F = E && !n.ordinal && n.count === 0 && this.pluralResolver.shouldUseIntlApi(), P = F && n[`defaultValue${this.options.pluralSeparator}zero`] || n[`defaultValue${b}`] || n[`defaultValue${I}`] || n.defaultValue; !this.isValidLookup(f) && A && (S = !0, f = P), this.isValidLookup(f) || (N = !0, f = o); const me = (n.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && N ? void 0 : f, _ = A && P !== f && this.options.updateMissing; if (N || S || _) { if (this.logger.log(_ ? "updateKey" : "missingKey", u, l, o, _ ? P : f), s) { const T = this.resolve(o, { ...n, keySeparator: !1 }); T && T.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format."); } let R = []; const V = this.languageUtils.getFallbackCodes(this.options.fallbackLng, n.lng || this.language); if (this.options.saveMissingTo === "fallback" && V && V[0]) for (let T = 0; T < V.length; T++) R.push(V[T]); else this.options.saveMissingTo === "all" ? R = this.languageUtils.toResolveHierarchy(n.lng || this.language) : R.push(n.lng || this.language); const oe = (T, L, j) => { const X = A && j !== f ? j : me; this.options.missingKeyHandler ? this.options.missingKeyHandler(T, l, L, X, _, n) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(T, l, L, X, _, n), this.emit("missingKey", T, l, L, f); }; this.options.saveMissing && (this.options.saveMissingPlurals && E ? R.forEach((T) => { const L = this.pluralResolver.getSuffixes(T, n); F && n[`defaultValue${this.options.pluralSeparator}zero`] && L.indexOf(`${this.options.pluralSeparator}zero`) < 0 && L.push(`${this.options.pluralSeparator}zero`), L.forEach((j) => { oe([T], o + j, n[`defaultValue${j}`] || P); }); }) : oe(R, o, P)); } f = this.extendTranslation(f, t, n, d, r), N && f === o && this.options.appendNamespaceToMissingKey && (f = `${l}:${o}`), (N || S) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? f = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}:${o}` : o, S ? f : void 0) : f = this.options.parseMissingKeyHandler(f)); } return i ? (d.res = f, d.usedParams = this.getUsedParamsDetails(n), d) : f; } extendTranslation(t, n, r, i, s) { var o = this; if (this.i18nFormat && this.i18nFormat.parse) t = this.i18nFormat.parse(t, { ...this.options.interpolation.defaultVariables, ...r }, r.lng || this.language || i.usedLng, i.usedNS, i.usedKey, { resolved: i }); else if (!r.skipInterpolation) { r.interpolation && this.interpolator.init({ ...r, interpolation: { ...this.options.interpolation, ...r.interpolation } }); const u = typeof t == "string" && (r && r.interpolation && r.interpolation.skipOnVariables !== void 0 ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables); let c; if (u) { const f = t.match(this.interpolator.nestingRegexp); c = f && f.length; } let d = r.replace && typeof r.replace != "string" ? r.replace : r; if (this.options.interpolation.defaultVariables && (d = { ...this.options.interpolation.defaultVariables, ...d }), t = this.interpolator.interpolate(t, d, r.lng || this.language || i.usedLng, r), u) { const f = t.match(this.interpolator.nestingRegexp), v = f && f.length; c < v && (r.nest = !1); } !r.lng && this.options.compatibilityAPI !== "v1" && i && i.res && (r.lng = this.language || i.usedLng), r.nest !== !1 && (t = this.interpolator.nest(t, function() { for (var f = arguments.length, v = new Array(f), g = 0; g < f; g++) v[g] = arguments[g]; return s && s[0] === v[0] && !r.context ? (o.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`), null) : o.translate(...v, n); }, r)), r.interpolation && this.interpolator.reset(); } const a = r.postProcess || this.options.postProcess, l = typeof a == "string" ? [a] : a; return t != null && l && l.length && r.applyPostProcessor !== !1 && (t = dy.handle(l, t, n, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...i, usedParams: this.getUsedParamsDetails(r) }, ...r } : r, this)), t; } resolve(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r, i, s, o, a; return typeof t == "string" && (t = [t]), t.forEach((l) => { if (this.isValidLookup(r)) return; const u = this.extractFromKey(l, n), c = u.key; i = c; let d = u.namespaces; this.options.fallbackNS && (d = d.concat(this.options.fallbackNS)); const f = n.count !== void 0 && typeof n.count != "string", v = f && !n.ordinal && n.count === 0 && this.pluralResolver.shouldUseIntlApi(), g = n.context !== void 0 && (typeof n.context == "string" || typeof n.context == "number") && n.context !== "", m = n.lngs ? n.lngs : this.languageUtils.toResolveHierarchy(n.lng || this.language, n.fallbackLng); d.forEach((k) => { this.isValidLookup(r) || (a = k, !jh[`${m[0]}-${k}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(a) && (jh[`${m[0]}-${k}`] = !0, this.logger.warn(`key "${i}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), m.forEach((h) => { if (this.isValidLookup(r)) return; o = h; const p = [c]; if (this.i18nFormat && this.i18nFormat.addLookupKeys) this.i18nFormat.addLookupKeys(p, c, h, k, n); else { let S; f && (S = this.pluralResolver.getSuffix(h, n.count, n)); const N = `${this.options.pluralSeparator}zero`, E = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`; if (f && (p.push(c + S), n.ordinal && S.indexOf(E) === 0 && p.push(c + S.replace(E, this.options.pluralSeparator)), v && p.push(c + N)), g) { const A = `${c}${this.options.contextSeparator}${n.context}`; p.push(A), f && (p.push(A + S), n.ordinal && S.indexOf(E) === 0 && p.push(A + S.replace(E, this.options.pluralSeparator)), v && p.push(A + N)); } } let y; for (; y = p.pop(); ) this.isValidLookup(r) || (s = y, r = this.getResource(h, k, y, n)); })); }); }), { res: r, usedKey: i, exactUsedKey: s, usedLng: o, usedNS: a }; } isValidLookup(t) { return t !== void 0 && !(!this.options.returnNull && t === null) && !(!this.options.returnEmptyString && t === ""); } getResource(t, n, r) { let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(t, n, r, i) : this.resourceStore.getResource(t, n, r, i); } getUsedParamsDetails() { let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; const n = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], r = t.replace && typeof t.replace != "string"; let i = r ? t.replace : t; if (r && typeof t.count < "u" && (i.count = t.count), this.options.interpolation.defaultVariables && (i = { ...this.options.interpolation.defaultVariables, ...i }), !r) { i = { ...i }; for (const s of n) delete i[s]; } return i; } static hasDefaultValue(t) { const n = "defaultValue"; for (const r in t) if (Object.prototype.hasOwnProperty.call(t, r) && n === r.substring(0, n.length) && t[r] !== void 0) return !0; return !1; } } const tu = (e) => e.charAt(0).toUpperCase() + e.slice(1); class Bh { constructor(t) { this.options = t, this.supportedLngs = this.options.supportedLngs || !1, this.logger = zt.create("languageUtils"); } getScriptPartFromCode(t) { if (t = fa(t), !t || t.indexOf("-") < 0) return null; const n = t.split("-"); return n.length === 2 || (n.pop(), n[n.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(n.join("-")); } getLanguagePartFromCode(t) { if (t = fa(t), !t || t.indexOf("-") < 0) return t; const n = t.split("-"); return this.formatLanguageCode(n[0]); } formatLanguageCode(t) { if (typeof t == "string" && t.indexOf("-") > -1) { const n = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"]; let r = t.split("-"); return this.options.lowerCaseLng ? r = r.map((i) => i.toLowerCase()) : r.length === 2 ? (r[0] = r[0].toLowerCase(), r[1] = r[1].toUpperCase(), n.indexOf(r[1].toLowerCase()) > -1 && (r[1] = tu(r[1].toLowerCase()))) : r.length === 3 && (r[0] = r[0].toLowerCase(), r[1].length === 2 && (r[1] = r[1].toUpperCase()), r[0] !== "sgn" && r[2].length === 2 && (r[2] = r[2].toUpperCase()), n.indexOf(r[1].toLowerCase()) > -1 && (r[1] = tu(r[1].toLowerCase())), n.indexOf(r[2].toLowerCase()) > -1 && (r[2] = tu(r[2].toLowerCase()))), r.join("-"); } return this.options.cleanCode || this.options.lowerCaseLng ? t.toLowerCase() : t; } isSupportedCode(t) { return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (t = this.getLanguagePartFromCode(t)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(t) > -1; } getBestMatchFromCodes(t) { if (!t) return null; let n; return t.forEach((r) => { if (n) return; const i = this.formatLanguageCode(r); (!this.options.supportedLngs || this.isSupportedCode(i)) && (n = i); }), !n && this.options.supportedLngs && t.forEach((r) => { if (n) return; const i = this.getLanguagePartFromCode(r); if (this.isSupportedCode(i)) return n = i; n = this.options.supportedLngs.find((s) => { if (s === i) return s; if (!(s.indexOf("-") < 0 && i.indexOf("-") < 0) && (s.indexOf("-") > 0 && i.indexOf("-") < 0 && s.substring(0, s.indexOf("-")) === i || s.indexOf(i) === 0 && i.length > 1)) return s; }); }), n || (n = this.getFallbackCodes(this.options.fallbackLng)[0]), n; } getFallbackCodes(t, n) { if (!t) return []; if (typeof t == "function" && (t = t(n)), typeof t == "string" && (t = [t]), Array.isArray(t)) return t; if (!n) return t.default || []; let r = t[n]; return r || (r = t[this.getScriptPartFromCode(n)]), r || (r = t[this.formatLanguageCode(n)]), r || (r = t[this.getLanguagePartFromCode(n)]), r || (r = t.default), r || []; } toResolveHierarchy(t, n) { const r = this.getFallbackCodes(n || this.options.fallbackLng || [], t), i = [], s = (o) => { o && (this.isSupportedCode(o) ? i.push(o) : this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`)); }; return typeof t == "string" && (t.indexOf("-") > -1 || t.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && s(this.formatLanguageCode(t)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && s(this.getScriptPartFromCode(t)), this.options.load !== "currentOnly" && s(this.getLanguagePartFromCode(t))) : typeof t == "string" && s(this.formatLanguageCode(t)), r.forEach((o) => { i.indexOf(o) < 0 && s(this.formatLanguageCode(o)); }), i; } } let vA = [{ lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"], nr: [1, 2], fc: 1 }, { lngs: ["af", "an", "ast", "az", "bg", "bn", "ca", "da", "de", "dev", "el", "en", "eo", "es", "et", "eu", "fi", "fo", "fur", "fy", "gl", "gu", "ha", "hi", "hu", "hy", "ia", "it", "kk", "kn", "ku", "lb", "mai", "ml", "mn", "mr", "nah", "nap", "nb", "ne", "nl", "nn", "no", "nso", "pa", "pap", "pms", "ps", "pt-PT", "rm", "sco", "se", "si", "so", "son", "sq", "sv", "sw", "ta", "te", "tk", "ur", "yo"], nr: [1, 2], fc: 2 }, { lngs: ["ay", "bo", "cgg", "fa", "ht", "id", "ja", "jbo", "ka", "km", "ko", "ky", "lo", "ms", "sah", "su", "th", "tt", "ug", "vi", "wo", "zh"], nr: [1], fc: 3 }, { lngs: ["be", "bs", "cnr", "dz", "hr", "ru", "sr", "uk"], nr: [1, 2, 5], fc: 4 }, { lngs: ["ar"], nr: [0, 1, 2, 3, 11, 100], fc: 5 }, { lngs: ["cs", "sk"], nr: [1, 2, 5], fc: 6 }, { lngs: ["csb", "pl"], nr: [1, 2, 5], fc: 7 }, { lngs: ["cy"], nr: [1, 2, 3, 8], fc: 8 }, { lngs: ["fr"], nr: [1, 2], fc: 9 }, { lngs: ["ga"], nr: [1, 2, 3, 7, 11], fc: 10 }, { lngs: ["gd"], nr: [1, 2, 3, 20], fc: 11 }, { lngs: ["is"], nr: [1, 2], fc: 12 }, { lngs: ["jv"], nr: [0, 1], fc: 13 }, { lngs: ["kw"], nr: [1, 2, 3, 4], fc: 14 }, { lngs: ["lt"], nr: [1, 2, 10], fc: 15 }, { lngs: ["lv"], nr: [1, 2, 0], fc: 16 }, { lngs: ["mk"], nr: [1, 2], fc: 17 }, { lngs: ["mnk"], nr: [0, 1, 2], fc: 18 }, { lngs: ["mt"], nr: [1, 2, 11, 20], fc: 19 }, { lngs: ["or"], nr: [2, 1], fc: 2 }, { lngs: ["ro"], nr: [1, 2, 20], fc: 20 }, { lngs: ["sl"], nr: [5, 1, 2, 3], fc: 21 }, { lngs: ["he", "iw"], nr: [1, 2, 20, 21], fc: 22 }], yA = { 1: (e) => +(e > 1), 2: (e) => +(e != 1), 3: (e) => 0, 4: (e) => e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2, 5: (e) => e == 0 ? 0 : e == 1 ? 1 : e == 2 ? 2 : e % 100 >= 3 && e % 100 <= 10 ? 3 : e % 100 >= 11 ? 4 : 5, 6: (e) => e == 1 ? 0 : e >= 2 && e <= 4 ? 1 : 2, 7: (e) => e == 1 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2, 8: (e) => e == 1 ? 0 : e == 2 ? 1 : e != 8 && e != 11 ? 2 : 3, 9: (e) => +(e >= 2), 10: (e) => e == 1 ? 0 : e == 2 ? 1 : e < 7 ? 2 : e < 11 ? 3 : 4, 11: (e) => e == 1 || e == 11 ? 0 : e == 2 || e == 12 ? 1 : e > 2 && e < 20 ? 2 : 3, 12: (e) => +(e % 10 != 1 || e % 100 == 11), 13: (e) => +(e !== 0), 14: (e) => e == 1 ? 0 : e == 2 ? 1 : e == 3 ? 2 : 3, 15: (e) => e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2, 16: (e) => e % 10 == 1 && e % 100 != 11 ? 0 : e !== 0 ? 1 : 2, 17: (e) => e == 1 || e % 10 == 1 && e % 100 != 11 ? 0 : 1, 18: (e) => e == 0 ? 0 : e == 1 ? 1 : 2, 19: (e) => e == 1 ? 0 : e == 0 || e % 100 > 1 && e % 100 < 11 ? 1 : e % 100 > 10 && e % 100 < 20 ? 2 : 3, 20: (e) => e == 1 ? 0 : e == 0 || e % 100 > 0 && e % 100 < 20 ? 1 : 2, 21: (e) => e % 100 == 1 ? 1 : e % 100 == 2 ? 2 : e % 100 == 3 || e % 100 == 4 ? 3 : 0, 22: (e) => e == 1 ? 0 : e == 2 ? 1 : (e < 0 || e > 10) && e % 10 == 0 ? 2 : 3 }; const kA = ["v1", "v2", "v3"], SA = ["v4"], zh = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 }, _A = () => { const e = {}; return vA.forEach((t) => { t.lngs.forEach((n) => { e[n] = { numbers: t.nr, plurals: yA[t.fc] }; }); }), e; }; class NA { constructor(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; this.languageUtils = t, this.options = n, this.logger = zt.create("pluralResolver"), (!this.options.compatibilityJSON || SA.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = _A(), this.pluralRulesCache = {}; } addRule(t, n) { this.rules[t] = n; } clearCache() { this.pluralRulesCache = {}; } getRule(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; if (this.shouldUseIntlApi()) try { const r = fa(t === "dev" ? "en" : t), i = n.ordinal ? "ordinal" : "cardinal", s = JSON.stringify({ cleanedCode: r, type: i }); if (s in this.pluralRulesCache) return this.pluralRulesCache[s]; const o = new Intl.PluralRules(r, { type: i }); return this.pluralRulesCache[s] = o, o; } catch { return; } return this.rules[t] || this.rules[this.languageUtils.getLanguagePartFromCode(t)]; } needsPlural(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; const r = this.getRule(t, n); return this.shouldUseIntlApi() ? r && r.resolvedOptions().pluralCategories.length > 1 : r && r.numbers.length > 1; } getPluralFormsOfKey(t, n) { let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; return this.getSuffixes(t, r).map((i) => `${n}${i}`); } getSuffixes(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; const r = this.getRule(t, n); return r ? this.shouldUseIntlApi() ? r.resolvedOptions().pluralCategories.sort((i, s) => zh[i] - zh[s]).map((i) => `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : r.numbers.map((i) => this.getSuffix(t, i, n)) : []; } getSuffix(t, n) { let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; const i = this.getRule(t, r); return i ? this.shouldUseIntlApi() ? `${this.options.prepend}${r.ordinal ? `ordinal${this.options.prepend}` : ""}${i.select(n)}` : this.getSuffixRetroCompatible(i, n) : (this.logger.warn(`no plural rule found for: ${t}`), ""); } getSuffixRetroCompatible(t, n) { const r = t.noAbs ? t.plurals(n) : t.plurals(Math.abs(n)); let i = t.numbers[r]; this.options.simplifyPluralSuffix && t.numbers.length === 2 && t.numbers[0] === 1 && (i === 2 ? i = "plural" : i === 1 && (i = "")); const s = () => this.options.prepend && i.toString() ? this.options.prepend + i.toString() : i.toString(); return this.options.compatibilityJSON === "v1" ? i === 1 ? "" : typeof i == "number" ? `_plural_${i.toString()}` : s() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && t.numbers.length === 2 && t.numbers[0] === 1 ? s() : this.options.prepend && r.toString() ? this.options.prepend + r.toString() : r.toString(); } shouldUseIntlApi() { return !kA.includes(this.options.compatibilityJSON); } } const Hh = function(e, t, n) { let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, s = cA(e, t, n); return !s && i && typeof n == "string" && (s = cc(e, n, r), s === void 0 && (s = cc(t, n, r))), s; }, nu = (e) => e.replace(/\$/g, "$$$$"); class EA { constructor() { let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; this.logger = zt.create("interpolator"), this.options = t, this.format = t.interpolation && t.interpolation.format || ((n) => n), this.init(t); } init() { let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; t.interpolation || (t.interpolation = { escapeValue: !0 }); const { escape: n, escapeValue: r, useRawValueToEscape: i, prefix: s, prefixEscaped: o, suffix: a, suffixEscaped: l, formatSeparator: u, unescapeSuffix: c, unescapePrefix: d, nestingPrefix: f, nestingPrefixEscaped: v, nestingSuffix: g, nestingSuffixEscaped: m, nestingOptionsSeparator: k, maxReplaces: h, alwaysFormat: p } = t.interpolation; this.escape = n !== void 0 ? n : fA, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = s ? Rr(s) : o || "{{", this.suffix = a ? Rr(a) : l || "}}", this.formatSeparator = u || ",", this.unescapePrefix = c ? "" : d || "-", this.unescapeSuffix = this.unescapePrefix ? "" : c || "", this.nestingPrefix = f ? Rr(f) : v || Rr("$t("), this.nestingSuffix = g ? Rr(g) : m || Rr(")"), this.nestingOptionsSeparator = k || ",", this.maxReplaces = h || 1e3, this.alwaysFormat = p !== void 0 ? p : !1, this.resetRegExp(); } reset() { this.options && this.init(this.options); } resetRegExp() { const t = (n, r) => n && n.source === r ? (n.lastIndex = 0, n) : new RegExp(r, "g"); this.regexp = t(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = t(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = t(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`); } interpolate(t, n, r, i) { let s, o, a; const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, u = (v) => { if (v.indexOf(this.formatSeparator) < 0) { const h = Hh(n, l, v, this.options.keySeparator, this.options.ignoreJSONStructure); return this.alwaysFormat ? this.format(h, void 0, r, { ...i, ...n, interpolationkey: v }) : h; } const g = v.split(this.formatSeparator), m = g.shift().trim(), k = g.join(this.formatSeparator).trim(); return this.format(Hh(n, l, m, this.options.keySeparator, this.options.ignoreJSONStructure), k, r, { ...i, ...n, interpolationkey: m }); }; this.resetRegExp(); const c = i && i.missingInterpolationHandler || this.options.missingInterpolationHandler, d = i && i.interpolation && i.interpolation.skipOnVariables !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables; return [{ regex: this.regexpUnescape, safeValue: (v) => nu(v) }, { regex: this.regexp, safeValue: (v) => this.escapeValue ? nu(this.escape(v)) : nu(v) }].forEach((v) => { for (a = 0; s = v.regex.exec(t); ) { const g = s[1].trim(); if (o = u(g), o === void 0) if (typeof c == "function") { const k = c(t, s, i); o = typeof k == "string" ? k : ""; } else if (i && Object.prototype.hasOwnProperty.call(i, g)) o = ""; else if (d) { o = s[0]; continue; } else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`), o = ""; else typeof o != "string" && !this.useRawValueToEscape && (o = Dh(o)); const m = v.safeValue(o); if (t = t.replace(s[0], m), d ? (v.regex.lastIndex += o.length, v.regex.lastIndex -= s[0].length) : v.regex.lastIndex = 0, a++, a >= this.maxReplaces) break; } }), t; } nest(t, n) { let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i, s, o; const a = (l, u) => { const c = this.nestingOptionsSeparator; if (l.indexOf(c) < 0) return l; const d = l.split(new RegExp(`${c}[ ]*{`)); let f = `{${d[1]}`; l = d[0], f = this.interpolate(f, o); const v = f.match(/'/g), g = f.match(/"/g); (v && v.length % 2 === 0 && !g || g.length % 2 !== 0) && (f = f.replace(/'/g, '"')); try { o = JSON.parse(f), u && (o = { ...u, ...o }); } catch (m) { return this.logger.warn(`failed parsing options string in nesting for key ${l}`, m), `${l}${c}${f}`; } return o.defaultValue && o.defaultValue.indexOf(this.prefix) > -1 && delete o.defaultValue, l; }; for (; i = this.nestingRegexp.exec(t); ) { let l = []; o = { ...r }, o = o.replace && typeof o.replace != "string" ? o.replace : o, o.applyPostProcessor = !1, delete o.defaultValue; let u = !1; if (i[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(i[1])) { const c = i[1].split(this.formatSeparator).map((d) => d.trim()); i[1] = c.shift(), l = c, u = !0; } if (s = n(a.call(this, i[1].trim(), o), o), s && i[0] === t && typeof s != "string") return s; typeof s != "string" && (s = Dh(s)), s || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`), s = ""), u && (s = l.reduce((c, d) => this.format(c, d, r.lng, { ...r, interpolationkey: i[1].trim() }), s.trim())), t = t.replace(i[0], s), this.regexp.lastIndex = 0; } return t; } } const wA = (e) => { let t = e.toLowerCase().trim(); const n = {}; if (e.indexOf("(") > -1) { const r = e.split("("); t = r[0].toLowerCase().trim(); const i = r[1].substring(0, r[1].length - 1); t === "currency" && i.indexOf(":") < 0 ? n.currency || (n.currency = i.trim()) : t === "relativetime" && i.indexOf(":") < 0 ? n.range || (n.range = i.trim()) : i.split(";").forEach((o) => { if (o) { const [a, ...l] = o.split(":"), u = l.join(":").trim().replace(/^'+|'+$/g, ""), c = a.trim(); n[c] || (n[c] = u), u === "false" && (n[c] = !1), u === "true" && (n[c] = !0), isNaN(u) || (n[c] = parseInt(u, 10)); } }); } return { formatName: t, formatOptions: n }; }, Ir = (e) => { const t = {}; return (n, r, i) => { let s = i; i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (s = { ...s, [i.interpolationkey]: void 0 }); const o = r + JSON.stringify(s); let a = t[o]; return a || (a = e(fa(r), i), t[o] = a), a(n); }; }; class AA { constructor() { let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; this.logger = zt.create("formatter"), this.options = t, this.formats = { number: Ir((n, r) => { const i = new Intl.NumberFormat(n, { ...r }); return (s) => i.format(s); }), currency: Ir((n, r) => { const i = new Intl.NumberFormat(n, { ...r, style: "currency" }); return (s) => i.format(s); }), datetime: Ir((n, r) => { const i = new Intl.DateTimeFormat(n, { ...r }); return (s) => i.format(s); }), relativetime: Ir((n, r) => { const i = new Intl.RelativeTimeFormat(n, { ...r }); return (s) => i.format(s, r.range || "day"); }), list: Ir((n, r) => { const i = new Intl.ListFormat(n, { ...r }); return (s) => i.format(s); }) }, this.init(t); } init(t) { const r = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { interpolation: {} }).interpolation; this.formatSeparator = r.formatSeparator ? r.formatSeparator : r.formatSeparator || ","; } add(t, n) { this.formats[t.toLowerCase().trim()] = n; } addCached(t, n) { this.formats[t.toLowerCase().trim()] = Ir(n); } format(t, n, r) { let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; const s = n.split(this.formatSeparator); if (s.length > 1 && s[0].indexOf("(") > 1 && s[0].indexOf(")") < 0 && s.find((a) => a.indexOf(")") > -1)) { const a = s.findIndex((l) => l.indexOf(")") > -1); s[0] = [s[0], ...s.splice(1, a)].join(this.formatSeparator); } return s.reduce((a, l) => { const { formatName: u, formatOptions: c } = wA(l); if (this.formats[u]) { let d = a; try { const f = i && i.formatParams && i.formatParams[i.interpolationkey] || {}, v = f.locale || f.lng || i.locale || i.lng || r; d = this.formats[u](a, v, { ...c, ...i, ...f }); } catch (f) { this.logger.warn(f); } return d; } else this.logger.warn(`there was no format function for ${u}`); return a; }, t); } } const bA = (e, t) => { e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--); }; class CA extends hl { constructor(t, n, r) { let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; super(), this.backend = t, this.store = n, this.services = r, this.languageUtils = r.languageUtils, this.options = i, this.logger = zt.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = i.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = i.maxRetries >= 0 ? i.maxRetries : 5, this.retryTimeout = i.retryTimeout >= 1 ? i.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(r, i.backend, i); } queueLoad(t, n, r, i) { const s = {}, o = {}, a = {}, l = {}; return t.forEach((u) => { let c = !0; n.forEach((d) => { const f = `${u}|${d}`; !r.reload && this.store.hasResourceBundle(u, d) ? this.state[f] = 2 : this.state[f] < 0 || (this.state[f] === 1 ? o[f] === void 0 && (o[f] = !0) : (this.state[f] = 1, c = !1, o[f] === void 0 && (o[f] = !0), s[f] === void 0 && (s[f] = !0), l[d] === void 0 && (l[d] = !0))); }), c || (a[u] = !0); }), (Object.keys(s).length || Object.keys(o).length) && this.queue.push({ pending: o, pendingCount: Object.keys(o).length, loaded: {}, errors: [], callback: i }), { toLoad: Object.keys(s), pending: Object.keys(o), toLoadLanguages: Object.keys(a), toLoadNamespaces: Object.keys(l) }; } loaded(t, n, r) { const i = t.split("|"), s = i[0], o = i[1]; n && this.emit("failedLoading", s, o, n), !n && r && this.store.addResourceBundle(s, o, r, void 0, void 0, { skipCopy: !0 }), this.state[t] = n ? -1 : 2, n && r && (this.state[t] = 0); const a = {}; this.queue.forEach((l) => { uA(l.loaded, [s], o), bA(l, t), n && l.errors.push(n), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((u) => { a[u] || (a[u] = {}); const c = l.loaded[u]; c.length && c.forEach((d) => { a[u][d] === void 0 && (a[u][d] = !0); }); }), l.done = !0, l.errors.length ? l.callback(l.errors) : l.callback()); }), this.emit("loaded", a), this.queue = this.queue.filter((l) => !l.done); } read(t, n, r) { let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, o = arguments.length > 5 ? arguments[5] : void 0; if (!t.length) return o(null, {}); if (this.readingCalls >= this.maxParallelReads) { this.waitingReads.push({ lng: t, ns: n, fcName: r, tried: i, wait: s, callback: o }); return; } this.readingCalls++; const a = (u, c) => { if (this.readingCalls--, this.waitingReads.length > 0) { const d = this.waitingReads.shift(); this.read(d.lng, d.ns, d.fcName, d.tried, d.wait, d.callback); } if (u && c && i < this.maxRetries) { setTimeout(() => { this.read.call(this, t, n, r, i + 1, s * 2, o); }, s); return; } o(u, c); }, l = this.backend[r].bind(this.backend); if (l.length === 2) { try { const u = l(t, n); u && typeof u.then == "function" ? u.then((c) => a(null, c)).catch(a) : a(null, u); } catch (u) { a(u); } return; } return l(t, n, a); } prepareLoading(t, n) { let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = arguments.length > 3 ? arguments[3] : void 0; if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), i && i(); typeof t == "string" && (t = this.languageUtils.toResolveHierarchy(t)), typeof n == "string" && (n = [n]); const s = this.queueLoad(t, n, r, i); if (!s.toLoad.length) return s.pending.length || i(), null; s.toLoad.forEach((o) => { this.loadOne(o); }); } load(t, n, r) { this.prepareLoading(t, n, {}, r); } reload(t, n, r) { this.prepareLoading(t, n, { reload: !0 }, r); } loadOne(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""; const r = t.split("|"), i = r[0], s = r[1]; this.read(i, s, "read", void 0, void 0, (o, a) => { o && this.logger.warn(`${n}loading namespace ${s} for language ${i} failed`, o), !o && a && this.logger.log(`${n}loaded namespace ${s} for language ${i}`, a), this.loaded(t, o, a); }); } saveMissing(t, n, r, i, s) { let o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}, a = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : () => { }; if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(n)) { this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"); return; } if (!(r == null || r === "")) { if (this.backend && this.backend.create) { const l = { ...o, isUpdate: s }, u = this.backend.create.bind(this.backend); if (u.length < 6) try { let c; u.length === 5 ? c = u(t, n, r, i, l) : c = u(t, n, r, i), c && typeof c.then == "function" ? c.then((d) => a(null, d)).catch(a) : a(null, c); } catch (c) { a(c); } else u(t, n, r, i, a, l); } !t || !t[0] || this.store.addResource(t[0], n, r, i); } } } const Gh = () => ({ debug: !1, initImmediate: !0, ns: ["translation"], defaultNS: ["translation"], fallbackLng: ["dev"], fallbackNS: !1, supportedLngs: !1, nonExplicitSupportedLngs: !1, load: "all", preload: !1, simplifyPluralSuffix: !0, keySeparator: ".", nsSeparator: ":", pluralSeparator: "_", contextSeparator: "_", partialBundledLanguages: !1, saveMissing: !1, updateMissing: !1, saveMissingTo: "fallback", saveMissingPlurals: !0, missingKeyHandler: !1, missingInterpolationHandler: !1, postProcess: !1, postProcessPassResolved: !1, returnNull: !1, returnEmptyString: !0, returnObjects: !1, joinArrays: !1, returnedObjectHandler: !1, parseMissingKeyHandler: !1, appendNamespaceToMissingKey: !1, appendNamespaceToCIMode: !1, overloadTranslationOptionHandler: (e) => { let t = {}; if (typeof e[1] == "object" && (t = e[1]), typeof e[1] == "string" && (t.defaultValue = e[1]), typeof e[2] == "string" && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") { const n = e[3] || e[2]; Object.keys(n).forEach((r) => { t[r] = n[r]; }); } return t; }, interpolation: { escapeValue: !0, format: (e) => e, prefix: "{{", suffix: "}}", formatSeparator: ",", unescapePrefix: "-", nestingPrefix: "$t(", nestingSuffix: ")", nestingOptionsSeparator: ",", maxReplaces: 1e3, skipOnVariables: !0 } }), Wh = (e) => (typeof e.ns == "string" && (e.ns = [e.ns]), typeof e.fallbackLng == "string" && (e.fallbackLng = [e.fallbackLng]), typeof e.fallbackNS == "string" && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs && e.supportedLngs.indexOf("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), e), oo = () => { }, OA = (e) => { Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((n) => { typeof e[n] == "function" && (e[n] = e[n].bind(e)); }); }; class ys extends hl { constructor() { let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0; if (super(), this.options = Wh(t), this.services = {}, this.logger = zt, this.modules = { external: [] }, OA(this), n && !this.isInitialized && !t.isClone) { if (!this.options.initImmediate) return this.init(t, n), this; setTimeout(() => { this.init(t, n); }, 0); } } init() { var t = this; let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 ? arguments[1] : void 0; this.isInitializing = !0, typeof n == "function" && (r = n, n = {}), !n.defaultNS && n.defaultNS !== !1 && n.ns && (typeof n.ns == "string" ? n.defaultNS = n.ns : n.ns.indexOf("translation") < 0 && (n.defaultNS = n.ns[0])); const i = Gh(); this.options = { ...i, ...this.options, ...Wh(n) }, this.options.compatibilityAPI !== "v1" && (this.options.interpolation = { ...i.interpolation, ...this.options.interpolation }), n.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = n.keySeparator), n.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = n.nsSeparator); const s = (c) => c ? typeof c == "function" ? new c() : c : null; if (!this.options.isClone) { this.modules.logger ? zt.init(s(this.modules.logger), this.options) : zt.init(null, this.options); let c; this.modules.formatter ? c = this.modules.formatter : typeof Intl < "u" && (c = AA); const d = new Bh(this.options); this.store = new Vh(this.options.resources, this.options); const f = this.services; f.logger = zt, f.resourceStore = this.store, f.languageUtils = d, f.pluralResolver = new NA(d, { prepend: this.options.pluralSeparator, compatibilityJSON: this.options.compatibilityJSON, simplifyPluralSuffix: this.options.simplifyPluralSuffix }), c && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (f.formatter = s(c), f.formatter.init(f, this.options), this.options.interpolation.format = f.formatter.format.bind(f.formatter)), f.interpolator = new EA(this.options), f.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, f.backendConnector = new CA(s(this.modules.backend), f.resourceStore, f, this.options), f.backendConnector.on("*", function(v) { for (var g = arguments.length, m = new Array(g > 1 ? g - 1 : 0), k = 1; k < g; k++) m[k - 1] = arguments[k]; t.emit(v, ...m); }), this.modules.languageDetector && (f.languageDetector = s(this.modules.languageDetector), f.languageDetector.init && f.languageDetector.init(f, this.options.detection, this.options)), this.modules.i18nFormat && (f.i18nFormat = s(this.modules.i18nFormat), f.i18nFormat.init && f.i18nFormat.init(this)), this.translator = new ha(this.services, this.options), this.translator.on("*", function(v) { for (var g = arguments.length, m = new Array(g > 1 ? g - 1 : 0), k = 1; k < g; k++) m[k - 1] = arguments[k]; t.emit(v, ...m); }), this.modules.external.forEach((v) => { v.init && v.init(this); }); } if (this.format = this.options.interpolation.format, r || (r = oo), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) { const c = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng); c.length > 0 && c[0] !== "dev" && (this.options.lng = c[0]); } !this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((c) => { this[c] = function() { return t.store[c](...arguments); }; }), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((c) => { this[c] = function() { return t.store[c](...arguments), t; }; }); const l = Ii(), u = () => { const c = (d, f) => { this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), l.resolve(f), r(d, f); }; if (this.languages && this.options.compatibilityAPI !== "v1" && !this.isInitialized) return c(null, this.t.bind(this)); this.changeLanguage(this.options.lng, c); }; return this.options.resources || !this.options.initImmediate ? u() : setTimeout(u, 0), l; } loadResources(t) { let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : oo; const i = typeof t == "string" ? t : this.language; if (typeof t == "function" && (r = t), !this.options.resources || this.options.partialBundledLanguages) { if (i && i.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return r(); const s = [], o = (a) => { if (!a || a === "cimode") return; this.services.languageUtils.toResolveHierarchy(a).forEach((u) => { u !== "cimode" && s.indexOf(u) < 0 && s.push(u); }); }; i ? o(i) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((l) => o(l)), this.options.preload && this.options.preload.forEach((a) => o(a)), this.services.backendConnector.load(s, this.options.ns, (a) => { !a && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), r(a); }); } else r(null); } reloadResources(t, n, r) { const i = Ii(); return typeof t == "function" && (r = t, t = void 0), typeof n == "function" && (r = n, n = void 0), t || (t = this.languages), n || (n = this.options.ns), r || (r = oo), this.services.backendConnector.reload(t, n, (s) => { i.resolve(), r(s); }), i; } use(t) { if (!t) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()"); if (!t.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()"); return t.type === "backend" && (this.modules.backend = t), (t.type === "logger" || t.log && t.warn && t.error) && (this.modules.logger = t), t.type === "languageDetector" && (this.modules.languageDetector = t), t.type === "i18nFormat" && (this.modules.i18nFormat = t), t.type === "postProcessor" && dy.addPostProcessor(t), t.type === "formatter" && (this.modules.formatter = t), t.type === "3rdParty" && this.modules.external.push(t), this; } setResolvedLanguage(t) { if (!(!t || !this.languages) && !(["cimode", "dev"].indexOf(t) > -1)) for (let n = 0; n < this.languages.length; n++) { const r = this.languages[n]; if (!(["cimode", "dev"].indexOf(r) > -1) && this.store.hasLanguageSomeTranslations(r)) { this.resolvedLanguage = r; break; } } } changeLanguage(t, n) { var r = this; this.isLanguageChangingTo = t; const i = Ii(); this.emit("languageChanging", t); const s = (l) => { this.language = l, this.languages = this.services.languageUtils.toResolveHierarchy(l), this.resolvedLanguage = void 0, this.setResolvedLanguage(l); }, o = (l, u) => { u ? (s(u), this.translator.changeLanguage(u), this.isLanguageChangingTo = void 0, this.emit("languageChanged", u), this.logger.log("languageChanged", u)) : this.isLanguageChangingTo = void 0, i.resolve(function() { return r.t(...arguments); }), n && n(l, function() { return r.t(...arguments); }); }, a = (l) => { !t && !l && this.services.languageDetector && (l = []); const u = typeof l == "string" ? l : this.services.languageUtils.getBestMatchFromCodes(l); u && (this.language || s(u), this.translator.language || this.translator.changeLanguage(u), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(u)), this.loadResources(u, (c) => { o(c, u); }); }; return !t && this.services.languageDetector && !this.services.languageDetector.async ? a(this.services.languageDetector.detect()) : !t && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(a) : this.services.languageDetector.detect(a) : a(t), i; } getFixedT(t, n, r) { var i = this; const s = function(o, a) { let l; if (typeof a != "object") { for (var u = arguments.length, c = new Array(u > 2 ? u - 2 : 0), d = 2; d < u; d++) c[d - 2] = arguments[d]; l = i.options.overloadTranslationOptionHandler([o, a].concat(c)); } else l = { ...a }; l.lng = l.lng || s.lng, l.lngs = l.lngs || s.lngs, l.ns = l.ns || s.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || r || s.keyPrefix); const f = i.options.keySeparator || "."; let v; return l.keyPrefix && Array.isArray(o) ? v = o.map((g) => `${l.keyPrefix}${f}${g}`) : v = l.keyPrefix ? `${l.keyPrefix}${f}${o}` : o, i.t(v, l); }; return typeof t == "string" ? s.lng = t : s.lngs = t, s.ns = n, s.keyPrefix = r, s; } t() { return this.translator && this.translator.translate(...arguments); } exists() { return this.translator && this.translator.exists(...arguments); } setDefaultNamespace(t) { this.options.defaultNS = t; } hasLoadedNamespace(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; if (!this.isInitialized) return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1; if (!this.languages || !this.languages.length) return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1; const r = n.lng || this.resolvedLanguage || this.languages[0], i = this.options ? this.options.fallbackLng : !1, s = this.languages[this.languages.length - 1]; if (r.toLowerCase() === "cimode") return !0; const o = (a, l) => { const u = this.services.backendConnector.state[`${a}|${l}`]; return u === -1 || u === 0 || u === 2; }; if (n.precheck) { const a = n.precheck(this, o); if (a !== void 0) return a; } return !!(this.hasResourceBundle(r, t) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || o(r, t) && (!i || o(s, t))); } loadNamespaces(t, n) { const r = Ii(); return this.options.ns ? (typeof t == "string" && (t = [t]), t.forEach((i) => { this.options.ns.indexOf(i) < 0 && this.options.ns.push(i); }), this.loadResources((i) => { r.resolve(), n && n(i); }), r) : (n && n(), Promise.resolve()); } loadLanguages(t, n) { const r = Ii(); typeof t == "string" && (t = [t]); const i = this.options.preload || [], s = t.filter((o) => i.indexOf(o) < 0 && this.services.languageUtils.isSupportedCode(o)); return s.length ? (this.options.preload = i.concat(s), this.loadResources((o) => { r.resolve(), n && n(o); }), r) : (n && n(), Promise.resolve()); } dir(t) { if (t || (t = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language)), !t) return "rtl"; const n = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], r = this.services && this.services.languageUtils || new Bh(Gh()); return n.indexOf(r.getLanguagePartFromCode(t)) > -1 || t.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr"; } static createInstance() { let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0; return new ys(t, n); } cloneInstance() { let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : oo; const r = t.forkResourceStore; r && delete t.forkResourceStore; const i = { ...this.options, ...t, isClone: !0 }, s = new ys(i); return (t.debug !== void 0 || t.prefix !== void 0) && (s.logger = s.logger.clone(t)), ["store", "services", "language"].forEach((a) => { s[a] = this[a]; }), s.services = { ...this.services }, s.services.utils = { hasLoadedNamespace: s.hasLoadedNamespace.bind(s) }, r && (s.store = new Vh(this.store.data, i), s.services.resourceStore = s.store), s.translator = new ha(s.services, i), s.translator.on("*", function(a) { for (var l = arguments.length, u = new Array(l > 1 ? l - 1 : 0), c = 1; c < l; c++) u[c - 1] = arguments[c]; s.emit(a, ...u); }), s.init(i, n), s.translator.options = i, s.translator.backendConnector.services.utils = { hasLoadedNamespace: s.hasLoadedNamespace.bind(s) }, s; } toJSON() { return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage }; } } const Oe = ys.createInstance(); Oe.createInstance = ys.createInstance; Oe.createInstance; Oe.dir; Oe.init; Oe.loadResources; Oe.reloadResources; Oe.use; Oe.changeLanguage; Oe.getFixedT; const qh = Oe.t; Oe.exists; Oe.setDefaultNamespace; Oe.hasLoadedNamespace; Oe.loadNamespaces; Oe.loadLanguages; const fy = (e) => qh(e ? `errorCodes.${e}` : "errorCodes.DEFAULT"); class TA { constructor(t) { O(this, "logger"); O(this, "axiosInstance"); this.logger = t.logger, this.axiosInstance = le.create({ baseURL: t.baseUrl, headers: t.accessToken ? { Authorization: `Bearer ${t.accessToken}` } : {} }); } /** * Performs a GET request to the specified path. * * @param {string} path - The endpoint path. * @returns {Promise} - The response data. * @throws {Error} - Throws a user-friendly error message if the request fails. */ async get(t) { try { return (await this.axiosInstance.get(t)).data; } catch (n) { throw this.handleError(n); } } /** * Performs a POST request to the specified path with the provided data. * * @param {string} path - The endpoint path. * @param {PostRequestInput} input - The request config. * @returns {Promise} - The response data. * @throws {Error} - Throws a user-friendly error message if the request fails. */ async post(t, n) { var s; const { data: r = {}, ignoreError: i = !1 } = n; try { return (await this.axiosInstance.post( t, r )).data; } catch (o) { if (i && le.isAxiosError(o)) return (s = o.response) == null ? void 0 : s.data; throw this.handleError(o); } } /** * Performs a PUT request to the specified path with the provided data. * * @param {string} path - The endpoint path. * @param {PostRequestInput} input - The request config. * @returns {Promise} - The response data. * @throws {Error} - Throws a user-friendly error message if the request fails. */ async put(t, n) { var s; const { data: r = {}, ignoreError: i = !1 } = n; try { return (await this.axiosInstance.put( t, r )).data; } catch (o) { if (i && le.isAxiosError(o)) return (s = o.response) == null ? void 0 : s.data; throw this.handleError(o); } } /** * Performs a DELETE request to the specified path. * * @param {string} path - The endpoint path. * @returns {Promise} - The response data. * @throws {Error} - Throws a user-friendly error message if the request fails. */ async delete(t) { try { return (await this.axiosInstance.delete(t)).data; } catch (n) { throw this.handleError(n); } } /** * Handles errors from Axios requests, logging them and returning a user-friendly error message. * * @param {unknown} error - The error object from Axios. * @returns {Error} - A new error with a user-friendly message. */ handleError(t) { var i; let n = Re.GENERAL_ERROR; if (le.isAxiosError(t)) if (t.response) switch (t.response.status) { case 400: n = Re.BAD_REQUEST; break; case 401: n = Re.UNAUTHORIZED; break; case 403: n = Re.FORBIDDEN; break; case 404: n = Re.NOT_FOUND; break; case 409: n = Re.CONFLICT; break; case 410: n = Re.GONE; break; case 415: n = Re.UNSUPPORTED_MEDIA_TYPE; break; case 429: n = Re.TOO_MANY_REQUESTS; break; case 500: n = Re.INTERNAL_SERVER_ERROR; break; case 503: n = Re.SERVICE_UNAVAILABLE; break; default: n = Re.SERVER_ERROR; } else t.request ? n = Re.NETWORK_ERROR : n = Re.CONFIG_ERROR; const r = fy(n); return this.logger.error("Error Code:", n, "Message:", r), this.logger.error("Result Data:", (i = t.response) == null ? void 0 : i.data), new Error(r); } } function hy(e) { const t = Object.values(e); return Object.assign({}, ...t); } function py(e) { return Object.entries(e).reduce( (t, [n, r]) => { const i = hy(r); return { ...t, [n]: i }; }, {} ); } function my(e, t) { const n = py(t); Object.entries(n).forEach(([r, i]) => { e.addResourceBundle(r, "translation", i, !0); }); } const { slice: xA, forEach: RA } = []; function IA(e) { return RA.call(xA.call(arguments, 1), (t) => { if (t) for (const n in t) e[n] === void 0 && (e[n] = t[n]); }), e; } const Kh = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, PA = (e, t, n) => { const r = n || {}; r.path = r.path || "/"; const i = encodeURIComponent(t); let s = `${e}=${i}`; if (r.maxAge > 0) { const o = r.maxAge - 0; if (Number.isNaN(o)) throw new Error("maxAge should be a Number"); s += `; Max-Age=${Math.floor(o)}`; } if (r.domain) { if (!Kh.test(r.domain)) throw new TypeError("option domain is invalid"); s += `; Domain=${r.domain}`; } if (r.path) { if (!Kh.test(r.path)) throw new TypeError("option path is invalid"); s += `; Path=${r.path}`; } if (r.expires) { if (typeof r.expires.toUTCString != "function") throw new TypeError("option expires is invalid"); s += `; Expires=${r.expires.toUTCString()}`; } if (r.httpOnly && (s += "; HttpOnly"), r.secure && (s += "; Secure"), r.sameSite) switch (typeof r.sameSite == "string" ? r.sameSite.toLowerCase() : r.sameSite) { case !0: s += "; SameSite=Strict"; break; case "lax": s += "; SameSite=Lax"; break; case "strict": s += "; SameSite=Strict"; break; case "none": s += "; SameSite=None"; break; default: throw new TypeError("option sameSite is invalid"); } return s; }, Qh = { create(e, t, n, r) { let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : { path: "/", sameSite: "strict" }; n && (i.expires = /* @__PURE__ */ new Date(), i.expires.setTime(i.expires.getTime() + n * 60 * 1e3)), r && (i.domain = r), document.cookie = PA(e, encodeURIComponent(t), i); }, read(e) { const t = `${e}=`, n = document.cookie.split(";"); for (let r = 0; r < n.length; r++) { let i = n[r]; for (; i.charAt(0) === " "; ) i = i.substring(1, i.length); if (i.indexOf(t) === 0) return i.substring(t.length, i.length); } return null; }, remove(e) { this.create(e, "", -1); } }; var LA = { name: "cookie", // Deconstruct the options object and extract the lookupCookie property lookup(e) { let { lookupCookie: t } = e; if (t && typeof document < "u") return Qh.read(t) || void 0; }, // Deconstruct the options object and extract the lookupCookie, cookieMinutes, cookieDomain, and cookieOptions properties cacheUserLanguage(e, t) { let { lookupCookie: n, cookieMinutes: r, cookieDomain: i, cookieOptions: s } = t; n && typeof document < "u" && Qh.create(n, e, r, i, s); } }, FA = { name: "querystring", // Deconstruct the options object and extract the lookupQuerystring property lookup(e) { var r; let { lookupQuerystring: t } = e, n; if (typeof window < "u") { let { search: i } = window.location; !window.location.search && ((r = window.location.hash) == null ? void 0 : r.indexOf("?")) > -1 && (i = window.location.hash.substring(window.location.hash.indexOf("?"))); const o = i.substring(1).split("&"); for (let a = 0; a < o.length; a++) { const l = o[a].indexOf("="); l > 0 && o[a].substring(0, l) === t && (n = o[a].substring(l + 1)); } } return n; } }; let Pi = null; const Jh = () => { if (Pi !== null) return Pi; try { Pi = window !== "undefined" && window.localStorage !== null; const e = "i18next.translate.boo"; window.localStorage.setItem(e, "foo"), window.localStorage.removeItem(e); } catch { Pi = !1; } return Pi; }; var DA = { name: "localStorage", // Deconstruct the options object and extract the lookupLocalStorage property lookup(e) { let { lookupLocalStorage: t } = e; if (t && Jh()) return window.localStorage.getItem(t) || void 0; }, // Deconstruct the options object and extract the lookupLocalStorage property cacheUserLanguage(e, t) { let { lookupLocalStorage: n } = t; n && Jh() && window.localStorage.setItem(n, e); } }; let Li = null; const Yh = () => { if (Li !== null) return Li; try { Li = window !== "undefined" && window.sessionStorage !== null; const e = "i18next.translate.boo"; window.sessionStorage.setItem(e, "foo"), window.sessionStorage.removeItem(e); } catch { Li = !1; } return Li; }; var $A = { name: "sessionStorage", lookup(e) { let { lookupSessionStorage: t } = e; if (t && Yh()) return window.sessionStorage.getItem(t) || void 0; }, cacheUserLanguage(e, t) { let { lookupSessionStorage: n } = t; n && Yh() && window.sessionStorage.setItem(n, e); } }, MA = { name: "navigator", lookup(e) { const t = []; if (typeof navigator < "u") { const { languages: n, userLanguage: r, language: i } = navigator; if (n) for (let s = 0; s < n.length; s++) t.push(n[s]); r && t.push(r), i && t.push(i); } return t.length > 0 ? t : void 0; } }, UA = { name: "htmlTag", // Deconstruct the options object and extract the htmlTag property lookup(e) { let { htmlTag: t } = e, n; const r = t || (typeof document < "u" ? document.documentElement : null); return r && typeof r.getAttribute == "function" && (n = r.getAttribute("lang")), n; } }, VA = { name: "path", // Deconstruct the options object and extract the lookupFromPathIndex property lookup(e) { var i; let { lookupFromPathIndex: t } = e; if (typeof window > "u") return; const n = window.location.pathname.match(/\/([a-zA-Z-]*)/g); return Array.isArray(n) ? (i = n[typeof t == "number" ? t : 0]) == null ? void 0 : i.replace("/", "") : void 0; } }, jA = { name: "subdomain", lookup(e) { var i, s; let { lookupFromSubdomainIndex: t } = e; const n = typeof t == "number" ? t + 1 : 1, r = typeof window < "u" && ((s = (i = window.location) == null ? void 0 : i.hostname) == null ? void 0 : s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i)); if (r) return r[n]; } }; function BA() { return { order: ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"], lookupQuerystring: "lng", lookupCookie: "i18next", lookupLocalStorage: "i18nextLng", lookupSessionStorage: "i18nextLng", // cache user language caches: ["localStorage"], excludeCacheFor: ["cimode"], // cookieMinutes: 10, // cookieDomain: 'myDomain' convertDetectedLanguage: (e) => e }; } class gy { constructor(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; this.type = "languageDetector", this.detectors = {}, this.init(t, n); } init(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; this.services = t || { languageUtils: {} }, this.options = IA(n, this.options || {}, BA()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (i) => i.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = r, this.addDetector(LA), this.addDetector(FA), this.addDetector(DA), this.addDetector($A), this.addDetector(MA), this.addDetector(UA), this.addDetector(VA), this.addDetector(jA); } addDetector(t) { return this.detectors[t.name] = t, this; } detect(t) { t || (t = this.options.order); let n = []; return t.forEach((r) => { if (this.detectors[r]) { let i = this.detectors[r].lookup(this.options); i && typeof i == "string" && (i = [i]), i && (n = n.concat(i)); } }), n = n.map((r) => this.options.convertDetectedLanguage(r)), this.services.languageUtils.getBestMatchFromCodes ? n : n.length > 0 ? n[0] : null; } cacheUserLanguage(t, n) { n || (n = this.options.caches), n && (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(t) > -1 || n.forEach((r) => { this.detectors[r] && this.detectors[r].cacheUserLanguage(t, this.options); })); } } gy.type = "languageDetector"; function vy(e, t) { e.use(t).use(gy).init({ resources: {}, fallbackLng: "en", debug: !1, interpolation: { escapeValue: !1, // not needed for react as it escapes by default format: (n, r, i) => { if (r) { const [s, ...o] = r.split(",").map((a) => a.trim()); if (s === "number") return new Intl.NumberFormat(i).format(n); if (s === "date") return new Intl.DateTimeFormat(i).format(n); if (s === "currency") return new Intl.NumberFormat(i, { style: "currency", currency: o[0] || "USD", currencyDisplay: "narrowSymbol" }).format(n).replace("$", "").trim(); } return n; } }, detection: { // order and from where user language should be detected order: [ "navigator", "cookie", "localStorage", "sessionStorage", "querystring", "htmlTag", "path", "subdomain" ] } }); } const zA = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, HA = { "&": "&", "&": "&", "<": "<", "<": "<", ">": ">", ">": ">", "'": "'", "'": "'", """: '"', """: '"', " ": " ", " ": " ", "©": "©", "©": "©", "®": "®", "®": "®", "…": "…", "…": "…", "/": "/", "/": "/" }, GA = (e) => HA[e], WA = (e) => e.replace(zA, GA); let Xh = { bindI18n: "languageChanged", bindI18nStore: "", transEmptyNodeValue: "", transSupportBasicHtmlNodes: !0, transWrapTextNodes: "", transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"], useSuspense: !0, unescape: WA }; function qA() { let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; Xh = { ...Xh, ...e }; } const KA = { type: "3rdParty", init(e) { qA(e.options.react); } }; vy(Oe, KA); const QA = (e) => my(Oe, e), Zh = { startTime: "UNKNOWN", viewerCount: 0, status: "UNKNOWN" }, JA = () => { const [e, t] = U.useState([]), [n, r] = U.useState(Zh); return { realTimeStreamInfo: n, productsInCart: e, onTextMetadataCue: (o) => { const { action: a, data: l, startTime: u, viewerCount: c, status: d } = JSON.parse( o == null ? void 0 : o.text ); switch (a) { case "sendivsdatarealtime": { r({ startTime: u, viewerCount: c, status: d }); break; } case "sendaddtocart": { const { id: f, sessionId: v, productId: g, productImageUrl: m, productName: k } = l; t((h) => [ ...h, { id: f, sessionId: v, productId: g, productImageUrl: m, productName: k } ]); } break; } }, resetRealTimeStreamInfo: () => { r(Zh); }, setProductsInCart: t }; }, zd = JSON, YA = (e) => e.toUpperCase(), XA = (e) => { const t = {}; return e.forEach((n, r) => { t[r] = n; }), t; }, ZA = (e, t, n) => e.document ? e : { document: e, variables: t, requestHeaders: n, signal: void 0 }, eb = (e, t, n) => e.query ? e : { query: e, variables: t, requestHeaders: n, signal: void 0 }, tb = (e, t) => e.documents ? e : { documents: e, requestHeaders: t, signal: void 0 }; function $o(e, t) { if (!!!e) throw new Error(t); } function nb(e) { return typeof e == "object" && e !== null; } function rb(e, t) { if (!!!e) throw new Error( "Unexpected invariant triggered." ); } const ib = /\r\n|[\n\r]/g; function dc(e, t) { let n = 0, r = 1; for (const i of e.body.matchAll(ib)) { if (typeof i.index == "number" || rb(!1), i.index >= t) break; n = i.index + i[0].length, r += 1; } return { line: r, column: t + 1 - n }; } function sb(e) { return yy( e.source, dc(e.source, e.start) ); } function yy(e, t) { const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, a = t.line === 1 ? n : 0, l = t.column + a, u = `${e.name}:${o}:${l} `, c = r.split(/\r\n|[\n\r]/g), d = c[i]; if (d.length > 120) { const f = Math.floor(l / 80), v = l % 80, g = []; for (let m = 0; m < d.length; m += 80) g.push(d.slice(m, m + 80)); return u + ep([ [`${o} |`, g[0]], ...g.slice(1, f + 1).map((m) => ["|", m]), ["|", "^".padStart(v)], ["|", g[f + 1]] ]); } return u + ep([ // Lines specified like this: ["prefix", "string"], [`${o - 1} |`, c[i - 1]], [`${o} |`, d], ["|", "^".padStart(l)], [`${o + 1} |`, c[i + 1]] ]); } function ep(e) { const t = e.filter(([r, i]) => i !== void 0), n = Math.max(...t.map(([r]) => r.length)); return t.map(([r, i]) => r.padStart(n) + (i ? " " + i : "")).join(` `); } function ob(e) { const t = e[0]; return t == null || "kind" in t || "length" in t ? { nodes: t, source: e[1], positions: e[2], path: e[3], originalError: e[4], extensions: e[5] } : t; } class Hd extends Error { /** * An array of `{ line, column }` locations within the source GraphQL document * which correspond to this error. * * Errors during validation often contain multiple locations, for example to * point out two things with the same name. Errors during execution include a * single location, the field which produced the error. * * Enumerable, and appears in the result of JSON.stringify(). */ /** * An array describing the JSON-path into the execution response which * corresponds to this error. Only included for errors during execution. * * Enumerable, and appears in the result of JSON.stringify(). */ /** * An array of GraphQL AST Nodes corresponding to this error. */ /** * The source GraphQL document for the first location of this error. * * Note that if this Error represents more than one node, the source may not * represent nodes after the first node. */ /** * An array of character offsets within the source GraphQL document * which correspond to this error. */ /** * The original error thrown from a field resolver during execution. */ /** * Extension fields to add to the formatted error. */ /** * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead. */ constructor(t, ...n) { var r, i, s; const { nodes: o, source: a, positions: l, path: u, originalError: c, extensions: d } = ob(n); super(t), this.name = "GraphQLError", this.path = u ?? void 0, this.originalError = c ?? void 0, this.nodes = tp( Array.isArray(o) ? o : o ? [o] : void 0 ); const f = tp( (r = this.nodes) === null || r === void 0 ? void 0 : r.map((g) => g.loc).filter((g) => g != null) ); this.source = a ?? (f == null || (i = f[0]) === null || i === void 0 ? void 0 : i.source), this.positions = l ?? (f == null ? void 0 : f.map((g) => g.start)), this.locations = l && a ? l.map((g) => dc(a, g)) : f == null ? void 0 : f.map((g) => dc(g.source, g.start)); const v = nb( c == null ? void 0 : c.extensions ) ? c == null ? void 0 : c.extensions : void 0; this.extensions = (s = d ?? v) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, { message: { writable: !0, enumerable: !0 }, name: { enumerable: !1 }, nodes: { enumerable: !1 }, source: { enumerable: !1 }, positions: { enumerable: !1 }, originalError: { enumerable: !1 } }), c != null && c.stack ? Object.defineProperty(this, "stack", { value: c.stack, writable: !0, configurable: !0 }) : Error.captureStackTrace ? Error.captureStackTrace(this, Hd) : Object.defineProperty(this, "stack", { value: Error().stack, writable: !0, configurable: !0 }); } get [Symbol.toStringTag]() { return "GraphQLError"; } toString() { let t = this.message; if (this.nodes) for (const n of this.nodes) n.loc && (t += ` ` + sb(n.loc)); else if (this.source && this.locations) for (const n of this.locations) t += ` ` + yy(this.source, n); return t; } toJSON() { const t = { message: this.message }; return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t; } } function tp(e) { return e === void 0 || e.length === 0 ? void 0 : e; } function Ne(e, t, n) { return new Hd(`Syntax Error: ${n}`, { source: e, positions: [t] }); } class ab { /** * The character offset at which this Node begins. */ /** * The character offset at which this Node ends. */ /** * The Token at which this Node begins. */ /** * The Token at which this Node ends. */ /** * The Source document the AST represents. */ constructor(t, n, r) { this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = r; } get [Symbol.toStringTag]() { return "Location"; } toJSON() { return { start: this.start, end: this.end }; } } class ky { /** * The kind of Token. */ /** * The character offset at which this Node begins. */ /** * The character offset at which this Node ends. */ /** * The 1-indexed line number on which this Token appears. */ /** * The 1-indexed column number at which this Token begins. */ /** * For non-punctuation tokens, represents the interpreted value of the token. * * Note: is undefined for punctuation tokens, but typed as string for * convenience in the parser. */ /** * Tokens exist as nodes in a double-linked-list amongst all tokens * including ignored tokens. is always the first node and * the last. */ constructor(t, n, r, i, s, o) { this.kind = t, this.start = n, this.end = r, this.line = i, this.column = s, this.value = o, this.prev = null, this.next = null; } get [Symbol.toStringTag]() { return "Token"; } toJSON() { return { kind: this.kind, value: this.value, line: this.line, column: this.column }; } } const Sy = { Name: [], Document: ["definitions"], OperationDefinition: [ "name", "variableDefinitions", "directives", "selectionSet" ], VariableDefinition: ["variable", "type", "defaultValue", "directives"], Variable: ["name"], SelectionSet: ["selections"], Field: ["alias", "name", "arguments", "directives", "selectionSet"], Argument: ["name", "value"], FragmentSpread: ["name", "directives"], InlineFragment: ["typeCondition", "directives", "selectionSet"], FragmentDefinition: [ "name", // Note: fragment variable definitions are deprecated and will removed in v17.0.0 "variableDefinitions", "typeCondition", "directives", "selectionSet" ], IntValue: [], FloatValue: [], StringValue: [], BooleanValue: [], NullValue: [], EnumValue: [], ListValue: ["values"], ObjectValue: ["fields"], ObjectField: ["name", "value"], Directive: ["name", "arguments"], NamedType: ["name"], ListType: ["type"], NonNullType: ["type"], SchemaDefinition: ["description", "directives", "operationTypes"], OperationTypeDefinition: ["type"], ScalarTypeDefinition: ["description", "name", "directives"], ObjectTypeDefinition: [ "description", "name", "interfaces", "directives", "fields" ], FieldDefinition: ["description", "name", "arguments", "type", "directives"], InputValueDefinition: [ "description", "name", "type", "defaultValue", "directives" ], InterfaceTypeDefinition: [ "description", "name", "interfaces", "directives", "fields" ], UnionTypeDefinition: ["description", "name", "directives", "types"], EnumTypeDefinition: ["description", "name", "directives", "values"], EnumValueDefinition: ["description", "name", "directives"], InputObjectTypeDefinition: ["description", "name", "directives", "fields"], DirectiveDefinition: ["description", "name", "arguments", "locations"], SchemaExtension: ["directives", "operationTypes"], ScalarTypeExtension: ["name", "directives"], ObjectTypeExtension: ["name", "interfaces", "directives", "fields"], InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"], UnionTypeExtension: ["name", "directives", "types"], EnumTypeExtension: ["name", "directives", "values"], InputObjectTypeExtension: ["name", "directives", "fields"] }, lb = new Set(Object.keys(Sy)); function np(e) { const t = e == null ? void 0 : e.kind; return typeof t == "string" && lb.has(t); } var jr; (function(e) { e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription"; })(jr || (jr = {})); var fc; (function(e) { e.QUERY = "QUERY", e.MUTATION = "MUTATION", e.SUBSCRIPTION = "SUBSCRIPTION", e.FIELD = "FIELD", e.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e.INLINE_FRAGMENT = "INLINE_FRAGMENT", e.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e.SCHEMA = "SCHEMA", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.FIELD_DEFINITION = "FIELD_DEFINITION", e.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.ENUM_VALUE = "ENUM_VALUE", e.INPUT_OBJECT = "INPUT_OBJECT", e.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION"; })(fc || (fc = {})); var B; (function(e) { e.NAME = "Name", e.DOCUMENT = "Document", e.OPERATION_DEFINITION = "OperationDefinition", e.VARIABLE_DEFINITION = "VariableDefinition", e.SELECTION_SET = "SelectionSet", e.FIELD = "Field", e.ARGUMENT = "Argument", e.FRAGMENT_SPREAD = "FragmentSpread", e.INLINE_FRAGMENT = "InlineFragment", e.FRAGMENT_DEFINITION = "FragmentDefinition", e.VARIABLE = "Variable", e.INT = "IntValue", e.FLOAT = "FloatValue", e.STRING = "StringValue", e.BOOLEAN = "BooleanValue", e.NULL = "NullValue", e.ENUM = "EnumValue", e.LIST = "ListValue", e.OBJECT = "ObjectValue", e.OBJECT_FIELD = "ObjectField", e.DIRECTIVE = "Directive", e.NAMED_TYPE = "NamedType", e.LIST_TYPE = "ListType", e.NON_NULL_TYPE = "NonNullType", e.SCHEMA_DEFINITION = "SchemaDefinition", e.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", e.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", e.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", e.FIELD_DEFINITION = "FieldDefinition", e.INPUT_VALUE_DEFINITION = "InputValueDefinition", e.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", e.UNION_TYPE_DEFINITION = "UnionTypeDefinition", e.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", e.ENUM_VALUE_DEFINITION = "EnumValueDefinition", e.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", e.DIRECTIVE_DEFINITION = "DirectiveDefinition", e.SCHEMA_EXTENSION = "SchemaExtension", e.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", e.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", e.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", e.UNION_TYPE_EXTENSION = "UnionTypeExtension", e.ENUM_TYPE_EXTENSION = "EnumTypeExtension", e.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension"; })(B || (B = {})); function hc(e) { return e === 9 || e === 32; } function ks(e) { return e >= 48 && e <= 57; } function _y(e) { return e >= 97 && e <= 122 || // A-Z e >= 65 && e <= 90; } function Ny(e) { return _y(e) || e === 95; } function ub(e) { return _y(e) || ks(e) || e === 95; } function cb(e) { var t; let n = Number.MAX_SAFE_INTEGER, r = null, i = -1; for (let o = 0; o < e.length; ++o) { var s; const a = e[o], l = db(a); l !== a.length && (r = (s = r) !== null && s !== void 0 ? s : o, i = o, o !== 0 && l < n && (n = l)); } return e.map((o, a) => a === 0 ? o : o.slice(n)).slice( (t = r) !== null && t !== void 0 ? t : 0, i + 1 ); } function db(e) { let t = 0; for (; t < e.length && hc(e.charCodeAt(t)); ) ++t; return t; } function fb(e, t) { const n = e.replace(/"""/g, '\\"""'), r = n.split(/\r\n|[\n\r]/g), i = r.length === 1, s = r.length > 1 && r.slice(1).every((v) => v.length === 0 || hc(v.charCodeAt(0))), o = n.endsWith('\\"""'), a = e.endsWith('"') && !o, l = e.endsWith("\\"), u = a || l, c = ( // add leading and trailing new lines only if it improves readability !i || e.length > 70 || u || s || o ); let d = ""; const f = i && hc(e.charCodeAt(0)); return (c && !f || s) && (d += ` `), d += n, (c || u) && (d += ` `), '"""' + d + '"""'; } var C; (function(e) { e.SOF = "", e.EOF = "", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment"; })(C || (C = {})); class hb { /** * The previously focused non-ignored token. */ /** * The currently focused non-ignored token. */ /** * The (1-indexed) line containing the current token. */ /** * The character offset at which the current line begins. */ constructor(t) { const n = new ky(C.SOF, 0, 0, 0, 0); this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0; } get [Symbol.toStringTag]() { return "Lexer"; } /** * Advances the token stream to the next non-ignored token. */ advance() { return this.lastToken = this.token, this.token = this.lookahead(); } /** * Looks ahead and returns the next non-ignored token, but does not change * the state of Lexer. */ lookahead() { let t = this.token; if (t.kind !== C.EOF) do if (t.next) t = t.next; else { const n = mb(this, t.end); t.next = n, n.prev = t, t = n; } while (t.kind === C.COMMENT); return t; } } function pb(e) { return e === C.BANG || e === C.DOLLAR || e === C.AMP || e === C.PAREN_L || e === C.PAREN_R || e === C.SPREAD || e === C.COLON || e === C.EQUALS || e === C.AT || e === C.BRACKET_L || e === C.BRACKET_R || e === C.BRACE_L || e === C.PIPE || e === C.BRACE_R; } function bi(e) { return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111; } function pl(e, t) { return Ey(e.charCodeAt(t)) && wy(e.charCodeAt(t + 1)); } function Ey(e) { return e >= 55296 && e <= 56319; } function wy(e) { return e >= 56320 && e <= 57343; } function mr(e, t) { const n = e.source.body.codePointAt(t); if (n === void 0) return C.EOF; if (n >= 32 && n <= 126) { const r = String.fromCodePoint(n); return r === '"' ? `'"'` : `"${r}"`; } return "U+" + n.toString(16).toUpperCase().padStart(4, "0"); } function ge(e, t, n, r, i) { const s = e.line, o = 1 + n - e.lineStart; return new ky(t, n, r, s, o, i); } function mb(e, t) { const n = e.source.body, r = n.length; let i = t; for (; i < r; ) { const s = n.charCodeAt(i); switch (s) { case 65279: case 9: case 32: case 44: ++i; continue; case 10: ++i, ++e.line, e.lineStart = i; continue; case 13: n.charCodeAt(i + 1) === 10 ? i += 2 : ++i, ++e.line, e.lineStart = i; continue; case 35: return gb(e, i); case 33: return ge(e, C.BANG, i, i + 1); case 36: return ge(e, C.DOLLAR, i, i + 1); case 38: return ge(e, C.AMP, i, i + 1); case 40: return ge(e, C.PAREN_L, i, i + 1); case 41: return ge(e, C.PAREN_R, i, i + 1); case 46: if (n.charCodeAt(i + 1) === 46 && n.charCodeAt(i + 2) === 46) return ge(e, C.SPREAD, i, i + 3); break; case 58: return ge(e, C.COLON, i, i + 1); case 61: return ge(e, C.EQUALS, i, i + 1); case 64: return ge(e, C.AT, i, i + 1); case 91: return ge(e, C.BRACKET_L, i, i + 1); case 93: return ge(e, C.BRACKET_R, i, i + 1); case 123: return ge(e, C.BRACE_L, i, i + 1); case 124: return ge(e, C.PIPE, i, i + 1); case 125: return ge(e, C.BRACE_R, i, i + 1); case 34: return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? Nb(e, i) : yb(e, i); } if (ks(s) || s === 45) return vb(e, i, s); if (Ny(s)) return Eb(e, i); throw Ne( e.source, i, s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : bi(s) || pl(n, i) ? `Unexpected character: ${mr(e, i)}.` : `Invalid character: ${mr(e, i)}.` ); } return ge(e, C.EOF, r, r); } function gb(e, t) { const n = e.source.body, r = n.length; let i = t + 1; for (; i < r; ) { const s = n.charCodeAt(i); if (s === 10 || s === 13) break; if (bi(s)) ++i; else if (pl(n, i)) i += 2; else break; } return ge( e, C.COMMENT, t, i, n.slice(t + 1, i) ); } function vb(e, t, n) { const r = e.source.body; let i = t, s = n, o = !1; if (s === 45 && (s = r.charCodeAt(++i)), s === 48) { if (s = r.charCodeAt(++i), ks(s)) throw Ne( e.source, i, `Invalid number, unexpected digit after 0: ${mr( e, i )}.` ); } else i = ru(e, i, s), s = r.charCodeAt(i); if (s === 46 && (o = !0, s = r.charCodeAt(++i), i = ru(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (o = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = ru(e, i, s), s = r.charCodeAt(i)), s === 46 || Ny(s)) throw Ne( e.source, i, `Invalid number, expected digit but got: ${mr( e, i )}.` ); return ge( e, o ? C.FLOAT : C.INT, t, i, r.slice(t, i) ); } function ru(e, t, n) { if (!ks(n)) throw Ne( e.source, t, `Invalid number, expected digit but got: ${mr( e, t )}.` ); const r = e.source.body; let i = t + 1; for (; ks(r.charCodeAt(i)); ) ++i; return i; } function yb(e, t) { const n = e.source.body, r = n.length; let i = t + 1, s = i, o = ""; for (; i < r; ) { const a = n.charCodeAt(i); if (a === 34) return o += n.slice(s, i), ge(e, C.STRING, t, i + 1, o); if (a === 92) { o += n.slice(s, i); const l = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? kb(e, i) : Sb(e, i) : _b(e, i); o += l.value, i += l.size, s = i; continue; } if (a === 10 || a === 13) break; if (bi(a)) ++i; else if (pl(n, i)) i += 2; else throw Ne( e.source, i, `Invalid character within String: ${mr( e, i )}.` ); } throw Ne(e.source, i, "Unterminated string."); } function kb(e, t) { const n = e.source.body; let r = 0, i = 3; for (; i < 12; ) { const s = n.charCodeAt(t + i++); if (s === 125) { if (i < 5 || !bi(r)) break; return { value: String.fromCodePoint(r), size: i }; } if (r = r << 4 | Hi(s), r < 0) break; } throw Ne( e.source, t, `Invalid Unicode escape sequence: "${n.slice( t, t + i )}".` ); } function Sb(e, t) { const n = e.source.body, r = rp(n, t + 2); if (bi(r)) return { value: String.fromCodePoint(r), size: 6 }; if (Ey(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) { const i = rp(n, t + 8); if (wy(i)) return { value: String.fromCodePoint(r, i), size: 12 }; } throw Ne( e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".` ); } function rp(e, t) { return Hi(e.charCodeAt(t)) << 12 | Hi(e.charCodeAt(t + 1)) << 8 | Hi(e.charCodeAt(t + 2)) << 4 | Hi(e.charCodeAt(t + 3)); } function Hi(e) { return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1; } function _b(e, t) { const n = e.source.body; switch (n.charCodeAt(t + 1)) { case 34: return { value: '"', size: 2 }; case 92: return { value: "\\", size: 2 }; case 47: return { value: "/", size: 2 }; case 98: return { value: "\b", size: 2 }; case 102: return { value: "\f", size: 2 }; case 110: return { value: ` `, size: 2 }; case 114: return { value: "\r", size: 2 }; case 116: return { value: " ", size: 2 }; } throw Ne( e.source, t, `Invalid character escape sequence: "${n.slice( t, t + 2 )}".` ); } function Nb(e, t) { const n = e.source.body, r = n.length; let i = e.lineStart, s = t + 3, o = s, a = ""; const l = []; for (; s < r; ) { const u = n.charCodeAt(s); if (u === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) { a += n.slice(o, s), l.push(a); const c = ge( e, C.BLOCK_STRING, t, s + 3, // Return a string of the lines joined with U+000A. cb(l).join(` `) ); return e.line += l.length - 1, e.lineStart = i, c; } if (u === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) { a += n.slice(o, s), o = s + 1, s += 4; continue; } if (u === 10 || u === 13) { a += n.slice(o, s), l.push(a), u === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, a = "", o = s, i = s; continue; } if (bi(u)) ++s; else if (pl(n, s)) s += 2; else throw Ne( e.source, s, `Invalid character within String: ${mr( e, s )}.` ); } throw Ne(e.source, s, "Unterminated string."); } function Eb(e, t) { const n = e.source.body, r = n.length; let i = t + 1; for (; i < r; ) { const s = n.charCodeAt(i); if (ub(s)) ++i; else break; } return ge( e, C.NAME, t, i, n.slice(t, i) ); } const wb = 10, Ay = 2; function Gd(e) { return ml(e, []); } function ml(e, t) { switch (typeof e) { case "string": return JSON.stringify(e); case "function": return e.name ? `[function ${e.name}]` : "[function]"; case "object": return Ab(e, t); default: return String(e); } } function Ab(e, t) { if (e === null) return "null"; if (t.includes(e)) return "[Circular]"; const n = [...t, e]; if (bb(e)) { const r = e.toJSON(); if (r !== e) return typeof r == "string" ? r : ml(r, n); } else if (Array.isArray(e)) return Ob(e, n); return Cb(e, n); } function bb(e) { return typeof e.toJSON == "function"; } function Cb(e, t) { const n = Object.entries(e); return n.length === 0 ? "{}" : t.length > Ay ? "[" + Tb(e) + "]" : "{ " + n.map( ([i, s]) => i + ": " + ml(s, t) ).join(", ") + " }"; } function Ob(e, t) { if (e.length === 0) return "[]"; if (t.length > Ay) return "[Array]"; const n = Math.min(wb, e.length), r = e.length - n, i = []; for (let s = 0; s < n; ++s) i.push(ml(e[s], t)); return r === 1 ? i.push("... 1 more item") : r > 1 && i.push(`... ${r} more items`), "[" + i.join(", ") + "]"; } function Tb(e) { const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, ""); if (t === "Object" && typeof e.constructor == "function") { const n = e.constructor.name; if (typeof n == "string" && n !== "") return n; } return t; } const xb = globalThis.process && // eslint-disable-next-line no-undef !0, Rb = ( /* c8 ignore next 6 */ // FIXME: https://github.com/graphql/graphql-js/issues/2317 xb ? function(t, n) { return t instanceof n; } : function(t, n) { if (t instanceof n) return !0; if (typeof t == "object" && t !== null) { var r; const i = n.prototype[Symbol.toStringTag], s = ( // We still need to support constructor's name to detect conflicts with older versions of this library. Symbol.toStringTag in t ? t[Symbol.toStringTag] : (r = t.constructor) === null || r === void 0 ? void 0 : r.name ); if (i === s) { const o = Gd(t); throw new Error(`Cannot use ${i} "${o}" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other relied on modules, use "resolutions" to ensure only one version is installed. https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and spurious results.`); } } return !1; } ); class by { constructor(t, n = "GraphQL request", r = { line: 1, column: 1 }) { typeof t == "string" || $o(!1, `Body must be a string. Received: ${Gd(t)}.`), this.body = t, this.name = n, this.locationOffset = r, this.locationOffset.line > 0 || $o( !1, "line in locationOffset is 1-indexed and must be positive." ), this.locationOffset.column > 0 || $o( !1, "column in locationOffset is 1-indexed and must be positive." ); } get [Symbol.toStringTag]() { return "Source"; } } function Ib(e) { return Rb(e, by); } function Pb(e, t) { return new Lb(e, t).parseDocument(); } class Lb { constructor(t, n = {}) { const r = Ib(t) ? t : new by(t); this._lexer = new hb(r), this._options = n, this._tokenCounter = 0; } /** * Converts a name lex token into a name parse node. */ parseName() { const t = this.expectToken(C.NAME); return this.node(t, { kind: B.NAME, value: t.value }); } // Implements the parsing rules in the Document section. /** * Document : Definition+ */ parseDocument() { return this.node(this._lexer.token, { kind: B.DOCUMENT, definitions: this.many( C.SOF, this.parseDefinition, C.EOF ) }); } /** * Definition : * - ExecutableDefinition * - TypeSystemDefinition * - TypeSystemExtension * * ExecutableDefinition : * - OperationDefinition * - FragmentDefinition * * TypeSystemDefinition : * - SchemaDefinition * - TypeDefinition * - DirectiveDefinition * * TypeDefinition : * - ScalarTypeDefinition * - ObjectTypeDefinition * - InterfaceTypeDefinition * - UnionTypeDefinition * - EnumTypeDefinition * - InputObjectTypeDefinition */ parseDefinition() { if (this.peek(C.BRACE_L)) return this.parseOperationDefinition(); const t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token; if (n.kind === C.NAME) { switch (n.value) { case "schema": return this.parseSchemaDefinition(); case "scalar": return this.parseScalarTypeDefinition(); case "type": return this.parseObjectTypeDefinition(); case "interface": return this.parseInterfaceTypeDefinition(); case "union": return this.parseUnionTypeDefinition(); case "enum": return this.parseEnumTypeDefinition(); case "input": return this.parseInputObjectTypeDefinition(); case "directive": return this.parseDirectiveDefinition(); } if (t) throw Ne( this._lexer.source, this._lexer.token.start, "Unexpected description, descriptions are supported only on type definitions." ); switch (n.value) { case "query": case "mutation": case "subscription": return this.parseOperationDefinition(); case "fragment": return this.parseFragmentDefinition(); case "extend": return this.parseTypeSystemExtension(); } } throw this.unexpected(n); } // Implements the parsing rules in the Operations section. /** * OperationDefinition : * - SelectionSet * - OperationType Name? VariableDefinitions? Directives? SelectionSet */ parseOperationDefinition() { const t = this._lexer.token; if (this.peek(C.BRACE_L)) return this.node(t, { kind: B.OPERATION_DEFINITION, operation: jr.QUERY, name: void 0, variableDefinitions: [], directives: [], selectionSet: this.parseSelectionSet() }); const n = this.parseOperationType(); let r; return this.peek(C.NAME) && (r = this.parseName()), this.node(t, { kind: B.OPERATION_DEFINITION, operation: n, name: r, variableDefinitions: this.parseVariableDefinitions(), directives: this.parseDirectives(!1), selectionSet: this.parseSelectionSet() }); } /** * OperationType : one of query mutation subscription */ parseOperationType() { const t = this.expectToken(C.NAME); switch (t.value) { case "query": return jr.QUERY; case "mutation": return jr.MUTATION; case "subscription": return jr.SUBSCRIPTION; } throw this.unexpected(t); } /** * VariableDefinitions : ( VariableDefinition+ ) */ parseVariableDefinitions() { return this.optionalMany( C.PAREN_L, this.parseVariableDefinition, C.PAREN_R ); } /** * VariableDefinition : Variable : Type DefaultValue? Directives[Const]? */ parseVariableDefinition() { return this.node(this._lexer.token, { kind: B.VARIABLE_DEFINITION, variable: this.parseVariable(), type: (this.expectToken(C.COLON), this.parseTypeReference()), defaultValue: this.expectOptionalToken(C.EQUALS) ? this.parseConstValueLiteral() : void 0, directives: this.parseConstDirectives() }); } /** * Variable : $ Name */ parseVariable() { const t = this._lexer.token; return this.expectToken(C.DOLLAR), this.node(t, { kind: B.VARIABLE, name: this.parseName() }); } /** * ``` * SelectionSet : { Selection+ } * ``` */ parseSelectionSet() { return this.node(this._lexer.token, { kind: B.SELECTION_SET, selections: this.many( C.BRACE_L, this.parseSelection, C.BRACE_R ) }); } /** * Selection : * - Field * - FragmentSpread * - InlineFragment */ parseSelection() { return this.peek(C.SPREAD) ? this.parseFragment() : this.parseField(); } /** * Field : Alias? Name Arguments? Directives? SelectionSet? * * Alias : Name : */ parseField() { const t = this._lexer.token, n = this.parseName(); let r, i; return this.expectOptionalToken(C.COLON) ? (r = n, i = this.parseName()) : i = n, this.node(t, { kind: B.FIELD, alias: r, name: i, arguments: this.parseArguments(!1), directives: this.parseDirectives(!1), selectionSet: this.peek(C.BRACE_L) ? this.parseSelectionSet() : void 0 }); } /** * Arguments[Const] : ( Argument[?Const]+ ) */ parseArguments(t) { const n = t ? this.parseConstArgument : this.parseArgument; return this.optionalMany(C.PAREN_L, n, C.PAREN_R); } /** * Argument[Const] : Name : Value[?Const] */ parseArgument(t = !1) { const n = this._lexer.token, r = this.parseName(); return this.expectToken(C.COLON), this.node(n, { kind: B.ARGUMENT, name: r, value: this.parseValueLiteral(t) }); } parseConstArgument() { return this.parseArgument(!0); } // Implements the parsing rules in the Fragments section. /** * Corresponds to both FragmentSpread and InlineFragment in the spec. * * FragmentSpread : ... FragmentName Directives? * * InlineFragment : ... TypeCondition? Directives? SelectionSet */ parseFragment() { const t = this._lexer.token; this.expectToken(C.SPREAD); const n = this.expectOptionalKeyword("on"); return !n && this.peek(C.NAME) ? this.node(t, { kind: B.FRAGMENT_SPREAD, name: this.parseFragmentName(), directives: this.parseDirectives(!1) }) : this.node(t, { kind: B.INLINE_FRAGMENT, typeCondition: n ? this.parseNamedType() : void 0, directives: this.parseDirectives(!1), selectionSet: this.parseSelectionSet() }); } /** * FragmentDefinition : * - fragment FragmentName on TypeCondition Directives? SelectionSet * * TypeCondition : NamedType */ parseFragmentDefinition() { const t = this._lexer.token; return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(t, { kind: B.FRAGMENT_DEFINITION, name: this.parseFragmentName(), variableDefinitions: this.parseVariableDefinitions(), typeCondition: (this.expectKeyword("on"), this.parseNamedType()), directives: this.parseDirectives(!1), selectionSet: this.parseSelectionSet() }) : this.node(t, { kind: B.FRAGMENT_DEFINITION, name: this.parseFragmentName(), typeCondition: (this.expectKeyword("on"), this.parseNamedType()), directives: this.parseDirectives(!1), selectionSet: this.parseSelectionSet() }); } /** * FragmentName : Name but not `on` */ parseFragmentName() { if (this._lexer.token.value === "on") throw this.unexpected(); return this.parseName(); } // Implements the parsing rules in the Values section. /** * Value[Const] : * - [~Const] Variable * - IntValue * - FloatValue * - StringValue * - BooleanValue * - NullValue * - EnumValue * - ListValue[?Const] * - ObjectValue[?Const] * * BooleanValue : one of `true` `false` * * NullValue : `null` * * EnumValue : Name but not `true`, `false` or `null` */ parseValueLiteral(t) { const n = this._lexer.token; switch (n.kind) { case C.BRACKET_L: return this.parseList(t); case C.BRACE_L: return this.parseObject(t); case C.INT: return this.advanceLexer(), this.node(n, { kind: B.INT, value: n.value }); case C.FLOAT: return this.advanceLexer(), this.node(n, { kind: B.FLOAT, value: n.value }); case C.STRING: case C.BLOCK_STRING: return this.parseStringLiteral(); case C.NAME: switch (this.advanceLexer(), n.value) { case "true": return this.node(n, { kind: B.BOOLEAN, value: !0 }); case "false": return this.node(n, { kind: B.BOOLEAN, value: !1 }); case "null": return this.node(n, { kind: B.NULL }); default: return this.node(n, { kind: B.ENUM, value: n.value }); } case C.DOLLAR: if (t) if (this.expectToken(C.DOLLAR), this._lexer.token.kind === C.NAME) { const r = this._lexer.token.value; throw Ne( this._lexer.source, n.start, `Unexpected variable "$${r}" in constant value.` ); } else throw this.unexpected(n); return this.parseVariable(); default: throw this.unexpected(); } } parseConstValueLiteral() { return this.parseValueLiteral(!0); } parseStringLiteral() { const t = this._lexer.token; return this.advanceLexer(), this.node(t, { kind: B.STRING, value: t.value, block: t.kind === C.BLOCK_STRING }); } /** * ListValue[Const] : * - [ ] * - [ Value[?Const]+ ] */ parseList(t) { const n = () => this.parseValueLiteral(t); return this.node(this._lexer.token, { kind: B.LIST, values: this.any(C.BRACKET_L, n, C.BRACKET_R) }); } /** * ``` * ObjectValue[Const] : * - { } * - { ObjectField[?Const]+ } * ``` */ parseObject(t) { const n = () => this.parseObjectField(t); return this.node(this._lexer.token, { kind: B.OBJECT, fields: this.any(C.BRACE_L, n, C.BRACE_R) }); } /** * ObjectField[Const] : Name : Value[?Const] */ parseObjectField(t) { const n = this._lexer.token, r = this.parseName(); return this.expectToken(C.COLON), this.node(n, { kind: B.OBJECT_FIELD, name: r, value: this.parseValueLiteral(t) }); } // Implements the parsing rules in the Directives section. /** * Directives[Const] : Directive[?Const]+ */ parseDirectives(t) { const n = []; for (; this.peek(C.AT); ) n.push(this.parseDirective(t)); return n; } parseConstDirectives() { return this.parseDirectives(!0); } /** * ``` * Directive[Const] : @ Name Arguments[?Const]? * ``` */ parseDirective(t) { const n = this._lexer.token; return this.expectToken(C.AT), this.node(n, { kind: B.DIRECTIVE, name: this.parseName(), arguments: this.parseArguments(t) }); } // Implements the parsing rules in the Types section. /** * Type : * - NamedType * - ListType * - NonNullType */ parseTypeReference() { const t = this._lexer.token; let n; if (this.expectOptionalToken(C.BRACKET_L)) { const r = this.parseTypeReference(); this.expectToken(C.BRACKET_R), n = this.node(t, { kind: B.LIST_TYPE, type: r }); } else n = this.parseNamedType(); return this.expectOptionalToken(C.BANG) ? this.node(t, { kind: B.NON_NULL_TYPE, type: n }) : n; } /** * NamedType : Name */ parseNamedType() { return this.node(this._lexer.token, { kind: B.NAMED_TYPE, name: this.parseName() }); } // Implements the parsing rules in the Type Definition section. peekDescription() { return this.peek(C.STRING) || this.peek(C.BLOCK_STRING); } /** * Description : StringValue */ parseDescription() { if (this.peekDescription()) return this.parseStringLiteral(); } /** * ``` * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ } * ``` */ parseSchemaDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("schema"); const r = this.parseConstDirectives(), i = this.many( C.BRACE_L, this.parseOperationTypeDefinition, C.BRACE_R ); return this.node(t, { kind: B.SCHEMA_DEFINITION, description: n, directives: r, operationTypes: i }); } /** * OperationTypeDefinition : OperationType : NamedType */ parseOperationTypeDefinition() { const t = this._lexer.token, n = this.parseOperationType(); this.expectToken(C.COLON); const r = this.parseNamedType(); return this.node(t, { kind: B.OPERATION_TYPE_DEFINITION, operation: n, type: r }); } /** * ScalarTypeDefinition : Description? scalar Name Directives[Const]? */ parseScalarTypeDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("scalar"); const r = this.parseName(), i = this.parseConstDirectives(); return this.node(t, { kind: B.SCALAR_TYPE_DEFINITION, description: n, name: r, directives: i }); } /** * ObjectTypeDefinition : * Description? * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition? */ parseObjectTypeDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("type"); const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition(); return this.node(t, { kind: B.OBJECT_TYPE_DEFINITION, description: n, name: r, interfaces: i, directives: s, fields: o }); } /** * ImplementsInterfaces : * - implements `&`? NamedType * - ImplementsInterfaces & NamedType */ parseImplementsInterfaces() { return this.expectOptionalKeyword("implements") ? this.delimitedMany(C.AMP, this.parseNamedType) : []; } /** * ``` * FieldsDefinition : { FieldDefinition+ } * ``` */ parseFieldsDefinition() { return this.optionalMany( C.BRACE_L, this.parseFieldDefinition, C.BRACE_R ); } /** * FieldDefinition : * - Description? Name ArgumentsDefinition? : Type Directives[Const]? */ parseFieldDefinition() { const t = this._lexer.token, n = this.parseDescription(), r = this.parseName(), i = this.parseArgumentDefs(); this.expectToken(C.COLON); const s = this.parseTypeReference(), o = this.parseConstDirectives(); return this.node(t, { kind: B.FIELD_DEFINITION, description: n, name: r, arguments: i, type: s, directives: o }); } /** * ArgumentsDefinition : ( InputValueDefinition+ ) */ parseArgumentDefs() { return this.optionalMany( C.PAREN_L, this.parseInputValueDef, C.PAREN_R ); } /** * InputValueDefinition : * - Description? Name : Type DefaultValue? Directives[Const]? */ parseInputValueDef() { const t = this._lexer.token, n = this.parseDescription(), r = this.parseName(); this.expectToken(C.COLON); const i = this.parseTypeReference(); let s; this.expectOptionalToken(C.EQUALS) && (s = this.parseConstValueLiteral()); const o = this.parseConstDirectives(); return this.node(t, { kind: B.INPUT_VALUE_DEFINITION, description: n, name: r, type: i, defaultValue: s, directives: o }); } /** * InterfaceTypeDefinition : * - Description? interface Name Directives[Const]? FieldsDefinition? */ parseInterfaceTypeDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("interface"); const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition(); return this.node(t, { kind: B.INTERFACE_TYPE_DEFINITION, description: n, name: r, interfaces: i, directives: s, fields: o }); } /** * UnionTypeDefinition : * - Description? union Name Directives[Const]? UnionMemberTypes? */ parseUnionTypeDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("union"); const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseUnionMemberTypes(); return this.node(t, { kind: B.UNION_TYPE_DEFINITION, description: n, name: r, directives: i, types: s }); } /** * UnionMemberTypes : * - = `|`? NamedType * - UnionMemberTypes | NamedType */ parseUnionMemberTypes() { return this.expectOptionalToken(C.EQUALS) ? this.delimitedMany(C.PIPE, this.parseNamedType) : []; } /** * EnumTypeDefinition : * - Description? enum Name Directives[Const]? EnumValuesDefinition? */ parseEnumTypeDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("enum"); const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseEnumValuesDefinition(); return this.node(t, { kind: B.ENUM_TYPE_DEFINITION, description: n, name: r, directives: i, values: s }); } /** * ``` * EnumValuesDefinition : { EnumValueDefinition+ } * ``` */ parseEnumValuesDefinition() { return this.optionalMany( C.BRACE_L, this.parseEnumValueDefinition, C.BRACE_R ); } /** * EnumValueDefinition : Description? EnumValue Directives[Const]? */ parseEnumValueDefinition() { const t = this._lexer.token, n = this.parseDescription(), r = this.parseEnumValueName(), i = this.parseConstDirectives(); return this.node(t, { kind: B.ENUM_VALUE_DEFINITION, description: n, name: r, directives: i }); } /** * EnumValue : Name but not `true`, `false` or `null` */ parseEnumValueName() { if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null") throw Ne( this._lexer.source, this._lexer.token.start, `${ao( this._lexer.token )} is reserved and cannot be used for an enum value.` ); return this.parseName(); } /** * InputObjectTypeDefinition : * - Description? input Name Directives[Const]? InputFieldsDefinition? */ parseInputObjectTypeDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("input"); const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseInputFieldsDefinition(); return this.node(t, { kind: B.INPUT_OBJECT_TYPE_DEFINITION, description: n, name: r, directives: i, fields: s }); } /** * ``` * InputFieldsDefinition : { InputValueDefinition+ } * ``` */ parseInputFieldsDefinition() { return this.optionalMany( C.BRACE_L, this.parseInputValueDef, C.BRACE_R ); } /** * TypeSystemExtension : * - SchemaExtension * - TypeExtension * * TypeExtension : * - ScalarTypeExtension * - ObjectTypeExtension * - InterfaceTypeExtension * - UnionTypeExtension * - EnumTypeExtension * - InputObjectTypeDefinition */ parseTypeSystemExtension() { const t = this._lexer.lookahead(); if (t.kind === C.NAME) switch (t.value) { case "schema": return this.parseSchemaExtension(); case "scalar": return this.parseScalarTypeExtension(); case "type": return this.parseObjectTypeExtension(); case "interface": return this.parseInterfaceTypeExtension(); case "union": return this.parseUnionTypeExtension(); case "enum": return this.parseEnumTypeExtension(); case "input": return this.parseInputObjectTypeExtension(); } throw this.unexpected(t); } /** * ``` * SchemaExtension : * - extend schema Directives[Const]? { OperationTypeDefinition+ } * - extend schema Directives[Const] * ``` */ parseSchemaExtension() { const t = this._lexer.token; this.expectKeyword("extend"), this.expectKeyword("schema"); const n = this.parseConstDirectives(), r = this.optionalMany( C.BRACE_L, this.parseOperationTypeDefinition, C.BRACE_R ); if (n.length === 0 && r.length === 0) throw this.unexpected(); return this.node(t, { kind: B.SCHEMA_EXTENSION, directives: n, operationTypes: r }); } /** * ScalarTypeExtension : * - extend scalar Name Directives[Const] */ parseScalarTypeExtension() { const t = this._lexer.token; this.expectKeyword("extend"), this.expectKeyword("scalar"); const n = this.parseName(), r = this.parseConstDirectives(); if (r.length === 0) throw this.unexpected(); return this.node(t, { kind: B.SCALAR_TYPE_EXTENSION, name: n, directives: r }); } /** * ObjectTypeExtension : * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition * - extend type Name ImplementsInterfaces? Directives[Const] * - extend type Name ImplementsInterfaces */ parseObjectTypeExtension() { const t = this._lexer.token; this.expectKeyword("extend"), this.expectKeyword("type"); const n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition(); if (r.length === 0 && i.length === 0 && s.length === 0) throw this.unexpected(); return this.node(t, { kind: B.OBJECT_TYPE_EXTENSION, name: n, interfaces: r, directives: i, fields: s }); } /** * InterfaceTypeExtension : * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition * - extend interface Name ImplementsInterfaces? Directives[Const] * - extend interface Name ImplementsInterfaces */ parseInterfaceTypeExtension() { const t = this._lexer.token; this.expectKeyword("extend"), this.expectKeyword("interface"); const n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition(); if (r.length === 0 && i.length === 0 && s.length === 0) throw this.unexpected(); return this.node(t, { kind: B.INTERFACE_TYPE_EXTENSION, name: n, interfaces: r, directives: i, fields: s }); } /** * UnionTypeExtension : * - extend union Name Directives[Const]? UnionMemberTypes * - extend union Name Directives[Const] */ parseUnionTypeExtension() { const t = this._lexer.token; this.expectKeyword("extend"), this.expectKeyword("union"); const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseUnionMemberTypes(); if (r.length === 0 && i.length === 0) throw this.unexpected(); return this.node(t, { kind: B.UNION_TYPE_EXTENSION, name: n, directives: r, types: i }); } /** * EnumTypeExtension : * - extend enum Name Directives[Const]? EnumValuesDefinition * - extend enum Name Directives[Const] */ parseEnumTypeExtension() { const t = this._lexer.token; this.expectKeyword("extend"), this.expectKeyword("enum"); const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseEnumValuesDefinition(); if (r.length === 0 && i.length === 0) throw this.unexpected(); return this.node(t, { kind: B.ENUM_TYPE_EXTENSION, name: n, directives: r, values: i }); } /** * InputObjectTypeExtension : * - extend input Name Directives[Const]? InputFieldsDefinition * - extend input Name Directives[Const] */ parseInputObjectTypeExtension() { const t = this._lexer.token; this.expectKeyword("extend"), this.expectKeyword("input"); const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseInputFieldsDefinition(); if (r.length === 0 && i.length === 0) throw this.unexpected(); return this.node(t, { kind: B.INPUT_OBJECT_TYPE_EXTENSION, name: n, directives: r, fields: i }); } /** * ``` * DirectiveDefinition : * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations * ``` */ parseDirectiveDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("directive"), this.expectToken(C.AT); const r = this.parseName(), i = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable"); this.expectKeyword("on"); const o = this.parseDirectiveLocations(); return this.node(t, { kind: B.DIRECTIVE_DEFINITION, description: n, name: r, arguments: i, repeatable: s, locations: o }); } /** * DirectiveLocations : * - `|`? DirectiveLocation * - DirectiveLocations | DirectiveLocation */ parseDirectiveLocations() { return this.delimitedMany(C.PIPE, this.parseDirectiveLocation); } /* * DirectiveLocation : * - ExecutableDirectiveLocation * - TypeSystemDirectiveLocation * * ExecutableDirectiveLocation : one of * `QUERY` * `MUTATION` * `SUBSCRIPTION` * `FIELD` * `FRAGMENT_DEFINITION` * `FRAGMENT_SPREAD` * `INLINE_FRAGMENT` * * TypeSystemDirectiveLocation : one of * `SCHEMA` * `SCALAR` * `OBJECT` * `FIELD_DEFINITION` * `ARGUMENT_DEFINITION` * `INTERFACE` * `UNION` * `ENUM` * `ENUM_VALUE` * `INPUT_OBJECT` * `INPUT_FIELD_DEFINITION` */ parseDirectiveLocation() { const t = this._lexer.token, n = this.parseName(); if (Object.prototype.hasOwnProperty.call(fc, n.value)) return n; throw this.unexpected(t); } // Core parsing utility functions /** * Returns a node that, if configured to do so, sets a "loc" field as a * location object, used to identify the place in the source that created a * given parsed object. */ node(t, n) { return this._options.noLocation !== !0 && (n.loc = new ab( t, this._lexer.lastToken, this._lexer.source )), n; } /** * Determines if the next token is of a given kind */ peek(t) { return this._lexer.token.kind === t; } /** * If the next token is of the given kind, return that token after advancing the lexer. * Otherwise, do not change the parser state and throw an error. */ expectToken(t) { const n = this._lexer.token; if (n.kind === t) return this.advanceLexer(), n; throw Ne( this._lexer.source, n.start, `Expected ${Cy(t)}, found ${ao(n)}.` ); } /** * If the next token is of the given kind, return "true" after advancing the lexer. * Otherwise, do not change the parser state and return "false". */ expectOptionalToken(t) { return this._lexer.token.kind === t ? (this.advanceLexer(), !0) : !1; } /** * If the next token is a given keyword, advance the lexer. * Otherwise, do not change the parser state and throw an error. */ expectKeyword(t) { const n = this._lexer.token; if (n.kind === C.NAME && n.value === t) this.advanceLexer(); else throw Ne( this._lexer.source, n.start, `Expected "${t}", found ${ao(n)}.` ); } /** * If the next token is a given keyword, return "true" after advancing the lexer. * Otherwise, do not change the parser state and return "false". */ expectOptionalKeyword(t) { const n = this._lexer.token; return n.kind === C.NAME && n.value === t ? (this.advanceLexer(), !0) : !1; } /** * Helper function for creating an error when an unexpected lexed token is encountered. */ unexpected(t) { const n = t ?? this._lexer.token; return Ne( this._lexer.source, n.start, `Unexpected ${ao(n)}.` ); } /** * Returns a possibly empty list of parse nodes, determined by the parseFn. * This list begins with a lex token of openKind and ends with a lex token of closeKind. * Advances the parser to the next lex token after the closing token. */ any(t, n, r) { this.expectToken(t); const i = []; for (; !this.expectOptionalToken(r); ) i.push(n.call(this)); return i; } /** * Returns a list of parse nodes, determined by the parseFn. * It can be empty only if open token is missing otherwise it will always return non-empty list * that begins with a lex token of openKind and ends with a lex token of closeKind. * Advances the parser to the next lex token after the closing token. */ optionalMany(t, n, r) { if (this.expectOptionalToken(t)) { const i = []; do i.push(n.call(this)); while (!this.expectOptionalToken(r)); return i; } return []; } /** * Returns a non-empty list of parse nodes, determined by the parseFn. * This list begins with a lex token of openKind and ends with a lex token of closeKind. * Advances the parser to the next lex token after the closing token. */ many(t, n, r) { this.expectToken(t); const i = []; do i.push(n.call(this)); while (!this.expectOptionalToken(r)); return i; } /** * Returns a non-empty list of parse nodes, determined by the parseFn. * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind. * Advances the parser to the next lex token after last item in the list. */ delimitedMany(t, n) { this.expectOptionalToken(t); const r = []; do r.push(n.call(this)); while (this.expectOptionalToken(t)); return r; } advanceLexer() { const { maxTokens: t } = this._options, n = this._lexer.advance(); if (t !== void 0 && n.kind !== C.EOF && (++this._tokenCounter, this._tokenCounter > t)) throw Ne( this._lexer.source, n.start, `Document contains more that ${t} tokens. Parsing aborted.` ); } } function ao(e) { const t = e.value; return Cy(e.kind) + (t != null ? ` "${t}"` : ""); } function Cy(e) { return pb(e) ? `"${e}"` : e; } function Fb(e) { return `"${e.replace(Db, $b)}"`; } const Db = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g; function $b(e) { return Mb[e.charCodeAt(0)]; } const Mb = [ "\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004", "\\u0005", "\\u0006", "\\u0007", "\\b", "\\t", "\\n", "\\u000B", "\\f", "\\r", "\\u000E", "\\u000F", "\\u0010", "\\u0011", "\\u0012", "\\u0013", "\\u0014", "\\u0015", "\\u0016", "\\u0017", "\\u0018", "\\u0019", "\\u001A", "\\u001B", "\\u001C", "\\u001D", "\\u001E", "\\u001F", "", "", '\\"', "", "", "", "", "", "", "", "", "", "", "", "", "", // 2F "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", // 3F "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", // 4F "", "", "", "", "", "", "", "", "", "", "", "", "\\\\", "", "", "", // 5F "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", // 6F "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "\\u007F", "\\u0080", "\\u0081", "\\u0082", "\\u0083", "\\u0084", "\\u0085", "\\u0086", "\\u0087", "\\u0088", "\\u0089", "\\u008A", "\\u008B", "\\u008C", "\\u008D", "\\u008E", "\\u008F", "\\u0090", "\\u0091", "\\u0092", "\\u0093", "\\u0094", "\\u0095", "\\u0096", "\\u0097", "\\u0098", "\\u0099", "\\u009A", "\\u009B", "\\u009C", "\\u009D", "\\u009E", "\\u009F" ], Ub = Object.freeze({}); function Vb(e, t, n = Sy) { const r = /* @__PURE__ */ new Map(); for (const h of Object.values(B)) r.set(h, jb(t, h)); let i, s = Array.isArray(e), o = [e], a = -1, l = [], u = e, c, d; const f = [], v = []; do { a++; const h = a === o.length, p = h && l.length !== 0; if (h) { if (c = v.length === 0 ? void 0 : f[f.length - 1], u = d, d = v.pop(), p) if (s) { u = u.slice(); let S = 0; for (const [N, E] of l) { const A = N - S; E === null ? (u.splice(A, 1), S++) : u[A] = E; } } else { u = Object.defineProperties( {}, Object.getOwnPropertyDescriptors(u) ); for (const [S, N] of l) u[S] = N; } a = i.index, o = i.keys, l = i.edits, s = i.inArray, i = i.prev; } else if (d) { if (c = s ? a : o[a], u = d[c], u == null) continue; f.push(c); } let y; if (!Array.isArray(u)) { var g, m; np(u) || $o(!1, `Invalid AST Node: ${Gd(u)}.`); const S = h ? (g = r.get(u.kind)) === null || g === void 0 ? void 0 : g.leave : (m = r.get(u.kind)) === null || m === void 0 ? void 0 : m.enter; if (y = S == null ? void 0 : S.call(t, u, c, d, f, v), y === Ub) break; if (y === !1) { if (!h) { f.pop(); continue; } } else if (y !== void 0 && (l.push([c, y]), !h)) if (np(y)) u = y; else { f.pop(); continue; } } if (y === void 0 && p && l.push([c, u]), h) f.pop(); else { var k; i = { inArray: s, index: a, keys: o, edits: l, prev: i }, s = Array.isArray(u), o = s ? u : (k = n[u.kind]) !== null && k !== void 0 ? k : [], a = -1, l = [], d && v.push(d), d = u; } } while (i !== void 0); return l.length !== 0 ? l[l.length - 1][1] : e; } function jb(e, t) { const n = e[t]; return typeof n == "object" ? n : typeof n == "function" ? { enter: n, leave: void 0 } : { enter: e.enter, leave: e.leave }; } function Bb(e) { return Vb(e, Hb); } const zb = 80, Hb = { Name: { leave: (e) => e.value }, Variable: { leave: (e) => "$" + e.name }, // Document Document: { leave: (e) => M(e.definitions, ` `) }, OperationDefinition: { leave(e) { const t = K("(", M(e.variableDefinitions, ", "), ")"), n = M( [ e.operation, M([e.name, t]), M(e.directives, " ") ], " " ); return (n === "query" ? "" : n + " ") + e.selectionSet; } }, VariableDefinition: { leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => e + ": " + t + K(" = ", n) + K(" ", M(r, " ")) }, SelectionSet: { leave: ({ selections: e }) => Et(e) }, Field: { leave({ alias: e, name: t, arguments: n, directives: r, selectionSet: i }) { const s = K("", e, ": ") + t; let o = s + K("(", M(n, ", "), ")"); return o.length > zb && (o = s + K(`( `, Mo(M(n, ` `)), ` )`)), M([o, M(r, " "), i], " "); } }, Argument: { leave: ({ name: e, value: t }) => e + ": " + t }, // Fragments FragmentSpread: { leave: ({ name: e, directives: t }) => "..." + e + K(" ", M(t, " ")) }, InlineFragment: { leave: ({ typeCondition: e, directives: t, selectionSet: n }) => M( [ "...", K("on ", e), M(t, " "), n ], " " ) }, FragmentDefinition: { leave: ({ name: e, typeCondition: t, variableDefinitions: n, directives: r, selectionSet: i }) => ( // or removed in the future. `fragment ${e}${K("(", M(n, ", "), ")")} on ${t} ${K("", M(r, " "), " ")}` + i ) }, // Value IntValue: { leave: ({ value: e }) => e }, FloatValue: { leave: ({ value: e }) => e }, StringValue: { leave: ({ value: e, block: t }) => t ? fb(e) : Fb(e) }, BooleanValue: { leave: ({ value: e }) => e ? "true" : "false" }, NullValue: { leave: () => "null" }, EnumValue: { leave: ({ value: e }) => e }, ListValue: { leave: ({ values: e }) => "[" + M(e, ", ") + "]" }, ObjectValue: { leave: ({ fields: e }) => "{" + M(e, ", ") + "}" }, ObjectField: { leave: ({ name: e, value: t }) => e + ": " + t }, // Directive Directive: { leave: ({ name: e, arguments: t }) => "@" + e + K("(", M(t, ", "), ")") }, // Type NamedType: { leave: ({ name: e }) => e }, ListType: { leave: ({ type: e }) => "[" + e + "]" }, NonNullType: { leave: ({ type: e }) => e + "!" }, // Type System Definitions SchemaDefinition: { leave: ({ description: e, directives: t, operationTypes: n }) => K("", e, ` `) + M(["schema", M(t, " "), Et(n)], " ") }, OperationTypeDefinition: { leave: ({ operation: e, type: t }) => e + ": " + t }, ScalarTypeDefinition: { leave: ({ description: e, name: t, directives: n }) => K("", e, ` `) + M(["scalar", t, M(n, " ")], " ") }, ObjectTypeDefinition: { leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => K("", e, ` `) + M( [ "type", t, K("implements ", M(n, " & ")), M(r, " "), Et(i) ], " " ) }, FieldDefinition: { leave: ({ description: e, name: t, arguments: n, type: r, directives: i }) => K("", e, ` `) + t + (ip(n) ? K(`( `, Mo(M(n, ` `)), ` )`) : K("(", M(n, ", "), ")")) + ": " + r + K(" ", M(i, " ")) }, InputValueDefinition: { leave: ({ description: e, name: t, type: n, defaultValue: r, directives: i }) => K("", e, ` `) + M( [t + ": " + n, K("= ", r), M(i, " ")], " " ) }, InterfaceTypeDefinition: { leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => K("", e, ` `) + M( [ "interface", t, K("implements ", M(n, " & ")), M(r, " "), Et(i) ], " " ) }, UnionTypeDefinition: { leave: ({ description: e, name: t, directives: n, types: r }) => K("", e, ` `) + M( ["union", t, M(n, " "), K("= ", M(r, " | "))], " " ) }, EnumTypeDefinition: { leave: ({ description: e, name: t, directives: n, values: r }) => K("", e, ` `) + M(["enum", t, M(n, " "), Et(r)], " ") }, EnumValueDefinition: { leave: ({ description: e, name: t, directives: n }) => K("", e, ` `) + M([t, M(n, " ")], " ") }, InputObjectTypeDefinition: { leave: ({ description: e, name: t, directives: n, fields: r }) => K("", e, ` `) + M(["input", t, M(n, " "), Et(r)], " ") }, DirectiveDefinition: { leave: ({ description: e, name: t, arguments: n, repeatable: r, locations: i }) => K("", e, ` `) + "directive @" + t + (ip(n) ? K(`( `, Mo(M(n, ` `)), ` )`) : K("(", M(n, ", "), ")")) + (r ? " repeatable" : "") + " on " + M(i, " | ") }, SchemaExtension: { leave: ({ directives: e, operationTypes: t }) => M( ["extend schema", M(e, " "), Et(t)], " " ) }, ScalarTypeExtension: { leave: ({ name: e, directives: t }) => M(["extend scalar", e, M(t, " ")], " ") }, ObjectTypeExtension: { leave: ({ name: e, interfaces: t, directives: n, fields: r }) => M( [ "extend type", e, K("implements ", M(t, " & ")), M(n, " "), Et(r) ], " " ) }, InterfaceTypeExtension: { leave: ({ name: e, interfaces: t, directives: n, fields: r }) => M( [ "extend interface", e, K("implements ", M(t, " & ")), M(n, " "), Et(r) ], " " ) }, UnionTypeExtension: { leave: ({ name: e, directives: t, types: n }) => M( [ "extend union", e, M(t, " "), K("= ", M(n, " | ")) ], " " ) }, EnumTypeExtension: { leave: ({ name: e, directives: t, values: n }) => M(["extend enum", e, M(t, " "), Et(n)], " ") }, InputObjectTypeExtension: { leave: ({ name: e, directives: t, fields: n }) => M(["extend input", e, M(t, " "), Et(n)], " ") } }; function M(e, t = "") { var n; return (n = e == null ? void 0 : e.filter((r) => r).join(t)) !== null && n !== void 0 ? n : ""; } function Et(e) { return K(`{ `, Mo(M(e, ` `)), ` }`); } function K(e, t, n = "") { return t != null && t !== "" ? e + t + n : ""; } function Mo(e) { return K(" ", e.replace(/\n/g, ` `)); } function ip(e) { var t; return (t = e == null ? void 0 : e.some((n) => n.includes(` `))) !== null && t !== void 0 ? t : !1; } const sp = (e) => { var r, i; let t; const n = e.definitions.filter((s) => s.kind === "OperationDefinition"); return n.length === 1 && (t = (i = (r = n[0]) == null ? void 0 : r.name) == null ? void 0 : i.value), t; }, iu = (e) => { if (typeof e == "string") { let n; try { const r = Pb(e); n = sp(r); } catch { } return { query: e, operationName: n }; } const t = sp(e); return { query: Bb(e), operationName: t }; }; class Xi extends Error { constructor(t, n) { const r = `${Xi.extractMessage(t)}: ${JSON.stringify({ response: t, request: n })}`; super(r), Object.setPrototypeOf(this, Xi.prototype), this.response = t, this.request = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, Xi); } static extractMessage(t) { var n, r; return ((r = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : r.message) ?? `GraphQL Error (Code: ${t.status})`; } } var pc = { exports: {} }; (function(e, t) { var n = typeof self < "u" ? self : Sd, r = function() { function s() { this.fetch = !1, this.DOMException = n.DOMException; } return s.prototype = n, new s(); }(); (function(s) { (function(o) { var a = { searchParams: "URLSearchParams" in s, iterable: "Symbol" in s && "iterator" in Symbol, blob: "FileReader" in s && "Blob" in s && function() { try { return new Blob(), !0; } catch { return !1; } }(), formData: "FormData" in s, arrayBuffer: "ArrayBuffer" in s }; function l(_) { return _ && DataView.prototype.isPrototypeOf(_); } if (a.arrayBuffer) var u = [ "[object Int8Array]", "[object Uint8Array]", "[object Uint8ClampedArray]", "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]", "[object Uint32Array]", "[object Float32Array]", "[object Float64Array]" ], c = ArrayBuffer.isView || function(_) { return _ && u.indexOf(Object.prototype.toString.call(_)) > -1; }; function d(_) { if (typeof _ != "string" && (_ = String(_)), /[^a-z0-9\-#$%&'*+.^_`|~]/i.test(_)) throw new TypeError("Invalid character in header field name"); return _.toLowerCase(); } function f(_) { return typeof _ != "string" && (_ = String(_)), _; } function v(_) { var R = { next: function() { var V = _.shift(); return { done: V === void 0, value: V }; } }; return a.iterable && (R[Symbol.iterator] = function() { return R; }), R; } function g(_) { this.map = {}, _ instanceof g ? _.forEach(function(R, V) { this.append(V, R); }, this) : Array.isArray(_) ? _.forEach(function(R) { this.append(R[0], R[1]); }, this) : _ && Object.getOwnPropertyNames(_).forEach(function(R) { this.append(R, _[R]); }, this); } g.prototype.append = function(_, R) { _ = d(_), R = f(R); var V = this.map[_]; this.map[_] = V ? V + ", " + R : R; }, g.prototype.delete = function(_) { delete this.map[d(_)]; }, g.prototype.get = function(_) { return _ = d(_), this.has(_) ? this.map[_] : null; }, g.prototype.has = function(_) { return this.map.hasOwnProperty(d(_)); }, g.prototype.set = function(_, R) { this.map[d(_)] = f(R); }, g.prototype.forEach = function(_, R) { for (var V in this.map) this.map.hasOwnProperty(V) && _.call(R, this.map[V], V, this); }, g.prototype.keys = function() { var _ = []; return this.forEach(function(R, V) { _.push(V); }), v(_); }, g.prototype.values = function() { var _ = []; return this.forEach(function(R) { _.push(R); }), v(_); }, g.prototype.entries = function() { var _ = []; return this.forEach(function(R, V) { _.push([V, R]); }), v(_); }, a.iterable && (g.prototype[Symbol.iterator] = g.prototype.entries); function m(_) { if (_.bodyUsed) return Promise.reject(new TypeError("Already read")); _.bodyUsed = !0; } function k(_) { return new Promise(function(R, V) { _.onload = function() { R(_.result); }, _.onerror = function() { V(_.error); }; }); } function h(_) { var R = new FileReader(), V = k(R); return R.readAsArrayBuffer(_), V; } function p(_) { var R = new FileReader(), V = k(R); return R.readAsText(_), V; } function y(_) { for (var R = new Uint8Array(_), V = new Array(R.length), oe = 0; oe < R.length; oe++) V[oe] = String.fromCharCode(R[oe]); return V.join(""); } function S(_) { if (_.slice) return _.slice(0); var R = new Uint8Array(_.byteLength); return R.set(new Uint8Array(_)), R.buffer; } function N() { return this.bodyUsed = !1, this._initBody = function(_) { this._bodyInit = _, _ ? typeof _ == "string" ? this._bodyText = _ : a.blob && Blob.prototype.isPrototypeOf(_) ? this._bodyBlob = _ : a.formData && FormData.prototype.isPrototypeOf(_) ? this._bodyFormData = _ : a.searchParams && URLSearchParams.prototype.isPrototypeOf(_) ? this._bodyText = _.toString() : a.arrayBuffer && a.blob && l(_) ? (this._bodyArrayBuffer = S(_.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : a.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(_) || c(_)) ? this._bodyArrayBuffer = S(_) : this._bodyText = _ = Object.prototype.toString.call(_) : this._bodyText = "", this.headers.get("content-type") || (typeof _ == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : a.searchParams && URLSearchParams.prototype.isPrototypeOf(_) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8")); }, a.blob && (this.blob = function() { var _ = m(this); if (_) return _; if (this._bodyBlob) return Promise.resolve(this._bodyBlob); if (this._bodyArrayBuffer) return Promise.resolve(new Blob([this._bodyArrayBuffer])); if (this._bodyFormData) throw new Error("could not read FormData body as blob"); return Promise.resolve(new Blob([this._bodyText])); }, this.arrayBuffer = function() { return this._bodyArrayBuffer ? m(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(h); }), this.text = function() { var _ = m(this); if (_) return _; if (this._bodyBlob) return p(this._bodyBlob); if (this._bodyArrayBuffer) return Promise.resolve(y(this._bodyArrayBuffer)); if (this._bodyFormData) throw new Error("could not read FormData body as text"); return Promise.resolve(this._bodyText); }, a.formData && (this.formData = function() { return this.text().then(I); }), this.json = function() { return this.text().then(JSON.parse); }, this; } var E = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"]; function A(_) { var R = _.toUpperCase(); return E.indexOf(R) > -1 ? R : _; } function b(_, R) { R = R || {}; var V = R.body; if (_ instanceof b) { if (_.bodyUsed) throw new TypeError("Already read"); this.url = _.url, this.credentials = _.credentials, R.headers || (this.headers = new g(_.headers)), this.method = _.method, this.mode = _.mode, this.signal = _.signal, !V && _._bodyInit != null && (V = _._bodyInit, _.bodyUsed = !0); } else this.url = String(_); if (this.credentials = R.credentials || this.credentials || "same-origin", (R.headers || !this.headers) && (this.headers = new g(R.headers)), this.method = A(R.method || this.method || "GET"), this.mode = R.mode || this.mode || null, this.signal = R.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && V) throw new TypeError("Body not allowed for GET or HEAD requests"); this._initBody(V); } b.prototype.clone = function() { return new b(this, { body: this._bodyInit }); }; function I(_) { var R = new FormData(); return _.trim().split("&").forEach(function(V) { if (V) { var oe = V.split("="), T = oe.shift().replace(/\+/g, " "), L = oe.join("=").replace(/\+/g, " "); R.append(decodeURIComponent(T), decodeURIComponent(L)); } }), R; } function F(_) { var R = new g(), V = _.replace(/\r?\n[\t ]+/g, " "); return V.split(/\r?\n/).forEach(function(oe) { var T = oe.split(":"), L = T.shift().trim(); if (L) { var j = T.join(":").trim(); R.append(L, j); } }), R; } N.call(b.prototype); function P(_, R) { R || (R = {}), this.type = "default", this.status = R.status === void 0 ? 200 : R.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in R ? R.statusText : "OK", this.headers = new g(R.headers), this.url = R.url || "", this._initBody(_); } N.call(P.prototype), P.prototype.clone = function() { return new P(this._bodyInit, { status: this.status, statusText: this.statusText, headers: new g(this.headers), url: this.url }); }, P.error = function() { var _ = new P(null, { status: 0, statusText: "" }); return _.type = "error", _; }; var W = [301, 302, 303, 307, 308]; P.redirect = function(_, R) { if (W.indexOf(R) === -1) throw new RangeError("Invalid status code"); return new P(null, { status: R, headers: { location: _ } }); }, o.DOMException = s.DOMException; try { new o.DOMException(); } catch { o.DOMException = function(R, V) { this.message = R, this.name = V; var oe = Error(R); this.stack = oe.stack; }, o.DOMException.prototype = Object.create(Error.prototype), o.DOMException.prototype.constructor = o.DOMException; } function me(_, R) { return new Promise(function(V, oe) { var T = new b(_, R); if (T.signal && T.signal.aborted) return oe(new o.DOMException("Aborted", "AbortError")); var L = new XMLHttpRequest(); function j() { L.abort(); } L.onload = function() { var X = { status: L.status, statusText: L.statusText, headers: F(L.getAllResponseHeaders() || "") }; X.url = "responseURL" in L ? L.responseURL : X.headers.get("X-Request-URL"); var de = "response" in L ? L.response : L.responseText; V(new P(de, X)); }, L.onerror = function() { oe(new TypeError("Network request failed")); }, L.ontimeout = function() { oe(new TypeError("Network request failed")); }, L.onabort = function() { oe(new o.DOMException("Aborted", "AbortError")); }, L.open(T.method, T.url, !0), T.credentials === "include" ? L.withCredentials = !0 : T.credentials === "omit" && (L.withCredentials = !1), "responseType" in L && a.blob && (L.responseType = "blob"), T.headers.forEach(function(X, de) { L.setRequestHeader(de, X); }), T.signal && (T.signal.addEventListener("abort", j), L.onreadystatechange = function() { L.readyState === 4 && T.signal.removeEventListener("abort", j); }), L.send(typeof T._bodyInit > "u" ? null : T._bodyInit); }); } return me.polyfill = !0, s.fetch || (s.fetch = me, s.Headers = g, s.Request = b, s.Response = P), o.Headers = g, o.Request = b, o.Response = P, o.fetch = me, Object.defineProperty(o, "__esModule", { value: !0 }), o; })({}); })(r), r.fetch.ponyfill = !0, delete r.fetch.polyfill; var i = r; t = i.fetch, t.default = i.fetch, t.fetch = i.fetch, t.Headers = i.Headers, t.Request = i.Request, t.Response = i.Response, e.exports = t; })(pc, pc.exports); var pa = pc.exports; const Uo = /* @__PURE__ */ za(pa), Gb = /* @__PURE__ */ bS({ __proto__: null, default: Uo }, [pa]), Pr = (e) => { let t = {}; return e && (typeof Headers < "u" && e instanceof Headers || Gb && pa.Headers && e instanceof pa.Headers ? t = XA(e) : Array.isArray(e) ? e.forEach(([n, r]) => { n && r !== void 0 && (t[n] = r); }) : t = e), t; }, op = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), Wb = (e) => { if (!Array.isArray(e.query)) { const r = e, i = [`query=${encodeURIComponent(op(r.query))}`]; return e.variables && i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`), r.operationName && i.push(`operationName=${encodeURIComponent(r.operationName)}`), i.join("&"); } if (typeof e.variables < "u" && !Array.isArray(e.variables)) throw new Error("Cannot create query with given variable type, array expected"); const t = e, n = e.query.reduce((r, i, s) => (r.push({ query: op(i), variables: t.variables ? t.jsonSerializer.stringify(t.variables[s]) : void 0 }), r), []); return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`; }, qb = (e) => async (t) => { const { url: n, query: r, variables: i, operationName: s, fetch: o, fetchOptions: a, middleware: l } = t, u = { ...t.headers }; let c = "", d; e === "POST" ? (d = Kb(r, i, s, a.jsonSerializer), typeof d == "string" && (u["Content-Type"] = "application/json")) : c = Wb({ query: r, variables: i, operationName: s, jsonSerializer: a.jsonSerializer ?? zd }); const f = { method: e, headers: u, body: d, ...a }; let v = n, g = f; if (l) { const m = await Promise.resolve(l({ ...f, url: n, operationName: s, variables: i })), { url: k, ...h } = m; v = k, g = h; } return c && (v = `${v}?${c}`), await o(v, g); }; class Oy { constructor(t, n = {}) { this.url = t, this.requestConfig = n, this.rawRequest = async (...r) => { const [i, s, o] = r, a = eb(i, s, o), { headers: l, fetch: u = Uo, method: c = "POST", requestMiddleware: d, responseMiddleware: f, ...v } = this.requestConfig, { url: g } = this; a.signal !== void 0 && (v.signal = a.signal); const { operationName: m } = iu(a.query); return su({ url: g, query: a.query, variables: a.variables, headers: { ...Pr(ou(l)), ...Pr(a.requestHeaders) }, operationName: m, fetch: u, method: c, fetchOptions: v, middleware: d }).then((k) => (f && f(k), k)).catch((k) => { throw f && f(k), k; }); }; } async request(t, ...n) { const [r, i] = n, s = ZA(t, r, i), { headers: o, fetch: a = Uo, method: l = "POST", requestMiddleware: u, responseMiddleware: c, ...d } = this.requestConfig, { url: f } = this; s.signal !== void 0 && (d.signal = s.signal); const { query: v, operationName: g } = iu(s.document); return su({ url: f, query: v, variables: s.variables, headers: { ...Pr(ou(o)), ...Pr(s.requestHeaders) }, operationName: g, fetch: a, method: l, fetchOptions: d, middleware: u }).then((m) => (c && c(m), m.data)).catch((m) => { throw c && c(m), m; }); } // prettier-ignore batchRequests(t, n) { const r = tb(t, n), { headers: i, ...s } = this.requestConfig; r.signal !== void 0 && (s.signal = r.signal); const o = r.documents.map(({ document: l }) => iu(l).query), a = r.documents.map(({ variables: l }) => l); return su({ url: this.url, query: o, // @ts-expect-error TODO reconcile batch variables into system. variables: a, headers: { ...Pr(ou(i)), ...Pr(r.requestHeaders) }, operationName: void 0, fetch: this.requestConfig.fetch ?? Uo, method: this.requestConfig.method || "POST", fetchOptions: s, middleware: this.requestConfig.requestMiddleware }).then((l) => (this.requestConfig.responseMiddleware && this.requestConfig.responseMiddleware(l), l.data)).catch((l) => { throw this.requestConfig.responseMiddleware && this.requestConfig.responseMiddleware(l), l; }); } setHeaders(t) { return this.requestConfig.headers = t, this; } /** * Attach a header to the client. All subsequent requests will have this header. */ setHeader(t, n) { const { headers: r } = this.requestConfig; return r ? r[t] = n : this.requestConfig.headers = { [t]: n }, this; } /** * Change the client endpoint. All subsequent requests will send to this endpoint. */ setEndpoint(t) { return this.url = t, this; } } const su = async (e) => { const { query: t, variables: n, fetchOptions: r } = e, i = qb(YA(e.method ?? "post")), s = Array.isArray(e.query), o = await i(e), a = await Qb(o, r.jsonSerializer ?? zd), l = Array.isArray(a) ? !a.some(({ data: c }) => !c) : !!a.data, u = Array.isArray(a) || !a.errors || Array.isArray(a.errors) && !a.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore"; if (o.ok && u && l) { const { errors: c, ...d } = (Array.isArray(a), a), f = r.errorPolicy === "ignore" ? d : a; return { ...s ? { data: f } : f, headers: o.headers, status: o.status }; } else { const c = typeof a == "string" ? { error: a } : a; throw new Xi( // @ts-expect-error TODO { ...c, status: o.status, headers: o.headers }, { query: t, variables: n } ); } }, Kb = (e, t, n, r) => { const i = r ?? zd; if (!Array.isArray(e)) return i.stringify({ query: e, variables: t, operationName: n }); if (typeof t < "u" && !Array.isArray(t)) throw new Error("Cannot create request body with given variable type, array expected"); const s = e.reduce((o, a, l) => (o.push({ query: a, variables: t ? t[l] : void 0 }), o), []); return i.stringify(s); }, Qb = async (e, t) => { let n; return e.headers.forEach((r, i) => { i.toLowerCase() === "content-type" && (n = r); }), n && (n.toLowerCase().startsWith("application/json") || n.toLowerCase().startsWith("application/graphql+json") || n.toLowerCase().startsWith("application/graphql-response+json")) ? t.parse(await e.text()) : e.text(); }, ou = (e) => typeof e == "function" ? e() : e; class Ty extends Nr { constructor() { super( "EVENT_CHAT_ROOM_TOKEN_ERROR", "Error getting chat room connection token" ); } } class gl { constructor(t) { O(this, "root", al(this)); O(this, "token"); this.root.setProps(t); } static toDomain(t) { const n = { token: t.token }; return new gl(n); } toPrimitives() { const { root: t, ...n } = this; return { ...n }; } } const Jb = Bn.apiUrls.graphql; class xy { constructor() { O(this, "client"); this.client = new Oy(Jb); } async getChatRoom(t) { var i; const { getChatRoomToken: n } = await this.client.request( $v, { data: { account: t.account, idEvent: t.eventId, userName: t.userName } } ); this.propagateGraphqlErrorIfExists( n ); const r = (i = n.data) == null ? void 0 : i.token; if (!r) throw new Ty(); return gl.toDomain({ token: r }); } propagateGraphqlErrorIfExists(t) { if (t.__typename === "ErrorGeneral") throw new Error(t.message); } } class Ry { constructor(t) { O(this, "account"); this.eventChatRoomRepository = t; } async get(t) { this.validateAccount(); try { return await this.eventChatRoomRepository.getChatRoom({ ...t, account: this.account }); } catch (n) { throw new Ve(n); } } setAccount(t) { this.account = t; } validateAccount() { if (!this.account) throw new Ga(); } } const Yb = new xy(), mc = new Ry( Yb ), vl = Xt(void 0); vl.debugLabel = "chatSocketAtom"; const yl = Xt(!1); yl.debugLabel = "chatIsConnectedAtom"; const Ks = Xt([]); Ks.debugLabel = "chatMessageListAtom"; const Iy = (e) => { e.data = e.data.replace("replace_gif", e.urlGif ?? ""); const t = e.data.indexOf("::question__") > -1; if (t) { const [n, r] = e.data.split("::") || ["none", "none"], i = r.split("question__")[1], s = { response: n.replace("response__", ""), question: JSON.parse(i) }; return { ...e, data: s.response, isResponse: t, responseData: e.data, question: t ? s.question : null }; } return e; }, Py = (e) => { const { url: t, token: n, onOpen: r, onClose: i, onMessage: s, onError: o } = e, a = new WebSocket(t, n); return a.onopen = (l) => r(l), a.onclose = (l) => i(l), a.onerror = (l) => o(l), a.onmessage = (l) => s(l), a; }, Ly = () => { const e = "0123456789ABCDEF"; let t = "#"; for (let n = 0; n < 6; n += 1) t += e[Math.floor(Math.random() * 16)]; return t; }, Wd = (e, t) => { var f; const { Content: n, Attributes: r, Sender: { Attributes: i } } = t, { username: s, type: o, email: a } = r, { isAdmin: l } = i, u = (r == null ? void 0 : r.id) ?? Un(8), c = ((f = e.find((v) => v.username === s)) == null ? void 0 : f.color) || Ly(), d = { id: u, type: o, color: c, username: s, email: a, data: n, sendDate: r.sendDate, isAdmin: l === "true", responseAdmin: !1, question: null, account: r.account, idEvent: r.idEvent, urlGif: r.urlGif, ip: r.ip }; return Iy(d); }, Fy = (e) => { const { eventId: t, userName: n, enabled: r = !0 } = e, { accountName: i } = _v(), [s, o] = U.useState(""), a = () => { r && i && (mc.setAccount(i), mc.get({ eventId: t, userName: n }).then((l) => { o(l.token); })); }; return U.useEffect(() => { a(); }, [i, r]), { getQuery: { refetch: a }, token: s }; }, { coreLogger: Xb } = Le(), Ue = St.withPrefix(Xb, "useConnectChatSocket"), Zb = Bn.publicUrls.wssIVSChat, eC = 10, tC = (e) => Math.min(1e4, 1e3 * Math.pow(2, e)), nC = (e, t, n) => { const r = JSON.parse(e.data); switch (r.Type) { case "EVENT": t == null || t(r); break; case "MESSAGE": n == null || n(r); break; case "ERROR": Ue.error("Chat room error:", r); break; default: Ue.error("Unknown chat room event:", e); } }, Dy = (e) => { const { onMessage: t, eventId: n, enabled: r = !0, userName: i, onEvent: s } = e, { token: o, getQuery: a } = Fy({ eventId: n, userName: i, enabled: r }), [l, u] = Hl(vl), [c, d] = Hl(yl), [f, v] = Hl(Ks), g = U.useRef(0), m = U.useCallback( (S) => Ue.error("Chat room socket error:", S), [] ), k = U.useCallback(() => { d(!0), g.current = 0, Ue.debug("Successfully connected to the chat room"); }, [d]), h = U.useCallback(() => { if (g.current >= eC) { Ue.error( "Max reconnection attempts reached. No further attempts will be made." ); return; } d(!1), g.current += 1; const S = tC(g.current); Ue.debug( `Disconnected from chat room. Reconnecting in ${S / 1e3} seconds... (Attempt ${g.current})` ), setTimeout(() => a.refetch(), S); }, [a, d]), p = U.useCallback(() => { if (!o) { Ue.debug("No token available. Connection aborted."); return; } if ((l == null ? void 0 : l.readyState) === WebSocket.OPEN) { Ue.debug("WebSocket is already open. No need to reconnect."); return; } Ue.debug("Connecting to the chat room..."); const S = Py({ token: o, url: Zb, onOpen: k, onClose: h, onError: m, onMessage: (N) => nC(N, s, t) }); u(S); }, [ o, l, s, t, k, h, m, u ]), y = U.useCallback(() => { if (!l || l.readyState !== WebSocket.OPEN) { Ue.debug("No open socket to close."); return; } Ue.debug("Closing chat room socket..."), l.close(); }, [l]); return U.useEffect(() => { if (!r) { Ue.debug("Chat is disabled, skipping connection."); return; } if (!o) { Ue.debug("Token not available, skipping connection."); return; } return Ue.debug("Initializing connection with token:", o), y(), p(), y; }, [o, r]), { socket: l, chatIsConnected: c, chatMessageList: f, setChatMessageList: v }; }, rC = () => { const e = Xo(vl), t = Xo(yl); return { sendMessage: U.useCallback( (r, i) => { if (!e || !t) return; const s = { id: i.id, sendDate: /* @__PURE__ */ new Date(), content: r, action: "SEND_MESSAGE", attributes: i }, o = JSON.stringify(s); e.send(o); }, [t, e] ) }; }, $y = () => { const e = Ad(Ks); return { handleEvent: (r) => { var i; if (r.EventName === "senddeletemessage") { const s = JSON.parse((i = r.Attributes) == null ? void 0 : i.data); e((o) => o.filter((a) => a.id !== s.id)); } }, handleMessage: (r) => { e((i) => [...i, Wd(i, r)]); } }; }, iC = (e) => { const { eventId: t, userName: n } = e, [r, i] = U.useState(!1), [s, o] = U.useState(), [a, l] = U.useState(), [u, c] = U.useState([]), { handleEvent: d } = $y(), f = Ad(Ks), v = (p) => { f((y) => [Wd(y, p), ...y]), i(!1); }, g = (p) => { var y, S, N; if (d(p), p.EventName === "sendpinmessage") { const E = JSON.parse((y = p.Attributes) == null ? void 0 : y.data); o({ data: E.data, id: E.id, username: E.username }); } if (p.EventName === "sendunpinmessage" && o(void 0), p.EventName === "sendhighlightproduct") { const E = JSON.parse((S = p.Attributes) == null ? void 0 : S.data); l({ products: E.productIds, collection: E.collection, livestreamingId: E.idEvent }); } if (p.EventName === "sendaddtocart") { const E = JSON.parse((N = p.Attributes) == null ? void 0 : N.data); c((A) => [ ...A, { id: E.id, sessionId: E.sessionId, productId: E.productId, productImageUrl: E.productImageUrl, productName: E.productName } ]); } }, { socket: m, chatMessageList: k, setChatMessageList: h } = Dy({ onMessage: v, onEvent: g, eventId: t, userName: n }); return { socket: m, chat: k, showLoader: r, pinnedMessage: s, highlightProduct: a, productsInCart: u, setChat: h, setShowLoader: i, setPinnedMessage: o, setProductsInCart: c }; }; /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const Vo = globalThis, qd = Vo.ShadowRoot && (Vo.ShadyCSS === void 0 || Vo.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Kd = Symbol(), ap = /* @__PURE__ */ new WeakMap(); let My = class { constructor(t, n, r) { if (this._$cssResult$ = !0, r !== Kd) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = t, this.t = n; } get styleSheet() { let t = this.o; const n = this.t; if (qd && t === void 0) { const r = n !== void 0 && n.length === 1; r && (t = ap.get(n)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && ap.set(n, t)); } return t; } toString() { return this.cssText; } }; const sC = (e) => new My(typeof e == "string" ? e : e + "", void 0, Kd), oC = (e, ...t) => { const n = e.length === 1 ? e[0] : t.reduce((r, i, s) => r + ((o) => { if (o._$cssResult$ === !0) return o.cssText; if (typeof o == "number") return o; throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); })(i) + e[s + 1], e[0]); return new My(n, e, Kd); }, aC = (e, t) => { if (qd) e.adoptedStyleSheets = t.map((n) => n instanceof CSSStyleSheet ? n : n.styleSheet); else for (const n of t) { const r = document.createElement("style"), i = Vo.litNonce; i !== void 0 && r.setAttribute("nonce", i), r.textContent = n.cssText, e.appendChild(r); } }, lp = qd ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => { let n = ""; for (const r of t.cssRules) n += r.cssText; return sC(n); })(e) : e; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const { is: lC, defineProperty: uC, getOwnPropertyDescriptor: cC, getOwnPropertyNames: dC, getOwnPropertySymbols: fC, getPrototypeOf: hC } = Object, Cn = globalThis, up = Cn.trustedTypes, pC = up ? up.emptyScript : "", au = Cn.reactiveElementPolyfillSupport, Zi = (e, t) => e, gc = { toAttribute(e, t) { switch (t) { case Boolean: e = e ? pC : null; break; case Object: case Array: e = e == null ? e : JSON.stringify(e); } return e; }, fromAttribute(e, t) { let n = e; switch (t) { case Boolean: n = e !== null; break; case Number: n = e === null ? null : Number(e); break; case Object: case Array: try { n = JSON.parse(e); } catch { n = null; } } return n; } }, Uy = (e, t) => !lC(e, t), cp = { attribute: !0, type: String, converter: gc, reflect: !1, hasChanged: Uy }; Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), Cn.litPropertyMetadata ?? (Cn.litPropertyMetadata = /* @__PURE__ */ new WeakMap()); class Dr extends HTMLElement { static addInitializer(t) { this._$Ei(), (this.l ?? (this.l = [])).push(t); } static get observedAttributes() { return this.finalize(), this._$Eh && [...this._$Eh.keys()]; } static createProperty(t, n = cp) { if (n.state && (n.attribute = !1), this._$Ei(), this.elementProperties.set(t, n), !n.noAccessor) { const r = Symbol(), i = this.getPropertyDescriptor(t, r, n); i !== void 0 && uC(this.prototype, t, i); } } static getPropertyDescriptor(t, n, r) { const { get: i, set: s } = cC(this.prototype, t) ?? { get() { return this[n]; }, set(o) { this[n] = o; } }; return { get() { return i == null ? void 0 : i.call(this); }, set(o) { const a = i == null ? void 0 : i.call(this); s.call(this, o), this.requestUpdate(t, a, r); }, configurable: !0, enumerable: !0 }; } static getPropertyOptions(t) { return this.elementProperties.get(t) ?? cp; } static _$Ei() { if (this.hasOwnProperty(Zi("elementProperties"))) return; const t = hC(this); t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties); } static finalize() { if (this.hasOwnProperty(Zi("finalized"))) return; if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Zi("properties"))) { const n = this.properties, r = [...dC(n), ...fC(n)]; for (const i of r) this.createProperty(i, n[i]); } const t = this[Symbol.metadata]; if (t !== null) { const n = litPropertyMetadata.get(t); if (n !== void 0) for (const [r, i] of n) this.elementProperties.set(r, i); } this._$Eh = /* @__PURE__ */ new Map(); for (const [n, r] of this.elementProperties) { const i = this._$Eu(n, r); i !== void 0 && this._$Eh.set(i, n); } this.elementStyles = this.finalizeStyles(this.styles); } static finalizeStyles(t) { const n = []; if (Array.isArray(t)) { const r = new Set(t.flat(1 / 0).reverse()); for (const i of r) n.unshift(lp(i)); } else t !== void 0 && n.push(lp(t)); return n; } static _$Eu(t, n) { const r = n.attribute; return r === !1 ? void 0 : typeof r == "string" ? r : typeof t == "string" ? t.toLowerCase() : void 0; } constructor() { super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev(); } _$Ev() { var t; this._$ES = new Promise((n) => this.enableUpdating = n), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((n) => n(this)); } addController(t) { var n; (this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((n = t.hostConnected) == null || n.call(t)); } removeController(t) { var n; (n = this._$EO) == null || n.delete(t); } _$E_() { const t = /* @__PURE__ */ new Map(), n = this.constructor.elementProperties; for (const r of n.keys()) this.hasOwnProperty(r) && (t.set(r, this[r]), delete this[r]); t.size > 0 && (this._$Ep = t); } createRenderRoot() { const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); return aC(t, this.constructor.elementStyles), t; } connectedCallback() { var t; this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((n) => { var r; return (r = n.hostConnected) == null ? void 0 : r.call(n); }); } enableUpdating(t) { } disconnectedCallback() { var t; (t = this._$EO) == null || t.forEach((n) => { var r; return (r = n.hostDisconnected) == null ? void 0 : r.call(n); }); } attributeChangedCallback(t, n, r) { this._$AK(t, r); } _$EC(t, n) { var s; const r = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, r); if (i !== void 0 && r.reflect === !0) { const o = (((s = r.converter) == null ? void 0 : s.toAttribute) !== void 0 ? r.converter : gc).toAttribute(n, r.type); this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null; } } _$AK(t, n) { var s; const r = this.constructor, i = r._$Eh.get(t); if (i !== void 0 && this._$Em !== i) { const o = r.getPropertyOptions(i), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? o.converter : gc; this._$Em = i, this[i] = a.fromAttribute(n, o.type), this._$Em = null; } } requestUpdate(t, n, r) { if (t !== void 0) { if (r ?? (r = this.constructor.getPropertyOptions(t)), !(r.hasChanged ?? Uy)(this[t], n)) return; this.P(t, n, r); } this.isUpdatePending === !1 && (this._$ES = this._$ET()); } P(t, n, r) { this._$AL.has(t) || this._$AL.set(t, n), r.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t); } async _$ET() { this.isUpdatePending = !0; try { await this._$ES; } catch (n) { Promise.reject(n); } const t = this.scheduleUpdate(); return t != null && await t, !this.isUpdatePending; } scheduleUpdate() { return this.performUpdate(); } performUpdate() { var r; if (!this.isUpdatePending) return; if (!this.hasUpdated) { if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) { for (const [s, o] of this._$Ep) this[s] = o; this._$Ep = void 0; } const i = this.constructor.elementProperties; if (i.size > 0) for (const [s, o] of i) o.wrapped !== !0 || this._$AL.has(s) || this[s] === void 0 || this.P(s, this[s], o); } let t = !1; const n = this._$AL; try { t = this.shouldUpdate(n), t ? (this.willUpdate(n), (r = this._$EO) == null || r.forEach((i) => { var s; return (s = i.hostUpdate) == null ? void 0 : s.call(i); }), this.update(n)) : this._$EU(); } catch (i) { throw t = !1, this._$EU(), i; } t && this._$AE(n); } willUpdate(t) { } _$AE(t) { var n; (n = this._$EO) == null || n.forEach((r) => { var i; return (i = r.hostUpdated) == null ? void 0 : i.call(r); }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t); } _$EU() { this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1; } get updateComplete() { return this.getUpdateComplete(); } getUpdateComplete() { return this._$ES; } shouldUpdate(t) { return !0; } update(t) { this._$Ej && (this._$Ej = this._$Ej.forEach((n) => this._$EC(n, this[n]))), this._$EU(); } updated(t) { } firstUpdated(t) { } } Dr.elementStyles = [], Dr.shadowRootOptions = { mode: "open" }, Dr[Zi("elementProperties")] = /* @__PURE__ */ new Map(), Dr[Zi("finalized")] = /* @__PURE__ */ new Map(), au == null || au({ ReactiveElement: Dr }), (Cn.reactiveElementVersions ?? (Cn.reactiveElementVersions = [])).push("2.0.4"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const es = globalThis, ma = es.trustedTypes, dp = ma ? ma.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Vy = "$lit$", yn = `lit$${Math.random().toFixed(9).slice(2)}$`, jy = "?" + yn, mC = `<${jy}>`, gr = document, Ss = () => gr.createComment(""), _s = (e) => e === null || typeof e != "object" && typeof e != "function", Qd = Array.isArray, gC = (e) => Qd(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", lu = `[ \f\r]`, Fi = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, fp = /-->/g, hp = />/g, Yn = RegExp(`>|${lu}(?:([^\\s"'>=/]+)(${lu}*=${lu}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`, "g"), pp = /'/g, mp = /"/g, By = /^(?:script|style|textarea|title)$/i, vC = (e) => (t, ...n) => ({ _$litType$: e, strings: t, values: n }), yC = vC(1), ui = Symbol.for("lit-noChange"), ve = Symbol.for("lit-nothing"), gp = /* @__PURE__ */ new WeakMap(), rr = gr.createTreeWalker(gr, 129); function zy(e, t) { if (!Qd(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array"); return dp !== void 0 ? dp.createHTML(t) : t; } const kC = (e, t) => { const n = e.length - 1, r = []; let i, s = t === 2 ? "" : t === 3 ? "" : "", o = Fi; for (let a = 0; a < n; a++) { const l = e[a]; let u, c, d = -1, f = 0; for (; f < l.length && (o.lastIndex = f, c = o.exec(l), c !== null); ) f = o.lastIndex, o === Fi ? c[1] === "!--" ? o = fp : c[1] !== void 0 ? o = hp : c[2] !== void 0 ? (By.test(c[2]) && (i = RegExp("" ? (o = i ?? Fi, d = -1) : c[1] === void 0 ? d = -2 : (d = o.lastIndex - c[2].length, u = c[1], o = c[3] === void 0 ? Yn : c[3] === '"' ? mp : pp) : o === mp || o === pp ? o = Yn : o === fp || o === hp ? o = Fi : (o = Yn, i = void 0); const v = o === Yn && e[a + 1].startsWith("/>") ? " " : ""; s += o === Fi ? l + mC : d >= 0 ? (r.push(u), l.slice(0, d) + Vy + l.slice(d) + yn + v) : l + yn + (d === -2 ? a : v); } return [zy(e, s + (e[n] || "") + (t === 2 ? "" : t === 3 ? "" : "")), r]; }; let vc = class Hy { constructor({ strings: t, _$litType$: n }, r) { let i; this.parts = []; let s = 0, o = 0; const a = t.length - 1, l = this.parts, [u, c] = kC(t, n); if (this.el = Hy.createElement(u, r), rr.currentNode = this.el.content, n === 2 || n === 3) { const d = this.el.content.firstChild; d.replaceWith(...d.childNodes); } for (; (i = rr.nextNode()) !== null && l.length < a; ) { if (i.nodeType === 1) { if (i.hasAttributes()) for (const d of i.getAttributeNames()) if (d.endsWith(Vy)) { const f = c[o++], v = i.getAttribute(d).split(yn), g = /([.?@])?(.*)/.exec(f); l.push({ type: 1, index: s, name: g[2], strings: v, ctor: g[1] === "." ? _C : g[1] === "?" ? NC : g[1] === "@" ? EC : kl }), i.removeAttribute(d); } else d.startsWith(yn) && (l.push({ type: 6, index: s }), i.removeAttribute(d)); if (By.test(i.tagName)) { const d = i.textContent.split(yn), f = d.length - 1; if (f > 0) { i.textContent = ma ? ma.emptyScript : ""; for (let v = 0; v < f; v++) i.append(d[v], Ss()), rr.nextNode(), l.push({ type: 2, index: ++s }); i.append(d[f], Ss()); } } } else if (i.nodeType === 8) if (i.data === jy) l.push({ type: 2, index: s }); else { let d = -1; for (; (d = i.data.indexOf(yn, d + 1)) !== -1; ) l.push({ type: 7, index: s }), d += yn.length - 1; } s++; } } static createElement(t, n) { const r = gr.createElement("template"); return r.innerHTML = t, r; } }; function ci(e, t, n = e, r) { var o, a; if (t === ui) return t; let i = r !== void 0 ? (o = n.o) == null ? void 0 : o[r] : n.l; const s = _s(t) ? void 0 : t._$litDirective$; return (i == null ? void 0 : i.constructor) !== s && ((a = i == null ? void 0 : i._$AO) == null || a.call(i, !1), s === void 0 ? i = void 0 : (i = new s(e), i._$AT(e, n, r)), r !== void 0 ? (n.o ?? (n.o = []))[r] = i : n.l = i), i !== void 0 && (t = ci(e, i._$AS(e, t.values), i, r)), t; } class SC { constructor(t, n) { this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = n; } get parentNode() { return this._$AM.parentNode; } get _$AU() { return this._$AM._$AU; } u(t) { const { el: { content: n }, parts: r } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? gr).importNode(n, !0); rr.currentNode = i; let s = rr.nextNode(), o = 0, a = 0, l = r[0]; for (; l !== void 0; ) { if (o === l.index) { let u; l.type === 2 ? u = new Qs(s, s.nextSibling, this, t) : l.type === 1 ? u = new l.ctor(s, l.name, l.strings, this, t) : l.type === 6 && (u = new wC(s, this, t)), this._$AV.push(u), l = r[++a]; } o !== (l == null ? void 0 : l.index) && (s = rr.nextNode(), o++); } return rr.currentNode = gr, i; } p(t) { let n = 0; for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, n), n += r.strings.length - 2) : r._$AI(t[n])), n++; } } class Qs { get _$AU() { var t; return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this.v; } constructor(t, n, r, i) { this.type = 2, this._$AH = ve, this._$AN = void 0, this._$AA = t, this._$AB = n, this._$AM = r, this.options = i, this.v = (i == null ? void 0 : i.isConnected) ?? !0; } get parentNode() { let t = this._$AA.parentNode; const n = this._$AM; return n !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = n.parentNode), t; } get startNode() { return this._$AA; } get endNode() { return this._$AB; } _$AI(t, n = this) { t = ci(this, t, n), _s(t) ? t === ve || t == null || t === "" ? (this._$AH !== ve && this._$AR(), this._$AH = ve) : t !== this._$AH && t !== ui && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : gC(t) ? this.k(t) : this._(t); } O(t) { return this._$AA.parentNode.insertBefore(t, this._$AB); } T(t) { this._$AH !== t && (this._$AR(), this._$AH = this.O(t)); } _(t) { this._$AH !== ve && _s(this._$AH) ? this._$AA.nextSibling.data = t : this.T(gr.createTextNode(t)), this._$AH = t; } $(t) { var s; const { values: n, _$litType$: r } = t, i = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = vc.createElement(zy(r.h, r.h[0]), this.options)), r); if (((s = this._$AH) == null ? void 0 : s._$AD) === i) this._$AH.p(n); else { const o = new SC(i, this), a = o.u(this.options); o.p(n), this.T(a), this._$AH = o; } } _$AC(t) { let n = gp.get(t.strings); return n === void 0 && gp.set(t.strings, n = new vc(t)), n; } k(t) { Qd(this._$AH) || (this._$AH = [], this._$AR()); const n = this._$AH; let r, i = 0; for (const s of t) i === n.length ? n.push(r = new Qs(this.O(Ss()), this.O(Ss()), this, this.options)) : r = n[i], r._$AI(s), i++; i < n.length && (this._$AR(r && r._$AB.nextSibling, i), n.length = i); } _$AR(t = this._$AA.nextSibling, n) { var r; for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, n); t && t !== this._$AB; ) { const i = t.nextSibling; t.remove(), t = i; } } setConnected(t) { var n; this._$AM === void 0 && (this.v = t, (n = this._$AP) == null || n.call(this, t)); } } let kl = class { get tagName() { return this.element.tagName; } get _$AU() { return this._$AM._$AU; } constructor(t, n, r, i, s) { this.type = 1, this._$AH = ve, this._$AN = void 0, this.element = t, this.name = n, this._$AM = i, this.options = s, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = ve; } _$AI(t, n = this, r, i) { const s = this.strings; let o = !1; if (s === void 0) t = ci(this, t, n, 0), o = !_s(t) || t !== this._$AH && t !== ui, o && (this._$AH = t); else { const a = t; let l, u; for (t = s[0], l = 0; l < s.length - 1; l++) u = ci(this, a[r + l], n, l), u === ui && (u = this._$AH[l]), o || (o = !_s(u) || u !== this._$AH[l]), u === ve ? t = ve : t !== ve && (t += (u ?? "") + s[l + 1]), this._$AH[l] = u; } o && !i && this.j(t); } j(t) { t === ve ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? ""); } }, _C = class extends kl { constructor() { super(...arguments), this.type = 3; } j(t) { this.element[this.name] = t === ve ? void 0 : t; } }, NC = class extends kl { constructor() { super(...arguments), this.type = 4; } j(t) { this.element.toggleAttribute(this.name, !!t && t !== ve); } }; class EC extends kl { constructor(t, n, r, i, s) { super(t, n, r, i, s), this.type = 5; } _$AI(t, n = this) { if ((t = ci(this, t, n, 0) ?? ve) === ui) return; const r = this._$AH, i = t === ve && r !== ve || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, s = t !== ve && (r === ve || i); i && this.element.removeEventListener(this.name, this, r), s && this.element.addEventListener(this.name, this, t), this._$AH = t; } handleEvent(t) { var n; typeof this._$AH == "function" ? this._$AH.call(((n = this.options) == null ? void 0 : n.host) ?? this.element, t) : this._$AH.handleEvent(t); } } let wC = class { constructor(t, n, r) { this.element = t, this.type = 6, this._$AN = void 0, this._$AM = n, this.options = r; } get _$AU() { return this._$AM._$AU; } _$AI(t) { ci(this, t); } }; const uu = es.litHtmlPolyfillSupport; uu == null || uu(vc, Qs), (es.litHtmlVersions ?? (es.litHtmlVersions = [])).push("3.2.0"); const Jd = (e, t, n) => { const r = (n == null ? void 0 : n.renderBefore) ?? t; let i = r._$litPart$; if (i === void 0) { const s = (n == null ? void 0 : n.renderBefore) ?? null; r._$litPart$ = i = new Qs(t.insertBefore(Ss(), s), s, void 0, n ?? {}); } return i._$AI(e), i; }; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ class ts extends Dr { constructor() { super(...arguments), this.renderOptions = { host: this }, this.o = void 0; } createRenderRoot() { var n; const t = super.createRenderRoot(); return (n = this.renderOptions).renderBefore ?? (n.renderBefore = t.firstChild), t; } update(t) { const n = this.render(); this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this.o = Jd(n, this.renderRoot, this.renderOptions); } connectedCallback() { var t; super.connectedCallback(), (t = this.o) == null || t.setConnected(!0); } disconnectedCallback() { var t; super.disconnectedCallback(), (t = this.o) == null || t.setConnected(!1); } render() { return ui; } } var jm; ts._$litElement$ = !0, ts.finalized = !0, (jm = globalThis.litElementHydrateSupport) == null || jm.call(globalThis, { LitElement: ts }); const cu = globalThis.litElementPolyfillSupport; cu == null || cu({ LitElement: ts }); (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.0"); /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const AC = (e) => e.strings === void 0; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const bC = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, CC = (e) => (...t) => ({ _$litDirective$: e, values: t }); class OC { constructor(t) { } get _$AU() { return this._$AM._$AU; } _$AT(t, n, r) { this.t = t, this._$AM = n, this.i = r; } _$AS(t, n) { return this.update(t, n); } update(t, n) { return this.render(...n); } } /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const ns = (e, t) => { var r; const n = e._$AN; if (n === void 0) return !1; for (const i of n) (r = i._$AO) == null || r.call(i, t, !1), ns(i, t); return !0; }, ga = (e) => { let t, n; do { if ((t = e._$AM) === void 0) break; n = t._$AN, n.delete(e), e = t; } while ((n == null ? void 0 : n.size) === 0); }, Gy = (e) => { for (let t; t = e._$AM; e = t) { let n = t._$AN; if (n === void 0) t._$AN = n = /* @__PURE__ */ new Set(); else if (n.has(e)) break; n.add(e), RC(t); } }; function TC(e) { this._$AN !== void 0 ? (ga(this), this._$AM = e, Gy(this)) : this._$AM = e; } function xC(e, t = !1, n = 0) { const r = this._$AH, i = this._$AN; if (i !== void 0 && i.size !== 0) if (t) if (Array.isArray(r)) for (let s = n; s < r.length; s++) ns(r[s], !1), ga(r[s]); else r != null && (ns(r, !1), ga(r)); else ns(this, e); } const RC = (e) => { e.type == bC.CHILD && (e._$AP ?? (e._$AP = xC), e._$AQ ?? (e._$AQ = TC)); }; class IC extends OC { constructor() { super(...arguments), this._$AN = void 0; } _$AT(t, n, r) { super._$AT(t, n, r), Gy(this), this.isConnected = t._$AU; } _$AO(t, n = !0) { var r, i; t !== this.isConnected && (this.isConnected = t, t ? (r = this.reconnected) == null || r.call(this) : (i = this.disconnected) == null || i.call(this)), n && (ns(this, t), ga(this)); } setValue(t) { if (AC(this.t)) this.t._$AI(t, this); else { const n = [...this.t._$AH]; n[this.i] = t, this.t._$AI(n, this, 0); } } disconnected() { } reconnected() { } } /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const PC = () => new LC(); class LC { } const du = /* @__PURE__ */ new WeakMap(), FC = CC(class extends IC { render(e) { return ve; } update(e, [t]) { var r; const n = t !== this.Y; return n && this.Y !== void 0 && this.rt(void 0), (n || this.lt !== this.ct) && (this.Y = t, this.ht = (r = e.options) == null ? void 0 : r.host, this.rt(this.ct = e.element)), ve; } rt(e) { if (this.isConnected || (e = void 0), typeof this.Y == "function") { const t = this.ht ?? globalThis; let n = du.get(t); n === void 0 && (n = /* @__PURE__ */ new WeakMap(), du.set(t, n)), n.get(this.Y) !== void 0 && this.Y.call(this.ht, void 0), n.set(this.Y, e), e !== void 0 && this.Y.call(this.ht, e); } else this.Y.value = e; } get lt() { var e, t; return typeof this.Y == "function" ? (e = du.get(this.ht ?? globalThis)) == null ? void 0 : e.get(this.Y) : (t = this.Y) == null ? void 0 : t.value; } disconnected() { this.lt === this.ct && this.rt(void 0); } reconnected() { this.rt(this.ct); } }); var Wy = { exports: {} }, ut = {}, qy = { exports: {} }, Ky = {}; /** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ (function(e) { function t(T, L) { var j = T.length; T.push(L); e: for (; 0 < j; ) { var X = j - 1 >>> 1, de = T[X]; if (0 < i(de, L)) T[X] = L, T[j] = de, j = X; else break e; } } function n(T) { return T.length === 0 ? null : T[0]; } function r(T) { if (T.length === 0) return null; var L = T[0], j = T.pop(); if (j !== L) { T[0] = j; e: for (var X = 0, de = T.length, eo = de >>> 1; X < eo; ) { var Kn = 2 * (X + 1) - 1, Ml = T[Kn], Qn = Kn + 1, to = T[Qn]; if (0 > i(Ml, j)) Qn < de && 0 > i(to, Ml) ? (T[X] = to, T[Qn] = j, X = Qn) : (T[X] = Ml, T[Kn] = j, X = Kn); else if (Qn < de && 0 > i(to, j)) T[X] = to, T[Qn] = j, X = Qn; else break e; } } return L; } function i(T, L) { var j = T.sortIndex - L.sortIndex; return j !== 0 ? j : T.id - L.id; } if (typeof performance == "object" && typeof performance.now == "function") { var s = performance; e.unstable_now = function() { return s.now(); }; } else { var o = Date, a = o.now(); e.unstable_now = function() { return o.now() - a; }; } var l = [], u = [], c = 1, d = null, f = 3, v = !1, g = !1, m = !1, k = typeof setTimeout == "function" ? setTimeout : null, h = typeof clearTimeout == "function" ? clearTimeout : null, p = typeof setImmediate < "u" ? setImmediate : null; typeof navigator < "u" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 && navigator.scheduling.isInputPending.bind(navigator.scheduling); function y(T) { for (var L = n(u); L !== null; ) { if (L.callback === null) r(u); else if (L.startTime <= T) r(u), L.sortIndex = L.expirationTime, t(l, L); else break; L = n(u); } } function S(T) { if (m = !1, y(T), !g) if (n(l) !== null) g = !0, V(N); else { var L = n(u); L !== null && oe(S, L.startTime - T); } } function N(T, L) { g = !1, m && (m = !1, h(b), b = -1), v = !0; var j = f; try { for (y(L), d = n(l); d !== null && (!(d.expirationTime > L) || T && !P()); ) { var X = d.callback; if (typeof X == "function") { d.callback = null, f = d.priorityLevel; var de = X(d.expirationTime <= L); L = e.unstable_now(), typeof de == "function" ? d.callback = de : d === n(l) && r(l), y(L); } else r(l); d = n(l); } if (d !== null) var eo = !0; else { var Kn = n(u); Kn !== null && oe(S, Kn.startTime - L), eo = !1; } return eo; } finally { d = null, f = j, v = !1; } } var E = !1, A = null, b = -1, I = 5, F = -1; function P() { return !(e.unstable_now() - F < I); } function W() { if (A !== null) { var T = e.unstable_now(); F = T; var L = !0; try { L = A(!0, T); } finally { L ? me() : (E = !1, A = null); } } else E = !1; } var me; if (typeof p == "function") me = function() { p(W); }; else if (typeof MessageChannel < "u") { var _ = new MessageChannel(), R = _.port2; _.port1.onmessage = W, me = function() { R.postMessage(null); }; } else me = function() { k(W, 0); }; function V(T) { A = T, E || (E = !0, me()); } function oe(T, L) { b = k(function() { T(e.unstable_now()); }, L); } e.unstable_IdlePriority = 5, e.unstable_ImmediatePriority = 1, e.unstable_LowPriority = 4, e.unstable_NormalPriority = 3, e.unstable_Profiling = null, e.unstable_UserBlockingPriority = 2, e.unstable_cancelCallback = function(T) { T.callback = null; }, e.unstable_continueExecution = function() { g || v || (g = !0, V(N)); }, e.unstable_forceFrameRate = function(T) { 0 > T || 125 < T ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : I = 0 < T ? Math.floor(1e3 / T) : 5; }, e.unstable_getCurrentPriorityLevel = function() { return f; }, e.unstable_getFirstCallbackNode = function() { return n(l); }, e.unstable_next = function(T) { switch (f) { case 1: case 2: case 3: var L = 3; break; default: L = f; } var j = f; f = L; try { return T(); } finally { f = j; } }, e.unstable_pauseExecution = function() { }, e.unstable_requestPaint = function() { }, e.unstable_runWithPriority = function(T, L) { switch (T) { case 1: case 2: case 3: case 4: case 5: break; default: T = 3; } var j = f; f = T; try { return L(); } finally { f = j; } }, e.unstable_scheduleCallback = function(T, L, j) { var X = e.unstable_now(); switch (typeof j == "object" && j !== null ? (j = j.delay, j = typeof j == "number" && 0 < j ? X + j : X) : j = X, T) { case 1: var de = -1; break; case 2: de = 250; break; case 5: de = 1073741823; break; case 4: de = 1e4; break; default: de = 5e3; } return de = j + de, T = { id: c++, callback: L, priorityLevel: T, startTime: j, expirationTime: de, sortIndex: -1 }, j > X ? (T.sortIndex = j, t(u, T), n(l) === null && T === n(u) && (m ? (h(b), b = -1) : m = !0, oe(S, j - X))) : (T.sortIndex = de, t(l, T), g || v || (g = !0, V(N))), T; }, e.unstable_shouldYield = P, e.unstable_wrapCallback = function(T) { var L = f; return function() { var j = f; f = L; try { return T.apply(this, arguments); } finally { f = j; } }; }; })(Ky); qy.exports = Ky; var DC = qy.exports; /** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var $C = U, at = DC; function x(e) { for (var t = "https://reactjs.org/docs/error-decoder.html?invariant=" + e, n = 1; n < arguments.length; n++) t += "&args[]=" + encodeURIComponent(arguments[n]); return "Minified React error #" + e + "; visit " + t + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."; } var Qy = /* @__PURE__ */ new Set(), Ns = {}; function Cr(e, t) { di(e, t), di(e + "Capture", t); } function di(e, t) { for (Ns[e] = t, e = 0; e < t.length; e++) Qy.add(t[e]); } var ln = !(typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u"), yc = Object.prototype.hasOwnProperty, MC = /^[: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]*$/, vp = {}, yp = {}; function UC(e) { return yc.call(yp, e) ? !0 : yc.call(vp, e) ? !1 : MC.test(e) ? yp[e] = !0 : (vp[e] = !0, !1); } function VC(e, t, n, r) { if (n !== null && n.type === 0) return !1; switch (typeof t) { case "function": case "symbol": return !0; case "boolean": return r ? !1 : n !== null ? !n.acceptsBooleans : (e = e.toLowerCase().slice(0, 5), e !== "data-" && e !== "aria-"); default: return !1; } } function jC(e, t, n, r) { if (t === null || typeof t > "u" || VC(e, t, n, r)) return !0; if (r) return !1; if (n !== null) switch (n.type) { case 3: return !t; case 4: return t === !1; case 5: return isNaN(t); case 6: return isNaN(t) || 1 > t; } return !1; } function Me(e, t, n, r, i, s, o) { this.acceptsBooleans = t === 2 || t === 3 || t === 4, this.attributeName = r, this.attributeNamespace = i, this.mustUseProperty = n, this.propertyName = e, this.type = t, this.sanitizeURL = s, this.removeEmptyString = o; } var Ce = {}; "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e) { Ce[e] = new Me(e, 0, !1, e, null, !1, !1); }); [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(e) { var t = e[0]; Ce[t] = new Me(t, 1, !1, e[1], null, !1, !1); }); ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(e) { Ce[e] = new Me(e, 2, !1, e.toLowerCase(), null, !1, !1); }); ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(e) { Ce[e] = new Me(e, 2, !1, e, null, !1, !1); }); "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e) { Ce[e] = new Me(e, 3, !1, e.toLowerCase(), null, !1, !1); }); ["checked", "multiple", "muted", "selected"].forEach(function(e) { Ce[e] = new Me(e, 3, !0, e, null, !1, !1); }); ["capture", "download"].forEach(function(e) { Ce[e] = new Me(e, 4, !1, e, null, !1, !1); }); ["cols", "rows", "size", "span"].forEach(function(e) { Ce[e] = new Me(e, 6, !1, e, null, !1, !1); }); ["rowSpan", "start"].forEach(function(e) { Ce[e] = new Me(e, 5, !1, e.toLowerCase(), null, !1, !1); }); var Yd = /[\-:]([a-z])/g; function Xd(e) { return e[1].toUpperCase(); } "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e) { var t = e.replace( Yd, Xd ); Ce[t] = new Me(t, 1, !1, e, null, !1, !1); }); "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e) { var t = e.replace(Yd, Xd); Ce[t] = new Me(t, 1, !1, e, "http://www.w3.org/1999/xlink", !1, !1); }); ["xml:base", "xml:lang", "xml:space"].forEach(function(e) { var t = e.replace(Yd, Xd); Ce[t] = new Me(t, 1, !1, e, "http://www.w3.org/XML/1998/namespace", !1, !1); }); ["tabIndex", "crossOrigin"].forEach(function(e) { Ce[e] = new Me(e, 1, !1, e.toLowerCase(), null, !1, !1); }); Ce.xlinkHref = new Me("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1); ["src", "href", "action", "formAction"].forEach(function(e) { Ce[e] = new Me(e, 1, !1, e.toLowerCase(), null, !0, !0); }); function Zd(e, t, n, r) { var i = Ce.hasOwnProperty(t) ? Ce[t] : null; (i !== null ? i.type !== 0 : r || !(2 < t.length) || t[0] !== "o" && t[0] !== "O" || t[1] !== "n" && t[1] !== "N") && (jC(t, n, i, r) && (n = null), r || i === null ? UC(t) && (n === null ? e.removeAttribute(t) : e.setAttribute(t, "" + n)) : i.mustUseProperty ? e[i.propertyName] = n === null ? i.type === 3 ? !1 : "" : n : (t = i.attributeName, r = i.attributeNamespace, n === null ? e.removeAttribute(t) : (i = i.type, n = i === 3 || i === 4 && n === !0 ? "" : "" + n, r ? e.setAttributeNS(r, t, n) : e.setAttribute(t, n)))); } var hn = $C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, lo = Symbol.for("react.element"), Br = Symbol.for("react.portal"), zr = Symbol.for("react.fragment"), ef = Symbol.for("react.strict_mode"), kc = Symbol.for("react.profiler"), Jy = Symbol.for("react.provider"), Yy = Symbol.for("react.context"), tf = Symbol.for("react.forward_ref"), Sc = Symbol.for("react.suspense"), _c = Symbol.for("react.suspense_list"), nf = Symbol.for("react.memo"), gn = Symbol.for("react.lazy"), Xy = Symbol.for("react.offscreen"), kp = Symbol.iterator; function Di(e) { return e === null || typeof e != "object" ? null : (e = kp && e[kp] || e["@@iterator"], typeof e == "function" ? e : null); } var ce = Object.assign, fu; function Gi(e) { if (fu === void 0) try { throw Error(); } catch (n) { var t = n.stack.trim().match(/\n( *(at )?)/); fu = t && t[1] || ""; } return ` ` + fu + e; } var hu = !1; function pu(e, t) { if (!e || hu) return ""; hu = !0; var n = Error.prepareStackTrace; Error.prepareStackTrace = void 0; try { if (t) if (t = function() { throw Error(); }, Object.defineProperty(t.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(t, []); } catch (u) { var r = u; } Reflect.construct(e, [], t); } else { try { t.call(); } catch (u) { r = u; } e.call(t.prototype); } else { try { throw Error(); } catch (u) { r = u; } e(); } } catch (u) { if (u && r && typeof u.stack == "string") { for (var i = u.stack.split(` `), s = r.stack.split(` `), o = i.length - 1, a = s.length - 1; 1 <= o && 0 <= a && i[o] !== s[a]; ) a--; for (; 1 <= o && 0 <= a; o--, a--) if (i[o] !== s[a]) { if (o !== 1 || a !== 1) do if (o--, a--, 0 > a || i[o] !== s[a]) { var l = ` ` + i[o].replace(" at new ", " at "); return e.displayName && l.includes("") && (l = l.replace("", e.displayName)), l; } while (1 <= o && 0 <= a); break; } } } finally { hu = !1, Error.prepareStackTrace = n; } return (e = e ? e.displayName || e.name : "") ? Gi(e) : ""; } function BC(e) { switch (e.tag) { case 5: return Gi(e.type); case 16: return Gi("Lazy"); case 13: return Gi("Suspense"); case 19: return Gi("SuspenseList"); case 0: case 2: case 15: return e = pu(e.type, !1), e; case 11: return e = pu(e.type.render, !1), e; case 1: return e = pu(e.type, !0), e; default: return ""; } } function Nc(e) { if (e == null) return null; if (typeof e == "function") return e.displayName || e.name || null; if (typeof e == "string") return e; switch (e) { case zr: return "Fragment"; case Br: return "Portal"; case kc: return "Profiler"; case ef: return "StrictMode"; case Sc: return "Suspense"; case _c: return "SuspenseList"; } if (typeof e == "object") switch (e.$$typeof) { case Yy: return (e.displayName || "Context") + ".Consumer"; case Jy: return (e._context.displayName || "Context") + ".Provider"; case tf: var t = e.render; return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e; case nf: return t = e.displayName || null, t !== null ? t : Nc(e.type) || "Memo"; case gn: t = e._payload, e = e._init; try { return Nc(e(t)); } catch { } } return null; } function zC(e) { var t = e.type; switch (e.tag) { case 24: return "Cache"; case 9: return (t.displayName || "Context") + ".Consumer"; case 10: return (t._context.displayName || "Context") + ".Provider"; case 18: return "DehydratedFragment"; case 11: return e = t.render, e = e.displayName || e.name || "", t.displayName || (e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"); case 7: return "Fragment"; case 5: return t; case 4: return "Portal"; case 3: return "Root"; case 6: return "Text"; case 16: return Nc(t); case 8: return t === ef ? "StrictMode" : "Mode"; case 22: return "Offscreen"; case 12: return "Profiler"; case 21: return "Scope"; case 13: return "Suspense"; case 19: return "SuspenseList"; case 25: return "TracingMarker"; case 1: case 0: case 17: case 2: case 14: case 15: if (typeof t == "function") return t.displayName || t.name || null; if (typeof t == "string") return t; } return null; } function Vn(e) { switch (typeof e) { case "boolean": case "number": case "string": case "undefined": return e; case "object": return e; default: return ""; } } function Zy(e) { var t = e.type; return (e = e.nodeName) && e.toLowerCase() === "input" && (t === "checkbox" || t === "radio"); } function HC(e) { var t = Zy(e) ? "checked" : "value", n = Object.getOwnPropertyDescriptor(e.constructor.prototype, t), r = "" + e[t]; if (!e.hasOwnProperty(t) && typeof n < "u" && typeof n.get == "function" && typeof n.set == "function") { var i = n.get, s = n.set; return Object.defineProperty(e, t, { configurable: !0, get: function() { return i.call(this); }, set: function(o) { r = "" + o, s.call(this, o); } }), Object.defineProperty(e, t, { enumerable: n.enumerable }), { getValue: function() { return r; }, setValue: function(o) { r = "" + o; }, stopTracking: function() { e._valueTracker = null, delete e[t]; } }; } } function uo(e) { e._valueTracker || (e._valueTracker = HC(e)); } function ek(e) { if (!e) return !1; var t = e._valueTracker; if (!t) return !0; var n = t.getValue(), r = ""; return e && (r = Zy(e) ? e.checked ? "true" : "false" : e.value), e = r, e !== n ? (t.setValue(e), !0) : !1; } function va(e) { if (e = e || (typeof document < "u" ? document : void 0), typeof e > "u") return null; try { return e.activeElement || e.body; } catch { return e.body; } } function Ec(e, t) { var n = t.checked; return ce({}, t, { defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: n ?? e._wrapperState.initialChecked }); } function Sp(e, t) { var n = t.defaultValue == null ? "" : t.defaultValue, r = t.checked != null ? t.checked : t.defaultChecked; n = Vn(t.value != null ? t.value : n), e._wrapperState = { initialChecked: r, initialValue: n, controlled: t.type === "checkbox" || t.type === "radio" ? t.checked != null : t.value != null }; } function tk(e, t) { t = t.checked, t != null && Zd(e, "checked", t, !1); } function wc(e, t) { tk(e, t); var n = Vn(t.value), r = t.type; if (n != null) r === "number" ? (n === 0 && e.value === "" || e.value != n) && (e.value = "" + n) : e.value !== "" + n && (e.value = "" + n); else if (r === "submit" || r === "reset") { e.removeAttribute("value"); return; } t.hasOwnProperty("value") ? Ac(e, t.type, n) : t.hasOwnProperty("defaultValue") && Ac(e, t.type, Vn(t.defaultValue)), t.checked == null && t.defaultChecked != null && (e.defaultChecked = !!t.defaultChecked); } function _p(e, t, n) { if (t.hasOwnProperty("value") || t.hasOwnProperty("defaultValue")) { var r = t.type; if (!(r !== "submit" && r !== "reset" || t.value !== void 0 && t.value !== null)) return; t = "" + e._wrapperState.initialValue, n || t === e.value || (e.value = t), e.defaultValue = t; } n = e.name, n !== "" && (e.name = ""), e.defaultChecked = !!e._wrapperState.initialChecked, n !== "" && (e.name = n); } function Ac(e, t, n) { (t !== "number" || va(e.ownerDocument) !== e) && (n == null ? e.defaultValue = "" + e._wrapperState.initialValue : e.defaultValue !== "" + n && (e.defaultValue = "" + n)); } var Wi = Array.isArray; function ei(e, t, n, r) { if (e = e.options, t) { t = {}; for (var i = 0; i < n.length; i++) t["$" + n[i]] = !0; for (n = 0; n < e.length; n++) i = t.hasOwnProperty("$" + e[n].value), e[n].selected !== i && (e[n].selected = i), i && r && (e[n].defaultSelected = !0); } else { for (n = "" + Vn(n), t = null, i = 0; i < e.length; i++) { if (e[i].value === n) { e[i].selected = !0, r && (e[i].defaultSelected = !0); return; } t !== null || e[i].disabled || (t = e[i]); } t !== null && (t.selected = !0); } } function bc(e, t) { if (t.dangerouslySetInnerHTML != null) throw Error(x(91)); return ce({}, t, { value: void 0, defaultValue: void 0, children: "" + e._wrapperState.initialValue }); } function Np(e, t) { var n = t.value; if (n == null) { if (n = t.children, t = t.defaultValue, n != null) { if (t != null) throw Error(x(92)); if (Wi(n)) { if (1 < n.length) throw Error(x(93)); n = n[0]; } t = n; } t == null && (t = ""), n = t; } e._wrapperState = { initialValue: Vn(n) }; } function nk(e, t) { var n = Vn(t.value), r = Vn(t.defaultValue); n != null && (n = "" + n, n !== e.value && (e.value = n), t.defaultValue == null && e.defaultValue !== n && (e.defaultValue = n)), r != null && (e.defaultValue = "" + r); } function Ep(e) { var t = e.textContent; t === e._wrapperState.initialValue && t !== "" && t !== null && (e.value = t); } function rk(e) { switch (e) { case "svg": return "http://www.w3.org/2000/svg"; case "math": return "http://www.w3.org/1998/Math/MathML"; default: return "http://www.w3.org/1999/xhtml"; } } function Cc(e, t) { return e == null || e === "http://www.w3.org/1999/xhtml" ? rk(t) : e === "http://www.w3.org/2000/svg" && t === "foreignObject" ? "http://www.w3.org/1999/xhtml" : e; } var co, ik = function(e) { return typeof MSApp < "u" && MSApp.execUnsafeLocalFunction ? function(t, n, r, i) { MSApp.execUnsafeLocalFunction(function() { return e(t, n, r, i); }); } : e; }(function(e, t) { if (e.namespaceURI !== "http://www.w3.org/2000/svg" || "innerHTML" in e) e.innerHTML = t; else { for (co = co || document.createElement("div"), co.innerHTML = "" + t.valueOf().toString() + "", t = co.firstChild; e.firstChild; ) e.removeChild(e.firstChild); for (; t.firstChild; ) e.appendChild(t.firstChild); } }); function Es(e, t) { if (t) { var n = e.firstChild; if (n && n === e.lastChild && n.nodeType === 3) { n.nodeValue = t; return; } } e.textContent = t; } var rs = { animationIterationCount: !0, aspectRatio: !0, borderImageOutset: !0, borderImageSlice: !0, borderImageWidth: !0, boxFlex: !0, boxFlexGroup: !0, boxOrdinalGroup: !0, columnCount: !0, columns: !0, flex: !0, flexGrow: !0, flexPositive: !0, flexShrink: !0, flexNegative: !0, flexOrder: !0, gridArea: !0, gridRow: !0, gridRowEnd: !0, gridRowSpan: !0, gridRowStart: !0, gridColumn: !0, gridColumnEnd: !0, gridColumnSpan: !0, gridColumnStart: !0, fontWeight: !0, lineClamp: !0, lineHeight: !0, opacity: !0, order: !0, orphans: !0, tabSize: !0, widows: !0, zIndex: !0, zoom: !0, fillOpacity: !0, floodOpacity: !0, stopOpacity: !0, strokeDasharray: !0, strokeDashoffset: !0, strokeMiterlimit: !0, strokeOpacity: !0, strokeWidth: !0 }, GC = ["Webkit", "ms", "Moz", "O"]; Object.keys(rs).forEach(function(e) { GC.forEach(function(t) { t = t + e.charAt(0).toUpperCase() + e.substring(1), rs[t] = rs[e]; }); }); function sk(e, t, n) { return t == null || typeof t == "boolean" || t === "" ? "" : n || typeof t != "number" || t === 0 || rs.hasOwnProperty(e) && rs[e] ? ("" + t).trim() : t + "px"; } function ok(e, t) { e = e.style; for (var n in t) if (t.hasOwnProperty(n)) { var r = n.indexOf("--") === 0, i = sk(n, t[n], r); n === "float" && (n = "cssFloat"), r ? e.setProperty(n, i) : e[n] = i; } } var WC = ce({ menuitem: !0 }, { area: !0, base: !0, br: !0, col: !0, embed: !0, hr: !0, img: !0, input: !0, keygen: !0, link: !0, meta: !0, param: !0, source: !0, track: !0, wbr: !0 }); function Oc(e, t) { if (t) { if (WC[e] && (t.children != null || t.dangerouslySetInnerHTML != null)) throw Error(x(137, e)); if (t.dangerouslySetInnerHTML != null) { if (t.children != null) throw Error(x(60)); if (typeof t.dangerouslySetInnerHTML != "object" || !("__html" in t.dangerouslySetInnerHTML)) throw Error(x(61)); } if (t.style != null && typeof t.style != "object") throw Error(x(62)); } } function Tc(e, t) { if (e.indexOf("-") === -1) return typeof t.is == "string"; switch (e) { case "annotation-xml": case "color-profile": case "font-face": case "font-face-src": case "font-face-uri": case "font-face-format": case "font-face-name": case "missing-glyph": return !1; default: return !0; } } var xc = null; function rf(e) { return e = e.target || e.srcElement || window, e.correspondingUseElement && (e = e.correspondingUseElement), e.nodeType === 3 ? e.parentNode : e; } var Rc = null, ti = null, ni = null; function wp(e) { if (e = Xs(e)) { if (typeof Rc != "function") throw Error(x(280)); var t = e.stateNode; t && (t = wl(t), Rc(e.stateNode, e.type, t)); } } function ak(e) { ti ? ni ? ni.push(e) : ni = [e] : ti = e; } function lk() { if (ti) { var e = ti, t = ni; if (ni = ti = null, wp(e), t) for (e = 0; e < t.length; e++) wp(t[e]); } } function uk(e, t) { return e(t); } function ck() { } var mu = !1; function dk(e, t, n) { if (mu) return e(t, n); mu = !0; try { return uk(e, t, n); } finally { mu = !1, (ti !== null || ni !== null) && (ck(), lk()); } } function ws(e, t) { var n = e.stateNode; if (n === null) return null; var r = wl(n); if (r === null) return null; n = r[t]; e: switch (t) { case "onClick": case "onClickCapture": case "onDoubleClick": case "onDoubleClickCapture": case "onMouseDown": case "onMouseDownCapture": case "onMouseMove": case "onMouseMoveCapture": case "onMouseUp": case "onMouseUpCapture": case "onMouseEnter": (r = !r.disabled) || (e = e.type, r = !(e === "button" || e === "input" || e === "select" || e === "textarea")), e = !r; break e; default: e = !1; } if (e) return null; if (n && typeof n != "function") throw Error(x(231, t, typeof n)); return n; } var Ic = !1; if (ln) try { var $i = {}; Object.defineProperty($i, "passive", { get: function() { Ic = !0; } }), window.addEventListener("test", $i, $i), window.removeEventListener("test", $i, $i); } catch { Ic = !1; } function qC(e, t, n, r, i, s, o, a, l) { var u = Array.prototype.slice.call(arguments, 3); try { t.apply(n, u); } catch (c) { this.onError(c); } } var is = !1, ya = null, ka = !1, Pc = null, KC = { onError: function(e) { is = !0, ya = e; } }; function QC(e, t, n, r, i, s, o, a, l) { is = !1, ya = null, qC.apply(KC, arguments); } function JC(e, t, n, r, i, s, o, a, l) { if (QC.apply(this, arguments), is) { if (is) { var u = ya; is = !1, ya = null; } else throw Error(x(198)); ka || (ka = !0, Pc = u); } } function Or(e) { var t = e, n = e; if (e.alternate) for (; t.return; ) t = t.return; else { e = t; do t = e, t.flags & 4098 && (n = t.return), e = t.return; while (e); } return t.tag === 3 ? n : null; } function fk(e) { if (e.tag === 13) { var t = e.memoizedState; if (t === null && (e = e.alternate, e !== null && (t = e.memoizedState)), t !== null) return t.dehydrated; } return null; } function Ap(e) { if (Or(e) !== e) throw Error(x(188)); } function YC(e) { var t = e.alternate; if (!t) { if (t = Or(e), t === null) throw Error(x(188)); return t !== e ? null : e; } for (var n = e, r = t; ; ) { var i = n.return; if (i === null) break; var s = i.alternate; if (s === null) { if (r = i.return, r !== null) { n = r; continue; } break; } if (i.child === s.child) { for (s = i.child; s; ) { if (s === n) return Ap(i), e; if (s === r) return Ap(i), t; s = s.sibling; } throw Error(x(188)); } if (n.return !== r.return) n = i, r = s; else { for (var o = !1, a = i.child; a; ) { if (a === n) { o = !0, n = i, r = s; break; } if (a === r) { o = !0, r = i, n = s; break; } a = a.sibling; } if (!o) { for (a = s.child; a; ) { if (a === n) { o = !0, n = s, r = i; break; } if (a === r) { o = !0, r = s, n = i; break; } a = a.sibling; } if (!o) throw Error(x(189)); } } if (n.alternate !== r) throw Error(x(190)); } if (n.tag !== 3) throw Error(x(188)); return n.stateNode.current === n ? e : t; } function hk(e) { return e = YC(e), e !== null ? pk(e) : null; } function pk(e) { if (e.tag === 5 || e.tag === 6) return e; for (e = e.child; e !== null; ) { var t = pk(e); if (t !== null) return t; e = e.sibling; } return null; } var mk = at.unstable_scheduleCallback, bp = at.unstable_cancelCallback, XC = at.unstable_shouldYield, ZC = at.unstable_requestPaint, he = at.unstable_now, eO = at.unstable_getCurrentPriorityLevel, sf = at.unstable_ImmediatePriority, gk = at.unstable_UserBlockingPriority, Sa = at.unstable_NormalPriority, tO = at.unstable_LowPriority, vk = at.unstable_IdlePriority, Sl = null, Kt = null; function nO(e) { if (Kt && typeof Kt.onCommitFiberRoot == "function") try { Kt.onCommitFiberRoot(Sl, e, void 0, (e.current.flags & 128) === 128); } catch { } } var It = Math.clz32 ? Math.clz32 : sO, rO = Math.log, iO = Math.LN2; function sO(e) { return e >>>= 0, e === 0 ? 32 : 31 - (rO(e) / iO | 0) | 0; } var fo = 64, ho = 4194304; function qi(e) { switch (e & -e) { 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: 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 e & 4194240; case 4194304: case 8388608: case 16777216: case 33554432: case 67108864: return e & 130023424; case 134217728: return 134217728; case 268435456: return 268435456; case 536870912: return 536870912; case 1073741824: return 1073741824; default: return e; } } function _a(e, t) { var n = e.pendingLanes; if (n === 0) return 0; var r = 0, i = e.suspendedLanes, s = e.pingedLanes, o = n & 268435455; if (o !== 0) { var a = o & ~i; a !== 0 ? r = qi(a) : (s &= o, s !== 0 && (r = qi(s))); } else o = n & ~i, o !== 0 ? r = qi(o) : s !== 0 && (r = qi(s)); if (r === 0) return 0; if (t !== 0 && t !== r && !(t & i) && (i = r & -r, s = t & -t, i >= s || i === 16 && (s & 4194240) !== 0)) return t; if (r & 4 && (r |= n & 16), t = e.entangledLanes, t !== 0) for (e = e.entanglements, t &= r; 0 < t; ) n = 31 - It(t), i = 1 << n, r |= e[n], t &= ~i; return r; } function oO(e, t) { switch (e) { case 1: case 2: case 4: return t + 250; case 8: case 16: case 32: case 64: 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 t + 5e3; case 4194304: case 8388608: case 16777216: case 33554432: case 67108864: return -1; case 134217728: case 268435456: case 536870912: case 1073741824: return -1; default: return -1; } } function aO(e, t) { for (var n = e.suspendedLanes, r = e.pingedLanes, i = e.expirationTimes, s = e.pendingLanes; 0 < s; ) { var o = 31 - It(s), a = 1 << o, l = i[o]; l === -1 ? (!(a & n) || a & r) && (i[o] = oO(a, t)) : l <= t && (e.expiredLanes |= a), s &= ~a; } } function Lc(e) { return e = e.pendingLanes & -1073741825, e !== 0 ? e : e & 1073741824 ? 1073741824 : 0; } function yk() { var e = fo; return fo <<= 1, !(fo & 4194240) && (fo = 64), e; } function gu(e) { for (var t = [], n = 0; 31 > n; n++) t.push(e); return t; } function Js(e, t, n) { e.pendingLanes |= t, t !== 536870912 && (e.suspendedLanes = 0, e.pingedLanes = 0), e = e.eventTimes, t = 31 - It(t), e[t] = n; } function lO(e, t) { var n = e.pendingLanes & ~t; e.pendingLanes = t, e.suspendedLanes = 0, e.pingedLanes = 0, e.expiredLanes &= t, e.mutableReadLanes &= t, e.entangledLanes &= t, t = e.entanglements; var r = e.eventTimes; for (e = e.expirationTimes; 0 < n; ) { var i = 31 - It(n), s = 1 << i; t[i] = 0, r[i] = -1, e[i] = -1, n &= ~s; } } function of(e, t) { var n = e.entangledLanes |= t; for (e = e.entanglements; n; ) { var r = 31 - It(n), i = 1 << r; i & t | e[r] & t && (e[r] |= t), n &= ~i; } } var Z = 0; function kk(e) { return e &= -e, 1 < e ? 4 < e ? e & 268435455 ? 16 : 536870912 : 4 : 1; } var Sk, af, _k, Nk, Ek, Fc = !1, po = [], On = null, Tn = null, xn = null, As = /* @__PURE__ */ new Map(), bs = /* @__PURE__ */ new Map(), kn = [], uO = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "); function Cp(e, t) { switch (e) { case "focusin": case "focusout": On = null; break; case "dragenter": case "dragleave": Tn = null; break; case "mouseover": case "mouseout": xn = null; break; case "pointerover": case "pointerout": As.delete(t.pointerId); break; case "gotpointercapture": case "lostpointercapture": bs.delete(t.pointerId); } } function Mi(e, t, n, r, i, s) { return e === null || e.nativeEvent !== s ? (e = { blockedOn: t, domEventName: n, eventSystemFlags: r, nativeEvent: s, targetContainers: [i] }, t !== null && (t = Xs(t), t !== null && af(t)), e) : (e.eventSystemFlags |= r, t = e.targetContainers, i !== null && t.indexOf(i) === -1 && t.push(i), e); } function cO(e, t, n, r, i) { switch (t) { case "focusin": return On = Mi(On, e, t, n, r, i), !0; case "dragenter": return Tn = Mi(Tn, e, t, n, r, i), !0; case "mouseover": return xn = Mi(xn, e, t, n, r, i), !0; case "pointerover": var s = i.pointerId; return As.set(s, Mi(As.get(s) || null, e, t, n, r, i)), !0; case "gotpointercapture": return s = i.pointerId, bs.set(s, Mi(bs.get(s) || null, e, t, n, r, i)), !0; } return !1; } function wk(e) { var t = ir(e.target); if (t !== null) { var n = Or(t); if (n !== null) { if (t = n.tag, t === 13) { if (t = fk(n), t !== null) { e.blockedOn = t, Ek(e.priority, function() { _k(n); }); return; } } else if (t === 3 && n.stateNode.current.memoizedState.isDehydrated) { e.blockedOn = n.tag === 3 ? n.stateNode.containerInfo : null; return; } } } e.blockedOn = null; } function jo(e) { if (e.blockedOn !== null) return !1; for (var t = e.targetContainers; 0 < t.length; ) { var n = Dc(e.domEventName, e.eventSystemFlags, t[0], e.nativeEvent); if (n === null) { n = e.nativeEvent; var r = new n.constructor(n.type, n); xc = r, n.target.dispatchEvent(r), xc = null; } else return t = Xs(n), t !== null && af(t), e.blockedOn = n, !1; t.shift(); } return !0; } function Op(e, t, n) { jo(e) && n.delete(t); } function dO() { Fc = !1, On !== null && jo(On) && (On = null), Tn !== null && jo(Tn) && (Tn = null), xn !== null && jo(xn) && (xn = null), As.forEach(Op), bs.forEach(Op); } function Ui(e, t) { e.blockedOn === t && (e.blockedOn = null, Fc || (Fc = !0, at.unstable_scheduleCallback(at.unstable_NormalPriority, dO))); } function Cs(e) { function t(i) { return Ui(i, e); } if (0 < po.length) { Ui(po[0], e); for (var n = 1; n < po.length; n++) { var r = po[n]; r.blockedOn === e && (r.blockedOn = null); } } for (On !== null && Ui(On, e), Tn !== null && Ui(Tn, e), xn !== null && Ui(xn, e), As.forEach(t), bs.forEach(t), n = 0; n < kn.length; n++) r = kn[n], r.blockedOn === e && (r.blockedOn = null); for (; 0 < kn.length && (n = kn[0], n.blockedOn === null); ) wk(n), n.blockedOn === null && kn.shift(); } var ri = hn.ReactCurrentBatchConfig, Na = !0; function fO(e, t, n, r) { var i = Z, s = ri.transition; ri.transition = null; try { Z = 1, lf(e, t, n, r); } finally { Z = i, ri.transition = s; } } function hO(e, t, n, r) { var i = Z, s = ri.transition; ri.transition = null; try { Z = 4, lf(e, t, n, r); } finally { Z = i, ri.transition = s; } } function lf(e, t, n, r) { if (Na) { var i = Dc(e, t, n, r); if (i === null) bu(e, t, r, Ea, n), Cp(e, r); else if (cO(i, e, t, n, r)) r.stopPropagation(); else if (Cp(e, r), t & 4 && -1 < uO.indexOf(e)) { for (; i !== null; ) { var s = Xs(i); if (s !== null && Sk(s), s = Dc(e, t, n, r), s === null && bu(e, t, r, Ea, n), s === i) break; i = s; } i !== null && r.stopPropagation(); } else bu(e, t, r, null, n); } } var Ea = null; function Dc(e, t, n, r) { if (Ea = null, e = rf(r), e = ir(e), e !== null) if (t = Or(e), t === null) e = null; else if (n = t.tag, n === 13) { if (e = fk(t), e !== null) return e; e = null; } else if (n === 3) { if (t.stateNode.current.memoizedState.isDehydrated) return t.tag === 3 ? t.stateNode.containerInfo : null; e = null; } else t !== e && (e = null); return Ea = e, null; } function Ak(e) { switch (e) { case "cancel": case "click": case "close": case "contextmenu": case "copy": case "cut": case "auxclick": case "dblclick": case "dragend": case "dragstart": case "drop": case "focusin": case "focusout": case "input": case "invalid": case "keydown": case "keypress": case "keyup": case "mousedown": case "mouseup": case "paste": case "pause": case "play": case "pointercancel": case "pointerdown": case "pointerup": case "ratechange": case "reset": case "resize": case "seeked": case "submit": case "touchcancel": case "touchend": case "touchstart": case "volumechange": case "change": case "selectionchange": case "textInput": case "compositionstart": case "compositionend": case "compositionupdate": case "beforeblur": case "afterblur": case "beforeinput": case "blur": case "fullscreenchange": case "focus": case "hashchange": case "popstate": case "select": case "selectstart": return 1; case "drag": case "dragenter": case "dragexit": case "dragleave": case "dragover": case "mousemove": case "mouseout": case "mouseover": case "pointermove": case "pointerout": case "pointerover": case "scroll": case "toggle": case "touchmove": case "wheel": case "mouseenter": case "mouseleave": case "pointerenter": case "pointerleave": return 4; case "message": switch (eO()) { case sf: return 1; case gk: return 4; case Sa: case tO: return 16; case vk: return 536870912; default: return 16; } default: return 16; } } var En = null, uf = null, Bo = null; function bk() { if (Bo) return Bo; var e, t = uf, n = t.length, r, i = "value" in En ? En.value : En.textContent, s = i.length; for (e = 0; e < n && t[e] === i[e]; e++) ; var o = n - e; for (r = 1; r <= o && t[n - r] === i[s - r]; r++) ; return Bo = i.slice(e, 1 < r ? 1 - r : void 0); } function zo(e) { var t = e.keyCode; return "charCode" in e ? (e = e.charCode, e === 0 && t === 13 && (e = 13)) : e = t, e === 10 && (e = 13), 32 <= e || e === 13 ? e : 0; } function mo() { return !0; } function Tp() { return !1; } function ct(e) { function t(n, r, i, s, o) { this._reactName = n, this._targetInst = i, this.type = r, this.nativeEvent = s, this.target = o, this.currentTarget = null; for (var a in e) e.hasOwnProperty(a) && (n = e[a], this[a] = n ? n(s) : s[a]); return this.isDefaultPrevented = (s.defaultPrevented != null ? s.defaultPrevented : s.returnValue === !1) ? mo : Tp, this.isPropagationStopped = Tp, this; } return ce(t.prototype, { preventDefault: function() { this.defaultPrevented = !0; var n = this.nativeEvent; n && (n.preventDefault ? n.preventDefault() : typeof n.returnValue != "unknown" && (n.returnValue = !1), this.isDefaultPrevented = mo); }, stopPropagation: function() { var n = this.nativeEvent; n && (n.stopPropagation ? n.stopPropagation() : typeof n.cancelBubble != "unknown" && (n.cancelBubble = !0), this.isPropagationStopped = mo); }, persist: function() { }, isPersistent: mo }), t; } var Ci = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function(e) { return e.timeStamp || Date.now(); }, defaultPrevented: 0, isTrusted: 0 }, cf = ct(Ci), Ys = ce({}, Ci, { view: 0, detail: 0 }), pO = ct(Ys), vu, yu, Vi, _l = ce({}, Ys, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: df, button: 0, buttons: 0, relatedTarget: function(e) { return e.relatedTarget === void 0 ? e.fromElement === e.srcElement ? e.toElement : e.fromElement : e.relatedTarget; }, movementX: function(e) { return "movementX" in e ? e.movementX : (e !== Vi && (Vi && e.type === "mousemove" ? (vu = e.screenX - Vi.screenX, yu = e.screenY - Vi.screenY) : yu = vu = 0, Vi = e), vu); }, movementY: function(e) { return "movementY" in e ? e.movementY : yu; } }), xp = ct(_l), mO = ce({}, _l, { dataTransfer: 0 }), gO = ct(mO), vO = ce({}, Ys, { relatedTarget: 0 }), ku = ct(vO), yO = ce({}, Ci, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }), kO = ct(yO), SO = ce({}, Ci, { clipboardData: function(e) { return "clipboardData" in e ? e.clipboardData : window.clipboardData; } }), _O = ct(SO), NO = ce({}, Ci, { data: 0 }), Rp = ct(NO), EO = { Esc: "Escape", Spacebar: " ", Left: "ArrowLeft", Up: "ArrowUp", Right: "ArrowRight", Down: "ArrowDown", Del: "Delete", Win: "OS", Menu: "ContextMenu", Apps: "ContextMenu", Scroll: "ScrollLock", MozPrintableKey: "Unidentified" }, wO = { 8: "Backspace", 9: "Tab", 12: "Clear", 13: "Enter", 16: "Shift", 17: "Control", 18: "Alt", 19: "Pause", 20: "CapsLock", 27: "Escape", 32: " ", 33: "PageUp", 34: "PageDown", 35: "End", 36: "Home", 37: "ArrowLeft", 38: "ArrowUp", 39: "ArrowRight", 40: "ArrowDown", 45: "Insert", 46: "Delete", 112: "F1", 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "NumLock", 145: "ScrollLock", 224: "Meta" }, AO = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" }; function bO(e) { var t = this.nativeEvent; return t.getModifierState ? t.getModifierState(e) : (e = AO[e]) ? !!t[e] : !1; } function df() { return bO; } var CO = ce({}, Ys, { key: function(e) { if (e.key) { var t = EO[e.key] || e.key; if (t !== "Unidentified") return t; } return e.type === "keypress" ? (e = zo(e), e === 13 ? "Enter" : String.fromCharCode(e)) : e.type === "keydown" || e.type === "keyup" ? wO[e.keyCode] || "Unidentified" : ""; }, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: df, charCode: function(e) { return e.type === "keypress" ? zo(e) : 0; }, keyCode: function(e) { return e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0; }, which: function(e) { return e.type === "keypress" ? zo(e) : e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0; } }), OO = ct(CO), TO = ce({}, _l, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }), Ip = ct(TO), xO = ce({}, Ys, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: df }), RO = ct(xO), IO = ce({}, Ci, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }), PO = ct(IO), LO = ce({}, _l, { deltaX: function(e) { return "deltaX" in e ? e.deltaX : "wheelDeltaX" in e ? -e.wheelDeltaX : 0; }, deltaY: function(e) { return "deltaY" in e ? e.deltaY : "wheelDeltaY" in e ? -e.wheelDeltaY : "wheelDelta" in e ? -e.wheelDelta : 0; }, deltaZ: 0, deltaMode: 0 }), FO = ct(LO), DO = [9, 13, 27, 32], ff = ln && "CompositionEvent" in window, ss = null; ln && "documentMode" in document && (ss = document.documentMode); var $O = ln && "TextEvent" in window && !ss, Ck = ln && (!ff || ss && 8 < ss && 11 >= ss), Pp = " ", Lp = !1; function Ok(e, t) { switch (e) { case "keyup": return DO.indexOf(t.keyCode) !== -1; case "keydown": return t.keyCode !== 229; case "keypress": case "mousedown": case "focusout": return !0; default: return !1; } } function Tk(e) { return e = e.detail, typeof e == "object" && "data" in e ? e.data : null; } var Hr = !1; function MO(e, t) { switch (e) { case "compositionend": return Tk(t); case "keypress": return t.which !== 32 ? null : (Lp = !0, Pp); case "textInput": return e = t.data, e === Pp && Lp ? null : e; default: return null; } } function UO(e, t) { if (Hr) return e === "compositionend" || !ff && Ok(e, t) ? (e = bk(), Bo = uf = En = null, Hr = !1, e) : null; switch (e) { case "paste": return null; case "keypress": if (!(t.ctrlKey || t.altKey || t.metaKey) || t.ctrlKey && t.altKey) { if (t.char && 1 < t.char.length) return t.char; if (t.which) return String.fromCharCode(t.which); } return null; case "compositionend": return Ck && t.locale !== "ko" ? null : t.data; default: return null; } } var VO = { color: !0, date: !0, datetime: !0, "datetime-local": !0, email: !0, month: !0, number: !0, password: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0 }; function Fp(e) { var t = e && e.nodeName && e.nodeName.toLowerCase(); return t === "input" ? !!VO[e.type] : t === "textarea"; } function xk(e, t, n, r) { ak(r), t = wa(t, "onChange"), 0 < t.length && (n = new cf("onChange", "change", null, n, r), e.push({ event: n, listeners: t })); } var os = null, Os = null; function jO(e) { jk(e, 0); } function Nl(e) { var t = qr(e); if (ek(t)) return e; } function BO(e, t) { if (e === "change") return t; } var Rk = !1; if (ln) { var Su; if (ln) { var _u = "oninput" in document; if (!_u) { var Dp = document.createElement("div"); Dp.setAttribute("oninput", "return;"), _u = typeof Dp.oninput == "function"; } Su = _u; } else Su = !1; Rk = Su && (!document.documentMode || 9 < document.documentMode); } function $p() { os && (os.detachEvent("onpropertychange", Ik), Os = os = null); } function Ik(e) { if (e.propertyName === "value" && Nl(Os)) { var t = []; xk(t, Os, e, rf(e)), dk(jO, t); } } function zO(e, t, n) { e === "focusin" ? ($p(), os = t, Os = n, os.attachEvent("onpropertychange", Ik)) : e === "focusout" && $p(); } function HO(e) { if (e === "selectionchange" || e === "keyup" || e === "keydown") return Nl(Os); } function GO(e, t) { if (e === "click") return Nl(t); } function WO(e, t) { if (e === "input" || e === "change") return Nl(t); } function qO(e, t) { return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t; } var Dt = typeof Object.is == "function" ? Object.is : qO; function Ts(e, t) { if (Dt(e, t)) return !0; if (typeof e != "object" || e === null || typeof t != "object" || t === null) return !1; var n = Object.keys(e), r = Object.keys(t); if (n.length !== r.length) return !1; for (r = 0; r < n.length; r++) { var i = n[r]; if (!yc.call(t, i) || !Dt(e[i], t[i])) return !1; } return !0; } function Mp(e) { for (; e && e.firstChild; ) e = e.firstChild; return e; } function Up(e, t) { var n = Mp(e); e = 0; for (var r; n; ) { if (n.nodeType === 3) { if (r = e + n.textContent.length, e <= t && r >= t) return { node: n, offset: t - e }; e = r; } e: { for (; n; ) { if (n.nextSibling) { n = n.nextSibling; break e; } n = n.parentNode; } n = void 0; } n = Mp(n); } } function Pk(e, t) { return e && t ? e === t ? !0 : e && e.nodeType === 3 ? !1 : t && t.nodeType === 3 ? Pk(e, t.parentNode) : "contains" in e ? e.contains(t) : e.compareDocumentPosition ? !!(e.compareDocumentPosition(t) & 16) : !1 : !1; } function Lk() { for (var e = window, t = va(); t instanceof e.HTMLIFrameElement; ) { try { var n = typeof t.contentWindow.location.href == "string"; } catch { n = !1; } if (n) e = t.contentWindow; else break; t = va(e.document); } return t; } function hf(e) { var t = e && e.nodeName && e.nodeName.toLowerCase(); return t && (t === "input" && (e.type === "text" || e.type === "search" || e.type === "tel" || e.type === "url" || e.type === "password") || t === "textarea" || e.contentEditable === "true"); } function KO(e) { var t = Lk(), n = e.focusedElem, r = e.selectionRange; if (t !== n && n && n.ownerDocument && Pk(n.ownerDocument.documentElement, n)) { if (r !== null && hf(n)) { if (t = r.start, e = r.end, e === void 0 && (e = t), "selectionStart" in n) n.selectionStart = t, n.selectionEnd = Math.min(e, n.value.length); else if (e = (t = n.ownerDocument || document) && t.defaultView || window, e.getSelection) { e = e.getSelection(); var i = n.textContent.length, s = Math.min(r.start, i); r = r.end === void 0 ? s : Math.min(r.end, i), !e.extend && s > r && (i = r, r = s, s = i), i = Up(n, s); var o = Up( n, r ); i && o && (e.rangeCount !== 1 || e.anchorNode !== i.node || e.anchorOffset !== i.offset || e.focusNode !== o.node || e.focusOffset !== o.offset) && (t = t.createRange(), t.setStart(i.node, i.offset), e.removeAllRanges(), s > r ? (e.addRange(t), e.extend(o.node, o.offset)) : (t.setEnd(o.node, o.offset), e.addRange(t))); } } for (t = [], e = n; e = e.parentNode; ) e.nodeType === 1 && t.push({ element: e, left: e.scrollLeft, top: e.scrollTop }); for (typeof n.focus == "function" && n.focus(), n = 0; n < t.length; n++) e = t[n], e.element.scrollLeft = e.left, e.element.scrollTop = e.top; } } var QO = ln && "documentMode" in document && 11 >= document.documentMode, Gr = null, $c = null, as = null, Mc = !1; function Vp(e, t, n) { var r = n.window === n ? n.document : n.nodeType === 9 ? n : n.ownerDocument; Mc || Gr == null || Gr !== va(r) || (r = Gr, "selectionStart" in r && hf(r) ? r = { start: r.selectionStart, end: r.selectionEnd } : (r = (r.ownerDocument && r.ownerDocument.defaultView || window).getSelection(), r = { anchorNode: r.anchorNode, anchorOffset: r.anchorOffset, focusNode: r.focusNode, focusOffset: r.focusOffset }), as && Ts(as, r) || (as = r, r = wa($c, "onSelect"), 0 < r.length && (t = new cf("onSelect", "select", null, t, n), e.push({ event: t, listeners: r }), t.target = Gr))); } function go(e, t) { var n = {}; return n[e.toLowerCase()] = t.toLowerCase(), n["Webkit" + e] = "webkit" + t, n["Moz" + e] = "moz" + t, n; } var Wr = { animationend: go("Animation", "AnimationEnd"), animationiteration: go("Animation", "AnimationIteration"), animationstart: go("Animation", "AnimationStart"), transitionend: go("Transition", "TransitionEnd") }, Nu = {}, Fk = {}; ln && (Fk = document.createElement("div").style, "AnimationEvent" in window || (delete Wr.animationend.animation, delete Wr.animationiteration.animation, delete Wr.animationstart.animation), "TransitionEvent" in window || delete Wr.transitionend.transition); function El(e) { if (Nu[e]) return Nu[e]; if (!Wr[e]) return e; var t = Wr[e], n; for (n in t) if (t.hasOwnProperty(n) && n in Fk) return Nu[e] = t[n]; return e; } var Dk = El("animationend"), $k = El("animationiteration"), Mk = El("animationstart"), Uk = El("transitionend"), Vk = /* @__PURE__ */ new Map(), jp = "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" "); function Hn(e, t) { Vk.set(e, t), Cr(t, [e]); } for (var Eu = 0; Eu < jp.length; Eu++) { var wu = jp[Eu], JO = wu.toLowerCase(), YO = wu[0].toUpperCase() + wu.slice(1); Hn(JO, "on" + YO); } Hn(Dk, "onAnimationEnd"); Hn($k, "onAnimationIteration"); Hn(Mk, "onAnimationStart"); Hn("dblclick", "onDoubleClick"); Hn("focusin", "onFocus"); Hn("focusout", "onBlur"); Hn(Uk, "onTransitionEnd"); di("onMouseEnter", ["mouseout", "mouseover"]); di("onMouseLeave", ["mouseout", "mouseover"]); di("onPointerEnter", ["pointerout", "pointerover"]); di("onPointerLeave", ["pointerout", "pointerover"]); Cr("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" ")); Cr("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")); Cr("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]); Cr("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" ")); Cr("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" ")); Cr("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" ")); var Ki = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "), XO = new Set("cancel close invalid load scroll toggle".split(" ").concat(Ki)); function Bp(e, t, n) { var r = e.type || "unknown-event"; e.currentTarget = n, JC(r, t, void 0, e), e.currentTarget = null; } function jk(e, t) { t = (t & 4) !== 0; for (var n = 0; n < e.length; n++) { var r = e[n], i = r.event; r = r.listeners; e: { var s = void 0; if (t) for (var o = r.length - 1; 0 <= o; o--) { var a = r[o], l = a.instance, u = a.currentTarget; if (a = a.listener, l !== s && i.isPropagationStopped()) break e; Bp(i, a, u), s = l; } else for (o = 0; o < r.length; o++) { if (a = r[o], l = a.instance, u = a.currentTarget, a = a.listener, l !== s && i.isPropagationStopped()) break e; Bp(i, a, u), s = l; } } } if (ka) throw e = Pc, ka = !1, Pc = null, e; } function ne(e, t) { var n = t[zc]; n === void 0 && (n = t[zc] = /* @__PURE__ */ new Set()); var r = e + "__bubble"; n.has(r) || (Bk(t, e, 2, !1), n.add(r)); } function Au(e, t, n) { var r = 0; t && (r |= 4), Bk(n, e, r, t); } var vo = "_reactListening" + Math.random().toString(36).slice(2); function xs(e) { if (!e[vo]) { e[vo] = !0, Qy.forEach(function(n) { n !== "selectionchange" && (XO.has(n) || Au(n, !1, e), Au(n, !0, e)); }); var t = e.nodeType === 9 ? e : e.ownerDocument; t === null || t[vo] || (t[vo] = !0, Au("selectionchange", !1, t)); } } function Bk(e, t, n, r) { switch (Ak(t)) { case 1: var i = fO; break; case 4: i = hO; break; default: i = lf; } n = i.bind(null, t, n, e), i = void 0, !Ic || t !== "touchstart" && t !== "touchmove" && t !== "wheel" || (i = !0), r ? i !== void 0 ? e.addEventListener(t, n, { capture: !0, passive: i }) : e.addEventListener(t, n, !0) : i !== void 0 ? e.addEventListener(t, n, { passive: i }) : e.addEventListener(t, n, !1); } function bu(e, t, n, r, i) { var s = r; if (!(t & 1) && !(t & 2) && r !== null) e: for (; ; ) { if (r === null) return; var o = r.tag; if (o === 3 || o === 4) { var a = r.stateNode.containerInfo; if (a === i || a.nodeType === 8 && a.parentNode === i) break; if (o === 4) for (o = r.return; o !== null; ) { var l = o.tag; if ((l === 3 || l === 4) && (l = o.stateNode.containerInfo, l === i || l.nodeType === 8 && l.parentNode === i)) return; o = o.return; } for (; a !== null; ) { if (o = ir(a), o === null) return; if (l = o.tag, l === 5 || l === 6) { r = s = o; continue e; } a = a.parentNode; } } r = r.return; } dk(function() { var u = s, c = rf(n), d = []; e: { var f = Vk.get(e); if (f !== void 0) { var v = cf, g = e; switch (e) { case "keypress": if (zo(n) === 0) break e; case "keydown": case "keyup": v = OO; break; case "focusin": g = "focus", v = ku; break; case "focusout": g = "blur", v = ku; break; case "beforeblur": case "afterblur": v = ku; break; case "click": if (n.button === 2) break e; case "auxclick": case "dblclick": case "mousedown": case "mousemove": case "mouseup": case "mouseout": case "mouseover": case "contextmenu": v = xp; break; case "drag": case "dragend": case "dragenter": case "dragexit": case "dragleave": case "dragover": case "dragstart": case "drop": v = gO; break; case "touchcancel": case "touchend": case "touchmove": case "touchstart": v = RO; break; case Dk: case $k: case Mk: v = kO; break; case Uk: v = PO; break; case "scroll": v = pO; break; case "wheel": v = FO; break; case "copy": case "cut": case "paste": v = _O; break; case "gotpointercapture": case "lostpointercapture": case "pointercancel": case "pointerdown": case "pointermove": case "pointerout": case "pointerover": case "pointerup": v = Ip; } var m = (t & 4) !== 0, k = !m && e === "scroll", h = m ? f !== null ? f + "Capture" : null : f; m = []; for (var p = u, y; p !== null; ) { y = p; var S = y.stateNode; if (y.tag === 5 && S !== null && (y = S, h !== null && (S = ws(p, h), S != null && m.push(Rs(p, S, y)))), k) break; p = p.return; } 0 < m.length && (f = new v(f, g, null, n, c), d.push({ event: f, listeners: m })); } } if (!(t & 7)) { e: { if (f = e === "mouseover" || e === "pointerover", v = e === "mouseout" || e === "pointerout", f && n !== xc && (g = n.relatedTarget || n.fromElement) && (ir(g) || g[un])) break e; if ((v || f) && (f = c.window === c ? c : (f = c.ownerDocument) ? f.defaultView || f.parentWindow : window, v ? (g = n.relatedTarget || n.toElement, v = u, g = g ? ir(g) : null, g !== null && (k = Or(g), g !== k || g.tag !== 5 && g.tag !== 6) && (g = null)) : (v = null, g = u), v !== g)) { if (m = xp, S = "onMouseLeave", h = "onMouseEnter", p = "mouse", (e === "pointerout" || e === "pointerover") && (m = Ip, S = "onPointerLeave", h = "onPointerEnter", p = "pointer"), k = v == null ? f : qr(v), y = g == null ? f : qr(g), f = new m(S, p + "leave", v, n, c), f.target = k, f.relatedTarget = y, S = null, ir(c) === u && (m = new m(h, p + "enter", g, n, c), m.target = y, m.relatedTarget = k, S = m), k = S, v && g) t: { for (m = v, h = g, p = 0, y = m; y; y = Lr(y)) p++; for (y = 0, S = h; S; S = Lr(S)) y++; for (; 0 < p - y; ) m = Lr(m), p--; for (; 0 < y - p; ) h = Lr(h), y--; for (; p--; ) { if (m === h || h !== null && m === h.alternate) break t; m = Lr(m), h = Lr(h); } m = null; } else m = null; v !== null && zp(d, f, v, m, !1), g !== null && k !== null && zp(d, k, g, m, !0); } } e: { if (f = u ? qr(u) : window, v = f.nodeName && f.nodeName.toLowerCase(), v === "select" || v === "input" && f.type === "file") var N = BO; else if (Fp(f)) if (Rk) N = WO; else { N = HO; var E = zO; } else (v = f.nodeName) && v.toLowerCase() === "input" && (f.type === "checkbox" || f.type === "radio") && (N = GO); if (N && (N = N(e, u))) { xk(d, N, n, c); break e; } E && E(e, f, u), e === "focusout" && (E = f._wrapperState) && E.controlled && f.type === "number" && Ac(f, "number", f.value); } switch (E = u ? qr(u) : window, e) { case "focusin": (Fp(E) || E.contentEditable === "true") && (Gr = E, $c = u, as = null); break; case "focusout": as = $c = Gr = null; break; case "mousedown": Mc = !0; break; case "contextmenu": case "mouseup": case "dragend": Mc = !1, Vp(d, n, c); break; case "selectionchange": if (QO) break; case "keydown": case "keyup": Vp(d, n, c); } var A; if (ff) e: { switch (e) { case "compositionstart": var b = "onCompositionStart"; break e; case "compositionend": b = "onCompositionEnd"; break e; case "compositionupdate": b = "onCompositionUpdate"; break e; } b = void 0; } else Hr ? Ok(e, n) && (b = "onCompositionEnd") : e === "keydown" && n.keyCode === 229 && (b = "onCompositionStart"); b && (Ck && n.locale !== "ko" && (Hr || b !== "onCompositionStart" ? b === "onCompositionEnd" && Hr && (A = bk()) : (En = c, uf = "value" in En ? En.value : En.textContent, Hr = !0)), E = wa(u, b), 0 < E.length && (b = new Rp(b, e, null, n, c), d.push({ event: b, listeners: E }), A ? b.data = A : (A = Tk(n), A !== null && (b.data = A)))), (A = $O ? MO(e, n) : UO(e, n)) && (u = wa(u, "onBeforeInput"), 0 < u.length && (c = new Rp("onBeforeInput", "beforeinput", null, n, c), d.push({ event: c, listeners: u }), c.data = A)); } jk(d, t); }); } function Rs(e, t, n) { return { instance: e, listener: t, currentTarget: n }; } function wa(e, t) { for (var n = t + "Capture", r = []; e !== null; ) { var i = e, s = i.stateNode; i.tag === 5 && s !== null && (i = s, s = ws(e, n), s != null && r.unshift(Rs(e, s, i)), s = ws(e, t), s != null && r.push(Rs(e, s, i))), e = e.return; } return r; } function Lr(e) { if (e === null) return null; do e = e.return; while (e && e.tag !== 5); return e || null; } function zp(e, t, n, r, i) { for (var s = t._reactName, o = []; n !== null && n !== r; ) { var a = n, l = a.alternate, u = a.stateNode; if (l !== null && l === r) break; a.tag === 5 && u !== null && (a = u, i ? (l = ws(n, s), l != null && o.unshift(Rs(n, l, a))) : i || (l = ws(n, s), l != null && o.push(Rs(n, l, a)))), n = n.return; } o.length !== 0 && e.push({ event: t, listeners: o }); } var ZO = /\r\n?/g, eT = /\u0000|\uFFFD/g; function Hp(e) { return (typeof e == "string" ? e : "" + e).replace(ZO, ` `).replace(eT, ""); } function yo(e, t, n) { if (t = Hp(t), Hp(e) !== t && n) throw Error(x(425)); } function Aa() { } var Uc = null, Vc = null; function jc(e, t) { return e === "textarea" || e === "noscript" || typeof t.children == "string" || typeof t.children == "number" || typeof t.dangerouslySetInnerHTML == "object" && t.dangerouslySetInnerHTML !== null && t.dangerouslySetInnerHTML.__html != null; } var Bc = typeof setTimeout == "function" ? setTimeout : void 0, tT = typeof clearTimeout == "function" ? clearTimeout : void 0, Gp = typeof Promise == "function" ? Promise : void 0, nT = typeof queueMicrotask == "function" ? queueMicrotask : typeof Gp < "u" ? function(e) { return Gp.resolve(null).then(e).catch(rT); } : Bc; function rT(e) { setTimeout(function() { throw e; }); } function Cu(e, t) { var n = t, r = 0; do { var i = n.nextSibling; if (e.removeChild(n), i && i.nodeType === 8) if (n = i.data, n === "/$") { if (r === 0) { e.removeChild(i), Cs(t); return; } r--; } else n !== "$" && n !== "$?" && n !== "$!" || r++; n = i; } while (n); Cs(t); } function Rn(e) { for (; e != null; e = e.nextSibling) { var t = e.nodeType; if (t === 1 || t === 3) break; if (t === 8) { if (t = e.data, t === "$" || t === "$!" || t === "$?") break; if (t === "/$") return null; } } return e; } function Wp(e) { e = e.previousSibling; for (var t = 0; e; ) { if (e.nodeType === 8) { var n = e.data; if (n === "$" || n === "$!" || n === "$?") { if (t === 0) return e; t--; } else n === "/$" && t++; } e = e.previousSibling; } return null; } var Oi = Math.random().toString(36).slice(2), jt = "__reactFiber$" + Oi, Is = "__reactProps$" + Oi, un = "__reactContainer$" + Oi, zc = "__reactEvents$" + Oi, iT = "__reactListeners$" + Oi, sT = "__reactHandles$" + Oi; function ir(e) { var t = e[jt]; if (t) return t; for (var n = e.parentNode; n; ) { if (t = n[un] || n[jt]) { if (n = t.alternate, t.child !== null || n !== null && n.child !== null) for (e = Wp(e); e !== null; ) { if (n = e[jt]) return n; e = Wp(e); } return t; } e = n, n = e.parentNode; } return null; } function Xs(e) { return e = e[jt] || e[un], !e || e.tag !== 5 && e.tag !== 6 && e.tag !== 13 && e.tag !== 3 ? null : e; } function qr(e) { if (e.tag === 5 || e.tag === 6) return e.stateNode; throw Error(x(33)); } function wl(e) { return e[Is] || null; } var Hc = [], Kr = -1; function Gn(e) { return { current: e }; } function ie(e) { 0 > Kr || (e.current = Hc[Kr], Hc[Kr] = null, Kr--); } function ee(e, t) { Kr++, Hc[Kr] = e.current, e.current = t; } var jn = {}, Pe = Gn(jn), We = Gn(!1), vr = jn; function fi(e, t) { var n = e.type.contextTypes; if (!n) return jn; var r = e.stateNode; if (r && r.__reactInternalMemoizedUnmaskedChildContext === t) return r.__reactInternalMemoizedMaskedChildContext; var i = {}, s; for (s in n) i[s] = t[s]; return r && (e = e.stateNode, e.__reactInternalMemoizedUnmaskedChildContext = t, e.__reactInternalMemoizedMaskedChildContext = i), i; } function qe(e) { return e = e.childContextTypes, e != null; } function ba() { ie(We), ie(Pe); } function qp(e, t, n) { if (Pe.current !== jn) throw Error(x(168)); ee(Pe, t), ee(We, n); } function zk(e, t, n) { var r = e.stateNode; if (t = t.childContextTypes, typeof r.getChildContext != "function") return n; r = r.getChildContext(); for (var i in r) if (!(i in t)) throw Error(x(108, zC(e) || "Unknown", i)); return ce({}, n, r); } function Ca(e) { return e = (e = e.stateNode) && e.__reactInternalMemoizedMergedChildContext || jn, vr = Pe.current, ee(Pe, e), ee(We, We.current), !0; } function Kp(e, t, n) { var r = e.stateNode; if (!r) throw Error(x(169)); n ? (e = zk(e, t, vr), r.__reactInternalMemoizedMergedChildContext = e, ie(We), ie(Pe), ee(Pe, e)) : ie(We), ee(We, n); } var Yt = null, Al = !1, Ou = !1; function Hk(e) { Yt === null ? Yt = [e] : Yt.push(e); } function oT(e) { Al = !0, Hk(e); } function Wn() { if (!Ou && Yt !== null) { Ou = !0; var e = 0, t = Z; try { var n = Yt; for (Z = 1; e < n.length; e++) { var r = n[e]; do r = r(!0); while (r !== null); } Yt = null, Al = !1; } catch (i) { throw Yt !== null && (Yt = Yt.slice(e + 1)), mk(sf, Wn), i; } finally { Z = t, Ou = !1; } } return null; } var Qr = [], Jr = 0, Oa = null, Ta = 0, ft = [], ht = 0, yr = null, tn = 1, nn = ""; function Xn(e, t) { Qr[Jr++] = Ta, Qr[Jr++] = Oa, Oa = e, Ta = t; } function Gk(e, t, n) { ft[ht++] = tn, ft[ht++] = nn, ft[ht++] = yr, yr = e; var r = tn; e = nn; var i = 32 - It(r) - 1; r &= ~(1 << i), n += 1; var s = 32 - It(t) + i; if (30 < s) { var o = i - i % 5; s = (r & (1 << o) - 1).toString(32), r >>= o, i -= o, tn = 1 << 32 - It(t) + i | n << i | r, nn = s + e; } else tn = 1 << s | n << i | r, nn = e; } function pf(e) { e.return !== null && (Xn(e, 1), Gk(e, 1, 0)); } function mf(e) { for (; e === Oa; ) Oa = Qr[--Jr], Qr[Jr] = null, Ta = Qr[--Jr], Qr[Jr] = null; for (; e === yr; ) yr = ft[--ht], ft[ht] = null, nn = ft[--ht], ft[ht] = null, tn = ft[--ht], ft[ht] = null; } var ot = null, it = null, se = !1, Tt = null; function Wk(e, t) { var n = yt(5, null, null, 0); n.elementType = "DELETED", n.stateNode = t, n.return = e, t = e.deletions, t === null ? (e.deletions = [n], e.flags |= 16) : t.push(n); } function Qp(e, t) { switch (e.tag) { case 5: var n = e.type; return t = t.nodeType !== 1 || n.toLowerCase() !== t.nodeName.toLowerCase() ? null : t, t !== null ? (e.stateNode = t, ot = e, it = Rn(t.firstChild), !0) : !1; case 6: return t = e.pendingProps === "" || t.nodeType !== 3 ? null : t, t !== null ? (e.stateNode = t, ot = e, it = null, !0) : !1; case 13: return t = t.nodeType !== 8 ? null : t, t !== null ? (n = yr !== null ? { id: tn, overflow: nn } : null, e.memoizedState = { dehydrated: t, treeContext: n, retryLane: 1073741824 }, n = yt(18, null, null, 0), n.stateNode = t, n.return = e, e.child = n, ot = e, it = null, !0) : !1; default: return !1; } } function Gc(e) { return (e.mode & 1) !== 0 && (e.flags & 128) === 0; } function Wc(e) { if (se) { var t = it; if (t) { var n = t; if (!Qp(e, t)) { if (Gc(e)) throw Error(x(418)); t = Rn(n.nextSibling); var r = ot; t && Qp(e, t) ? Wk(r, n) : (e.flags = e.flags & -4097 | 2, se = !1, ot = e); } } else { if (Gc(e)) throw Error(x(418)); e.flags = e.flags & -4097 | 2, se = !1, ot = e; } } } function Jp(e) { for (e = e.return; e !== null && e.tag !== 5 && e.tag !== 3 && e.tag !== 13; ) e = e.return; ot = e; } function ko(e) { if (e !== ot) return !1; if (!se) return Jp(e), se = !0, !1; var t; if ((t = e.tag !== 3) && !(t = e.tag !== 5) && (t = e.type, t = t !== "head" && t !== "body" && !jc(e.type, e.memoizedProps)), t && (t = it)) { if (Gc(e)) throw qk(), Error(x(418)); for (; t; ) Wk(e, t), t = Rn(t.nextSibling); } if (Jp(e), e.tag === 13) { if (e = e.memoizedState, e = e !== null ? e.dehydrated : null, !e) throw Error(x(317)); e: { for (e = e.nextSibling, t = 0; e; ) { if (e.nodeType === 8) { var n = e.data; if (n === "/$") { if (t === 0) { it = Rn(e.nextSibling); break e; } t--; } else n !== "$" && n !== "$!" && n !== "$?" || t++; } e = e.nextSibling; } it = null; } } else it = ot ? Rn(e.stateNode.nextSibling) : null; return !0; } function qk() { for (var e = it; e; ) e = Rn(e.nextSibling); } function hi() { it = ot = null, se = !1; } function gf(e) { Tt === null ? Tt = [e] : Tt.push(e); } var aT = hn.ReactCurrentBatchConfig; function ji(e, t, n) { if (e = n.ref, e !== null && typeof e != "function" && typeof e != "object") { if (n._owner) { if (n = n._owner, n) { if (n.tag !== 1) throw Error(x(309)); var r = n.stateNode; } if (!r) throw Error(x(147, e)); var i = r, s = "" + e; return t !== null && t.ref !== null && typeof t.ref == "function" && t.ref._stringRef === s ? t.ref : (t = function(o) { var a = i.refs; o === null ? delete a[s] : a[s] = o; }, t._stringRef = s, t); } if (typeof e != "string") throw Error(x(284)); if (!n._owner) throw Error(x(290, e)); } return e; } function So(e, t) { throw e = Object.prototype.toString.call(t), Error(x(31, e === "[object Object]" ? "object with keys {" + Object.keys(t).join(", ") + "}" : e)); } function Yp(e) { var t = e._init; return t(e._payload); } function Kk(e) { function t(h, p) { if (e) { var y = h.deletions; y === null ? (h.deletions = [p], h.flags |= 16) : y.push(p); } } function n(h, p) { if (!e) return null; for (; p !== null; ) t(h, p), p = p.sibling; return null; } function r(h, p) { for (h = /* @__PURE__ */ new Map(); p !== null; ) p.key !== null ? h.set(p.key, p) : h.set(p.index, p), p = p.sibling; return h; } function i(h, p) { return h = Fn(h, p), h.index = 0, h.sibling = null, h; } function s(h, p, y) { return h.index = y, e ? (y = h.alternate, y !== null ? (y = y.index, y < p ? (h.flags |= 2, p) : y) : (h.flags |= 2, p)) : (h.flags |= 1048576, p); } function o(h) { return e && h.alternate === null && (h.flags |= 2), h; } function a(h, p, y, S) { return p === null || p.tag !== 6 ? (p = Fu(y, h.mode, S), p.return = h, p) : (p = i(p, y), p.return = h, p); } function l(h, p, y, S) { var N = y.type; return N === zr ? c(h, p, y.props.children, S, y.key) : p !== null && (p.elementType === N || typeof N == "object" && N !== null && N.$$typeof === gn && Yp(N) === p.type) ? (S = i(p, y.props), S.ref = ji(h, p, y), S.return = h, S) : (S = Jo(y.type, y.key, y.props, null, h.mode, S), S.ref = ji(h, p, y), S.return = h, S); } function u(h, p, y, S) { return p === null || p.tag !== 4 || p.stateNode.containerInfo !== y.containerInfo || p.stateNode.implementation !== y.implementation ? (p = Du(y, h.mode, S), p.return = h, p) : (p = i(p, y.children || []), p.return = h, p); } function c(h, p, y, S, N) { return p === null || p.tag !== 7 ? (p = dr(y, h.mode, S, N), p.return = h, p) : (p = i(p, y), p.return = h, p); } function d(h, p, y) { if (typeof p == "string" && p !== "" || typeof p == "number") return p = Fu("" + p, h.mode, y), p.return = h, p; if (typeof p == "object" && p !== null) { switch (p.$$typeof) { case lo: return y = Jo(p.type, p.key, p.props, null, h.mode, y), y.ref = ji(h, null, p), y.return = h, y; case Br: return p = Du(p, h.mode, y), p.return = h, p; case gn: var S = p._init; return d(h, S(p._payload), y); } if (Wi(p) || Di(p)) return p = dr(p, h.mode, y, null), p.return = h, p; So(h, p); } return null; } function f(h, p, y, S) { var N = p !== null ? p.key : null; if (typeof y == "string" && y !== "" || typeof y == "number") return N !== null ? null : a(h, p, "" + y, S); if (typeof y == "object" && y !== null) { switch (y.$$typeof) { case lo: return y.key === N ? l(h, p, y, S) : null; case Br: return y.key === N ? u(h, p, y, S) : null; case gn: return N = y._init, f( h, p, N(y._payload), S ); } if (Wi(y) || Di(y)) return N !== null ? null : c(h, p, y, S, null); So(h, y); } return null; } function v(h, p, y, S, N) { if (typeof S == "string" && S !== "" || typeof S == "number") return h = h.get(y) || null, a(p, h, "" + S, N); if (typeof S == "object" && S !== null) { switch (S.$$typeof) { case lo: return h = h.get(S.key === null ? y : S.key) || null, l(p, h, S, N); case Br: return h = h.get(S.key === null ? y : S.key) || null, u(p, h, S, N); case gn: var E = S._init; return v(h, p, y, E(S._payload), N); } if (Wi(S) || Di(S)) return h = h.get(y) || null, c(p, h, S, N, null); So(p, S); } return null; } function g(h, p, y, S) { for (var N = null, E = null, A = p, b = p = 0, I = null; A !== null && b < y.length; b++) { A.index > b ? (I = A, A = null) : I = A.sibling; var F = f(h, A, y[b], S); if (F === null) { A === null && (A = I); break; } e && A && F.alternate === null && t(h, A), p = s(F, p, b), E === null ? N = F : E.sibling = F, E = F, A = I; } if (b === y.length) return n(h, A), se && Xn(h, b), N; if (A === null) { for (; b < y.length; b++) A = d(h, y[b], S), A !== null && (p = s(A, p, b), E === null ? N = A : E.sibling = A, E = A); return se && Xn(h, b), N; } for (A = r(h, A); b < y.length; b++) I = v(A, h, b, y[b], S), I !== null && (e && I.alternate !== null && A.delete(I.key === null ? b : I.key), p = s(I, p, b), E === null ? N = I : E.sibling = I, E = I); return e && A.forEach(function(P) { return t(h, P); }), se && Xn(h, b), N; } function m(h, p, y, S) { var N = Di(y); if (typeof N != "function") throw Error(x(150)); if (y = N.call(y), y == null) throw Error(x(151)); for (var E = N = null, A = p, b = p = 0, I = null, F = y.next(); A !== null && !F.done; b++, F = y.next()) { A.index > b ? (I = A, A = null) : I = A.sibling; var P = f(h, A, F.value, S); if (P === null) { A === null && (A = I); break; } e && A && P.alternate === null && t(h, A), p = s(P, p, b), E === null ? N = P : E.sibling = P, E = P, A = I; } if (F.done) return n( h, A ), se && Xn(h, b), N; if (A === null) { for (; !F.done; b++, F = y.next()) F = d(h, F.value, S), F !== null && (p = s(F, p, b), E === null ? N = F : E.sibling = F, E = F); return se && Xn(h, b), N; } for (A = r(h, A); !F.done; b++, F = y.next()) F = v(A, h, b, F.value, S), F !== null && (e && F.alternate !== null && A.delete(F.key === null ? b : F.key), p = s(F, p, b), E === null ? N = F : E.sibling = F, E = F); return e && A.forEach(function(W) { return t(h, W); }), se && Xn(h, b), N; } function k(h, p, y, S) { if (typeof y == "object" && y !== null && y.type === zr && y.key === null && (y = y.props.children), typeof y == "object" && y !== null) { switch (y.$$typeof) { case lo: e: { for (var N = y.key, E = p; E !== null; ) { if (E.key === N) { if (N = y.type, N === zr) { if (E.tag === 7) { n(h, E.sibling), p = i(E, y.props.children), p.return = h, h = p; break e; } } else if (E.elementType === N || typeof N == "object" && N !== null && N.$$typeof === gn && Yp(N) === E.type) { n(h, E.sibling), p = i(E, y.props), p.ref = ji(h, E, y), p.return = h, h = p; break e; } n(h, E); break; } else t(h, E); E = E.sibling; } y.type === zr ? (p = dr(y.props.children, h.mode, S, y.key), p.return = h, h = p) : (S = Jo(y.type, y.key, y.props, null, h.mode, S), S.ref = ji(h, p, y), S.return = h, h = S); } return o(h); case Br: e: { for (E = y.key; p !== null; ) { if (p.key === E) if (p.tag === 4 && p.stateNode.containerInfo === y.containerInfo && p.stateNode.implementation === y.implementation) { n(h, p.sibling), p = i(p, y.children || []), p.return = h, h = p; break e; } else { n(h, p); break; } else t(h, p); p = p.sibling; } p = Du(y, h.mode, S), p.return = h, h = p; } return o(h); case gn: return E = y._init, k(h, p, E(y._payload), S); } if (Wi(y)) return g(h, p, y, S); if (Di(y)) return m(h, p, y, S); So(h, y); } return typeof y == "string" && y !== "" || typeof y == "number" ? (y = "" + y, p !== null && p.tag === 6 ? (n(h, p.sibling), p = i(p, y), p.return = h, h = p) : (n(h, p), p = Fu(y, h.mode, S), p.return = h, h = p), o(h)) : n(h, p); } return k; } var pi = Kk(!0), Qk = Kk(!1), xa = Gn(null), Ra = null, Yr = null, vf = null; function yf() { vf = Yr = Ra = null; } function kf(e) { var t = xa.current; ie(xa), e._currentValue = t; } function qc(e, t, n) { for (; e !== null; ) { var r = e.alternate; if ((e.childLanes & t) !== t ? (e.childLanes |= t, r !== null && (r.childLanes |= t)) : r !== null && (r.childLanes & t) !== t && (r.childLanes |= t), e === n) break; e = e.return; } } function ii(e, t) { Ra = e, vf = Yr = null, e = e.dependencies, e !== null && e.firstContext !== null && (e.lanes & t && (Be = !0), e.firstContext = null); } function _t(e) { var t = e._currentValue; if (vf !== e) if (e = { context: e, memoizedValue: t, next: null }, Yr === null) { if (Ra === null) throw Error(x(308)); Yr = e, Ra.dependencies = { lanes: 0, firstContext: e }; } else Yr = Yr.next = e; return t; } var sr = null; function Sf(e) { sr === null ? sr = [e] : sr.push(e); } function Jk(e, t, n, r) { var i = t.interleaved; return i === null ? (n.next = n, Sf(t)) : (n.next = i.next, i.next = n), t.interleaved = n, cn(e, r); } function cn(e, t) { e.lanes |= t; var n = e.alternate; for (n !== null && (n.lanes |= t), n = e, e = e.return; e !== null; ) e.childLanes |= t, n = e.alternate, n !== null && (n.childLanes |= t), n = e, e = e.return; return n.tag === 3 ? n.stateNode : null; } var vn = !1; function _f(e) { e.updateQueue = { baseState: e.memoizedState, firstBaseUpdate: null, lastBaseUpdate: null, shared: { pending: null, interleaved: null, lanes: 0 }, effects: null }; } function Yk(e, t) { e = e.updateQueue, t.updateQueue === e && (t.updateQueue = { baseState: e.baseState, firstBaseUpdate: e.firstBaseUpdate, lastBaseUpdate: e.lastBaseUpdate, shared: e.shared, effects: e.effects }); } function on(e, t) { return { eventTime: e, lane: t, tag: 0, payload: null, callback: null, next: null }; } function In(e, t, n) { var r = e.updateQueue; if (r === null) return null; if (r = r.shared, Q & 2) { var i = r.pending; return i === null ? t.next = t : (t.next = i.next, i.next = t), r.pending = t, cn(e, n); } return i = r.interleaved, i === null ? (t.next = t, Sf(r)) : (t.next = i.next, i.next = t), r.interleaved = t, cn(e, n); } function Ho(e, t, n) { if (t = t.updateQueue, t !== null && (t = t.shared, (n & 4194240) !== 0)) { var r = t.lanes; r &= e.pendingLanes, n |= r, t.lanes = n, of(e, n); } } function Xp(e, t) { var n = e.updateQueue, r = e.alternate; if (r !== null && (r = r.updateQueue, n === r)) { var i = null, s = null; if (n = n.firstBaseUpdate, n !== null) { do { var o = { eventTime: n.eventTime, lane: n.lane, tag: n.tag, payload: n.payload, callback: n.callback, next: null }; s === null ? i = s = o : s = s.next = o, n = n.next; } while (n !== null); s === null ? i = s = t : s = s.next = t; } else i = s = t; n = { baseState: r.baseState, firstBaseUpdate: i, lastBaseUpdate: s, shared: r.shared, effects: r.effects }, e.updateQueue = n; return; } e = n.lastBaseUpdate, e === null ? n.firstBaseUpdate = t : e.next = t, n.lastBaseUpdate = t; } function Ia(e, t, n, r) { var i = e.updateQueue; vn = !1; var s = i.firstBaseUpdate, o = i.lastBaseUpdate, a = i.shared.pending; if (a !== null) { i.shared.pending = null; var l = a, u = l.next; l.next = null, o === null ? s = u : o.next = u, o = l; var c = e.alternate; c !== null && (c = c.updateQueue, a = c.lastBaseUpdate, a !== o && (a === null ? c.firstBaseUpdate = u : a.next = u, c.lastBaseUpdate = l)); } if (s !== null) { var d = i.baseState; o = 0, c = u = l = null, a = s; do { var f = a.lane, v = a.eventTime; if ((r & f) === f) { c !== null && (c = c.next = { eventTime: v, lane: 0, tag: a.tag, payload: a.payload, callback: a.callback, next: null }); e: { var g = e, m = a; switch (f = t, v = n, m.tag) { case 1: if (g = m.payload, typeof g == "function") { d = g.call(v, d, f); break e; } d = g; break e; case 3: g.flags = g.flags & -65537 | 128; case 0: if (g = m.payload, f = typeof g == "function" ? g.call(v, d, f) : g, f == null) break e; d = ce({}, d, f); break e; case 2: vn = !0; } } a.callback !== null && a.lane !== 0 && (e.flags |= 64, f = i.effects, f === null ? i.effects = [a] : f.push(a)); } else v = { eventTime: v, lane: f, tag: a.tag, payload: a.payload, callback: a.callback, next: null }, c === null ? (u = c = v, l = d) : c = c.next = v, o |= f; if (a = a.next, a === null) { if (a = i.shared.pending, a === null) break; f = a, a = f.next, f.next = null, i.lastBaseUpdate = f, i.shared.pending = null; } } while (!0); if (c === null && (l = d), i.baseState = l, i.firstBaseUpdate = u, i.lastBaseUpdate = c, t = i.shared.interleaved, t !== null) { i = t; do o |= i.lane, i = i.next; while (i !== t); } else s === null && (i.shared.lanes = 0); Sr |= o, e.lanes = o, e.memoizedState = d; } } function Zp(e, t, n) { if (e = t.effects, t.effects = null, e !== null) for (t = 0; t < e.length; t++) { var r = e[t], i = r.callback; if (i !== null) { if (r.callback = null, r = n, typeof i != "function") throw Error(x(191, i)); i.call(r); } } } var Zs = {}, Qt = Gn(Zs), Ps = Gn(Zs), Ls = Gn(Zs); function or(e) { if (e === Zs) throw Error(x(174)); return e; } function Nf(e, t) { switch (ee(Ls, t), ee(Ps, e), ee(Qt, Zs), e = t.nodeType, e) { case 9: case 11: t = (t = t.documentElement) ? t.namespaceURI : Cc(null, ""); break; default: e = e === 8 ? t.parentNode : t, t = e.namespaceURI || null, e = e.tagName, t = Cc(t, e); } ie(Qt), ee(Qt, t); } function mi() { ie(Qt), ie(Ps), ie(Ls); } function Xk(e) { or(Ls.current); var t = or(Qt.current), n = Cc(t, e.type); t !== n && (ee(Ps, e), ee(Qt, n)); } function Ef(e) { Ps.current === e && (ie(Qt), ie(Ps)); } var ae = Gn(0); function Pa(e) { for (var t = e; t !== null; ) { if (t.tag === 13) { var n = t.memoizedState; if (n !== null && (n = n.dehydrated, n === null || n.data === "$?" || n.data === "$!")) return t; } else if (t.tag === 19 && t.memoizedProps.revealOrder !== void 0) { if (t.flags & 128) return t; } else if (t.child !== null) { t.child.return = t, t = t.child; continue; } if (t === e) break; for (; t.sibling === null; ) { if (t.return === null || t.return === e) return null; t = t.return; } t.sibling.return = t.return, t = t.sibling; } return null; } var Tu = []; function wf() { for (var e = 0; e < Tu.length; e++) Tu[e]._workInProgressVersionPrimary = null; Tu.length = 0; } var Go = hn.ReactCurrentDispatcher, xu = hn.ReactCurrentBatchConfig, kr = 0, ue = null, ke = null, _e = null, La = !1, ls = !1, Fs = 0, lT = 0; function Te() { throw Error(x(321)); } function Af(e, t) { if (t === null) return !1; for (var n = 0; n < t.length && n < e.length; n++) if (!Dt(e[n], t[n])) return !1; return !0; } function bf(e, t, n, r, i, s) { if (kr = s, ue = t, t.memoizedState = null, t.updateQueue = null, t.lanes = 0, Go.current = e === null || e.memoizedState === null ? fT : hT, e = n(r, i), ls) { s = 0; do { if (ls = !1, Fs = 0, 25 <= s) throw Error(x(301)); s += 1, _e = ke = null, t.updateQueue = null, Go.current = pT, e = n(r, i); } while (ls); } if (Go.current = Fa, t = ke !== null && ke.next !== null, kr = 0, _e = ke = ue = null, La = !1, t) throw Error(x(300)); return e; } function Cf() { var e = Fs !== 0; return Fs = 0, e; } function Vt() { var e = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null }; return _e === null ? ue.memoizedState = _e = e : _e = _e.next = e, _e; } function Nt() { if (ke === null) { var e = ue.alternate; e = e !== null ? e.memoizedState : null; } else e = ke.next; var t = _e === null ? ue.memoizedState : _e.next; if (t !== null) _e = t, ke = e; else { if (e === null) throw Error(x(310)); ke = e, e = { memoizedState: ke.memoizedState, baseState: ke.baseState, baseQueue: ke.baseQueue, queue: ke.queue, next: null }, _e === null ? ue.memoizedState = _e = e : _e = _e.next = e; } return _e; } function Ds(e, t) { return typeof t == "function" ? t(e) : t; } function Ru(e) { var t = Nt(), n = t.queue; if (n === null) throw Error(x(311)); n.lastRenderedReducer = e; var r = ke, i = r.baseQueue, s = n.pending; if (s !== null) { if (i !== null) { var o = i.next; i.next = s.next, s.next = o; } r.baseQueue = i = s, n.pending = null; } if (i !== null) { s = i.next, r = r.baseState; var a = o = null, l = null, u = s; do { var c = u.lane; if ((kr & c) === c) l !== null && (l = l.next = { lane: 0, action: u.action, hasEagerState: u.hasEagerState, eagerState: u.eagerState, next: null }), r = u.hasEagerState ? u.eagerState : e(r, u.action); else { var d = { lane: c, action: u.action, hasEagerState: u.hasEagerState, eagerState: u.eagerState, next: null }; l === null ? (a = l = d, o = r) : l = l.next = d, ue.lanes |= c, Sr |= c; } u = u.next; } while (u !== null && u !== s); l === null ? o = r : l.next = a, Dt(r, t.memoizedState) || (Be = !0), t.memoizedState = r, t.baseState = o, t.baseQueue = l, n.lastRenderedState = r; } if (e = n.interleaved, e !== null) { i = e; do s = i.lane, ue.lanes |= s, Sr |= s, i = i.next; while (i !== e); } else i === null && (n.lanes = 0); return [t.memoizedState, n.dispatch]; } function Iu(e) { var t = Nt(), n = t.queue; if (n === null) throw Error(x(311)); n.lastRenderedReducer = e; var r = n.dispatch, i = n.pending, s = t.memoizedState; if (i !== null) { n.pending = null; var o = i = i.next; do s = e(s, o.action), o = o.next; while (o !== i); Dt(s, t.memoizedState) || (Be = !0), t.memoizedState = s, t.baseQueue === null && (t.baseState = s), n.lastRenderedState = s; } return [s, r]; } function Zk() { } function e0(e, t) { var n = ue, r = Nt(), i = t(), s = !Dt(r.memoizedState, i); if (s && (r.memoizedState = i, Be = !0), r = r.queue, Of(r0.bind(null, n, r, e), [e]), r.getSnapshot !== t || s || _e !== null && _e.memoizedState.tag & 1) { if (n.flags |= 2048, $s(9, n0.bind(null, n, r, i, t), void 0, null), Ee === null) throw Error(x(349)); kr & 30 || t0(n, t, i); } return i; } function t0(e, t, n) { e.flags |= 16384, e = { getSnapshot: t, value: n }, t = ue.updateQueue, t === null ? (t = { lastEffect: null, stores: null }, ue.updateQueue = t, t.stores = [e]) : (n = t.stores, n === null ? t.stores = [e] : n.push(e)); } function n0(e, t, n, r) { t.value = n, t.getSnapshot = r, i0(t) && s0(e); } function r0(e, t, n) { return n(function() { i0(t) && s0(e); }); } function i0(e) { var t = e.getSnapshot; e = e.value; try { var n = t(); return !Dt(e, n); } catch { return !0; } } function s0(e) { var t = cn(e, 1); t !== null && Pt(t, e, 1, -1); } function em(e) { var t = Vt(); return typeof e == "function" && (e = e()), t.memoizedState = t.baseState = e, e = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: Ds, lastRenderedState: e }, t.queue = e, e = e.dispatch = dT.bind(null, ue, e), [t.memoizedState, e]; } function $s(e, t, n, r) { return e = { tag: e, create: t, destroy: n, deps: r, next: null }, t = ue.updateQueue, t === null ? (t = { lastEffect: null, stores: null }, ue.updateQueue = t, t.lastEffect = e.next = e) : (n = t.lastEffect, n === null ? t.lastEffect = e.next = e : (r = n.next, n.next = e, e.next = r, t.lastEffect = e)), e; } function o0() { return Nt().memoizedState; } function Wo(e, t, n, r) { var i = Vt(); ue.flags |= e, i.memoizedState = $s(1 | t, n, void 0, r === void 0 ? null : r); } function bl(e, t, n, r) { var i = Nt(); r = r === void 0 ? null : r; var s = void 0; if (ke !== null) { var o = ke.memoizedState; if (s = o.destroy, r !== null && Af(r, o.deps)) { i.memoizedState = $s(t, n, s, r); return; } } ue.flags |= e, i.memoizedState = $s(1 | t, n, s, r); } function tm(e, t) { return Wo(8390656, 8, e, t); } function Of(e, t) { return bl(2048, 8, e, t); } function a0(e, t) { return bl(4, 2, e, t); } function l0(e, t) { return bl(4, 4, e, t); } function u0(e, t) { if (typeof t == "function") return e = e(), t(e), function() { t(null); }; if (t != null) return e = e(), t.current = e, function() { t.current = null; }; } function c0(e, t, n) { return n = n != null ? n.concat([e]) : null, bl(4, 4, u0.bind(null, t, e), n); } function Tf() { } function d0(e, t) { var n = Nt(); t = t === void 0 ? null : t; var r = n.memoizedState; return r !== null && t !== null && Af(t, r[1]) ? r[0] : (n.memoizedState = [e, t], e); } function f0(e, t) { var n = Nt(); t = t === void 0 ? null : t; var r = n.memoizedState; return r !== null && t !== null && Af(t, r[1]) ? r[0] : (e = e(), n.memoizedState = [e, t], e); } function h0(e, t, n) { return kr & 21 ? (Dt(n, t) || (n = yk(), ue.lanes |= n, Sr |= n, e.baseState = !0), t) : (e.baseState && (e.baseState = !1, Be = !0), e.memoizedState = n); } function uT(e, t) { var n = Z; Z = n !== 0 && 4 > n ? n : 4, e(!0); var r = xu.transition; xu.transition = {}; try { e(!1), t(); } finally { Z = n, xu.transition = r; } } function p0() { return Nt().memoizedState; } function cT(e, t, n) { var r = Ln(e); if (n = { lane: r, action: n, hasEagerState: !1, eagerState: null, next: null }, m0(e)) g0(t, n); else if (n = Jk(e, t, n, r), n !== null) { var i = De(); Pt(n, e, r, i), v0(n, t, r); } } function dT(e, t, n) { var r = Ln(e), i = { lane: r, action: n, hasEagerState: !1, eagerState: null, next: null }; if (m0(e)) g0(t, i); else { var s = e.alternate; if (e.lanes === 0 && (s === null || s.lanes === 0) && (s = t.lastRenderedReducer, s !== null)) try { var o = t.lastRenderedState, a = s(o, n); if (i.hasEagerState = !0, i.eagerState = a, Dt(a, o)) { var l = t.interleaved; l === null ? (i.next = i, Sf(t)) : (i.next = l.next, l.next = i), t.interleaved = i; return; } } catch { } finally { } n = Jk(e, t, i, r), n !== null && (i = De(), Pt(n, e, r, i), v0(n, t, r)); } } function m0(e) { var t = e.alternate; return e === ue || t !== null && t === ue; } function g0(e, t) { ls = La = !0; var n = e.pending; n === null ? t.next = t : (t.next = n.next, n.next = t), e.pending = t; } function v0(e, t, n) { if (n & 4194240) { var r = t.lanes; r &= e.pendingLanes, n |= r, t.lanes = n, of(e, n); } } var Fa = { readContext: _t, useCallback: Te, useContext: Te, useEffect: Te, useImperativeHandle: Te, useInsertionEffect: Te, useLayoutEffect: Te, useMemo: Te, useReducer: Te, useRef: Te, useState: Te, useDebugValue: Te, useDeferredValue: Te, useTransition: Te, useMutableSource: Te, useSyncExternalStore: Te, useId: Te, unstable_isNewReconciler: !1 }, fT = { readContext: _t, useCallback: function(e, t) { return Vt().memoizedState = [e, t === void 0 ? null : t], e; }, useContext: _t, useEffect: tm, useImperativeHandle: function(e, t, n) { return n = n != null ? n.concat([e]) : null, Wo( 4194308, 4, u0.bind(null, t, e), n ); }, useLayoutEffect: function(e, t) { return Wo(4194308, 4, e, t); }, useInsertionEffect: function(e, t) { return Wo(4, 2, e, t); }, useMemo: function(e, t) { var n = Vt(); return t = t === void 0 ? null : t, e = e(), n.memoizedState = [e, t], e; }, useReducer: function(e, t, n) { var r = Vt(); return t = n !== void 0 ? n(t) : t, r.memoizedState = r.baseState = t, e = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: e, lastRenderedState: t }, r.queue = e, e = e.dispatch = cT.bind(null, ue, e), [r.memoizedState, e]; }, useRef: function(e) { var t = Vt(); return e = { current: e }, t.memoizedState = e; }, useState: em, useDebugValue: Tf, useDeferredValue: function(e) { return Vt().memoizedState = e; }, useTransition: function() { var e = em(!1), t = e[0]; return e = uT.bind(null, e[1]), Vt().memoizedState = e, [t, e]; }, useMutableSource: function() { }, useSyncExternalStore: function(e, t, n) { var r = ue, i = Vt(); if (se) { if (n === void 0) throw Error(x(407)); n = n(); } else { if (n = t(), Ee === null) throw Error(x(349)); kr & 30 || t0(r, t, n); } i.memoizedState = n; var s = { value: n, getSnapshot: t }; return i.queue = s, tm(r0.bind( null, r, s, e ), [e]), r.flags |= 2048, $s(9, n0.bind(null, r, s, n, t), void 0, null), n; }, useId: function() { var e = Vt(), t = Ee.identifierPrefix; if (se) { var n = nn, r = tn; n = (r & ~(1 << 32 - It(r) - 1)).toString(32) + n, t = ":" + t + "R" + n, n = Fs++, 0 < n && (t += "H" + n.toString(32)), t += ":"; } else n = lT++, t = ":" + t + "r" + n.toString(32) + ":"; return e.memoizedState = t; }, unstable_isNewReconciler: !1 }, hT = { readContext: _t, useCallback: d0, useContext: _t, useEffect: Of, useImperativeHandle: c0, useInsertionEffect: a0, useLayoutEffect: l0, useMemo: f0, useReducer: Ru, useRef: o0, useState: function() { return Ru(Ds); }, useDebugValue: Tf, useDeferredValue: function(e) { var t = Nt(); return h0(t, ke.memoizedState, e); }, useTransition: function() { var e = Ru(Ds)[0], t = Nt().memoizedState; return [e, t]; }, useMutableSource: Zk, useSyncExternalStore: e0, useId: p0, unstable_isNewReconciler: !1 }, pT = { readContext: _t, useCallback: d0, useContext: _t, useEffect: Of, useImperativeHandle: c0, useInsertionEffect: a0, useLayoutEffect: l0, useMemo: f0, useReducer: Iu, useRef: o0, useState: function() { return Iu(Ds); }, useDebugValue: Tf, useDeferredValue: function(e) { var t = Nt(); return ke === null ? t.memoizedState = e : h0(t, ke.memoizedState, e); }, useTransition: function() { var e = Iu(Ds)[0], t = Nt().memoizedState; return [e, t]; }, useMutableSource: Zk, useSyncExternalStore: e0, useId: p0, unstable_isNewReconciler: !1 }; function At(e, t) { if (e && e.defaultProps) { t = ce({}, t), e = e.defaultProps; for (var n in e) t[n] === void 0 && (t[n] = e[n]); return t; } return t; } function Kc(e, t, n, r) { t = e.memoizedState, n = n(r, t), n = n == null ? t : ce({}, t, n), e.memoizedState = n, e.lanes === 0 && (e.updateQueue.baseState = n); } var Cl = { isMounted: function(e) { return (e = e._reactInternals) ? Or(e) === e : !1; }, enqueueSetState: function(e, t, n) { e = e._reactInternals; var r = De(), i = Ln(e), s = on(r, i); s.payload = t, n != null && (s.callback = n), t = In(e, s, i), t !== null && (Pt(t, e, i, r), Ho(t, e, i)); }, enqueueReplaceState: function(e, t, n) { e = e._reactInternals; var r = De(), i = Ln(e), s = on(r, i); s.tag = 1, s.payload = t, n != null && (s.callback = n), t = In(e, s, i), t !== null && (Pt(t, e, i, r), Ho(t, e, i)); }, enqueueForceUpdate: function(e, t) { e = e._reactInternals; var n = De(), r = Ln(e), i = on(n, r); i.tag = 2, t != null && (i.callback = t), t = In(e, i, r), t !== null && (Pt(t, e, r, n), Ho(t, e, r)); } }; function nm(e, t, n, r, i, s, o) { return e = e.stateNode, typeof e.shouldComponentUpdate == "function" ? e.shouldComponentUpdate(r, s, o) : t.prototype && t.prototype.isPureReactComponent ? !Ts(n, r) || !Ts(i, s) : !0; } function y0(e, t, n) { var r = !1, i = jn, s = t.contextType; return typeof s == "object" && s !== null ? s = _t(s) : (i = qe(t) ? vr : Pe.current, r = t.contextTypes, s = (r = r != null) ? fi(e, i) : jn), t = new t(n, s), e.memoizedState = t.state !== null && t.state !== void 0 ? t.state : null, t.updater = Cl, e.stateNode = t, t._reactInternals = e, r && (e = e.stateNode, e.__reactInternalMemoizedUnmaskedChildContext = i, e.__reactInternalMemoizedMaskedChildContext = s), t; } function rm(e, t, n, r) { e = t.state, typeof t.componentWillReceiveProps == "function" && t.componentWillReceiveProps(n, r), typeof t.UNSAFE_componentWillReceiveProps == "function" && t.UNSAFE_componentWillReceiveProps(n, r), t.state !== e && Cl.enqueueReplaceState(t, t.state, null); } function Qc(e, t, n, r) { var i = e.stateNode; i.props = n, i.state = e.memoizedState, i.refs = {}, _f(e); var s = t.contextType; typeof s == "object" && s !== null ? i.context = _t(s) : (s = qe(t) ? vr : Pe.current, i.context = fi(e, s)), i.state = e.memoizedState, s = t.getDerivedStateFromProps, typeof s == "function" && (Kc(e, t, s, n), i.state = e.memoizedState), typeof t.getDerivedStateFromProps == "function" || typeof i.getSnapshotBeforeUpdate == "function" || typeof i.UNSAFE_componentWillMount != "function" && typeof i.componentWillMount != "function" || (t = i.state, typeof i.componentWillMount == "function" && i.componentWillMount(), typeof i.UNSAFE_componentWillMount == "function" && i.UNSAFE_componentWillMount(), t !== i.state && Cl.enqueueReplaceState(i, i.state, null), Ia(e, n, i, r), i.state = e.memoizedState), typeof i.componentDidMount == "function" && (e.flags |= 4194308); } function gi(e, t) { try { var n = "", r = t; do n += BC(r), r = r.return; while (r); var i = n; } catch (s) { i = ` Error generating stack: ` + s.message + ` ` + s.stack; } return { value: e, source: t, stack: i, digest: null }; } function Pu(e, t, n) { return { value: e, source: null, stack: n ?? null, digest: t ?? null }; } function Jc(e, t) { try { console.error(t.value); } catch (n) { setTimeout(function() { throw n; }); } } var mT = typeof WeakMap == "function" ? WeakMap : Map; function k0(e, t, n) { n = on(-1, n), n.tag = 3, n.payload = { element: null }; var r = t.value; return n.callback = function() { $a || ($a = !0, od = r), Jc(e, t); }, n; } function S0(e, t, n) { n = on(-1, n), n.tag = 3; var r = e.type.getDerivedStateFromError; if (typeof r == "function") { var i = t.value; n.payload = function() { return r(i); }, n.callback = function() { Jc(e, t); }; } var s = e.stateNode; return s !== null && typeof s.componentDidCatch == "function" && (n.callback = function() { Jc(e, t), typeof r != "function" && (Pn === null ? Pn = /* @__PURE__ */ new Set([this]) : Pn.add(this)); var o = t.stack; this.componentDidCatch(t.value, { componentStack: o !== null ? o : "" }); }), n; } function im(e, t, n) { var r = e.pingCache; if (r === null) { r = e.pingCache = new mT(); var i = /* @__PURE__ */ new Set(); r.set(t, i); } else i = r.get(t), i === void 0 && (i = /* @__PURE__ */ new Set(), r.set(t, i)); i.has(n) || (i.add(n), e = TT.bind(null, e, t, n), t.then(e, e)); } function sm(e) { do { var t; if ((t = e.tag === 13) && (t = e.memoizedState, t = t !== null ? t.dehydrated !== null : !0), t) return e; e = e.return; } while (e !== null); return null; } function om(e, t, n, r, i) { return e.mode & 1 ? (e.flags |= 65536, e.lanes = i, e) : (e === t ? e.flags |= 65536 : (e.flags |= 128, n.flags |= 131072, n.flags &= -52805, n.tag === 1 && (n.alternate === null ? n.tag = 17 : (t = on(-1, 1), t.tag = 2, In(n, t, 1))), n.lanes |= 1), e); } var gT = hn.ReactCurrentOwner, Be = !1; function Fe(e, t, n, r) { t.child = e === null ? Qk(t, null, n, r) : pi(t, e.child, n, r); } function am(e, t, n, r, i) { n = n.render; var s = t.ref; return ii(t, i), r = bf(e, t, n, r, s, i), n = Cf(), e !== null && !Be ? (t.updateQueue = e.updateQueue, t.flags &= -2053, e.lanes &= ~i, dn(e, t, i)) : (se && n && pf(t), t.flags |= 1, Fe(e, t, r, i), t.child); } function lm(e, t, n, r, i) { if (e === null) { var s = n.type; return typeof s == "function" && !$f(s) && s.defaultProps === void 0 && n.compare === null && n.defaultProps === void 0 ? (t.tag = 15, t.type = s, _0(e, t, s, r, i)) : (e = Jo(n.type, null, r, t, t.mode, i), e.ref = t.ref, e.return = t, t.child = e); } if (s = e.child, !(e.lanes & i)) { var o = s.memoizedProps; if (n = n.compare, n = n !== null ? n : Ts, n(o, r) && e.ref === t.ref) return dn(e, t, i); } return t.flags |= 1, e = Fn(s, r), e.ref = t.ref, e.return = t, t.child = e; } function _0(e, t, n, r, i) { if (e !== null) { var s = e.memoizedProps; if (Ts(s, r) && e.ref === t.ref) if (Be = !1, t.pendingProps = r = s, (e.lanes & i) !== 0) e.flags & 131072 && (Be = !0); else return t.lanes = e.lanes, dn(e, t, i); } return Yc(e, t, n, r, i); } function N0(e, t, n) { var r = t.pendingProps, i = r.children, s = e !== null ? e.memoizedState : null; if (r.mode === "hidden") if (!(t.mode & 1)) t.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, ee(Zr, Qe), Qe |= n; else { if (!(n & 1073741824)) return e = s !== null ? s.baseLanes | n : n, t.lanes = t.childLanes = 1073741824, t.memoizedState = { baseLanes: e, cachePool: null, transitions: null }, t.updateQueue = null, ee(Zr, Qe), Qe |= e, null; t.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, r = s !== null ? s.baseLanes : n, ee(Zr, Qe), Qe |= r; } else s !== null ? (r = s.baseLanes | n, t.memoizedState = null) : r = n, ee(Zr, Qe), Qe |= r; return Fe(e, t, i, n), t.child; } function E0(e, t) { var n = t.ref; (e === null && n !== null || e !== null && e.ref !== n) && (t.flags |= 512, t.flags |= 2097152); } function Yc(e, t, n, r, i) { var s = qe(n) ? vr : Pe.current; return s = fi(t, s), ii(t, i), n = bf(e, t, n, r, s, i), r = Cf(), e !== null && !Be ? (t.updateQueue = e.updateQueue, t.flags &= -2053, e.lanes &= ~i, dn(e, t, i)) : (se && r && pf(t), t.flags |= 1, Fe(e, t, n, i), t.child); } function um(e, t, n, r, i) { if (qe(n)) { var s = !0; Ca(t); } else s = !1; if (ii(t, i), t.stateNode === null) qo(e, t), y0(t, n, r), Qc(t, n, r, i), r = !0; else if (e === null) { var o = t.stateNode, a = t.memoizedProps; o.props = a; var l = o.context, u = n.contextType; typeof u == "object" && u !== null ? u = _t(u) : (u = qe(n) ? vr : Pe.current, u = fi(t, u)); var c = n.getDerivedStateFromProps, d = typeof c == "function" || typeof o.getSnapshotBeforeUpdate == "function"; d || typeof o.UNSAFE_componentWillReceiveProps != "function" && typeof o.componentWillReceiveProps != "function" || (a !== r || l !== u) && rm(t, o, r, u), vn = !1; var f = t.memoizedState; o.state = f, Ia(t, r, o, i), l = t.memoizedState, a !== r || f !== l || We.current || vn ? (typeof c == "function" && (Kc(t, n, c, r), l = t.memoizedState), (a = vn || nm(t, n, a, r, f, l, u)) ? (d || typeof o.UNSAFE_componentWillMount != "function" && typeof o.componentWillMount != "function" || (typeof o.componentWillMount == "function" && o.componentWillMount(), typeof o.UNSAFE_componentWillMount == "function" && o.UNSAFE_componentWillMount()), typeof o.componentDidMount == "function" && (t.flags |= 4194308)) : (typeof o.componentDidMount == "function" && (t.flags |= 4194308), t.memoizedProps = r, t.memoizedState = l), o.props = r, o.state = l, o.context = u, r = a) : (typeof o.componentDidMount == "function" && (t.flags |= 4194308), r = !1); } else { o = t.stateNode, Yk(e, t), a = t.memoizedProps, u = t.type === t.elementType ? a : At(t.type, a), o.props = u, d = t.pendingProps, f = o.context, l = n.contextType, typeof l == "object" && l !== null ? l = _t(l) : (l = qe(n) ? vr : Pe.current, l = fi(t, l)); var v = n.getDerivedStateFromProps; (c = typeof v == "function" || typeof o.getSnapshotBeforeUpdate == "function") || typeof o.UNSAFE_componentWillReceiveProps != "function" && typeof o.componentWillReceiveProps != "function" || (a !== d || f !== l) && rm(t, o, r, l), vn = !1, f = t.memoizedState, o.state = f, Ia(t, r, o, i); var g = t.memoizedState; a !== d || f !== g || We.current || vn ? (typeof v == "function" && (Kc(t, n, v, r), g = t.memoizedState), (u = vn || nm(t, n, u, r, f, g, l) || !1) ? (c || typeof o.UNSAFE_componentWillUpdate != "function" && typeof o.componentWillUpdate != "function" || (typeof o.componentWillUpdate == "function" && o.componentWillUpdate(r, g, l), typeof o.UNSAFE_componentWillUpdate == "function" && o.UNSAFE_componentWillUpdate(r, g, l)), typeof o.componentDidUpdate == "function" && (t.flags |= 4), typeof o.getSnapshotBeforeUpdate == "function" && (t.flags |= 1024)) : (typeof o.componentDidUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 4), typeof o.getSnapshotBeforeUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 1024), t.memoizedProps = r, t.memoizedState = g), o.props = r, o.state = g, o.context = l, r = u) : (typeof o.componentDidUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 4), typeof o.getSnapshotBeforeUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 1024), r = !1); } return Xc(e, t, n, r, s, i); } function Xc(e, t, n, r, i, s) { E0(e, t); var o = (t.flags & 128) !== 0; if (!r && !o) return i && Kp(t, n, !1), dn(e, t, s); r = t.stateNode, gT.current = t; var a = o && typeof n.getDerivedStateFromError != "function" ? null : r.render(); return t.flags |= 1, e !== null && o ? (t.child = pi(t, e.child, null, s), t.child = pi(t, null, a, s)) : Fe(e, t, a, s), t.memoizedState = r.state, i && Kp(t, n, !0), t.child; } function w0(e) { var t = e.stateNode; t.pendingContext ? qp(e, t.pendingContext, t.pendingContext !== t.context) : t.context && qp(e, t.context, !1), Nf(e, t.containerInfo); } function cm(e, t, n, r, i) { return hi(), gf(i), t.flags |= 256, Fe(e, t, n, r), t.child; } var Zc = { dehydrated: null, treeContext: null, retryLane: 0 }; function ed(e) { return { baseLanes: e, cachePool: null, transitions: null }; } function A0(e, t, n) { var r = t.pendingProps, i = ae.current, s = !1, o = (t.flags & 128) !== 0, a; if ((a = o) || (a = e !== null && e.memoizedState === null ? !1 : (i & 2) !== 0), a ? (s = !0, t.flags &= -129) : (e === null || e.memoizedState !== null) && (i |= 1), ee(ae, i & 1), e === null) return Wc(t), e = t.memoizedState, e !== null && (e = e.dehydrated, e !== null) ? (t.mode & 1 ? e.data === "$!" ? t.lanes = 8 : t.lanes = 1073741824 : t.lanes = 1, null) : (o = r.children, e = r.fallback, s ? (r = t.mode, s = t.child, o = { mode: "hidden", children: o }, !(r & 1) && s !== null ? (s.childLanes = 0, s.pendingProps = o) : s = xl(o, r, 0, null), e = dr(e, r, n, null), s.return = t, e.return = t, s.sibling = e, t.child = s, t.child.memoizedState = ed(n), t.memoizedState = Zc, e) : xf(t, o)); if (i = e.memoizedState, i !== null && (a = i.dehydrated, a !== null)) return vT(e, t, o, r, a, i, n); if (s) { s = r.fallback, o = t.mode, i = e.child, a = i.sibling; var l = { mode: "hidden", children: r.children }; return !(o & 1) && t.child !== i ? (r = t.child, r.childLanes = 0, r.pendingProps = l, t.deletions = null) : (r = Fn(i, l), r.subtreeFlags = i.subtreeFlags & 14680064), a !== null ? s = Fn(a, s) : (s = dr(s, o, n, null), s.flags |= 2), s.return = t, r.return = t, r.sibling = s, t.child = r, r = s, s = t.child, o = e.child.memoizedState, o = o === null ? ed(n) : { baseLanes: o.baseLanes | n, cachePool: null, transitions: o.transitions }, s.memoizedState = o, s.childLanes = e.childLanes & ~n, t.memoizedState = Zc, r; } return s = e.child, e = s.sibling, r = Fn(s, { mode: "visible", children: r.children }), !(t.mode & 1) && (r.lanes = n), r.return = t, r.sibling = null, e !== null && (n = t.deletions, n === null ? (t.deletions = [e], t.flags |= 16) : n.push(e)), t.child = r, t.memoizedState = null, r; } function xf(e, t) { return t = xl({ mode: "visible", children: t }, e.mode, 0, null), t.return = e, e.child = t; } function _o(e, t, n, r) { return r !== null && gf(r), pi(t, e.child, null, n), e = xf(t, t.pendingProps.children), e.flags |= 2, t.memoizedState = null, e; } function vT(e, t, n, r, i, s, o) { if (n) return t.flags & 256 ? (t.flags &= -257, r = Pu(Error(x(422))), _o(e, t, o, r)) : t.memoizedState !== null ? (t.child = e.child, t.flags |= 128, null) : (s = r.fallback, i = t.mode, r = xl({ mode: "visible", children: r.children }, i, 0, null), s = dr(s, i, o, null), s.flags |= 2, r.return = t, s.return = t, r.sibling = s, t.child = r, t.mode & 1 && pi(t, e.child, null, o), t.child.memoizedState = ed(o), t.memoizedState = Zc, s); if (!(t.mode & 1)) return _o(e, t, o, null); if (i.data === "$!") { if (r = i.nextSibling && i.nextSibling.dataset, r) var a = r.dgst; return r = a, s = Error(x(419)), r = Pu(s, r, void 0), _o(e, t, o, r); } if (a = (o & e.childLanes) !== 0, Be || a) { if (r = Ee, r !== null) { switch (o & -o) { case 4: i = 2; break; case 16: i = 8; break; case 64: 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: case 4194304: case 8388608: case 16777216: case 33554432: case 67108864: i = 32; break; case 536870912: i = 268435456; break; default: i = 0; } i = i & (r.suspendedLanes | o) ? 0 : i, i !== 0 && i !== s.retryLane && (s.retryLane = i, cn(e, i), Pt(r, e, i, -1)); } return Df(), r = Pu(Error(x(421))), _o(e, t, o, r); } return i.data === "$?" ? (t.flags |= 128, t.child = e.child, t = xT.bind(null, e), i._reactRetry = t, null) : (e = s.treeContext, it = Rn(i.nextSibling), ot = t, se = !0, Tt = null, e !== null && (ft[ht++] = tn, ft[ht++] = nn, ft[ht++] = yr, tn = e.id, nn = e.overflow, yr = t), t = xf(t, r.children), t.flags |= 4096, t); } function dm(e, t, n) { e.lanes |= t; var r = e.alternate; r !== null && (r.lanes |= t), qc(e.return, t, n); } function Lu(e, t, n, r, i) { var s = e.memoizedState; s === null ? e.memoizedState = { isBackwards: t, rendering: null, renderingStartTime: 0, last: r, tail: n, tailMode: i } : (s.isBackwards = t, s.rendering = null, s.renderingStartTime = 0, s.last = r, s.tail = n, s.tailMode = i); } function b0(e, t, n) { var r = t.pendingProps, i = r.revealOrder, s = r.tail; if (Fe(e, t, r.children, n), r = ae.current, r & 2) r = r & 1 | 2, t.flags |= 128; else { if (e !== null && e.flags & 128) e: for (e = t.child; e !== null; ) { if (e.tag === 13) e.memoizedState !== null && dm(e, n, t); else if (e.tag === 19) dm(e, n, t); else if (e.child !== null) { e.child.return = e, e = e.child; continue; } if (e === t) break e; for (; e.sibling === null; ) { if (e.return === null || e.return === t) break e; e = e.return; } e.sibling.return = e.return, e = e.sibling; } r &= 1; } if (ee(ae, r), !(t.mode & 1)) t.memoizedState = null; else switch (i) { case "forwards": for (n = t.child, i = null; n !== null; ) e = n.alternate, e !== null && Pa(e) === null && (i = n), n = n.sibling; n = i, n === null ? (i = t.child, t.child = null) : (i = n.sibling, n.sibling = null), Lu(t, !1, i, n, s); break; case "backwards": for (n = null, i = t.child, t.child = null; i !== null; ) { if (e = i.alternate, e !== null && Pa(e) === null) { t.child = i; break; } e = i.sibling, i.sibling = n, n = i, i = e; } Lu(t, !0, n, null, s); break; case "together": Lu(t, !1, null, null, void 0); break; default: t.memoizedState = null; } return t.child; } function qo(e, t) { !(t.mode & 1) && e !== null && (e.alternate = null, t.alternate = null, t.flags |= 2); } function dn(e, t, n) { if (e !== null && (t.dependencies = e.dependencies), Sr |= t.lanes, !(n & t.childLanes)) return null; if (e !== null && t.child !== e.child) throw Error(x(153)); if (t.child !== null) { for (e = t.child, n = Fn(e, e.pendingProps), t.child = n, n.return = t; e.sibling !== null; ) e = e.sibling, n = n.sibling = Fn(e, e.pendingProps), n.return = t; n.sibling = null; } return t.child; } function yT(e, t, n) { switch (t.tag) { case 3: w0(t), hi(); break; case 5: Xk(t); break; case 1: qe(t.type) && Ca(t); break; case 4: Nf(t, t.stateNode.containerInfo); break; case 10: var r = t.type._context, i = t.memoizedProps.value; ee(xa, r._currentValue), r._currentValue = i; break; case 13: if (r = t.memoizedState, r !== null) return r.dehydrated !== null ? (ee(ae, ae.current & 1), t.flags |= 128, null) : n & t.child.childLanes ? A0(e, t, n) : (ee(ae, ae.current & 1), e = dn(e, t, n), e !== null ? e.sibling : null); ee(ae, ae.current & 1); break; case 19: if (r = (n & t.childLanes) !== 0, e.flags & 128) { if (r) return b0(e, t, n); t.flags |= 128; } if (i = t.memoizedState, i !== null && (i.rendering = null, i.tail = null, i.lastEffect = null), ee(ae, ae.current), r) break; return null; case 22: case 23: return t.lanes = 0, N0(e, t, n); } return dn(e, t, n); } var C0, td, O0, T0; C0 = function(e, t) { for (var n = t.child; n !== null; ) { if (n.tag === 5 || n.tag === 6) e.appendChild(n.stateNode); else if (n.tag !== 4 && n.child !== null) { n.child.return = n, n = n.child; continue; } if (n === t) break; for (; n.sibling === null; ) { if (n.return === null || n.return === t) return; n = n.return; } n.sibling.return = n.return, n = n.sibling; } }; td = function() { }; O0 = function(e, t, n, r) { var i = e.memoizedProps; if (i !== r) { e = t.stateNode, or(Qt.current); var s = null; switch (n) { case "input": i = Ec(e, i), r = Ec(e, r), s = []; break; case "select": i = ce({}, i, { value: void 0 }), r = ce({}, r, { value: void 0 }), s = []; break; case "textarea": i = bc(e, i), r = bc(e, r), s = []; break; default: typeof i.onClick != "function" && typeof r.onClick == "function" && (e.onclick = Aa); } Oc(n, r); var o; n = null; for (u in i) if (!r.hasOwnProperty(u) && i.hasOwnProperty(u) && i[u] != null) if (u === "style") { var a = i[u]; for (o in a) a.hasOwnProperty(o) && (n || (n = {}), n[o] = ""); } else u !== "dangerouslySetInnerHTML" && u !== "children" && u !== "suppressContentEditableWarning" && u !== "suppressHydrationWarning" && u !== "autoFocus" && (Ns.hasOwnProperty(u) ? s || (s = []) : (s = s || []).push(u, null)); for (u in r) { var l = r[u]; if (a = i != null ? i[u] : void 0, r.hasOwnProperty(u) && l !== a && (l != null || a != null)) if (u === "style") if (a) { for (o in a) !a.hasOwnProperty(o) || l && l.hasOwnProperty(o) || (n || (n = {}), n[o] = ""); for (o in l) l.hasOwnProperty(o) && a[o] !== l[o] && (n || (n = {}), n[o] = l[o]); } else n || (s || (s = []), s.push( u, n )), n = l; else u === "dangerouslySetInnerHTML" ? (l = l ? l.__html : void 0, a = a ? a.__html : void 0, l != null && a !== l && (s = s || []).push(u, l)) : u === "children" ? typeof l != "string" && typeof l != "number" || (s = s || []).push(u, "" + l) : u !== "suppressContentEditableWarning" && u !== "suppressHydrationWarning" && (Ns.hasOwnProperty(u) ? (l != null && u === "onScroll" && ne("scroll", e), s || a === l || (s = [])) : (s = s || []).push(u, l)); } n && (s = s || []).push("style", n); var u = s; (t.updateQueue = u) && (t.flags |= 4); } }; T0 = function(e, t, n, r) { n !== r && (t.flags |= 4); }; function Bi(e, t) { if (!se) switch (e.tailMode) { case "hidden": t = e.tail; for (var n = null; t !== null; ) t.alternate !== null && (n = t), t = t.sibling; n === null ? e.tail = null : n.sibling = null; break; case "collapsed": n = e.tail; for (var r = null; n !== null; ) n.alternate !== null && (r = n), n = n.sibling; r === null ? t || e.tail === null ? e.tail = null : e.tail.sibling = null : r.sibling = null; } } function xe(e) { var t = e.alternate !== null && e.alternate.child === e.child, n = 0, r = 0; if (t) for (var i = e.child; i !== null; ) n |= i.lanes | i.childLanes, r |= i.subtreeFlags & 14680064, r |= i.flags & 14680064, i.return = e, i = i.sibling; else for (i = e.child; i !== null; ) n |= i.lanes | i.childLanes, r |= i.subtreeFlags, r |= i.flags, i.return = e, i = i.sibling; return e.subtreeFlags |= r, e.childLanes = n, t; } function kT(e, t, n) { var r = t.pendingProps; switch (mf(t), t.tag) { case 2: case 16: case 15: case 0: case 11: case 7: case 8: case 12: case 9: case 14: return xe(t), null; case 1: return qe(t.type) && ba(), xe(t), null; case 3: return r = t.stateNode, mi(), ie(We), ie(Pe), wf(), r.pendingContext && (r.context = r.pendingContext, r.pendingContext = null), (e === null || e.child === null) && (ko(t) ? t.flags |= 4 : e === null || e.memoizedState.isDehydrated && !(t.flags & 256) || (t.flags |= 1024, Tt !== null && (ud(Tt), Tt = null))), td(e, t), xe(t), null; case 5: Ef(t); var i = or(Ls.current); if (n = t.type, e !== null && t.stateNode != null) O0(e, t, n, r, i), e.ref !== t.ref && (t.flags |= 512, t.flags |= 2097152); else { if (!r) { if (t.stateNode === null) throw Error(x(166)); return xe(t), null; } if (e = or(Qt.current), ko(t)) { r = t.stateNode, n = t.type; var s = t.memoizedProps; switch (r[jt] = t, r[Is] = s, e = (t.mode & 1) !== 0, n) { case "dialog": ne("cancel", r), ne("close", r); break; case "iframe": case "object": case "embed": ne("load", r); break; case "video": case "audio": for (i = 0; i < Ki.length; i++) ne(Ki[i], r); break; case "source": ne("error", r); break; case "img": case "image": case "link": ne( "error", r ), ne("load", r); break; case "details": ne("toggle", r); break; case "input": Sp(r, s), ne("invalid", r); break; case "select": r._wrapperState = { wasMultiple: !!s.multiple }, ne("invalid", r); break; case "textarea": Np(r, s), ne("invalid", r); } Oc(n, s), i = null; for (var o in s) if (s.hasOwnProperty(o)) { var a = s[o]; o === "children" ? typeof a == "string" ? r.textContent !== a && (s.suppressHydrationWarning !== !0 && yo(r.textContent, a, e), i = ["children", a]) : typeof a == "number" && r.textContent !== "" + a && (s.suppressHydrationWarning !== !0 && yo( r.textContent, a, e ), i = ["children", "" + a]) : Ns.hasOwnProperty(o) && a != null && o === "onScroll" && ne("scroll", r); } switch (n) { case "input": uo(r), _p(r, s, !0); break; case "textarea": uo(r), Ep(r); break; case "select": case "option": break; default: typeof s.onClick == "function" && (r.onclick = Aa); } r = i, t.updateQueue = r, r !== null && (t.flags |= 4); } else { o = i.nodeType === 9 ? i : i.ownerDocument, e === "http://www.w3.org/1999/xhtml" && (e = rk(n)), e === "http://www.w3.org/1999/xhtml" ? n === "script" ? (e = o.createElement("div"), e.innerHTML = "