|| i[0] !== "o" && i[0] !== "O" || i[1] !== "n" && i[1] !== "N") && (i = df.get(i) || i, Fa(e, i, a)) } } function Bu(e, t, i, a, n, l) { switch (i) { case "style": po(e, a, l); break; case "dangerouslySetInnerHTML": if (a != null) { if (typeof a != "object" || !("__html" in a)) throw Error(c(61)); if (i = a.__html, i != null) { if (n.children != null) throw Error(c(60)); e.innerHTML = i } } break; case "children": typeof a == "string" ? Pa(e, a) : (typeof a == "number" || typeof a == "bigint") && Pa(e, "" + a); break; case "onScroll": a != null && _e("scroll", e); break; case "onScrollEnd": a != null && _e("scrollend", e); break; case "onClick": a != null && (e.onclick = Ci); break; case "suppressContentEditableWarning": case "suppressHydrationWarning": case "innerHTML": case "ref": break; case "innerText": case "textContent": break; default: if (!Ul.hasOwnProperty(i)) e: { if (i[0] === "o" && i[1] === "n" && (n = i.endsWith("Capture"), t = i.slice(2, n ? i.length - 7 : void 0), l = e[Ut] || null, l = l != null ? l[i] : null, typeof l == "function" && e.removeEventListener(t, l, n), typeof a == "function")) { typeof l != "function" && l !== null && (i in e ? e[i] = null : e.hasAttribute(i) && e.removeAttribute(i)), e.addEventListener(t, a, n); break e } i in e ? e[i] = a : a === !0 ? e.setAttribute(i, "") : Fa(e, i, a) } } } function Lt(e, t, i) { switch (t) { case "div": case "span": case "svg": case "path": case "a": case "g": case "p": case "li": break; case "img": _e("error", e), _e("load", e); var a = !1, n = !1, l; for (l in i) if (i.hasOwnProperty(l)) { var r = i[l]; if (r != null) switch (l) { case "src": a = !0; break; case "srcSet": n = !0; break; case "children": case "dangerouslySetInnerHTML": throw Error(c(137, t)); default: Qe(e, t, l, r, i, null) } } n && Qe(e, t, "srcSet", i.srcSet, i, null), a && Qe(e, t, "src", i.src, i, null); return; case "input": _e("invalid", e); var u = l = r = n = null, m = null, y = null; for (a in i) if (i.hasOwnProperty(a)) { var N = i[a]; if (N != null) switch (a) { case "name": n = N; break; case "type": r = N; break; case "checked": m = N; break; case "defaultChecked": y = N; break; case "value": l = N; break; case "defaultValue": u = N; break; case "children": case "dangerouslySetInnerHTML": if (N != null) throw Error(c(137, t)); break; default: Qe(e, t, a, N, i, null) } } Q(e, l, u, m, y, r, n, !1); return; case "select": _e("invalid", e), a = r = l = null; for (n in i) if (i.hasOwnProperty(n) && (u = i[n], u != null)) switch (n) { case "value": l = u; break; case "defaultValue": r = u; break; case "multiple": a = u; default: Qe(e, t, n, u, i, null) }t = l, i = r, e.multiple = !!a, t != null ? De(e, !!a, t, !1) : i != null && De(e, !!a, i, !0); return; case "textarea": _e("invalid", e), l = n = a = null; for (r in i) if (i.hasOwnProperty(r) && (u = i[r], u != null)) switch (r) { case "value": a = u; break; case "defaultValue": n = u; break; case "children": l = u; break; case "dangerouslySetInnerHTML": if (u != null) throw Error(c(91)); break; default: Qe(e, t, r, u, i, null) }fo(e, a, n, l); return; case "option": for (m in i) i.hasOwnProperty(m) && (a = i[m], a != null) && (m === "selected" ? e.selected = a && typeof a != "function" && typeof a != "symbol" : Qe(e, t, m, a, i, null)); return; case "dialog": _e("beforetoggle", e), _e("toggle", e), _e("cancel", e), _e("close", e); break; case "iframe": case "object": _e("load", e); break; case "video": case "audio": for (a = 0; a < vl.length; a++)_e(vl[a], e); break; case "image": _e("error", e), _e("load", e); break; case "details": _e("toggle", e); break; case "embed": case "source": case "link": _e("error", e), _e("load", e); case "area": case "base": case "br": case "col": case "hr": case "keygen": case "meta": case "param": case "track": case "wbr": case "menuitem": for (y in i) if (i.hasOwnProperty(y) && (a = i[y], a != null)) switch (y) { case "children": case "dangerouslySetInnerHTML": throw Error(c(137, t)); default: Qe(e, t, y, a, i, null) }return; default: if (Ps(t)) { for (N in i) i.hasOwnProperty(N) && (a = i[N], a !== void 0 && Bu(e, t, N, a, i, void 0)); return } }for (u in i) i.hasOwnProperty(u) && (a = i[u], a != null && Qe(e, t, u, a, i, null)) } function Bg(e, t, i, a) { switch (t) { case "div": case "span": case "svg": case "path": case "a": case "g": case "p": case "li": break; case "input": var n = null, l = null, r = null, u = null, m = null, y = null, N = null; for (E in i) { var z = i[E]; if (i.hasOwnProperty(E) && z != null) switch (E) { case "checked": break; case "value": break; case "defaultValue": m = z; default: a.hasOwnProperty(E) || Qe(e, t, E, null, a, z) } } for (var _ in a) { var E = a[_]; if (z = i[_], a.hasOwnProperty(_) && (E != null || z != null)) switch (_) { case "type": l = E; break; case "name": n = E; break; case "checked": y = E; break; case "defaultChecked": N = E; break; case "value": r = E; break; case "defaultValue": u = E; break; case "children": case "dangerouslySetInnerHTML": if (E != null) throw Error(c(137, t)); break; default: E !== z && Qe(e, t, _, E, a, z) } } k(e, r, u, m, y, N, l, n); return; case "select": E = r = u = _ = null; for (l in i) if (m = i[l], i.hasOwnProperty(l) && m != null) switch (l) { case "value": break; case "multiple": E = m; default: a.hasOwnProperty(l) || Qe(e, t, l, null, a, m) }for (n in a) if (l = a[n], m = i[n], a.hasOwnProperty(n) && (l != null || m != null)) switch (n) { case "value": _ = l; break; case "defaultValue": u = l; break; case "multiple": r = l; default: l !== m && Qe(e, t, n, l, a, m) }t = u, i = r, a = E, _ != null ? De(e, !!i, _, !1) : !!a != !!i && (t != null ? De(e, !!i, t, !0) : De(e, !!i, i ? [] : "", !1)); return; case "textarea": E = _ = null; for (u in i) if (n = i[u], i.hasOwnProperty(u) && n != null && !a.hasOwnProperty(u)) switch (u) { case "value": break; case "children": break; default: Qe(e, t, u, null, a, n) }for (r in a) if (n = a[r], l = i[r], a.hasOwnProperty(r) && (n != null || l != null)) switch (r) { case "value": _ = n; break; case "defaultValue": E = n; break; case "children": break; case "dangerouslySetInnerHTML": if (n != null) throw Error(c(91)); break; default: n !== l && Qe(e, t, r, n, a, l) }Bn(e, _, E); return; case "option": for (var Y in i) _ = i[Y], i.hasOwnProperty(Y) && _ != null && !a.hasOwnProperty(Y) && (Y === "selected" ? e.selected = !1 : Qe(e, t, Y, null, a, _)); for (m in a) _ = a[m], E = i[m], a.hasOwnProperty(m) && _ !== E && (_ != null || E != null) && (m === "selected" ? e.selected = _ && typeof _ != "function" && typeof _ != "symbol" : Qe(e, t, m, _, a, E)); return; case "img": case "link": case "area": case "base": case "br": case "col": case "embed": case "hr": case "keygen": case "meta": case "param": case "source": case "track": case "wbr": case "menuitem": for (var le in i) _ = i[le], i.hasOwnProperty(le) && _ != null && !a.hasOwnProperty(le) && Qe(e, t, le, null, a, _); for (y in a) if (_ = a[y], E = i[y], a.hasOwnProperty(y) && _ !== E && (_ != null || E != null)) switch (y) { case "children": case "dangerouslySetInnerHTML": if (_ != null) throw Error(c(137, t)); break; default: Qe(e, t, y, _, a, E) }return; default: if (Ps(t)) { for (var Ze in i) _ = i[Ze], i.hasOwnProperty(Ze) && _ !== void 0 && !a.hasOwnProperty(Ze) && Bu(e, t, Ze, void 0, a, _); for (N in a) _ = a[N], E = i[N], !a.hasOwnProperty(N) || _ === E || _ === void 0 && E === void 0 || Bu(e, t, N, _, a, E); return } }for (var h in i) _ = i[h], i.hasOwnProperty(h) && _ != null && !a.hasOwnProperty(h) && Qe(e, t, h, null, a, _); for (z in a) _ = a[z], E = i[z], !a.hasOwnProperty(z) || _ === E || _ == null && E == null || Qe(e, t, z, _, a, E) } function hd(e) { switch (e) { case "css": case "script": case "font": case "img": case "image": case "input": case "link": return !0; default: return !1 } } function Gg() { if (typeof performance.getEntriesByType == "function") { for (var e = 0, t = 0, i = performance.getEntriesByType("resource"), a = 0; a < i.length; a++) { var n = i[a], l = n.transferSize, r = n.initiatorType, u = n.duration; if (l && u && hd(r)) { for (r = 0, u = n.responseEnd, a += 1; a < i.length; a++) { var m = i[a], y = m.startTime; if (y > u) break; var N = m.transferSize, z = m.initiatorType; N && hd(z) && (m = m.responseEnd, r += N * (m < u ? 1 : (u - y) / (m - y))) } if (--a, t += 8 * (l + r) / (n.duration / 1e3), e++, 10 < e) break } } if (0 < e) return t / e / 1e6 } return navigator.connection && (e = navigator.connection.downlink, typeof e == "number") ? e : 5 } var Gu = null, Hu = null; function Ls(e) { return e.nodeType === 9 ? e : e.ownerDocument } function bd(e) { switch (e) { case "http://www.w3.org/2000/svg": return 1; case "http://www.w3.org/1998/Math/MathML": return 2; default: return 0 } } function vd(e, t) { if (e === 0) switch (t) { case "svg": return 1; case "math": return 2; default: return 0 }return e === 1 && t === "foreignObject" ? 0 : e } function Vu(e, t) { return e === "textarea" || e === "noscript" || typeof t.children == "string" || typeof t.children == "number" || typeof t.children == "bigint" || typeof t.dangerouslySetInnerHTML == "object" && t.dangerouslySetInnerHTML !== null && t.dangerouslySetInnerHTML.__html != null } var ku = null; function Hg() { var e = window.event; return e && e.type === "popstate" ? e === ku ? !1 : (ku = e, !0) : (ku = null, !1) } var yd = typeof setTimeout == "function" ? setTimeout : void 0, Vg = typeof clearTimeout == "function" ? clearTimeout : void 0, jd = typeof Promise == "function" ? Promise : void 0, kg = typeof queueMicrotask == "function" ? queueMicrotask : typeof jd < "u" ? function (e) { return jd.resolve(null).then(e).catch(Xg) } : yd; function Xg(e) { setTimeout(function () { throw e }) } function va(e) { return e === "head" } function xd(e, t) { var i = t, a = 0; do { var n = i.nextSibling; if (e.removeChild(i), n && n.nodeType === 8) if (i = n.data, i === "/$" || i === "/&") { if (a === 0) { e.removeChild(n), On(t); return } a-- } else if (i === "$" || i === "$?" || i === "$~" || i === "$!" || i === "&") a++; else if (i === "html") jl(e.ownerDocument.documentElement); else if (i === "head") { i = e.ownerDocument.head, jl(i); for (var l = i.firstChild; l;) { var r = l.nextSibling, u = l.nodeName; l[Aa] || u === "SCRIPT" || u === "STYLE" || u === "LINK" && l.rel.toLowerCase() === "stylesheet" || i.removeChild(l), l = r } } else i === "body" && jl(e.ownerDocument.body); i = n } while (i); On(t) } function _d(e, t) { var i = e; e = 0; do { var a = i.nextSibling; if (i.nodeType === 1 ? t ? (i._stashedDisplay = i.style.display, i.style.display = "none") : (i.style.display = i._stashedDisplay || "", i.getAttribute("style") === "" && i.removeAttribute("style")) : i.nodeType === 3 && (t ? (i._stashedText = i.nodeValue, i.nodeValue = "") : i.nodeValue = i._stashedText || ""), a && a.nodeType === 8) if (i = a.data, i === "/$") { if (e === 0) break; e-- } else i !== "$" && i !== "$?" && i !== "$~" && i !== "$!" || e++; i = a } while (i) } function Xu(e) { var t = e.firstChild; for (t && t.nodeType === 10 && (t = t.nextSibling); t;) { var i = t; switch (t = t.nextSibling, i.nodeName) { case "HTML": case "HEAD": case "BODY": Xu(i), In(i); continue; case "SCRIPT": case "STYLE": continue; case "LINK": if (i.rel.toLowerCase() === "stylesheet") continue }e.removeChild(i) } } function Yg(e, t, i, a) { for (; e.nodeType === 1;) { var n = i; if (e.nodeName.toLowerCase() !== t.toLowerCase()) { if (!a && (e.nodeName !== "INPUT" || e.type !== "hidden")) break } else if (a) { if (!e[Aa]) switch (t) { case "meta": if (!e.hasAttribute("itemprop")) break; return e; case "link": if (l = e.getAttribute("rel"), l === "stylesheet" && e.hasAttribute("data-precedence")) break; if (l !== n.rel || e.getAttribute("href") !== (n.href == null || n.href === "" ? null : n.href) || e.getAttribute("crossorigin") !== (n.crossOrigin == null ? null : n.crossOrigin) || e.getAttribute("title") !== (n.title == null ? null : n.title)) break; return e; case "style": if (e.hasAttribute("data-precedence")) break; return e; case "script": if (l = e.getAttribute("src"), (l !== (n.src == null ? null : n.src) || e.getAttribute("type") !== (n.type == null ? null : n.type) || e.getAttribute("crossorigin") !== (n.crossOrigin == null ? null : n.crossOrigin)) && l && e.hasAttribute("async") && !e.hasAttribute("itemprop")) break; return e; default: return e } } else if (t === "input" && e.type === "hidden") { var l = n.name == null ? null : "" + n.name; if (n.type === "hidden" && e.getAttribute("name") === l) return e } else return e; if (e = ri(e.nextSibling), e === null) break } return null } function Qg(e, t, i) { if (t === "") return null; for (; e.nodeType !== 3;)if ((e.nodeType !== 1 || e.nodeName !== "INPUT" || e.type !== "hidden") && !i || (e = ri(e.nextSibling), e === null)) return null; return e } function Sd(e, t) { for (; e.nodeType !== 8;)if ((e.nodeType !== 1 || e.nodeName !== "INPUT" || e.type !== "hidden") && !t || (e = ri(e.nextSibling), e === null)) return null; return e } function Yu(e) { return e.data === "$?" || e.data === "$~" } function Qu(e) { return e.data === "$!" || e.data === "$?" && e.ownerDocument.readyState !== "loading" } function Zg(e, t) { var i = e.ownerDocument; if (e.data === "$~") e._reactRetry = t; else if (e.data !== "$?" || i.readyState !== "loading") t(); else { var a = function () { t(), i.removeEventListener("DOMContentLoaded", a) }; i.addEventListener("DOMContentLoaded", a), e._reactRetry = a } } function ri(e) { for (; e != null; e = e.nextSibling) { var t = e.nodeType; if (t === 1 || t === 3) break; if (t === 8) { if (t = e.data, t === "$" || t === "$!" || t === "$?" || t === "$~" || t === "&" || t === "F!" || t === "F") break; if (t === "/$" || t === "/&") return null } } return e } var Zu = null; function Ed(e) { e = e.nextSibling; for (var t = 0; e;) { if (e.nodeType === 8) { var i = e.data; if (i === "/$" || i === "/&") { if (t === 0) return ri(e.nextSibling); t-- } else i !== "$" && i !== "$!" && i !== "$?" && i !== "$~" && i !== "&" || t++ } e = e.nextSibling } return null } function Cd(e) { e = e.previousSibling; for (var t = 0; e;) { if (e.nodeType === 8) { var i = e.data; if (i === "$" || i === "$!" || i === "$?" || i === "$~" || i === "&") { if (t === 0) return e; t-- } else i !== "/$" && i !== "/&" || t++ } e = e.previousSibling } return null } function Nd(e, t, i) { switch (t = Ls(i), e) { case "html": if (e = t.documentElement, !e) throw Error(c(452)); return e; case "head": if (e = t.head, !e) throw Error(c(453)); return e; case "body": if (e = t.body, !e) throw Error(c(454)); return e; default: throw Error(c(451)) } } function jl(e) { for (var t = e.attributes; t.length;)e.removeAttributeNode(t[0]); In(e) } var ui = new Map, Ad = new Set; function qs(e) { return typeof e.getRootNode == "function" ? e.getRootNode() : e.nodeType === 9 ? e : e.ownerDocument } var Hi = B.d; B.d = { f: Jg, r: Kg, D: Fg, C: Wg, L: $g, m: Pg, X: tp, S: ep, M: ip }; function Jg() { var e = Hi.f(), t = Es(); return e || t } function Kg(e) { var t = $i(e); t !== null && t.tag === 5 && t.type === "form" ? Xc(t) : Hi.r(e) } var Tn = typeof document > "u" ? null : document; function Td(e, t, i) { var a = Tn; if (a && typeof t == "string" && t) { var n = w(t); n = 'link[rel="' + e + '"][href="' + n + '"]', typeof i == "string" && (n += '[crossorigin="' + i + '"]'), Ad.has(n) || (Ad.add(n), e = { rel: e, crossOrigin: i, href: t }, a.querySelector(n) === null && (t = a.createElement("link"), Lt(t, "link", e), gt(t), a.head.appendChild(t))) } } function Fg(e) { Hi.D(e), Td("dns-prefetch", e, null) } function Wg(e, t) { Hi.C(e, t), Td("preconnect", e, t) } function $g(e, t, i) { Hi.L(e, t, i); var a = Tn; if (a && e && t) { var n = 'link[rel="preload"][as="' + w(t) + '"]'; t === "image" && i && i.imageSrcSet ? (n += '[imagesrcset="' + w(i.imageSrcSet) + '"]', typeof i.imageSizes == "string" && (n += '[imagesizes="' + w(i.imageSizes) + '"]')) : n += '[href="' + w(e) + '"]'; var l = n; switch (t) { case "style": l = Rn(e); break; case "script": l = zn(e) }ui.has(l) || (e = x({ rel: "preload", href: t === "image" && i && i.imageSrcSet ? void 0 : e, as: t }, i), ui.set(l, e), a.querySelector(n) !== null || t === "style" && a.querySelector(xl(l)) || t === "script" && a.querySelector(_l(l)) || (t = a.createElement("link"), Lt(t, "link", e), gt(t), a.head.appendChild(t))) } } function Pg(e, t) { Hi.m(e, t); var i = Tn; if (i && e) { var a = t && typeof t.as == "string" ? t.as : "script", n = 'link[rel="modulepreload"][as="' + w(a) + '"][href="' + w(e) + '"]', l = n; switch (a) { case "audioworklet": case "paintworklet": case "serviceworker": case "sharedworker": case "worker": case "script": l = zn(e) }if (!ui.has(l) && (e = x({ rel: "modulepreload", href: e }, t), ui.set(l, e), i.querySelector(n) === null)) { switch (a) { case "audioworklet": case "paintworklet": case "serviceworker": case "sharedworker": case "worker": case "script": if (i.querySelector(_l(l))) return }a = i.createElement("link"), Lt(a, "link", e), gt(a), i.head.appendChild(a) } } } function ep(e, t, i) { Hi.S(e, t, i); var a = Tn; if (a && e) { var n = Pi(a).hoistableStyles, l = Rn(e); t = t || "default"; var r = n.get(l); if (!r) { var u = { loading: 0, preload: null }; if (r = a.querySelector(xl(l))) u.loading = 5; else { e = x({ rel: "stylesheet", href: e, "data-precedence": t }, i), (i = ui.get(l)) && Ju(e, i); var m = r = a.createElement("link"); gt(m), Lt(m, "link", e), m._p = new Promise(function (y, N) { m.onload = y, m.onerror = N }), m.addEventListener("load", function () { u.loading |= 1 }), m.addEventListener("error", function () { u.loading |= 2 }), u.loading |= 4, Us(r, t, a) } r = { type: "stylesheet", instance: r, count: 1, state: u }, n.set(l, r) } } } function tp(e, t) { Hi.X(e, t); var i = Tn; if (i && e) { var a = Pi(i).hoistableScripts, n = zn(e), l = a.get(n); l || (l = i.querySelector(_l(n)), l || (e = x({ src: e, async: !0 }, t), (t = ui.get(n)) && Ku(e, t), l = i.createElement("script"), gt(l), Lt(l, "link", e), i.head.appendChild(l)), l = { type: "script", instance: l, count: 1, state: null }, a.set(n, l)) } } function ip(e, t) { Hi.M(e, t); var i = Tn; if (i && e) { var a = Pi(i).hoistableScripts, n = zn(e), l = a.get(n); l || (l = i.querySelector(_l(n)), l || (e = x({ src: e, async: !0, type: "module" }, t), (t = ui.get(n)) && Ku(e, t), l = i.createElement("script"), gt(l), Lt(l, "link", e), i.head.appendChild(l)), l = { type: "script", instance: l, count: 1, state: null }, a.set(n, l)) } } function Rd(e, t, i, a) { var n = (n = ge.current) ? qs(n) : null; if (!n) throw Error(c(446)); switch (e) { case "meta": case "title": return null; case "style": return typeof i.precedence == "string" && typeof i.href == "string" ? (t = Rn(i.href), i = Pi(n).hoistableStyles, a = i.get(t), a || (a = { type: "style", instance: null, count: 0, state: null }, i.set(t, a)), a) : { type: "void", instance: null, count: 0, state: null }; case "link": if (i.rel === "stylesheet" && typeof i.href == "string" && typeof i.precedence == "string") { e = Rn(i.href); var l = Pi(n).hoistableStyles, r = l.get(e); if (r || (n = n.ownerDocument || n, r = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }, l.set(e, r), (l = n.querySelector(xl(e))) && !l._p && (r.instance = l, r.state.loading = 5), ui.has(e) || (i = { rel: "preload", as: "style", href: i.href, crossOrigin: i.crossOrigin, integrity: i.integrity, media: i.media, hrefLang: i.hrefLang, referrerPolicy: i.referrerPolicy }, ui.set(e, i), l || ap(n, e, i, r.state))), t && a === null) throw Error(c(528, "")); return r } if (t && a !== null) throw Error(c(529, "")); return null; case "script": return t = i.async, i = i.src, typeof i == "string" && t && typeof t != "function" && typeof t != "symbol" ? (t = zn(i), i = Pi(n).hoistableScripts, a = i.get(t), a || (a = { type: "script", instance: null, count: 0, state: null }, i.set(t, a)), a) : { type: "void", instance: null, count: 0, state: null }; default: throw Error(c(444, e)) } } function Rn(e) { return 'href="' + w(e) + '"' } function xl(e) { return 'link[rel="stylesheet"][' + e + "]" } function zd(e) { return x({}, e, { "data-precedence": e.precedence, precedence: null }) } function ap(e, t, i, a) { e.querySelector('link[rel="preload"][as="style"][' + t + "]") ? a.loading = 1 : (t = e.createElement("link"), a.preload = t, t.addEventListener("load", function () { return a.loading |= 1 }), t.addEventListener("error", function () { return a.loading |= 2 }), Lt(t, "link", i), gt(t), e.head.appendChild(t)) } function zn(e) { return '[src="' + w(e) + '"]' } function _l(e) { return "script[async]" + e } function Od(e, t, i) { if (t.count++, t.instance === null) switch (t.type) { case "style": var a = e.querySelector('style[data-href~="' + w(i.href) + '"]'); if (a) return t.instance = a, gt(a), a; var n = x({}, i, { "data-href": i.href, "data-precedence": i.precedence, href: null, precedence: null }); return a = (e.ownerDocument || e).createElement("style"), gt(a), Lt(a, "style", n), Us(a, i.precedence, e), t.instance = a; case "stylesheet": n = Rn(i.href); var l = e.querySelector(xl(n)); if (l) return t.state.loading |= 4, t.instance = l, gt(l), l; a = zd(i), (n = ui.get(n)) && Ju(a, n), l = (e.ownerDocument || e).createElement("link"), gt(l); var r = l; return r._p = new Promise(function (u, m) { r.onload = u, r.onerror = m }), Lt(l, "link", a), t.state.loading |= 4, Us(l, i.precedence, e), t.instance = l; case "script": return l = zn(i.src), (n = e.querySelector(_l(l))) ? (t.instance = n, gt(n), n) : (a = i, (n = ui.get(l)) && (a = x({}, i), Ku(a, n)), e = e.ownerDocument || e, n = e.createElement("script"), gt(n), Lt(n, "link", a), e.head.appendChild(n), t.instance = n); case "void": return null; default: throw Error(c(443, t.type)) } else t.type === "stylesheet" && (t.state.loading & 4) === 0 && (a = t.instance, t.state.loading |= 4, Us(a, i.precedence, e)); return t.instance } function Us(e, t, i) { for (var a = i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'), n = a.length ? a[a.length - 1] : null, l = n, r = 0; r < a.length; r++) { var u = a[r]; if (u.dataset.precedence === t) l = u; else if (l !== n) break } l ? l.parentNode.insertBefore(e, l.nextSibling) : (t = i.nodeType === 9 ? i.head : i, t.insertBefore(e, t.firstChild)) } function Ju(e, t) { e.crossOrigin == null && (e.crossOrigin = t.crossOrigin), e.referrerPolicy == null && (e.referrerPolicy = t.referrerPolicy), e.title == null && (e.title = t.title) } function Ku(e, t) { e.crossOrigin == null && (e.crossOrigin = t.crossOrigin), e.referrerPolicy == null && (e.referrerPolicy = t.referrerPolicy), e.integrity == null && (e.integrity = t.integrity) } var Ms = null; function Ld(e, t, i) { if (Ms === null) { var a = new Map, n = Ms = new Map; n.set(i, a) } else n = Ms, a = n.get(i), a || (a = new Map, n.set(i, a)); if (a.has(e)) return a; for (a.set(e, null), i = i.getElementsByTagName(e), n = 0; n < i.length; n++) { var l = i[n]; if (!(l[Aa] || l[St] || e === "link" && l.getAttribute("rel") === "stylesheet") && l.namespaceURI !== "http://www.w3.org/2000/svg") { var r = l.getAttribute(t) || ""; r = e + r; var u = a.get(r); u ? u.push(l) : a.set(r, [l]) } } return a } function qd(e, t, i) { e = e.ownerDocument || e, e.head.insertBefore(i, t === "title" ? e.querySelector("head > title") : null) } function np(e, t, i) { if (i === 1 || t.itemProp != null) return !1; switch (e) { case "meta": case "title": return !0; case "style": if (typeof t.precedence != "string" || typeof t.href != "string" || t.href === "") break; return !0; case "link": if (typeof t.rel != "string" || typeof t.href != "string" || t.href === "" || t.onLoad || t.onError) break; return t.rel === "stylesheet" ? (e = t.disabled, typeof t.precedence == "string" && e == null) : !0; case "script": if (t.async && typeof t.async != "function" && typeof t.async != "symbol" && !t.onLoad && !t.onError && t.src && typeof t.src == "string") return !0 }return !1 } function Ud(e) { return !(e.type === "stylesheet" && (e.state.loading & 3) === 0) } function lp(e, t, i, a) { if (i.type === "stylesheet" && (typeof a.media != "string" || matchMedia(a.media).matches !== !1) && (i.state.loading & 4) === 0) { if (i.instance === null) { var n = Rn(a.href), l = t.querySelector(xl(n)); if (l) { t = l._p, t !== null && typeof t == "object" && typeof t.then == "function" && (e.count++, e = Ds.bind(e), t.then(e, e)), i.state.loading |= 4, i.instance = l, gt(l); return } l = t.ownerDocument || t, a = zd(a), (n = ui.get(n)) && Ju(a, n), l = l.createElement("link"), gt(l); var r = l; r._p = new Promise(function (u, m) { r.onload = u, r.onerror = m }), Lt(l, "link", a), i.instance = l } e.stylesheets === null && (e.stylesheets = new Map), e.stylesheets.set(i, t), (t = i.state.preload) && (i.state.loading & 3) === 0 && (e.count++, i = Ds.bind(e), t.addEventListener("load", i), t.addEventListener("error", i)) } } var Fu = 0; function sp(e, t) { return e.stylesheets && e.count === 0 && ws(e, e.stylesheets), 0 < e.count || 0 < e.imgCount ? function (i) { var a = setTimeout(function () { if (e.stylesheets && ws(e, e.stylesheets), e.unsuspend) { var l = e.unsuspend; e.unsuspend = null, l() } }, 6e4 + t); 0 < e.imgBytes && Fu === 0 && (Fu = 62500 * Gg()); var n = setTimeout(function () { if (e.waitingForImages = !1, e.count === 0 && (e.stylesheets && ws(e, e.stylesheets), e.unsuspend)) { var l = e.unsuspend; e.unsuspend = null, l() } }, (e.imgBytes > Fu ? 50 : 800) + t); return e.unsuspend = i, function () { e.unsuspend = null, clearTimeout(a), clearTimeout(n) } } : null } function Ds() { if (this.count--, this.count === 0 && (this.imgCount === 0 || !this.waitingForImages)) { if (this.stylesheets) ws(this, this.stylesheets); else if (this.unsuspend) { var e = this.unsuspend; this.unsuspend = null, e() } } } var Is = null; function ws(e, t) { e.stylesheets = null, e.unsuspend !== null && (e.count++, Is = new Map, t.forEach(rp, e), Is = null, Ds.call(e)) } function rp(e, t) { if (!(t.state.loading & 4)) { var i = Is.get(e); if (i) var a = i.get(null); else { i = new Map, Is.set(e, i); for (var n = e.querySelectorAll("link[data-precedence],style[data-precedence]"), l = 0; l < n.length; l++) { var r = n[l]; (r.nodeName === "LINK" || r.getAttribute("media") !== "not all") && (i.set(r.dataset.precedence, r), a = r) } a && i.set(null, a) } n = t.instance, r = n.getAttribute("data-precedence"), l = i.get(r) || a, l === a && i.set(null, n), i.set(r, n), this.count++, a = Ds.bind(this), n.addEventListener("load", a), n.addEventListener("error", a), l ? l.parentNode.insertBefore(n, l.nextSibling) : (e = e.nodeType === 9 ? e.head : e, e.insertBefore(n, e.firstChild)), t.state.loading |= 4 } } var Sl = { $$typeof: Xe, Provider: null, Consumer: null, _currentValue: X, _currentValue2: X, _threadCount: 0 }; function up(e, t, i, a, n, l, r, u, m) { this.tag = 1, this.containerInfo = e, this.pingCache = this.current = this.pendingChildren = null, this.timeoutHandle = -1, this.callbackNode = this.next = this.pendingContext = this.context = this.cancelPendingCommit = null, this.callbackPriority = 0, this.expirationTimes = Un(-1), this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0, this.entanglements = Un(0), this.hiddenUpdates = Un(null), this.identifierPrefix = a, this.onUncaughtError = n, this.onCaughtError = l, this.onRecoverableError = r, this.pooledCache = null, this.pooledCacheLanes = 0, this.formState = m, this.incompleteTransitions = new Map } function Md(e, t, i, a, n, l, r, u, m, y, N, z) { return e = new up(e, t, i, r, m, y, N, z, u), t = 1, l === !0 && (t |= 24), l = Qt(3, null, null, t), e.current = l, l.stateNode = e, t = Rr(), t.refCount++, e.pooledCache = t, t.refCount++, l.memoizedState = { element: a, isDehydrated: i, cache: t }, qr(l), e } function Dd(e) { return e ? (e = rn, e) : rn } function Id(e, t, i, a, n, l) { n = Dd(n), a.context === null ? a.context = n : a.pendingContext = n, a = ra(t), a.payload = { element: i }, l = l === void 0 ? null : l, l !== null && (a.callback = l), i = ua(e, a, t), i !== null && (kt(i, e, t), tl(i, e, t)) } function wd(e, t) { if (e = e.memoizedState, e !== null && e.dehydrated !== null) { var i = e.retryLane; e.retryLane = i !== 0 && i < t ? i : t } } function Wu(e, t) { wd(e, t), (e = e.alternate) && wd(e, t) } function Bd(e) { if (e.tag === 13 || e.tag === 31) { var t = La(e, 67108864); t !== null && kt(t, e, 67108864), Wu(e, 67108864) } } function Gd(e) { if (e.tag === 13 || e.tag === 31) { var t = Wt(); t = Si(t); var i = La(e, t); i !== null && kt(i, e, t), Wu(e, t) } } var Bs = !0; function op(e, t, i, a) { var n = C.T; C.T = null; var l = B.p; try { B.p = 2, $u(e, t, i, a) } finally { B.p = l, C.T = n } } function cp(e, t, i, a) { var n = C.T; C.T = null; var l = B.p; try { B.p = 8, $u(e, t, i, a) } finally { B.p = l, C.T = n } } function $u(e, t, i, a) { if (Bs) { var n = Pu(a); if (n === null) wu(e, t, a, Gs, i), Vd(e, a); else if (dp(n, e, t, i, a)) a.stopPropagation(); else if (Vd(e, a), t & 4 && -1 < mp.indexOf(e)) { for (; n !== null;) { var l = $i(n); if (l !== null) switch (l.tag) { case 3: if (l = l.stateNode, l.current.memoizedState.isDehydrated) { var r = $t(l.pendingLanes); if (r !== 0) { var u = l; for (u.pendingLanes |= 2, u.entangledLanes |= 2; r;) { var m = 1 << 31 - $e(r); u.entanglements[1] |= m, r &= ~m } xi(l), (He & 6) === 0 && (_s = P() + 500, bl(0)) } } break; case 31: case 13: u = La(l, 2), u !== null && kt(u, l, 2), Es(), Wu(l, 2) }if (l = Pu(a), l === null && wu(e, t, a, Gs, i), l === n) break; n = l } n !== null && a.stopPropagation() } else wu(e, t, a, null, i) } } function Pu(e) { return e = tr(e), eo(e) } var Gs = null; function eo(e) { if (Gs = null, e = Wi(e), e !== null) { var t = A(e); if (t === null) e = null; else { var i = t.tag; if (i === 13) { if (e = M(t), e !== null) return e; e = null } else if (i === 31) { if (e = D(t), e !== null) return e; e = null } else if (i === 3) { if (t.stateNode.current.memoizedState.isDehydrated) return t.tag === 3 ? t.stateNode.containerInfo : null; e = null } else t !== e && (e = null) } } return Gs = e, null } function Hd(e) { switch (e) { case "beforetoggle": case "cancel": case "click": case "close": case "contextmenu": case "copy": case "cut": case "auxclick": case "dblclick": case "dragend": case "dragstart": case "drop": case "focusin": case "focusout": case "input": case "invalid": case "keydown": case "keypress": case "keyup": case "mousedown": case "mouseup": case "paste": case "pause": case "play": case "pointercancel": case "pointerdown": case "pointerup": case "ratechange": case "reset": case "resize": case "seeked": case "submit": case "toggle": case "touchcancel": case "touchend": case "touchstart": case "volumechange": case "change": case "selectionchange": case "textInput": case "compositionstart": case "compositionend": case "compositionupdate": case "beforeblur": case "afterblur": case "beforeinput": case "blur": case "fullscreenchange": case "focus": case "hashchange": case "popstate": case "select": case "selectstart": return 2; case "drag": case "dragenter": case "dragexit": case "dragleave": case "dragover": case "mousemove": case "mouseout": case "mouseover": case "pointermove": case "pointerout": case "pointerover": case "scroll": case "touchmove": case "wheel": case "mouseenter": case "mouseleave": case "pointerenter": case "pointerleave": return 8; case "message": switch (Ue()) { case ie: return 2; case F: return 8; case Me: case st: return 32; case ct: return 268435456; default: return 32 }default: return 32 } } var to = !1, ya = null, ja = null, xa = null, El = new Map, Cl = new Map, _a = [], mp = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" "); function Vd(e, t) { switch (e) { case "focusin": case "focusout": ya = null; break; case "dragenter": case "dragleave": ja = null; break; case "mouseover": case "mouseout": xa = null; break; case "pointerover": case "pointerout": El.delete(t.pointerId); break; case "gotpointercapture": case "lostpointercapture": Cl.delete(t.pointerId) } } function Nl(e, t, i, a, n, l) { return e === null || e.nativeEvent !== l ? (e = { blockedOn: t, domEventName: i, eventSystemFlags: a, nativeEvent: l, targetContainers: [n] }, t !== null && (t = $i(t), t !== null && Bd(t)), e) : (e.eventSystemFlags |= a, t = e.targetContainers, n !== null && t.indexOf(n) === -1 && t.push(n), e) } function dp(e, t, i, a, n) { switch (t) { case "focusin": return ya = Nl(ya, e, t, i, a, n), !0; case "dragenter": return ja = Nl(ja, e, t, i, a, n), !0; case "mouseover": return xa = Nl(xa, e, t, i, a, n), !0; case "pointerover": var l = n.pointerId; return El.set(l, Nl(El.get(l) || null, e, t, i, a, n)), !0; case "gotpointercapture": return l = n.pointerId, Cl.set(l, Nl(Cl.get(l) || null, e, t, i, a, n)), !0 }return !1 } function kd(e) { var t = Wi(e.target); if (t !== null) { var i = A(t); if (i !== null) { if (t = i.tag, t === 13) { if (t = M(i), t !== null) { e.blockedOn = t, Ji(e.priority, function () { Gd(i) }); return } } else if (t === 31) { if (t = D(i), t !== null) { e.blockedOn = t, Ji(e.priority, function () { Gd(i) }); return } } else if (t === 3 && i.stateNode.current.memoizedState.isDehydrated) { e.blockedOn = i.tag === 3 ? i.stateNode.containerInfo : null; return } } } e.blockedOn = null } function Hs(e) { if (e.blockedOn !== null) return !1; for (var t = e.targetContainers; 0 < t.length;) { var i = Pu(e.nativeEvent); if (i === null) { i = e.nativeEvent; var a = new i.constructor(i.type, i); er = a, i.target.dispatchEvent(a), er = null } else return t = $i(i), t !== null && Bd(t), e.blockedOn = i, !1; t.shift() } return !0 } function Xd(e, t, i) { Hs(e) && i.delete(t) } function fp() { to = !1, ya !== null && Hs(ya) && (ya = null), ja !== null && Hs(ja) && (ja = null), xa !== null && Hs(xa) && (xa = null), El.forEach(Xd), Cl.forEach(Xd) } function Vs(e, t) { e.blockedOn === t && (e.blockedOn = null, to || (to = !0, p.unstable_scheduleCallback(p.unstable_NormalPriority, fp))) } var ks = null; function Yd(e) { ks !== e && (ks = e, p.unstable_scheduleCallback(p.unstable_NormalPriority, function () { ks === e && (ks = null); for (var t = 0; t < e.length; t += 3) { var i = e[t], a = e[t + 1], n = e[t + 2]; if (typeof a != "function") { if (eo(a || i) === null) continue; break } var l = $i(i); l !== null && (e.splice(t, 3), t -= 3, Pr(l, { pending: !0, data: n, method: i.method, action: a }, a, n)) } })) } function On(e) { function t(m) { return Vs(m, e) } ya !== null && Vs(ya, e), ja !== null && Vs(ja, e), xa !== null && Vs(xa, e), El.forEach(t), Cl.forEach(t); for (var i = 0; i < _a.length; i++) { var a = _a[i]; a.blockedOn === e && (a.blockedOn = null) } for (; 0 < _a.length && (i = _a[0], i.blockedOn === null);)kd(i), i.blockedOn === null && _a.shift(); if (i = (e.ownerDocument || e).$$reactFormReplay, i != null) for (a = 0; a < i.length; a += 3) { var n = i[a], l = i[a + 1], r = n[Ut] || null; if (typeof l == "function") r || Yd(i); else if (r) { var u = null; if (l && l.hasAttribute("formAction")) { if (n = l, r = l[Ut] || null) u = r.formAction; else if (eo(n) !== null) continue } else u = r.action; typeof u == "function" ? i[a + 1] = u : (i.splice(a, 3), a -= 3), Yd(i) } } } function Qd() { function e(l) { l.canIntercept && l.info === "react-transition" && l.intercept({ handler: function () { return new Promise(function (r) { return n = r }) }, focusReset: "manual", scroll: "manual" }) } function t() { n !== null && (n(), n = null), a || setTimeout(i, 20) } function i() { if (!a && !navigation.transition) { var l = navigation.currentEntry; l && l.url != null && navigation.navigate(l.url, { state: l.getState(), info: "react-transition", history: "replace" }) } } if (typeof navigation == "object") { var a = !1, n = null; return navigation.addEventListener("navigate", e), navigation.addEventListener("navigatesuccess", t), navigation.addEventListener("navigateerror", t), setTimeout(i, 100), function () { a = !0, navigation.removeEventListener("navigate", e), navigation.removeEventListener("navigatesuccess", t), navigation.removeEventListener("navigateerror", t), n !== null && (n(), n = null) } } } function io(e) { this._internalRoot = e } Xs.prototype.render = io.prototype.render = function (e) { var t = this._internalRoot; if (t === null) throw Error(c(409)); var i = t.current, a = Wt(); Id(i, a, e, t, null, null) }, Xs.prototype.unmount = io.prototype.unmount = function () { var e = this._internalRoot; if (e !== null) { this._internalRoot = null; var t = e.containerInfo; Id(e.current, 2, null, e, null, null), Es(), t[Ki] = null } }; function Xs(e) { this._internalRoot = e } Xs.prototype.unstable_scheduleHydration = function (e) { if (e) { var t = Dt(); e = { blockedOn: null, target: e, priority: t }; for (var i = 0; i < _a.length && t !== 0 && t < _a[i].priority; i++); _a.splice(i, 0, e), i === 0 && kd(e) } }; var Zd = g.version; if (Zd !== "19.2.3") throw Error(c(527, Zd, "19.2.3")); B.findDOMNode = function (e) { var t = e._reactInternals; if (t === void 0) throw typeof e.render == "function" ? Error(c(188)) : (e = Object.keys(e).join(","), Error(c(268, e))); return e = j(t), e = e !== null ? S(e) : null, e = e === null ? null : e.stateNode, e }; var gp = { bundleType: 0, version: "19.2.3", rendererPackageName: "react-dom", currentDispatcherRef: C, reconcilerVersion: "19.2.3" }; if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u") { var Ys = __REACT_DEVTOOLS_GLOBAL_HOOK__; if (!Ys.isDisabled && Ys.supportsFiber) try { rt = Ys.inject(gp), ze = Ys } catch { } } return Tl.createRoot = function (e, t) { if (!U(e)) throw Error(c(299)); var i = !1, a = "", n = em, l = tm, r = im; return t != null && (t.unstable_strictMode === !0 && (i = !0), t.identifierPrefix !== void 0 && (a = t.identifierPrefix), t.onUncaughtError !== void 0 && (n = t.onUncaughtError), t.onCaughtError !== void 0 && (l = t.onCaughtError), t.onRecoverableError !== void 0 && (r = t.onRecoverableError)), t = Md(e, 1, !1, null, null, i, a, null, n, l, r, Qd), e[Ki] = t.current, Iu(e), new io(t) }, Tl.hydrateRoot = function (e, t, i) { if (!U(e)) throw Error(c(299)); var a = !1, n = "", l = em, r = tm, u = im, m = null; return i != null && (i.unstable_strictMode === !0 && (a = !0), i.identifierPrefix !== void 0 && (n = i.identifierPrefix), i.onUncaughtError !== void 0 && (l = i.onUncaughtError), i.onCaughtError !== void 0 && (r = i.onCaughtError), i.onRecoverableError !== void 0 && (u = i.onRecoverableError), i.formState !== void 0 && (m = i.formState)), t = Md(e, 1, !0, t, i ?? null, a, n, m, l, r, u, Qd), t.context = Dd(null), i = t.current, a = Wt(), a = Si(a), n = ra(a), n.callback = null, ua(i, n, a), i = a, t.current.lanes = i, Na(t, i), xi(t), e[Ki] = t.current, Iu(e), new Xs(t) }, Tl.version = "19.2.3", Tl } var nf; function Cp() { if (nf) return lo.exports; nf = 1; function p() { if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) try { __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p) } catch (g) { console.error(g) } } return p(), lo.exports = Ep(), lo.exports } var Np = Cp(); const Ct = 1, At = 2; class Vi { constructor(g = 8, o = 8) { this.cols = g, this.rows = o, this.board = Array(g).fill(null).map(() => Array(o).fill(0)), this.triangles = [], this.scores = { [Ct]: 0, [At]: 0 }, this.history = [], this.winner = null } busy(g, o) { return g < 0 || g >= this.cols || o < 0 || o >= this.rows ? -1 : this.board[g][o] } isFull() { let g = 0; for (let o = 0; o < this.cols; o++)for (let c = 0; c < this.rows; c++)this.board[o][c] !== 0 && g++; return g >= this.cols * this.rows } getTriKey(g) { return `tri-${g.map(o => `${o.c}-${o.r}`).sort().join("_")}` } play(g, o, c) { return this.winner || this.busy(g, o) !== 0 ? !1 : (this.board[g][o] = c, this.history.push({ col: g, row: o, player: c }), this.checkTriangles(g, o, c).forEach(A => { const M = this.getTriKey(A.points); this.triangles.push({ ...A, key: M }), this.scores[c]++ }), this.isFull() && (this.scores[Ct] > this.scores[At] ? this.winner = Ct : this.scores[At] > this.scores[Ct] ? this.winner = At : this.winner = "draw"), !0) } checkTriangles(g, o, c) { const U = [], A = (j, S) => this.busy(j, S) !== 0, M = (j, S) => this.busy(j, S) === 0, D = this.cols - 1, L = this.rows - 1; return o > 0 && g > 0 && A(g - 1, o - 1) && A(g - 1, o) && M(g, o - 1) && U.push({ points: [{ c: g, r: o }, { c: g - 1, r: o - 1 }, { c: g - 1, r: o }], player: c }), o < L && g > 0 && A(g - 1, o) && A(g, o + 1) && U.push({ points: [{ c: g, r: o }, { c: g - 1, r: o }, { c: g, r: o + 1 }], player: c }), o > 0 && g < D && A(g, o - 1) && A(g + 1, o - 1) && M(g + 1, o) && U.push({ points: [{ c: g, r: o }, { c: g, r: o - 1 }, { c: g + 1, r: o - 1 }], player: c }), o > 0 && g > 0 && A(g, o - 1) && A(g - 1, o) && U.push({ points: [{ c: g, r: o }, { c: g, r: o - 1 }, { c: g - 1, r: o }], player: c }), o < L && g > 0 && A(g - 1, o) && A(g - 1, o + 1) && M(g, o + 1) && U.push({ points: [{ c: g, r: o }, { c: g - 1, r: o }, { c: g - 1, r: o + 1 }], player: c }), o > 0 && g > 0 && A(g - 1, o - 1) && A(g, o - 1) && M(g - 1, o) && U.push({ points: [{ c: g, r: o }, { c: g - 1, r: o - 1 }, { c: g, r: o - 1 }], player: c }), o > 0 && g < D && A(g, o - 1) && A(g + 1, o) && U.push({ points: [{ c: g, r: o }, { c: g, r: o - 1 }, { c: g + 1, r: o }], player: c }), o < L && g < D && A(g, o + 1) && A(g + 1, o) && U.push({ points: [{ c: g, r: o }, { c: g, r: o + 1 }, { c: g + 1, r: o }], player: c }), o < L && g < D && A(g + 1, o) && A(g + 1, o + 1) && M(g, o + 1) && U.push({ points: [{ c: g, r: o }, { c: g + 1, r: o }, { c: g + 1, r: o + 1 }], player: c }), o > 0 && g < D && A(g + 1, o - 1) && A(g + 1, o) && M(g, o - 1) && U.push({ points: [{ c: g, r: o }, { c: g + 1, r: o - 1 }, { c: g + 1, r: o }], player: c }), o < L && g > 0 && A(g - 1, o + 1) && A(g, o + 1) && M(g - 1, o) && U.push({ points: [{ c: g, r: o }, { c: g - 1, r: o + 1 }, { c: g, r: o + 1 }], player: c }), o < L && g < D && A(g, o + 1) && A(g + 1, o + 1) && M(g + 1, o) && U.push({ points: [{ c: g, r: o }, { c: g, r: o + 1 }, { c: g + 1, r: o + 1 }], player: c }), U } getBestMove(g = 3) { const o = []; for (let A = 0; A < this.cols; A++)for (let M = 0; M < this.rows; M++)this.board[A][M] === 0 && o.push({ c: A, r: M }); if (o.length === 0) return null; if (g === 0) { if (Math.random() < .3) return o[Math.floor(Math.random() * o.length)]; let A = o[0], M = -9999; for (const D of o) { let L = this.checkTriangles(D.c, D.r, At).length * 10; L += Math.random(), L > M && (M = L, A = D) } return A } let c = o[0], U = -9999; for (const A of o) { let M = 0; const D = this.checkTriangles(A.c, A.r, At); if (M += D.length * 10, g >= 2) { const L = this.checkTriangles(A.c, A.r, Ct); M += L.length * 8 } g >= 3 && A.c > 1 && A.c < this.cols - 2 && A.r > 1 && A.r < this.rows - 2 && (M += 1), M += Math.random(), M > U && (U = M, c = A) } return c } } const Ap = G.memo(({ c: p, r: g, value: o, isLastMove: c, onClick: U }) => s.jsx("div", { className: `cell ${o !== 0 ? "occupied" : ""}`, onClick: () => U(p, g), style: { borderColor: c ? "var(--accent-color)" : "", background: c ? "rgba(255, 85, 0, 0.1)" : "transparent" }, children: s.jsx("div", { className: `pion ${o === 1 ? "p1 active" : o === 2 ? "p2 active" : ""}` }) })), Tp = ({ board: p, triangles: g, onCellClick: o, lastMove: c, aspectRatio: U }) => { const A = p.length, M = p[0].length; return s.jsxs("div", { className: "board-container", style: { aspectRatio: `${U}` }, children: [s.jsx("div", { className: "board-grid", style: { gridTemplateColumns: `repeat(${A}, 1fr)`, gridTemplateRows: `repeat(${M}, 1fr)`, position: "relative" }, children: Array.from({ length: M }).map((D, L) => Array.from({ length: A }).map((j, S) => { const x = p[S][L], V = c && c.c === S && c.r === L; return s.jsx(Ap, { c: S, r: L, value: x, isLastMove: V, onClick: o }, `${S}-${L}`) })) }), s.jsx("svg", { className: "svg-overlay", viewBox: `0 0 ${A} ${M}`, preserveAspectRatio: "none", style: { position: "absolute", top: "10px", left: "10px", width: "calc(100% - 20px)", height: "calc(100% - 20px)", pointerEvents: "none" }, children: g.map(D => s.jsx("polygon", { points: D.points.map(L => `${L.c + .5},${L.r + .5}`).join(" "), className: `triangle-fill ${D.player === 1 ? "p1" : "p2"}` }, D.key)) })] }) }, Zs = [{ id: "gale", name: "Cratère Gale", mission: "Curiosity", difficulty: 3, description: "Abrite le mont Sharp. Un site clé pour la recherche de vie passée.", searchUrl: "https://www.google.com/search?q=Gale+Crater+Mars+NASA+high+resolution+landscape&tbm=isch", images: ["images/imported/gale/img_0.jpg", "images/imported/gale/img_1.jpg", "images/imported/gale/img_2.png", "images/imported/gale/img_3.jpg", "images/imported/gale/img_4.jpg", "images/imported/gale/img_5.jpg", "images/imported/gale/img_6.jpeg", "images/imported/gale/img_7.jpg", "images/imported/gale/img_8.jpg", "images/imported/gale/img_9.jpg"], color: "#ff8800" }, { id: "jezero", name: "Cratère Jezero", mission: "Perseverance", difficulty: 5, description: "Ancien delta de rivière. Le terrain le plus complexe jamais exploré.", searchUrl: "https://www.google.com/search?q=Jezero+Crater+Mars+Perseverance+landscape+high+res&tbm=isch", images: ["images/imported/jezero/img_0.jpg", "images/imported/jezero/img_1.jpg", "images/imported/jezero/img_2.jpg", "images/imported/jezero/img_3.jpg", "images/imported/jezero/img_4.jpg", "images/imported/jezero/img_5.jpg", "images/imported/jezero/img_6.jpg", "images/imported/jezero/img_7.jpg", "images/imported/jezero/img_8.jpg", "images/imported/jezero/img_9.jpg"], color: "#ff4400" }, { id: "korolev", name: "Cratère Korolev", mission: "Observations Orbitales", difficulty: 4, description: "Rempli de glace d'eau éternelle. Un spectacle à couper le souffle.", searchUrl: "https://www.google.com/search?q=Korolev+Crater+Mars+high+resolution+landscape&tbm=isch", images: ["images/imported/korolev/img_0.jpg", "images/imported/korolev/img_1.jpg", "images/imported/korolev/img_2.jpg", "images/imported/korolev/img_3.jpg", "images/imported/korolev/img_4.jpg", "images/imported/korolev/img_5.jpg", "images/imported/korolev/img_6.jpg", "images/imported/korolev/img_7.jpg", "images/imported/korolev/img_8.jpg", "images/imported/korolev/img_9.jpg"], color: "#00ccff" }, { id: "hellas", name: "Hellas Planitia", mission: "Reconnaissance", difficulty: 5, description: "Le point le plus bas de Mars. Sujet à d'immenses tempêtes de poussière.", searchUrl: "https://www.google.com/search?q=Hellas+Planitia+Mars+landscape+high+res&tbm=isch", images: ["images/imported/hellas/img_0.jpg", "images/imported/hellas/img_1.jpg", "images/imported/hellas/img_2.jpg", "images/imported/hellas/img_3.jpg", "images/imported/hellas/img_4.jpg", "images/imported/hellas/img_5.jpg", "images/imported/hellas/img_6.jpg", "images/imported/hellas/img_7.jpg", "images/imported/hellas/img_8.jpg", "images/imported/hellas/img_9.jpg"], color: "#ffaa00" }, { id: "endeavour", name: "Cratère Endeavour", mission: "Opportunity", difficulty: 2, description: "Terrain ancien révélant les secrets de l'époque Noachienne.", searchUrl: "https://www.google.com/search?q=Endeavour+Crater+Mars+Opportunity+landscape+high+res&tbm=isch", images: ["images/imported/endeavour/img_0.jpg", "images/imported/endeavour/img_1.jpg", "images/imported/endeavour/img_2.jpg", "images/imported/endeavour/img_3.jpg", "images/imported/endeavour/img_4.jpg", "images/imported/endeavour/img_5.jpg", "images/imported/endeavour/img_6.jpg", "images/imported/endeavour/img_7.jpg", "images/imported/endeavour/img_8.jpg", "images/imported/endeavour/img_9.jpg"], color: "#ffa500" }, { id: "utopia", name: "Utopia Planitia", mission: "Zhurong / Viking 2", difficulty: 3, description: "Plaines gelées avec de vastes réserves de glace souterraine.", searchUrl: "https://www.google.com/search?q=Utopia+Planitia+Mars+landscape+high+res&tbm=isch", images: ["images/imported/utopia/img_0.jpg", "images/imported/utopia/img_1.jpg", "images/imported/utopia/img_2.jpg", "images/imported/utopia/img_3.jpg", "images/imported/utopia/img_4.jpg", "images/imported/utopia/img_5.jpg", "images/imported/utopia/img_6.jpg", "images/imported/utopia/img_7.jpg", "images/imported/utopia/img_8.jpg", "images/imported/utopia/img_9.jpg"], color: "#aaddff" }], Rp = p => p <= 2 ? "FACILE" : p <= 3 ? "MOYEN" : p <= 4 ? "DIFFICILES" : "EXTRÊME", zp = ({ onSelect: p, conqueredCraters: g = [], purchasedItems: o = [], onOpenPhotoManager: c, onOpenPaintersGallery: U, onOpenFurnitureGallery: A, onOpenComptaGallery: M, onOpenBoutique: D, onOpenVideoManager: L, marsOnly: j = !1, isLocked: S = !1, lockParam: x = null }) => { const [V, ee] = Js.useState(j || S && x === "solar" ? "campaign" : "menu"), it = !1; if (V === "campaign") { const $ = o.includes("mars_conquest"); return S && !$ ? null : s.jsx("div", { className: "crater-selector-overlay", children: s.jsxs("div", { className: "crater-selector-content", children: [s.jsxs("div", { className: "header-mars", style: { position: "relative" }, children: [!j && !S && s.jsx("button", { className: "btn-mars", onClick: () => ee("menu"), style: { position: "absolute", left: 0, top: "50%", transform: "translateY(-50%)", zIndex: 10, cursor: "pointer" }, children: "◀ RETOUR" }), s.jsxs("div", { children: [s.jsx("h1", { className: "title-mars", children: "SITES DE MISSION" }), s.jsx("p", { className: "subtitle-mars", children: "SÉLECTIONNEZ UNE ZONE D'ATTERRISSAGE" })] })] }), s.jsx("div", { className: "crater-grid", children: Zs.map(me => { const W = g.includes(me.id); return s.jsxs("div", { className: `crater-card ${W ? "conquered" : ""}`, onClick: () => p(me), children: [s.jsxs("div", { className: "crater-image-container", children: [s.jsx("img", { src: me.images[0], alt: me.name, referrerPolicy: "no-referrer", style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }, onError: de => { de.target.style.display = "none", de.target.parentElement.style.backgroundColor = "#333" } }), W && s.jsx("div", { className: "conquered-badge", children: "CONQUIS" }), s.jsxs("div", { style: { position: "absolute", bottom: "5px", right: "5px", background: "rgba(0,0,0,0.7)", color: "#fff", padding: "2px 6px", fontSize: "0.6rem", borderRadius: "4px" }, children: [me.images.length, " VUES"] })] }), s.jsxs("div", { className: "crater-info", children: [s.jsx("div", { className: "crater-mission", children: me.mission }), s.jsx("h3", { className: "crater-name", children: me.name }), s.jsx("p", { className: "crater-desc", children: me.description }), s.jsx("div", { className: "crater-stats", children: s.jsx("span", { className: "difficulty-tag", style: { borderColor: me.color, color: me.color }, children: Rp(me.difficulty) }) })] })] }, me.id) }) })] }) }) } return s.jsx("div", { className: "crater-selector-overlay", children: s.jsxs("div", { className: "crater-selector-content", children: [s.jsxs("div", { className: "header-mars", style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [s.jsx("div", { style: { flex: 1 } }), s.jsxs("div", { style: { flex: 2, textAlign: "center" }, children: [s.jsx("h1", { className: "title-mars", children: "CONQUÊTE DE MARS" }), s.jsx("p", { className: "subtitle-mars", children: "CHOISISSEZ VOTRE MISSION" })] }), s.jsxs("div", { style: { flex: 1, textAlign: "right", display: "flex", gap: "10px", justifyContent: "flex-end" }, children: [s.jsx("button", { className: "btn-mars", onClick: L, style: { background: "#3b82f6", color: "#fff", border: "none" }, children: "📺 VIDÉOS" }), void 0] })] }), s.jsxs("div", { className: "crater-grid", children: [(() => { const $ = o.includes("tribulantiq_full"); return S && !$ ? null : s.jsxs("div", { className: `crater-card ${$ ? "" : "locked"}`, style: { border: "2px solid #8b4513", background: "rgba(139, 69, 19, 0.1)", transform: "scale(1.05)", zIndex: 5 }, onClick: $ ? U : D, children: [s.jsxs("div", { className: "crater-image-container", children: [s.jsx("img", { src: "images/painters/renaissance/leonardo-da-vinci/painting_1.jpg", alt: "TribulAntiq", style: { width: "100%", height: "100%", objectFit: "cover", filter: $ ? "none" : "grayscale(1) brightness(0.5)" }, onError: me => { me.target.style.display = "none", me.target.parentElement.style.background = "linear-gradient(135deg, #8b4513 0%, #d4a574 100%)" } }), s.jsx("div", { className: "conquered-badge", style: { background: "#8b4513", color: "#fff" }, children: $ ? "ART & HISTOIRE" : "🔒 PACK BLOQUÉ" })] }), s.jsxs("div", { className: "crater-info", style: { textAlign: "center" }, children: [s.jsx("div", { className: "crater-mission", style: { color: "#8b4513", fontWeight: "bold" }, children: $ ? "DÉBLOQUÉ" : "PACK COMPLET 10€" }), s.jsx("h3", { className: "crater-name", style: { color: "#d4a574" }, children: "PEINTURES CÉLÈBRES" }), s.jsx("p", { className: "crater-desc", children: "L'Art travers les âges : de la Renaissance au Moderne." }), s.jsx("button", { className: "btn-mars", style: { width: "100%", marginTop: "10px", background: $ ? "#8b4513" : "#ffd700", color: $ ? "#fff" : "#000", border: "none", fontWeight: "bold" }, children: $ ? "VOIR LES PEINTRES" : "DÉBLOQUER (10')" })] })] }) })(), (() => { const $ = o.includes("tribulantiq_full"), me = o.includes("tribul_furniture"), W = $ || me; return S && !W ? null : s.jsxs("div", { className: `crater-card ${W ? "" : "locked"}`, style: { border: "2px solid #cd853f", background: "rgba(205, 133, 63, 0.1)" }, onClick: W ? A : D, children: [s.jsxs("div", { className: "crater-image-container", children: [s.jsx("img", { src: "images/vignettes/mobilier.png", alt: "Tribul Mobilier", style: { width: "100%", height: "100%", objectFit: "cover", filter: W ? "none" : "grayscale(1) brightness(0.5)", display: "block" }, onError: de => { de.target.style.display = "none", de.target.parentElement.style.background = "linear-gradient(135deg, #cd853f 0%, #deb887 100%)" } }), s.jsx("div", { className: "conquered-badge", style: { background: "#cd853f", color: "#fff" }, children: W ? "HISTOIRE DU STYLE" : "🔒 PACK BLOQUÉ" })] }), s.jsxs("div", { className: "crater-info", style: { textAlign: "center" }, children: [s.jsx("div", { className: "crater-mission", style: { color: "#cd853f", fontWeight: "bold" }, children: W ? "DÉBLOQUÉ" : "MOBILIER HISTORIQUE" }), s.jsx("h3", { className: "crater-name", style: { color: "#d2b48c" }, children: "TRIBUL MOBILIER" }), s.jsx("p", { className: "crater-desc", children: "Chaises, commodes et bureaux d'exception." }), s.jsx("button", { className: "btn-mars", style: { width: "100%", marginTop: "10px", background: W ? "#cd853f" : "#ffd700", color: W ? "#fff" : "#000", border: "none", fontWeight: "bold" }, children: W ? "EXPLORER" : "DÉBLOQUER (10')" })] })] }) })(), (() => { const $ = o.includes("tribulantiq_full"), me = o.includes("tribul_furniture"), W = $ || me; return S && !W ? null : s.jsxs("div", { className: `crater-card ${W ? "" : "locked"}`, style: { border: "2px solid #0047ab", background: "rgba(0, 71, 171, 0.1)" }, onClick: W ? () => A("faience") : D, children: [s.jsxs("div", { className: "crater-image-container", style: { background: "#0047ab22" }, children: [s.jsx("img", { src: "images/furniture/faience/fai_1/0.jpg", alt: "Faïences de France", style: { width: "100%", height: "100%", objectFit: "cover", filter: W ? "none" : "grayscale(1) brightness(0.5)", display: "block" }, onError: de => { de.target.style.display = "none", de.target.parentElement.style.background = "linear-gradient(135deg, #0047ab 0%, #00bfff 100%)" } }), s.jsx("div", { className: "conquered-badge", style: { background: "#0047ab", color: "#fff" }, children: W ? "HÉRITAGE D'ART" : "🔒 PACK BLOQUÉ" })] }), s.jsxs("div", { className: "crater-info", style: { textAlign: "center" }, children: [s.jsx("div", { className: "crater-mission", style: { color: "#0047ab", fontWeight: "bold" }, children: W ? "DÉBLOQUÉ" : "CÉRAMIQUES & ÉMAUX" }), s.jsx("h3", { className: "crater-name", style: { color: "#00bfff" }, children: "FAÏENCES CHINOISES & FR" }), s.jsx("p", { className: "crater-desc", children: "Porcelaines Royales et Grands Maîêêtres Faïenciers." }), s.jsx("button", { className: "btn-mars", style: { width: "100%", marginTop: "10px", background: W ? "#0047ab" : "#ffd700", color: W ? "#fff" : "#000", border: "none", fontWeight: "bold" }, children: W ? "DÉCOUVRIR" : "DÉBLOQUER (10')" })] })] }) })(), (!S || o.includes("tribul_universe")) && s.jsxs("div", { className: "crater-card", style: { border: "2px solid #9b59b6", background: "rgba(155, 89, 182, 0.1)" }, onClick: () => p({ id: "universe_launcher" }), children: [s.jsxs("div", { className: "crater-image-container", children: [s.jsx("div", { className: "crater-image-placeholder", style: { display: "flex", alignItems: "center", justifyContent: "center", background: "linear-gradient(135deg, #2c3e50 0%, #000000 100%)", fontSize: "4rem" }, children: "🌌" }), s.jsx("div", { className: "conquered-badge", style: { background: "#9b59b6", color: "#fff" }, children: "PACK COSMOS GRATUIT" })] }), s.jsxs("div", { className: "crater-info", style: { textAlign: "center" }, children: [s.jsx("div", { className: "crater-mission", style: { color: "#9b59b6", fontWeight: "bold" }, children: "TRIBUL UNIVERSE" }), s.jsx("h3", { className: "crater-name", style: { color: "#9b59b6" }, children: "TROUS NOIRS & GALAXIES" }), s.jsx("p", { className: "crater-desc", children: "Explorez les mystères de l'espace profond." }), s.jsx("button", { className: "btn-mars", style: { width: "100%", marginTop: "10px", background: "#9b59b6", color: "#fff", border: "none" }, children: "EXPLORER" })] })] }), (!S || o.includes("gizmo_vaina")) && s.jsxs("div", { className: "crater-card", onClick: () => p({ id: "gizmo_launcher" }), style: { border: "2px solid #ffcc00", background: "rgba(255, 204, 0, 0.1)" }, children: [s.jsxs("div", { className: "crater-image-container", children: [s.jsx("div", { className: "crater-image-placeholder", style: { display: "flex", alignItems: "center", justifyContent: "center", background: "linear-gradient(45deg, #ffcc00, #ff8800)", fontSize: "4rem" }, children: "🐕" }), s.jsx("div", { className: "conquered-badge", style: { background: "#ffcc00", color: "#000" }, children: "MODE HISTOIRE GRATUIT" })] }), s.jsxs("div", { className: "crater-info", style: { textAlign: "center" }, children: [s.jsx("div", { className: "crater-mission", style: { color: "#ffcc00", fontWeight: "bold" }, children: "AVENTURE CANINE" }), s.jsx("h3", { className: "crater-name", style: { color: "#fff" }, children: "GIZMO & VAÏNA" }), s.jsx("p", { className: "crater-desc", children: "Aidez Gizmo et Vaïna dans leurs défis quotidiens !" }), s.jsx("button", { className: "btn-mars", style: { width: "100%", marginTop: "10px", background: "#ffcc00", color: "#000", border: "none", fontWeight: "bold" }, children: "JOUER" })] })] }), (!S || o.includes("gizmo_vaina")) && s.jsxs("div", { className: "crater-card", onClick: () => p({ id: "gizmo_gold_launcher" }), style: { border: "2px solid #ffd700", boxShadow: "0 0 15px rgba(255, 215, 0, 0.3)" }, children: [s.jsxs("div", { className: "crater-image-container", children: [s.jsx("div", { className: "crater-image-placeholder", style: { display: "flex", alignItems: "center", justifyContent: "center", background: "linear-gradient(45deg, #000, #333)", fontSize: "4rem" }, children: "🏆" }), s.jsx("div", { className: "conquered-badge", style: { background: "#ffd700", color: "#000", fontWeight: "bold" }, children: "VIP GOLD" })] }), s.jsxs("div", { className: "crater-info", style: { textAlign: "center" }, children: [s.jsx("div", { className: "crater-mission", style: { color: "#ffd700" }, children: "HIGH STAKES" }), s.jsx("h3", { className: "crater-name", style: { color: "#ffd700" }, children: "GIZMO & VAÏNA GOLD" }), s.jsx("p", { className: "crater-desc", style: { color: "#ccc" }, children: "Misez des pièces. Encaissez avant le crash. Osez tout." }), s.jsx("button", { className: "btn-mars", style: { width: "100%", marginTop: "10px", background: "#ffd700", color: "#000", border: "none", fontWeight: "bold" }, children: "JOUER GOLD" })] })] }), (!S || o.includes("tribul_menage")) && s.jsxs("div", { className: "crater-card", onClick: () => { const $ = window.location.origin + window.location.pathname + "?mode=zen"; window.open($, "_blank", "noopener,noreferrer") }, style: { border: "2px solid #fdfaf6", background: "#fdfaf6" }, children: [s.jsxs("div", { className: "crater-image-container", children: [s.jsx("div", { style: { width: "100%", height: "100%", background: "url(https://images.unsplash.com/photo-1544377193-33dcf4d68fb5?q=80&w=800) center/cover", display: "flex", alignItems: "center", justifyContent: "center" } }), s.jsx("div", { className: "conquered-badge", style: { background: "#2c3e50", color: "#fff" }, children: "INCLUS / GRATUIT" })] }), s.jsxs("div", { className: "crater-info", style: { textAlign: "center" }, children: [s.jsx("div", { className: "crater-mission", style: { color: "#2c3e50" }, children: "LA MAISON ZEN" }), s.jsx("h3", { className: "crater-name", style: { color: "#1a252f" }, children: "TRIBUL ZEN" }), s.jsx("p", { className: "crater-desc", style: { color: "#34495e" }, children: "L'art de la simplicité et du rangement conscient." }), s.jsx("button", { className: "btn-mars", style: { width: "100%", marginTop: "10px", background: "#2c3e50", color: "#fff", border: "none" }, children: "ENTRER DANS LA MAISON" })] })] }), (!S || o.includes("tribul_compta")) && s.jsxs("div", { className: "crater-card", onClick: () => { const $ = window.location.origin + window.location.pathname + "?mode=compta"; window.open($, "_blank", "noopener,noreferrer") }, style: { border: "2px solid #1e3799", background: "#f1f2f6" }, children: [s.jsxs("div", { className: "crater-image-container", children: [s.jsx("div", { style: { width: "100%", height: "100%", background: "url(https://images.unsplash.com/photo-1554224155-8d04cb21cd6c?q=80&w=800) center/cover", display: "flex", alignItems: "center", justifyContent: "center" }, children: it }), s.jsx("div", { className: "conquered-badge", style: { background: "#1e3799", color: "#fff" }, children: "BELGIQUE PCMN" })] }), s.jsxs("div", { className: "crater-info", style: { textAlign: "center" }, children: [s.jsx("div", { className: "crater-mission", style: { color: "#1e3799" }, children: "APPRENTISSAGE" }), s.jsx("h3", { className: "crater-name", style: { color: "#1e3799" }, children: "TRIBUL COMPTA" }), s.jsx("p", { className: "crater-desc", style: { color: "#57606f" }, children: "Maîtrisez la comptabilité belge en jouant. Actif, Passif, Bilan." }), s.jsx("button", { className: "btn-mars", style: { width: "100%", marginTop: "10px", background: "#1e3799", color: "#fff", border: "none" }, children: "COMMENCER" })] })] }), (!S || o.includes("mars_conquest")) && s.jsxs("div", { className: "crater-card", style: { border: "2px solid #ff5500", background: "rgba(255, 85, 0, 0.1)" }, onClick: () => ee("campaign"), children: [s.jsxs("div", { className: "crater-image-container", children: [s.jsx("img", { src: Zs[0].images[0], alt: "Exploration", style: { width: "100%", height: "100%", objectFit: "cover" } }), s.jsx("div", { style: { position: "absolute", inset: 0, background: "linear-gradient(to top, rgba(0,0,0,0.8), transparent)" } }), s.jsx("div", { className: "conquered-badge", style: { background: "#ff5500", color: "#fff" }, children: "PACK CONQUÊTE 3€" }), s.jsx("div", { style: { position: "absolute", bottom: "10px", left: "10px", color: "#fff", fontSize: "1.5rem", fontWeight: "bold" }, children: `${Zs.length} SITES` })] }), s.jsxs("div", { className: "crater-info", style: { textAlign: "center" }, children: [s.jsx("div", { className: "crater-mission", style: { color: "#ff5500", fontWeight: "bold" }, children: "SOLAR SYSTEM CONQUEST" }), s.jsx("h3", { className: "crater-name", children: "CAMPAGNE OFFICIELLE" }), s.jsx("p", { className: "crater-desc", children: "2 parties gratuites + Recharges pour la conquête." }), s.jsx("button", { className: "btn-mars", style: { width: "100%", marginTop: "10px" }, children: "CONQUÉRIR" })] })] }), !S && s.jsxs("div", { className: "crater-card", onClick: () => window.open("http://localhost:5174", "_blank"), style: { border: "2px solid #ff4400" }, children: [s.jsxs("div", { className: "crater-image-container", children: [s.jsx("div", { className: "crater-image-placeholder", style: { display: "flex", alignItems: "center", justifyContent: "center", background: "#000", fontSize: "4rem" }, children: "🪐" }), s.jsx("div", { className: "conquered-badge", style: { background: "#ff4400", color: "#fff" }, children: "3D" })] }), s.jsxs("div", { className: "crater-info", style: { textAlign: "center" }, children: [s.jsx("div", { className: "crater-mission", style: { color: "#ff4400" }, children: "SIMULATION SPATIALE" }), s.jsx("h3", { className: "crater-name", style: { color: "#fff" }, children: "MARS CONQUEST" }), s.jsx("p", { className: "crater-desc", children: "Explorez la planète rouge dans une expérience 3D immersive." }), s.jsx("button", { className: "btn-mars", style: { width: "100%", marginTop: "10px", background: "#ff4400", color: "#fff", border: "none" }, children: "DÉCOLLAGE 3D" })] })] }), !S && s.jsxs("div", { className: "crater-card", onClick: () => window.open("http://localhost:5178", "_blank"), style: { border: "2px solid #0055ff" }, children: [s.jsxs("div", { className: "crater-image-container", children: [s.jsx("div", { className: "crater-image-placeholder", style: { display: "flex", alignItems: "center", justifyContent: "center", background: "#111", fontSize: "4rem" }, children: "♟️" }), s.jsx("div", { className: "conquered-badge", style: { background: "#0055ff", color: "#fff" }, children: "CLASSIC" })] }), s.jsxs("div", { className: "crater-info", style: { textAlign: "center" }, children: [s.jsx("div", { className: "crater-mission", style: { color: "#0055ff" }, children: "ORIGINAL LOGICAMP" }), s.jsx("h3", { className: "crater-name", style: { color: "#fff" }, children: "TRIBUL 1.0" }), s.jsx("p", { className: "crater-desc", children: "La version originale du jeu de stratégie." }), s.jsx("button", { className: "btn-mars", style: { width: "100%", marginTop: "10px", background: "#0055ff", color: "#fff", border: "none" }, children: "JOUER CLASSIC" })] })] })] }), s.jsxs("div", { className: "footer-logicantiq", style: { marginTop: "40px", padding: "20px", borderTop: "1px solid rgba(255,255,255,0.1)", textAlign: "center", color: "#666", fontSize: "0.8rem" }, children: ["PROPULSÉ PAR ", s.jsx("span", { style: { color: "var(--accent-color)", fontWeight: "bold" }, children: "LOGICANTIQ" })] })] }) }) }, Op = ({ onSelectPhoto: p, onClose: g, initialPhotos: o, setInitialPhotos: c, initialUrl: U, setInitialUrl: A, initialVerifiedLogos: M, setInitialVerifiedLogos: D, hideRabbitFilter: L = !1 }) => { const j = o, S = c, x = U, V = A, ee = M, it = D, [$, me] = G.useState(0), [W, de] = G.useState(!1), [Xe, Je] = G.useState("gallery"), [Be, at] = G.useState(!0), [re, jt] = G.useState(!1), [We, Xt] = G.useState(null); Js.useEffect(() => { L && at(!1) }, [L]); const nt = [{ name: "AliExpress (Shopping)", url: "https://www.aliexpress.com", items: [{ name: "Électronique", url: "https://www.aliexpress.com/category/44/consumer-electronics.html" }, { name: "Maison & Jardin", url: "https://www.aliexpress.com/category/15/home-garden.html" }, { name: "Jouets", url: "https://www.aliexpress.com/category/26/toys-hobbies.html" }] }, { name: "Alibaba (B2B/Grossiste)", url: "https://www.alibaba.com", items: [{ name: "Produits Populaires", url: "https://www.alibaba.com/Products" }, { name: "Électronique", url: "https://www.alibaba.com/Consumer-Electronics_p44" }, { name: "Maison", url: "https://www.alibaba.com/Home-Garden_p15" }] }, { name: "Temu (Promotions)", url: "https://www.temu.com", items: [{ name: "Meilleures Ventes", url: "https://www.temu.com/bestsellers.html" }, { name: "Nouveautés", url: "https://www.temu.com/new-arrivals.html" }] }], [he, lt] = G.useState({ x: 100, y: 100, w: 300, h: 300 }), [ft, xt] = G.useState(!1), [C, B] = G.useState("move"), X = G.useRef(null), Ae = G.useRef(null), Le = q => { Array.from(q.target.files).forEach(O => { const ae = new FileReader; ae.onloadend = () => { const Z = ae.result; S(se => se.includes(Z) ? se : [Z, ...se]) }, ae.readAsDataURL(O) }) }, d = () => { const q = "https://www.google.com/search?q=bunny+logo+white+silhouette&tbm=isch"; V(q), at(!0), I(q) }, R = async (q = j) => { if (!q || q.length === 0) return; de(!0), Xt(0); let K = 0; const O = new Date().toISOString().replace(/[:.]/g, "-").slice(0, 19), Z = `${x ? new URL(x.startsWith("http") ? x : "https://" + x).hostname.replace("www.", "") : "scanned"}_${O}`; for (let se = 0; se < q.length; se++) { const Oe = q[se]; try { (await fetch("http://localhost:3001/archive", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ dataUrl: Oe.startsWith("data:") ? Oe : null, url: Oe.startsWith("http") ? Oe : null, siteName: Z, fileName: `mars_scan_${se}_${Date.now()}.png` }) })).ok && K++ } catch (je) { console.error("Archive failed for image", se, je) } Xt(Math.round((se + 1) / q.length * 100)) } K === 0 && q.length > 0 ? alert("⚠️ Aucune image archivée. Vérifiez que le serveur d'archivage (server.js) est bien lancé sur le port 3001.") : alert(`${K} images archivées dans le nouveau dossier : public/images/imported/${Z}`), de(!1), Xt(null) }, I = async (q = null) => { let K = typeof q == "string" ? q : x; if (!K) return; de(!0); let O = K.trim(); if (!O.match(/^https?:\/\//)) if (O.includes("wikiart.org") || O.includes("google.") || O.includes("instagram.") || O.includes(".com") || O.includes(".org")) O = "https://" + O; else { alert("URL invalide. Veuillez enêêtrer une URL complète (ex: https://www.wikiart.org/...)"), de(!1); return } try { new URL(O) } catch { alert("URL invalide. Format attendu: https://exemple.com"), de(!1); return } const ae = ["lapin", "rabbit", "bunny", "hare", "coniglio", "conejo", "kaninchen", "playboy"], Z = O.includes("google.") && (O.includes("/search") || O.includes("imgres") || O.includes("q=")), se = O.includes("instagram.com") || O.includes("tiktok.com") || O.includes("facebook.com"); if (O.includes("wikiart.org") && O.includes("/Search/")) { console.log("🎨 WikiArt Search detected - extracting JSON data..."); try { const qe = (await (await fetch(`http://localhost:3001/proxy?url=${encodeURIComponent(O)}`)).json()).contents; console.log(`📄 Received ${qe.length} bytes from WikiArt`); const ce = [], Te = qe.match(/ng-init=['"]Paintings\s*=\s*(\[.*?\]);?['"]/s); if (Te) try { const ie = JSON.parse(Te[1]); console.log(`🎨 Found ${ie.length} paintings in ng-init`), ie.slice(0, 15).forEach(F => { (F.image || F.contentUrl) && ce.push(F.image || F.contentUrl) }) } catch (ie) { console.error("Failed to parse ng-init data:", ie) } const be = qe.match(/