var ss = Object.defineProperty; var ti = (e) => { throw TypeError(e); }; var ls = (e, t, r) => t in e ? ss(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r; var H = (e, t, r) => ls(e, typeof t != "symbol" ? t + "" : t, r), kr = (e, t, r) => t.has(e) || ti("Cannot " + r); var J = (e, t, r) => (kr(e, t, "read from private field"), r ? r.call(e) : t.get(e)), we = (e, t, r) => t.has(e) ? ti("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), ft = (e, t, r, n) => (kr(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r), ve = (e, t, r) => (kr(e, t, "access private method"), r); const Du = "prd", Hi = "https://sdk.hellouniweb.com", Vi = Hi, xu = "https://uniweb-origin.s3.ap-northeast-1.amazonaws.com/sdk/assets", cs = { withStackTrace: !1 }, ji = (e, t, r = cs) => { const n = t.isOk() ? { type: "Ok", value: t.value } : { type: "Err", value: t.error }, i = r.withStackTrace ? new Error().stack : void 0; return { data: n, message: e, stack: i }; }; function cr(e, t, r, n) { function i(o) { return o instanceof r ? o : new r(function(s) { s(o); }); } return new (r || (r = Promise))(function(o, s) { function c(w) { try { p(n.next(w)); } catch (d) { s(d); } } function g(w) { try { p(n.throw(w)); } catch (d) { s(d); } } function p(w) { w.done ? o(w.value) : i(w.value).then(c, g); } p((n = n.apply(e, [])).next()); }); } function ri(e) { var t = typeof Symbol == "function" && Symbol.iterator, r = t && e[t], n = 0; if (r) return r.call(e); if (e && typeof e.length == "number") return { next: function() { return e && n >= e.length && (e = void 0), { value: e && e[n++], done: !e }; } }; throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined."); } function nt(e) { return this instanceof nt ? (this.v = e, this) : new nt(e); } function us(e, t, r) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var n = r.apply(e, t || []), i, o = []; return i = {}, s("next"), s("throw"), s("return"), i[Symbol.asyncIterator] = function() { return this; }, i; function s(u) { n[u] && (i[u] = function(m) { return new Promise(function(h, _) { o.push([u, m, h, _]) > 1 || c(u, m); }); }); } function c(u, m) { try { g(n[u](m)); } catch (h) { d(o[0][3], h); } } function g(u) { u.value instanceof nt ? Promise.resolve(u.value.v).then(p, w) : d(o[0][2], u); } function p(u) { c("next", u); } function w(u) { c("throw", u); } function d(u, m) { u(m), o.shift(), o.length && c(o[0][0], o[0][1]); } } function ds(e) { var t, r; return t = {}, n("next"), n("throw", function(i) { throw i; }), n("return"), t[Symbol.iterator] = function() { return this; }, t; function n(i, o) { t[i] = e[i] ? function(s) { return (r = !r) ? { value: nt(e[i](s)), done: i === "return" } : o ? o(s) : s; } : o; } } function fs(e) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var t = e[Symbol.asyncIterator], r; return t ? t.call(e) : (e = typeof ri == "function" ? ri(e) : e[Symbol.iterator](), r = {}, n("next"), n("throw"), n("return"), r[Symbol.asyncIterator] = function() { return this; }, r); function n(o) { r[o] = e[o] && function(s) { return new Promise(function(c, g) { s = e[o](s), i(c, g, s.done, s.value); }); }; } function i(o, s, c, g) { Promise.resolve(g).then(function(p) { o({ value: p, done: c }); }, s); } } class de { constructor(t) { this._promise = t; } static fromSafePromise(t) { const r = t.then((n) => new Ze(n)); return new de(r); } static fromPromise(t, r) { const n = t.then((i) => new Ze(i)).catch((i) => new Qe(r(i))); return new de(n); } // eslint-disable-next-line @typescript-eslint/no-explicit-any static fromThrowable(t, r) { return (...n) => new de(cr(this, void 0, void 0, function* () { try { return new Ze(yield t(...n)); } catch (i) { return new Qe(r ? r(i) : i); } })); } static combine(t) { return ms(t); } static combineWithAllErrors(t) { return ps(t); } map(t) { return new de(this._promise.then((r) => cr(this, void 0, void 0, function* () { return r.isErr() ? new Qe(r.error) : new Ze(yield t(r.value)); }))); } mapErr(t) { return new de(this._promise.then((r) => cr(this, void 0, void 0, function* () { return r.isOk() ? new Ze(r.value) : new Qe(yield t(r.error)); }))); } // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types andThen(t) { return new de(this._promise.then((r) => { if (r.isErr()) return new Qe(r.error); const n = t(r.value); return n instanceof de ? n._promise : n; })); } // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types orElse(t) { return new de(this._promise.then((r) => cr(this, void 0, void 0, function* () { return r.isErr() ? t(r.error) : new Ze(r.value); }))); } match(t, r) { return this._promise.then((n) => n.match(t, r)); } unwrapOr(t) { return this._promise.then((r) => r.unwrapOr(t)); } /** * Emulates Rust's `?` operator in `safeTry`'s body. See also `safeTry`. */ safeUnwrap() { return us(this, arguments, function* () { return yield nt(yield nt(yield* ds(fs(yield nt(this._promise.then((r) => r.safeUnwrap())))))); }); } // Makes ResultAsync implement PromiseLike then(t, r) { return this._promise.then(t, r); } } const ni = (e) => new de(Promise.resolve(new Qe(e))), zi = de.fromPromise, Ki = (e) => { let t = U([]); for (const r of e) if (r.isErr()) { t = F(r.error); break; } else t.map((n) => n.push(r.value)); return t; }, ms = (e) => de.fromSafePromise(Promise.all(e)).andThen(Ki), Gi = (e) => { let t = U([]); for (const r of e) r.isErr() && t.isErr() ? t.error.push(r.error) : r.isErr() && t.isOk() ? t = F([r.error]) : r.isOk() && t.isOk() && t.value.push(r.value); return t; }, ps = (e) => de.fromSafePromise(Promise.all(e)).andThen(Gi); var Ur; (function(e) { function t(i, o) { return (...s) => { try { const c = i(...s); return U(c); } catch (c) { return F(o ? o(c) : c); } }; } e.fromThrowable = t; function r(i) { return Ki(i); } e.combine = r; function n(i) { return Gi(i); } e.combineWithAllErrors = n; })(Ur || (Ur = {})); const U = (e) => new Ze(e), F = (e) => new Qe(e); class Ze { constructor(t) { this.value = t; } isOk() { return !0; } isErr() { return !this.isOk(); } map(t) { return U(t(this.value)); } // eslint-disable-next-line @typescript-eslint/no-unused-vars mapErr(t) { return U(this.value); } // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types andThen(t) { return t(this.value); } // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types orElse(t) { return U(this.value); } asyncAndThen(t) { return t(this.value); } asyncMap(t) { return de.fromSafePromise(t(this.value)); } // eslint-disable-next-line @typescript-eslint/no-unused-vars unwrapOr(t) { return this.value; } // eslint-disable-next-line @typescript-eslint/no-unused-vars match(t, r) { return t(this.value); } safeUnwrap() { const t = this.value; return function* () { return t; }(); } _unsafeUnwrap(t) { return this.value; } _unsafeUnwrapErr(t) { throw ji("Called `_unsafeUnwrapErr` on an Ok", this, t); } } class Qe { constructor(t) { this.error = t; } isOk() { return !1; } isErr() { return !this.isOk(); } // eslint-disable-next-line @typescript-eslint/no-unused-vars map(t) { return F(this.error); } mapErr(t) { return F(t(this.error)); } // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types andThen(t) { return F(this.error); } // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types orElse(t) { return t(this.error); } // eslint-disable-next-line @typescript-eslint/no-unused-vars asyncAndThen(t) { return ni(this.error); } // eslint-disable-next-line @typescript-eslint/no-unused-vars asyncMap(t) { return ni(this.error); } unwrapOr(t) { return t; } match(t, r) { return r(this.error); } safeUnwrap() { const t = this.error; return function* () { throw yield F(t), new Error("Do not use this generator out of `safeTry`"); }(); } _unsafeUnwrap(t) { throw ji("Called `_unsafeUnwrap` on an Err", this, t); } _unsafeUnwrapErr(t) { return this.error; } } Ur.fromThrowable; class ii extends Error { constructor(t) { super(t.message); } } const _s = (e) => e instanceof SyntaxError || e instanceof TypeError || e instanceof Error ? new ii(e) : new ii(new Error(`UnknownError: ${e}`)), Lu = (e) => { const t = Lt(e), r = Lt(location.href); return t.isErr() || r.isErr() ? !1 : t.value.origin === r.value.origin; }, Lt = (e) => { try { return U(new URL(e)); } catch (t) { return F(_s(t)); } }, hs = (e, t) => { const r = Lt(e); if (!r.isErr()) return r.value.searchParams.get(t) || void 0; }, gs = (e) => { const t = Lt(e); return t.isErr() ? (console.error(t.error), "") : t.value.origin; }, bs = () => { const t = Hi.replace(/\./g, "\\."), r = new RegExp(`^${t}/.*`), i = Array.from(document.querySelectorAll("script[data-account]")).find((o) => r.test(o.src)); if (i) return i.dataset.account; }, Ft = bs() || "", vs = "uniweb-mode", oi = hs(window.location.href, vs), ai = { DISABLED: "disabled", // ユニウェブを動かさないモード TEST: "test" // テスト用の機能を動かすモード }, ws = { isDisabled: () => oi === ai.DISABLED, /** * 主に本番で機能をテストしたい時に使う * * if (mode.isTest()) { * // お試し機能 * } */ isTest: () => oi === ai.TEST }, ys = window.location.hash === "#uniweb", Tr = "uniweb--sdk-root", qi = "uniweb--widget-root", Fu = "uniweb--widget-panel-root", Es = "uniweb--widget-icon", Ss = "uniweb--contents-navigator", Yi = "data-uniweb-style", Ts = "uniweb-script", si = "uniweb--features-in-iframe", Mu = "uniweb-sdk-action", Os = "#3650FF", Xi = "[uniweb] Failed to initialize uniweb SDK: ", Is = () => { import("./reset.lazy.5NerL1mJ.js").then((e) => { e.resetAll(); }); }, Wr = () => { var e, t, r; Is(), (e = document.getElementById(Tr)) == null || e.remove(), (t = document.getElementById(Ss)) == null || t.remove(), (r = document.getElementById(Ts)) == null || r.remove(); for (const n of document.querySelectorAll(`[${Yi}]`)) n.remove(); }, As = { CONTENTS_NAVIGATION: "skip_navigation", REDUCE_MOTION: "parallax_effect", ADD_LANG_TO_HTML: "add_lang_to_html", ADD_TITLE: "add_title", ADD_FOCUS_VISIBLE_STYLE: "add_focus_visible_style", ADD_TABINDEX_TO_LINK: "add_tabindex_to_link", ADD_ROLE_PRESENTATION_TO_BR: "add_role_presentation_to_br", ADD_ROLE_IMG_TO_SVG: "add_role_img_to_svg", ADD_AUTOCOMPLETE_TO_INPUT: "add_autocomplete_to_input", DEL_MISMATCH_LANG_ATTR: "del_mismatch_lang_attr", SYNC_ACCESSIBLE_NAME_WITH_LABEL: "sync_accessible_name_with_label", OPTIMIZE_TARGET_BLANK_LINK: "optimize_target_blank_link", EMPATHIZE_FOCUS: "empathize_focus" }, Cs = (e) => !!e && e.constructor === Symbol, Ji = (e) => !!(e && e.constructor && e.call && e.apply), Nr = (e) => { try { return Number(e) === e; } catch { return !1; } }, Rs = (e) => Object.prototype.toString.call(e) === "[object Date]", Ps = (e) => !(!e || !e.then || !Ji(e.then)), tn = (e) => { if (e === !0 || e === !1 || e == null) return !0; if (Nr(e)) return e === 0; if (Rs(e)) return isNaN(e.getTime()); if (Ji(e) || Cs(e)) return !1; const t = e.length; if (Nr(t)) return t === 0; const r = e.size; return Nr(r) ? r === 0 : Object.keys(e).length === 0; }, Zi = (e, t) => { if (Object.is(e, t)) return !0; if (e instanceof Date && t instanceof Date) return e.getTime() === t.getTime(); if (e instanceof RegExp && t instanceof RegExp) return e.toString() === t.toString(); if (typeof e != "object" || e === null || typeof t != "object" || t === null) return !1; const r = Reflect.ownKeys(e), n = Reflect.ownKeys(t); if (r.length !== n.length) return !1; for (let i = 0; i < r.length; i++) if (!Reflect.has(t, r[i]) || !Zi(e[r[i]], t[r[i]])) return !1; return !0; }, ot = (e) => (...t) => { try { const r = e(...t); return Ps(r) ? r.then((n) => [void 0, n]).catch((n) => [n, void 0]) : [void 0, r]; } catch (r) { return [r, void 0]; } }, ks = (e, t = (r) => r === void 0) => e ? Object.keys(e).reduce((n, i) => (t(e[i]) || (n[i] = e[i]), n), {}) : {}, Uu = (e, t) => e ? Object.entries(e).reduce((r, [n, i]) => { const [o, s] = t(n, i); return r[o] = s, r; }, {}) : {}, Ns = { INITIALIZED: "uniweb:initialized" }, ee = { OPEN_PANEL: "openPanel", CLOSE_PANEL: "closePanel", TOGGLE_PANEL: "togglePanel", CHANGE_FEATURE: "changeFeature", TOGGLE_FEATURE: "toggleFeature", RESET_FEATURES: "resetFeatures", FEATURE_CHANGED: "changedFeature", // 消したい。palさん用に作ったけどもう使ってなさそ LANGUAGE_CHANGED: "languageChanged", CHANGE_LANGUAGE: "changeLanguage" }; var gt, ze; const tt = class tt { constructor() { we(this, ze, {}); /** * イベントリスナーの登録 */ H(this, "on", (t, r) => { J(this, ze)[t] || (J(this, ze)[t] = []), J(this, ze)[t].push(r); }); /** * イベントの発火 */ H(this, "emit", (t, r) => { if (J(this, ze)[t]) for (const n of J(this, ze)[t]) n(r); }); } static getInstance() { return J(tt, gt) || ft(tt, gt, new tt()), J(tt, gt); } }; gt = new WeakMap(), ze = new WeakMap(), we(tt, gt); let $r = tt; const te = $r.getInstance(), it = { onOpenPanel: (e) => te.on(ee.OPEN_PANEL, e), onClosePanel: (e) => te.on(ee.CLOSE_PANEL, e), onTogglePanel: (e) => te.on(ee.TOGGLE_PANEL, e), onChangeFeature: (e) => te.on(ee.CHANGE_FEATURE, e), onToggleFeature: (e) => te.on(ee.TOGGLE_FEATURE, e), onResetFeatures: (e) => te.on(ee.RESET_FEATURES, e), onChangeLanguage: (e) => te.on(ee.CHANGE_LANGUAGE, e) }, Ds = { openPanel: () => te.emit(ee.OPEN_PANEL), closePanel: () => te.emit(ee.CLOSE_PANEL), togglePanel: () => te.emit(ee.TOGGLE_PANEL), changeFeature: (e, t) => te.emit(ee.CHANGE_FEATURE, { feature: e, variant: t }), toggleFeature: (e, t) => te.emit(ee.TOGGLE_FEATURE, { feature: e, variant: t }), resetFeatures: () => te.emit(ee.RESET_FEATURES), featureChanged: (e) => te.emit(ee.FEATURE_CHANGED, { type: ee.FEATURE_CHANGED, ...e }), languageChanged: (e) => te.emit(ee.LANGUAGE_CHANGED, e), changeLanguage: (e) => te.emit(ee.CHANGE_LANGUAGE, e) }, Qi = "uniweb-internal:pushstate", xs = new Event(Qi); let li = !1; const Wu = () => { li || (Ls(), li = !0); }, Ls = () => { const e = window.history.pushState; window.history.pushState = function(t, ...r) { const n = e.apply(this, [t, ...r]); return window.dispatchEvent(xs), n; }; }, Fs = new Event(Ns.INITIALIZED), Ms = () => { document.dispatchEvent(Fs); }, ci = (e) => { let t; const r = /* @__PURE__ */ new Set(), n = (p, w) => { const d = typeof p == "function" ? p(t) : p; if (!Object.is(d, t)) { const u = t; t = w ?? (typeof d != "object" || d === null) ? d : Object.assign({}, t, d), r.forEach((m) => m(t, u)); } }, i = () => t, c = { setState: n, getState: i, getInitialState: () => g, subscribe: (p) => (r.add(p), () => r.delete(p)) }, g = t = e(n, i, c); return c; }, Us = (e) => e ? ci(e) : ci; var jt, P, eo, et, ui, to, ro, no, rn, Br, Hr, io, Mt = {}, oo = [], Ws = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, zt = Array.isArray; function Ce(e, t) { for (var r in t) e[r] = t[r]; return e; } function nn(e) { e && e.parentNode && e.parentNode.removeChild(e); } function Re(e, t, r) { var n, i, o, s = {}; for (o in t) o == "key" ? n = t[o] : o == "ref" ? i = t[o] : s[o] = t[o]; if (arguments.length > 2 && (s.children = arguments.length > 3 ? jt.call(arguments, 2) : r), typeof e == "function" && e.defaultProps != null) for (o in e.defaultProps) s[o] == null && (s[o] = e.defaultProps[o]); return Dt(e, s, n, i, null); } function Dt(e, t, r, n, i) { var o = { type: e, props: t, key: r, ref: n, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: i ?? ++eo, __i: -1, __u: 0 }; return i == null && P.vnode != null && P.vnode(o), o; } function ao() { return { current: null }; } function Pe(e) { return e.children; } function ye(e, t) { this.props = e, this.context = t; } function Et(e, t) { if (t == null) return e.__ ? Et(e.__, e.__i + 1) : null; for (var r; t < e.__k.length; t++) if ((r = e.__k[t]) != null && r.__e != null) return r.__e; return typeof e.type == "function" ? Et(e) : null; } function so(e) { var t, r; if ((e = e.__) != null && e.__c != null) { for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++) if ((r = e.__k[t]) != null && r.__e != null) { e.__e = e.__c.base = r.__e; break; } return so(e); } } function Vr(e) { (!e.__d && (e.__d = !0) && et.push(e) && !br.__r++ || ui != P.debounceRendering) && ((ui = P.debounceRendering) || to)(br); } function br() { for (var e, t, r, n, i, o, s, c = 1; et.length; ) et.length > c && et.sort(ro), e = et.shift(), c = et.length, e.__d && (r = void 0, i = (n = (t = e).__v).__e, o = [], s = [], t.__P && ((r = Ce({}, n)).__v = n.__v + 1, P.vnode && P.vnode(r), on(t.__P, r, n, t.__n, t.__P.namespaceURI, 32 & n.__u ? [i] : null, o, i ?? Et(n), !!(32 & n.__u), s), r.__v = n.__v, r.__.__k[r.__i] = r, uo(o, r, s), r.__e != i && so(r))); br.__r = 0; } function lo(e, t, r, n, i, o, s, c, g, p, w) { var d, u, m, h, _, v, A = n && n.__k || oo, O = t.length; for (g = $s(r, t, A, g, O), d = 0; d < O; d++) (m = r.__k[d]) != null && (u = m.__i == -1 ? Mt : A[m.__i] || Mt, m.__i = d, v = on(e, m, u, i, o, s, c, g, p, w), h = m.__e, m.ref && u.ref != m.ref && (u.ref && an(u.ref, null, m), w.push(m.ref, m.__c || h, m)), _ == null && h != null && (_ = h), 4 & m.__u || u.__k === m.__k ? g = co(m, g, e) : typeof m.type == "function" && v !== void 0 ? g = v : h && (g = h.nextSibling), m.__u &= -7); return r.__e = _, g; } function $s(e, t, r, n, i) { var o, s, c, g, p, w = r.length, d = w, u = 0; for (e.__k = new Array(i), o = 0; o < i; o++) (s = t[o]) != null && typeof s != "boolean" && typeof s != "function" ? (g = o + u, (s = e.__k[o] = typeof s == "string" || typeof s == "number" || typeof s == "bigint" || s.constructor == String ? Dt(null, s, null, null, null) : zt(s) ? Dt(Pe, { children: s }, null, null, null) : s.constructor == null && s.__b > 0 ? Dt(s.type, s.props, s.key, s.ref ? s.ref : null, s.__v) : s).__ = e, s.__b = e.__b + 1, c = null, (p = s.__i = Bs(s, r, g, d)) != -1 && (d--, (c = r[p]) && (c.__u |= 2)), c == null || c.__v == null ? (p == -1 && (i > w ? u-- : i < w && u++), typeof s.type != "function" && (s.__u |= 4)) : p != g && (p == g - 1 ? u-- : p == g + 1 ? u++ : (p > g ? u-- : u++, s.__u |= 4))) : e.__k[o] = null; if (d) for (o = 0; o < w; o++) (c = r[o]) != null && (2 & c.__u) == 0 && (c.__e == n && (n = Et(c)), mo(c, c)); return n; } function co(e, t, r) { var n, i; if (typeof e.type == "function") { for (n = e.__k, i = 0; n && i < n.length; i++) n[i] && (n[i].__ = e, t = co(n[i], t, r)); return t; } e.__e != t && (t && e.type && !r.contains(t) && (t = Et(e)), r.insertBefore(e.__e, t || null), t = e.__e); do t = t && t.nextSibling; while (t != null && t.nodeType == 8); return t; } function Le(e, t) { return t = t || [], e == null || typeof e == "boolean" || (zt(e) ? e.some(function(r) { Le(r, t); }) : t.push(e)), t; } function Bs(e, t, r, n) { var i, o, s = e.key, c = e.type, g = t[r]; if (g === null && e.key == null || g && s == g.key && c == g.type && (2 & g.__u) == 0) return r; if (n > (g != null && (2 & g.__u) == 0 ? 1 : 0)) for (i = r - 1, o = r + 1; i >= 0 || o < t.length; ) { if (i >= 0) { if ((g = t[i]) && (2 & g.__u) == 0 && s == g.key && c == g.type) return i; i--; } if (o < t.length) { if ((g = t[o]) && (2 & g.__u) == 0 && s == g.key && c == g.type) return o; o++; } } return -1; } function di(e, t, r) { t[0] == "-" ? e.setProperty(t, r ?? "") : e[t] = r == null ? "" : typeof r != "number" || Ws.test(t) ? r : r + "px"; } function ur(e, t, r, n, i) { var o; e: if (t == "style") if (typeof r == "string") e.style.cssText = r; else { if (typeof n == "string" && (e.style.cssText = n = ""), n) for (t in n) r && t in r || di(e.style, t, ""); if (r) for (t in r) n && r[t] == n[t] || di(e.style, t, r[t]); } else if (t[0] == "o" && t[1] == "n") o = t != (t = t.replace(no, "$1")), t = t.toLowerCase() in e || t == "onFocusOut" || t == "onFocusIn" ? t.toLowerCase().slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + o] = r, r ? n ? r.u = n.u : (r.u = rn, e.addEventListener(t, o ? Hr : Br, o)) : e.removeEventListener(t, o ? Hr : Br, o); else { if (i == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s"); else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try { e[t] = r ?? ""; break e; } catch { } typeof r == "function" || (r == null || r === !1 && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && r == 1 ? "" : r)); } } function fi(e) { return function(t) { if (this.l) { var r = this.l[t.type + e]; if (t.t == null) t.t = rn++; else if (t.t < r.u) return; return r(P.event ? P.event(t) : t); } }; } function on(e, t, r, n, i, o, s, c, g, p) { var w, d, u, m, h, _, v, A, O, S, T, W, G, ae, se, le, B, K = t.type; if (t.constructor != null) return null; 128 & r.__u && (g = !!(32 & r.__u), o = [c = t.__e = r.__e]), (w = P.__b) && w(t); e: if (typeof K == "function") try { if (A = t.props, O = "prototype" in K && K.prototype.render, S = (w = K.contextType) && n[w.__c], T = w ? S ? S.props.value : w.__ : n, r.__c ? v = (d = t.__c = r.__c).__ = d.__E : (O ? t.__c = d = new K(A, T) : (t.__c = d = new ye(A, T), d.constructor = K, d.render = Vs), S && S.sub(d), d.props = A, d.state || (d.state = {}), d.context = T, d.__n = n, u = d.__d = !0, d.__h = [], d._sb = []), O && d.__s == null && (d.__s = d.state), O && K.getDerivedStateFromProps != null && (d.__s == d.state && (d.__s = Ce({}, d.__s)), Ce(d.__s, K.getDerivedStateFromProps(A, d.__s))), m = d.props, h = d.state, d.__v = t, u) O && K.getDerivedStateFromProps == null && d.componentWillMount != null && d.componentWillMount(), O && d.componentDidMount != null && d.__h.push(d.componentDidMount); else { if (O && K.getDerivedStateFromProps == null && A !== m && d.componentWillReceiveProps != null && d.componentWillReceiveProps(A, T), !d.__e && d.shouldComponentUpdate != null && d.shouldComponentUpdate(A, d.__s, T) === !1 || t.__v == r.__v) { for (t.__v != r.__v && (d.props = A, d.state = d.__s, d.__d = !1), t.__e = r.__e, t.__k = r.__k, t.__k.some(function(Q) { Q && (Q.__ = t); }), W = 0; W < d._sb.length; W++) d.__h.push(d._sb[W]); d._sb = [], d.__h.length && s.push(d); break e; } d.componentWillUpdate != null && d.componentWillUpdate(A, d.__s, T), O && d.componentDidUpdate != null && d.__h.push(function() { d.componentDidUpdate(m, h, _); }); } if (d.context = T, d.props = A, d.__P = e, d.__e = !1, G = P.__r, ae = 0, O) { for (d.state = d.__s, d.__d = !1, G && G(t), w = d.render(d.props, d.state, d.context), se = 0; se < d._sb.length; se++) d.__h.push(d._sb[se]); d._sb = []; } else do d.__d = !1, G && G(t), w = d.render(d.props, d.state, d.context), d.state = d.__s; while (d.__d && ++ae < 25); d.state = d.__s, d.getChildContext != null && (n = Ce(Ce({}, n), d.getChildContext())), O && !u && d.getSnapshotBeforeUpdate != null && (_ = d.getSnapshotBeforeUpdate(m, h)), le = w, w != null && w.type === Pe && w.key == null && (le = fo(w.props.children)), c = lo(e, zt(le) ? le : [le], t, r, n, i, o, s, c, g, p), d.base = t.__e, t.__u &= -161, d.__h.length && s.push(d), v && (d.__E = d.__ = null); } catch (Q) { if (t.__v = null, g || o != null) if (Q.then) { for (t.__u |= g ? 160 : 128; c && c.nodeType == 8 && c.nextSibling; ) c = c.nextSibling; o[o.indexOf(c)] = null, t.__e = c; } else for (B = o.length; B--; ) nn(o[B]); else t.__e = r.__e, t.__k = r.__k; P.__e(Q, t, r); } else o == null && t.__v == r.__v ? (t.__k = r.__k, t.__e = r.__e) : c = t.__e = Hs(r.__e, t, r, n, i, o, s, g, p); return (w = P.diffed) && w(t), 128 & t.__u ? void 0 : c; } function uo(e, t, r) { for (var n = 0; n < r.length; n++) an(r[n], r[++n], r[++n]); P.__c && P.__c(t, e), e.some(function(i) { try { e = i.__h, i.__h = [], e.some(function(o) { o.call(i); }); } catch (o) { P.__e(o, i.__v); } }); } function fo(e) { return typeof e != "object" || e == null || e.__b && e.__b > 0 ? e : zt(e) ? e.map(fo) : Ce({}, e); } function Hs(e, t, r, n, i, o, s, c, g) { var p, w, d, u, m, h, _, v = r.props, A = t.props, O = t.type; if (O == "svg" ? i = "http://www.w3.org/2000/svg" : O == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i || (i = "http://www.w3.org/1999/xhtml"), o != null) { for (p = 0; p < o.length; p++) if ((m = o[p]) && "setAttribute" in m == !!O && (O ? m.localName == O : m.nodeType == 3)) { e = m, o[p] = null; break; } } if (e == null) { if (O == null) return document.createTextNode(A); e = document.createElementNS(i, O, A.is && A), c && (P.__m && P.__m(t, o), c = !1), o = null; } if (O == null) v === A || c && e.data == A || (e.data = A); else { if (o = o && jt.call(e.childNodes), v = r.props || Mt, !c && o != null) for (v = {}, p = 0; p < e.attributes.length; p++) v[(m = e.attributes[p]).name] = m.value; for (p in v) if (m = v[p], p != "children") { if (p == "dangerouslySetInnerHTML") d = m; else if (!(p in A)) { if (p == "value" && "defaultValue" in A || p == "checked" && "defaultChecked" in A) continue; ur(e, p, null, m, i); } } for (p in A) m = A[p], p == "children" ? u = m : p == "dangerouslySetInnerHTML" ? w = m : p == "value" ? h = m : p == "checked" ? _ = m : c && typeof m != "function" || v[p] === m || ur(e, p, m, v[p], i); if (w) c || d && (w.__html == d.__html || w.__html == e.innerHTML) || (e.innerHTML = w.__html), t.__k = []; else if (d && (e.innerHTML = ""), lo(t.type == "template" ? e.content : e, zt(u) ? u : [u], t, r, n, O == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, o, s, o ? o[0] : r.__k && Et(r, 0), c, g), o != null) for (p = o.length; p--; ) nn(o[p]); c || (p = "value", O == "progress" && h == null ? e.removeAttribute("value") : h != null && (h !== e[p] || O == "progress" && !h || O == "option" && h != v[p]) && ur(e, p, h, v[p], i), p = "checked", _ != null && _ != e[p] && ur(e, p, _, v[p], i)); } return e; } function an(e, t, r) { try { if (typeof e == "function") { var n = typeof e.__u == "function"; n && e.__u(), n && t == null || (e.__u = e(t)); } else e.current = t; } catch (i) { P.__e(i, r); } } function mo(e, t, r) { var n, i; if (P.unmount && P.unmount(e), (n = e.ref) && (n.current && n.current != e.__e || an(n, null, t)), (n = e.__c) != null) { if (n.componentWillUnmount) try { n.componentWillUnmount(); } catch (o) { P.__e(o, t); } n.base = n.__P = null; } if (n = e.__k) for (i = 0; i < n.length; i++) n[i] && mo(n[i], t, r || typeof e.type != "function"); r || nn(e.__e), e.__c = e.__ = e.__e = void 0; } function Vs(e, t, r) { return this.constructor(e, r); } function Ut(e, t, r) { var n, i, o, s; t == document && (t = document.documentElement), P.__ && P.__(e, t), i = (n = typeof r == "function") ? null : r && r.__k || t.__k, o = [], s = [], on(t, e = (!n && r || t).__k = Re(Pe, null, [e]), i || Mt, Mt, t.namespaceURI, !n && r ? [r] : i ? null : t.firstChild ? jt.call(t.childNodes) : null, o, !n && r ? r : i ? i.__e : t.firstChild, n, s), uo(o, e, s); } function po(e, t) { Ut(e, t, po); } function js(e, t, r) { var n, i, o, s, c = Ce({}, e.props); for (o in e.type && e.type.defaultProps && (s = e.type.defaultProps), t) o == "key" ? n = t[o] : o == "ref" ? i = t[o] : c[o] = t[o] == null && s != null ? s[o] : t[o]; return arguments.length > 2 && (c.children = arguments.length > 3 ? jt.call(arguments, 2) : r), Dt(e.type, c, n || e.key, i || e.ref, null); } function _o(e) { function t(r) { var n, i; return this.getChildContext || (n = /* @__PURE__ */ new Set(), (i = {})[t.__c] = this, this.getChildContext = function() { return i; }, this.componentWillUnmount = function() { n = null; }, this.shouldComponentUpdate = function(o) { this.props.value != o.value && n.forEach(function(s) { s.__e = !0, Vr(s); }); }, this.sub = function(o) { n.add(o); var s = o.componentWillUnmount; o.componentWillUnmount = function() { n && n.delete(o), s && s.call(o); }; }), r.children; } return t.__c = "__cC" + io++, t.__ = e, t.Provider = t.__l = (t.Consumer = function(r, n) { return r.children(n); }).contextType = t, t; } jt = oo.slice, P = { __e: function(e, t, r, n) { for (var i, o, s; t = t.__; ) if ((i = t.__c) && !i.__) try { if ((o = i.constructor) && o.getDerivedStateFromError != null && (i.setState(o.getDerivedStateFromError(e)), s = i.__d), i.componentDidCatch != null && (i.componentDidCatch(e, n || {}), s = i.__d), s) return i.__E = i; } catch (c) { e = c; } throw e; } }, eo = 0, ye.prototype.setState = function(e, t) { var r; r = this.__s != null && this.__s != this.state ? this.__s : this.__s = Ce({}, this.state), typeof e == "function" && (e = e(Ce({}, r), this.props)), e && Ce(r, e), e != null && this.__v && (t && this._sb.push(t), Vr(this)); }, ye.prototype.forceUpdate = function(e) { this.__v && (this.__e = !0, e && this.__h.push(e), Vr(this)); }, ye.prototype.render = Pe, et = [], to = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, ro = function(e, t) { return e.__v.__b - t.__v.__b; }, br.__r = 0, no = /(PointerCapture)$|Capture$/i, rn = 0, Br = fi(!1), Hr = fi(!0), io = 0; var Fe, $, Dr, mi, St = 0, ho = [], z = P, pi = z.__b, _i = z.__r, hi = z.diffed, gi = z.__c, bi = z.unmount, vi = z.__; function at(e, t) { z.__h && z.__h($, e, St || t), St = 0; var r = $.__H || ($.__H = { __: [], __h: [] }); return e >= r.__.length && r.__.push({}), r.__[e]; } function Kt(e) { return St = 1, Or(go, e); } function Or(e, t, r) { var n = at(Fe++, 2); if (n.t = e, !n.__c && (n.__ = [r ? r(t) : go(void 0, t), function(c) { var g = n.__N ? n.__N[0] : n.__[0], p = n.t(g, c); g !== p && (n.__N = [p, n.__[1]], n.__c.setState({})); }], n.__c = $, !$.__f)) { var i = function(c, g, p) { if (!n.__c.__H) return !0; var w = n.__c.__H.__.filter(function(u) { return !!u.__c; }); if (w.every(function(u) { return !u.__N; })) return !o || o.call(this, c, g, p); var d = n.__c.props !== c; return w.forEach(function(u) { if (u.__N) { var m = u.__[0]; u.__ = u.__N, u.__N = void 0, m !== u.__[0] && (d = !0); } }), o && o.call(this, c, g, p) || d; }; $.__f = !0; var o = $.shouldComponentUpdate, s = $.componentWillUpdate; $.componentWillUpdate = function(c, g, p) { if (this.__e) { var w = o; o = void 0, i(c, g, p), o = w; } s && s.call(this, c, g, p); }, $.shouldComponentUpdate = i; } return n.__N || n.__; } function Ir(e, t) { var r = at(Fe++, 3); !z.__s && mn(r.__H, t) && (r.__ = e, r.u = t, $.__H.__h.push(r)); } function It(e, t) { var r = at(Fe++, 4); !z.__s && mn(r.__H, t) && (r.__ = e, r.u = t, $.__h.push(r)); } function sn(e) { return St = 5, Gt(function() { return { current: e }; }, []); } function ln(e, t, r) { St = 6, It(function() { if (typeof e == "function") { var n = e(t()); return function() { e(null), n && typeof n == "function" && n(); }; } if (e) return e.current = t(), function() { return e.current = null; }; }, r == null ? r : r.concat(e)); } function Gt(e, t) { var r = at(Fe++, 7); return mn(r.__H, t) && (r.__ = e(), r.__H = t, r.__h = e), r.__; } function cn(e, t) { return St = 8, Gt(function() { return e; }, t); } function un(e) { var t = $.context[e.__c], r = at(Fe++, 9); return r.c = e, t ? (r.__ == null && (r.__ = !0, t.sub($)), t.props.value) : e.__; } function dn(e, t) { z.useDebugValue && z.useDebugValue(t ? t(e) : e); } function zs(e) { var t = at(Fe++, 10), r = Kt(); return t.__ = e, $.componentDidCatch || ($.componentDidCatch = function(n, i) { t.__ && t.__(n, i), r[1](n); }), [r[0], function() { r[1](void 0); }]; } function fn() { var e = at(Fe++, 11); if (!e.__) { for (var t = $.__v; t !== null && !t.__m && t.__ !== null; ) t = t.__; var r = t.__m || (t.__m = [0, 0]); e.__ = "P" + r[0] + "-" + r[1]++; } return e.__; } function Ks() { for (var e; e = ho.shift(); ) if (e.__P && e.__H) try { e.__H.__h.forEach(_r), e.__H.__h.forEach(jr), e.__H.__h = []; } catch (t) { e.__H.__h = [], z.__e(t, e.__v); } } z.__b = function(e) { $ = null, pi && pi(e); }, z.__ = function(e, t) { e && t.__k && t.__k.__m && (e.__m = t.__k.__m), vi && vi(e, t); }, z.__r = function(e) { _i && _i(e), Fe = 0; var t = ($ = e.__c).__H; t && (Dr === $ ? (t.__h = [], $.__h = [], t.__.forEach(function(r) { r.__N && (r.__ = r.__N), r.u = r.__N = void 0; })) : (t.__h.forEach(_r), t.__h.forEach(jr), t.__h = [], Fe = 0)), Dr = $; }, z.diffed = function(e) { hi && hi(e); var t = e.__c; t && t.__H && (t.__H.__h.length && (ho.push(t) !== 1 && mi === z.requestAnimationFrame || ((mi = z.requestAnimationFrame) || Gs)(Ks)), t.__H.__.forEach(function(r) { r.u && (r.__H = r.u), r.u = void 0; })), Dr = $ = null; }, z.__c = function(e, t) { t.some(function(r) { try { r.__h.forEach(_r), r.__h = r.__h.filter(function(n) { return !n.__ || jr(n); }); } catch (n) { t.some(function(i) { i.__h && (i.__h = []); }), t = [], z.__e(n, r.__v); } }), gi && gi(e, t); }, z.unmount = function(e) { bi && bi(e); var t, r = e.__c; r && r.__H && (r.__H.__.forEach(function(n) { try { _r(n); } catch (i) { t = i; } }), r.__H = void 0, t && z.__e(t, r.__v)); }; var wi = typeof requestAnimationFrame == "function"; function Gs(e) { var t, r = function() { clearTimeout(n), wi && cancelAnimationFrame(t), setTimeout(e); }, n = setTimeout(r, 100); wi && (t = requestAnimationFrame(r)); } function _r(e) { var t = $, r = e.__c; typeof r == "function" && (e.__c = void 0, r()), $ = t; } function jr(e) { var t = $; e.__c = e.__(), $ = t; } function mn(e, t) { return !e || e.length !== t.length || t.some(function(r, n) { return r !== e[n]; }); } function go(e, t) { return typeof t == "function" ? t(e) : t; } function bo(e, t) { for (var r in t) e[r] = t[r]; return e; } function zr(e, t) { for (var r in e) if (r !== "__source" && !(r in t)) return !0; for (var n in t) if (n !== "__source" && e[n] !== t[n]) return !0; return !1; } function pn(e, t) { var r = t(), n = Kt({ t: { __: r, u: t } }), i = n[0].t, o = n[1]; return It(function() { i.__ = r, i.u = t, xr(i) && o({ t: i }); }, [e, r, t]), Ir(function() { return xr(i) && o({ t: i }), e(function() { xr(i) && o({ t: i }); }); }, [e]), r; } function xr(e) { var t, r, n = e.u, i = e.__; try { var o = n(); return !((t = i) === (r = o) && (t !== 0 || 1 / t == 1 / r) || t != t && r != r); } catch { return !0; } } function _n(e) { e(); } function hn(e) { return e; } function gn() { return [!1, _n]; } var bn = It; function vr(e, t) { this.props = e, this.context = t; } function vo(e, t) { function r(i) { var o = this.props.ref, s = o == i.ref; return !s && o && (o.call ? o(null) : o.current = null), t ? !t(this.props, i) || !s : zr(this.props, i); } function n(i) { return this.shouldComponentUpdate = r, Re(e, i); } return n.displayName = "Memo(" + (e.displayName || e.name) + ")", n.prototype.isReactComponent = !0, n.__f = !0, n; } (vr.prototype = new ye()).isPureReactComponent = !0, vr.prototype.shouldComponentUpdate = function(e, t) { return zr(this.props, e) || zr(this.state, t); }; var yi = P.__b; P.__b = function(e) { e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), yi && yi(e); }; var qs = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911; function wo(e) { function t(r) { var n = bo({}, r); return delete n.ref, e(n, r.ref || null); } return t.$$typeof = qs, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t; } var Ei = function(e, t) { return e == null ? null : Le(Le(e).map(t)); }, yo = { map: Ei, forEach: Ei, count: function(e) { return e ? Le(e).length : 0; }, only: function(e) { var t = Le(e); if (t.length !== 1) throw "Children.only"; return t[0]; }, toArray: Le }, Ys = P.__e; P.__e = function(e, t, r, n) { if (e.then) { for (var i, o = t; o = o.__; ) if ((i = o.__c) && i.__c) return t.__e == null && (t.__e = r.__e, t.__k = r.__k), i.__c(e, t); } Ys(e, t, r, n); }; var Si = P.unmount; function Eo(e, t, r) { return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(n) { typeof n.__c == "function" && n.__c(); }), e.__c.__H = null), (e = bo({}, e)).__c != null && (e.__c.__P === r && (e.__c.__P = t), e.__c.__e = !0, e.__c = null), e.__k = e.__k && e.__k.map(function(n) { return Eo(n, t, r); })), e; } function So(e, t, r) { return e && r && (e.__v = null, e.__k = e.__k && e.__k.map(function(n) { return So(n, t, r); }), e.__c && e.__c.__P === t && (e.__e && r.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = r)), e; } function xt() { this.__u = 0, this.o = null, this.__b = null; } function To(e) { var t = e.__.__c; return t && t.__a && t.__a(e); } function Oo(e) { var t, r, n; function i(o) { if (t || (t = e()).then(function(s) { r = s.default || s; }, function(s) { n = s; }), n) throw n; if (!r) throw t; return Re(r, o); } return i.displayName = "Lazy", i.__f = !0, i; } function _t() { this.i = null, this.l = null; } P.unmount = function(e) { var t = e.__c; t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), Si && Si(e); }, (xt.prototype = new ye()).__c = function(e, t) { var r = t.__c, n = this; n.o == null && (n.o = []), n.o.push(r); var i = To(n.__v), o = !1, s = function() { o || (o = !0, r.__R = null, i ? i(c) : c()); }; r.__R = s; var c = function() { if (!--n.__u) { if (n.state.__a) { var g = n.state.__a; n.__v.__k[0] = So(g, g.__c.__P, g.__c.__O); } var p; for (n.setState({ __a: n.__b = null }); p = n.o.pop(); ) p.forceUpdate(); } }; n.__u++ || 32 & t.__u || n.setState({ __a: n.__b = n.__v.__k[0] }), e.then(s, s); }, xt.prototype.componentWillUnmount = function() { this.o = []; }, xt.prototype.render = function(e, t) { if (this.__b) { if (this.__v.__k) { var r = document.createElement("div"), n = this.__v.__k[0].__c; this.__v.__k[0] = Eo(this.__b, r, n.__O = n.__P); } this.__b = null; } var i = t.__a && Re(Pe, null, e.fallback); return i && (i.__u &= -33), [Re(Pe, null, t.__a ? null : e.children), i]; }; var Ti = function(e, t, r) { if (++r[1] === r[0] && e.l.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.l.size)) for (r = e.i; r; ) { for (; r.length > 3; ) r.pop()(); if (r[1] < r[0]) break; e.i = r = r[2]; } }; function Xs(e) { return this.getChildContext = function() { return e.context; }, e.children; } function Js(e) { var t = this, r = e.h; t.componentWillUnmount = function() { Ut(null, t.v), t.v = null, t.h = null; }, t.h && t.h !== r && t.componentWillUnmount(), t.v || (t.h = r, t.v = { nodeType: 1, parentNode: r, childNodes: [], contains: function() { return !0; }, appendChild: function(n) { this.childNodes.push(n), t.h.appendChild(n); }, insertBefore: function(n, i) { this.childNodes.push(n), t.h.insertBefore(n, i); }, removeChild: function(n) { this.childNodes.splice(this.childNodes.indexOf(n) >>> 1, 1), t.h.removeChild(n); } }), Ut(Re(Xs, { context: t.context }, e.__v), t.v); } function Io(e, t) { var r = Re(Js, { __v: e, h: t }); return r.containerInfo = t, r; } (_t.prototype = new ye()).__a = function(e) { var t = this, r = To(t.__v), n = t.l.get(e); return n[0]++, function(i) { var o = function() { t.props.revealOrder ? (n.push(i), Ti(t, e, n)) : i(); }; r ? r(o) : o(); }; }, _t.prototype.render = function(e) { this.i = null, this.l = /* @__PURE__ */ new Map(); var t = Le(e.children); e.revealOrder && e.revealOrder[0] === "b" && t.reverse(); for (var r = t.length; r--; ) this.l.set(t[r], this.i = [1, 0, this.i]); return e.children; }, _t.prototype.componentDidUpdate = _t.prototype.componentDidMount = function() { var e = this; this.l.forEach(function(t, r) { Ti(e, r, t); }); }; var Ao = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Zs = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, Qs = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, el = /[A-Z0-9]/g, tl = typeof document < "u", rl = function(e) { return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e); }; function Co(e, t, r) { return t.__k == null && (t.textContent = ""), Ut(e, t), typeof r == "function" && r(), e ? e.__c : null; } function Ro(e, t, r) { return po(e, t), typeof r == "function" && r(), e ? e.__c : null; } ye.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) { Object.defineProperty(ye.prototype, e, { configurable: !0, get: function() { return this["UNSAFE_" + e]; }, set: function(t) { Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t }); } }); }); var Oi = P.event; function nl() { } function il() { return this.cancelBubble; } function ol() { return this.defaultPrevented; } P.event = function(e) { return Oi && (e = Oi(e)), e.persist = nl, e.isPropagationStopped = il, e.isDefaultPrevented = ol, e.nativeEvent = e; }; var vn, al = { enumerable: !1, configurable: !0, get: function() { return this.class; } }, Ii = P.vnode; P.vnode = function(e) { typeof e.type == "string" && function(t) { var r = t.props, n = t.type, i = {}, o = n.indexOf("-") === -1; for (var s in r) { var c = r[s]; if (!(s === "value" && "defaultValue" in r && c == null || tl && s === "children" && n === "noscript" || s === "class" || s === "className")) { var g = s.toLowerCase(); s === "defaultValue" && "value" in r && r.value == null ? s = "value" : s === "download" && c === !0 ? c = "" : g === "translate" && c === "no" ? c = !1 : g[0] === "o" && g[1] === "n" ? g === "ondoubleclick" ? s = "ondblclick" : g !== "onchange" || n !== "input" && n !== "textarea" || rl(r.type) ? g === "onfocus" ? s = "onfocusin" : g === "onblur" ? s = "onfocusout" : Qs.test(s) && (s = g) : g = s = "oninput" : o && Zs.test(s) ? s = s.replace(el, "-$&").toLowerCase() : c === null && (c = void 0), g === "oninput" && i[s = g] && (s = "oninputCapture"), i[s] = c; } } n == "select" && i.multiple && Array.isArray(i.value) && (i.value = Le(r.children).forEach(function(p) { p.props.selected = i.value.indexOf(p.props.value) != -1; })), n == "select" && i.defaultValue != null && (i.value = Le(r.children).forEach(function(p) { p.props.selected = i.multiple ? i.defaultValue.indexOf(p.props.value) != -1 : i.defaultValue == p.props.value; })), r.class && !r.className ? (i.class = r.class, Object.defineProperty(i, "className", al)) : (r.className && !r.class || r.class && r.className) && (i.class = i.className = r.className), t.props = i; }(e), e.$$typeof = Ao, Ii && Ii(e); }; var Ai = P.__r; P.__r = function(e) { Ai && Ai(e), vn = e.__c; }; var Ci = P.diffed; P.diffed = function(e) { Ci && Ci(e); var t = e.props, r = e.__e; r != null && e.type === "textarea" && "value" in t && t.value !== r.value && (r.value = t.value == null ? "" : t.value), vn = null; }; var Po = { ReactCurrentDispatcher: { current: { readContext: function(e) { return vn.__n[e.__c].props.value; }, useCallback: cn, useContext: un, useDebugValue: dn, useDeferredValue: hn, useEffect: Ir, useId: fn, useImperativeHandle: ln, useInsertionEffect: bn, useLayoutEffect: It, useMemo: Gt, useReducer: Or, useRef: sn, useState: Kt, useSyncExternalStore: pn, useTransition: gn } } }, sl = "18.3.1"; function ko(e) { return Re.bind(null, e); } function qt(e) { return !!e && e.$$typeof === Ao; } function No(e) { return qt(e) && e.type === Pe; } function Do(e) { return !!e && !!e.displayName && (typeof e.displayName == "string" || e.displayName instanceof String) && e.displayName.startsWith("Memo("); } function xo(e) { return qt(e) ? js.apply(null, arguments) : e; } function Lo(e) { return !!e.__k && (Ut(null, e), !0); } function Fo(e) { return e && (e.base || e.nodeType === 1 && e) || null; } var Mo = function(e, t) { return e(t); }, Uo = function(e, t) { return e(t); }, Wo = Pe, $o = qt, Kr = { useState: Kt, useId: fn, useReducer: Or, useEffect: Ir, useLayoutEffect: It, useInsertionEffect: bn, useTransition: gn, useDeferredValue: hn, useSyncExternalStore: pn, startTransition: _n, useRef: sn, useImperativeHandle: ln, useMemo: Gt, useCallback: cn, useContext: un, useDebugValue: dn, version: "18.3.1", Children: yo, render: Co, hydrate: Ro, unmountComponentAtNode: Lo, createPortal: Io, createElement: Re, createContext: _o, createFactory: ko, cloneElement: xo, createRef: ao, Fragment: Pe, isValidElement: qt, isElement: $o, isFragment: No, isMemo: Do, findDOMNode: Fo, Component: ye, PureComponent: vr, memo: vo, forwardRef: wo, flushSync: Uo, unstable_batchedUpdates: Mo, StrictMode: Wo, Suspense: xt, SuspenseList: _t, lazy: Oo, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Po }; const ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Children: yo, Component: ye, Fragment: Pe, PureComponent: vr, StrictMode: Wo, Suspense: xt, SuspenseList: _t, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Po, cloneElement: xo, createContext: _o, createElement: Re, createFactory: ko, createPortal: Io, createRef: ao, default: Kr, findDOMNode: Fo, flushSync: Uo, forwardRef: wo, hydrate: Ro, isElement: $o, isFragment: No, isMemo: Do, isValidElement: qt, lazy: Oo, memo: vo, render: Co, startTransition: _n, unmountComponentAtNode: Lo, unstable_batchedUpdates: Mo, useCallback: cn, useContext: un, useDebugValue: dn, useDeferredValue: hn, useEffect: Ir, useErrorBoundary: zs, useId: fn, useImperativeHandle: ln, useInsertionEffect: bn, useLayoutEffect: It, useMemo: Gt, useReducer: Or, useRef: sn, useState: Kt, useSyncExternalStore: pn, useTransition: gn, version: sl }, Symbol.toStringTag, { value: "Module" })), cl = (e) => e; function ul(e, t = cl) { const r = Kr.useSyncExternalStore( e.subscribe, () => t(e.getState()), () => t(e.getInitialState()) ); return Kr.useDebugValue(r), r; } const Ri = (e) => { const t = Us(e), r = (n) => ul(t, n); return Object.assign(r, t), r; }, st = (e) => e ? Ri(e) : Ri, dr = { INITIALIZE: "initialize", ADD: "add", CHANGE: "change", REMOVE: "remove" }, wn = st(() => ({ features: void 0, isUsing: !1 })), $u = (e, t) => { wn.setState((r) => { const n = ks({ ...r.features, [e]: t }); return { features: n, isUsing: !tn(n) }; }); }; wn.subscribe((e) => { fl.getState().emitFeatureChanged(e); }); const dl = (e, t) => { if (e === void 0 && t === void 0) return; const r = { ...(e == null ? void 0 : e.features) || {} }, n = { ...(t == null ? void 0 : t.features) || {} }; if (e === void 0) return Object.entries(n).map(([c, g]) => ({ action: dr.INITIALIZE, feature: c, variant: g })); const i = [], o = [...Object.keys(n), ...Object.keys(r)], s = [...new Set(o)]; for (const c of s) { const g = r[c], p = n[c]; g !== p && (g === void 0 && p !== void 0 && i.push({ action: dr.ADD, feature: c, variant: p }), g !== void 0 && p !== void 0 && i.push({ action: dr.CHANGE, feature: c, variant: p }), g !== void 0 && p === void 0 && i.push({ action: dr.REMOVE, feature: c })); } return i; }, fl = st((e, t) => ({ prev: void 0, emitFeatureChanged: (r) => { const n = t().prev; if (n === void 0 && e({ prev: { isUsing: r.isUsing } }), Zi(n, r)) return; const o = dl(n, r); tn(o) || (Ds.featureChanged({ actions: o, ...r }), e({ prev: { ...r } })); } })); let Pi = !1; const Bo = async () => { if (Pi) return; const [e, t] = await ot(() => import("./initialize.lazy.DBPvzHY-.js"))(); if (e) { console.error("Failed to import initialize:", e); return; } t.initialize(), Pi = !0; }; wn.subscribe((e) => { e.isUsing && Bo(); }); class ki extends Error { constructor(t) { super(t.message); } } const Ho = (e) => e instanceof SyntaxError || e instanceof TypeError || e instanceof Error ? new ki(e) : new ki(new Error(`UnknownError: ${e}`)), ml = (e) => { try { return U(JSON.parse(e)); } catch (t) { return F(Ho(t)); } }, pl = (e) => { try { return U(JSON.stringify(e)); } catch (t) { return F(Ho(t)); } }, _l = "meta", hl = (e) => `${e}-${_l}`, Wt = (e, t) => { if (!localStorage) return U(void 0); const r = localStorage.getItem(e); if (r === null) return U(void 0); const n = ml(r); return n.isErr() ? (Ar(e), F(n.error)) : U(n.value); }, Tt = (e, t, r) => { const n = pl(t); return n.isErr() ? F(n.error) : (localStorage == null || localStorage.setItem(e, n.value), U(void 0)); }, Ar = (e) => { localStorage && (localStorage.removeItem(e), localStorage.removeItem(hl(e))); }; class gl { constructor() { H(this, "KEY", "uniweb-feature_settings"); H(this, "getCurrentFeatures", () => { var r; const t = Wt(this.KEY); return t.isErr() ? F(t.error) : ((r = t.value) != null && r.largeWidget && (delete t.value.largeWidget, Tt(this.KEY, t.value)), U(t.value)); }); H(this, "getCurrentFeature", (t) => { const r = this.getCurrentFeatures(); if (r.isErr()) { console.error("failed to get current features from session storage: ", r.error.message); return; } return r.value ? r.value[t] : void 0; }); H(this, "setFeature", (t, r) => { const n = this.getCurrentFeatures(); if (n.isErr()) { console.error("failed to get current features from session storage: ", n.error.message); return; } const i = n.value || {}; r === void 0 ? delete i[t] : i[t] = r, Tt(this.KEY, i); }); } } var bt; class bl { constructor() { we(this, bt, "uniweb-language"); H(this, "getCurrentLanguage", () => { const t = Wt(J(this, bt)); return t.isErr() ? F(t.error) : U(t.value); }); H(this, "saveCurrentLanguage", (t) => { Tt(J(this, bt), t); }); H(this, "deleteCurrentLanguage", () => { Ar(J(this, bt)); }); } } bt = new WeakMap(); class Yt extends Error { constructor(t) { super(t.message), this.name = new.target.name; } } const vl = /\{[^{}]+\}/g; function wl() { return Math.random().toString(36).slice(2, 11); } function yl(e) { let { baseUrl: t = "", Request: r = globalThis.Request, fetch: n = globalThis.fetch, querySerializer: i, bodySerializer: o, headers: s, ...c } = { ...e }; t = Di(t); const g = []; async function p(w, d) { const { baseUrl: u, fetch: m = n, Request: h = r, headers: _, params: v = {}, parseAs: A = "json", querySerializer: O, bodySerializer: S = o ?? Sl, body: T, ...W } = d || {}; u && (t = Di(u)); let G = typeof i == "function" ? i : Ni(i); O && (G = typeof O == "function" ? O : Ni({ ...typeof i == "object" ? i : {}, ...O })); const ae = T === void 0 ? void 0 : S(T), se = ( // with no body, we should not to set Content-Type ae === void 0 || // if serialized body is FormData; browser will correctly set Content-Type & boundary expression ae instanceof FormData ? {} : { "Content-Type": "application/json" } ), le = { redirect: "follow", ...c, ...W, body: ae, headers: Ol(se, s, _, v.header) }; let B, K, Q = new r(Tl(w, { baseUrl: t, params: v, querySerializer: G }), le); for (const ie in W) ie in Q || (Q[ie] = W[ie]); if (g.length) { B = wl(), K = Object.freeze({ baseUrl: t, fetch: m, parseAs: A, querySerializer: G, bodySerializer: S }); for (const ie of g) if (ie && typeof ie == "object" && typeof ie.onRequest == "function") { const oe = await ie.onRequest({ request: Q, schemaPath: w, params: v, options: K, id: B }); if (oe) { if (!(oe instanceof r)) throw new Error("onRequest: must return new Request() when modifying the request"); Q = oe; } } } let q = await m(Q); if (g.length) for (let ie = g.length - 1; ie >= 0; ie--) { const oe = g[ie]; if (oe && typeof oe == "object" && typeof oe.onResponse == "function") { const ge = await oe.onResponse({ request: Q, response: q, schemaPath: w, params: v, options: K, id: B }); if (ge) { if (!(ge instanceof Response)) throw new Error("onResponse: must return new Response() when modifying the response"); q = ge; } } } if (q.status === 204 || q.headers.get("Content-Length") === "0") return q.ok ? { data: {}, response: q } : { error: {}, response: q }; if (q.ok) return A === "stream" ? { data: q.body, response: q } : { data: await q[A](), response: q }; let Te = await q.text(); try { Te = JSON.parse(Te); } catch { } return { error: Te, response: q }; } return { /** Call a GET endpoint */ GET(w, d) { return p(w, { ...d, method: "GET" }); }, /** Call a PUT endpoint */ PUT(w, d) { return p(w, { ...d, method: "PUT" }); }, /** Call a POST endpoint */ POST(w, d) { return p(w, { ...d, method: "POST" }); }, /** Call a DELETE endpoint */ DELETE(w, d) { return p(w, { ...d, method: "DELETE" }); }, /** Call a OPTIONS endpoint */ OPTIONS(w, d) { return p(w, { ...d, method: "OPTIONS" }); }, /** Call a HEAD endpoint */ HEAD(w, d) { return p(w, { ...d, method: "HEAD" }); }, /** Call a PATCH endpoint */ PATCH(w, d) { return p(w, { ...d, method: "PATCH" }); }, /** Call a TRACE endpoint */ TRACE(w, d) { return p(w, { ...d, method: "TRACE" }); }, /** Register middleware */ use(...w) { for (const d of w) if (d) { if (typeof d != "object" || !("onRequest" in d || "onResponse" in d)) throw new Error("Middleware must be an object with one of `onRequest()` or `onResponse()`"); g.push(d); } }, /** Unregister middleware */ eject(...w) { for (const d of w) { const u = g.indexOf(d); u !== -1 && g.splice(u, 1); } } }; } function Cr(e, t, r) { if (t == null) return ""; if (typeof t == "object") throw new Error( "Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these." ); return `${e}=${(r == null ? void 0 : r.allowReserved) === !0 ? t : encodeURIComponent(t)}`; } function Vo(e, t, r) { if (!t || typeof t != "object") return ""; const n = [], i = { simple: ",", label: ".", matrix: ";" }[r.style] || "&"; if (r.style !== "deepObject" && r.explode === !1) { for (const c in t) n.push(c, r.allowReserved === !0 ? t[c] : encodeURIComponent(t[c])); const s = n.join(","); switch (r.style) { case "form": return `${e}=${s}`; case "label": return `.${s}`; case "matrix": return `;${e}=${s}`; default: return s; } } for (const s in t) { const c = r.style === "deepObject" ? `${e}[${s}]` : s; n.push(Cr(c, t[s], r)); } const o = n.join(i); return r.style === "label" || r.style === "matrix" ? `${i}${o}` : o; } function jo(e, t, r) { if (!Array.isArray(t)) return ""; if (r.explode === !1) { const o = { form: ",", spaceDelimited: "%20", pipeDelimited: "|" }[r.style] || ",", s = (r.allowReserved === !0 ? t : t.map((c) => encodeURIComponent(c))).join(o); switch (r.style) { case "simple": return s; case "label": return `.${s}`; case "matrix": return `;${e}=${s}`; // case "spaceDelimited": // case "pipeDelimited": default: return `${e}=${s}`; } } const n = { simple: ",", label: ".", matrix: ";" }[r.style] || "&", i = []; for (const o of t) r.style === "simple" || r.style === "label" ? i.push(r.allowReserved === !0 ? o : encodeURIComponent(o)) : i.push(Cr(e, o, r)); return r.style === "label" || r.style === "matrix" ? `${n}${i.join(n)}` : i.join(n); } function Ni(e) { return function(r) { const n = []; if (r && typeof r == "object") for (const i in r) { const o = r[i]; if (o != null) { if (Array.isArray(o)) { if (o.length === 0) continue; n.push( jo(i, o, { style: "form", explode: !0, ...e == null ? void 0 : e.array, allowReserved: (e == null ? void 0 : e.allowReserved) || !1 }) ); continue; } if (typeof o == "object") { n.push( Vo(i, o, { style: "deepObject", explode: !0, ...e == null ? void 0 : e.object, allowReserved: (e == null ? void 0 : e.allowReserved) || !1 }) ); continue; } n.push(Cr(i, o, e)); } } return n.join("&"); }; } function El(e, t) { let r = e; for (const n of e.match(vl) ?? []) { let i = n.substring(1, n.length - 1), o = !1, s = "simple"; if (i.endsWith("*") && (o = !0, i = i.substring(0, i.length - 1)), i.startsWith(".") ? (s = "label", i = i.substring(1)) : i.startsWith(";") && (s = "matrix", i = i.substring(1)), !t || t[i] === void 0 || t[i] === null) continue; const c = t[i]; if (Array.isArray(c)) { r = r.replace(n, jo(i, c, { style: s, explode: o })); continue; } if (typeof c == "object") { r = r.replace(n, Vo(i, c, { style: s, explode: o })); continue; } if (s === "matrix") { r = r.replace(n, `;${Cr(i, c)}`); continue; } r = r.replace(n, s === "label" ? `.${encodeURIComponent(c)}` : encodeURIComponent(c)); } return r; } function Sl(e) { return e instanceof FormData ? e : JSON.stringify(e); } function Tl(e, t) { var i; let r = `${t.baseUrl}${e}`; (i = t.params) != null && i.path && (r = El(r, t.params.path)); let n = t.querySerializer(t.params.query ?? {}); return n.startsWith("?") && (n = n.substring(1)), n && (r += `?${n}`), r; } function Ol(...e) { const t = new Headers(); for (const r of e) { if (!r || typeof r != "object") continue; const n = r instanceof Headers ? r.entries() : Object.entries(r); for (const [i, o] of n) if (o === null) t.delete(i); else if (Array.isArray(o)) for (const s of o) t.append(i, s); else o !== void 0 && t.set(i, o); } return t; } function Di(e) { return e.endsWith("/") ? e.substring(0, e.length - 1) : e; } const Xt = yl({ baseUrl: "https://api.hellouniweb.com" }), Rr = () => gs(window.location.href) || ""; class Il { constructor() { H(this, "getDefinition", async (t, r, n) => { const { data: i, error: o, response: s } = await Xt.POST("/2023-11-07/dictionary/{account}", { params: { path: { account: t }, header: { Origin: Rr() } }, body: { word: r, type: n } }); return o ? F(o) : s.ok ? U({ word: i.word, definition: i.definition }) : F(new Yt({ message: "failed to get text" })); }); } } class Al { constructor() { H(this, "save", async (t) => { const { error: r } = await Xt.POST("/2023-11-07/feedback/{account}", { params: { path: { account: Ft } }, body: { body: t.body, host: t.host, url: t.url, type: t.type } }); return r ? F(r) : U(void 0); }); } } class Cl { constructor() { H(this, "getImgAlts", async (t, r) => { const n = r.origin + r.pathname, { data: i, error: o, response: s } = await Xt.POST("/2023-11-07/img-alt/{account}", { params: { path: { account: t }, header: { Origin: Rr() } }, body: { url: n } }); return o ? F(o) : s.ok ? U( i.img_alts.map((c) => ({ alt: c.alt, src: c.img_src })) ) : F(new Yt({ message: "failed to get img-alt" })); }); } } class Rl { constructor() { H(this, "pdf2Text", async (t, r) => { const { data: n, error: i, response: o } = await Xt.POST("/2023-11-07/pdf2text/{account}", { params: { path: { account: t }, header: { Origin: Rr() } }, body: { url: r.href } }); return i ? F(i) : o.ok ? U(n.texts) : F(new Yt({ message: "failed to get pdf text" })); }); } } class Pl { constructor() { H(this, "KEY", "uniweb-disabled_shortcut_key"); H(this, "getIsDisabledShortcutKey", () => { const t = Wt(this.KEY); return t.isErr() ? F(t.error) : U(t.value); }); H(this, "setDisabledShortcutKey", (t, r) => { const n = this.getIsDisabledShortcutKey(); if (n.isErr()) { console.error("[uniweb] Failed to get shortcut key settings from session storage: ", n.error.message); return; } const i = n.value || {}; if (r === !1 ? delete i[t] : i[t] = r, Object.keys(i).length === 0) { Ar(this.KEY); return; } Tt(this.KEY, i); }); } } const kl = { RIGHT_BOTTOM: "right_bottom", RIGHT_MIDDLE: "right_middle", RIGHT_TOP: "right_top", LEFT_BOTTOM: "left_bottom", LEFT_MIDDLE: "left_middle", LEFT_TOP: "left_top", CENTER_TOP: "center_top", CENTER_BOTTOM: "center_bottom" }, Bu = { ROUND: "round", BOOKMARK: "bookmark" }, Hu = { ACCESSIBILITY: "accessibility", WHEELCHAIR: "wheelchair", CANE_USER: "cane_user", CONTROL_KNOB: "control_knob", ACCESSIBILITY_AND_TRANSLATE: "accessibility_and_translate", ACCESSIBILITY_AND_LANGUAGE: "accessibility_and_language" }, Vu = { MEDIUM: 65 }, ju = { BASIC: "basic", TIGHT: "tight" }, Nl = () => /* @__PURE__ */ new Map(), mt = (e) => { if (e === void 0 || e === "") return 0; const t = Number.parseFloat(e); return Number.isNaN(t) ? 0 : t; }, Dl = (...e) => { }, zu = (e) => Math.random() < 1 / e, xl = (e, t) => { import("./lazy.DdFfPfs5.js").then((r) => { r.traceBySentry(e, t); }).catch((r) => { console.error("Failed to load module:", r); }); }, Ll = (e) => { import("./lazy.DdFfPfs5.js").then((t) => { t.captureException(e); }).catch((t) => { console.error("Failed to load module:", t); }); }, Fl = async (e) => { const t = e.status; switch (t) { case 204: return U({ data: {}, status: t }); case 404: return F({ error: new Error("Not Found"), status: t }); } const r = await zi(e.json(), (n) => new Error(`Parse Error: ${n}`)); return r.isErr() ? F({ error: r.error, status: t }) : U({ data: r.value, status: t }); }; async function Ml(e, t) { const r = { Accept: "application/json" }, n = await zi( fetch(e, { method: t == null ? void 0 : t.method, mode: "cors", body: t == null ? void 0 : t.body, headers: r }), (i) => (t != null && t.captureTypeError && i instanceof TypeError && Ll(i), { error: new Error(`Fetch API Error: ${i}`) }) ); return n.isErr() ? F(n.error) : Fl(n.value); } function zo(e, t) { return Ml(e, { ...t, method: "GET" }); } const Ul = () => { const e = `${Vi}/assets/uniweb/preference.json`; return zo(e, { captureTypeError: !0 }); }, Wl = (e, t) => { const r = `${Vi}/assets/2023-11-07/${e}/${t}/uniweb/preference.json`; return zo(r, { captureTypeError: !0 }); }; var me, Ko, Go, qo, Yo, Xo, Jo; class $l { constructor() { we(this, me); } async getSitePreference(t, r) { const n = await ve(this, me, Ko).call(this, t, r); return n.isErr() ? F(n.error) : n.value.enabled ? U(ve(this, me, Xo).call(this, n.value)) : F(new Yt({ message: "uniweb sdk is not enabled" })); } } me = new WeakSet(), Ko = async function(t, r) { const [n, i] = await Promise.all([Ul(), Wl(t, r)]); return n.isErr() ? F(n.error.error) : i.isErr() ? F(i.error.error) : U(ve(this, me, Go).call(this, n.value.data, i.value.data)); }, Go = function(t, r) { const n = r; return n.widget.widget_features = ve(this, me, qo).call(this, t.widget.widget_features, r.widget.widget_features ?? []), n.widget.site_optimizers = ve(this, me, Yo).call(this, t.widget.site_optimizers, r.widget.site_optimizers ?? []), n; }, // sitePrefにない機能を末尾に追加 qo = function(t, r) { const n = new Map(r.map((i) => [i.name, i])); for (const i of t) n.has(i.name) || n.set(i.name, i); return Array.from(n.values()); }, Yo = function(t, r) { const n = new Map(r.map((i) => [i.name, i])); for (const i of t) n.has(i.name) || n.set(i.name, i); return Array.from(n.values()); }, Xo = function(t) { var i, o, s, c, g; const r = t.widget, n = Nl(); if (r.widget_features) for (const p of r.widget_features) n.set(p.name, p.is_hidden); return { accessibilityLinkEnabled: r.accessibility_link_enabled, accessibilityLinkText: r.accessibility_link_text, accessibilityUrl: r.accessibility_url, widgetColor: r.widget_color, widgetIconType: r.widget_icon, widgetIconShape: r.widget_shape, widgetPanelType: r.widget_panel_type, iconPreference: { pc: { iconPosition: r.widget_position, iconPositionY: mt(r.widget_floating_position_vertical), iconPositionX: mt(r.widget_floating_position_horizontal), iconSize: mt(r.widget_size) }, sp: { iconPosition: r.mobile_widget_position || kl.RIGHT_BOTTOM, iconPositionY: mt(r.mobile_widget_floating_position_vertical), iconPositionX: mt(r.mobile_widget_floating_position_horizontal), iconSize: mt(r.mobile_widget_size) } }, widgetFeatures: n, isIconHidden: r.widget_icon_hide, panelOpenSelectors: r.widget_panel_open_selectors, isLogoHidden: r.is_logo_hidden, logoDir: r.logo_dir, properNouns: r.proper_nouns, allSiteOptimizersDisabled: r.all_site_optimizers_disabled ?? !1, disabledSiteOptimizers: ve(this, me, Jo).call(this, r.site_optimizers), hasImgAlt: ((i = t.advanced_meta) == null ? void 0 : i.has_img_alt) ?? !1, hasVideoCaption: ((o = t.advanced_meta) == null ? void 0 : o.has_video_caption) ?? !1, addonMeta: { siteTranslationEnabled: ((s = t.addon_meta) == null ? void 0 : s.site_translation_enabled) ?? !1, unilingoSwitcherEnabled: ((c = t.addon_meta) == null ? void 0 : c.unilingo_switcher_enabled) ?? !1, unishareEnabled: ((g = t.addon_meta) == null ? void 0 : g.unishare_enabled) ?? !1 } }; }, Jo = function(t) { return t ? t.filter((r) => r.disabled).map((r) => r.name) : []; }; class Bl { constructor() { H(this, "getVideoCaptions", async (t, r, n) => { const i = r.origin + r.pathname, { data: o, error: s, response: c } = await Xt.POST("/2023-11-07/video-caption/{account}", { params: { path: { account: t }, header: { Origin: Rr() } }, body: { url: i, video_srcs: n } }); if (s) return F(s); if (!c.ok) return F(new Yt({ message: "failed to get preference" })); const g = o.video_captions.map((p) => ({ videoSrc: p.video_src, tracks: p.tracks.map((w) => ({ src: w.src, label: w.label, lang: w.lang, kind: w.kind })) })); return U(g); }); } } const Pt = { NEXT: "NEXT", DAY: "DAY", WEEK: "WEEK", MONTH: "MONTH", NEVER: "NEVER" }, Hl = () => { const e = /* @__PURE__ */ new Date(); return e.setDate(e.getDate() + 1), e; }, Vl = () => { const e = /* @__PURE__ */ new Date(); return e.setDate(e.getDate() + 7), e; }, jl = () => { const e = /* @__PURE__ */ new Date(); return e.setMonth(e.getMonth() + 1), e; }, fe = Symbol.for("@ts-pattern/matcher"), Zo = Symbol.for("@ts-pattern/isVariadic"), wr = "@ts-pattern/anonymous-select-key", Gr = (e) => !!(e && typeof e == "object"), hr = (e) => e && !!e[fe], re = (e, t, r) => { if (hr(e)) { const n = e[fe](), { matched: i, selections: o } = n.match(t); return i && o && Object.keys(o).forEach((s) => r(s, o[s])), i; } if (Gr(e)) { if (!Gr(t)) return !1; if (Array.isArray(e)) { if (!Array.isArray(t)) return !1; let n = [], i = [], o = []; for (const s of e.keys()) { const c = e[s]; hr(c) && c[Zo] ? o.push(c) : o.length ? i.push(c) : n.push(c); } if (o.length) { if (o.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed."); if (t.length < n.length + i.length) return !1; const s = t.slice(0, n.length), c = i.length === 0 ? [] : t.slice(-i.length), g = t.slice(n.length, i.length === 0 ? 1 / 0 : -i.length); return n.every((p, w) => re(p, s[w], r)) && i.every((p, w) => re(p, c[w], r)) && (o.length === 0 || re(o[0], g, r)); } return e.length === t.length && e.every((s, c) => re(s, t[c], r)); } return Reflect.ownKeys(e).every((n) => { const i = e[n]; return (n in t || hr(o = i) && o[fe]().matcherType === "optional") && re(i, t[n], r); var o; }); } return Object.is(t, e); }, he = (e) => { var t, r, n; return Gr(e) ? hr(e) ? (t = (r = (n = e[fe]()).getSelectionKeys) == null ? void 0 : r.call(n)) != null ? t : [] : Array.isArray(e) ? $t(e, he) : $t(Object.values(e), he) : []; }, $t = (e, t) => e.reduce((r, n) => r.concat(t(n)), []); function zl(...e) { if (e.length === 1) { const [t] = e; return (r) => re(t, r, () => { }); } if (e.length === 2) { const [t, r] = e; return re(t, r, () => { }); } throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`); } function ne(e) { return Object.assign(e, { optional: () => yn(e), and: (t) => j(e, t), or: (t) => Qo(e, t), select: (t) => t === void 0 ? Bt(e) : Bt(t, e) }); } function qr(e) { return Object.assign(((t) => Object.assign(t, { [Symbol.iterator]() { let r = 0; const n = [{ value: Object.assign(t, { [Zo]: !0 }), done: !1 }, { done: !0, value: void 0 }]; return { next: () => { var i; return (i = n[r++]) != null ? i : n.at(-1); } }; } }))(e), { optional: () => qr(yn(e)), select: (t) => qr(t === void 0 ? Bt(e) : Bt(t, e)) }); } function yn(e) { return ne({ [fe]: () => ({ match: (t) => { let r = {}; const n = (i, o) => { r[i] = o; }; return t === void 0 ? (he(e).forEach((i) => n(i, void 0)), { matched: !0, selections: r }) : { matched: re(e, t, n), selections: r }; }, getSelectionKeys: () => he(e), matcherType: "optional" }) }); } const Kl = (e, t) => { for (const r of e) if (!t(r)) return !1; return !0; }, Gl = (e, t) => { for (const [r, n] of e.entries()) if (!t(n, r)) return !1; return !0; }; function j(...e) { return ne({ [fe]: () => ({ match: (t) => { let r = {}; const n = (i, o) => { r[i] = o; }; return { matched: e.every((i) => re(i, t, n)), selections: r }; }, getSelectionKeys: () => $t(e, he), matcherType: "and" }) }); } function Qo(...e) { return ne({ [fe]: () => ({ match: (t) => { let r = {}; const n = (i, o) => { r[i] = o; }; return $t(e, he).forEach((i) => n(i, void 0)), { matched: e.some((i) => re(i, t, n)), selections: r }; }, getSelectionKeys: () => $t(e, he), matcherType: "or" }) }); } function x(e) { return { [fe]: () => ({ match: (t) => ({ matched: !!e(t) }) }) }; } function Bt(...e) { const t = typeof e[0] == "string" ? e[0] : void 0, r = e.length === 2 ? e[1] : typeof e[0] == "string" ? void 0 : e[0]; return ne({ [fe]: () => ({ match: (n) => { let i = { [t ?? wr]: n }; return { matched: r === void 0 || re(r, n, (o, s) => { i[o] = s; }), selections: i }; }, getSelectionKeys: () => [t ?? wr].concat(r === void 0 ? [] : he(r)) }) }); } function Ie(e) { return typeof e == "number"; } function We(e) { return typeof e == "string"; } function $e(e) { return typeof e == "bigint"; } const ea = ne(x(function(e) { return !0; })), ql = ea, Be = (e) => Object.assign(ne(e), { startsWith: (t) => { return Be(j(e, (r = t, x((n) => We(n) && n.startsWith(r))))); var r; }, endsWith: (t) => { return Be(j(e, (r = t, x((n) => We(n) && n.endsWith(r))))); var r; }, minLength: (t) => Be(j(e, ((r) => x((n) => We(n) && n.length >= r))(t))), length: (t) => Be(j(e, ((r) => x((n) => We(n) && n.length === r))(t))), maxLength: (t) => Be(j(e, ((r) => x((n) => We(n) && n.length <= r))(t))), includes: (t) => { return Be(j(e, (r = t, x((n) => We(n) && n.includes(r))))); var r; }, regex: (t) => { return Be(j(e, (r = t, x((n) => We(n) && !!n.match(r))))); var r; } }), Yl = Be(x(We)), Ae = (e) => Object.assign(ne(e), { between: (t, r) => Ae(j(e, ((n, i) => x((o) => Ie(o) && n <= o && i >= o))(t, r))), lt: (t) => Ae(j(e, ((r) => x((n) => Ie(n) && n < r))(t))), gt: (t) => Ae(j(e, ((r) => x((n) => Ie(n) && n > r))(t))), lte: (t) => Ae(j(e, ((r) => x((n) => Ie(n) && n <= r))(t))), gte: (t) => Ae(j(e, ((r) => x((n) => Ie(n) && n >= r))(t))), int: () => Ae(j(e, x((t) => Ie(t) && Number.isInteger(t)))), finite: () => Ae(j(e, x((t) => Ie(t) && Number.isFinite(t)))), positive: () => Ae(j(e, x((t) => Ie(t) && t > 0))), negative: () => Ae(j(e, x((t) => Ie(t) && t < 0))) }), Xl = Ae(x(Ie)), He = (e) => Object.assign(ne(e), { between: (t, r) => He(j(e, ((n, i) => x((o) => $e(o) && n <= o && i >= o))(t, r))), lt: (t) => He(j(e, ((r) => x((n) => $e(n) && n < r))(t))), gt: (t) => He(j(e, ((r) => x((n) => $e(n) && n > r))(t))), lte: (t) => He(j(e, ((r) => x((n) => $e(n) && n <= r))(t))), gte: (t) => He(j(e, ((r) => x((n) => $e(n) && n >= r))(t))), positive: () => He(j(e, x((t) => $e(t) && t > 0))), negative: () => He(j(e, x((t) => $e(t) && t < 0))) }), Jl = He(x($e)), Zl = ne(x(function(e) { return typeof e == "boolean"; })), Ql = ne(x(function(e) { return typeof e == "symbol"; })), ec = ne(x(function(e) { return e == null; })), tc = ne(x(function(e) { return e != null; })); var Ku = { __proto__: null, matcher: fe, optional: yn, array: function(...e) { return qr({ [fe]: () => ({ match: (t) => { if (!Array.isArray(t)) return { matched: !1 }; if (e.length === 0) return { matched: !0 }; const r = e[0]; let n = {}; if (t.length === 0) return he(r).forEach((o) => { n[o] = []; }), { matched: !0, selections: n }; const i = (o, s) => { n[o] = (n[o] || []).concat([s]); }; return { matched: t.every((o) => re(r, o, i)), selections: n }; }, getSelectionKeys: () => e.length === 0 ? [] : he(e[0]) }) }); }, set: function(...e) { return ne({ [fe]: () => ({ match: (t) => { if (!(t instanceof Set)) return { matched: !1 }; let r = {}; if (t.size === 0) return { matched: !0, selections: r }; if (e.length === 0) return { matched: !0 }; const n = (o, s) => { r[o] = (r[o] || []).concat([s]); }, i = e[0]; return { matched: Kl(t, (o) => re(i, o, n)), selections: r }; }, getSelectionKeys: () => e.length === 0 ? [] : he(e[0]) }) }); }, map: function(...e) { return ne({ [fe]: () => ({ match: (t) => { if (!(t instanceof Map)) return { matched: !1 }; let r = {}; if (t.size === 0) return { matched: !0, selections: r }; const n = (c, g) => { r[c] = (r[c] || []).concat([g]); }; if (e.length === 0) return { matched: !0 }; var i; if (e.length === 1) throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i = e[0]) == null ? void 0 : i.toString()}`); const [o, s] = e; return { matched: Gl(t, (c, g) => { const p = re(o, g, n), w = re(s, c, n); return p && w; }), selections: r }; }, getSelectionKeys: () => e.length === 0 ? [] : [...he(e[0]), ...he(e[1])] }) }); }, intersection: j, union: Qo, not: function(e) { return ne({ [fe]: () => ({ match: (t) => ({ matched: !re(e, t, () => { }) }), getSelectionKeys: () => [], matcherType: "not" }) }); }, when: x, select: Bt, any: ea, _: ql, string: Yl, number: Xl, bigint: Jl, boolean: Zl, symbol: Ql, nullish: ec, nonNullable: tc, instanceOf: function(e) { return ne(x(/* @__PURE__ */ function(t) { return (r) => r instanceof t; }(e))); }, shape: function(e) { return ne(x(zl(e))); } }; class rc extends Error { constructor(t) { let r; try { r = JSON.stringify(t); } catch { r = t; } super(`Pattern matching error: no pattern matches value ${r}`), this.input = void 0, this.input = t; } } const Yr = { matched: !1, value: void 0 }; function Xr(e) { return new yr(e, Yr); } class yr { constructor(t, r) { this.input = void 0, this.state = void 0, this.input = t, this.state = r; } with(...t) { if (this.state.matched) return this; const r = t[t.length - 1], n = [t[0]]; let i; t.length === 3 && typeof t[1] == "function" ? i = t[1] : t.length > 2 && n.push(...t.slice(1, t.length - 1)); let o = !1, s = {}; const c = (p, w) => { o = !0, s[p] = w; }, g = !n.some((p) => re(p, this.input, c)) || i && !i(this.input) ? Yr : { matched: !0, value: r(o ? wr in s ? s[wr] : s : this.input, this.input) }; return new yr(this.input, g); } when(t, r) { if (this.state.matched) return this; const n = !!t(this.input); return new yr(this.input, n ? { matched: !0, value: r(this.input, this.input) } : Yr); } otherwise(t) { return this.state.matched ? this.state.value : t(this.input); } exhaustive(t = nc) { return this.state.matched ? this.state.value : t(this.input); } run() { return this.exhaustive(); } returnType() { return this; } } function nc(e) { throw new rc(e); } const ic = /* @__PURE__ */ new Date("2100-01-01"); var Sr; class oc { constructor() { H(this, "KEY_SETTING", "uniweb-widget-setting"); H(this, "KEY_HIDE", "uniweb-hide_widget"); /** * 現状largeWidgetでしか使用していないけど、のちのちアイコンの位置とかもここにいれる予定です */ H(this, "getSettings", () => { const t = Wt(this.KEY_SETTING); return t.isErr() ? F(t.error) : U(t.value); }); H(this, "getSetting", (t) => { var n; const r = this.getSettings(); if (r.isErr()) { console.error("failed to get local setting: ", r.error.message); return; } return (n = r.value) == null ? void 0 : n[t]; }); H(this, "setSetting", (t, r) => { const n = this.getSettings(); if (n.isErr()) { console.error("failed to get local setting: ", n.error.message); return; } const i = n.value || {}; r === void 0 ? delete i[t] : i[t] = r, Tt(this.KEY_SETTING, i); }); H(this, "getIsHideWidget", () => { const t = Wt(this.KEY_HIDE); if (t.isErr()) return F(t.error); if (!t.value) return U(!1); const r = /* @__PURE__ */ new Date(); return new Date(t.value) < r ? (Ar(this.KEY_HIDE), U(!1)) : U(!0); }); H(this, "saveHideWidgetPeriod", (t) => { const r = J(this, Sr).call(this, t); r !== void 0 && Tt(this.KEY_HIDE, r.toString()); }); we(this, Sr, (t) => Xr(t).with(Pt.NEXT, () => { }).with(Pt.DAY, Hl).with(Pt.WEEK, Vl).with(Pt.MONTH, jl).with(Pt.NEVER, () => ic).exhaustive()); } } Sr = new WeakMap(); const Jt = { createCurrentFeatureRepository: () => new gl(), createCurrentLanguageRepository: () => new bl(), createDictionaryRepository: () => new Il(), createImgAltRepository: () => new Cl(), createSitePreferenceRepository: () => new $l(), createWidgetRepository: () => new oc(), createPdfRepository: () => new Rl(), createFeedbackRepository: () => new Al(), createVideoCaptionRepository: () => new Bl(), createShortcutKeyRepository: () => new Pl() }; var vt, Vt, wt, yt, Se, Zr, ta, ra, na; const rt = class rt { constructor() { we(this, Se); we(this, Vt); we(this, wt); we(this, yt); ft(this, Vt, Jt.createImgAltRepository()), ft(this, yt, ve(this, Se, ta).bind(this)); } static getInstance() { return J(rt, vt) || ft(rt, vt, new rt()), J(rt, vt); } useConverter(t) { ft(this, wt, t), ve(this, Se, Zr).call(this), ve(this, Se, na).call(this); } }; vt = new WeakMap(), Vt = new WeakMap(), wt = new WeakMap(), yt = new WeakMap(), Se = new WeakSet(), Zr = async function() { const t = await ve(this, Se, ra).call(this); if (t.length) for (const r of t) { const n = document.querySelectorAll(`img[src="${r.src}"]`); for (const i of n) i.setAttribute("alt", r.alt); } }, ta = function() { setTimeout(() => ve(this, Se, Zr).call(this), 500); }, ra = async function() { if (!J(this, wt)) return []; const t = Lt(location.href); if (t.isErr()) return console.error("[uniweb] Failed to get custom img alts.", t.error), []; const r = await J(this, Vt).getImgAlts(J(this, wt), t.value); return r.isErr() ? (console.error("[uniweb] Failed to get custom img alts.", r.error), []) : r.value; }, na = function() { window.addEventListener(Qi, J(this, yt)), window.addEventListener("popstate", J(this, yt)); }, we(rt, vt); let Jr = rt; const ac = Jr.getInstance(), sc = (e) => { ac.useConverter(e); }, kt = 2147483647, Gu = { WIDGET_PANEL: kt, WIDGET_ICON: kt - 10, TOOLTIP: kt - 100, NAVIGATOR: kt - 200 }, lc = () => { const e = document.createElement("div"); e.id = Tr, e.style.display = "block", e.style.visibility = "visible", e.style.position = "fixed", e.style.zIndex = kt.toString(); const t = e.attachShadow({ mode: "open" }), r = document.createElement("div"); r.id = qi, t.appendChild(r), document.body.prepend(e); }, Er = () => document.getElementById(Tr).shadowRoot, xi = () => Er().querySelector(`#${qi}`), V = { AddStyleToOrigin: "addStyleToOrigin", AddStyleToWidgetRoot: "addStyleToWidgetRoot", AddStyleToAllIframes: "addStyleToAllIframes", AddTagToHeadToAllIFrames: "addTagToHeadToAllIFrames", AddClassToOriginHTML: "addClassToOriginHTML", RemoveClassFromOriginHTML: "removeClassFromOriginHTML", AddClassToOriginBody: "addClassToOriginBody", RemoveClassFromOriginBody: "removeClassFromOriginBody", AddClassToWidgetRoot: "addClassToWidgetRoot", RemoveClassFromWidgetRoot: "removeClassFromWidgetRoot", AddClassToAllIFrames: "addClassToAllIFrames", RemoveClassFromAllIFrames: "removeClassFromAllIFrames", Keydown: "keydown" }, cc = (e) => { window.postMessage({ action: V.AddStyleToOrigin, featureStyle: e }, "*"); }, qu = (e) => { window.postMessage({ action: V.AddStyleToWidgetRoot, featureStyle: e }, "*"); }, Yu = (e) => { window.postMessage({ action: V.AddStyleToAllIframes, featureStyle: e }, "*"); }, Xu = (e) => { window.postMessage({ action: V.AddTagToHeadToAllIFrames, tag: e }, "*"); }, Ju = (e) => { window.postMessage({ action: V.AddClassToOriginHTML, featureClassName: e }, "*"); }, Zu = (e) => { window.postMessage({ action: V.RemoveClassFromOriginHTML, featureClassName: e }, "*"); }, Qu = (e) => { window.postMessage({ action: V.AddClassToOriginBody, featureClassName: e }, "*"); }, ed = (e) => { window.postMessage({ action: V.RemoveClassFromOriginBody, featureClassName: e }, "*"); }, td = (e) => { window.postMessage({ action: V.AddClassToWidgetRoot, featureClassName: e }, "*"); }, rd = (e) => { window.postMessage({ action: V.RemoveClassFromWidgetRoot, featureClassName: e }, "*"); }, nd = (e) => { window.postMessage({ action: V.AddClassToAllIFrames, featureClassName: e }, "*"); }, id = (e) => { window.postMessage({ action: V.RemoveClassFromAllIFrames, featureClassName: e }, "*"); }; window.addEventListener("message", (e) => { var t, r, n, i; if (e.data.action === V.AddClassToOriginHTML && document.documentElement.classList.add(e.data.featureClassName), e.data.action === V.RemoveClassFromOriginHTML && document.documentElement.classList.remove(e.data.featureClassName), e.data.action === V.AddClassToOriginBody && document.body.classList.add(e.data.featureClassName), e.data.action === V.RemoveClassFromOriginBody && document.body.classList.remove(e.data.featureClassName), e.data.action === V.AddStyleToOrigin && Li(document, e.data.featureStyle), e.data.action === V.AddStyleToWidgetRoot) { const o = document.createElement("style"); o.innerHTML = e.data.featureStyle, (t = Er()) == null || t.appendChild(o); } if (e.data.action === V.AddStyleToAllIframes) { const o = fr(); for (const s of o) Lr( s, () => s.contentDocument && Li(s.contentDocument, e.data.featureStyle) ); } if (e.data.action === V.AddTagToHeadToAllIFrames) { const o = fr(); for (const s of o) Lr(s, () => { var c; return (c = s.contentDocument) == null ? void 0 : c.head.insertAdjacentHTML("beforeend", e.data.tag); }); } if (e.data.action === V.AddClassToWidgetRoot && ((r = xi()) == null || r.classList.add(e.data.featureClassName)), e.data.action === V.RemoveClassFromWidgetRoot && ((n = xi()) == null || n.classList.remove(e.data.featureClassName)), e.data.action === V.AddClassToAllIFrames) { const o = fr(); for (const s of o) Lr( s, () => { var c; return (c = s.contentDocument) == null ? void 0 : c.body.classList.add(e.data.featureClassName, si); } ); } if (e.data.action === V.RemoveClassFromAllIFrames) { const o = fr(); for (const s of o) (i = s.contentDocument) == null || i.body.classList.remove(e.data.featureClassName, si); } if (e.data.action === V.Keydown) { const o = new KeyboardEvent("keydown", { bubbles: !0, cancelable: !0, ctrlKey: e.data.ctrlKey, shiftKey: e.data.shiftKey, altKey: e.data.altKey, code: e.data.code, key: e.data.key }); document.dispatchEvent(o); } }); function Li(e, t) { const r = document.createElement("style"); r.setAttribute(Yi, ""), r.innerHTML = t, e.head.appendChild(r); } const fr = () => document.querySelectorAll("iframe"), Lr = (e, t) => { var r; ((r = e.contentDocument) == null ? void 0 : r.readyState) === "complete" ? t() : e.addEventListener("load", () => { t(); }); }, uc = "data-uniweb--", dc = `${uc}fv-outline`, fc = ` [${dc}]:focus-visible { outline: -webkit-focus-ring-color auto 1px; transition: all .1s ease; } `, mc = async (e) => { cc(fc); const [t, r] = await ot(() => import("./SiteOptimizeController.v84YBliL.js"))(); if (t) { console.error("[uniweb] Failed to initialize site optimizer:", t); return; } r.SiteOptimizeController.useOptimizer(e); }; let Fi = !1; const pc = async () => { if (Fi) return; const [e, t] = await ot(() => import("./initialize.lazy.5EFoB3AH.js"))(); if (e) { console.error("Failed to import uniweb translation:", e); return; } t.initialize(), Fi = !0; }, od = st((e, t) => ({ translateTargetLangs: [], translatingLang: "", isTranslating: !1, setTranslateTargetLangs: (r) => e({ translateTargetLangs: r }), isTranslatable: (r) => t().translateTargetLangs.includes(r), setTranslating: (r) => { e({ isTranslating: t().isTranslatable(r) }); } })), _c = async (e) => { const [t, r] = await ot(() => import("./VideoCaptionController.CBisKMp3.js"))(); if (t) { console.error("[uniweb] Failed to import VideoCaptionController.", t); return; } r.VideoCaptionController.useInsertCaptions(e); }; let Mi = !1; const hc = async (e) => { if (Mi) return; const [t, r] = await ot(() => import("./initialize.lazy.DYuWBGl3.js").then((n) => n.i))(); if (t) { console.error("Failed to import initialize:", t); return; } r.initialize(e), Mi = !0; }, gc = (e) => (t, r, n) => { const i = n.subscribe; return n.subscribe = (s, c, g) => { let p = s; if (c) { const w = (g == null ? void 0 : g.equalityFn) || Object.is; let d = s(n.getState()); p = (u) => { const m = s(u); if (!w(d, m)) { const h = d; c(d = m, h); } }, g != null && g.fireImmediately && c(d, d); } return i(p); }, e(t, r, n); }, ia = gc; function bc(e, t) { let r; try { r = e(); } catch { return; } return { getItem: (i) => { var o; const s = (g) => g === null ? null : JSON.parse(g, void 0), c = (o = r.getItem(i)) != null ? o : null; return c instanceof Promise ? c.then(s) : s(c); }, setItem: (i, o) => r.setItem( i, JSON.stringify(o, void 0) ), removeItem: (i) => r.removeItem(i) }; } const Qr = (e) => (t) => { try { const r = e(t); return r instanceof Promise ? r : { then(n) { return Qr(n)(r); }, catch(n) { return this; } }; } catch (r) { return { then(n) { return this; }, catch(n) { return Qr(n)(r); } }; } }, vc = (e, t) => (r, n, i) => { let o = { storage: bc(() => localStorage), partialize: (_) => _, version: 0, merge: (_, v) => ({ ...v, ..._ }), ...t }, s = !1; const c = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set(); let p = o.storage; if (!p) return e( (..._) => { console.warn( `[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.` ), r(..._); }, n, i ); const w = () => { const _ = o.partialize({ ...n() }); return p.setItem(o.name, { state: _, version: o.version }); }, d = i.setState; i.setState = (_, v) => { d(_, v), w(); }; const u = e( (..._) => { r(..._), w(); }, n, i ); i.getInitialState = () => u; let m; const h = () => { var _, v; if (!p) return; s = !1, c.forEach((O) => { var S; return O((S = n()) != null ? S : u); }); const A = ((v = o.onRehydrateStorage) == null ? void 0 : v.call(o, (_ = n()) != null ? _ : u)) || void 0; return Qr(p.getItem.bind(p))(o.name).then((O) => { if (O) if (typeof O.version == "number" && O.version !== o.version) { if (o.migrate) { const S = o.migrate( O.state, O.version ); return S instanceof Promise ? S.then((T) => [!0, T]) : [!0, S]; } console.error( "State loaded from storage couldn't be migrated since no migrate function was provided" ); } else return [!1, O.state]; return [!1, void 0]; }).then((O) => { var S; const [T, W] = O; if (m = o.merge( W, (S = n()) != null ? S : u ), r(m, !0), T) return w(); }).then(() => { A == null || A(m, void 0), m = n(), s = !0, g.forEach((O) => O(m)); }).catch((O) => { A == null || A(void 0, O); }); }; return i.persist = { setOptions: (_) => { o = { ...o, ..._ }, _.storage && (p = _.storage); }, clearStorage: () => { p == null || p.removeItem(o.name); }, getOptions: () => o, rehydrate: () => h(), hasHydrated: () => s, onHydrate: (_) => (c.add(_), () => { c.delete(_); }), onFinishHydration: (_) => (g.add(_), () => { g.delete(_); }) }, o.skipHydration || h(), m || u; }, ad = vc, oa = st()( ia((e) => ({ isDisplay: !0, setIsDisplay: (t) => { e(() => ({ isDisplay: t })); } })) ), sd = () => { oa.subscribe( (e) => e.isDisplay, (e) => { const t = Er().getElementById(Es); t && (e ? t.removeAttribute("aria-hidden") : (Er().activeElement === t && t.blur(), t.setAttribute("aria-hidden", "true"))); } ); }, wc = (e) => oa.getState().setIsDisplay(e); let Ui = !1; const yc = async () => { if (Ui) return; const [e, t] = await ot(() => import("./initialize.lazy.BdUgRa4K.js").then((r) => r.i))(); if (e) { console.error("Failed to import initialize:", e); return; } t.initialize(), Ui = !0; }, Zt = st()( ia((e) => ({ isOpen: !1, setIsOpen: (t) => e({ isOpen: t }), toggleIsOpen: () => e((t) => ({ isOpen: !t.isOpen })) })) ); Zt.subscribe( (e) => e.isOpen, (e) => { xl(`${e ? "Open" : "Close"} widget panel`, Dl), wc(!e); } ); const Ec = Zt.subscribe( (e) => e.isOpen, (e) => { e && (yc(), Ec()); } ), ld = () => Zt((e) => e.isOpen), Ht = (e) => Zt.getState().setIsOpen(e), aa = () => Zt.getState().toggleIsOpen(), Sc = (e) => { it.onOpenPanel(() => Ht(!0)), it.onClosePanel(() => Ht(!1)), it.onTogglePanel(() => aa()), Tc(e.panelOpenSelectors), Oc(e), Ic(); }, Tc = (e) => { if (!e) return; const t = [], r = () => Ht(!0); for (const n of e) { const i = document.querySelectorAll(n); if (i.length < 1) { console.warn(`[uniweb] Failed to register event: cannot find elements by "${n}"`); return; } for (const o of i) t.push(o), o.addEventListener("click", r); } return () => { for (const n of t) n.removeEventListener("click", r); }; }, Oc = (e) => { it.onChangeFeature(({ feature: t, variant: r }) => { import("./event-registry.lazy.DTKyqqRJ.js").then(({ changeFeature: n }) => { n(e, t, r); }); }), it.onToggleFeature(({ feature: t, variant: r }) => { import("./event-registry.lazy.DTKyqqRJ.js").then(({ toggleFeature: n }) => { n(e, t, r); }); }), it.onResetFeatures(() => { import("./event-registry.lazy.DTKyqqRJ.js").then(({ resetAll: t }) => { t(); }); }); }, Ic = () => { it.onChangeLanguage((e) => { import("./event-registry.lazy.DTKyqqRJ.js").then(({ changeLanguage: t }) => { t(e); }); }); }, Ac = () => { window.uniweb = { panel: mr(() => import("./panel.BPFhiGt5.js").then((e) => e.panelPublicAPI)), feature: mr(() => import("./feature.DD6Qnd9V.js").then((e) => e.featurePublicAPI)), language: mr(() => import("./language.B1U6If6C.js").then((e) => e.languagePublicAPI)), cobrowsing: mr(() => import("./unishare.2Gs8ufdN.js").then((e) => e.unisharePublicAPI)), translation: void 0, on: te.on }; }, mr = (e) => { let t = null, r = null; const n = () => (r || (r = e().then((i) => { t = i; })), r); return new Proxy( {}, { get(i, o) { return (...s) => { if (t) return t[o](...s); n().then(() => t[o](...s)); }; } } ); }, Cc = Jt.createSitePreferenceRepository(); let en; const Rc = async () => { const e = await Cc.getSitePreference(Ft, window.location.host); return e.isErr() ? (console.error(Xi, e.error), !1) : (en = e.value, !0); }, Pc = () => { if (!en) throw new Error("Site preference is not initialized. Please call initSitePreference() first."); return en; }; let Wi = !1; const kc = async (e) => { if (Wi) return; const [t, r] = await ot(() => import("./initialize.lazy.CA8SRxsf.js"))(); if (t) { console.error("Failed to import initialize:", t); return; } r.initialize(e), Wi = !0; }, sa = Jt.createWidgetRepository(), Nc = () => { const e = sa.getIsHideWidget(); return e.isErr() ? (console.log(e.error), !1) : e.value; }, la = st((e) => ({ isHidden: Nc(), hide: (t) => { e({ isHidden: !0 }), sa.saveHideWidgetPeriod(t), Ht(!1), Wr(); } })), cd = () => la((e) => e.hide), Ee = [], Me = void 0, ca = { ROOT: "Root", IGNORED: "Ignored", SECTION: "Section" }, Dc = { permittedRoles: (e) => Ee, getImplicitRole: (e) => "generic" }, xc = { permittedRoles: (e) => ["document", "feed", "main", "none", "presentation", "region"], getImplicitRole: (e) => "article" }, Lc = { permittedRoles: (e) => ["feed", "none", "note", "presentation", "region", "search"], getImplicitRole: (e) => "complementary" }, Fc = { permittedRoles: (e) => ["group", "presentation", "none"], getImplicitRole: (e) => e.closest('article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]') ? null : "contentinfo" }, pt = { permittedRoles: (e) => ["tab", "presentation", "none"], getImplicitRole: (e) => "heading" }, Mc = { permittedRoles: (e) => ["group", "presentation", "none"], getImplicitRole: (e) => e.closest('article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]') ? null : "banner" }, Uc = { permittedRoles: (e) => Ee, getImplicitRole: (e) => "main" }, Wc = { permittedRoles: (e) => Ee, getImplicitRole: (e) => "navigation" }, $c = { permittedRoles: (e) => [ "alert", "alertdialog", "application", "banner", "complementary", "contentinfo", "dialog", "document", "feed", "log", "main", "marquee", "navigation", "none", "note", "presentation", "search", "status", "tabpanel" ], getImplicitRole: (e) => e.ariaLabel ? "region" : ca.SECTION }, Bc = { permittedRoles: (e) => Ee, getImplicitRole: (e) => "definition" }, Hc = { permittedRoles: (e) => Me, getImplicitRole: (e) => "generic" }, Vc = { permittedRoles: (e) => ["group", "list", "none", "presentation"], getImplicitRole: (e) => null }, jc = { permittedRoles: (e) => ["listitem"], getImplicitRole: (e) => "term" }, zc = { permittedRoles: (e) => ["group", "none", "presentation"], getImplicitRole: (e) => null }, Kc = { permittedRoles: (e) => e.querySelector("figcaption") ? Ee : Me, getImplicitRole: (e) => "figure" }, Gc = { permittedRoles: (e) => ["presentation", "none"], getImplicitRole: (e) => "separator" }, qc = { permittedRoles: (e) => [ "menuitem", "menuitemcheckbox", "menuitemradio", "option", "none", "presentation", "radio", "separator", "tab", "treeitem" ], getImplicitRole: (e) => "listitem" }, Fr = { permittedRoles: (e) => [ "directory", "group", "listbox", "menu", "menubar", "none", "presentation", "radiogroup", "tablist", "toolbar", "tree" ], getImplicitRole: (e) => "list" }, Yc = { permittedRoles: (e) => Me, getImplicitRole: (e) => "paragraph" }, Xc = { permittedRoles: (e) => e.getAttribute("href") ? [ "button", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch", "tab", "treeitem" ] : Me, getImplicitRole: (e) => !e.getAttribute("href") && !e.onclick ? "generic" : "link" }, Jc = { permittedRoles: (e) => { const t = e.getAttribute("alt"); return t === null ? Ee : t === "" ? ["none", "presentation"] : [ "button", "checkbox", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "progressbar", "scrollbar", "separator", "slider", "switch", "tab", "treeitem" ]; }, getImplicitRole: (e) => e.getAttribute("alt") === "" ? "presentation" : "img" }, Zc = { permittedRoles: (e) => ["application", "document", "img", "none", "presentation"], getImplicitRole: (e) => null }, Qc = { permittedRoles: (e) => Me, getImplicitRole: (e) => "deletion" }, eu = { permittedRoles: (e) => Me, getImplicitRole: (e) => "insertion" }, tu = { permittedRoles: (e) => Me, getImplicitRole: (e) => "table" }, ru = { permittedRoles: (e) => [ "checkbox", "combobox", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch", "tab" ], getImplicitRole: (e) => "button" }, nu = { permittedRoles: (e) => { const t = e.getAttribute("type") || "text", r = e.hasAttribute("list"), n = e.hasAttribute("aria-pressed") || e.getAttribute("role") === "menuitemcheckbox" || e.getAttribute("role") === "option" || e.getAttribute("role") === "switch"; return Xr(t).with("button", () => [ "checkbox", "combobox", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch", "tab" ]).with("checkbox", () => n ? ["button"] : Ee).with("image", () => ["link", "menuitem", "menuitemcheckbox", "menuitemradio", "radio", "switch"]).with("radio", () => ["menuitemradio"]).with("text", () => r ? Ee : ["combobox", "searchbox", "spinbutton"]).otherwise(() => Ee); }, getImplicitRole: (e) => { const t = e.getAttribute("type") || "text", r = e.hasAttribute("list"); return Xr([t, r]).with(["button", !1], () => "button").with(["image", !1], () => "button").with(["reset", !1], () => "button").with(["submit", !1], () => "button").with(["checkbox", !1], () => "checkbox").with(["radio", !1], () => "radio").with(["range", !1], () => "slider").with(["number", !1], () => "spinbutton").with(["email", !0], () => "combobox").with(["email", !1], () => "textbox").with(["tel", !0], () => "combobox").with(["tel", !1], () => "textbox").with(["text", !0], () => "combobox").with(["text", !1], () => "textbox").with(["url", !0], () => "combobox").with(["url", !1], () => "textbox").with(["search", !0], () => "combobox").with(["search", !1], () => "searchbox").with(["email", !1], () => "textbox").otherwise(() => null); } }, iu = { permittedRoles: (e) => Ee, getImplicitRole: (e) => "textbox" }, pr = { permittedRoles: (e) => Me, getImplicitRole: (e) => null }, Mr = { permittedRoles: (e) => Ee, getImplicitRole: (e) => ca.IGNORED }, ou = { /** Sectioning root **/ BODY: Dc, /** Content sectioning **/ ADDRESS: void 0, ARTICLE: xc, ASIDE: Lc, FOOTER: Fc, HEADER: Mc, H1: pt, H2: pt, H3: pt, H4: pt, H5: pt, H6: pt, HGROUP: pr, MAIN: Uc, NAV: Wc, SECTION: $c, /** Text content **/ BLOCKQUOTE: pr, DD: Bc, DIV: Hc, DL: Vc, DT: jc, FIGCAPTION: zc, FIGURE: Kc, HR: Gc, LI: qc, MENU: Fr, OL: Fr, P: Yc, PRE: pr, UL: Fr, /** Inline text semantics **/ A: Xc, /** Image and multimedia **/ IMG: Jc, /** Embedded content **/ IFRAME: Zc, /** SVG and MathML **/ SVG: pr, MATH: void 0, /** Demarcating edits **/ DEL: Qc, INS: eu, /** Table Content **/ TABLE: tu, /** Forms **/ BUTTON: ru, INPUT: nu, TEXTAREA: iu, /** 対象外 **/ NOSCRIPT: Mr, SCRIPT: Mr, STYLE: Mr }, au = (e) => { const t = ou[e.tagName]; if (t === void 0) return null; if (e.role) { const r = t.permittedRoles(e); if (r === Me || r.includes(e.role)) return e.role; } return t.getImplicitRole(e); }, su = (e) => { switch (e.nodeType) { case Node.ELEMENT_NODE: return au(e); case Node.TEXT_NODE: return (e.textContent || "").trim() === "" ? "BlankText" : "StaticText"; } return null; }, lu = { displayText: "CTRL + SHIFT + 2", key: "2", ctrlKey: !0, shiftKey: !0, onKeydown: () => { import("./store.D5MkcbeN.js").then((e) => e.k).then(({ togglePartialScreenReaderByHotkey: e }) => { e(); }); } }, cu = { displayText: "CTRL + SHIFT + 1", key: "1", ctrlKey: !0, shiftKey: !0, onKeydown: () => { import("./store.D5MkcbeN.js").then((e) => e.j).then(({ toggleScreenReaderByHotkey: e }) => { e(); }); } }, uu = [cu, lu], du = (e) => e instanceof HTMLElement, ud = (e) => e.tagName === "IMG", dd = (e) => e.tagName === "BR", fu = (e) => e.tagName === "A", fd = (e) => e.tagName === "BUTTON", md = (e) => e.target === "_blank", pd = (e) => e.tagName === "AUDIO", _d = (e) => e.tagName === "VIDEO", mu = (e) => e.tagName === "INPUT", pu = (e) => e.tagName === "TEXTAREA", hd = (e) => e.tagName === "SELECT", gd = (e) => { let t = e; for (; t; ) { const r = window.getComputedStyle(t); if (r.display === "none" || r.visibility === "hidden") return !0; if (!t.parentElement) break; t = t.parentElement; } return !1; }, bd = (e) => { const t = /\.pdf($|[?#])/i; return !du(e) || !fu(e) ? !1 : t.test(e.href); }; function vd(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } function _u(e) { if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e; var t = e.default; if (typeof t == "function") { var r = function n() { return this instanceof n ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments); }; r.prototype = t.prototype; } else r = {}; return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(e).forEach(function(n) { var i = Object.getOwnPropertyDescriptor(e, n); Object.defineProperty(r, n, i.get ? i : { enumerable: !0, get: function() { return e[n]; } }); }), r; } var E = {}; const hu = /* @__PURE__ */ _u(ll); var Nt = { exports: {} }, gu = Nt.exports, $i; function bu() { return $i || ($i = 1, function(e, t) { (function(r, n) { var i = "1.0.40", o = "", s = "?", c = "function", g = "undefined", p = "object", w = "string", d = "major", u = "model", m = "name", h = "type", _ = "vendor", v = "version", A = "architecture", O = "console", S = "mobile", T = "tablet", W = "smarttv", G = "wearable", ae = "embedded", se = 500, le = "Amazon", B = "Apple", K = "ASUS", Q = "BlackBerry", q = "Browser", Te = "Chrome", ie = "Edge", oe = "Firefox", ge = "Google", Qt = "Huawei", Y = "LG", Z = "Microsoft", ke = "Motorola", Ke = "Opera", Ge = "Samsung", er = "Sharp", I = "Sony", qe = "Xiaomi", Ye = "Zebra", tr = "Facebook", At = "Chromium OS", rr = "Mac OS", nr = " Browser", Pr = function(k, D) { var R = {}; for (var M in k) D[M] && D[M].length % 2 === 0 ? R[M] = D[M].concat(k[M]) : R[M] = k[M]; return R; }, lt = function(k) { for (var D = {}, R = 0; R < k.length; R++) D[k[R].toUpperCase()] = k[R]; return D; }, ir = function(k, D) { return typeof k === w ? Ne(D).indexOf(Ne(k)) !== -1 : !1; }, Ne = function(k) { return k.toLowerCase(); }, or = function(k) { return typeof k === w ? k.replace(/[^\d\.]/g, o).split(".")[0] : n; }, ct = function(k, D) { if (typeof k === w) return k = k.replace(/^\s\s*/, o), typeof D === g ? k : k.substring(0, se); }, Ue = function(k, D) { for (var R = 0, M, be, pe, L, C, _e; R < D.length && !C; ) { var ut = D[R], Je = D[R + 1]; for (M = be = 0; M < ut.length && !C && ut[M]; ) if (C = ut[M++].exec(k), C) for (pe = 0; pe < Je.length; pe++) _e = C[++be], L = Je[pe], typeof L === p && L.length > 0 ? L.length === 2 ? typeof L[1] == c ? this[L[0]] = L[1].call(this, _e) : this[L[0]] = L[1] : L.length === 3 ? typeof L[1] === c && !(L[1].exec && L[1].test) ? this[L[0]] = _e ? L[1].call(this, _e, L[2]) : n : this[L[0]] = _e ? _e.replace(L[1], L[2]) : n : L.length === 4 && (this[L[0]] = _e ? L[3].call(this, _e.replace(L[1], L[2])) : n) : this[L] = _e || n; R += 2; } }, De = function(k, D) { for (var R in D) if (typeof D[R] === p && D[R].length > 0) { for (var M = 0; M < D[R].length; M++) if (ir(D[R][M], k)) return R === s ? n : R; } else if (ir(D[R], k)) return R === s ? n : R; return D.hasOwnProperty("*") ? D["*"] : k; }, ar = { "1.0": "/8", 1.2: "/1", 1.3: "/3", "2.0": "/412", "2.0.2": "/416", "2.0.3": "/417", "2.0.4": "/419", "?": "/" }, Ct = { ME: "4.90", "NT 3.11": "NT3.51", "NT 4.0": "NT4.0", 2e3: "NT 5.0", XP: ["NT 5.1", "NT 5.2"], Vista: "NT 6.0", 7: "NT 6.1", 8: "NT 6.2", 8.1: "NT 6.3", 10: ["NT 6.4", "NT 10.0"], RT: "ARM" }, Rt = { browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [v, [m, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [v, [m, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [m, v], [/opios[\/ ]+([\w\.]+)/i], [v, [m, Ke + " Mini"]], [/\bop(?:rg)?x\/([\w\.]+)/i], [v, [m, Ke + " GX"]], [/\bopr\/([\w\.]+)/i], [v, [m, Ke]], [/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i], [v, [m, "Baidu"]], [/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i], [v, [m, "Maxthon"]], [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i, /(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i, /(?:ms|\()(ie) ([\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i, /(heytap|ovi|115)browser\/([\d\.]+)/i, /(weibo)__([\d\.]+)/i], [m, v], [/quark(?:pc)?\/([-\w\.]+)/i], [v, [m, "Quark"]], [/\bddg\/([\w\.]+)/i], [v, [m, "DuckDuckGo"]], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [v, [m, "UC" + q]], [/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i, /micromessenger\/([\w\.]+)/i], [v, [m, "WeChat"]], [/konqueror\/([\w\.]+)/i], [v, [m, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [v, [m, "IE"]], [/ya(?:search)?browser\/([\w\.]+)/i], [v, [m, "Yandex"]], [/slbrowser\/([\w\.]+)/i], [v, [m, "Smart Lenovo " + q]], [/(avast|avg)\/([\w\.]+)/i], [[m, /(.+)/, "$1 Secure " + q], v], [/\bfocus\/([\w\.]+)/i], [v, [m, oe + " Focus"]], [/\bopt\/([\w\.]+)/i], [v, [m, Ke + " Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [v, [m, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [v, [m, "Dolphin"]], [/coast\/([\w\.]+)/i], [v, [m, Ke + " Coast"]], [/miuibrowser\/([\w\.]+)/i], [v, [m, "MIUI" + nr]], [/fxios\/([\w\.-]+)/i], [v, [m, oe]], [/\bqihoobrowser\/?([\w\.]*)/i], [v, [m, "360"]], [/\b(qq)\/([\w\.]+)/i], [[m, /(.+)/, "$1Browser"], v], [/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i], [[m, /(.+)/, "$1" + nr], v], [/samsungbrowser\/([\w\.]+)/i], [v, [m, Ge + " Internet"]], [/metasr[\/ ]?([\d\.]+)/i], [v, [m, "Sogou Explorer"]], [/(sogou)mo\w+\/([\d\.]+)/i], [[m, "Sogou Mobile"], v], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i], [m, v], [/(lbbrowser|rekonq)/i, /\[(linkedin)app\]/i], [m], [/ome\/([\w\.]+) \w* ?(iron) saf/i, /ome\/([\w\.]+).+qihu (360)[es]e/i], [v, m], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[m, tr], v], [/(Klarna)\/([\w\.]+)/i, /(kakao(?:talk|story))[\/ ]([\w\.]+)/i, /(naver)\(.*?(\d+\.[\w\.]+).*\)/i, /safari (line)\/([\w\.]+)/i, /\b(line)\/([\w\.]+)\/iab/i, /(alipay)client\/([\w\.]+)/i, /(twitter)(?:and| f.+e\/([\w\.]+))/i, /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i], [m, v], [/\bgsa\/([\w\.]+) .*safari\//i], [v, [m, "GSA"]], [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i], [v, [m, "TikTok"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [v, [m, Te + " Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[m, Te + " WebView"], v], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [v, [m, "Android " + q]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [m, v], [/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i], [v, [m, "Mobile Safari"]], [/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i], [v, m], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [m, [v, De, ar]], [/(webkit|khtml)\/([\w\.]+)/i], [m, v], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[m, "Netscape"], v], [/(wolvic|librewolf)\/([\w\.]+)/i], [m, v], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [v, [m, oe + " Reality"]], [/ekiohf.+(flow)\/([\w\.]+)/i, /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i, /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, /(firefox)\/([\w\.]+)/i, /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /(links) \(([\w\.]+)/i], [m, [v, /_/g, "."]], [/(cobalt)\/([\w\.]+)/i], [m, [v, /master.|lts./, ""]]], cpu: [[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i], [[A, "amd64"]], [/(ia32(?=;))/i], [[A, Ne]], [/((?:i[346]|x)86)[;\)]/i], [[A, "ia32"]], [/\b(aarch64|arm(v?8e?l?|_?64))\b/i], [[A, "arm64"]], [/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i], [[A, "armhf"]], [/windows (ce|mobile); ppc;/i], [[A, "arm"]], [/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i], [[A, /ower/, o, Ne]], [/(sun4\w)[;\)]/i], [[A, "sparc"]], [/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i], [[A, Ne]]], device: [[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i], [u, [_, Ge], [h, T]], [/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i, /samsung[- ]((?!sm-[lr])[-\w]+)/i, /sec-(sgh\w+)/i], [u, [_, Ge], [h, S]], [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i], [u, [_, B], [h, S]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [u, [_, B], [h, T]], [/(macintosh);/i], [u, [_, B]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [u, [_, er], [h, S]], [/(?:honor)([-\w ]+)[;\)]/i], [u, [_, "Honor"], [h, S]], [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i], [u, [_, Qt], [h, T]], [/(?:huawei)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i], [u, [_, Qt], [h, S]], [/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i, /\b; (\w+) build\/hm\1/i, /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i, /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i], [[u, /_/g, " "], [_, qe], [h, S]], [/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i], [[u, /_/g, " "], [_, qe], [h, T]], [/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i], [u, [_, "OPPO"], [h, S]], [/\b(opd2\d{3}a?) bui/i], [u, [_, "OPPO"], [h, T]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [u, [_, "Vivo"], [h, S]], [/\b(rmx[1-3]\d{3})(?: bui|;|\))/i], [u, [_, "Realme"], [h, S]], [/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\bmot(?:orola)?[- ](\w*)/i, /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i], [u, [_, ke], [h, S]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [u, [_, ke], [h, T]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [u, [_, Y], [h, T]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i, /\blg-?([\d\w]+) bui/i], [u, [_, Y], [h, S]], [/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i], [u, [_, "Lenovo"], [h, T]], [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i], [[u, /_/g, " "], [_, "Nokia"], [h, S]], [/(pixel c)\b/i], [u, [_, ge], [h, T]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [u, [_, ge], [h, S]], [/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i], [u, [_, I], [h, S]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[u, "Xperia Tablet"], [_, I], [h, T]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [u, [_, "OnePlus"], [h, S]], [/(alexa)webm/i, /(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [u, [_, le], [h, T]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[u, /(.+)/g, "Fire Phone $1"], [_, le], [h, S]], [/(playbook);[-\w\),; ]+(rim)/i], [u, _, [h, T]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [u, [_, Q], [h, S]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [u, [_, K], [h, T]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [u, [_, K], [h, S]], [/(nexus 9)/i], [u, [_, "HTC"], [h, T]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i], [_, [u, /_/g, " "], [h, S]], [/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i], [u, [_, "TCL"], [h, T]], [/(itel) ((\w+))/i], [[_, Ne], u, [h, De, { tablet: ["p10001l", "w7001"], "*": "mobile" }]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [u, [_, "Acer"], [h, T]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [u, [_, "Meizu"], [h, S]], [/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i], [u, [_, "Ulefone"], [h, S]], [/; (energy ?\w+)(?: bui|\))/i, /; energizer ([\w ]+)(?: bui|\))/i], [u, [_, "Energizer"], [h, S]], [/; cat (b35);/i, /; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i], [u, [_, "Cat"], [h, S]], [/((?:new )?andromax[\w- ]+)(?: bui|\))/i], [u, [_, "Smartfren"], [h, S]], [/droid.+; (a(?:015|06[35]|142p?))/i], [u, [_, "Nothing"], [h, S]], [/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i, /; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i, /(hp) ([\w ]+\w)/i, /(asus)-?(\w+)/i, /(microsoft); (lumia[\w ]+)/i, /(lenovo)[-_ ]?([-\w]+)/i, /(jolla)/i, /(oppo) ?([\w ]+) bui/i], [_, u, [h, S]], [/(imo) (tab \w+)/i, /(kobo)\s(ereader|touch)/i, /(archos) (gamepad2?)/i, /(hp).+(touchpad(?!.+tablet)|tablet)/i, /(kindle)\/([\w\.]+)/i, /(nook)[\w ]+build\/(\w+)/i, /(dell) (strea[kpr\d ]*[\dko])/i, /(le[- ]+pan)[- ]+(\w{1,9}) bui/i, /(trinity)[- ]*(t\d{3}) bui/i, /(gigaset)[- ]+(q\w{1,9}) bui/i, /(vodafone) ([\w ]+)(?:\)| bui)/i], [_, u, [h, T]], [/(surface duo)/i], [u, [_, Z], [h, T]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [u, [_, "Fairphone"], [h, S]], [/(u304aa)/i], [u, [_, "AT&T"], [h, S]], [/\bsie-(\w*)/i], [u, [_, "Siemens"], [h, S]], [/\b(rct\w+) b/i], [u, [_, "RCA"], [h, T]], [/\b(venue[\d ]{2,7}) b/i], [u, [_, "Dell"], [h, T]], [/\b(q(?:mv|ta)\w+) b/i], [u, [_, "Verizon"], [h, T]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [u, [_, "Barnes & Noble"], [h, T]], [/\b(tm\d{3}\w+) b/i], [u, [_, "NuVision"], [h, T]], [/\b(k88) b/i], [u, [_, "ZTE"], [h, T]], [/\b(nx\d{3}j) b/i], [u, [_, "ZTE"], [h, S]], [/\b(gen\d{3}) b.+49h/i], [u, [_, "Swiss"], [h, S]], [/\b(zur\d{3}) b/i], [u, [_, "Swiss"], [h, T]], [/\b((zeki)?tb.*\b) b/i], [u, [_, "Zeki"], [h, T]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[_, "Dragon Touch"], u, [h, T]], [/\b(ns-?\w{0,9}) b/i], [u, [_, "Insignia"], [h, T]], [/\b((nxa|next)-?\w{0,9}) b/i], [u, [_, "NextBook"], [h, T]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[_, "Voice"], u, [h, S]], [/\b(lvtel\-)?(v1[12]) b/i], [[_, "LvTel"], u, [h, S]], [/\b(ph-1) /i], [u, [_, "Essential"], [h, S]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [u, [_, "Envizen"], [h, T]], [/\b(trio[-\w\. ]+) b/i], [u, [_, "MachSpeed"], [h, T]], [/\btu_(1491) b/i], [u, [_, "Rotor"], [h, T]], [/(shield[\w ]+) b/i], [u, [_, "Nvidia"], [h, T]], [/(sprint) (\w+)/i], [_, u, [h, S]], [/(kin\.[onetw]{3})/i], [[u, /\./g, " "], [_, Z], [h, S]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [u, [_, Ye], [h, T]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [u, [_, Ye], [h, S]], [/smart-tv.+(samsung)/i], [_, [h, W]], [/hbbtv.+maple;(\d+)/i], [[u, /^/, "SmartTV"], [_, Ge], [h, W]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[_, Y], [h, W]], [/(apple) ?tv/i], [_, [u, B + " TV"], [h, W]], [/crkey/i], [[u, Te + "cast"], [_, ge], [h, W]], [/droid.+aft(\w+)( bui|\))/i], [u, [_, le], [h, W]], [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i], [u, [_, er], [h, W]], [/(bravia[\w ]+)( bui|\))/i], [u, [_, I], [h, W]], [/(mitv-\w{5}) bui/i], [u, [_, qe], [h, W]], [/Hbbtv.*(technisat) (.*);/i], [_, u, [h, W]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i], [[_, ct], [u, ct], [h, W]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[h, W]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [_, u, [h, O]], [/droid.+; (shield) bui/i], [u, [_, "Nvidia"], [h, O]], [/(playstation [345portablevi]+)/i], [u, [_, I], [h, O]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [u, [_, Z], [h, O]], [/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i], [u, [_, Ge], [h, G]], [/((pebble))app/i], [_, u, [h, G]], [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i], [u, [_, B], [h, G]], [/droid.+; (glass) \d/i], [u, [_, ge], [h, G]], [/droid.+; (wt63?0{2,3})\)/i], [u, [_, Ye], [h, G]], [/droid.+; (glass) \d/i], [u, [_, ge], [h, G]], [/(pico) (4|neo3(?: link|pro)?)/i], [_, u, [h, G]], [/; (quest( \d| pro)?)/i], [u, [_, tr], [h, G]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [_, [h, ae]], [/(aeobc)\b/i], [u, [_, le], [h, ae]], [/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i], [u, [h, S]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i], [u, [h, T]], [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i], [[h, T]], [/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i], [[h, S]], [/(android[-\w\. ]{0,9});.+buil/i], [u, [_, "Generic"]]], engine: [[/windows.+ edge\/([\w\.]+)/i], [v, [m, ie + "HTML"]], [/(arkweb)\/([\w\.]+)/i], [m, v], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [v, [m, "Blink"]], [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i, /ekioh(flow)\/([\w\.]+)/i, /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, /(icab)[\/ ]([23]\.[\d\.]+)/i, /\b(libweb)/i], [m, v], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [v, m]], os: [[/microsoft (windows) (vista|xp)/i], [m, v], [/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i], [m, [v, De, Ct]], [/windows nt 6\.2; (arm)/i, /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i, /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[v, De, Ct], [m, "Windows"]], [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i, /cfnetwork\/.+darwin/i], [[v, /_/g, "."], [m, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[m, rr], [v, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i], [v, m], [/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i, /(blackberry)\w*\/([\w\.]*)/i, /(tizen|kaios)[\/ ]([\w\.]+)/i, /\((series40);/i], [m, v], [/\(bb(10);/i], [v, [m, Q]], [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i], [v, [m, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [v, [m, oe + " OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [v, [m, "webOS"]], [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i], [v, [m, "watchOS"]], [/crkey\/([\d\.]+)/i], [v, [m, Te + "cast"]], [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i], [[m, At], v], [/panasonic;(viera)/i, /(netrange)mmh/i, /(nettv)\/(\d+\.[\w\.]+)/i, /(nintendo|playstation) ([wids345portablevuch]+)/i, /(xbox); +xbox ([^\);]+)/i, /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, /(mint)[\/\(\) ]?(\w*)/i, /(mageia|vectorlinux)[; ]/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /(hurd|linux) ?([\w\.]*)/i, /(gnu) ?([\w\.]*)/i, /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, /(haiku) (\w+)/i], [m, v], [/(sunos) ?([\w\.\d]*)/i], [[m, "Solaris"], v], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, /(unix) ?([\w\.]*)/i], [m, v]] }, ce = function(k, D) { if (typeof k === p && (D = k, k = n), !(this instanceof ce)) return new ce(k, D).getResult(); var R = typeof r !== g && r.navigator ? r.navigator : n, M = k || (R && R.userAgent ? R.userAgent : o), be = R && R.userAgentData ? R.userAgentData : n, pe = D ? Pr(Rt, D) : Rt, L = R && R.userAgent == M; return this.getBrowser = function() { var C = {}; return C[m] = n, C[v] = n, Ue.call(C, M, pe.browser), C[d] = or(C[v]), L && R && R.brave && typeof R.brave.isBrave == c && (C[m] = "Brave"), C; }, this.getCPU = function() { var C = {}; return C[A] = n, Ue.call(C, M, pe.cpu), C; }, this.getDevice = function() { var C = {}; return C[_] = n, C[u] = n, C[h] = n, Ue.call(C, M, pe.device), L && !C[h] && be && be.mobile && (C[h] = S), L && C[u] == "Macintosh" && R && typeof R.standalone !== g && R.maxTouchPoints && R.maxTouchPoints > 2 && (C[u] = "iPad", C[h] = T), C; }, this.getEngine = function() { var C = {}; return C[m] = n, C[v] = n, Ue.call(C, M, pe.engine), C; }, this.getOS = function() { var C = {}; return C[m] = n, C[v] = n, Ue.call(C, M, pe.os), L && !C[m] && be && be.platform && be.platform != "Unknown" && (C[m] = be.platform.replace(/chrome os/i, At).replace(/macos/i, rr)), C; }, this.getResult = function() { return { ua: this.getUA(), browser: this.getBrowser(), engine: this.getEngine(), os: this.getOS(), device: this.getDevice(), cpu: this.getCPU() }; }, this.getUA = function() { return M; }, this.setUA = function(C) { return M = typeof C === w && C.length > se ? ct(C, se) : C, this; }, this.setUA(M), this; }; ce.VERSION = i, ce.BROWSER = lt([m, v, d]), ce.CPU = lt([A]), ce.DEVICE = lt([u, _, h, O, S, W, T, G, ae]), ce.ENGINE = ce.OS = lt([m, v]), e.exports && (t = e.exports = ce), t.UAParser = ce; var xe = typeof r !== g && (r.jQuery || r.Zepto); if (xe && !xe.ua) { var Xe = new ce(); xe.ua = Xe.getResult(), xe.ua.get = function() { return Xe.getUA(); }, xe.ua.set = function(k) { Xe.setUA(k); var D = Xe.getResult(); for (var R in D) xe.ua[R] = D[R]; }; } })(typeof window == "object" ? window : gu); }(Nt, Nt.exports)), Nt.exports; } var Bi; function vu() { if (Bi) return E; Bi = 1, Object.defineProperty(E, "__esModule", { value: !0 }); function e(f) { return f && typeof f == "object" && "default" in f ? f.default : f; } var t = hu, r = e(t), n = bu(), i = new n(), o = i.getBrowser(), s = i.getCPU(), c = i.getDevice(), g = i.getEngine(), p = i.getOS(), w = i.getUA(), d = function(a) { return i.setUA(a); }, u = function(a) { if (!a) { console.error("No userAgent string was provided"); return; } var l = new n(a); return { UA: l, browser: l.getBrowser(), cpu: l.getCPU(), device: l.getDevice(), engine: l.getEngine(), os: l.getOS(), ua: l.getUA(), setUserAgent: function(y) { return l.setUA(y); } }; }, m = /* @__PURE__ */ Object.freeze({ ClientUAInstance: i, browser: o, cpu: s, device: c, engine: g, os: p, ua: w, setUa: d, parseUserAgent: u }); function h(f, a) { var l = Object.keys(f); if (Object.getOwnPropertySymbols) { var b = Object.getOwnPropertySymbols(f); a && (b = b.filter(function(y) { return Object.getOwnPropertyDescriptor(f, y).enumerable; })), l.push.apply(l, b); } return l; } function _(f) { for (var a = 1; a < arguments.length; a++) { var l = arguments[a] != null ? arguments[a] : {}; a % 2 ? h(Object(l), !0).forEach(function(b) { T(f, b, l[b]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(f, Object.getOwnPropertyDescriptors(l)) : h(Object(l)).forEach(function(b) { Object.defineProperty(f, b, Object.getOwnPropertyDescriptor(l, b)); }); } return f; } function v(f) { "@babel/helpers - typeof"; return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? v = function(a) { return typeof a; } : v = function(a) { return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a; }, v(f); } function A(f, a) { if (!(f instanceof a)) throw new TypeError("Cannot call a class as a function"); } function O(f, a) { for (var l = 0; l < a.length; l++) { var b = a[l]; b.enumerable = b.enumerable || !1, b.configurable = !0, "value" in b && (b.writable = !0), Object.defineProperty(f, b.key, b); } } function S(f, a, l) { return a && O(f.prototype, a), f; } function T(f, a, l) { return a in f ? Object.defineProperty(f, a, { value: l, enumerable: !0, configurable: !0, writable: !0 }) : f[a] = l, f; } function W() { return W = Object.assign || function(f) { for (var a = 1; a < arguments.length; a++) { var l = arguments[a]; for (var b in l) Object.prototype.hasOwnProperty.call(l, b) && (f[b] = l[b]); } return f; }, W.apply(this, arguments); } function G(f, a) { if (typeof a != "function" && a !== null) throw new TypeError("Super expression must either be null or a function"); f.prototype = Object.create(a && a.prototype, { constructor: { value: f, writable: !0, configurable: !0 } }), a && se(f, a); } function ae(f) { return ae = Object.setPrototypeOf ? Object.getPrototypeOf : function(l) { return l.__proto__ || Object.getPrototypeOf(l); }, ae(f); } function se(f, a) { return se = Object.setPrototypeOf || function(b, y) { return b.__proto__ = y, b; }, se(f, a); } function le(f, a) { if (f == null) return {}; var l = {}, b = Object.keys(f), y, N; for (N = 0; N < b.length; N++) y = b[N], !(a.indexOf(y) >= 0) && (l[y] = f[y]); return l; } function B(f, a) { if (f == null) return {}; var l = le(f, a), b, y; if (Object.getOwnPropertySymbols) { var N = Object.getOwnPropertySymbols(f); for (y = 0; y < N.length; y++) b = N[y], !(a.indexOf(b) >= 0) && Object.prototype.propertyIsEnumerable.call(f, b) && (l[b] = f[b]); } return l; } function K(f) { if (f === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return f; } function Q(f, a) { if (a && (typeof a == "object" || typeof a == "function")) return a; if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined"); return K(f); } function q(f, a) { return Te(f) || ie(f, a) || oe(f, a) || Qt(); } function Te(f) { if (Array.isArray(f)) return f; } function ie(f, a) { var l = f == null ? null : typeof Symbol < "u" && f[Symbol.iterator] || f["@@iterator"]; if (l != null) { var b = [], y = !0, N = !1, X, ue; try { for (l = l.call(f); !(y = (X = l.next()).done) && (b.push(X.value), !(a && b.length === a)); y = !0) ; } catch (lr) { N = !0, ue = lr; } finally { try { !y && l.return != null && l.return(); } finally { if (N) throw ue; } } return b; } } function oe(f, a) { if (f) { if (typeof f == "string") return ge(f, a); var l = Object.prototype.toString.call(f).slice(8, -1); if (l === "Object" && f.constructor && (l = f.constructor.name), l === "Map" || l === "Set") return Array.from(f); if (l === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)) return ge(f, a); } } function ge(f, a) { (a == null || a > f.length) && (a = f.length); for (var l = 0, b = new Array(a); l < a; l++) b[l] = f[l]; return b; } function Qt() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } var Y = { Mobile: "mobile", Tablet: "tablet", SmartTv: "smarttv", Console: "console", Wearable: "wearable", Embedded: "embedded", Browser: void 0 }, Z = { Chrome: "Chrome", Firefox: "Firefox", Opera: "Opera", Yandex: "Yandex", Safari: "Safari", InternetExplorer: "Internet Explorer", Edge: "Edge", Chromium: "Chromium", Ie: "IE", MobileSafari: "Mobile Safari", EdgeChromium: "Edge Chromium", MIUI: "MIUI Browser", SamsungBrowser: "Samsung Browser" }, ke = { IOS: "iOS", Android: "Android", WindowsPhone: "Windows Phone", Windows: "Windows", MAC_OS: "Mac OS" }, Ke = { isMobile: !1, isTablet: !1, isBrowser: !1, isSmartTV: !1, isConsole: !1, isWearable: !1 }, Ge = function(a) { switch (a) { case Y.Mobile: return { isMobile: !0 }; case Y.Tablet: return { isTablet: !0 }; case Y.SmartTv: return { isSmartTV: !0 }; case Y.Console: return { isConsole: !0 }; case Y.Wearable: return { isWearable: !0 }; case Y.Browser: return { isBrowser: !0 }; case Y.Embedded: return { isEmbedded: !0 }; default: return Ke; } }, er = function(a) { return d(a); }, I = function(a) { var l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "none"; return a || l; }, qe = function() { return typeof window < "u" && (window.navigator || navigator) ? window.navigator || navigator : !1; }, Ye = function(a) { var l = qe(); return l && l.platform && (l.platform.indexOf(a) !== -1 || l.platform === "MacIntel" && l.maxTouchPoints > 1 && !window.MSStream); }, tr = function(a, l, b, y, N) { return { isBrowser: a, browserMajorVersion: I(l.major), browserFullVersion: I(l.version), browserName: I(l.name), engineName: I(b.name), engineVersion: I(b.version), osName: I(y.name), osVersion: I(y.version), userAgent: I(N) }; }, At = function(a, l, b, y) { return _({}, a, { vendor: I(l.vendor), model: I(l.model), os: I(b.name), osVersion: I(b.version), ua: I(y) }); }, rr = function(a, l, b, y) { return { isSmartTV: a, engineName: I(l.name), engineVersion: I(l.version), osName: I(b.name), osVersion: I(b.version), userAgent: I(y) }; }, nr = function(a, l, b, y) { return { isConsole: a, engineName: I(l.name), engineVersion: I(l.version), osName: I(b.name), osVersion: I(b.version), userAgent: I(y) }; }, Pr = function(a, l, b, y) { return { isWearable: a, engineName: I(l.name), engineVersion: I(l.version), osName: I(b.name), osVersion: I(b.version), userAgent: I(y) }; }, lt = function(a, l, b, y, N) { return { isEmbedded: a, vendor: I(l.vendor), model: I(l.model), engineName: I(b.name), engineVersion: I(b.version), osName: I(y.name), osVersion: I(y.version), userAgent: I(N) }; }; function ir(f) { var a = f ? u(f) : m, l = a.device, b = a.browser, y = a.engine, N = a.os, X = a.ua, ue = Ge(l.type), lr = ue.isBrowser, os = ue.isMobile, as = ue.isTablet, Jn = ue.isSmartTV, Zn = ue.isConsole, Qn = ue.isWearable, ei = ue.isEmbedded; if (lr) return tr(lr, b, y, N, X); if (Jn) return rr(Jn, y, N, X); if (Zn) return nr(Zn, y, N, X); if (os || as) return At(ue, l, N, X); if (Qn) return Pr(Qn, y, N, X); if (ei) return lt(ei, l, y, N, X); } var Ne = function(a) { var l = a.type; return l === Y.Mobile; }, or = function(a) { var l = a.type; return l === Y.Tablet; }, ct = function(a) { var l = a.type; return l === Y.Mobile || l === Y.Tablet; }, Ue = function(a) { var l = a.type; return l === Y.SmartTv; }, De = function(a) { var l = a.type; return l === Y.Browser; }, ar = function(a) { var l = a.type; return l === Y.Wearable; }, Ct = function(a) { var l = a.type; return l === Y.Console; }, Rt = function(a) { var l = a.type; return l === Y.Embedded; }, ce = function(a) { var l = a.vendor; return I(l); }, xe = function(a) { var l = a.model; return I(l); }, Xe = function(a) { var l = a.type; return I(l, "browser"); }, k = function(a) { var l = a.name; return l === ke.Android; }, D = function(a) { var l = a.name; return l === ke.Windows; }, R = function(a) { var l = a.name; return l === ke.MAC_OS; }, M = function(a) { var l = a.name; return l === ke.WindowsPhone; }, be = function(a) { var l = a.name; return l === ke.IOS; }, pe = function(a) { var l = a.version; return I(l); }, L = function(a) { var l = a.name; return I(l); }, C = function(a) { var l = a.name; return l === Z.Chrome; }, _e = function(a) { var l = a.name; return l === Z.Firefox; }, ut = function(a) { var l = a.name; return l === Z.Chromium; }, Je = function(a) { var l = a.name; return l === Z.Edge; }, En = function(a) { var l = a.name; return l === Z.Yandex; }, Sn = function(a) { var l = a.name; return l === Z.Safari || l === Z.MobileSafari; }, Tn = function(a) { var l = a.name; return l === Z.MobileSafari; }, On = function(a) { var l = a.name; return l === Z.Opera; }, In = function(a) { var l = a.name; return l === Z.InternetExplorer || l === Z.Ie; }, An = function(a) { var l = a.name; return l === Z.MIUI; }, Cn = function(a) { var l = a.name; return l === Z.SamsungBrowser; }, Rn = function(a) { var l = a.version; return I(l); }, Pn = function(a) { var l = a.major; return I(l); }, kn = function(a) { var l = a.name; return I(l); }, Nn = function(a) { var l = a.name; return I(l); }, Dn = function(a) { var l = a.version; return I(l); }, xn = function() { var a = qe(), l = a && a.userAgent && a.userAgent.toLowerCase(); return typeof l == "string" ? /electron/.test(l) : !1; }, dt = function(a) { return typeof a == "string" && a.indexOf("Edg/") !== -1; }, Ln = function() { var a = qe(); return a && (/iPad|iPhone|iPod/.test(a.platform) || a.platform === "MacIntel" && a.maxTouchPoints > 1) && !window.MSStream; }, Oe = function() { return Ye("iPad"); }, Fn = function() { return Ye("iPhone"); }, Mn = function() { return Ye("iPod"); }, Un = function(a) { return I(a); }; function Wn(f) { var a = f || m, l = a.device, b = a.browser, y = a.os, N = a.engine, X = a.ua; return { isSmartTV: Ue(l), isConsole: Ct(l), isWearable: ar(l), isEmbedded: Rt(l), isMobileSafari: Tn(b) || Oe(), isChromium: ut(b), isMobile: ct(l) || Oe(), isMobileOnly: Ne(l), isTablet: or(l) || Oe(), isBrowser: De(l), isDesktop: De(l), isAndroid: k(y), isWinPhone: M(y), isIOS: be(y) || Oe(), isChrome: C(b), isFirefox: _e(b), isSafari: Sn(b), isOpera: On(b), isIE: In(b), osVersion: pe(y), osName: L(y), fullBrowserVersion: Rn(b), browserVersion: Pn(b), browserName: kn(b), mobileVendor: ce(l), mobileModel: xe(l), engineName: Nn(N), engineVersion: Dn(N), getUA: Un(X), isEdge: Je(b) || dt(X), isYandex: En(b), deviceType: Xe(l), isIOS13: Ln(), isIPad13: Oe(), isIPhone13: Fn(), isIPod13: Mn(), isElectron: xn(), isEdgeChromium: dt(X), isLegacyEdge: Je(b) && !dt(X), isWindows: D(y), isMacOs: R(y), isMIUI: An(b), isSamsungBrowser: Cn(b) }; } var $n = Ue(c), Bn = Ct(c), Hn = ar(c), da = Rt(c), fa = Tn(o) || Oe(), ma = ut(o), sr = ct(c) || Oe(), Vn = Ne(c), jn = or(c) || Oe(), zn = De(c), pa = De(c), Kn = k(p), Gn = M(p), qn = be(p) || Oe(), _a = C(o), ha = _e(o), ga = Sn(o), ba = On(o), Yn = In(o), va = pe(p), wa = L(p), ya = Rn(o), Ea = Pn(o), Sa = kn(o), Ta = ce(c), Oa = xe(c), Ia = Nn(g), Aa = Dn(g), Ca = Un(w), Ra = Je(o) || dt(w), Pa = En(o), ka = Xe(c), Na = Ln(), Da = Oe(), xa = Fn(), La = Mn(), Fa = xn(), Ma = dt(w), Ua = Je(o) && !dt(w), Wa = D(p), $a = R(p), Ba = An(o), Ha = Cn(o), Va = function(a) { if (!a || typeof a != "string") { console.error("No valid user agent string was provided"); return; } var l = u(a), b = l.device, y = l.browser, N = l.os, X = l.engine, ue = l.ua; return Wn({ device: b, browser: y, os: N, engine: X, ua: ue }); }, ja = function(a) { var l = a.renderWithFragment, b = a.children, y = B(a, ["renderWithFragment", "children"]); return Kn ? l ? r.createElement(t.Fragment, null, b) : r.createElement("div", y, b) : null; }, za = function(a) { var l = a.renderWithFragment, b = a.children, y = B(a, ["renderWithFragment", "children"]); return zn ? l ? r.createElement(t.Fragment, null, b) : r.createElement("div", y, b) : null; }, Ka = function(a) { var l = a.renderWithFragment, b = a.children, y = B(a, ["renderWithFragment", "children"]); return Yn ? l ? r.createElement(t.Fragment, null, b) : r.createElement("div", y, b) : null; }, Ga = function(a) { var l = a.renderWithFragment, b = a.children, y = B(a, ["renderWithFragment", "children"]); return qn ? l ? r.createElement(t.Fragment, null, b) : r.createElement("div", y, b) : null; }, qa = function(a) { var l = a.renderWithFragment, b = a.children, y = B(a, ["renderWithFragment", "children"]); return sr ? l ? r.createElement(t.Fragment, null, b) : r.createElement("div", y, b) : null; }, Ya = function(a) { var l = a.renderWithFragment, b = a.children, y = B(a, ["renderWithFragment", "children"]); return jn ? l ? r.createElement(t.Fragment, null, b) : r.createElement("div", y, b) : null; }, Xa = function(a) { var l = a.renderWithFragment, b = a.children, y = B(a, ["renderWithFragment", "children"]); return Gn ? l ? r.createElement(t.Fragment, null, b) : r.createElement("div", y, b) : null; }, Ja = function(a) { var l = a.renderWithFragment, b = a.children; a.viewClassName, a.style; var y = B(a, ["renderWithFragment", "children", "viewClassName", "style"]); return Vn ? l ? r.createElement(t.Fragment, null, b) : r.createElement("div", y, b) : null; }, Za = function(a) { var l = a.renderWithFragment, b = a.children, y = B(a, ["renderWithFragment", "children"]); return $n ? l ? r.createElement(t.Fragment, null, b) : r.createElement("div", y, b) : null; }, Qa = function(a) { var l = a.renderWithFragment, b = a.children, y = B(a, ["renderWithFragment", "children"]); return Bn ? l ? r.createElement(t.Fragment, null, b) : r.createElement("div", y, b) : null; }, es = function(a) { var l = a.renderWithFragment, b = a.children, y = B(a, ["renderWithFragment", "children"]); return Hn ? l ? r.createElement(t.Fragment, null, b) : r.createElement("div", y, b) : null; }, ts = function(a) { var l = a.renderWithFragment, b = a.children; a.viewClassName, a.style; var y = a.condition, N = B(a, ["renderWithFragment", "children", "viewClassName", "style", "condition"]); return y ? l ? r.createElement(t.Fragment, null, b) : r.createElement("div", N, b) : null; }; function rs(f) { return /* @__PURE__ */ function(a) { G(l, a); function l(b) { var y; return A(this, l), y = Q(this, ae(l).call(this, b)), y.isEventListenerAdded = !1, y.handleOrientationChange = y.handleOrientationChange.bind(K(y)), y.onOrientationChange = y.onOrientationChange.bind(K(y)), y.onPageLoad = y.onPageLoad.bind(K(y)), y.state = { isLandscape: !1, isPortrait: !1 }, y; } return S(l, [{ key: "handleOrientationChange", value: function() { this.isEventListenerAdded || (this.isEventListenerAdded = !0); var y = window.innerWidth > window.innerHeight ? 90 : 0; this.setState({ isPortrait: y === 0, isLandscape: y === 90 }); } }, { key: "onOrientationChange", value: function() { this.handleOrientationChange(); } }, { key: "onPageLoad", value: function() { this.handleOrientationChange(); } }, { key: "componentDidMount", value: function() { (typeof window > "u" ? "undefined" : v(window)) !== void 0 && sr && (this.isEventListenerAdded ? window.removeEventListener("load", this.onPageLoad, !1) : (this.handleOrientationChange(), window.addEventListener("load", this.onPageLoad, !1)), window.addEventListener("resize", this.onOrientationChange, !1)); } }, { key: "componentWillUnmount", value: function() { window.removeEventListener("resize", this.onOrientationChange, !1); } }, { key: "render", value: function() { return r.createElement(f, W({}, this.props, { isLandscape: this.state.isLandscape, isPortrait: this.state.isPortrait })); } }]), l; }(r.Component); } function ns() { var f = t.useState(function() { var N = window.innerWidth > window.innerHeight ? 90 : 0; return { isPortrait: N === 0, isLandscape: N === 90, orientation: N === 0 ? "portrait" : "landscape" }; }), a = q(f, 2), l = a[0], b = a[1], y = t.useCallback(function() { var N = window.innerWidth > window.innerHeight ? 90 : 0, X = { isPortrait: N === 0, isLandscape: N === 90, orientation: N === 0 ? "portrait" : "landscape" }; l.orientation !== X.orientation && b(X); }, [l.orientation]); return t.useEffect(function() { return (typeof window > "u" ? "undefined" : v(window)) !== void 0 && sr && (y(), window.addEventListener("load", y, !1), window.addEventListener("resize", y, !1)), function() { window.removeEventListener("resize", y, !1), window.removeEventListener("load", y, !1); }; }, [y]), l; } function Xn(f) { var a = f || window.navigator.userAgent; return u(a); } function is(f) { var a = f || window.navigator.userAgent, l = Xn(a), b = Wn(l); return [b, l]; } return E.AndroidView = ja, E.BrowserTypes = Z, E.BrowserView = za, E.ConsoleView = Qa, E.CustomView = ts, E.IEView = Ka, E.IOSView = Ga, E.MobileOnlyView = Ja, E.MobileView = qa, E.OsTypes = ke, E.SmartTVView = Za, E.TabletView = Ya, E.WearableView = es, E.WinPhoneView = Xa, E.browserName = Sa, E.browserVersion = Ea, E.deviceDetect = ir, E.deviceType = ka, E.engineName = Ia, E.engineVersion = Aa, E.fullBrowserVersion = ya, E.getSelectorsByUserAgent = Va, E.getUA = Ca, E.isAndroid = Kn, E.isBrowser = zn, E.isChrome = _a, E.isChromium = ma, E.isConsole = Bn, E.isDesktop = pa, E.isEdge = Ra, E.isEdgeChromium = Ma, E.isElectron = Fa, E.isEmbedded = da, E.isFirefox = ha, E.isIE = Yn, E.isIOS = qn, E.isIOS13 = Na, E.isIPad13 = Da, E.isIPhone13 = xa, E.isIPod13 = La, E.isLegacyEdge = Ua, E.isMIUI = Ba, E.isMacOs = $a, E.isMobile = sr, E.isMobileOnly = Vn, E.isMobileSafari = fa, E.isOpera = ba, E.isSafari = ga, E.isSamsungBrowser = Ha, E.isSmartTV = $n, E.isTablet = jn, E.isWearable = Hn, E.isWinPhone = Gn, E.isWindows = Wa, E.isYandex = Pa, E.mobileModel = Oa, E.mobileVendor = Ta, E.osName = wa, E.osVersion = va, E.parseUserAgent = u, E.setUserAgent = er, E.useDeviceData = Xn, E.useDeviceSelectors = is, E.useMobileOrientation = ns, E.withOrientationChange = rs, E; } var wu = vu(); function ht() { return ht = Object.assign ? Object.assign.bind() : function(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]); } return e; }, ht.apply(this, arguments); } function yu(e) { var t = {}; Object.getOwnPropertyNames(e).forEach(function(n) { var i = Object.getOwnPropertyDescriptor(e, n); i && typeof i.get == "function" && (t[n] = i.get); }); for (var r = Object.getPrototypeOf(e); r !== null; ) Object.getOwnPropertyNames(r).forEach(function(n) { var i = Object.getOwnPropertyDescriptor(r, n); i && typeof i.get == "function" && !t.hasOwnProperty(n) && (t[n] = i.get); }), r = Object.getPrototypeOf(r); return t; } var gr = "$$_computed_"; function Eu(e) { return function(t, r, n) { function i(c) { var g = Object.entries(c).filter(function(w) { var d = w[0]; return d.startsWith(gr); }).map(function(w) { return w[1]; }), p = g.reduce(function(w, d) { return ht({}, w, d(c)); }, {}); return p; } var o = function(g, p) { t(function(w) { var d = typeof g == "object" ? g : g(w), u = ht({}, w, d); return ht({}, u, i(u)); }, p); }; n.setState = o; var s = e(o, r, n); return Object.assign({}, s, i(s)); }; } function Su(e) { var t = yu(e); return function(r) { var n = {}; return Object.keys(t).forEach(function(i) { n[i] = t[i].bind(r)(); }), n; }; } function Tu(e, t, r) { var n; if (typeof e == "string") { var i; return i = {}, i[gr + "_" + e] = r, i; } if (typeof e == "object") { var o; return ht({}, e, (o = {}, o[gr] = Su(e), o)); } return n = {}, n[gr] = t, n; } var Ou = function(t) { return Eu(t); }; const ua = Jt.createShortcutKeyRepository(), Iu = () => { const e = ua.getIsDisabledShortcutKey(); if (e.isErr()) { console.log(e.error); return; } return e.value; }, Ot = st()( Ou((e, t) => ({ disabled: Iu(), setDisabled: (r, n) => { e((i) => ({ disabled: { ...i.disabled, [r]: n } })), ua.setDisabledShortcutKey(r, n); }, ...Tu(t, (r) => { var n, i; return { isDisabledWidgetShortcutKey: wu.isMobile || ((n = r.disabled) == null ? void 0 : n.WIDGET) || !1, isDisabledSiteShortcutKey: ((i = r.disabled) == null ? void 0 : i.SITE) || !1 }; }) })) ); Ot.subscribe((e, t) => { e.isDisabledWidgetShortcutKey !== t.isDisabledWidgetShortcutKey && (e.isDisabledWidgetShortcutKey ? Ve.disable() : Ve.enable()), e.isDisabledSiteShortcutKey !== t.isDisabledSiteShortcutKey && (e.isDisabledSiteShortcutKey ? je.disable() : je.clearDisabled()); }); const Au = () => { Ot.getState().isDisabledWidgetShortcutKey || Ve.enable(), Ot.getState().isDisabledSiteShortcutKey && je.disable(); }, wd = () => Ot((e) => e.disabled), yd = () => Ot((e) => e.isDisabledWidgetShortcutKey), Ed = () => Ot((e) => e.setDisabled), Cu = [ { displayText: "Ctrl+Shift+U", ctrlKey: !0, shiftKey: !0, key: "u", onKeydown: () => aa() }, ...uu ], Ve = { enable: () => { if (!(Ve._clearFns.length > 0)) for (const e of Cu) Ve._bindShortcut(e); }, disable: () => { for (const e of Ve._clearFns) e(); Ve._clearFns.length = 0; }, _bindShortcut: (e) => { if (!e.onKeydown) return; const t = (r) => { Ru(r, e) && (r.preventDefault(), r.stopPropagation(), e.onKeydown()); }; window.addEventListener("keydown", t), Ve._clearFns.push(() => { window.removeEventListener("keydown", t); }); }, _clearFns: [] }, je = { disable: () => { const e = ["textbox", "combobox", "searchbox", "listbox", "spinbutton", "slider"], t = /^[a-z0-9`~!@#$%^&*()\-_=+\[\]{}\\|;:'",.<>/?]$/i, r = (n) => { const i = document.activeElement; if (n.ctrlKey || n.altKey || n.shiftKey || n.metaKey) return; const o = su(i); o && e.includes(o) || mu(i) || pu(i) || t.test(n.key) && n.stopImmediatePropagation(); }; window.addEventListener("keydown", r, !0), je._clearFn = () => { window.removeEventListener("keydown", r, !0); }; }, clearDisabled: () => { var e; (e = je._clearFn) == null || e.call(je), je._clearFn = void 0; }, _clearFn: void 0 }, Ru = (e, t) => { const { altKey: r, ctrlKey: n, metaKey: i, shiftKey: o, key: s } = t; if (!e || typeof e.key != "string" || typeof e.code != "string") return !1; const c = e.key.toLowerCase(), g = e.code.toLowerCase(), p = g.replace("digit", ""), w = s.toLowerCase(), d = /^(digit[0-9]|[0-9])$/.test(g); return !!r !== e.altKey || !!n !== e.ctrlKey || !!i !== e.metaKey || !!o !== e.shiftKey ? !1 : d ? p === w : c === w; }, Pu = async () => { if (!ku()) { Wr(); return; } if (!await Rc()) { Wr(); return; } const t = Pc(); lc(), Ac(), Sc(t); const r = [ // WidgetIcon { condition: () => !t.isIconHidden, action: () => hc(t) }, // サイト構造最適化 { condition: () => !t.allSiteOptimizersDisabled, action: () => mc(t.disabledSiteOptimizers || []) }, // ショートカットキー { condition: () => !0, action: () => Au() }, // ImgAlt { condition: () => t.hasImgAlt, action: () => sc(Ft) }, // 動画キャプション { condition: () => t.hasVideoCaption, action: () => _c(Ft) }, // コンテンツナビゲーション { condition: () => { var n; return !((n = t.disabledSiteOptimizers) != null && n.some((i) => i === As.CONTENTS_NAVIGATION)); }, action: () => kc(t.widgetColor || Os) }, // ウィジェットパネル { condition: () => { const n = Jt.createCurrentFeatureRepository().getCurrentFeatures(); return n.isOk() && !tn(n.value); }, action: () => Bo() }, // unilingo { condition: () => { var n; return (n = t.addonMeta) == null ? void 0 : n.siteTranslationEnabled; }, action: () => pc() }, // ユニウェブ用のアンカーが付いてたらウィジェットパネルを開いた状態にする { condition: () => ys, action: () => { setTimeout(() => { Ht(!0); }, 100); } } ]; for (const n of r) n.condition() && n.action(); Ms(); }, ku = () => document.getElementById(Tr) || ws.isDisabled() || la.getState().isHidden ? !1 : Ft ? !0 : (console.error(Xi, "cannot find data-account attribute"), !1); Pu(); export { st as $, Jt as A, Lt as B, Is as C, dc as D, Du as E, Nl as F, cn as G, sn as H, wo as I, Ss as J, Os as K, Hu as L, Bu as M, kl as N, wn as O, Qi as P, xi as Q, sd as R, As as S, Ht as T, Ds as U, Es as V, Vu as W, Mu as X, zu as Y, Gu as Z, Re as _, Er as a, ju as a0, ws as a1, Fu as a2, Kr as a3, Lo as a4, Co as a5, Ro as a6, Tu as a7, wu as a8, Xr as a9, id as aA, Ju as aB, Qu as aC, td as aD, nd as aE, Lu as aF, _o as aG, _u as aH, hu as aI, ml as aJ, cd as aK, Pt as aL, yd as aM, wd as aN, Ed as aO, Vi as aP, ye as aQ, ao as aR, Le as aS, js as aT, po as aU, bn as aV, It as aW, Wo as aX, xu as aa, kt as ab, pd as ac, _d as ad, vd as ae, Gt as af, un as ag, cu as ah, lu as ai, P as aj, Tr as ak, ca as al, bd as am, F as an, U as ao, Ku as ap, hd as aq, su as ar, Ou as as, ad as at, $u as au, xl as av, Dl as aw, Zu as ax, ed as ay, rd as az, qu as b, Yu as c, Xu as d, du as e, ud as f, Pc as g, dd as h, mu as i, fu as j, Pe as k, fd as l, md as m, gd as n, Uu as o, cc as p, od as q, Wu as r, Ft as s, ot as t, ld as u, xt as v, Kt as w, Ut as x, Ir as y, Oo as z };