;
! function() {
    try {
        var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof global ? global : "undefined" != typeof window ? window : "undefined" != typeof self ? self : {},
            n = (new e.Error).stack;
        n && ((e._debugIds || (e._debugIds = {}))[n] = "3e0e12f5-3003-20cd-b70a-d81549694831")
    } catch (e) {}
}();
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["object" == typeof document ? document.currentScript : void 0, 631222, e => {
    "use strict";
    var t, r, i = e.i(284553);
    let s = i.default.env.NEXT_PUBLIC_MAGIC_KEY || "pk_live_99ABD23F9F1C8266";
    var n = ((t = {}).Mainnet = "mainnet", t.Matic = "matic", t);
    let a = {
            rpcUrls: [`https://polygon-mainnet.g.alchemy.com/v2/${i.default.env.NEXT_PUBLIC_ALCHEMY_DEV_KEY_POLYGON||"mewmTuTYExTSI0lZisD2szwmi35fZY-r"}`],
            chainId: 137,
            explorerUrl: "https://polygonscan.com",
            eoaRpcUrls: ["https://polygon-rpc.com"],
            eoaExplorerUrls: ["https://polygonscan.com"]
        },
        o = i.default.env.NEXT_PUBLIC_MATIC_USDC || "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB",
        u = i.default.env.NEXT_PUBLIC_USDCE_ADDRESS || "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
        c = i.default.env.NEXT_PUBLIC_COLLATERAL_ONRAMP || "0x93070a847efEf7F70739046A929D47a521F5B8ee",
        l = i.default.env.NEXT_PUBLIC_COLLATERAL_ADAPTER || "0xAdA100Db00Ca00073811820692005400218FcE1f",
        d = i.default.env.NEXT_PUBLIC_NEG_RISK_COLLATERAL_ADAPTER || "0xadA2005600Dec949baf300f4C6120000bDB6eAab",
        h = i.default.env.NEXT_PUBLIC_PROXY_WALLET_FACTORY_ADDRESS || "0xaB45c5A4B0c941a2F231C04C3f49182e1A254052",
        p = i.default.env.NEXT_PUBLIC_USER_PNL_URL ? ? "https://user-pnl-api.polymarket.com",
        f = parseFloat("1.5"),
        m = Number(10 n ** BigInt(3) * 5 n);
    i.default.env.NEXT_PUBLIC_SLACK_WEBOOK_URI;
    var y = ((r = {})[r.polygon = 0] = "polygon", r);
    let g = Number.parseFloat("20"),
        v = i.default.env.NEXT_PUBLIC_CLOB_WEBSOCKET_URL ? ? "wss://ws-subscriptions-frontend-clob.polymarket.com/ws",
        b = `${v}/user`,
        E = `${v}/market`,
        S = i.default.env.NEXT_PUBLIC_LIVE_DATA_WEBSOCKET_URL ? ? "wss://ws-live-data.polymarket.com",
        _ = ["0x11FAe40C66A22907A51C9b248e3dadD57e161f58", "0x505dA8075DB50c4FE971AACF4B56cEa1289C87B2", "0x741dCBf582f36f8f69BfD7a415BCCAC642D9C576", "0x56ac4f06C203d9dcFb1bC23a0aB06995de35de67", "0xC5C2918B13cF2d9996b759E8A72081BD87e6c423", "0x74Cb38Db8b79db9FAe2aA936c863092E940700b6", "0x4B27447b0370371B9e2b25Be6845d7F144CeC899", "0x0682990de7b862979A3cf330a1B088412eCefD43", "0x01B5011D599909c62dF4d8d5A9cA23D2663D4806", "0x8592b52e3e2937d791a14b2e2ba0d02276fab379"].reduce((e, t) => (e[t] || (e[t.toLowerCase()] = !0), e), {});
    e.s(["AUTO_REDEEM_OPERATOR", 0, "0xF3cFb6a6eBFeB51876289Eb235719EB1C65252B0", "CLOB_API_URL", 0, "https://clob.polymarket.com", "CLOB_FEE_SLIPPAGE", 0, 0 === g || g >= 1 && g <= 100 ? g : 20, "COLLATERAL_ADAPTER_ADDRESS", 0, l, "COLLATERAL_ONRAMP_ADDRESS", 0, c, "CONDITIONAL_TOKENS_ADDRESS", 0, "0x4D97DCd97eC945f40cF65F87097ACe5EA0476045", "CRYPTO_SHORT_DURATION_DEFAULT_SLIPPAGE_LIMIT", 0, 10, "CURRENT_ORIGIN", 0, "https://polymarket.com", "DATA_API", 0, "https://data-api.polymarket.com", "DEFAULT_SLIPPAGE_LIMIT", 0, f, "DUST_DISPLAY_FACTOR", 0, 1.2, "GAMMA_API_URL", 0, "https://gamma-api.polymarket.com", "GEOBLOCKING_ACTIVE", 0, "true", "LIVE_DATA_WEBSOCKET_URL", 0, S, "MAGIC_KEY", 0, s, "MATIC_CONFIG", 0, a, "NEG_RISK_COLLATERAL_ADAPTER_ADDRESS", 0, d, "NEG_RISK_UMA_CTF_ADAPTER_ADDRESS", 0, "0x2F5e3684cb1F318ec51b00Edba38d79Ac2c0aA9d", "NEG_RISK_UMA_CTF_ADAPTER_V4_ADDRESS", 0, "0x69c47De9D4D3Dad79590d61b9e05918E03775f24", "Network", () => n, "OLD_AUTO_REDEEM_OPERATOR", 0, "0x05cD9922A5d37faE921Fc5Dee280A9dBc4C3b393", "OLD_REWARDS_CONTRACT_ADDRESS", 0, "0xf7cD89BE08Af4D4D6B1522852ceD49FC10169f64", "POLYMARKET_DOCS_LINK", 0, "https://docs.polymarket.com", "POLYMARKET_HELP_CENTER_LINK", 0, "https://help.polymarket.com", "POLYMARKET_NEWS_LINK", 0, "https://news.polymarket.com", "POLYMARKET_SOCIAL_LINKS", 0, {
        email: "mailto:hello@polymarket.com",
        twitter: "https://x.com/Polymarket",
        instagram: "https://www.instagram.com/polymarket",
        discord: "https://discord.gg/Polymarket",
        tiktok: "https://www.tiktok.com/@polymarket"
    }, "POLYMARKET_TOS_LINK", 0, "https://polymarket.com/tos", "PRICE_CHANGE_WARNING_CLOB", 0, .1, "PROXY_WALLET_FACTORY_ADDRESS", 0, h, "REWARDS_CONTRACT_ADDRESS", 0, "0xdd8Db71Ce3BE8d71ff148b2163D64Da181a29e8B", "SAFE_INIT_CODE_HASH", 0, "0x2bce2127ff07fb632d16c8347c4ebf501f4841168bed00d9e6ef715ddb6fcecf", "SELL_MAX_DUST", 0, m, "UMA_CTF_ADAPTER_V1_ADDRESS", 0, "0xCB1822859cEF82Cd2Eb4E6276C7916e692995130", "UMA_CTF_ADAPTER_V2_ADDRESS", 0, "0x6A9D222616C90FcA5754cd1333cFD9b7fb6a4F74", "UMA_CTF_ADAPTER_V3_ADDRESS", 0, "0x157Ce2d672854c848c9b79C49a8Cc6cc89176a49", "UMA_CTF_ADAPTER_V4_ADDRESS", 0, "0x65070BE91477460D8A7AeEb94ef92fe056C2f2A7", "UMA_OO_DAPP", 0, "https://oracle.uma.xyz/", "USDCE_ADDRESS", 0, u, "USDC_ADDRESS", 0, o, "USDC_DECIMALS", 0, 6, "USER_PNL_URL", 0, p, "V2_RELAYER_URL", 0, "https://relayer-v2.polymarket.com", "VERCEL_ENV", 0, "production", "WAGMI_CHAIN_INDICES", () => y, "WEBSOCKET_MARKET", 0, E, "WEBSOCKET_USER", 0, b, "chainConfig", 0, {
        42: {
            name: "Kovan",
            exchange: "0xE7819d9745e64c14541732ca07CC3898670b7650",
            collateral: "0xe22da380ee6B445bb8273C81944ADEB6E8450422",
            conditional: "0x",
            negRiskAdapter: "0x",
            negRiskExchange: "0x"
        },
        137: {
            name: "Polygon",
            exchange: "0xE111180000d2663C0091e4f400237545B87B996B",
            collateral: o,
            conditional: "0x4D97DCd97eC945f40cF65F87097ACe5EA0476045",
            negRiskAdapter: "0xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296",
            negRiskExchange: "0xe2222d279d744050d28e00520010520000310F59",
            collateralOnramp: c
        },
        80001: {
            name: "Mumbai",
            exchange: "0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E",
            collateral: "0x2E8DCfE708D44ae2e406a1c02DFE2Fa13012f961",
            conditional: "0x7D8610E9567d2a6C9FBf66a5A13E9Ba8bb120d43",
            negRiskAdapter: "0x9A6930BB811fe3dFE1c35e4502134B38EC54399C",
            negRiskExchange: "0x87d1A0DdB4C63a6301916F02090A51a7241571e4"
        }
    }, "internalTestProxyAddresses", 0, _])
}, 660154, e => {
    "use strict";
    var t = Array.isArray;
    e.s(["default", 0, t])
}, 785364, 972727, 26148, e => {
    "use strict";
    var t = e.g && e.g.Object === Object && e.g;
    e.s(["default", 0, t], 972727);
    var r = "object" == typeof self && self && self.Object === Object && self,
        i = t || r || Function("return this")();
    e.s(["default", 0, i], 26148);
    var s = i.Symbol;
    e.s(["default", 0, s], 785364)
}, 610244, 796755, 6251, e => {
    "use strict";
    var t = e.i(785364),
        r = Object.prototype,
        i = r.hasOwnProperty,
        s = r.toString,
        n = t.default ? t.default.toStringTag : void 0;
    let a = function(e) {
        var t = i.call(e, n),
            r = e[n];
        try {
            e[n] = void 0;
            var a = !0
        } catch (e) {}
        var o = s.call(e);
        return a && (t ? e[n] = r : delete e[n]), o
    };
    var o = Object.prototype.toString,
        u = t.default ? t.default.toStringTag : void 0;
    let c = function(e) {
        return null == e ? void 0 === e ? "[object Undefined]" : "[object Null]" : u && u in Object(e) ? a(e) : o.call(e)
    };
    e.s(["default", 0, c], 796755);
    let l = function(e) {
        return null != e && "object" == typeof e
    };
    e.s(["default", 0, l], 6251), e.s(["default", 0, function(e) {
        return "symbol" == typeof e || l(e) && "[object Symbol]" == c(e)
    }], 610244)
}, 969676, e => {
    "use strict";
    e.s(["default", 0, function(e, t) {
        for (var r = -1, i = null == e ? 0 : e.length, s = Array(i); ++r < i;) s[r] = t(e[r], r, e);
        return s
    }])
}, 63238, 496842, e => {
    "use strict";
    var t = e.i(621030);
    class r extends t.BaseError {
        constructor({
            value: e
        }) {
            super(`Number \`${e}\` is not a valid decimal number.`, {
                name: "InvalidDecimalNumberError"
            })
        }
    }
    e.s(["InvalidDecimalNumberError", 0, r], 496842), e.s(["parseUnits", 0, function(e, t) {
        if (!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e)) throw new r({
            value: e
        });
        let [i, s = "0"] = e.split("."), n = i.startsWith("-");
        if (n && (i = i.slice(1)), s = s.replace(/(0+)$/, ""), 0 === t) 1 === Math.round(Number(`.${s}`)) && (i = `${BigInt(i)+1n}`), s = "";
        else if (s.length > t) {
            let [e, r, n] = [s.slice(0, t - 1), s.slice(t - 1, t), s.slice(t)], a = Math.round(Number(`${r}.${n}`));
            (s = a > 9 ? `${BigInt(e)+BigInt(1)}0`.padStart(e.length + 1, "0") : `${e}${a}`).length > t && (s = s.slice(1), i = `${BigInt(i)+1n}`), s = s.slice(0, t)
        } else s = s.padEnd(t, "0");
        return BigInt(`${n?"-":""}${i}${s}`)
    }], 63238)
}, 510954, 57096, e => {
    "use strict";

    function t(e) {
        return Object.assign(Object.create(null), e)
    }

    function r(e, r) {
        let i = {
            _def: [e]
        };
        if (null == r) return t(i);
        let s = (e, r) => (e => {
            let t = Object.keys(e).sort((e, t) => e.localeCompare(t));
            if (t.some(e => e.startsWith("_"))) throw Error('Keys that start with "_" are reserved for Query Key Factory');
            return t
        })(e).reduce((i, n) => {
            let a = e[n],
                o = [...r, n],
                u;
            if ("function" == typeof a) {
                let e = (...e) => {
                    let r = a(...e);
                    if (Array.isArray(r)) return t({
                        queryKey: [...o, ...r]
                    });
                    let i = [...o, ...r.queryKey];
                    if ("queryFn" in r) {
                        let e = {
                            queryKey: i,
                            queryFn: r.queryFn
                        };
                        return "contextQueries" in r ? t({
                            _ctx: t(Object.fromEntries(s(r.contextQueries, i))),
                            ...e
                        }) : t({ ...e
                        })
                    }
                    return "contextQueries" in r ? t({
                        _ctx: t(Object.fromEntries(s(r.contextQueries, i))),
                        queryKey: i
                    }) : t({
                        queryKey: i
                    })
                };
                e._def = o, u = e
            } else if (null == a) u = t({
                queryKey: o
            });
            else if (Array.isArray(a)) u = t({
                _def: o,
                queryKey: [...o, ...a]
            });
            else if ("queryFn" in a) {
                let e = { ...a.queryKey ? {
                            _def: o
                        } : void 0
                    },
                    r = [...o, ...a.queryKey ? ? []],
                    i = {
                        queryKey: r,
                        queryFn: a.queryFn
                    };
                u = "contextQueries" in a ? t({
                    _ctx: t(Object.fromEntries(s(a.contextQueries, r))),
                    ...e,
                    ...i
                }) : t({ ...e,
                    ...i
                })
            } else if ("contextQueries" in a) {
                let e = { ...a.queryKey ? {
                            _def: o
                        } : void 0
                    },
                    r = [...o, ...a.queryKey ? ? []];
                u = t({
                    _ctx: t(Object.fromEntries(s(a.contextQueries, r))),
                    queryKey: r,
                    ...e
                })
            } else {
                let e = { ...a.queryKey ? {
                        _def: o
                    } : void 0
                };
                u = t({
                    queryKey: [...o, ...a.queryKey ? ? []],
                    ...e
                })
            }
            return i.set(n, u), i
        }, new Map);
        return t({ ...Object.fromEntries(s(r, i._def)),
            ...i
        })
    }
    var i, s, n = ((i = {}).OneDay = "1d", i.SevenDay = "7d", i.ThirtyDay = "30d", i.All = "all", i),
        a = ((s = {}).ClobChart = "/prices-history", s.Rewards = "/api/rewards", s.Comments = "/api/comments", s.Holders = "/api/holders", s.MarketPositions = "/api/market-positions", s.Tags = "/api/tags", s.Activity = "/api/activity", s.MarketClarifications = "market-clarifications", s.OpenOrders = "/open-orders", s.OpenOrderScoring = "/open-orders-scoring", s.LimitOrderHistory = "/limit-order-history", s.MarketOrderHistory = "/market-order-history", s.TradeHistory = "/trade-history", s.Subgraph = "subgraph-market-data", s.Leaderboard = "/leaderboard", s.Account = "account", s.Auth = "auth", s.Transactions = "transactions", s.Positions = "positions", s.TokenBalance = "token-balance", s.Notifications = "notifications", s.PendingTransactions = "pending-transactions", s.FavoriteMarkets = "favorite-markets", s.MarketIdentifiers = "market-identifiers", s.Markets = "markets", s.Market = "market", s.Events = "events", s.Rfq = "rfq", s.Profile = "profile", s.Tracking = "tracking", s.UI = "ui", s.Suggestions = "/api/suggestions", s.SportsTeams = "sports-teams", s.Deposit = "/api/deposit", s.Dashboards = "dashboards", s.EventEmbeds = "event-embeds", s.Annotations = "annotations", s.CryptoPrices = "crypto-prices", s.EquityPrices = "equity-prices", s.Ai = "ai", s.Referral = "referral", s);
    e.s(["LeaderboardRange", () => n, "QueryKey", () => a], 57096);
    let o = e => e ? Array.isArray(e) ? e.length ? e.sort((e, t) => e.localeCompare(t)).join(",") : void 0 : "string" == typeof e ? e.split(",").sort((e, t) => e.localeCompare(t)).join(",") : void 0 : void 0,
        u = e => e && "" !== e ? e : void 0,
        c = r(a.ClobChart, {
            interval: (e, t, r, i, s, n, a, o) => [e, t, r, i, s, n ? ? "", a ? ? !1, o ? ? ""],
            priceChange: (e, t, r) => [JSON.stringify(e), t, r],
            lastHoveredPoint: (e, t, r) => [e, t, r]
        }),
        l = r(a.OpenOrders, {
            apiKey: e => [e],
            apiKeyAndMarket: (e, t) => [e, t]
        }),
        d = r(a.OpenOrderScoring, {
            tokenId: e => [e]
        }),
        h = r(a.LimitOrderHistory, {
            apiKey: e => [e],
            apiKeyAndMarket: (e, t) => [e, t],
            apiKeyAndMarkets: (e, t, r) => [e, t, r]
        }),
        p = r(a.MarketOrderHistory, {
            apiKey: e => [e],
            apiKeyAndMarket: (e, t) => [e, t],
            apiKeyAndMarkets: (e, t, r) => [e, t, r]
        }),
        f = r(a.TradeHistory, {
            trades: (e, t, r, i) => [e, t, r, i]
        }),
        m = r(a.Rewards, {
            current: ({
                date: e,
                orderBy: t,
                position: r,
                searchQuery: i,
                tagSlug: s,
                showFavorites: n,
                cursor: a,
                makerAddress: o,
                walletMode: u,
                haveL2HeadersLoaded: c,
                onlyMergeable: l,
                noCompetition: d,
                onlyOpenOrders: h,
                onlyPositions: p,
                sponsored: f
            }) => [t, r, e, i, n, s, a, o, u, c, l, d, h, p, f],
            totalEarnings: (e, t, r, i) => [e, t, r, i ? ? !0],
            rewardMarket: e => [e],
            marketToTrade: e => [e],
            userSponsorships: (e, t) => [e, t]
        }),
        y = r(a.Events, {
            filters: (e, t, r, i, s, n, a, c, l, d) => [o(l ? n : e), o(l ? a : t), u(l ? c : r), u(i), s ? .toString(), d],
            homepageFilters: (e, t, r, i, s, n, a, c, l, d, h, p) => [e, !0 === a ? "true" : void 0, o(p ? l : t), o(p ? d : r), u(p ? h : i), u(s), u(n), c ? .toString()],
            slugs: e => [JSON.stringify(e)],
            trending: () => [""],
            new: () => [""],
            featured: () => [""],
            partial: e => [JSON.stringify(e)],
            tagPartial: e => [JSON.stringify(e)],
            seriesPartial: e => [e],
            related: (e, t) => [e, t],
            sports: ({
                seriesIds: e,
                eventWeek: t,
                eventDate: r,
                startTimeMin: i,
                startTimeMax: s,
                closed: n
            }) => [e, t, r, i, s, n],
            futures: e => [e],
            props: e => [e],
            tournament: (e, t) => [e, t],
            other: () => [""],
            mentions: () => [""],
            recommendations: () => [""]
        }),
        g = r(a.Account, {
            profile: () => [""],
            preferences: () => [""],
            walletPreferences: () => [""],
            favoriteEvents: () => [""],
            featureFlags: () => [""]
        }),
        v = r(a.Auth, {
            isLoggedIn: () => [""],
            nonce: () => [""],
            safeDeployed: e => [e ? .toLowerCase() ? ? ""],
            safeNonce: e => [e ? .toLowerCase() ? ? ""],
            depositWalletDeployed: e => [e ? .toLowerCase() ? ? ""],
            depositWalletNonce: e => [e ? .toLowerCase() ? ? ""]
        }),
        b = r(a.Tracking, {
            metadataMap: () => [""]
        }),
        E = r(a.Transactions, {
            proxyAddress: e => [e],
            txns: (e, t) => [e, t]
        }),
        S = r(a.Positions, {
            market: e => [e],
            liquidity: e => [e],
            value: e => [e],
            portfolio: e => [e],
            portfolioSportsTeamColors: e => [JSON.stringify(e.sort())],
            byIds: (e, t, r) => [e, t, JSON.stringify(r)],
            mergeable: e => [e],
            redeemable: e => [e],
            optimistic: e => [e.toLowerCase()],
            negRiskOther: (e, t) => [e, t]
        }),
        _ = r(a.Profile, {
            profile: () => [""],
            positions: e => [e],
            closedPositions: e => [e, "closed"],
            activity: (e, t) => [e, t],
            views: e => [e]
        }),
        R = r(a.Suggestions, {
            mySuggestions: (e, t) => [e, t],
            id: e => [e],
            revisions: e => [e]
        }),
        C = r(a.MarketIdentifiers, {
            conditionIds: () => [""],
            positionIds: () => [""]
        }),
        A = r(a.Markets, {
            positions: e => [e],
            trackedPositions: () => [""],
            history: e => [e],
            forLiquidity: e => [e],
            forOpenOrders: e => [e],
            notifications: e => [JSON.stringify(e)],
            forHistory: e => [JSON.stringify(e)]
        }),
        T = r(a.Notifications, {
            clob: () => [""],
            cachedClob: () => [""],
            txns: () => [""],
            watermark: () => [""]
        }),
        O = r(a.Activity, {
            homepage: (e, t) => [e, t],
            page: e => [e],
            event: (e, t, r, i, s) => [e, t, r, i, s]
        }),
        D = r(a.Subgraph, {
            data: e => [e],
            prices: e => [e]
        }),
        I = r(a.TokenBalance, {
            token: (e, t, r) => [e, t, r]
        }),
        F = r(a.Leaderboard, {
            volumeUserRank: (e, t, r) => [e, t, r],
            profitUserRank: (e, t, r) => [e, t, r],
            profit: (e, t = 1, r = "overall", i) => [e, t, r, i],
            volume: (e, t = 1, r = "overall", i) => [e, t, r, i],
            biggestWins: (e, t = 10, r = "overall") => [e, t, r]
        }),
        P = r(a.PendingTransactions, {
            count: (e, t) => [e, t],
            value: (e, t) => [e, t]
        }),
        N = r(a.Holders, {
            conditionId: (e, t) => [e, t],
            infinite: e => [e]
        }),
        L = r(a.MarketPositions, {
            conditionId: e => [e],
            infinite: (e, t, r, i) => [e, t, r, i]
        }),
        w = r(a.Comments, {
            event: (e, t, r, i, s) => [e, t, r, i, s],
            eventCommentCount: e => [e],
            reports: (e, t, r) => [e, t, r]
        }),
        M = r(a.UI, {
            bookOpenState: () => [""]
        }),
        x = r(a.SportsTeams, {
            teams: (e, t) => [e, t]
        }),
        k = r(a.Tags, {
            tagCount: e => [e],
            filteredTags: (e, t, r) => [e, t, r ? ? "en"],
            filteredTagsBySlug: (e, t, r) => [e, t, r ? ? "en"],
            getBySlug: e => [e],
            eventsFromTag: e => [e],
            forYou: e => [e]
        }),
        U = r(a.Deposit, {
            quote: (e, t) => [e, t],
            status: e => [e],
            transactions: () => [""],
            quotes: () => [""],
            copied: () => [""],
            chains: () => [""],
            lastSeenT2bSourceBlock: () => [""],
            lastSeenContractEventBlock: (e, t) => [JSON.stringify(e), JSON.stringify(t)],
            t2bFeeMultiplier: (e, t) => [e ? ? "", t ? ? ""],
            tokenList: e => [e.toString()],
            sourceTransactionStatus: (e, t, r, i) => [JSON.stringify(e), JSON.stringify(t), r.toString(), i ? JSON.stringify(i) : ""],
            watchContractTransferEvent: (e, t, r, i) => [JSON.stringify(e), JSON.stringify(t), r.toString(), i ? JSON.stringify(i) : ""],
            t2bAddressMap: () => [""]
        }),
        B = r(a.Dashboards, {
            fedRates: () => [""]
        }),
        Q = r(a.EventEmbeds, {
            tweetCountEmbed: e => [e]
        }),
        K = r(a.FavoriteMarkets, {
            proxy: e => [e]
        }),
        q = r(a.Market, {
            description: e => [e]
        }),
        j = r(a.Rfq, {
            requests: (e, t) => [e, JSON.stringify(t)],
            quotes: (e, t) => [e, JSON.stringify(t)],
            markets: e => [e],
            users: e => [e]
        }),
        G = r(a.Annotations, {
            event: e => [e]
        }),
        $ = r(a.CryptoPrices, {
            price: (e, t, r, i) => [e, t ? ? "", r ? ? "hourly", i ? ? ""]
        }),
        H = r(a.EquityPrices, {
            price: (e, t, r, i) => [e, t ? ? "", r ? ? "daily", i ? ? ""]
        }),
        W = function(...e) {
            return t(Object.fromEntries(e.reduce((e, t) => {
                let [r] = t._def;
                return e.set(r, { ...e.get(r),
                    ...t
                }), e
            }, new Map)))
        }(g, O, r(a.Ai, {
            cyomSuggestions: e => [e ? .trim() ? ? ""]
        }), G, v, c, w, $, B, U, H, Q, y, K, N, F, h, r(a.MarketClarifications, {
            clarifications: e => [e.toString()]
        }), C, q, p, L, A, T, l, d, r(a.Referral, {
            analytics: (e, t) => [e, t],
            commissions: e => [e],
            codes: e => [e],
            payouts: e => [e],
            info: e => [e]
        }), P, S, _, m, j, x, D, R, k, I, b, f, E, M);
    e.s(["queryKeys", 0, W], 510954)
}, 196593, e => {
    "use strict";
    var t = e.i(882860),
        r = e.i(63238);

    function i(e, t = {}) {
        let {
            decimals: r = 0,
            commas: s = !0
        } = t, n = "string" == typeof e ? parseFloat(e) : e;
        return Number.isFinite(n) ? new Intl.NumberFormat("en-US", {
            style: "currency",
            currency: "USD",
            minimumFractionDigits: r,
            maximumFractionDigits: r,
            useGrouping: s
        }).format(n) : "$0"
    }

    function s(e, t = {}) {
        let {
            decimals: r = 0,
            currency: i = !1
        } = t, n = "string" == typeof e ? parseFloat(e) : e;
        return Number.isFinite(n) ? new Intl.NumberFormat("en-US", {
            notation: "compact",
            compactDisplay: "short",
            minimumFractionDigits: r,
            maximumFractionDigits: r,
            ...i && {
                style: "currency",
                currency: "USD"
            }
        }).format(n).toUpperCase() : i ? "$0" : "0"
    }

    function n(e, t = {}) {
        let {
            decimals: r = 0,
            sign: i = !1
        } = t, s = "string" == typeof e ? parseFloat(e) : e;
        if (!Number.isFinite(s)) return "0%";
        let a = 100 * s,
            o = Math.abs(a).toFixed(r);
        return i ? a > 0 ? `+${o}%` : a < 0 ? `-${o}%` : `${o}%` : a < 0 ? `-${o}%` : `${o}%`
    }
    let a = e => {
            if (!Number.isFinite(parseFloat(e))) return "0";
            let [t, r] = e.toString().split(".");
            if (!t || "" === t) return r ? `0.${r}` : "0";
            let i = parseInt(t, 10).toLocaleString("en-US");
            return r ? `${i}.${r}` : i
        },
        o = (e, t) => parseFloat(e = "string" == typeof e ? e : e.toString()) >= 100 || 0 === t ? a(Math.round(parseFloat(e)).toString()) : a(parseFloat(e).toFixed(t || 2)),
        u = (e, t) => "string" == typeof e ? u(parseFloat(e)) : e / 1e12 >= 1 ? `${(e/1e12).toFixed(3)}T` : e / 1e9 >= 1 ? `${(e/1e9).toFixed(2)}B` : e / 1e6 >= 1 ? `${(e/1e6).toFixed(2*!!t)}M` : e / 1e3 >= 1 ? `${(e/1e3).toFixed(+!!t)}K` : e < 1 && e > 1e-4 ? t ? e.toFixed(0) : c(e) : e.toFixed(0),
        c = e => e > .01 ? e.toFixed(2) : e.toFixed(4),
        l = e => "0" === e[0] ? e[1] : e;
    e.s(["formatAbbreviated", 0, s, "formatCurrency", 0, i, "formatNoRound", 0, (e, t = 2) => {
        let r = 10 ** t;
        return (Math.floor(e * r) / r).toFixed(t)
    }, "formatNum", 0, function(e, t = {}) {
        let {
            decimals: r = 0,
            commas: i = !0,
            optionalDecimals: s = !1,
            minDecimals: n,
            trailingZeros: a = !0
        } = t, o = "string" == typeof e ? parseFloat(e) : e;
        if (!Number.isFinite(o)) return "0";
        let u = Math.max(0, Math.min(20, Math.floor(r)));
        if (s || !a) {
            let e = Math.abs(Math.round(o) - o) > 1e-9,
                t = a ? 0 : e && u > 0 ? 1 : 0,
                r = e ? Math.max(u, t) : 0;
            return o.toLocaleString("en-US", {
                minimumFractionDigits: t,
                maximumFractionDigits: r,
                useGrouping: i
            })
        }
        return o.toLocaleString("en-US", {
            minimumFractionDigits: n ? ? u,
            maximumFractionDigits: u,
            useGrouping: i
        })
    }, "formatNumbers", 0, o, "formatPercent", 0, n, "formatPercentChance", 0, function(e, t = {}) {
        let r = "string" == typeof e ? parseFloat(e) : e;
        if (!Number.isFinite(r)) return "0%";
        let i = 100 * r;
        return 1 > parseInt(i.toFixed(), 10) && i > 0 ? "<1%" : n(e, t)
    }, "formatShares", 0, function(e) {
        let t = "string" == typeof e ? parseFloat(e) : e;
        return Number.isNaN(t) ? "0.0" : t.toLocaleString("en-US", {
            minimumFractionDigits: 1,
            maximumFractionDigits: 1
        })
    }, "formatToCents", 0, (e, t) => {
        let r = Number(e);
        return Number.isNaN(r) ? "0¢" : `${new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:1,...t}).format(r)}\xa2`
    }, "formatToDecimal", 0, (e, t = 2) => {
        let r = Number(e);
        return Number.isNaN(r) ? `0.${"0".repeat(t)}` : new Intl.NumberFormat("en-US", {
            minimumFractionDigits: t,
            maximumFractionDigits: t,
            useGrouping: !1
        }).format(r)
    }, "formatToDollar", 0, (e, t) => {
        let r = Number(e);
        return Number.isNaN(r) ? "$0.00" : new Intl.NumberFormat("en-US", {
            style: "currency",
            currency: "USD",
            minimumFractionDigits: 2,
            maximumFractionDigits: 2,
            ...t
        }).format(r)
    }, "formatToPercentage", 0, (e, t) => {
        let r = Number(e);
        return Number.isNaN(r) ? "0%" : new Intl.NumberFormat("en-US", {
            style: "percent",
            minimumFractionDigits: 0,
            maximumFractionDigits: 0,
            ...t
        }).format(r)
    }, "formatToShares", 0, e => {
        let t = Number(e);
        return Number.isNaN(t) ? "0" : new Intl.NumberFormat("en-US", {
            minimumFractionDigits: 0,
            maximumFractionDigits: 0
        }).format(t)
    }, "formatUSDCUnits", 0, e => (0, t.formatUnits)(e, 6), "formatVolume", 0, e => !e || Number.isNaN(e) ? "$0" : e < 1e3 ? i(Math.round(e)) : e < 1e5 ? s(e, {
        decimals: 1,
        currency: !0
    }) : s(e, {
        decimals: 0,
        currency: !0
    }), "nDecimals", 0, (e, t) => Number(parseFloat(String(e))).toFixed(t), "numberStringForPositionAmount", 0, function(e) {
        let t = parseFloat(e);
        if (Number.isNaN(t)) return "0";
        let r = +(100 > Math.abs(t));
        return t.toLocaleString("en-US", {
            minimumFractionDigits: 0,
            maximumFractionDigits: r
        })
    }, "numberStringWithCommas", 0, a, "parseUSDCUnits", 0, e => (0, r.parseUnits)(e, 6), "parseUSDCUnitsBigInt", 0, e => {
        let [t, r] = e.split(".");
        return BigInt((t || "0") + (r || "").slice(0, 6).padEnd(6, "0"))
    }, "showCentsOnly", 0, (e, t = 2, r = !1) => {
        if (!e) return "0";
        let [i, s] = o(e, t).split(".");
        if ("1" === i) return "100";
        if (s) {
            if (2 === s.length) return l(s);
            if (s.length > 2 && t > 2) {
                let e = s.slice(0, 2),
                    i = s.slice(2).slice(0, t - 2);
                if (r) {
                    let t = i.replace(/0+$/, "");
                    return t.length > 0 ? `${l(e)}.${t}` : l(e)
                }
                return `${l(e)}.${i}`
            }
        }
        return "0"
    }, "showPaddedCentsOnly", 0, (e, t = 2) => {
        let [r, i] = e.split(".");
        return i ? "1" === r ? "1".padEnd(t + 1, "0") : i ? i.padEnd(t, "0").slice(0, t) : "0" : "0".padEnd(t, "0")
    }, "suffixNumber", 0, u, "toPercentage", 0, (e, t) => {
        let r = Number(e);
        if (Number.isNaN(r)) return "0.00%";
        let i = 100 * r,
            {
                signDisplay: s = "auto",
                minimumFractionDigits: n = 2,
                maximumFractionDigits: a = 2,
                ...o
            } = t || {},
            u = Math.abs(i),
            c = i < 0,
            l = u.toLocaleString("en-US", {
                style: "decimal",
                minimumFractionDigits: n,
                maximumFractionDigits: a,
                ...o
            });
        return `${"never"===s?"":"always"===s?c?"-":"+":"exceptZero"===s?0===i?"":c?"-":"+":c?"-":""}${l}%`
    }, "toUSCurrency", 0, (e, t) => {
        if ("-" === e) return "-";
        if (null == e || "" === e) return "$0.00";
        let r = Math.round(100 * Number(e)) / 100;
        if (Number.isNaN(r)) return "$0.00";
        let i = r;
        0 === Math.abs(r) && (i = 0);
        let {
            signDisplay: s = "auto",
            minimumFractionDigits: n = 2,
            maximumFractionDigits: a = 2,
            ...o
        } = t || {}, u = Math.abs(i), c = i < 0, l = u.toLocaleString("en-US", {
            style: "decimal",
            minimumFractionDigits: n,
            maximumFractionDigits: a,
            ...o
        }), d = "never" === s ? "" : "always" === s ? c ? "-" : "+" : "exceptZero" === s ? 0 === i ? "" : c ? "-" : "+" : c ? "-" : "";
        return `${d}$${l}`
    }, "toWei", 0, e => 10 n ** 9 n * BigInt(Math.ceil(Number(e))), "twoDecimals", 0, e => Number(parseFloat(String(e))).toFixed(2)])
}, 192842, 70549, 749654, e => {
    "use strict";
    let t = Symbol.for("constructDateFrom");

    function r(e, r) {
        return "function" == typeof e ? e(r) : e && "object" == typeof e && t in e ? e[t](r) : e instanceof Date ? new e.constructor(r) : new Date(r)
    }
    e.s(["constructFromSymbol", 0, t, "millisecondsInDay", 0, 864e5, "millisecondsInHour", 0, 36e5, "millisecondsInMinute", 0, 6e4, "millisecondsInSecond", 0, 1e3, "millisecondsInWeek", 0, 6048e5, "minutesInDay", 0, 1440, "minutesInMonth", 0, 43200, "minutesInYear", 0, 525600], 70549), e.s(["constructFrom", 0, r], 749654), e.s(["toDate", 0, function(e, t) {
        return r(t || e, e)
    }], 192842)
}, 322467, 60970, e => {
    "use strict";
    var t = e.i(785364),
        r = e.i(969676),
        i = e.i(660154),
        s = e.i(610244),
        n = 1 / 0,
        a = t.default ? t.default.prototype : void 0,
        o = a ? a.toString : void 0;
    let u = function e(t) {
        if ("string" == typeof t) return t;
        if ((0, i.default)(t)) return (0, r.default)(t, e) + "";
        if ((0, s.default)(t)) return o ? o.call(t) : "";
        var a = t + "";
        return "0" == a && 1 / t == -n ? "-0" : a
    };
    e.s(["default", 0, u], 60970), e.s(["default", 0, function(e) {
        return null == e ? "" : u(e)
    }], 322467)
}, 248131, e => {
    "use strict";
    var t, r = ((t = {}).Activity = "/activity", t.Breaking = "/breaking", t.DashboardsMacro = "/dashboards/macro", t.EventDetail = "/event/[...slug]", t.Home = "/", t.Leaderboard = "/leaderboard", t.MarketDetail = "/market/[slug]", t.Portfolio = "/portfolio", t.Rewards = "/rewards", t.Settings = "/settings", t.Sports = "/sports", t.Search = "/predictions", t);
    e.s(["Location", () => r])
}, 318594, e => {
    "use strict";
    var t = e.i(416340),
        r = e.i(221628),
        i = t.createContext(void 0);
    e.s(["QueryClientProvider", 0, ({
        client: e,
        children: s
    }) => (t.useEffect(() => (e.mount(), () => {
        e.unmount()
    }), [e]), (0, r.jsx)(i.Provider, {
        value: e,
        children: s
    })), "useQueryClient", 0, e => {
        let r = t.useContext(i);
        if (e) return e;
        if (!r) throw Error("No QueryClient set, use QueryClientProvider to set one");
        return r
    }])
}, 313582, e => {
    "use strict";
    e.s(["COOKIE_DEFAULT_ORDER_TYPE", 0, "default_order_type", "COOKIE_GEO_SERVER_KEY", 0, "pm_geo", "COOKIE_NAVIGATED_FROM_INDICATOR", 0, "polymarket.navigated_from_indicator", "COOKIE_PORTFOLIO_HISTORY_ACTION_FILTER", 0, "portfolio_history_action_filter", "COOKIE_PORTFOLIO_HISTORY_DATE_END", 0, "portfolio_history_date_end.v0", "COOKIE_PORTFOLIO_HISTORY_DATE_START", 0, "portfolio_history_date_start.v0", "COOKIE_SLIPPAGE_TOLERANCE", 0, "slippage_tolerance", "ESPORTS_RESOLUTION_GUIDELINES_DOC", 0, "https://docs.google.com/document/d/e/2PACX-1vRfSHEJ80FGtRNSwwshCmI3yxvknxN-uqBwdQH29GOCG3JwjoNQGSqGk7Jvq4AdkcnK1QWZmbcCPMHC/pub?embedded=true", "LEADERBOARD_LIST_LENGTH", 0, 20, "LS_MARKET_INITIAL_OUTCOME_IDX", 0, "pm_market_initial_outcome_idx", "LS_MARKET_INITIAL_SMP_DRAWER", 0, "pm_market_initial_smp_drawer", "LS_MARKET_ORDER_NOTIFICATION", 0, "pm_market_order_notification", "LS_MARKET_ORDER_TYPE", 0, "pm_market_order_type", "MARKET_INTEGRITY_DOC", 0, "https://docs.google.com/document/d/e/2PACX-1vT9qJCkbbtvgSy1J1SiV-AfW8r-u7WBY7--dR2Z6RX4HSztv9N-AVMSUDbli7e2kg/pub?embedded=true", "PRIVACY_POLICY_DOC", 0, "https://docs.google.com/document/d/e/2PACX-1vSUjqbCliz9SSd2EgY-wyGckP6nLvcu219R_R5hOtDi0CB0tzuoXq4NAe4FWMpZ0g/pub?embedded=true", "PROFILE_BIO_MAX_LENGTH", 0, 200, "REGEX_ALPHANUMERIC_CHECK", 0, /^[a-zA-Z0-9-]+$/, "REGEX_NUMBER_CHECK", 0, /^[0-9]+$/, "TERMS_OF_USE_DOC", 0, "https://drive.google.com/file/d/1P8Fgl7FPvEg2fHrzntMWtaLvKDu7fN9g/preview", "USERNAME_MAX_DISPLAY_LENGTH", 0, 11, "USERNAME_MAX_DISPLAY_LENGTH_MOBILE", 0, 20, "USERNAME_MAX_LENGTH", 0, 42, "USERNAME_MIN_LENGTH", 0, 3])
}, 899730, e => {
    "use strict";
    var t = {
            setTimeout: (e, t) => setTimeout(e, t),
            clearTimeout: e => clearTimeout(e),
            setInterval: (e, t) => setInterval(e, t),
            clearInterval: e => clearInterval(e)
        },
        r = new class {#
            e = t;#
            t = !1;
            setTimeoutProvider(e) {
                this.#e = e
            }
            setTimeout(e, t) {
                return this.#e.setTimeout(e, t)
            }
            clearTimeout(e) {
                this.#e.clearTimeout(e)
            }
            setInterval(e, t) {
                return this.#e.setInterval(e, t)
            }
            clearInterval(e) {
                this.#e.clearInterval(e)
            }
        };
    e.s(["systemSetTimeoutZero", 0, function(e) {
        setTimeout(e, 0)
    }, "timeoutManager", 0, r])
}, 289780, e => {
    "use strict";
    let t, r, i, s, n, a;
    var o = e.i(899730).systemSetTimeoutZero,
        u = (t = [], r = 0, i = e => {
            e()
        }, s = e => {
            e()
        }, n = o, {
            batch: e => {
                let a;
                r++;
                try {
                    a = e()
                } finally {
                    let e;
                    --r || (e = t, t = [], e.length && n(() => {
                        s(() => {
                            e.forEach(e => {
                                i(e)
                            })
                        })
                    }))
                }
                return a
            },
            batchCalls: e => (...t) => {
                a(() => {
                    e(...t)
                })
            },
            schedule: a = e => {
                r ? t.push(e) : n(() => {
                    i(e)
                })
            },
            setNotifyFunction: e => {
                i = e
            },
            setBatchNotifyFunction: e => {
                s = e
            },
            setScheduler: e => {
                n = e
            }
        });
    e.s(["notifyManager", 0, u])
}, 122538, e => {
    "use strict";
    var t = e.i(899730),
        r = "u" < typeof window || "Deno" in globalThis;

    function i(e, t) {
        return (t ? .queryKeyHashFn || s)(e)
    }

    function s(e) {
        return JSON.stringify(e, (e, t) => c(t) ? Object.keys(t).sort().reduce((e, r) => (e[r] = t[r], e), {}) : t)
    }

    function n(e, t) {
        return e === t || typeof e == typeof t && !!e && !!t && "object" == typeof e && "object" == typeof t && Object.keys(t).every(r => n(e[r], t[r]))
    }
    var a = Object.prototype.hasOwnProperty;

    function o(e, t, r = 0) {
        if (e === t) return e;
        if (r > 500) return t;
        let i = u(e) && u(t);
        if (!i && !(c(e) && c(t))) return t;
        let s = (i ? e : Object.keys(e)).length,
            n = i ? t : Object.keys(t),
            l = n.length,
            d = i ? Array(l) : {},
            h = 0;
        for (let u = 0; u < l; u++) {
            let c = i ? u : n[u],
                l = e[c],
                p = t[c];
            if (l === p) {
                d[c] = l, (i ? u < s : a.call(e, c)) && h++;
                continue
            }
            if (null === l || null === p || "object" != typeof l || "object" != typeof p) {
                d[c] = p;
                continue
            }
            let f = o(l, p, r + 1);
            d[c] = f, f === l && h++
        }
        return s === l && h === s ? e : d
    }

    function u(e) {
        return Array.isArray(e) && e.length === Object.keys(e).length
    }

    function c(e) {
        if (!l(e)) return !1;
        let t = e.constructor;
        if (void 0 === t) return !0;
        let r = t.prototype;
        return !!l(r) && !!r.hasOwnProperty("isPrototypeOf") && Object.getPrototypeOf(e) === Object.prototype
    }

    function l(e) {
        return "[object Object]" === Object.prototype.toString.call(e)
    }
    var d = Symbol();
    e.s(["addConsumeAwareSignal", 0, function(e, t, r) {
        let i, s = !1;
        return Object.defineProperty(e, "signal", {
            enumerable: !0,
            get: () => (i ? ? = t(), s || (s = !0, i.aborted ? r() : i.addEventListener("abort", r, {
                once: !0
            })), i)
        }), e
    }, "addToEnd", 0, function(e, t, r = 0) {
        let i = [...e, t];
        return r && i.length > r ? i.slice(1) : i
    }, "addToStart", 0, function(e, t, r = 0) {
        let i = [t, ...e];
        return r && i.length > r ? i.slice(0, -1) : i
    }, "ensureQueryFn", 0, function(e, t) {
        return !e.queryFn && t ? .initialPromise ? () => t.initialPromise : e.queryFn && e.queryFn !== d ? e.queryFn : () => Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))
    }, "functionalUpdate", 0, function(e, t) {
        return "function" == typeof e ? e(t) : e
    }, "hashKey", 0, s, "hashQueryKeyByOptions", 0, i, "isServer", 0, r, "isValidTimeout", 0, function(e) {
        return "number" == typeof e && e >= 0 && e !== 1 / 0
    }, "keepPreviousData", 0, function(e) {
        return e
    }, "matchMutation", 0, function(e, t) {
        let {
            exact: r,
            status: i,
            predicate: a,
            mutationKey: o
        } = e;
        if (o) {
            if (!t.options.mutationKey) return !1;
            if (r) {
                if (s(t.options.mutationKey) !== s(o)) return !1
            } else if (!n(t.options.mutationKey, o)) return !1
        }
        return (!i || t.state.status === i) && (!a || !!a(t))
    }, "matchQuery", 0, function(e, t) {
        let {
            type: r = "all",
            exact: s,
            fetchStatus: a,
            predicate: o,
            queryKey: u,
            stale: c
        } = e;
        if (u) {
            if (s) {
                if (t.queryHash !== i(u, t.options)) return !1
            } else if (!n(t.queryKey, u)) return !1
        }
        if ("all" !== r) {
            let e = t.isActive();
            if ("active" === r && !e || "inactive" === r && e) return !1
        }
        return ("boolean" != typeof c || t.isStale() === c) && (!a || a === t.state.fetchStatus) && (!o || !!o(t))
    }, "noop", 0, function() {}, "partialMatchKey", 0, n, "replaceData", 0, function(e, t, r) {
        return "function" == typeof r.structuralSharing ? r.structuralSharing(e, t) : !1 !== r.structuralSharing ? o(e, t) : t
    }, "replaceEqualDeep", 0, o, "resolveQueryBoolean", 0, function(e, t) {
        return "function" == typeof e ? e(t) : e
    }, "resolveStaleTime", 0, function(e, t) {
        return "function" == typeof e ? e(t) : e
    }, "shallowEqualObjects", 0, function(e, t) {
        if (!t || Object.keys(e).length !== Object.keys(t).length) return !1;
        for (let r in e)
            if (e[r] !== t[r]) return !1;
        return !0
    }, "shouldThrowError", 0, function(e, t) {
        return "function" == typeof e ? e(...t) : !!e
    }, "skipToken", 0, d, "sleep", 0, function(e) {
        return new Promise(r => {
            t.timeoutManager.setTimeout(r, e)
        })
    }, "timeUntilStale", 0, function(e, t) {
        return Math.max(e + (t || 0) - Date.now(), 0)
    }])
}, 639843, e => {
    "use strict";
    let t;
    var r = e.i(122538),
        i = (t = () => r.isServer, {
            isServer: () => t(),
            setIsServer(e) {
                t = e
            }
        });
    e.s(["environmentManager", 0, i])
}, 698157, e => {
    "use strict";
    var t = e.i(899730),
        r = e.i(639843),
        i = e.i(122538),
        s = class {#
            r;
            destroy() {
                this.clearGcTimeout()
            }
            scheduleGc() {
                this.clearGcTimeout(), (0, i.isValidTimeout)(this.gcTime) && (this.#r = t.timeoutManager.setTimeout(() => {
                    this.optionalRemove()
                }, this.gcTime))
            }
            updateGcTime(e) {
                this.gcTime = Math.max(this.gcTime || 0, e ? ? (r.environmentManager.isServer() ? 1 / 0 : 3e5))
            }
            clearGcTimeout() {
                void 0 !== this.#r && (t.timeoutManager.clearTimeout(this.#r), this.#r = void 0)
            }
        };
    e.s(["Removable", 0, s])
}, 351117, 698576, e => {
    "use strict";
    var t = class {
        constructor() {
            this.listeners = new Set, this.subscribe = this.subscribe.bind(this)
        }
        subscribe(e) {
            return this.listeners.add(e), this.onSubscribe(), () => {
                this.listeners.delete(e), this.onUnsubscribe()
            }
        }
        hasListeners() {
            return this.listeners.size > 0
        }
        onSubscribe() {}
        onUnsubscribe() {}
    };
    e.s(["Subscribable", 0, t], 698576);
    var r = new class extends t {#
        i;#
        s;#
        n;
        constructor() {
            super(), this.#n = e => {
                if ("u" > typeof window && window.addEventListener) {
                    let t = () => e();
                    return window.addEventListener("visibilitychange", t, !1), () => {
                        window.removeEventListener("visibilitychange", t)
                    }
                }
            }
        }
        onSubscribe() {
            this.#s || this.setEventListener(this.#n)
        }
        onUnsubscribe() {
            this.hasListeners() || (this.#s ? .(), this.#s = void 0)
        }
        setEventListener(e) {
            this.#n = e, this.#s ? .(), this.#s = e(e => {
                "boolean" == typeof e ? this.setFocused(e) : this.onFocus()
            })
        }
        setFocused(e) {
            this.#i !== e && (this.#i = e, this.onFocus())
        }
        onFocus() {
            let e = this.isFocused();
            this.listeners.forEach(t => {
                t(e)
            })
        }
        isFocused() {
            return "boolean" == typeof this.#i ? this.#i : globalThis.document ? .visibilityState !== "hidden"
        }
    };
    e.s(["focusManager", 0, r], 351117)
}, 756013, 721570, 934518, e => {
    "use strict";
    var t = e.i(351117),
        r = e.i(698576),
        i = new class extends r.Subscribable {#
            a = !0;#
            s;#
            n;
            constructor() {
                super(), this.#n = e => {
                    if ("u" > typeof window && window.addEventListener) {
                        let t = () => e(!0),
                            r = () => e(!1);
                        return window.addEventListener("online", t, !1), window.addEventListener("offline", r, !1), () => {
                            window.removeEventListener("online", t), window.removeEventListener("offline", r)
                        }
                    }
                }
            }
            onSubscribe() {
                this.#s || this.setEventListener(this.#n)
            }
            onUnsubscribe() {
                this.hasListeners() || (this.#s ? .(), this.#s = void 0)
            }
            setEventListener(e) {
                this.#n = e, this.#s ? .(), this.#s = e(this.setOnline.bind(this))
            }
            setOnline(e) {
                this.#a !== e && (this.#a = e, this.listeners.forEach(t => {
                    t(e)
                }))
            }
            isOnline() {
                return this.#a
            }
        };
    e.s(["onlineManager", 0, i], 721570);
    var s = e.i(122538);

    function n() {
        let e, t, r = new Promise((r, i) => {
            e = r, t = i
        });

        function i(e) {
            Object.assign(r, e), delete r.resolve, delete r.reject
        }
        return r.status = "pending", r.catch(() => {}), r.resolve = t => {
            i({
                status: "fulfilled",
                value: t
            }), e(t)
        }, r.reject = e => {
            i({
                status: "rejected",
                reason: e
            }), t(e)
        }, r
    }
    e.s(["pendingThenable", 0, n, "tryResolveSync", 0, function(e) {
        let t;
        if (e.then(e => (t = e, e), s.noop) ? .catch(s.noop), void 0 !== t) return {
            data: t
        }
    }], 934518);
    var a = e.i(639843);

    function o(e) {
        return Math.min(1e3 * 2 ** e, 3e4)
    }

    function u(e) {
        return (e ? ? "online") !== "online" || i.isOnline()
    }
    var c = class extends Error {
        constructor(e) {
            super("CancelledError"), this.revert = e ? .revert, this.silent = e ? .silent
        }
    };
    e.s(["CancelledError", 0, c, "canFetch", 0, u, "createRetryer", 0, function(e) {
        let r, l = !1,
            d = 0,
            h = n(),
            p = () => t.focusManager.isFocused() && ("always" === e.networkMode || i.isOnline()) && e.canRun(),
            f = () => u(e.networkMode) && e.canRun(),
            m = e => {
                "pending" === h.status && (r ? .(), h.resolve(e))
            },
            y = e => {
                "pending" === h.status && (r ? .(), h.reject(e))
            },
            g = () => new Promise(t => {
                r = e => {
                    ("pending" !== h.status || p()) && t(e)
                }, e.onPause ? .()
            }).then(() => {
                r = void 0, "pending" === h.status && e.onContinue ? .()
            }),
            v = () => {
                let t;
                if ("pending" !== h.status) return;
                let r = 0 === d ? e.initialPromise : void 0;
                try {
                    t = r ? ? e.fn()
                } catch (e) {
                    t = Promise.reject(e)
                }
                Promise.resolve(t).then(m).catch(t => {
                    if ("pending" !== h.status) return;
                    let r = e.retry ? ? 3 * !a.environmentManager.isServer(),
                        i = e.retryDelay ? ? o,
                        n = "function" == typeof i ? i(d, t) : i,
                        u = !0 === r || "number" == typeof r && d < r || "function" == typeof r && r(d, t);
                    l || !u ? y(t) : (d++, e.onFail ? .(d, t), (0, s.sleep)(n).then(() => p() ? void 0 : g()).then(() => {
                        l ? y(t) : v()
                    }))
                })
            };
        return {
            promise: h,
            status: () => h.status,
            cancel: t => {
                if ("pending" === h.status) {
                    let r = new c(t);
                    y(r), e.onCancel ? .(r)
                }
            },
            continue: () => (r ? .(), h),
            cancelRetry: () => {
                l = !0
            },
            continueRetry: () => {
                l = !1
            },
            canStart: f,
            start: () => (f() ? v() : g().then(v), h)
        }
    }], 756013)
}, 660006, 507539, 113788, e => {
    "use strict";
    var t, r, i = e.i(249785),
        s = e.i(467371);
    e.i(284553);
    var n = e.i(416340);
    let a = () => {
            {
                let e = "7782a2759d58e6d90720c1dfc20a50fe4b77fa25",
                    t = `https://github.com/Polymarket/polymarket-next/commit/${e}`;
                return {
                    env: "production",
                    commitSha: e,
                    commitMsg: "feat(us): add /[code] marketing landing pages with SSG (#10118)\n\n* feat(us): add /[code] marketing landing pages with SSG\n\nAdds desktop marketing landing pages on polymarket.us:\n- / renders the FREE20 default offer (replaces the old waitlist page)\n- /[code] renders any active code (e.g. /oddsshark, /partner100) by\n  fetching its referral_referee_amount + qr_code_url from the Promos\n  Supabase at build time via `generateStaticParams` + `'use cache'`\n- /UPPERCASE redirects to /lowercase (canonical)\n- /unknown 404s\n\nApp Router patterns: async Server Components, `notFound()` /\n`redirect()` from next/navigation, `'use cache'` data layer with\n`cacheLife({ revalidate: 60, stale: 300 })` and `cacheTag` for\ninvalidation, `dynamicParams: true` so codes added post-deploy render\non first hit.\n\nProxy update: paths that are neither static nor app-route now\npass through to Next.js instead of being rewritten to `/`, so\n`/[code]` actually renders. Trading-app gating for `/sports`,\n`/portfolio`, etc. is preserved.\n\nQR is the S".replace(/\r?\n.*/s, ""),
                    commitUrl: t,
                    buildTimestamp: "2026-05-18T20:52:10.883Z"
                }
            }
        },
        o = () => {};
    e.s(["getBuildInfo", 0, a, "useBuildInfo", 0, () => {
        n.default.useEffect(o, [])
    }], 507539);
    var u = e.i(348320),
        c = e.i(53950),
        l = ((t = {}).MagicLinkMissing = "MLM", t);
    let d = "network error",
        h = "network request failed";
    e.s(["NETWORK_ERROR_MESSAGE", 0, d, "PolyError", () => l, "REQUEST_FAILED_MESSAGE", 0, h], 113788);
    let p = "ERROR_COUNT",
        f = e => null !== localStorage.getItem(e) ? Number(localStorage.getItem(e)) : 0;
    var m = ((r = {}).MISSION_CRITICAL = "MISSION CRITICAL", r);

    function y(e) {
        return e instanceof Error ? e : Error(String(e))
    }
    e.s(["BUG_CATEGORIES", () => m, "handleError", 0, (e, t, r = "nouser", n = "", o = {}) => {
        let l = y(e),
            m = a();
        try {
            if (401 === e.status || e.message ? .toLowerCase().includes(h) || e.message ? .toLowerCase().includes(d)) {
                let t, r = f(p);
                if (console.error("errors", e, r), r >= 5) return void console.error("max errors reached");
                t = f(p) + 1, localStorage.setItem(p, t.toString())
            }
            c.logger.error("Captured error", {
                error: e,
                tag: t,
                userAddress: r,
                severity: n
            }), (0, s.withScope)(s => {
                s.setTags({
                    userAddress: r,
                    severity: n,
                    scope: t
                }), s.setContext("build_info", m), (0, i.captureException)(e, {
                    extra: o
                })
            }), (0, u.captureGroundcoverException)(l, { ...o,
                buildInfo: m,
                tag: t,
                userAddress: r,
                severity: n
            })
        } catch (e) {
            c.logger.error("Exception in handleError", {
                error: e
            })
        }
    }, "handleGlobalError", 0, (e, t) => {
        let r = y(e),
            n = a();
        (0, s.withScope)(e => {
            e.setTags({
                scope: "global_error"
            }), e.setContext("build_info", n), (0, i.captureException)(r)
        }), (0, u.captureGroundcoverException)(r, {
            buildInfo: n,
            info: t
        }), c.logger.error("Global error captured", {
            error: r,
            info: t
        })
    }, "parseProfileError", 0, e => {
        try {
            if (422 === e.code) {
                let t = e.response ? ? e.cause ? .response,
                    r = t && "object" == typeof t && "error" in t ? String(t.error) : e.message ? ? "";
                if (r.includes("name already taken")) return "username_taken";
                if (r.toLowerCase().includes("referral code not found or inactive")) return "referral_invalid";
                return "username_unprocessable"
            }
            return "unknown"
        } catch {
            return "unknown"
        }
    }], 660006)
}, 189106, 96922, 796112, e => {
    "use strict";
    var t = e.i(351117),
        r = e.i(639843),
        i = e.i(289780);
    e.i(284553);
    var s = e.i(122538),
        n = e.i(756013),
        a = e.i(698157);

    function o(e) {
        return {
            onFetch: (t, r) => {
                let i = t.options,
                    n = t.fetchOptions ? .meta ? .fetchMore ? .direction,
                    a = t.state.data ? .pages || [],
                    o = t.state.data ? .pageParams || [],
                    l = {
                        pages: [],
                        pageParams: []
                    },
                    d = 0,
                    h = async () => {
                        let r = !1,
                            h = (0, s.ensureQueryFn)(t.options, t.fetchOptions),
                            p = async (e, i, n) => {
                                let a;
                                if (r) return Promise.reject(t.signal.reason);
                                if (null == i && e.pages.length) return Promise.resolve(e);
                                let o = (a = {
                                        client: t.client,
                                        queryKey: t.queryKey,
                                        pageParam: i,
                                        direction: n ? "backward" : "forward",
                                        meta: t.options.meta
                                    }, (0, s.addConsumeAwareSignal)(a, () => t.signal, () => r = !0), a),
                                    u = await h(o),
                                    {
                                        maxPages: c
                                    } = t.options,
                                    l = n ? s.addToStart : s.addToEnd;
                                return {
                                    pages: l(e.pages, u, c),
                                    pageParams: l(e.pageParams, i, c)
                                }
                            };
                        if (n && a.length) {
                            let e = "backward" === n,
                                t = {
                                    pages: a,
                                    pageParams: o
                                },
                                r = (e ? c : u)(i, t);
                            l = await p(t, r, e)
                        } else {
                            let t = e ? ? a.length;
                            do {
                                let e = 0 === d ? o[0] ? ? i.initialPageParam : u(i, l);
                                if (d > 0 && null == e) break;
                                l = await p(l, e), d++
                            } while (d < t)
                        }
                        return l
                    };
                t.options.persister ? t.fetchFn = () => t.options.persister ? .(h, {
                    client: t.client,
                    queryKey: t.queryKey,
                    meta: t.options.meta,
                    signal: t.signal
                }, r) : t.fetchFn = h
            }
        }
    }

    function u(e, {
        pages: t,
        pageParams: r
    }) {
        let i = t.length - 1;
        return t.length > 0 ? e.getNextPageParam(t[i], t, r[i], r) : void 0
    }

    function c(e, {
        pages: t,
        pageParams: r
    }) {
        return t.length > 0 ? e.getPreviousPageParam ? .(t[0], t, r[0], r) : void 0
    }
    e.s(["hasNextPage", 0, function(e, t) {
        return !!t && null != u(e, t)
    }, "hasPreviousPage", 0, function(e, t) {
        return !!t && !!e.getPreviousPageParam && null != c(e, t)
    }, "infiniteQueryBehavior", 0, o], 96922);
    var l = class extends a.Removable {#
        o;#
        u;#
        c;#
        l;#
        d;#
        h;#
        p;#
        f;
        constructor(e) {
            super(), this.#f = !1, this.#p = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#d = e.client, this.#l = this.#d.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#u = p(this.options), this.state = e.state ? ? this.#u, this.scheduleGc()
        }
        get meta() {
            return this.options.meta
        }
        get queryType() {
            return this.#o
        }
        get promise() {
            return this.#h ? .promise
        }
        setOptions(e) {
            if (this.options = { ...this.#p,
                    ...e
                }, e ? ._type && (this.#o = e._type), this.updateGcTime(this.options.gcTime), this.state && void 0 === this.state.data) {
                let e = p(this.options);
                void 0 !== e.data && (this.setState(h(e.data, e.dataUpdatedAt)), this.#u = e)
            }
        }
        optionalRemove() {
            this.observers.length || "idle" !== this.state.fetchStatus || this.#l.remove(this)
        }
        setData(e, t) {
            let r = (0, s.replaceData)(this.state.data, e, this.options);
            return this.#m({
                data: r,
                type: "success",
                dataUpdatedAt: t ? .updatedAt,
                manual: t ? .manual
            }), r
        }
        setState(e) {
            this.#m({
                type: "setState",
                state: e
            })
        }
        cancel(e) {
            let t = this.#h ? .promise;
            return this.#h ? .cancel(e), t ? t.then(s.noop).catch(s.noop) : Promise.resolve()
        }
        destroy() {
            super.destroy(), this.cancel({
                silent: !0
            })
        }
        get resetState() {
            return this.#u
        }
        reset() {
            this.destroy(), this.setState(this.resetState)
        }
        isActive() {
            return this.observers.some(e => !1 !== (0, s.resolveQueryBoolean)(e.options.enabled, this))
        }
        isDisabled() {
            return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === s.skipToken || !this.isFetched()
        }
        isFetched() {
            return this.state.dataUpdateCount + this.state.errorUpdateCount > 0
        }
        isStatic() {
            return this.getObserversCount() > 0 && this.observers.some(e => "static" === (0, s.resolveStaleTime)(e.options.staleTime, this))
        }
        isStale() {
            return this.getObserversCount() > 0 ? this.observers.some(e => e.getCurrentResult().isStale) : void 0 === this.state.data || this.state.isInvalidated
        }
        isStaleByTime(e = 0) {
            return void 0 === this.state.data || "static" !== e && (!!this.state.isInvalidated || !(0, s.timeUntilStale)(this.state.dataUpdatedAt, e))
        }
        onFocus() {
            let e = this.observers.find(e => e.shouldFetchOnWindowFocus());
            e ? .refetch({
                cancelRefetch: !1
            }), this.#h ? .continue()
        }
        onOnline() {
            let e = this.observers.find(e => e.shouldFetchOnReconnect());
            e ? .refetch({
                cancelRefetch: !1
            }), this.#h ? .continue()
        }
        addObserver(e) {
            this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), this.#l.notify({
                type: "observerAdded",
                query: this,
                observer: e
            }))
        }
        removeObserver(e) {
            this.observers.includes(e) && (this.observers = this.observers.filter(t => t !== e), this.observers.length || (this.#h && (this.#f || this.#y() ? this.#h.cancel({
                revert: !0
            }) : this.#h.cancelRetry()), this.scheduleGc()), this.#l.notify({
                type: "observerRemoved",
                query: this,
                observer: e
            }))
        }
        getObserversCount() {
            return this.observers.length
        }#
        y() {
            return "paused" === this.state.fetchStatus && "pending" === this.state.status
        }
        invalidate() {
            this.state.isInvalidated || this.#m({
                type: "invalidate"
            })
        }
        async fetch(e, t) {
            let r;
            if ("idle" !== this.state.fetchStatus && this.#h ? .status() !== "rejected") {
                if (void 0 !== this.state.data && t ? .cancelRefetch) this.cancel({
                    silent: !0
                });
                else if (this.#h) return this.#h.continueRetry(), this.#h.promise
            }
            if (e && this.setOptions(e), !this.options.queryFn) {
                let e = this.observers.find(e => e.options.queryFn);
                e && this.setOptions(e.options)
            }
            let i = new AbortController,
                a = e => {
                    Object.defineProperty(e, "signal", {
                        enumerable: !0,
                        get: () => (this.#f = !0, i.signal)
                    })
                },
                u = () => {
                    let e, r = (0, s.ensureQueryFn)(this.options, t),
                        i = (a(e = {
                            client: this.#d,
                            queryKey: this.queryKey,
                            meta: this.meta
                        }), e);
                    return (this.#f = !1, this.options.persister) ? this.options.persister(r, i, this) : r(i)
                },
                c = (a(r = {
                    fetchOptions: t,
                    options: this.options,
                    queryKey: this.queryKey,
                    client: this.#d,
                    state: this.state,
                    fetchFn: u
                }), r),
                l = "infinite" === this.#o ? o(this.options.pages) : this.options.behavior;
            l ? .onFetch(c, this), this.#c = this.state, ("idle" === this.state.fetchStatus || this.state.fetchMeta !== c.fetchOptions ? .meta) && this.#m({
                type: "fetch",
                meta: c.fetchOptions ? .meta
            }), this.#h = (0, n.createRetryer)({
                initialPromise: t ? .initialPromise,
                fn: c.fetchFn,
                onCancel: e => {
                    e instanceof n.CancelledError && e.revert && this.setState({ ...this.#c,
                        fetchStatus: "idle"
                    }), i.abort()
                },
                onFail: (e, t) => {
                    this.#m({
                        type: "failed",
                        failureCount: e,
                        error: t
                    })
                },
                onPause: () => {
                    this.#m({
                        type: "pause"
                    })
                },
                onContinue: () => {
                    this.#m({
                        type: "continue"
                    })
                },
                retry: c.options.retry,
                retryDelay: c.options.retryDelay,
                networkMode: c.options.networkMode,
                canRun: () => !0
            });
            try {
                let e = await this.#h.start();
                if (void 0 === e) throw Error(`${this.queryHash} data is undefined`);
                return this.setData(e), this.#l.config.onSuccess ? .(e, this), this.#l.config.onSettled ? .(e, this.state.error, this), e
            } catch (e) {
                if (e instanceof n.CancelledError) {
                    if (e.silent) return this.#h.promise;
                    else if (e.revert) {
                        if (void 0 === this.state.data) throw e;
                        return this.state.data
                    }
                }
                throw this.#m({
                    type: "error",
                    error: e
                }), this.#l.config.onError ? .(e, this), this.#l.config.onSettled ? .(this.state.data, e, this), e
            } finally {
                this.scheduleGc()
            }
        }#
        m(e) {
            let t = t => {
                switch (e.type) {
                    case "failed":
                        return { ...t,
                            fetchFailureCount: e.failureCount,
                            fetchFailureReason: e.error
                        };
                    case "pause":
                        return { ...t,
                            fetchStatus: "paused"
                        };
                    case "continue":
                        return { ...t,
                            fetchStatus: "fetching"
                        };
                    case "fetch":
                        return { ...t,
                            ...d(t.data, this.options),
                            fetchMeta: e.meta ? ? null
                        };
                    case "success":
                        let r = { ...t,
                            ...h(e.data, e.dataUpdatedAt),
                            dataUpdateCount: t.dataUpdateCount + 1,
                            ...!e.manual && {
                                fetchStatus: "idle",
                                fetchFailureCount: 0,
                                fetchFailureReason: null
                            }
                        };
                        return this.#c = e.manual ? r : void 0, r;
                    case "error":
                        let i = e.error;
                        return { ...t,
                            error: i,
                            errorUpdateCount: t.errorUpdateCount + 1,
                            errorUpdatedAt: Date.now(),
                            fetchFailureCount: t.fetchFailureCount + 1,
                            fetchFailureReason: i,
                            fetchStatus: "idle",
                            status: "error",
                            isInvalidated: !0
                        };
                    case "invalidate":
                        return { ...t,
                            isInvalidated: !0
                        };
                    case "setState":
                        return { ...t,
                            ...e.state
                        }
                }
            };
            this.state = t(this.state), i.notifyManager.batch(() => {
                this.observers.forEach(e => {
                    e.onQueryUpdate()
                }), this.#l.notify({
                    query: this,
                    type: "updated",
                    action: e
                })
            })
        }
    };

    function d(e, t) {
        return {
            fetchFailureCount: 0,
            fetchFailureReason: null,
            fetchStatus: (0, n.canFetch)(t.networkMode) ? "fetching" : "paused",
            ...void 0 === e && {
                error: null,
                status: "pending"
            }
        }
    }

    function h(e, t) {
        return {
            data: e,
            dataUpdatedAt: t ? ? Date.now(),
            error: null,
            isInvalidated: !1,
            status: "success"
        }
    }

    function p(e) {
        let t = "function" == typeof e.initialData ? e.initialData() : e.initialData,
            r = void 0 !== t,
            i = r ? "function" == typeof e.initialDataUpdatedAt ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
        return {
            data: t,
            dataUpdateCount: 0,
            dataUpdatedAt: r ? i ? ? Date.now() : 0,
            error: null,
            errorUpdateCount: 0,
            errorUpdatedAt: 0,
            fetchFailureCount: 0,
            fetchFailureReason: null,
            fetchMeta: null,
            isInvalidated: !1,
            status: r ? "success" : "pending",
            fetchStatus: "idle"
        }
    }
    e.s(["Query", 0, l, "fetchState", 0, d], 796112);
    var f = e.i(698576),
        m = e.i(934518),
        y = e.i(899730),
        g = class extends f.Subscribable {
            constructor(e, t) {
                super(), this.options = t, this.#d = e, this.#g = null, this.#v = (0, m.pendingThenable)(), this.bindMethods(), this.setOptions(t)
            }#
            d;#
            b = void 0;#
            E = void 0;#
            S = void 0;#
            _;#
            R;#
            v;#
            g;#
            C;#
            A;#
            T;#
            O;#
            D;#
            I;#
            F = new Set;
            bindMethods() {
                this.refetch = this.refetch.bind(this)
            }
            onSubscribe() {
                1 === this.listeners.size && (this.#b.addObserver(this), v(this.#b, this.options) ? this.#P() : this.updateResult(), this.#N())
            }
            onUnsubscribe() {
                this.hasListeners() || this.destroy()
            }
            shouldFetchOnReconnect() {
                return b(this.#b, this.options, this.options.refetchOnReconnect)
            }
            shouldFetchOnWindowFocus() {
                return b(this.#b, this.options, this.options.refetchOnWindowFocus)
            }
            destroy() {
                this.listeners = new Set, this.#L(), this.#w(), this.#b.removeObserver(this)
            }
            setOptions(e) {
                let t = this.options,
                    r = this.#b;
                if (this.options = this.#d.defaultQueryOptions(e), void 0 !== this.options.enabled && "boolean" != typeof this.options.enabled && "function" != typeof this.options.enabled && "boolean" != typeof(0, s.resolveQueryBoolean)(this.options.enabled, this.#b)) throw Error("Expected enabled to be a boolean or a callback that returns a boolean");
                this.#M(), this.#b.setOptions(this.options), t._defaulted && !(0, s.shallowEqualObjects)(this.options, t) && this.#d.getQueryCache().notify({
                    type: "observerOptionsUpdated",
                    query: this.#b,
                    observer: this
                });
                let i = this.hasListeners();
                i && E(this.#b, r, this.options, t) && this.#P(), this.updateResult(), i && (this.#b !== r || (0, s.resolveQueryBoolean)(this.options.enabled, this.#b) !== (0, s.resolveQueryBoolean)(t.enabled, this.#b) || (0, s.resolveStaleTime)(this.options.staleTime, this.#b) !== (0, s.resolveStaleTime)(t.staleTime, this.#b)) && this.#x();
                let n = this.#k();
                i && (this.#b !== r || (0, s.resolveQueryBoolean)(this.options.enabled, this.#b) !== (0, s.resolveQueryBoolean)(t.enabled, this.#b) || n !== this.#I) && this.#U(n)
            }
            getOptimisticResult(e) {
                var t, r;
                let i = this.#d.getQueryCache().build(this.#d, e),
                    n = this.createResult(i, e);
                return t = this, r = n, (0, s.shallowEqualObjects)(t.getCurrentResult(), r) || (this.#S = n, this.#R = this.options, this.#_ = this.#b.state), n
            }
            getCurrentResult() {
                return this.#S
            }
            trackResult(e, t) {
                return new Proxy(e, {
                    get: (e, r) => (this.trackProp(r), t ? .(r), "promise" === r && (this.trackProp("data"), this.options.experimental_prefetchInRender || "pending" !== this.#v.status || this.#v.reject(Error("experimental_prefetchInRender feature flag is not enabled"))), Reflect.get(e, r))
                })
            }
            trackProp(e) {
                this.#F.add(e)
            }
            getCurrentQuery() {
                return this.#b
            }
            refetch({ ...e
            } = {}) {
                return this.fetch({ ...e
                })
            }
            fetchOptimistic(e) {
                let t = this.#d.defaultQueryOptions(e),
                    r = this.#d.getQueryCache().build(this.#d, t);
                return r.fetch().then(() => this.createResult(r, t))
            }
            fetch(e) {
                return this.#P({ ...e,
                    cancelRefetch: e.cancelRefetch ? ? !0
                }).then(() => (this.updateResult(), this.#S))
            }#
            P(e) {
                this.#M();
                let t = this.#b.fetch(this.options, e);
                return e ? .throwOnError || (t = t.catch(s.noop)), t
            }#
            x() {
                this.#L();
                let e = (0, s.resolveStaleTime)(this.options.staleTime, this.#b);
                if (r.environmentManager.isServer() || this.#S.isStale || !(0, s.isValidTimeout)(e)) return;
                let t = (0, s.timeUntilStale)(this.#S.dataUpdatedAt, e);
                this.#O = y.timeoutManager.setTimeout(() => {
                    this.#S.isStale || this.updateResult()
                }, t + 1)
            }#
            k() {
                return ("function" == typeof this.options.refetchInterval ? this.options.refetchInterval(this.#b) : this.options.refetchInterval) ? ? !1
            }#
            U(e) {
                this.#w(), this.#I = e, !r.environmentManager.isServer() && !1 !== (0, s.resolveQueryBoolean)(this.options.enabled, this.#b) && (0, s.isValidTimeout)(this.#I) && 0 !== this.#I && (this.#D = y.timeoutManager.setInterval(() => {
                    (this.options.refetchIntervalInBackground || t.focusManager.isFocused()) && this.#P()
                }, this.#I))
            }#
            N() {
                this.#x(), this.#U(this.#k())
            }#
            L() {
                void 0 !== this.#O && (y.timeoutManager.clearTimeout(this.#O), this.#O = void 0)
            }#
            w() {
                void 0 !== this.#D && (y.timeoutManager.clearInterval(this.#D), this.#D = void 0)
            }
            createResult(e, t) {
                let r, i = this.#b,
                    n = this.options,
                    a = this.#S,
                    o = this.#_,
                    u = this.#R,
                    c = e !== i ? e.state : this.#E,
                    {
                        state: l
                    } = e,
                    h = { ...l
                    },
                    p = !1;
                if (t._optimisticResults) {
                    let r = this.hasListeners(),
                        s = !r && v(e, t),
                        a = r && E(e, i, t, n);
                    (s || a) && (h = { ...h,
                        ...d(l.data, e.options)
                    }), "isRestoring" === t._optimisticResults && (h.fetchStatus = "idle")
                }
                let {
                    error: f,
                    errorUpdatedAt: y,
                    status: g
                } = h;
                r = h.data;
                let b = !1;
                if (void 0 !== t.placeholderData && void 0 === r && "pending" === g) {
                    let e;
                    a ? .isPlaceholderData && t.placeholderData === u ? .placeholderData ? (e = a.data, b = !0) : e = "function" == typeof t.placeholderData ? t.placeholderData(this.#T ? .state.data, this.#T) : t.placeholderData, void 0 !== e && (g = "success", r = (0, s.replaceData)(a ? .data, e, t), p = !0)
                }
                if (t.select && void 0 !== r && !b)
                    if (a && r === o ? .data && t.select === this.#C) r = this.#A;
                    else try {
                        this.#C = t.select, r = t.select(r), r = (0, s.replaceData)(a ? .data, r, t), this.#A = r, this.#g = null
                    } catch (e) {
                        this.#g = e
                    }
                this.#g && (f = this.#g, r = this.#A, y = Date.now(), g = "error");
                let _ = "fetching" === h.fetchStatus,
                    R = "pending" === g,
                    C = "error" === g,
                    A = R && _,
                    T = void 0 !== r,
                    O = {
                        status: g,
                        fetchStatus: h.fetchStatus,
                        isPending: R,
                        isSuccess: "success" === g,
                        isError: C,
                        isInitialLoading: A,
                        isLoading: A,
                        data: r,
                        dataUpdatedAt: h.dataUpdatedAt,
                        error: f,
                        errorUpdatedAt: y,
                        failureCount: h.fetchFailureCount,
                        failureReason: h.fetchFailureReason,
                        errorUpdateCount: h.errorUpdateCount,
                        isFetched: e.isFetched(),
                        isFetchedAfterMount: h.dataUpdateCount > c.dataUpdateCount || h.errorUpdateCount > c.errorUpdateCount,
                        isFetching: _,
                        isRefetching: _ && !R,
                        isLoadingError: C && !T,
                        isPaused: "paused" === h.fetchStatus,
                        isPlaceholderData: p,
                        isRefetchError: C && T,
                        isStale: S(e, t),
                        refetch: this.refetch,
                        promise: this.#v,
                        isEnabled: !1 !== (0, s.resolveQueryBoolean)(t.enabled, e)
                    };
                if (this.options.experimental_prefetchInRender) {
                    let t = void 0 !== O.data,
                        r = "error" === O.status && !t,
                        s = e => {
                            r ? e.reject(O.error) : t && e.resolve(O.data)
                        },
                        n = () => {
                            s(this.#v = O.promise = (0, m.pendingThenable)())
                        },
                        a = this.#v;
                    switch (a.status) {
                        case "pending":
                            e.queryHash === i.queryHash && s(a);
                            break;
                        case "fulfilled":
                            (r || O.data !== a.value) && n();
                            break;
                        case "rejected":
                            r && O.error === a.reason || n()
                    }
                }
                return O
            }
            updateResult() {
                let e = this.#S,
                    t = this.createResult(this.#b, this.options);
                if (this.#_ = this.#b.state, this.#R = this.options, void 0 !== this.#_.data && (this.#T = this.#b), (0, s.shallowEqualObjects)(t, e)) return;
                this.#S = t;
                let r = () => {
                    if (!e) return !0;
                    let {
                        notifyOnChangeProps: t
                    } = this.options, r = "function" == typeof t ? t() : t;
                    if ("all" === r || !r && !this.#F.size) return !0;
                    let i = new Set(r ? ? this.#F);
                    return this.options.throwOnError && i.add("error"), Object.keys(this.#S).some(t => this.#S[t] !== e[t] && i.has(t))
                };
                this.#B({
                    listeners: r()
                })
            }#
            M() {
                let e = this.#d.getQueryCache().build(this.#d, this.options);
                if (e === this.#b) return;
                let t = this.#b;
                this.#b = e, this.#E = e.state, this.hasListeners() && (t ? .removeObserver(this), e.addObserver(this))
            }
            onQueryUpdate() {
                this.updateResult(), this.hasListeners() && this.#N()
            }#
            B(e) {
                i.notifyManager.batch(() => {
                    e.listeners && this.listeners.forEach(e => {
                        e(this.#S)
                    }), this.#d.getQueryCache().notify({
                        query: this.#b,
                        type: "observerResultsUpdated"
                    })
                })
            }
        };

    function v(e, t) {
        return !1 !== (0, s.resolveQueryBoolean)(t.enabled, e) && void 0 === e.state.data && ("error" !== e.state.status || !1 !== (0, s.resolveQueryBoolean)(t.retryOnMount, e)) || void 0 !== e.state.data && b(e, t, t.refetchOnMount)
    }

    function b(e, t, r) {
        if (!1 !== (0, s.resolveQueryBoolean)(t.enabled, e) && "static" !== (0, s.resolveStaleTime)(t.staleTime, e)) {
            let i = "function" == typeof r ? r(e) : r;
            return "always" === i || !1 !== i && S(e, t)
        }
        return !1
    }

    function E(e, t, r, i) {
        return (e !== t || !1 === (0, s.resolveQueryBoolean)(i.enabled, e)) && (!r.suspense || "error" !== e.state.status) && S(e, r)
    }

    function S(e, t) {
        return !1 !== (0, s.resolveQueryBoolean)(t.enabled, e) && e.isStaleByTime((0, s.resolveStaleTime)(t.staleTime, e))
    }
    e.s(["QueryObserver", 0, g], 189106)
}, 6756, 224851, 487498, 254938, 787370, e => {
    "use strict";
    let t;
    e.i(284553);
    var r = e.i(416340),
        i = e.i(639843),
        s = e.i(122538),
        n = e.i(289780),
        a = e.i(318594);
    e.i(221628);
    var o = r.createContext((t = !1, {
            clearReset: () => {
                t = !1
            },
            reset: () => {
                t = !0
            },
            isReset: () => t
        })),
        u = () => r.useContext(o);
    e.s(["useQueryErrorResetBoundary", 0, u], 224851);
    var c = (e, t, r) => {
            let i = r ? .state.error && "function" == typeof e.throwOnError ? (0, s.shouldThrowError)(e.throwOnError, [r.state.error, r]) : e.throwOnError;
            (e.suspense || e.experimental_prefetchInRender || i) && !t.isReset() && (e.retryOnMount = !1)
        },
        l = e => {
            r.useEffect(() => {
                e.clearReset()
            }, [e])
        },
        d = ({
            result: e,
            errorResetBoundary: t,
            throwOnError: r,
            query: i,
            suspense: n
        }) => e.isError && !t.isReset() && !e.isFetching && i && (n && void 0 === e.data || (0, s.shouldThrowError)(r, [e.error, i]));
    e.s(["ensurePreventErrorBoundaryRetry", 0, c, "getHasError", 0, d, "useClearResetErrorBoundary", 0, l], 487498);
    var h = r.createContext(!1),
        p = () => r.useContext(h),
        f = h.Provider;
    e.s(["IsRestoringProvider", 0, f, "useIsRestoring", 0, p], 254938);
    var m = e => {
            if (e.suspense) {
                let t = e => "static" === e ? e : Math.max(e ? ? 1e3, 1e3),
                    r = e.staleTime;
                e.staleTime = "function" == typeof r ? (...e) => t(r(...e)) : t(r), "number" == typeof e.gcTime && (e.gcTime = Math.max(e.gcTime, 1e3))
            }
        },
        y = (e, t) => e.isLoading && e.isFetching && !t,
        g = (e, t) => e ? .suspense && t.isPending,
        v = (e, t, r) => t.fetchOptimistic(e).catch(() => {
            r.clearReset()
        });
    e.s(["ensureSuspenseTimers", 0, m, "fetchOptimistic", 0, v, "shouldSuspend", 0, g, "willFetch", 0, y], 787370), e.s(["useBaseQuery", 0, function(e, t, o) {
        let h = p(),
            f = u(),
            b = (0, a.useQueryClient)(o),
            E = b.defaultQueryOptions(e);
        b.getDefaultOptions().queries ? ._experimental_beforeQuery ? .(E);
        let S = b.getQueryCache().get(E.queryHash);
        E._optimisticResults = h ? "isRestoring" : "optimistic", m(E), c(E, f, S), l(f);
        let _ = !b.getQueryCache().get(E.queryHash),
            [R] = r.useState(() => new t(b, E)),
            C = R.getOptimisticResult(E),
            A = !h && !1 !== e.subscribed;
        if (r.useSyncExternalStore(r.useCallback(e => {
                let t = A ? R.subscribe(n.notifyManager.batchCalls(e)) : s.noop;
                return R.updateResult(), t
            }, [R, A]), () => R.getCurrentResult(), () => R.getCurrentResult()), r.useEffect(() => {
                R.setOptions(E)
            }, [E, R]), g(E, C)) throw v(E, R, f);
        if (d({
                result: C,
                errorResetBoundary: f,
                throwOnError: E.throwOnError,
                query: S,
                suspense: E.suspense
            })) throw C.error;
        if (b.getDefaultOptions().queries ? ._experimental_afterQuery ? .(E, C), E.experimental_prefetchInRender && !i.environmentManager.isServer() && y(C, h)) {
            let e = _ ? v(E, R, f) : S ? .promise;
            e ? .catch(s.noop).finally(() => {
                R.updateResult()
            })
        }
        return E.notifyOnChangeProps ? C : R.trackResult(C)
    }], 6756)
}, 964974, e => {
    "use strict";
    var t = e.i(189106),
        r = e.i(6756);
    e.s(["useQuery", 0, function(e, i) {
        return (0, r.useBaseQuery)(e, t.QueryObserver, i)
    }])
}]);

//# debugId=3e0e12f5-3003-20cd-b70a-d81549694831