1;!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]="8cb56ce3-aef8-ab24-30bd-506ca4c450d0")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,807939,e=>{"use strict";var t=e.i(271645);let n=t.createContext(void 0),r=t.createContext(!1);function i(e,t){return e||(t&&"u">typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=n),window.ReactQueryClientContext):n)}e.s(["QueryClientProvider",0,({client:e,children:n,context:a,contextSharing:o=!1})=>{t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);let s=i(a,o);return t.createElement(r.Provider,{value:!a&&o},t.createElement(s.Provider,{value:e},n))},"useQueryClient",0,({context:e}={})=>{let n=t.useContext(i(e,t.useContext(r)));if(!n)throw Error("No QueryClient set, use QueryClientProvider to set one");return n}])},304868,e=>{"use strict";var t,n=((t={}).GRAPHQL_ME="graphql/me",t.GRAPHQL_QUERY_ME="graphql/query/me",t.GRAPHQL_QUERY_USER_UI_SETTINGS="graphql/query/userUISettings",t.GRAPHQL_INTERNAL_SURVEY="graphql/internalSurvey",t.GRAPHQL_SURVEYS_FOR_PROVIDER="graphql/surveysForProvider",t.GRAPHQL_INTERNAL_SURVEY_QUESTION="graphql/internalSurveyQuestion",t.GRAPHQL_SURVEYS="graphql/surveys",t.GRAPHQL_SURVEYS_LIVE_STATS="graphql/surveysLiveStats",t.GRAPHQL_SURVEY_DISQUALIFICATION_WHEEL="graphql/surveyDisqualificationWheel",t.GRAPHQL_SURVEY_USER_STATE="graphql/surveyUserState",t.GRAPHQL_SURVEY_COUNTRY_STATS="graphql/getSurveyCountryStats",t.GRAPHQL_SURVEY_FIRST_BONUS="graphql/surveyFirstBonus",t.GRAPHQL_SURVEY_STREAK_SETTINGS="graphql/surveyStreakSettings",t.GRAPHQL_JACKPOT_IS_ACTIVE="graphql/jackpotIsEventActive",t.GRAPHQL_JACKPOT_GET_ACTIVE_JACKPOTS="graphql/activeJackpots",t.GRAPHQL_JACKPOT_GET_JACKPOT_CONFIG="graphql/jackpotConfig",t.GRAPHQL_JACKPOT_GET_JACKPOT_WINNERS="graphql/jackpotWinners",t.GRAPHQL_JACKPOT_GET_TOTAL_WON="graphql/jackpotTotalWon",t.GRAPHQL_JACKPOT_GET_MY_BETS="graphql/jackpotMyBets",t.GRAPHQL_JACKPOT_GET_MY_WINS="graphql/jackpotMyWins",t.GRAPHQL_JACKPOT_GET_SLOTS="graphql/jackpotSlots",t.GRAPHQL_JACKPOT_GET_SLOT_ELEMENTS="graphql/jackpotSlotElements",t.REST_JACKPOT_GET_USER_BETS="rest/jackpotUserBets",t.REST_JACKPOT_GET_USER_BETS_INFO="rest/jackpotUserBetsInfo",t.GRAPHQL_GET_PENDING_OFFERS="graphql/pendingOffers",t.GRAPHQL_GET_OFFER_TASKS="graphql/getOfferTasks",t.GRAPHQL_GET_USER_WITHDRAWABLE_NOW_BALANCE="graphql/withdrawableNowBalance",t.GRAPHQL_GET_USER_REWARDS="graphql/userRewards",t.GRAPHQL_GET_REF_EARNINGS="graphql/refEarnings",t.GRAPHQL_GET_AFFILIATES="graphql/getAffiliates",t.GRAPHQL_GET_AFFILIATE_LEADERS="graphql/getAffiliateLeaders",t.GRAPHQL_GET_TOTAL_REFEARNINGS="graphql/getTotalRefEarnings",t.GRAPHQL_GET_AFFILIATE_INFO="graphql/affiliateInfo",t.GRAPHQL_GET_AFFILIATE_VERIFICATION_RESULT="graphql/affiliateVerificationResult",t.GRAPHQL_GET_CASHOUT_GOAL_SETTINGS="graphql/cashoutGoalSettings",t.GRAPHQL_GET_OFFER_DATA="graphql/offerData",t.GRAPHQL_GET_SURVEYS_IN_PROGRESS="graphql/surveysInProgress",t.GRAPHQL_HAS_SURVEYS_IN_PROGRESS="graphql/hasSurveysInProgress",t.GRAPHQL_GET_OFFERS_STARTED="graphql/getOffersStarted",t.GRAPHQL_GET_MY_OFFERS="graphql/getMyOffers",t.GRAPHQL_GET_OFFER_COMPLETED="graphql/getOffersCompleted",t.GRAPHQL_GET_REWARD_DATA="graphql/rewardData",t.GRAPHQL_GET_PROVIDERS="graphql/getProviders",t.GRAPHQL_GET_WITHDRAWALS="graphql/getWithdrawals",t.GRAPHQL_GET_USER_STAKE_WITHDRAWAL_PREFERENCES="graphql/getUserStakeWithdrawalPreferences",t.GRAPHQL_UPDATE_STAKE_PREFERENCE="graphql/updateStakePreference",t.GRAPHQL_SLOT_GET_TOP_7D_WINNERS="graphql/slotTop7dWinners",t.GRAPHQL_SLOT_GET_QUESTS_STEP_CLAIMS_TOTAL_REWARD="graphql/setQuestStepClaimsTotalReward",t.GRAPHQL_SLOT_GET_QUESTS="graphql/setQuests",t.GRAPHQL_SLOT_SLOT_GET_ELIGIBLE_OFFERS="graphql/slotEligibleOffers",t.GRAPHQL_SLOT_SLOT_SPIN="graphql/slotSpin",t.GRAPHQL_SLOT_SLOT_CLAIM_QUEST_STEP_COIN_REWARD="graphql/slotClaimQuestStepCoinReward",t.GRAPHQL_SLOT_SLOT_CLAIM_QUEST_STEP_STAKE_REWARD="graphql/slotClaimQuestStepStakeReward",t.GRAPHQL_SLOT_SLOT_GET_BALANCE="graphql/slotGetBalance",t.GRAPHQL_SLOT_SLOT_GET_WEEK_TOP_QUESTS_STEP_CLAIMS="graphql/slotGetWeekTopQuestsStepClaims",t.SOCKET_GET_USER_INFO="socket/getUserInfo",t.SOCKET_GET_FREE_CASE="socket/getFreeCase",t.GRAPHQL_GET_WALLS_FOR_USER="graphql/getWallsForUser",t.SOCKET_GET_USER_CURRENCY="socket/getUserCurrency",t.GRAPHQL_GET_LEADERBOARD_INFO="graphql/getLeaderboardInfo",t.GRAPHQL_GET_LEADERBOARD_ITEMS="graphql/getLeaderboardItems",t.GRAPHQL_GET_LEADERBOARD_RANK="graphql/getLeaderboardRank",t.SOCKET_GET_OFFER_BY_ID="socket/getOfferById",t.GRAPHQL_GET_NOTIFICATIONS_INFO="graphql/getNotificationsInfo",t.GRAPHQL_GET_NOTIFICATIONS="graphql/getNotifications",t.GRAPHQL_GET_AVAILABLE_MOTIVATORS="graphql/getAvailableMotivators",t.GRAPHQL_GET_CLAIMABLE_MOTIVATORS="graphql/getClaimableMotivators",t.SOCKET_GET_CATEGORIES_COUNT="socket/getCategoriesCount",t.SOCKET_GET_FEATURED_OFFERS="socket/getFeaturedOffers",t.SOCKET_GET_CUSTOM_OFFERS_V2="socket/getCustomOffersV2",t.SOCKET_REQUEST_TP_INVITATION_LINK="socket/requestTpInvitationLink",t.SOCKET_GET_LITE_MODE_OFFERS="socket/getLiteModeOffers",t.GRAPHQL_GET_SEEN_IAP_POPUPS="graphql/getSeenIapPopups",t.GRAPHQL_GET_USER_LAST_CLICK_ID="graphql/lastClickId",t.GRAPHQL_GET_OFFER_BUNDLES="graphql/getAllOfferBundles",t.GRAPHQL_GET_UNCLAIMED_OFFER_BUNDLE_REWARDS="graphql/getUnclaimedOfferBundles",t.GRAPHQL_GET_DAILY_OFFER_TASKS="graphql/getDailyOfferTasks",t.GRAPHQL_GET_CHARGEBACKS="graphql/getChargebacks",t.GRAPHQL_HAS_CHARGEBACKS="graphql/hasChargebacks",t.GRAPHQL_GET_CLICKED_AND_NOT_IN_PROGRESS_OFFERS="graphql/getClickedAndNotInProgressOffers",t.GRAPHQL_GET_OFFERS_IN_PROGRESS="graphql/getOffersInProgress",t.GRAPHQL_GET_SUPPORT_TICKETS="graphql/getSupportTickets",t.GRAPHQL_GET_HAS_SUPPORT_TICKETS="graphql/getHasSupportTickets",t.GRAPHQL_GET_GAME_BOOST="graphql/getGameBoost",t.GRAPHQL_GET_RECOMMENDED_OFFERS="graphql/getRecommendedOffers",t.GRAPHQL_SET_PRIVATE_STATUS="graphql/setPrivateStatus",t.GRAPHQL_CHANGE_PROMOTIONAL_EMAILS="graphql/changePromotionalEmails",t.GRAPHQL_CHANGE_EMAIL="graphql/changeEmail",t.REST_CHANGE_USERNAME="rest/ch
2angeUsername",t.REST_RESEND_VERIFICATION_EMAIL="rest/resendVerificationEmail",t.GRAPHQL_QUERY_ME_MY_PROFILE="graphql/query/me/myProfile",t.GRAPHQL_GET_OFFER_BY_ID="graphql/getOfferById",t.GRAPHQL_GET_OFFER_CLICK_STATS="graphql/getOfferClickStats",t.GRAPHQL_GET_OFFER_LEADERBOARD="graphql/getOfferLeaderboard",t.GRAPHQL_GET_USER_OFFER_LEADERBOARD_RANK="graphql/getUserOfferLeaderboardRank",t.GRAPHQL_GET_LITE_OFFERS="graphql/getLiteOffers",t.GRAPHQL_GET_EXCHANGE_RATES="graphql/getExchangeRatesAndFee",t.GET_SURVEYS_COUNTRY_STATS="graphql/getSurveysCountryStats",t.GET_LINK_ACCOUNT="graphql/getLinkAccount",t);e.s(["QueryKeys",()=>n])},158081,e=>{"use strict";var t,n,r=((t={}).Ad="AD",t.Ae="AE",t.Af="AF",t.Ag="AG",t.Ai="AI",t.Al="AL",t.All="ALL",t.Am="AM",t.An="AN",t.Ao="AO",t.Aq="AQ",t.Ar="AR",t.As="AS",t.At="AT",t.Au="AU",t.Aw="AW",t.Ax="AX",t.Az="AZ",t.Ba="BA",t.Bb="BB",t.Bd="BD",t.Be="BE",t.Bf="BF",t.Bg="BG",t.Bh="BH",t.Bi="BI",t.Bj="BJ",t.Bl="BL",t.Bm="BM",t.Bn="BN",t.Bo="BO",t.Bq="BQ",t.Br="BR",t.Bs="BS",t.Bt="BT",t.Bv="BV",t.Bw="BW",t.By="BY",t.Bz="BZ",t.Ca="CA",t.Cc="CC",t.Cd="CD",t.Cf="CF",t.Cg="CG",t.Ch="CH",t.Ci="CI",t.Ck="CK",t.Cl="CL",t.Cm="CM",t.Cn="CN",t.Co="CO",t.Cr="CR",t.Cs="CS",t.Cu="CU",t.Cv="CV",t.Cw="CW",t.Cx="CX",t.Cy="CY",t.Cz="CZ",t.De="DE",t.Dj="DJ",t.Dk="DK",t.Dm="DM",t.Do="DO",t.Dz="DZ",t.Ec="EC",t.Ee="EE",t.Eg="EG",t.Eh="EH",t.Er="ER",t.Es="ES",t.Et="ET",t.Eu="EU",t.Fi="FI",t.Fj="FJ",t.Fk="FK",t.Fm="FM",t.Fo="FO",t.Fr="FR",t.Ga="GA",t.Gb="GB",t.Gd="GD",t.Ge="GE",t.Gf="GF",t.Gg="GG",t.Gh="GH",t.Gi="GI",t.Gl="GL",t.Gm="GM",t.Gn="GN",t.Gp="GP",t.Gq="GQ",t.Gr="GR",t.Gs="GS",t.Gt="GT",t.Gu="GU",t.Gw="GW",t.Gy="GY",t.Hk="HK",t.Hm="HM",t.Hn="HN",t.Hr="HR",t.Ht="HT",t.Hu="HU",t.Id="ID",t.Ie="IE",t.Il="IL",t.Im="IM",t.In="IN",t.Io="IO",t.Iq="IQ",t.Ir="IR",t.Is="IS",t.It="IT",t.Je="JE",t.Jm="JM",t.Jo="JO",t.Jp="JP",t.Ke="KE",t.Kg="KG",t.Kh="KH",t.Ki="KI",t.Km="KM",t.Kn="KN",t.Kp="KP",t.Kr="KR",t.Kw="KW",t.Ky="KY",t.Kz="KZ",t.La="LA",t.Lb="LB",t.Lc="LC",t.Li="LI",t.Lk="LK",t.Lr="LR",t.Ls="LS",t.Lt="LT",t.Lu="LU",t.Lv="LV",t.Ly="LY",t.Ma="MA",t.Mc="MC",t.Md="MD",t.Me="ME",t.Mf="MF",t.Mg="MG",t.Mh="MH",t.Mk="MK",t.Ml="ML",t.Mm="MM",t.Mn="MN",t.Mo="MO",t.Mp="MP",t.Mq="MQ",t.Mr="MR",t.Ms="MS",t.Mt="MT",t.Mu="MU",t.Mv="MV",t.Mw="MW",t.Mx="MX",t.My="MY",t.Mz="MZ",t.Na="NA",t.Nc="NC",t.Ne="NE",t.Nf="NF",t.Ng="NG",t.Ni="NI",t.Nl="NL",t.No="NO",t.Np="NP",t.Nr="NR",t.Nu="NU",t.Nz="NZ",t.Om="OM",t.Pa="PA",t.Pe="PE",t.Pf="PF",t.Pg="PG",t.Ph="PH",t.Pk="PK",t.Pl="PL",t.Pm="PM",t.Pn="PN",t.Pr="PR",t.Ps="PS",t.Pt="PT",t.Pw="PW",t.Py="PY",t.Qa="QA",t.Re="RE",t.Ro="RO",t.Rs="RS",t.Ru="RU",t.Rw="RW",t.Sa="SA",t.Sb="SB",t.Sc="SC",t.Sd="SD",t.Se="SE",t.Sg="SG",t.Sh="SH",t.Si="SI",t.Sj="SJ",t.Sk="SK",t.Sl="SL",t.Sm="SM",t.Sn="SN",t.So="SO",t.Sr="SR",t.Ss="SS",t.St="ST",t.Sv="SV",t.Sx="SX",t.Sy="SY",t.Sz="SZ",t.Tc="TC",t.Td="TD",t.Tf="TF",t.Tg="TG",t.Th="TH",t.Tj="TJ",t.Tk="TK",t.Tl="TL",t.Tm="TM",t.Tn="TN",t.To="TO",t.Tr="TR",t.Tt="TT",t.Tv="TV",t.Tw="TW",t.Tz="TZ",t.Ua="UA",t.Ug="UG",t.Um="UM",t.Us="US",t.Uy="UY",t.Uz="UZ",t.Va="VA",t.Vc="VC",t.Ve="VE",t.Vg="VG",t.Vi="VI",t.Vn="VN",t.Vu="VU",t.Wf="WF",t.Ws="WS",t.Xk="XK",t.Xx="XX",t.Ye="YE",t.Yt="YT",t.Za="ZA",t.Zm="ZM",t.Zw="ZW",t),i=((n={}).Daily="DAILY",n.Monthly="MONTHLY",n);let a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getLeaderboardItems"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"period"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"LeaderboardPeriod"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"source"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"LeaderboardSource"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"page"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"leaderboardItems"},arguments:[{kind:"Argument",name:{kind:"Name",value:"period"},value:{kind:"Variable",name:{kind:"Name",value:"period"}}},{kind:"Argument",name:{kind:"Name",value:"source"},value:{kind:"Variable",name:{kind:"Name",value:"source"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}
2},{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"Variable",name:{kind:"Name",value:"page"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"rank"}},{kind:"Field",name:{kind:"Name",value:"reward"}},{kind:"Field",name:{kind:"Name",value:"score"}},{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatar"}},{kind:"Field",name:{kind:"Name",value:"gainId"}},{kind:"Field",name:{kind:"Name",value:"username"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"meta"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"}},{kind:"Field",name:{kind:"Name",value:"itemsCount"}},{kind:"Field",name:{kind:"Name",value:"itemsPerPage"}},{kind:"Field",name:{kind:"Name",value:"totalItemsCount"}},{kind:"Field",name:{kind:"Name",value:"totalPages"}}]}}]}}]}}]},o={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getLeaderboardInfo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"source"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"LeaderboardSource"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"dailyLeaderboardInfo"},name:{kind:"Name",value:"leaderboardInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"period"},value:{kind:"EnumValue",value:"DAILY"}},{kind:"Argument",name:{kind:"Name",value:"source"},value:{kind:"Variable",name:{kind:"Name",value:"source"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"endDate"}},{kind:"Field",name:{kind:"Name",value:"reward"}}]}},{kind:"Field",alias:{kind:"Name",value:"monthlyLeaderboardInfo"},name:{kind:"Name",value:"leaderboardInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"period"},value:{kind:"EnumValue",value:"MONTHLY"}},{kind:"Argument",name:{kind:"Name",value:"source"},value:{kind:"Variable",name:{kind:"Name",value:"source"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"endDate"}},{kind:"Field",name:{kind:"Name",value:"reward"}}]}}]}}]},s={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getSelfRanking"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"period"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"LeaderboardPeriod"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"source"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"LeaderboardSource"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"leaderboardRank"},arguments:[{kind:"Argument",name:{kind:"Name",value:"period"},value:{kind:"Variable",name:{kind:"Name",value:"period"}}},{kind:"Argument",name:{kind:"Name",value:"source"},value:{kind:"Variable",name:{kind:"Name",value:"source"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"rank"}},{kind:"Field",name:{kind:"Name",value:"score"}},{kind:"Field",name:{kind:"Name",value:"reward"}},{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"gainId"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"avatar"}}]}}]}}]}}]},l={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getCurrentUserInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatar"}},{kind:"Field",name:{kind:"Name",value:"balance"}},{kind:"Field",name:{kind:"Name",value:"datejoined"}},{kind:"Field",name:{kind:"Name",value:"deleted"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"emailConfirmed"}},{kind:"Field",name:{kind:"Name",value:"signupCountry"}},{kind:"Field",name:{kind:"Name",value:"gainId"}},{kind:"Field",name:{kind:"Name",value:"private"}},{kind:"Field",name:{kind:"Name",value:"refcode"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"totalWithdrawn"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"unwithdrawableBalance"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"verified"}},{kind:"Field",name:{kind:"Name",value:"xp"}},{kind:"Field",name:{kind:"Name",value:"userClass"}},{kind:"Field",name:{kind:"Name",value:"uiMode"}},{kind:"Field",name:{kind:"Name",value:"lastseen"}},{kind:"Field",name:{kind:"Name",value:"completedLiteModeAt"}},{kind:"Field",name:{kind:"Name",value:"uiSettings"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"state"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"onboarded"}},{kind:"Field",name:{kind:"Name",value:"skippedAgeGender"}},{kind:"Field",name:{kind:"Name",value:"shownWelcomeModals"}},{kind:"Field",name:{kind:"Name",value:"buttonInteractions"}},{kind:"Field",name:{kind:"Name",value:"unlockedAdvancedLiteMode"}},{kind:"Field",name:{kind:"Name",value:"lastViewedNpsPopup"}}]}}]}}]}}]}}]},u={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getSignupSourceInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"signupSource"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"referrerRefcode"}},{kind:"Field",name:{kind:"Name",value:"campaignName"}}
2,{kind:"Field",name:{kind:"Name",value:"campaignProvider"}},{kind:"Field",name:{kind:"Name",value:"dateJoined"}}]}}]}}]}}]},c={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getUserAmplitudeFlags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getUserAmplitudeFlags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}},{kind:"Field",name:{kind:"Name",value:"payload"}}]}}]}}]},d={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"onNewRequest"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ref"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"utmSource"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"utmMedium"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}
2,{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"utmCampaign"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"utmContent"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"utmTerm"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"creative"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"adGroup"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"clickId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"irclickid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}
2,{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sub1"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sub2"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sub3"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sub4"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"app"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"gclid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"fbclid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"_ly_c"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}
2,{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"rdtCid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"qclid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ScCid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"msclkid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"yclid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offer"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"adId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"gaId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}
2,{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"gbraid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"wbraid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"refOfferId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"twclid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"aff_sub"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"awc"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ttclid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}
2,{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"epik"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"lo_3ptt"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"oppref"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"rd"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dateISO"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"idfa"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"idfv"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"asid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}
2,{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"afid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"jcc"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"onNewRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ref"},value:{kind:"Variable",name:{kind:"Name",value:"ref"}}},{kind:"Argument",name:{kind:"Name",value:"utmSource"},value:{kind:"Variable",name:{kind:"Name",value:"utmSource"}}},{kind:"Argument",name:{kind:"Name",value:"utmMedium"},value:{kind:"Variable",name:{kind:"Name",value:"utmMedium"}}},{kind:"Argument",name:{kind:"Name",value:"utmCampaign"},value:{kind:"Variable",name:{kind:"Name",value:"utmCampaign"}}},{kind:"Argument",name:{kind:"Name",value:"utmContent"},value:{kind:"Variable",name:{kind:"Name",value:"utmContent"}}},{kind:"Argument",name:{kind:"Name",value:"utmTerm"},value:{kind:"Variable",name:{kind:"Name",value:"utmTerm"}}},{kind:"Argument",name:{kind:"Name",value:"creative"},value:{kind:"Variable",name:{kind:"Name",value:"creative"}}},{kind:"Argument",name:{kind:"Name",value:"adGroup"},value:{kind:"Variable",name:{kind:"Name",value:"adGroup"}}},{kind:"Argument",name:{kind:"Name",value:"clickId"},value:{kind:"Variable",name:{kind:"Name",value:"clickId"}}},{kind:"Argument",name:{kind:"Name",value:"irclickid"},value:{kind:"Variable",name:{kind:"Name",value:"irclickid"}}},{kind:"Argument",name:{kind:"Name",value:"sub1"},value:{kind:"Variable",name:{kind:"Name",value:"sub1"}}},{kind:"Argument",name:{kind:"Name",value:"sub2"},value:{kind:"Variable",name:{kind:"Name",value:"sub2"}}},{kind:"Argument",name:{kind:"Name",value:"sub3"},value:{kind:"Variable",name:{kind:"Name",value:"sub3"}}},{kind:"Argument",name:{kind:"Name",value:"sub4"},value:{kind:"Variable",name:{kind:"Name",value:"sub4"}}},{kind:"Argument",name:{kind:"Name",value:"app"},value:{kind:"Variable",name:{kind:"Name",value:"app"}}},{kind:"Argument",name:{kind:"Name",value:"fbclid"},value:{kind:"Variable",name:{kind:"Name",value:"fbclid"}}},{kind:"Argument",name:{kind:"Name",value:"_ly_c"},value:{kind:"Variable",name:{kind:"Name",value:"_ly_c"}}},{kind:"Argument",name:{kind:"Name",value:"gclid"},value:{kind:"Variable",name:{kind:"Name",value:"gclid"}}},{kind:"Argument",name:{kind:"Name",value:"ScCid"},value:{kind:"Variable",name:{kind:"Name",value:"ScCid"}}},{kind:"Argument",name:{kind:"Name",value:"msclkid"},value:{kind:"Variable",name:{kind:"Name",value:"msclkid"}}},{kind:"Argument",name:{kind:"Name",value:"yclid"},value:{kind:"Variable",name:{kind:"Name",value:"yclid"}}},{kind:"Argument",name:{kind:"Name",value:"rdtCid"},value:{kind:"Variable",name:{kind:"Name",value:"rdtCid"}}},{kind:"Argument",name:{kind:"Name",value:"qclid"},value:{kind:"Variable",name:{kind:"Name",value:"qclid"}}},{kind:"Argument",name:{kind:"Name",value:"offer"},value:{kind:"Variable",name:{kind:"Name",value:"offer"}}},{kind:"Argument",name:{kind:"Name",value:"adId"},value:{kind:"Variable",name:{kind:"Name",value:"adId"}}},{kind:"Argument",name:{kind:"Name",value:"gaId"},value:{kind:"Variable",name:{kind:"Name",value:"gaId"}}},{kind:"Argument",name:{kind:"Name",value:"gbraid"},value:{kind:"Variable",name:{kind:"Name",value:"gbraid"}}},{kind:"Argument",name:{kind:"Name",value:"wbraid"},value:{kind:"Variable",name:{kind:"Name",value:"wbraid"}}},{kind:"Argument",name:{kind:"Name",value:"refOfferId"},value:{kind:"Variable",name:{kind:"Name",value:"refOfferId"}}},{kind:"Argument",name:{kind:"Name",value:"twclid"},value:{kind:"Variable",name:{kind:"Name",value:"twclid"}}},{kind:"Argument",name:{kind:"Name",value:"aff_sub"},value:{kind:"Variable",name:{kind:"Name",value:"aff_sub"}}},{kind:"Argument",name:{kind:"Name",value:"awc"},value:{kind:"Variable",name:{kind:"Name",value:"awc"}}},{kind:"Argument",name:{kind:"Name",value:"ttclid"},value:{kind:"Variable",name:{kind:"Name",value:"ttclid"}}},{kind:"Argument",name:{kind:"Name",value:"epik"},value:{kind:"Variable",name:{kind:"Name",value:"epik"}}},{kind:"Argument",name:{kind:"Name",value:"lo_3ptt"},value:{kind:"Variable",name:{kind:"Name",value:"lo_3ptt"}}},{kind:"Argument",name:{kind:"Name",value:"oppref"},value:{kind:"Variable",name:{kind:"Name",value:"oppref"}}},{kind:"Argument",name:{kind:"Name",value:"rd"},value:{kind:"Variable",name:{kind:"Name",value:"rd"}}},{kind:"Argument",name:{kind:"Name",value:"dateISO"},value:{kind:"Variable",name:{kind:"Name",value:"dateISO"}}},{kind:"Argument",name:{kind:"Name",value:"idfa"},value:{kind:"Variable",name:{kind:"Name",value:"idfa"}}},{kind:"Argument",name:{kind:"Name",value:"idfv"},value:{kind:"Variable",name:{kind:"Name",value:"idfv"}}},{kind:"Argument",name:{kind:"Name",value:"asid"},value:{kind:"Variable",name:{kind:"Name",value:"asid"}}},{kind:"Argument",name:{kind:"Name",value:"afid"},value:{kind:"Variable",name:{kind:"Name",value:"afid"}}},{kind:"Argument",name:{kind:"Name",value:"jcc"},value:{kind:"Variable",name:{kind:"Name",value:"jcc"}}}]}]}}]},p={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getGeoInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getGeoInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"countryCode"}},{kind:"Field",name:{kind:"Name",value:"ip"}},{kind:"Field",name:{kind:"Name",value:"city"}},{kind:"Field",name:{kind:"Name",value:"region"}}]}}]}}]};e.s(["CountryCode",()=>r,"GetCurrentUserInfoDocument",0,l,"GetGeoInfoDocument",0,p,"GetLeaderboardInfoDocument",0,o,"GetLeaderboardItemsDocument",0,a,"GetSelfRankingDocument",0,s,"GetSignupSourceInfoDocument",0,u,"GetUserAmplitudeFlagsDocument",0,c,"LeaderboardPeriod",()=>
2i,"OnNewRequestDocument",0,d])},890526,840731,e=>{"use strict";var t=e.i(158081);let n={"\n query getLeaderboardItems($period: LeaderboardPeriod!, $source: LeaderboardSource!, $limit: Int!, $page: Int!) {\n leaderboardItems(period: $period, source: $source, limit: $limit, page: $page) {\n items {\n rank\n reward\n score\n user {\n avatar\n gainId\n username\n }\n }\n meta {\n currentPage\n itemsCount\n itemsPerPage\n totalItemsCount\n totalPages\n }\n }\n }\n":t.GetLeaderboardItemsDocument,"\n query getLeaderboardInfo($source: LeaderboardSource!) {\n dailyLeaderboardInfo: leaderboardInfo(period: DAILY, source: $source) {\n endDate\n reward\n }\n monthlyLeaderboardInfo: leaderboardInfo(period: MONTHLY, source: $source) {\n endDate\n reward\n }\n }\n":t.GetLeaderboardInfoDocument,"\n query getSelfRanking($period: LeaderboardPeriod!, $source: LeaderboardSource!) {\n leaderboardRank(period: $period, source: $source) {\n rank\n score\n reward\n user {\n gainId\n username\n avatar\n }\n }\n }\n":t.GetSelfRankingDocument,"\n query getCurrentUserInfo {\n me {\n avatar\n balance\n datejoined\n deleted\n email\n emailConfirmed\n signupCountry\n gainId\n private\n refcode\n role\n totalWithdrawn\n type\n unwithdrawableBalance\n username\n verified\n xp\n userClass\n uiMode\n lastseen\n completedLiteModeAt\n uiSettings {\n state {\n onboarded\n skippedAgeGender\n shownWelcomeModals\n buttonInteractions\n unlockedAdvancedLiteMode\n lastViewedNpsPopup\n }\n }\n }\n }\n":t.GetCurrentUserInfoDocument,"\n query getSignupSourceInfo {\n me {\n signupSource {\n referrerRefcode\n campaignName\n campaignProvi
2der\n dateJoined\n }\n }\n }\n":t.GetSignupSourceInfoDocument,"\n query getUserAmplitudeFlags {\n getUserAmplitudeFlags {\n name\n value\n payload\n }\n }\n":t.GetUserAmplitudeFlagsDocument,"\n mutation onNewRequest(\n $ref: String\n $utmSource: String\n $utmMedium: String\n $utmCampaign: String\n $utmContent: String\n $utmTerm: String\n $creative: String\n $adGroup: String\n $clickId: String\n $irclickid: String\n $sub1: String\n $sub2: String\n $sub3: String\n $sub4: String\n $app: String\n $gclid: String\n $fbclid: String\n $_ly_c: String\n $rdtCid: String\n $qclid: String\n $ScCid: String\n $msclkid: String\n $yclid: String\n $offer: String\n $adId: String\n $gaId: String\n $gbraid: String\n $wbraid: String\n $refOfferId: String\n $twclid: String\n $aff_sub: String\n $awc: String\n $ttclid: String\n $epik: String\n $lo_3ptt: String\n $oppref: String\n $rd: String\n $dateISO: String\n $idfa: String\n $idfv: String\n $asid: String\n $afid: String\n $jcc: String\n ) {\n onNewRequest(\n ref: $ref\n utmSource: $utmSource\n utmMedium: $utmMedium\n utmCampaign: $utmCampaign\n utmContent: $utmContent\n utmTerm: $utmTerm\n creative: $creative\n adGroup: $adGroup\n clickId: $clickId\n irclickid: $irclickid\n sub1: $sub1\n sub2: $sub2\n sub3: $sub3\n sub4: $sub4\n app: $app\n fbclid: $fbclid\n _ly_c: $_ly_c\n gclid: $gclid\n ScCid: $ScCid\n msclkid: $msclkid\n yclid: $yclid\n rdtCid: $rdtCid\n qclid: $qclid\n offer: $offer\n adId: $adId\n gaId: $gaId\n gbraid: $gbraid\n wbraid: $wbraid\n refOfferId: $refOfferId\n twclid: $twclid\n aff_sub: $aff_sub\n awc: $awc\n ttclid: $ttclid\n epik: $epik\n lo_3ptt: $lo_3ptt\n oppref: $oppref\n rd: $rd\n dateISO: $dateISO\n idfa: $idfa\n idfv: $idfv\n asid: $asid\n afid: $afid\n jcc: $jcc\n )\n }\n":t.OnNewRequestDocument,"\n query getGeoInfo {\n getGeoInfo {\n countryCode\n ip\n city\n region\n }\n }\n":t.GetGeoInfoDocument};e.s(["graphql",0,function(e){return n[e]??{}}],840731),e.s([],890526)},899074,254335,936535,241888,20064,285809,e=>{"use strict";var t,n,r,i;function a(e){return 9===e||32===e}function o(e){return e>=48&&e<=57}function s(e){return e>=97&&e<=122||e>=65&&e<=90}e.s(["isDigit",0,o,"isNameContinue",0,function(e){return s(e)||o(e)||95===e},"isNameStart",0,function(e){return s(e)||95===e},"isWhiteSpace",0,a],254335),e.s(["dedentBlockStringLines",0,function(e){var t,n;let r=Number.MAX_SAFE_INTEGER,i=null,o=-1;for(let t=0;t<e.length;++t){let s=e[t],l=function(e){let t=0;for(;t<e.length&&a(e.charCodeAt(t));)++t;return t}(s);l!==s.length&&(i=null!=(n=i)?n:t,o=t,0!==t&&l<r&&(r=l))}return e.map((e,t)=>0===t?e:e.slice(r)).slice(null!=(t=i)?t:0,o+1)},"printBlockString",0,function(e,t){let n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=1===r.length,o=r.length>1&&r.slice(1).every(e=>0===e.length||a(e.charCodeAt(0))),s=n.endsWith('\\"""'),l=e.endsWith('"')&&!s,u=e.endsWith("\\"),c=l||u,d=!(null!=t&&t.minimize)&&(!i||e.length>70||c||o||s),p="",f=i&&a(e.charCodeAt(0));return(d&&!f||o)&&(p+="\n"),p+=n,(d||c)&&(p+="\n"),'"""'+p+'"""'}],899074),e.s(["devAssert",0,function(e,t){if(!e)throw Error(t)}],936535);e.s(["inspect",0,function(e){return function e(t,n){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return function(t,n){let r;if(null===t)return"null";if(n.includes(t))return"[Circular]";let i=[...n,t];if("function"==typeof t.toJSON){let n=t.toJSON();if(n!==t)return"string"==typeof n?n:e(n,i)}else if(Array.isArray(t)){var a,o,s=t,l=i;if(0===s.length)return"[]";if(l.length>2)return"[Array]";let n=Math.min(10,s.length),r=s.length-n,u=[];for(let t=0;t<n;++t)u.push(e(s[t],l));return 1===r?u.push("... 1 more item"):r>1&&u.push(`... ${r} more items`),"["+u.join(", ")+"]"}return a=t,o=i,0===(r=Object.entries(a)).length?"{}":o.length>2?"["+function(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){let t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(a)+"]":"{ "+r.map(([t,n])=>t+": "+e(n,o)).join(", ")+" }"}(t,n);default:return String(t)}}(e,[])}],241888);class l{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class u{constructor(e,t,n,r,i,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}let c={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],Float
2Value:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},d=new Set(Object.keys(c));(r=t||(t={})).QUERY="query",r.MUTATION="mutation",r.SUBSCRIPTION="subscription",e.s(["Location",0,l,"OperationTypeNode",0,t,"QueryDocumentKeys",0,c,"Token",0,u,"isNode",0,function(e){let t=null==e?void 0:e.kind;return"string"==typeof t&&d.has(t)}],20064),(i=n||(n={})).NAME="Name",i.DOCUMENT="Document",i.OPERATION_DEFINITION="OperationDefinition",i.VARIABLE_DEFINITION="VariableDefinition",i.SELECTION_SET="SelectionSet",i.FIELD="Field",i.ARGUMENT="Argument",i.FRAGMENT_SPREAD="FragmentSpread",i.INLINE_FRAGMENT="InlineFragment",i.FRAGMENT_DEFINITION="FragmentDefinition",i.VARIABLE="Variable",i.INT="IntValue",i.FLOAT="FloatValue",i.STRING="StringValue",i.BOOLEAN="BooleanValue",i.NULL="NullValue",i.ENUM="EnumValue",i.LIST="ListValue",i.OBJECT="ObjectValue",i.OBJECT_FIELD="ObjectField",i.DIRECTIVE="Directive",i.NAMED_TYPE="NamedType",i.LIST_TYPE="ListType",i.NON_NULL_TYPE="NonNullType",i.SCHEMA_DEFINITION="SchemaDefinition",i.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",i.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",i.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",i.FIELD_DEFINITION="FieldDefinition",i.INPUT_VALUE_DEFINITION="InputValueDefinition",i.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",i.UNION_TYPE_DEFINITION="UnionTypeDefinition",i.ENUM_TYPE_DEFINITION="EnumTypeDefinition",i.ENUM_VALUE_DEFINITION="EnumValueDefinition",i.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",i.DIRECTIVE_DEFINITION="DirectiveDefinition",i.SCHEMA_EXTENSION="SchemaExtension",i.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",i.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",i.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",i.UNION_TYPE_EXTENSION="UnionTypeExtension",i.ENUM_TYPE_EXTENSION="EnumTypeExtension",i.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",i.TYPE_COORDINATE="TypeCoordinate",i.MEMBER_COORDINATE="MemberCoordinate",i.ARGUMENT_COORDINATE="ArgumentCoordinate",i.DIRECTIVE_COORDINATE="DirectiveCoordinate",i.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate",e.s(["Kind",0,n],285809)},780570,e=>{"use strict";class t{baseURL;showInternalErrors;token;constructor(e,t){this.baseURL=e,this.showInternalErrors=t,this.token=null}setToken(e){this.token=e}get headers(){let e={};return this.token&&(e.Authorization=`Bearer ${this.token}`),e}async fetch(e,t={}){let{headers:n={},...r}=t,{body:i}=r,a={...this.headers};"string"==typeof i&&(a["Content-Type"]="application/json");let o=await fetch(`${this.baseURL}${e}`,{...r,headers:{...a,...n},credentials:"include"}),s="text/csv"===o.headers.get("Content-Type"),l=null;if(o.headers.get("Content-type")?.includes("application/json")?l=await o.json():s&&(l=await o.text()),!o.ok&&!s){let e=l?.errors;if(this.showInternalErrors&&e&&e.length)throw Error(Array.isArray(e)?e[0]:e);throw Error(l.message||"Request failed")}return l}async get(e,t={}){return this.fetch(e,{method:"GET",...t})}async post(e,t,n={}){return this.fetch(e,{method:"POST",body:t,...n})}async patch(e,t,n={}){return this.fetch(e,{method:"PATCH",body:t,...n})}async put(e,t,n={}){return this.fetch(e,{method:"PUT",body:t,...n})}async delete(e,t={}){return this.fetch(e,{method:"DELETE",...t})}}class n{app;constructor(e,n=!1){this.app=new t(e,n)}}
2var r=e.i(899074);let i=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function a(e){return o[e.charCodeAt(0)]}let o=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];var s=e.i(936535),l=e.i(241888),u=e.i(20064),c=e.i(285809);let d=Object.freeze({}),p={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>f(e.definitions,"\n\n")},OperationDefinition:{leave(e){let t=_(e.variableDefinitions)?g("(\n",f(e.variableDefinitions,"\n"),"\n)"):g("(",f(e.variableDefinitions,", "),")"),n=g("",e.description,"\n")+f([e.operation,f([e.name,t]),f(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r,description:i})=>g("",i,"\n")+e+": "+t+g(" = ",n)+g(" ",f(r," "))},SelectionSet:{leave:({selections:e})=>h(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=g("",e,": ")+t,o=a+g("(",f(n,", "),")");return o.length>80&&(o=a+g("(\n",v(f(n,"\n")),"\n)")),f([o,f(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+g(" ",f(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>f(["...",g("on ",e),f(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i,description:a})=>g("",a,"\n")+`fragment ${e}${g("(",f(n,", "),")")} `+`on ${t} ${g("",f(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?(0,r.printBlockString)(e):`"${e.replace(i,a)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+f(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+f(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+g("(",f(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>g("",e,"\n")+f(["schema",f(t," "),h(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>g("",e,"\n")+f(["scalar",t,f(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>g("",e,"\n")+f(["type",t,g("implements ",f(n," & ")),f(r," "),h(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>g("",e,"\n")+t+(_(n)?g("(\n",v(f(n,"\n")),"\n)"):g("(",f(n,", "),")"))+": "+r+g(" ",f(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>g("",e,"\n")+f([t+": "+n,g("= ",r),f(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>g("",e,"\n")+f(["interface",t,g("implements ",f(n," & ")),f(r," "),h(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>g("",e,"\n")+f(["union",t,f(n," "),g("= ",f(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>g("",e,"\n")+f(["enum",t,f(n," "),h(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>g("",e,"\n")+f([t,f(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>g("",e,"\n")+f(["input",t,f(n," "),h(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>g("",e,"\n")+"directive @"+t+(_(n)?g("(\n",v(f(n,"\n")),"\n)"):g("(",f(n,", "),")"))+(r?" repeatable":"")+" on "+f(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>f(["extend schema",f(e," "),h(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>f(["extend scalar",e,f(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>f(["extend type",e,g("implements ",f(t," & ")),f(n," "),h(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>f(["extend interface",e,g("implements ",f(t," & ")),f(n," "),h(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>f(["extend union",e,f(t," "),g("= ",f(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>f(["extend enum",e,f(t," "),h(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>f(["extend input",e,f(t," "),h(n)]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>f([e,g(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:n})=>f([e,g(".",t),g("(",n,":)")])},DirectiveCoordinate:{leave:({name:e})=>f(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>f(["@",e,g("(",t,":)")])}};function f(e,t=""){var n;return null!=(n=null==e?void 0:e.filter(e=>e).join(t))?n:""}function h(e){return g("{\n",v(f(e,"\n")),"\n}")}function g(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function v(e){return g(" ",e.replace(/\n/g,"\n "))}function _(e){var t;return null!=(t=null==e?void 0:e.some(e=>e.includes("\n")))&&t}class m{app;constructor(e={}){this.app=e.app}async request({query:e,variables:t,nextOptions:n}){try{let{cache:r,...i}=n||{},a=await fetch(`${this.app?.baseURL}/graphql`,{credentials:"include",method:"POST",body:JSON.stringify({query:function(e,t,n=u.QueryDocumentKeys){let r,i,a,o=new Map;for(let e of Object.values(c.Kind))o.set(e,function(e,t){let n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}(t,e));let p=Array.isArray(e),f=[e],h=-1,g=[],v=e,_=[],m=[];do{var E,S,A;let e,c=++h===f.length,T=c&&0!==g.length;if(c){if(i=0===m.length?void 0:_[_.length-1],v=a,a=m.pop(),T)if(p){v=v.slice();let e=0;for(let[t,n]of g){let r=t-e;null===n?(v.splice(r,1),e++):v[r]=n}}else for(let[e,t]of(v={...v},g))v[e]=t;h=r.index,f=r.keys,g=r.edits,p=r.inArray,r=r.prev}else if(a){if(null==(v=a[i=p?h:f[h]]))continue;_.push(i)}if(!Array.isArray(v)){(0,u.isNode)(v)||(0,s.devAssert)(!1,`Invalid AST Node: ${(0,l.inspect)(v)}.`);let n=c?null==(E=o.get(v.kind))?void 0:E.leave:null==(S=o.get(v.kind))?void 0:S.enter;if((e=null==n?void 0:n.call(t,v,i,a,_,m))===d)break;if(!1===e){if(!c){_.pop();continue}}else if(void 0!==e&&(g.push([i,e]),!c))if((0,u.isNode)(e))v=e;else{_.pop();continue}}void 0===e&&T&&g.push([i,v]),c?_.pop():(r={inArray:p,index:h,keys:f,edits:g,prev:r},f=(p=Array.isArray(v))?v:null!=(A=n[v.kind])?A:[],h=-1,g=[],a&&m.push(a),a=v)}while(void 0!==r)return 0!==g.length?g[g.length-1][1]:e}(e,p),variables:t}),headers:{"content-type":"application/json"},next:i,cache:r}),{data:o,errors:f}=await a.json()||{};return f&&console.log(f[0]),{data:o,errors:f}}catch(e){console.error(e)}}}let E=new class extends n{graphql;
2constructor(e){super(e),this.graphql=new m({app:this.app})}}("/academy/fc-api");e.s(["default",0,E],780570)},738003,e=>{"use strict";let t=async(e,t)=>{e=`/fc-api${e}`;let{headers:n,...r}=t||{};return await fetch(e,{credentials:"include",headers:{"Content-Type":"application/json",...n},...r})};e.s(["makeApiRequest",0,t])},177225,12354,e=>{"use strict";function t(e,n=[]){let r=Object.assign({},e);for(let e of n)e in r&&delete r[e];return r}e.s(["omit",0,t],12354),e.s(["omitThemingProps",0,function(e){return t(e,["styleConfig","size","variant","colorScheme"])}],177225)},692400,e=>{"use strict";e.s(["createMultiStyleConfigHelpers",0,function(e){return{definePartsStyle:e=>e,defineMultiStyleConfig:t=>({parts:e,...t})}},"defineStyle",0,function(e){return e},"defineStyleConfig",0,function(e){return e}])},550456,e=>{"use strict";var t=e.i(271645);e.s(["createContext",0,function(e={}){let{name:n,strict:r=!0,hookName:i="useContext",providerName:a="Provider",errorMessage:o,defaultValue:s}=e,l=(0,t.createContext)(s);return l.displayName=n,[l.Provider,function e(){let n=(0,t.useContext)(l);if(!n&&r){let t=Error(o??`${i} returned \`undefined\`. Seems you forgot to wrap component within ${a}`);throw t.name="ContextError",Error.captureStackTrace?.(t,e),t}return n},l]}])},540254,e=>{"use strict";var t=e.i(843476),n=e.i(691206);e.s(["CheckIcon",0,function(e){return(0,t.jsx)(n.Icon,{viewBox:"0 0 24 24",...e,children:(0,t.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})},"InfoIcon",0,function(e){return(0,t.jsx)(n.Icon,{viewBox:"0 0 24 24",...e,children:(0,t.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})},"WarningIcon",0,function(e){return(0,t.jsx)(n.Icon,{viewBox:"0 0 24 24",...e,children:(0,t.jsx)("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}])},884364,e=>{"use strict";var t,n,r=e.i(598533),i=e.i(271645),a=e.i(627472),o=e.i(758600),s=e.i(204249);e.i(398437);var l=function(e,t){var n=arguments;if(null==t||!r.h.call(t,"css"))return i.createElement.apply(void 0,n);var a=n.length,o=Array(a);o[0]=r.E,o[1]=(0,r.c)(e,t);for(var s=2;s<a;s++)o[s]=n[s];return i.createElement.apply(null,o)};t=l||(l={}),n||(n=t.JSX||(t.JSX={}));var u=(0,r.w)(function(e,t){var n=e.styles,l=(0,s.serializeStyles)([n],void 0,i.useContext(r.T)),u=i.useRef();return(0,o.useInsertionEffectWithLayoutFallback)(function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),r=!1,i=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==i&&(r=!0,i.setAttribute("data-emotion",e),n.hydrate([i])),u.current=[n,r],function(){n.flush()}},[t]),(0,o.useInsertionEffectWithLayoutFallback)(function(){var e=u.current,n=e[0];if(e[1]){e[1]=!1;return}if(void 0!==l.next&&(0,a.insertStyles)(t,l.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}t.insert("",l,n,!1)},[t,l.name]),null});function c(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.serializeStyles)(t)}e.s(["Global",0,u,"keyframes",0,function(){var e=c.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}])},120559,e=>{"use strict";var t=e.i(843476),n=e.i(177225),r=e.i(583554),i=e.i(884364),a=e.i(9160),o=e.i(872548),s=e.i(523093);let l=(0,i.keyframes)({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),u=(0,a.forwardRef)((e,i)=>{let a=(0,o.useStyleConfig)("Spinner",e),{label:u="Loading...",thickness:c="2px",speed:d="0.45s",emptyColor:p="transparent",className:f,...h}=(0,n.omitThemingProps)(e),g=(0,r.cx)("chakra-spinner",f),v={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:c,borderBottomColor:p,borderLeftColor:p,animation:`${l} ${d} linear infinite`,...a};return(0,t.jsx)(s.chakra.div,{ref:i,__css:v,className:g,...h,children:u&&(0,t.jsx)(s.chakra.span,{srOnly:!0,children:u})})});u.displayName="Spinner",e.s(["Spinner",0,u])},384928,345464,725714,706927,e=>{"use strict";var t=e.i(843476),n=e.i(177225),r=e.i(692400),i=e.i(583554),a=e.i(550456),o=e.i(540254),s=e.i(120559);let[l,u]=(0,a.createContext)({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[c,d]=(0,a.createContext)({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),p={info:{icon:o.InfoIcon,colorScheme:"blue"},warning:{icon:o.WarningIcon,colorScheme:"orange"},success:{icon:o.CheckIcon,colorScheme:"green"},error:{icon:o.WarningIcon,colorScheme:"red"},loading:{icon:s.Spinner,colorScheme:"blue"}};var f=e.i(872548),h=e.i(9160),g=e.i(523093);let v=(0,h.forwardRef)(function(e,a){let{status:o="info",addRole:s=!0,...u}=(0,n.omitThemingProps)(e),d=e.colorScheme??p[o].colorScheme,h=(0,f.useMultiStyleConfig)("Alert",{...e,colorScheme:d}),v=(0,r.defineStyle)({width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...h.container});return(0,t.jsx)(l,{value:{status:o},children:(0,t.jsx)(c,{value:h,children:(0,t.jsx)(g.chakra.div,{"data-status":o,role:s?"alert":void 0,ref:a,...u,className:(0,i.cx)("chakra-alert",e.className),__css:v})})})});function _(e){let{status:n}=u(),r=p[n].icon,a=d(),o="loading"===n?a.spinner:a.icon;return(0,t.jsx)(g.chakra.span,{display:"inherit","data-status":n,...e,className:(0,i.cx)("chakra-alert__icon",e.className),__css:o,children:e.children||(0,t.jsx)(r,{h:"100%",w:"100%"})})}v.displayName="Alert",e.s(["Alert",0,v],384928),_.displayName="AlertIcon",e.s(["AlertIcon",0,_],345464);let m=(0,h.forwardRef)(function(e,n){let r=d(),{status:a}=u();return(0,t.jsx)(g.chakra.div,{ref:n,"data-status":a,...e,className:(0,i.cx)("chakra-alert__title",e.className),__css:r.title})});m.displayName="AlertTitle",e.s(["AlertTitle",0,m],725714);let E=(0,h.forwardRef)(function(e,n){let{status:a}=u(),o=d(),s=(0,r.defineStyle)({display:"inline",...o.description});return(0,t.jsx)(g.chakra.div,{ref:n,"data-status":a,...e,className:(0,i.cx)("chakra-alert__desc",e.className),__css:s})});E.displayName="AlertDescription",e.s(["AlertDescription",0,E],706927)},290618,e=>{"use strict";var t=e.i(843476),n=e.i(177225),r=e.i(691206),i=e.i(9160),a=e.i(872548),o=e.i(523093);function s(e){return(0,t.jsx)(r.Icon,{focusable:"false","aria-hidden":!0,...e,children:(0,t.jsx)("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,
211.823a.25.25,0,0,1,0,.354Z"})})}let l=(0,i.forwardRef)(function(e,r){let i=(0,a.useStyleConfig)("CloseButton",e),{children:l,isDisabled:u,__css:c,...d}=(0,n.omitThemingProps)(e);return(0,t.jsx)(o.chakra.button,{type:"button","aria-label":"Close",ref:r,disabled:u,__css:{outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,...i,...c},...d,children:l||(0,t.jsx)(s,{width:"1em",height:"1em"})})});l.displayName="CloseButton",e.s(["CloseButton",0,l])},267729,e=>{"use strict";var t=e.i(843476),n=e.i(384928),r=e.i(345464),i=e.i(725714),a=e.i(706927),o=e.i(290618),s=e.i(523093);let l=e=>{let{status:l,variant:u="solid",id:c,title:d,isClosable:p,onClose:f,description:h,colorScheme:g,icon:v}=e,_=c?{root:`toast-${c}`,title:`toast-${c}-title`,description:`toast-${c}-description`}:void 0;return(0,t.jsxs)(n.Alert,{addRole:!1,status:l,variant:u,id:_?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:g,children:[(0,t.jsx)(r.AlertIcon,{children:v}),(0,t.jsxs)(s.chakra.div,{flex:"1",maxWidth:"100%",children:[d&&(0,t.jsx)(i.AlertTitle,{id:_?.title,children:d}),h&&(0,t.jsx)(a.AlertDescription,{id:_?.description,display:"block",children:h})]}),p&&(0,t.jsx)(o.CloseButton,{size:"sm",onClick:f,position:"absolute",insetEnd:1,top:1})]})};e.s(["createRenderToast",0,function(e={}){let{render:n,toastComponent:r=l}=e;return i=>"function"==typeof n?n({...i,...e}):(0,t.jsx)(r,{...i,...e})}])},753892,e=>{"use strict";e.s(["getToastPlacement",0,function(e,t){let n=e??"bottom";return({"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}})[n]?.[t]??n}])},437739,e=>{"use strict";let t=(e,t)=>e.find(e=>e.id===t);function n(e,n){for(let[r,i]of Object.entries(e))if(t(i,n))return r}e.s(["findToast",0,function(e,t){let r=n(e,t),i=r?e[r].findIndex(e=>e.id===t):-1;return{position:r,index:i}},"getToastListStyle",0,function(e){let t="top"===e||"bottom"===e,n=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,r=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0;return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:t?"0 auto":void 0,top:n,bottom:r,right:e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",left:e.includes("right")?void 0:"env(safe-area-inset-left, 0px)"}},"getToastPosition",0,n,"getToastStyle",0,function(e){let t=e.includes("right"),n=e.includes("left"),r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}])},505705,e=>{"use strict";let t,n,r;var i,a=e.i(267729),o=e.i(437739);let s=(t=i={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},n=new Set,r=e=>{t=e(t),n.forEach(e=>e())},{getState:()=>t,subscribe:e=>(n.add(e),()=>{r(()=>i),n.delete(e)}),removeToast:(e,t)=>{r(n=>({...n,[t]:n[t].filter(t=>t.id!=e)}))},notify:(e,t)=>{let n=function(e,t={}){l+=1;let n=t.id??l,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>s.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}(e,t),{position:i,id:a}=n;return r(e=>{let t=i.includes("top")?[n,...e[i]??[]]:[...e[i]??[],n];return{...e,[i]:t}}),a},update:(e,t)=>{e&&r(n=>{let r={...n},{position:i,index:s}=(0,o.findToast)(r,e);return i&&-1!==s&&(r[i][s]={...r[i][s],...t,message:(0,a.createRenderToast)(t)}),r})},closeAll:({positions:e}={})=>{r(t=>(e??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((e,n)=>(e[n]=t[n].map(e=>({...e,requestClose:!0})),e),{...t}))},close:e=>{r(t=>{let n=(0,o.getToastPosition)(t,e);return n?{...t,[n]:t[n].map(t=>t.id==e?{...t,requestClose:!0}:t)}:t})},isActive:e=>!!(0,o.findToast)(s.getState(),e).position}),l=0;e.s(["toastStore",0,s])},672638,e=>{"use strict";var t=e.i(698498),n=e.i(267729),r=e.i(753892),i=e.i(505705);e.s(["createToastFn",0,function(e,a){let o=t=>({...a,...t,position:(0,r.getToastPlacement)(t?.position??a?.position,e)}),s=e=>
2{let t=o(e),r=(0,n.createRenderToast)(t);return i.toastStore.notify(r,t)};return s.update=(e,t)=>{i.toastStore.update(e,o(t))},s.promise=(e,n)=>{let r=s({...n.loading,status:"loading",duration:null});e.then(e=>s.update(r,{status:"success",duration:5e3,...(0,t.runIfFn)(n.success,e)})).catch(e=>s.update(r,{status:"error",duration:5e3,...(0,t.runIfFn)(n.error,e)}))},s.closeAll=i.toastStore.closeAll,s.close=i.toastStore.close,s.isActive=i.toastStore.isActive,s}])},737062,e=>{"use strict";var t=e.i(271645);e.s(["useUpdateEffect",0,(e,n)=>{let r=(0,t.useRef)(!1),i=(0,t.useRef)(!1);(0,t.useEffect)(()=>{if(r.current&&i.current)return e();i.current=!0},n),(0,t.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[])}])},8228,e=>{"use strict";var t=e.i(271645);e.s(["useCallbackRef",0,function(e,n=[]){let r=(0,t.useRef)(e);return(0,t.useEffect)(()=>{r.current=e}),(0,t.useCallback)((...e)=>r.current?.(...e),n)}])},278105,e=>{"use strict";var t=e.i(271645),n=e.i(8228);e.s(["useTimeout",0,function(e,r){let i=(0,n.useCallbackRef)(e);(0,t.useEffect)(()=>{if(null==r)return;let e=null;return e=window.setTimeout(()=>{i()},r),()=>{e&&window.clearTimeout(e)}},[r,i])}])},768529,e=>{"use strict";var t=e.i(843476),n=e.i(737062),r=e.i(278105),i=e.i(698498),a=e.i(464978),o=e.i(846932),s=e.i(271645),l=e.i(437739),u=e.i(523093);let c={initial:e=>{let{position:t}=e,n=["top","bottom"].includes(t)?"y":"x",r=["top-right","bottom-right"].includes(t)?1:-1;return"bottom"===t&&(r=1),{opacity:0,[n]:24*r}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},d=(0,s.memo)(e=>{let{id:d,message:p,onCloseComplete:f,onRequestRemove:h,requestClose:g=!1,position:v="bottom",duration:_=5e3,containerStyle:m,motionVariants:E=c,toastSpacing:S="0.5rem"}=e,[A,T]=(0,s.useState)(_),y=(0,a.useIsPresent)();(0,n.useUpdateEffect)(()=>{y||f?.()},[y]),(0,n.useUpdateEffect)(()=>{T(_)},[_]);let I=()=>{y&&h()};(0,s.useEffect)(()=>{y&&g&&h()},[y,g,h]),(0,r.useTimeout)(I,A);let R=(0,s.useMemo)(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:S,...m}),[m,S]),b=(0,s.useMemo)(()=>(0,l.getToastStyle)(v),[v]);return(0,t.jsx)(o.motion.div,{layout:!0,className:"chakra-toast",variants:E,initial:"initial",animate:"animate",exit:"exit",onHoverStart:()=>T(null),onHoverEnd:()=>T(_),custom:{position:v},style:b,children:(0,t.jsx)(u.chakra.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:R,children:(0,i.runIfFn)(p,{id:d,onClose:I})})})});d.displayName="ToastComponent",e.s(["ToastComponent",0,d])},986678,e=>{"use strict";var t=e.i(271645);let n=globalThis?.document?t.useLayoutEffect:t.useEffect;e.s(["useSafeLayoutEffect",0,n])},735734,e=>{"use strict";var t=e.i(843476);let[n,r]=(0,e.i(550456).createContext)({strict:!1,name:"PortalManagerContext"});function i(e){let{children:r,zIndex:i}=e;return(0,t.jsx)(n,{value:{zIndex:i},children:r})}i.displayName="PortalManager",e.s(["PortalManager",0,i,"usePortalManager",0,r])},740074,e=>{"use strict";var t=e.i(843476),n=e.i(986678),r=e.i(550456),i=e.i(271645),a=e.i(174080),o=e.i(735734);let[s,l]=(0,r.createContext)({strict:!1,name:"PortalContext"}),u="chakra-portal",c=e=>(0,t.jsx)("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),d=e=>{let{appendToParentPortal:r,children:d}=e,[p,f]=(0,i.useState)(null),h=(0,i.useRef)(null),[,g]=(0,i.useState)({});(0,i.useEffect)(()=>g({}),[]);let v=l(),_=(0,o.usePortalManager)();(0,n.useSafeLayoutEffect)(()=>{if(!p)return;let e=p.ownerDocument,t=r?v??e.body:e.body;if(!t)return;h.current=e.createElement("div"),h.current.className=u,t.appendChild(h.current),g({});let n=h.current;return()=>{t.contains(n)&&t.removeChild(n)}},[p]);let m=_?.zIndex?(0,t.jsx)(c,{zIndex:_?.zIndex,children:d}):d;return h.current?(0,a.createPortal)((0,t.jsx)(s,{value:h.current,children:m}),h.current):(0,t.jsx)("span",{ref:e=>{e&&f(e)}})},p=e=>{let{children:r,containerRef:o,appendToParentPortal:l}=e,c=o.current,d=c??("u">typeof window?document.body:void 0),p=(0,i.useMemo)(()=>{let e=c?.ownerDocument.createElement("div");return e&&(e.className=u),e},[c]),[,f]=(0,i.useState)({});
2return((0,n.useSafeLayoutEffect)(()=>f({}),[]),(0,n.useSafeLayoutEffect)(()=>{if(p&&d)return d.appendChild(p),()=>{d.removeChild(p)}},[p,d]),d&&p)?(0,a.createPortal)((0,t.jsx)(s,{value:l?p:null,children:r}),p):null};function f(e){let{containerRef:n,...r}={appendToParentPortal:!0,...e};return n?(0,t.jsx)(p,{containerRef:n,...r}):(0,t.jsx)(d,{...r})}f.className=u,f.selector=".chakra-portal",f.displayName="Portal",e.s(["Portal",0,f])},677642,e=>{"use strict";var t=e.i(843476),n=e.i(550456),r=e.i(88653),i=e.i(271645),a=e.i(768529),o=e.i(505705),s=e.i(437739),l=e.i(740074);let[u,c]=(0,n.createContext)({name:"ToastOptionsContext",strict:!1});e.s(["ToastOptionProvider",0,u,"ToastProvider",0,e=>{let n=(0,i.useSyncExternalStore)(o.toastStore.subscribe,o.toastStore.getState,o.toastStore.getState),{motionVariants:u,component:c=a.ToastComponent,portalProps:d,animatePresenceProps:p}=e,f=Object.keys(n).map(e=>{let i=n[e];return(0,t.jsx)("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${e}`,"aria-hidden":!i.length,id:`chakra-toast-manager-${e}`,style:(0,s.getToastListStyle)(e),children:(0,t.jsx)(r.AnimatePresence,{...p,initial:!1,children:i.map(e=>(0,t.jsx)(c,{motionVariants:u,...e},e.id))})},e)});return(0,t.jsx)(l.Portal,{...d,children:f})},"useToastOptionContext",0,c])},829825,e=>{"use strict";var t=e.i(271645),n=e.i(672638),r=e.i(677642),i=e.i(928798);e.s(["useToast",0,function(e){let{theme:a}=(0,i.useChakra)(),o=(0,r.useToastOptionContext)();return(0,t.useMemo)(()=>(0,n.createToastFn)(a.direction,{...o,...e}),[e,a.direction,o])}])},95187,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={callServer:function(){return a.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let a=e.r(132120),o=e.r(92245),s=e.r(235326)},23370,95786,576511,169707,899499,e=>{"use strict";var t=e.i(829825);e.s(["default",0,function(e){return(0,t.useToast)({position:"bottom-left",...e})}],23370);var n=e.i(95187);let r=(0,n.createServerReference)("40b243928ca87bf60efa56e261b8c3ddee03048a5e",n.callServer,void 0,n.findSourceMapURL,"googleOneTapAuthAction");e.s(["googleOneTapAuthAction",0,r],95786);let i=(0,n.createServerReference)("00d77e25891aced9cb6875243cf3ba6bfb979214fc",n.callServer,void 0,n.findSourceMapURL,"logoutAction");e.s(["logoutAction",0,i],576511);let a=(0,n.createServerReference)("40a405d711a498773c24c9eb24346510695975a0a3",n.callServer,void 0,n.findSourceMapURL,"signInAction");e.s(["signInAction",0,a],169707);let o=(0,n.createServerReference)("4084c6d44b4639492b85ff9f348da37c189bab5d65",n.callServer,void 0,n.findSourceMapURL,"signUpAction");e.s(["signUpAction",0,o],899499)},456634,e=>{"use strict";var t;function n(e){this.message=e}function r(e){this.message=e}n.prototype=Error(),n.prototype.name="InvalidCharacterError","u">typeof window&&window.atob&&window.atob.bind(window),r.prototype=Error(),r.prototype.name="InvalidTokenError",(t={}).MOD="mod",t.SUPPORT_MOD="supportmod",t.ADMIN="admin",t.OWNER="owner",t.ALAM="alam",t.DEV="dev",e.s(["getErrorFromResponse",0,e=>{try{return JSON.parse(e.error)}catch{return{...e,message:e.error||e.message||"unknown error"}}},"getRecaptchaHeaders",0,(e,t="turnstile")=>e?{recaptcha:e,"captcha-version":t}:{"captcha-version":t},"reduceErrors",0,(e,t)=>(t.path in e||(e[t.path]=[]),e[t.path]=e[t.path].concat(t.errors),e)],456634)},422284,(e,t,n)=>{var r=Object.prototype.hasOwnProperty;function i(e){return"[Throws: "+(e?e.message:"?")+"]"}function a(e){var t=[];return function e(n){if(null===n||"object"!=typeof n)return n;if(-1!==t.indexOf(n))return"[Circular]";if(t.push(n),"function"==typeof n.toJSON)try{var a=e(n.toJSON());return t.pop(),a}catch(e){return i(e)}if(Array.isArray(n)){var o=n.map(e);return t.pop(),o}var s=Object.keys(n).reduce(function(t,a){return t[a]=e(function(e,t){if(r.call(e,t))try{return e[t]}catch(e){return i(e)}return e[t]}(n,a)),t},{});return t.pop(),s}(e)}t.exports=function(e,t,n){return JSON.stringify(a(e),t,n)},t.exports.ensureProperties=a},460953,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Observable=void 0;let r=e=>!!Symbol[e],i=e=>r(e)?Symbol[e]:"@@"+e,a=i("iterator"),o=i("observable"),s=i("species");function l(e,t){let n=e[t];if(null!=n){if("function"!=typeof n)throw TypeError(n+" is not a function");return n}}function u(e){let t=e.constructor;return void 0!==t&&null===(t=t[s])&&(t=void 0),void 0!==t?t:_}function c(e){c.log?c.log(e):setTimeout(()=>{throw e})}function d(e){Promise.resolve().then(()=>{try{e()}catch(e){c(e)}})}function p(e){let t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{let e=l(t,"unsubscribe");e&&e.call(t)}}catch(e){c(e)}}function f(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function h(e,t,n){e._state="running";let r=e._observer;try{let i=l(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(f(e),i)i.call(r,n);else throw n;break;case"complete":f(e),i&&i.call(r)}}catch(e){c(e)}"closed"===e._state?p(e):"running"===e._state&&(e._state="ready")}function g(e,t,n){if("closed"!==e._state){if("buffering"===e._state)return void e._queue.push({type:t,value:n});if("ready"!==e._state){e._state="buffering",e._queue=[{type:t,value:n}],d(()=>(function(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let n=0;n<t.length&&(h(e,t[n].type,t[n].value),"closed"!==e._state);++n);}})(e));return}
2h(e,t,n)}}class v{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";let n=this,r={get closed(){return"closed"===n._state},next(e){g(n,"next",e)},error(e){g(n,"error",e)},complete(){g(n,"complete")}};try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(f(this),p(this))}}class _{constructor(e){if(!(this instanceof _))throw TypeError("Observable cannot be called as a function");if("function"!=typeof e)throw TypeError("Observable initializer must be a function");this._subscriber=e}subscribe(e){return("object"!=typeof e||null===e)&&(e={next:e,error:arguments[1],complete:arguments[2]}),new v(e,this._subscriber)}forEach(e){return new Promise((t,n)=>{if("function"!=typeof e)return void n(TypeError(e+" is not a function"));function r(){i.unsubscribe(),t()}let i=this.subscribe({next(t){try{e(t,r)}catch(e){n(e),i.unsubscribe()}},error:n,complete:t})})}map(e){if("function"!=typeof e)throw TypeError(e+" is not a function");return new(u(this))(t=>this.subscribe({next(n){try{n=e(n)}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}}))}filter(e){if("function"!=typeof e)throw TypeError(e+" is not a function");return new(u(this))(t=>this.subscribe({next(n){try{if(!e(n))return}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}}))}reduce(e){if("function"!=typeof e)throw TypeError(e+" is not a function");let t=u(this),n=arguments.length>1,r=!1,i=arguments[1],a=i;return new t(t=>this.subscribe({next(i){let o=!r;if(r=!0,!o||n)try{a=e(a,i)}catch(e){return t.error(e)}else a=i},error(e){t.error(e)},complete(){if(!r&&!n)return t.error(TypeError("Cannot reduce an empty sequence"));t.next(a),t.complete()}}))}async all(){let e=[];return await this.forEach(t=>e.push(t)),e}concat(...e){let t=u(this);return new t(n=>{let r,i=0;return!function a(o){r=o.subscribe({next(e){n.next(e)},error(e){n.error(e)},complete(){i===e.length?(r=void 0,n.complete()):a(t.from(e[i++]))}})}(this),()=>{r&&(r.unsubscribe(),r=void 0)}})}flatMap(e){if("function"!=typeof e)throw TypeError(e+" is not a function");let t=u(this);return new t(n=>{let r=[],i=this.subscribe({next(i){if(e)try{i=e(i)}catch(e){return n.error(e)}let o=t.from(i).subscribe({next(e){n.next(e)},error(e){n.error(e)},complete(){let e=r.indexOf(o);e>=0&&r.splice(e,1),a()}});r.push(o)},error(e){n.error(e)},complete(){a()}});function a(){i.closed&&0===r.length&&n.complete()}return()=>{r.forEach(e=>e.unsubscribe()),i.unsubscribe()}})}[o](){return this}static from(e){let t="function"==typeof this?this:_;if(null==e)throw TypeError(e+" is not an object");let n=l(e,o);if(n){let r=n.call(e);if(Object(r)!==r)throw TypeError(r+" is not an object");return r instanceof _&&r.constructor===t?r:new t(e=>r.subscribe(e))}if(r("iterator")&&(n=l(e,a)))return new t(t=>{d(()=>{if(!t.closed){for(let r of n.call(e))if(t.next(r),t.closed)return;t.complete()}})});if(Array.isArray(e))return new t(t=>{d(()=>{if(!t.closed){for(let n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}})});throw TypeError(e+" is not observable")}static of(...e){return new("function"==typeof this?this:_)(t=>{d(()=>{if(!t.closed){for(let n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}})})}static get[s](){return this}}n.Observable=_,Object.defineProperty(_,Symbol("extensions"),{value:{symbol:o,hostReportError:c},configurable:!0})},881243,(e,t,n)=>{t.exports=e.r(460953).Observable},436370,322085,189759,941535,681334,878773,692020,424670,422831,304230,506229,795037,717491,335566,347692,757931,798492,131616,e=>{"use strict";let t;var n,r,i,a,o,s,l,u,c,d,p,f,h,g,v,_,m,E,S,A,T,y,I,R,b,O,N,C,k,L,D=e.i(290571);(n=v||(v={}))[n.None=0]="None",n[n.Error=1]="Error",n[n.Warn=2]="Warn",n[n.Verbose=3]="Verbose",n[n.Debug=4]="Debug",e.s(["LogLevel",0,v],322085);var P=function(e){return void 0===e&&(e=0),(Error().stack||"").split("\n").slice(2+e).map(function(e){return e.trim()})},w=function(e){return function(){var t=(0,D.__assign)({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},F=function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=(0,D.__values)(t.split(".")),a=i.next();!a.done;a=i.next()){var o=a.value;if(!(o in e))return;e=e[o]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},U=function(e,t){return function(){var n,r,i={};try{for(var a=(0,D.__values)(t),o=a.next();!o.done;o=a.next()){var s=o.value;
2i[s]=F(e,s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}},M=function(e,t,n,r,i){return void 0===i&&(i=null),function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];var s=n(),l=s.logger,u=s.logLevel;if(u&&u<v.Debug||!u||!l)return e.apply(i,a);var c={type:"invoke public method",name:t,args:a,stacktrace:P(1),time:{start:new Date().toISOString()},states:{}};r&&c.states&&(c.states.before=r());var d=e.apply(i,a);return d&&d.promise?d.promise.then(function(){r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=new Date().toISOString()),l.debug(JSON.stringify(c,null,2))}):(r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=new Date().toISOString()),l.debug(JSON.stringify(c,null,2))),d}};e.s(["debugWrapper",0,M,"getClientLogConfig",0,w,"getClientStates",0,U,"getStacktrace",0,P],189759),(r=_||(_={})).SET="$set",r.SET_ONCE="$setOnce",r.ADD="$add",r.APPEND="$append",r.PREPEND="$prepend",r.REMOVE="$remove",r.PREINSERT="$preInsert",r.POSTINSERT="$postInsert",r.UNSET="$unset",r.CLEAR_ALL="$clearAll",(i=m||(m={})).IDENTIFY="$identify",i.GROUP_IDENTIFY="$groupidentify",i.REVENUE="revenue_amount",e.s(["IdentifyOperation",0,_,"SpecialEventType",0,m],941535);var x="".concat("AMP","_unsent"),G="$default_instance",V="https://api2.amplitude.com/2/httpapi",B="https://api.eu.amplitude.com/2/httpapi",H="https://api2.amplitude.com/batch",q="https://api.eu.amplitude.com/batch",W="utm_campaign",K="utm_content",j="utm_id",Y="utm_medium",$="utm_source",Q="utm_term",J="dclid",z="fbclid",X="gbraid",Z="gclid",ee="ko_click_id",et="li_fat_id",en="msclkid",er="rdt_cid",ei="ttclid",ea="twclid",eo="wbraid",es={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},el=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],eu=["authorization","cookie","set-cookie"];e.s(["AMPLITUDE_BATCH_SERVER_URL",0,H,"AMPLITUDE_PREFIX",0,"AMP","AMPLITUDE_SERVER_URL",0,V,"BASE_CAMPAIGN",0,es,"DCLID",0,J,"DEFAULT_INSTANCE_NAME",0,G,"EU_AMPLITUDE_BATCH_SERVER_URL",0,q,"EU_AMPLITUDE_SERVER_URL",0,B,"FBCLID",0,z,"FORBIDDEN_HEADERS",0,eu,"GBRAID",0,X,"GCLID",0,Z,"KO_CLICK_ID",0,ee,"LI_FAT_ID",0,et,"MSCLKID",0,en,"RDT_CID",0,er,"SAFE_HEADERS",0,el,"STORAGE_PREFIX",0,x,"TTCLID",0,ei,"TWCLID",0,ea,"UNSET_VALUE",0,"-","UTM_CAMPAIGN",0,W,"UTM_CONTENT",0,K,"UTM_ID",0,j,"UTM_MEDIUM",0,Y,"UTM_SOURCE",0,$,"UTM_TERM",0,Q,"WBRAID",0,eo],681334);var ec=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var n=e[t];if(!ed(t,n))return!1}return!0},ed=function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var a=(0,D.__values)(t),o=a.next();!o.done;o=a.next()){var s=o.value;if(Array.isArray(s))return!1;if("object"==typeof s)i=i&&ec(s);else if(!["number","string"].includes(typeof s))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}else if(null==t)return!1;else if("object"==typeof t)return ec(t);else if(!["number","string","boolean"].includes(typeof t))return!1;return!0},ep=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return(0,D.__assign)({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(E.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(E.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(E.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(E.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(E.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(E.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(E.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(E.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(E.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[E.CLEAR_ALL]="-",this}
2,e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return!(void 0!==this._properties[E.CLEAR_ALL]||this._propertySet.has(t))&&(e===E.ADD?"number"==typeof n:e===E.UNSET||e===E.REMOVE||ed(t,n))},e}();(a=E||(E={})).SET="$set",a.SET_ONCE="$setOnce",a.ADD="$add",a.APPEND="$append",a.PREPEND="$prepend",a.REMOVE="$remove",a.PREINSERT="$preInsert",a.POSTINSERT="$postInsert",a.UNSET="$unset",a.CLEAR_ALL="$clearAll";var ef=[E.CLEAR_ALL,E.UNSET,E.SET,E.SET_ONCE,E.ADD,E.APPEND,E.PREPEND,E.PREINSERT,E.POSTINSERT,E.REMOVE];(o=S||(S={})).Unknown="unknown",o.Skipped="skipped",o.Success="success",o.RateLimit="rate_limit",o.PayloadTooLarge="payload_too_large",o.Invalid="invalid",o.Failed="failed",o.Timeout="Timeout",o.SystemError="SystemError",e.s(["Status",0,S],878773);var eh=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=S.Unknown),{event:e,code:t,message:n}},eg=e.i(289812),ev=(0,D.__spreadArray)([],(0,D.__read)(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),e_=function(e){var t,n=(0,eg.getGlobalScope)();if(!(null==(t=null==n?void 0:n.crypto)?void 0:t.getRandomValues))return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,e_);var r=n.crypto.getRandomValues(new Uint8Array(16));return r[6]=15&r[6]|64,r[8]=63&r[8]|128,(0,D.__spreadArray)([],(0,D.__read)(r.entries()),!1).map(function(e){var t=(0,D.__read)(e,2),n=t[0],r=t[1];return[4,6,8,10].includes(n)?"-".concat(ev[r]):ev[r]}).join("")},em=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[],this._optOutListeners=[]}return e.prototype.register=function(e,t){var n,r;return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(i){switch(i.label){case 0:if(this.plugins.some(function(t){return t.name===e.name}))return this.loggerProvider.warn("Plugin with name ".concat(e.name," already exists, skipping registration")),[2];return void 0===e.name&&(e.name=e_(),this.loggerProvider.warn("Plugin name is undefined. \n Generating a random UUID for plugin name: ".concat(e.name,". \n Set a name for the plugin to prevent it from being added multiple times."))),e.type=null!=(n=e.type)?n:"enrichment",[4,null==(r=e.setup)?void 0:r.call(e,t,this.client)];case 1:return i.sent(),this.plugins.push(e),[2]}})})},e.prototype.deregister=function(e,t){var n;return(0,D.__awaiter)(this,void 0,void 0,function(){var r,i;return(0,D.__generator)(this,function(a){switch(a.label){case 0:if(-1===(r=this.plugins.findIndex(function(t){return t.name===e})))return t.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2];return i=this.plugins[r],this.plugins.splice(r,1),[4,null==(n=i.teardown)?void 0:n.call(i)];case 1:return a.sent(),[2]}})})},e.prototype.reset=function(e){this._clearOptOutListeners(),this.applying=!1,this.plugins.map(function(e){var t;return null==(t=e.teardown)?void 0:t.call(e)}),this.plugins=[],this.client=e},e.prototype.push=function(e){var t=this;return new Promise(function(n){t.queue.push([e,n]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t,n,r,i,a,o,s,l,u,c,d,p,f,h,g;return(0,D.__generator)(this,function(v){switch(v.label){case 0:if(!e)return[2];t=(0,D.__read)(e,1)[0],n=(0,D.__read)(e,2)[1],this.loggerProvider.log("Timeline.apply: Initial event",t),r=this.plugins.filter(function(e){return"before"===e.type}),v.label=1;case 1:v.trys.push([1,6,7,8]),a=(i=(0,D.__values)(r)).next(),v.label=2;case 2:if(a.done)return[3,5];if(!(o=a.value).execute)return[3,4];return[4,o.execute((0,D.__assign)({},t))];case 3:if(null===(s=v.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(o.name),"', event: ").concat(JSON.stringify(t))),n({event:t,code:0,message:""}),[2];t=s,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(o.name),"', event: ").concat(JSON.stringify(t))),v.label=4;case 4:return a=i.next(),[3,2];case 5:return[3,8];case 6:return p={error:v.sent()},[3,8];case 7:try{a&&!a.done&&(f=i.return)&&f.call(i)}finally{if(p)throw p.error}
2return[7];case 8:l=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),v.label=9;case 9:v.trys.push([9,14,15,16]),c=(u=(0,D.__values)(l)).next(),v.label=10;case 10:if(c.done)return[3,13];if(!(o=c.value).execute)return[3,12];return[4,o.execute((0,D.__assign)({},t))];case 11:if(null===(s=v.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(o.name),"', event: ").concat(JSON.stringify(t))),n({event:t,code:0,message:""}),[2];t=s,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(o.name),"', event: ").concat(JSON.stringify(t))),v.label=12;case 12:return c=u.next(),[3,10];case 13:return[3,16];case 14:return h={error:v.sent()},[3,16];case 15:try{c&&!c.done&&(g=u.return)&&g.call(u)}finally{if(h)throw h.error}return[7];case 16:return d=this.plugins.filter(function(e){return"destination"===e.type}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(t))),Promise.all(d.map(function(e){var n=(0,D.__assign)({},t);return e.execute(n).catch(function(e){return eh(n,0,String(e))})})).then(function(e){var r=(0,D.__read)(e,1)[0]||eh(t,100,"Event not tracked, no destination plugins on the instance");n(r)}),[2]}})})},e.prototype.flush=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){var e,t=this;return(0,D.__generator)(this,function(n){switch(n.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return t.apply(e)}))];case 1:return n.sent(),[4,Promise.all(this.plugins.filter(function(e){return"destination"===e.type}).map(function(e){return e.flush&&e.flush()}))];case 2:return n.sent(),[2]}})})},e.prototype.addOptOutListener=function(e){this._optOutListeners.push(e)},e.prototype._clearOptOutListeners=function(){this._optOutListeners=[]},e.prototype.onIdentityChanged=function(e){this.plugins.forEach(function(t){var n;null==(n=t.onIdentityChanged)||n.call(t,e)})},e.prototype.onSessionIdChanged=function(e){this.plugins.forEach(function(t){var n;null==(n=t.onSessionIdChanged)||n.call(t,e)})},e.prototype.onOptOutChanged=function(e){this.plugins.forEach(function(t){var n;null==(n=t.onOptOutChanged)||n.call(t,e)}),this._callOptOutListeners(e)},e.prototype._callOptOutListeners=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t,n,r,i,a,o;return(0,D.__generator)(this,function(s){switch(s.label){case 0:s.trys.push([0,7,8,9]),n=(t=(0,D.__values)(this._optOutListeners)).next(),s.label=1;case 1:if(n.done)return[3,6];r=n.value,s.label=2;case 2:return s.trys.push([2,4,,5]),[4,r(e)];case 3:return s.sent(),[3,5];case 4:return i=s.sent(),this.loggerProvider.error("Error calling optOut listener",i),[3,5];case 5:return n=t.next(),[3,1];case 6:return[3,9];case 7:return a={error:s.sent()},[3,9];case 8:try{n&&!n.done&&(o=t.return)&&o.call(t)}finally{if(a)throw a.error}return[7];case 9:return[2]}})})},e.prototype.onReset=function(){this.plugins.forEach(function(e){var t;null==(t=e.onReset)||t.call(e)})},e}(),eE=function(e,t){return(0,D.__assign)((0,D.__assign)({},t),{event_type:m.IDENTIFY,user_properties:e.getUserProperties()})},eS=function(e,t,n,r){var i;return(0,D.__assign)((0,D.__assign)({},r),{event_type:m.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:((i={})[e]=t,i)})},eA=function(e,t,n){var r,i=new ep;return i.set(e,t),(0,D.__assign)((0,D.__assign)({},n),{event_type:m.IDENTIFY,user_properties:i.getUserProperties(),groups:((r={})[e]=t,r)})},eT=function(e){return{promise:e||Promise.resolve()}};e.s(["returnWrapper",0,eT],692020);var ey=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new em(this),this.name=e}return e.prototype._init=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q")];case 1:return t.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t,n,r,i,a,o;return(0,D.__generator)(this,function(s){switch(s.label){case 0:t=this[e],this[e]=[],s.label=1;case 1:s.trys.push([1,8,9,10]),r=(n=(0,D.__values)(t)).next(),s.label=2;case 2:if(r.done)return[3,7];if(!((i=(0,r.value)())&&"promise"in i))return[3,4];return[4,i.promise];case 3:return s.sent(),[3,6];case 4:return[4,i];case 5:s.sent(),s.label=6;case 6:return r=n.next(),[3,2];case 7:return[3,10];case 8:return a={error:s.sent()},[3,10];case 9:try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(a)throw a.error}
2return[7];case 10:if(!this[e].length)return[3,12];return[4,this.runQueuedFunctions(e)];case 11:s.sent(),s.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,n){var r=(0,D.__assign)((0,D.__assign)((0,D.__assign)({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t});return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),eT(this.dispatch(r))},e.prototype.identify=function(e,t){var n=eE(e,t);return this.userProperties=this.getOperationAppliedUserProperties(n.user_properties),eT(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,r){var i=eS(e,t,n,r);return eT(this.dispatch(i))},e.prototype.setGroup=function(e,t,n){var r=eA(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),eT(this.dispatch(r))},e.prototype.revenue=function(e,t){var n=(0,D.__assign)((0,D.__assign)({},t),{event_type:m.REVENUE,event_properties:e.getEventProperties()});return eT(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),eT())},e.prototype._addPlugin=function(e){return eT(this.timeline.register(e,this.config))},e.prototype.remove=function(e){return this.isReady?this._removePlugin(e):(this.q.push(this._removePlugin.bind(this,e)),eT())},e.prototype._removePlugin=function(e){return eT(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(eh(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t=this;return(0,D.__generator)(this,function(n){return this.isReady?[2,this.process(e)]:[2,new Promise(function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))})]})})},e.prototype.getOperationAppliedUserProperties=function(e){var t,n=null!=(t=this.userProperties)?t:{},r=(0,D.__assign)({},n);if(void 0===e)return r;var i={};return Object.keys(e).forEach(function(t){Object.values(_).includes(t)||(i[t]=e[t])}),ef.forEach(function(t){if(Object.keys(e).includes(t)){var n=e[t];switch(t){case _.CLEAR_ALL:Object.keys(r).forEach(function(e){delete r[e]});break;case _.UNSET:Object.keys(n).forEach(function(e){delete r[e]});break;case _.SET:Object.assign(r,n)}}}),Object.assign(r,i),r},e.prototype.process=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t,n;return(0,D.__generator)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,2,,3]),this.config.optOut)return[2,eh(e,0,"Event skipped due to optOut config")];return e.event_type===m.IDENTIFY&&this.timeline.onIdentityChanged({userProperties:this.userProperties}),[4,this.timeline.push(e)];case 1:return 200===(t=r.sent()).code?this.config.loggerProvider.log(t.message):100===t.code?this.config.loggerProvider.warn(t.message):this.config.loggerProvider.error(t.message),[2,t];case 2:return n=String(r.sent()),this.config.loggerProvider.error(n),[2,t=eh(e,0,n)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){this.isReady?this._setOptOut(e):this.q.push(this._setOptOut.bind(this,!!e))},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.config.optOut=!!e,this.timeline.onOptOutChanged(e))},e.prototype.flush=function(){return eT(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});return void 0===t?void this.config.loggerProvider.debug("Cannot find plugin with name ".concat(e)):t},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return t instanceof e})},e}(),eI=function(e,t){var n=Math.max(t,1);return e.reduce(function(e,t,r){var i=Math.floor(r/n);return e[i]||(e[i]=[]),e[i].push(t),e},[])},eR="Amplitude Logger ",eb=function(){function e(){this.logLevel=v.None}return e.prototype.disable=function(){this.logLevel=v.None},e.prototype.enable=function(e){void 0===e&&(e=v.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<v.Verbose||console.log("".concat(eR,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<v.Warn||console.warn("".concat(eR,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<v.Error||console.error("".concat(eR,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<v.Debug||console.log("".concat(eR,"[Debug]: ").concat(e.join(" ")))},e}();e.s(["Logger",0,eb],424670);var eO=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:G,logLevel:v.Warn,loggerProvider:new eb,offline:!1,optOut:!1,serverUrl:V,serverZone:"US",useBatch:!1}},eN=function(){function e(e){this._optOut=!1;var t,n,r,i,a=eO();this.apiKey=e.apiKey,this.flushIntervalMillis=null!=(t=e.flushIntervalMillis)?t:a.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||a.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||a.flushQueueSize,this.instanceName=e.instanceName||a.instanceName,this.loggerProvider=e.loggerProvider||a.loggerProvider,this.logLevel=null!=(n=e.logLevel)?n:a.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:a.offline,this.optOut=null!=(r=e.optOut)?r:a.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||a.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!=(i=e.useBatch)?i:a.useBatch,this.loggerProvider.enable(this.logLevel);var o=eC(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=o.serverZone,this.serverUrl=o.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e}
2,enumerable:!1,configurable:!0}),e}(),eC=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=eO().serverZone),void 0===n&&(n=eO().useBatch),e)return{serverUrl:e,serverZone:void 0};var r,i=["US","EU"].includes(t)?t:eO().serverZone;return{serverZone:i,serverUrl:(r=n,"EU"===i?r?q:B:r?H:V)}},ek=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}();function eL(e){return e>=200&&e<300}e.s(["Config",0,eN,"RequestMetadata",0,ek,"createServerConfig",0,eC],422831);var eD=new Set([V,B,H,q]);function eP(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var ew=function(){function e(e){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[],this.diagnosticsClient=null==e?void 0:e.diagnosticsClient}return e.prototype.setup=function(e){var t;return(0,D.__awaiter)(this,void 0,void 0,function(){var n,r=this;return(0,D.__generator)(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(x,"_").concat(this.config.apiKey.substring(0,10)),[4,null==(t=this.config.storageProvider)?void 0:t.get(this.storageKey)];case 1:return(n=i.sent())&&n.length>0&&Promise.all(n.map(function(e){return r.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=e_()),new Promise(function(n){t.queue.push({event:e,attempts:0,callback:function(e){return n(e)},timeout:0}),t.schedule(t.config.flushIntervalMillis),t.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(e){var t=this;return e.filter(function(e){return e.attempts+=1,e.attempts<t.config.flushMaxRetries||(t.fulfillRequest([e],500,"Event rejected due to exceeded retry count"),!1)})},e.prototype.scheduleEvents=function(e){var t=this;e.forEach(function(e){t.schedule(0===e.timeout?t.config.flushIntervalMillis:e.timeout)})},e.prototype.schedule=function(e){var t=this;if(!this.config.offline&&(null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout)){this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,this.scheduleId=setTimeout(function(){t.queue=t.queue.map(function(e){return e.timeout=0,e}),t.flush(!0)},e);return}},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(e){return void 0===e&&(e=!1),(0,D.__awaiter)(this,void 0,void 0,function(){var t,n,r=this;return(0,D.__generator)(this,function(i){switch(i.label){case 0:if(this.config.offline)return this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2];if(this.flushId)return this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2];return this.flushId=this.scheduleId,this.resetSchedule(),t=[],n=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):n.push(e)}),[4,eI(t,this.config.flushQueueSize).reduce(function(t,n){return(0,D.__awaiter)(r,void 0,void 0,function(){return(0,D.__generator)(this,function(r){switch(r.label){case 0:return[4,t];case 1:return r.sent(),[4,this.send(n,e)];case 2:return[2,r.sent()]}})})},Promise.resolve())];case 1:return i.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}})})},e.prototype.send=function(e,t){var n;return void 0===t&&(t=!0),(0,D.__awaiter)(this,void 0,void 0,function(){var r,i,a,o,s;return(0,D.__generator)(this,function(l){var u,c,d;switch(l.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];r={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,(0,D.__rest)(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new ek,l.label=1;case 1:return l.trys.push([1,3,,4]),u=i=eC(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,void 0===(c=this.config.enableRequestBodyCompression)&&(c=!1),a=!!eD.has(u)||c,[4,this.config.transportProvider.send(i,r,this.config._enableRequestBodyCompressionExperimental&&a)];case 2:if(null===(o=l.sent()))return this.fulfillRequest(e,0,"Unexpected error occurred"),[2];if(!t)return"body"in o?this.fulfillRequest(e,o.statusCode,"".concat(o.status,": ").concat(eP(o))):this.fulfillRequest(e,o.statusCode,o.status),[2];return this.handleResponse(o,e),[3,4];case 3:return s=(d=l.sent())instanceof Error?d.message:String(d),this.config.loggerProvider.error(s),null==(n=this.diagnosticsClient)||n.recordEvent("analytics.events.unsuccessful.from.catch.error",{events:e.map(function(e){return e.event.event_type}),message:s,stack_trace:P()}),this.handleResponse({status:S.Failed,statusCode:0},e),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(e,t){eL(e.statusCode)||null==(n=this.diagnosticsClient)||n.recordEvent("analytics.events.unsuccessful",{events:t.map(function(e){return e.event.event_type}),code:e.statusCode,status:e.status,body:eP(e),stack_trace:P()});var n,r=e.status;switch(r){case S.Success:this.handleSuccessResponse(e,t);break;case S.Invalid:this.handleInvalidResponse(e,t);break;case S.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case S.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(r,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,"Event tracked successfully")},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith("Invalid API key"))return void this.fulfillRequest(t,e.statusCode,e.body.error);var r=new Set((0,D.__spreadArray)((0,D.__spreadArray)((0,D.__spreadArray)((0,D.__spreadArray)([],(0,D.__read)(Object.values(e.body.eventsWithInvalidFields)),!1),(0,D.__read)(Object.values(e.body.eventsWithMissingFields)),!1),(0,D.__read)(Object.values(e.body.eventsWithInvalidIdLengths)),!1),(0,D.__read)(e.body.silencedEvents),!1).flat()),i=t.filter(function(t,i){return!r.has(i)||void n.fulfillRequest([t],e.statusCode,e.body.error)});i.length>0&&this.config.loggerProvider.warn(eP(e));
2var a=this.removeEventsExceedFlushMaxRetries(i);this.scheduleEvents(a)},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1===t.length)return void this.fulfillRequest(t,e.statusCode,e.body.error);this.config.loggerProvider.warn(eP(e)),this.config.flushQueueSize/=2;var n=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(n)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),a=e.body.throttledEvents,o=new Set(r),s=new Set(i),l=new Set(a),u=t.filter(function(t,r){return t.event.user_id&&o.has(t.event.user_id)||t.event.device_id&&s.has(t.event.device_id)?void n.fulfillRequest([t],e.statusCode,e.body.error):(l.has(r)&&(t.timeout=n.throttleTimeout),!0)});u.length>0&&this.config.loggerProvider.warn(eP(e));var c=this.removeEventsExceedFlushMaxRetries(u);this.scheduleEvents(c)},e.prototype.handleOtherResponse=function(e){var t=this,n=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),r=this.removeEventsExceedFlushMaxRetries(n);this.scheduleEvents(r)},e.prototype.fulfillRequest=function(e,t,n){var r,i,a;eL(t)?null==(a=this.diagnosticsClient)||a.increment("analytics.events.sent",e.length):(null==(r=this.diagnosticsClient)||r.increment("analytics.events.dropped",e.length),null==(i=this.diagnosticsClient)||i.recordEvent("analytics.events.dropped",{events:e.map(function(e){return e.event.event_type}),code:t,message:n,stack_trace:P()})),this.removeEvents(e),e.forEach(function(e){return e.callback(eh(e.event,t,n))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map(function(e){return e.event});this.config.storageProvider.set(this.storageKey,e)}},e.prototype.removeEvents=function(e){this.queue=this.queue.filter(function(t){return!e.some(function(e){return e.event.insert_id===t.event.insert_id})}),this.saveEvents()},e}(),eF=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setCurrency=function(e){return this.currency=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setReceipt=function(e){return this.receipt=e,this},e.prototype.setReceiptSig=function(e){return this.receiptSig=e,this},e.prototype.setEventProperties=function(e){try{var t=JSON.parse(JSON.stringify(e));ec(t)&&(this.properties=t)}catch(e){}return this},e.prototype.getEventProperties=function(){var e=this.properties?(0,D.__assign)({},this.properties):{};return e[A.REVENUE_PRODUCT_ID]=this.productId,e[A.REVENUE_QUANTITY]=this.quantity,e[A.REVENUE_PRICE]=this.price,e[A.REVENUE_TYPE]=this.revenueType,e[A.REVENUE_CURRENCY]=this.currency,e[A.REVENUE]=this.revenue,e[A.RECEIPT]=this.receipt,e[A.RECEIPT_SIG]=this.receiptSig,e},e}();(s=A||(A={})).REVENUE_PRODUCT_ID="$productId",s.REVENUE_QUANTITY="$quantity",s.REVENUE_PRICE="$price",s.REVENUE_TYPE="$revenueType",s.REVENUE_CURRENCY="$currency",s.REVENUE="$revenue",s.RECEIPT="$receipt",s.RECEIPT_SIG="$receiptSig";var eU=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:eM(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),eM=function(){return"u">typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},ex=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),eG=function(){return(eG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function eV(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function eB(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}"function"==typeof SuppressedError&&SuppressedError;var eH=function(e,t){var n,r,i=typeof e;if(i!==typeof t)return!1;try{for(var a=eV(["string","number","boolean","undefined"]),o=a.next();!o.done;o=a.next())if(o.value===i)return e===t}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;var s=Array.isArray(e),l=Array.isArray(t);if(s!==l)return!1;if(s&&l){for(var u=0;u<e.length;u++)if(!eH(e[u],t[u]))return!1}else{if(!eH(Object.keys(e).sort(),Object.keys(t).sort()))return!1;var c=!0;return Object.keys(e).forEach(function(n){eH(e[n],t[n])||(c=!1)}),c}return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var eq=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=eG({},this.identity.userProperties),n=eG(eG({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},setOptOut:function(e){return n.optOut=e,this},updateUserProperties:function(e){var t,r,i,a,o,s,l=n.userProperties||{};try{for(var u=eV(Object.entries(e)),c=u.next();!c.done;c=u.next()){var d=eB(c.value,2),p=d[0],f=d[1];switch(p){case"$set":try{for(var h=(i=void 0,eV(Object.entries(f))),g=h.next();!g.done;g=h.next()){var v=eB(g.value,2),_=v[0],m=v[1];l[_]=m}}catch(e){i={error:e}}finally{try{g&&!g.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}break;case"$unset":try{for(var E=(o=void 0,eV(Object.keys(f))),S=E.next();!S.done;S=E.next()){var _=S.value;delete l[_]}}catch(e){o={error:e}}finally{try{S&&!S.done&&(s=E.return)&&s.call(E)}finally{if(o)throw o.error}}break;case"$clearAll":l={}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return n.userProperties=l,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return eG({},this.identity)},e.prototype.setIdentity=function(e){var t=eG({},this.identity);this.identity=eG({},e),eH(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),eW="u">typeof globalThis?globalThis:e.g,eK=function(){function e(){this.identityStore=new eq,this.eventBridge=new ex,this.applicationContextProvider=new eU}return e.getInstance=function(t){return eW.analyticsConnectorInstances||(eW.analyticsConnectorInstances={}),eW.analyticsConnectorInstances[t]||(eW.analyticsConnectorInstances[t]=new e),eW.analyticsConnectorInstances[t]},e}();e.s(["AnalyticsConnector",0,eK],304230);var ej=function(e){return void 0===e&&(e=G),eK.getInstance(e)},eY=function(e,t){ej(t).identityStore.editIdentity().setUserId(e).commit()},e$=function(e,t){ej(t).identityStore.editIdentity().setDeviceId(e).commit()};e.s(["getAnalyticsConnector",0,ej,"setConnectorDeviceId",0,e$,"setConnectorUserId",0,eY],506229);var eQ=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},eJ=function(){function e(){this.name="identity",this.type="before",this.identityStore=ej().identityStore}return e.prototype.execute=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t;return(0,D.__generator)(this,function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(t){return e.instanceName&&(this.identityStore=ej(e.instanceName).identityStore),[2]})})},e}(),ez=function(){var e,t=(0,eg.getGlobalScope)();return(null==(e=null==t?void 0:t.location)?void 0:e.search)?t.location.search.substring(1).split("&").filter(
2Boolean).reduce(function(e,t){var n=t.split("=",2),r=eX(n[0]),i=eX(n[1]);return i&&(e[r]=i),e},{}):{}},eX=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},eZ=function(){function e(e,t){this.key="AMP_remote_config_".concat(e.substring(0,10)),this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug("Remote config localstorage failed to access: ",e),Promise.resolve(t)}if(null===e)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(t);try{var n=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(n))),Promise.resolve({remoteConfig:n.remoteConfig,lastFetch:new Date(n.lastFetch)})}catch(e){return this.logger.debug("Remote config localstorage failed to parse: ",e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(e){this.logger.debug("Remote config localstorage failed to set: ",e)}return Promise.resolve(!1)},e}(),e0=function(){function e(e,t,n,r){void 0===n&&(n="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.isLastFetchInvalidApiKey=!1,this.apiKey=e,this.serverUrl=r||("US"===n?"https://sr-client-cfg.amplitude.com/config":"https://sr-client-cfg.eu.amplitude.com/config"),this.logger=t,this.storage=new eZ(e,t)}return e.prototype.subscribe=function(e,t,n){var r=e_(),i={id:r,key:e,deliveryMode:t,callback:n};return this.callbackInfos.push(i),"all"===t?this.subscribeAll(i):this.subscribeWaitForRemote(i,t.timeout),r},e.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex(function(t){return t.id===e});return -1===t?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(e," doesn't exist.")),!1):(this.callbackInfos.splice(t,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(e,".")),!0)},e.prototype.updateConfigs=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){var e,t=this;return(0,D.__generator)(this,function(n){switch(n.label){case 0:if(this.lastSuccessfulFetch&&Date.now()-this.lastSuccessfulFetch<3e5)return this.logger.debug("Remote config client skipping updateConfigs: Too recent"),[2];return[4,this.getOrCreateFetchPromise()];case 1:return e=n.sent(),this.storage.setConfig(e),this.callbackInfos.forEach(function(n){t.sendCallback(n,e,"remote")}),[2]}})})},e.prototype.getOrCreateFetchPromise=function(){var e=this;return this.fetchPromise||(this.isLastFetchInvalidApiKey?(this.logger.debug("Remote config client skipping fetch: Invalid API key"),this.fetchPromise=Promise.resolve({remoteConfig:null,lastFetch:new Date}).finally(function(){e.fetchPromise=null})):this.fetchPromise=this.fetch().then(function(t){return null!==t.remoteConfig&&(e.lastSuccessfulFetch=Date.now()),t}).finally(function(){e.fetchPromise=null})),this.fetchPromise},e.prototype.subscribeAll=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t,n,r,i=this;return(0,D.__generator)(this,function(a){switch(a.label){case 0:return t=this.getOrCreateFetchPromise().then(function(t){i.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(t))),i.sendCallback(e,t,"remote"),i.storage.setConfig(t)}),n=this.storage.fetchConfig().then(function(e){return e}),[4,Promise.race([t,n])];case 1:return void 0!==(r=a.sent())&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(r))),null!==r.remoteConfig?this.sendCallback(e,r,"cache"):this.logger.debug("Remote config client skips sending c
2allback because cache is empty (first time user).")),[4,t];case 2:return a.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(e,t){return(0,D.__awaiter)(this,void 0,void 0,function(){var n,r;return(0,D.__generator)(this,function(i){switch(i.label){case 0:n=new Promise(function(e,n){setTimeout(function(){n("Timeout exceeded")},t)}),i.label=1;case 1:return i.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),n])];case 2:return r=i.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(e,r,"remote"),this.storage.setConfig(r),[3,5];case 3:return i.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return null!==(r=i.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(e,r,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(e,r,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(e,t,n){var r;e.lastCallback=new Date,r=e.key?e.key.split(".").reduce(function(e,t){return null===e?e:t in e?e[t]:null},t.remoteConfig):t.remoteConfig,e.callback(r,n,t.lastFetch)},e.prototype.fetch=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=1e3),(0,D.__awaiter)(this,void 0,void 0,function(){var n,r,i,a,o,s,l=this;return(0,D.__generator)(this,function(u){switch(u.label){case 0:n=t/e,r={remoteConfig:null,lastFetch:new Date},i=function(r){var i,o,s,u,c,d;return(0,D.__generator)(this,function(p){switch(p.label){case 0:i=!0,o=new AbortController,s=setTimeout(function(){return o.abort()},t),p.label=1;case 1:return p.trys.push([1,7,8,9]),[4,fetch(a.getUrlParams(),{method:"GET",headers:{Accept:"*/*"},signal:o.signal})];case 2:if((u=p.sent()).ok)return[3,4];return[4,u.text()];case 3:return c=p.sent(),a.logger.debug("Remote config client fetch with retry time ".concat(e," failed with ").concat(u.status,": ").concat(c)),401===u.status||403===u.status?(a.logger.error("Remote config client fetch failed with ".concat(u.status,". Invalid API key; future fetches will be skipped.")),a.isLastFetchInvalidApiKey=!0,i=!1):u.status>=400&&u.status<500&&429!==u.status&&(i=!1),[3,6];case 4:return[4,u.json()];case 5:return[2,{value:{remoteConfig:p.sent(),lastFetch:new Date}}];case 6:return[3,9];case 7:return(d=p.sent())instanceof Error&&"AbortError"===d.name?a.logger.debug("Remote config client fetch with retry time ".concat(e," timed out after ").concat(t,"ms")):a.logger.debug("Remote config client fetch with retry time ".concat(e," is rejected because: "),d),[3,9];case 8:return clearTimeout(s),[7];case 9:if(!i)return[2,"break"];if(!(r<e-1))return[3,11];return[4,new Promise(function(e){return setTimeout(e,l.getJitterDelay(n))})];case 10:p.sent(),p.label=11;case 11:return[2]}})},a=this,o=0,u.label=1;case 1:if(!(o<e))return[3,4];return[5,i(o)];case 2:if("object"==typeof(s=u.sent()))return[2,s.value];if("break"===s)return[3,4];u.label=3;case 3:return o++,[3,1];case 4:return[2,r]}})})},e.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),n=new URLSearchParams;return n.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(n.toString())},e.CONFIG_GROUP="browser",e}();e.s(["RemoteConfigClient",0,e0],795037);var e1="tags",e2="counters",e3="histograms",e4="events",e5="internal",e6="last_flush_timestamp",e7=function(){function e(e,t){this.dbPromise=null,this.logger=t,this.dbName="AMP_diagnostics_".concat(e.substring(0,10))}return e.isSupported=function(){var e;return(null==(e=(0,eg.getGlobalScope)())?void 0:e.indexedDB)!==void 0},e.prototype.getDB=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(e){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]})})},e.prototype.openDB=function(){var e=this;return new Promise(function(t,n){var r=indexedDB.open(e.dbName,1);r.onerror=function(){e.dbPromise=null,n(Error("Failed to open IndexedDB"))},r.onsuccess=function(){var n=r.result;
2n.onclose=function(){e.dbPromise=null,e.logger.debug("DiagnosticsStorage: DB connection closed.")},n.onerror=function(t){e.logger.debug("DiagnosticsStorage: A global database error occurred.",t),n.close()},t(n)},r.onupgradeneeded=function(t){var n=t.target.result;e.createTables(n)}})},e.prototype.createTables=function(e){e.objectStoreNames.contains(e1)||e.createObjectStore(e1,{keyPath:"key"}),e.objectStoreNames.contains(e2)||e.createObjectStore(e2,{keyPath:"key"}),e.objectStoreNames.contains(e3)||e.createObjectStore(e3,{keyPath:"key"}),e.objectStoreNames.contains(e4)||e.createObjectStore(e4,{keyPath:"id",autoIncrement:!0}).createIndex("time_idx","time",{unique:!1}),e.objectStoreNames.contains(e5)||e.createObjectStore(e5,{keyPath:"key"})},e.prototype.setTags=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t,n,r,i=this;return(0,D.__generator)(this,function(a){switch(a.label){case 0:if(a.trys.push([0,2,,3]),0===Object.entries(e).length)return[2];return[4,this.getDB()];case 1:return n=(t=a.sent().transaction([e1],"readwrite")).objectStore(e1),[2,new Promise(function(r){var a=Object.entries(e);t.oncomplete=function(){r()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to set tags",e),r()},a.forEach(function(e){var t=(0,D.__read)(e,2),r=t[0],a=t[1];n.put({key:r,value:a}).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to set tag",r,a,e)}})})];case 2:return r=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",r),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t,n,r,i=this;return(0,D.__generator)(this,function(a){switch(a.label){case 0:if(a.trys.push([0,2,,3]),0===Object.entries(e).length)return[2];return[4,this.getDB()];case 1:return n=(t=a.sent().transaction([e2],"readwrite")).objectStore(e2),[2,new Promise(function(r){var a=Object.entries(e);t.oncomplete=function(){r()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to increment counters",e),r()},a.forEach(function(e){var t=(0,D.__read)(e,2),r=t[0],a=t[1],o=n.get(r);o.onsuccess=function(){var e=o.result,t=e?e.value:0;n.put({key:r,value:t+a}).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to update counter",r,e)}},o.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to read existing counter",r,e)}})})];case 2:return r=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",r),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t,n,r,i=this;return(0,D.__generator)(this,function(a){switch(a.label){case 0:if(a.trys.push([0,2,,3]),0===Object.entries(e).length)return[2];return[4,this.getDB()];case 1:return n=(t=a.sent().transaction([e3],"readwrite")).objectStore(e3),[2,new Promise(function(r){var a=Object.entries(e);t.oncomplete=function(){r()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to set histogram stats",e),r()},a.forEach(function(e){var t=(0,D.__read)(e,2),r=t[0],a=t[1],o=n.get(r);o.onsuccess=function(){var e,t=o.result;e=t?{key:r,count:t.count+a.count,min:Math.min(t.min,a.min),max:Math.max(t.max,a.max),sum:t.sum+a.sum}:{key:r,count:a.count,min:a.min,max:a.max,sum:a.sum},n.put(e).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to set histogram stats",r,e)}},o.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",r,e)}})})];case 2:return r=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",r),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t,n,r,i=this;return(0,D.__generator)(this,function(a){switch(a.label){case 0:if(a.trys.push([0,2,,3]),0===e.length)return[2];return[4,this.getDB()];case 1:return n=(t=a.sent().transaction([e4],"readwrite")).objectStore(e4),[2,new Promise(function(r){t.oncomplete=function(){r()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to add event records",e),r()};var a=n.count();a.onsuccess=function(){var t=Math.max(0,10-a.result);t<e.length&&i.logger.debug("DiagnosticsStorage: Only added ".concat(t," of ").concat(e.length," events due to storage limit")),e.slice(0,t).forEach(function(e){n.add(e).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to add event record",e)}})},a.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to count existing events",e)}})];case 2:return r=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",r),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(e,t){return(0,D.__awaiter)(this,void 0,void 0,function(){var n,r,i;return(0,D.__generator)(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.getDB()];case 1:return r=(n=a.sent().transaction([e5],"readwrite")).objectStore(e5),[2,new Promise(function(i,a){n.onabort=function(){return a(Error("Failed to set internal value"))};var o=r.put({key:e,value:t});o.onsuccess=function(){return i()},o.onerror=function(){return a(Error("Failed to set internal value"))}})];case 2:return i=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",i),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t,n,r;return(0,D.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=(t=i.sent().transaction([e5],"readonly")).objectStore(e5),[2,new Promise(function(r,i){t.onabort=function(){return i(Error("Failed to get internal value"))};var a=n.get(e);a.onsuccess=function(){return r(a.result)},a.onerror=function(){return i(Error("Failed to get internal value"))}})];case 2:return r=i.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",r),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){var e,t;return(0,D.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getInternal(e6)];case 1:return[2,(e=n.sent())?parseInt(e.value,10):void 0];case 2:return t=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",t),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t;return(0,D.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.setInternal(e6,e.toString())];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",t),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).clear();i.onsuccess=function(){return n()},i.onerror=function(){return r(Error("Failed to clear table ".concat(t)))}})},e.prototype.getAllAndClear=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){var e,t,n,r,i,a,o;return(0,D.__generator)(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,5]),[4,this.getDB()];case 1:return e=s.sent().transaction([e1,e2,e3,e4],"readwrite"),[4,Promise.all([this.getAllFromStore(e,e1),this.getAllFromStore(e,e2),this.getAllFromStore(e,e3),this.getAllFromStore(e,e4)])];case 2:return n=(t=D.__read.apply(void 0,[s.sent(),4]))[0],r=t[1],i=t[2],a=t[3],[4,Promise.all([this.clearTable(e,e2),this.clearTable(e,e3),this.clearTable(e,e4)])];case 3:return s.sent(),[2,{tags:n,counters:r,histogramStats:i,events:a}];case 4:return o=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",o),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).getAll();i.onsuccess=function(){return n(i.result)},i.onerror=function(){return r(Error("Failed to get all from ".concat(t)))}})},e}(),e8=function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t}
2,e9=function(e,t){return 31*Math.abs(e8(e.toString()))%1e5/1e5<t};e.s(["generateHashCode",0,e8,"isTimestampInSampleTemp",0,e9],717491);var te=function(){var e=(0,eg.getGlobalScope)();if(!e)return[];var t=e.__AMPLITUDE_SCRIPT_URL__;return Array.isArray(t)?t:"string"==typeof t?[t]:[]},tt=function(e){var t=(0,eg.getGlobalScope)();if(t&&"function"==typeof t.addEventListener){var n=function(t){e.recordEvent("sdk.error.uncaught",(0,D.__assign)({type:t.type,message:t.message,filename:t.filename,error_name:t.errorName,stack:t.stack},t.metadata))};t.addEventListener("error",function(e){var t=e.error instanceof Error?e.error:void 0,r=null==t?void 0:t.stack,i=tn({filename:e.filename,stack:r});i&&n({type:"error",message:e.message,stack:r,filename:e.filename,errorName:null==t?void 0:t.name,metadata:{colno:e.colno,lineno:e.lineno,isTrusted:e.isTrusted,matchReason:i}})},!0),t.addEventListener("unhandledrejection",function(e){var t,r=e.reason instanceof Error?e.reason:void 0,i=null==r?void 0:r.stack,a=tr(i),o=tn({filename:a,stack:i});o&&n({type:"unhandledrejection",message:null!=(t=null==r?void 0:r.message)?t:ti(e.reason),stack:i,filename:a,errorName:null==r?void 0:r.name,metadata:{isTrusted:e.isTrusted,matchReason:o}})},!0)}},tn=function(e){var t,n,r=te();if(0!==r.length)try{for(var i=(0,D.__values)(r),a=i.next();!a.done;a=i.next()){var o=a.value;if(e.filename&&e.filename.includes(o))return"filename";if(e.stack&&e.stack.includes(o))return"stack"}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},tr=function(e){if(e){var t=e.match(/(https?:\/\/\S+?)(?=[)\s]|$)/);return t?t[1]:void 0}},ti=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(e){return"[object Object]"}},ta=function(){function e(e,t,n,r){void 0===n&&(n="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=e,this.logger=t,this.serverUrl="US"===n?"https://diagnostics.prod.us-west-2.amplitude.com/v1/capture":"https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(r,null,2)),this.config=(0,D.__assign)({enabled:!0,sampleRate:0},r),this.startTimestamp=Date.now(),this.shouldTrack=e9(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,e7.isSupported()?this.storage=new e7(e,t):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&(this.increment("sdk.diagnostics.sampled.in.and.enabled"),tt(this))}return e.prototype.isStorageAndTrackEnabled=function(){return!!this.storage&&!!this.shouldTrack},e.prototype.setTag=function(e,t){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryTags).length>=1e4)return void this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit");this.inMemoryTags[e]=t,this.startTimersIfNeeded()}},e.prototype.increment=function(e,t){if(void 0===t&&(t=1),this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryCounters).length>=1e4)return void this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit");this.inMemoryCounters[e]=(this.inMemoryCounters[e]||0)+t,this.startTimersIfNeeded()}},e.prototype.recordHistogram=function(e,t){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryHistograms).length>=1e4)return void this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");var n=this.inMemoryHistograms[e];n?(n.count+=1,n.min=Math.min(n.min,t),n.max=Math.max(n.max,t),n.sum+=t):this.inMemoryHistograms[e]={count:1,min:t,max:t,sum:t},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(e,t){if(this.isStorageAndTrackEnabled()){if(this.inMemoryEvents.length>=10)return void this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit");this.inMemoryEvents.push({event_name:e,time:Date.now(),event_properties:t}),this.startTimersIfNeeded()}},e.prototype.startTimersIfNeeded=function(){var e=this;this.saveTimer||(this.saveTimer=setTimeout(function(){e.saveAllDataToStorage().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to save all data to storage",t)}).finally(function(){e.saveTimer=null})},1e3)),this.flushTimer||(this.flushTimer=setTimeout(function(){e._flush().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to flush",t)}).finally(function(){e.flushTimer=null})},3e5))},e.prototype.saveAllDataToStorage=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){var e,t,n,r;return(0,D.__generator)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2];return e=(0,D.__assign)({},this.inMemoryTags),t=(0,D.__assign)({},this.inMemoryCounters),n=(0,D.__assign)({},this.inMemoryHistograms),r=(0,D.__spreadArray)([],(0,D.__read)(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(e),this.storage.incrementCounters(t),this.storage.setHistogramStats(n),this.storage.addEventRecords(r)])];case 1:return i.sent(),[2]}})})},e.prototype._flush=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){var e,t,n,r,i,a,o,s,l,u;return(0,D.__generator)(this,function(c){switch(c.label){case 0:if(!this.storage)return[2];return[4,this.saveAllDataToStorage()];case 1:return c.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:if(t=(e=c.sent()).tags,n=e.counters,r=e.histogramStats,i=e.events,this.storage.setLastFlushTimestamp(Date.now()),a={},t.forEach(function(e){a[e.key]=e.value}),o={}
2,n.forEach(function(e){o[e.key]=e.value}),s={},r.forEach(function(e){s[e.key]={count:e.count,min:e.min,max:e.max,avg:Math.round(e.sum/e.count*100)/100}}),l=i.map(function(e){return{event_name:e.event_name,time:e.time,event_properties:e.event_properties}}),0===Object.keys(o).length&&0===Object.keys(s).length&&0===l.length)return[2];return u={tags:a,histogram:s,counters:o,events:l},this.fetch(u),[2]}})})},e.prototype.fetch=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t;return(0,D.__generator)(this,function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),!(0,eg.getGlobalScope)())throw Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(e)})];case 1:if(!n.sent().ok)return this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2];return this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3];case 2:return t=n.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",t),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){var e,t,n;return(0,D.__generator)(this,function(r){switch(r.label){case 0:if(!this.storage)return[2];return e=Date.now(),[4,this.storage.getLastFlushTimestamp()];case 1:if(-1===(t=r.sent()||-1))return this.storage.setLastFlushTimestamp(e),this._setFlushTimer(3e5),[2];return(n=e-t)>=3e5?this._flush():this._setFlushTimer(3e5-n),[2]}})})},e.prototype._setFlushTimer=function(e){var t=this;this.flushTimer=setTimeout(function(){t._flush().catch(function(e){t.logger.debug("DiagnosticsClient: Failed to flush",e)}).finally(function(){t.flushTimer=null})},e)},e.prototype._setSampleRate=function(e){this.logger.debug("DiagnosticsClient: Setting sample rate to",e),this.config.sampleRate=e,this.shouldTrack=e9(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e}(),to=e.i(422284),ts=to.default||to,tl=function(e,t){return"boolean"==typeof e?e:(null==e?void 0:e[t])!==!1},tu=function(e){return tl(e,"attribution")},tc=function(e){return tl(e,"formInteractions")},td=function(e){return tl(e,"pageViews")},tp=function(e){return tl(e,"sessions")},tf=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.networkTracking||"object"==typeof e.networkTracking)},th=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},tg=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.frustrationInteractions||"object"==typeof e.frustrationInteractions)},tv=function(e){if(th(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},t_=function(e){if(tg(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.frustrationInteractions)return e.autocapture.frustrationInteractions},tm=function(e){var t;if(tf(e.autocapture)){var n=void 0;return"object"==typeof e.autocapture&&"object"==typeof e.autocapture.networkTracking?n=e.autocapture.networkTracking:e.networkTrackingOptions&&(n=e.networkTrackingOptions),(0,D.__assign)((0,D.__assign)({},n),{captureRules:null==(t=null==n?void 0:n.captureRules)?void 0:t.map(function(t){var n,r,i;if((null==(n=t.urls)?void 0:n.length)&&(null==(r=t.hosts)?void 0:r.length)){var a=JSON.stringify(t.hosts),o=JSON.stringify(t.urls);return null==(i=e.loggerProvider)||i.warn("Found network capture rule with both urls='".concat(o,"' and hosts='").concat(a,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),(0,D.__assign)((0,D.__assign)({},t),{hosts:void 0})}return t})})}},tE=function(e){var t,n=function(){return!1},r=void 0,i=e.pageCounter;return td(e.defaultTracking)&&(n=void 0,t=void 0,e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.pageViews&&"object"==typeof e.defaultTracking.pageViews&&("trackOn"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(t=e.defaultTracking.pageViews.eventType))),{trackOn:n,trackHistoryChanges:r,eventType:t,pageCounter:i}},tS=function(e){if(tc(e.defaultTracking)&&e.defaultTracking&&"object"==typeof e.defaultTracking&&"object"==typeof e.defaultTracking.formInteractions)return e.defaultTracking.formInteractions},tA=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,a=r.args,o=r.resolve,s=e&&e[i];if("function"==typeof s){var l=s.apply(e,a);"function"==typeof o&&o(null==l?void 0:l.promise)}}return e},tT=function(e){return e&&void 0!==e._q},ty=function(){if("u"<typeof navigator)return"";var e,t,n,r,i=navigator.userLanguage;return null!=(r=null!=(n=null!=(t=null==(e=navigator.languages)?void 0:e[0])?t:navigator.language)?n:i)?r:""},tI="2.40.0",tR="amplitude-ts",tb=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(tR,"/").concat(tI),"u">typeof navigator&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){var t,n;return(0,D.__awaiter)(this,void 0,void 0,function(){var r,i,a;return(0,D.__generator)(this,function(o){return r=new Date().getTime(),i=null!=(t=this.config.lastEventId)?t:-1,a=null!=(n=e.event_id)?n:i+1,this.config.lastEventId=a,e.time||(this.config.lastEventTime=r),[2,(0,D.__assign)((0,D.__assign)((0,D.__assign)((0,D.__assign)((0,D.__assign)((0,D.__assign)((0,D.__assign)((0,D.__assign)({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:r},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:ty()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:e_(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:a,library:this.library,user_agent:this.userAgent})]})})},e}(),tO=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t;return(0,D.__generator)(this,function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return[2,(t=n.sent())?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),tN=function(){var e,t=(0,eg.getGlobalScope)();return null==(e=null==t?void 0:t.navigator)?void 0:e.locks},tC=function(){function e(e,t){void 0===t&&(t={}),this.options=(0,D.__assign)({},e),this.config=t}return e.prototype.isEnabled=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){var t,n,r,i=this;return(0,D.__generator)(this,function(a){switch(a.label){case 0:return t="AMP_TEST",n=new e((0,D.__assign)({},this.options)),r=String(Date.now()),[4,n.transaction(t,function(e){var n,a;try{e.set(r);var o=e.get()===r;return!o&&i.config.diagnosticsClient&&(null==(n=i.config.diagnosticsClient)||n.recordEvent("cookies.isEnabled.failure",{reason:"Test Value mismatch",testKey:t,testValue:r,sync:!0})),o}catch(e){if(i.config.diagnosticsClient){var s=e instanceof Error?e.message:String(e);null==(a=i.config.diagnosticsClient)||a.recordEvent("cookies.isEnabled.failure",{reason:"Cookie getter/setter failed",testKey:t,testValue:r,error:s,sync:!0})}return!1}
2finally{e.set(null)}})];case 1:return[2,a.sent()]}})})},e.prototype.get=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t;return(0,D.__generator)(this,function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:return t=n.sent(),[2,this.decodeCookieValue(e,t)]}})})},e.prototype.decodeCookieValue=function(e,t){if(t)try{var n=tD(t);if(void 0===n)return void console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(t));return JSON.parse(n)}catch(n){console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(e,", value: ").concat(t));return}},e.prototype.getSync=function(e){var t=this.getRawSync(e);return this.decodeCookieValue(e,t)},e.prototype.getRaw=function(e){var t,n;return(0,D.__awaiter)(this,void 0,void 0,function(){var r,i,a,o,s,l,u,c;return(0,D.__generator)(this,function(d){switch(d.label){case 0:r=(0,eg.getGlobalScope)(),d.label=1;case 1:if(d.trys.push([1,4,,5]),!(i=null==r?void 0:r.cookieStore))return[3,3];return[4,i.getAll(e)];case 2:if(a=d.sent()){a.length>1&&(null==(t=this.config.diagnosticsClient)||t.recordEvent("cookies.duplicate",{cookies:a.map(function(e){return e.domain})}),null==(n=this.config.diagnosticsClient)||n.increment("cookies.duplicate.occurrence.cookieStore"));try{for(s=(o=(0,D.__values)(a)).next();!s.done;s=o.next())if(l=s.value,tP(l.domain,this.options.domain))return[2,l.value]}catch(e){u={error:e}}finally{try{s&&!s.done&&(c=o.return)&&c.call(o)}finally{if(u)throw u.error}}}d.label=3;case 3:return[3,5];case 4:return d.sent(),[3,5];case 5:return[2,this.getRawSync(e)]}})})},e.prototype.getRawSync=function(e){var t,n,r=this,i=(0,eg.getGlobalScope)(),a=(null!=(n=null==(t=null==i?void 0:i.document)?void 0:t.cookie.split("; "))?n:[]).filter(function(t){return 0===t.indexOf(e+"=")}),o=void 0,s=this.config.duplicateResolverFn;if("function"==typeof s&&a.length>1&&(o=a.find(function(t){var n;try{var i=s(t.substring(e.length+1));return i||null==(n=r.config.diagnosticsClient)||n.increment("cookies.duplicate.occurrence.document.cookie"),i}catch(e){return!1}})),o||(o=a[0]),o)return o.substring(e.length+1)},e.prototype.set=function(e,t){return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(n){return this.setSync(e,t),[2]})})},e.prototype.setSync=function(e,t){var n;try{var r=null!=(n=this.options.expirationDays)?n:0,i=null!==t?r:-1,a=void 0;if(i){var o=new Date;o.setTime(o.getTime()+24*i*36e5),a=o}var s="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t))));a&&(s+="; expires=".concat(a.toUTCString())),s+="; path=/",this.options.domain&&(s+="; domain=".concat(this.options.domain)),this.options.secure&&(s+="; Secure"),this.options.sameSite&&(s+="; SameSite=".concat(this.options.sameSite));var l=(0,eg.getGlobalScope)();(null==l?void 0:l.document)&&(l.document.cookie=s)}catch(t){var u=t instanceof Error?t.message:String(t);console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(u))}},e.prototype.remove=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}})})},e.prototype.reset=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(e){return[2]})})},e.isDomainWritable=function(t){return(0,D.__awaiter)(this,void 0,void 0,function(){var n,r;return(0,D.__generator)(this,function(i){switch(i.label){case 0:if(e.cachedTlds[t])return[2,!0];n="AMP_TLDTEST",r=new e({domain:"."+t}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r.transaction(n,function(n){if(e.cachedTlds[t])return!0;try{n.set(1);var r=!!n.get();return r&&(e.cachedTlds[t]=!0),r}finally{n.set(null)}})];case 2:return[2,!!i.sent()];case 3:return i.sent(),[2,!1];case 4:return[2]}})})},e.prototype.transaction=function(e,t){return(0,D.__awaiter)(this,void 0,void 0,function(){var n,r,i=this;return(0,D.__generator)(this,function(a){switch(a.label){case 0:if(n=tN(),r=function(){return t({get:function(){return i.getSync(e)},set:function(t){return i.setSync(e,t)}})},!n)return[2,r()];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,n.request("com.amplitude:cookie-lock:".concat(e),r)];case 2:return[2,a.sent()];case 3:return a.sent(),[2,r()];case 4:return[2]}})})},e.cachedTlds={},e}(),tk=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}},tL=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}},tD=function(e){var t;return null!=(t=tk(e))?t:tL(e)},tP=function(e,t){if(""===e&&""===t)return!0;
2if(!e||!t)return!1;var n=e.startsWith(".")?e.substring(1):e,r=t.startsWith(".")?t.substring(1):t;return n.toLowerCase()===r.toLowerCase()},tw=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),["AMP",t,e.substring(0,n)].filter(Boolean).join("_")},tF=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){var t,n,r;return(0,D.__generator)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t;return(0,D.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:if(!(t=n.sent()))return[2,void 0];return[2,JSON.parse(t)];case 2:return n.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(e){var t;return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(n){return[2,(null==(t=this.storage)?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){var n;return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(r){try{null==(n=this.storage)||n.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){var t;return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(n){try{null==(t=this.storage)||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(t){try{null==(e=this.storage)||e.clear()}catch(e){}return[2]})})},e}(),tU=function(e){function t(t){var n,r,i,a=this;try{i=null==(n=(0,eg.getGlobalScope)())?void 0:n.localStorage}catch(e){null==(r=null==t?void 0:t.loggerProvider)||r.debug("Failed to access localStorage. error=".concat(JSON.stringify(e))),i=void 0}return(a=e.call(this,i)||this).loggerProvider=null==t?void 0:t.loggerProvider,a}return(0,D.__extends)(t,e),t.prototype.set=function(t,n){var r;return(0,D.__awaiter)(this,void 0,void 0,function(){var i;return(0,D.__generator)(this,function(a){switch(a.label){case 0:if(!(Array.isArray(n)&&n.length>1e3))return[3,2];return i=n.length-1e3,[4,e.prototype.set.call(this,t,n.slice(0,1e3))];case 1:return a.sent(),null==(r=this.loggerProvider)||r.error("Failed to save ".concat(i," events because the queue length exceeded ").concat(1e3,".")),[3,4];case 2:return[4,e.prototype.set.call(this,t,n)];case 3:a.sent(),a.label=4;case 4:return[2]}})})},t}(tF),tM=function(e){function t(){var t;return e.call(this,null==(t=(0,eg.getGlobalScope)())?void 0:t.sessionStorage)||this}return(0,D.__extends)(t,e),t}(tF),tx=function(){function e(){}return e.prototype.send=function(e,t,n){return Promise.resolve(null)},e.prototype.buildResponse=function(e){if("object"!=typeof e)return null;var t,n,r,i,a,o,s,l,u,c,d,p,f,h,g,v,_,m,E,A,T,y,I=e.code||0,R=this.buildStatus(I);switch(R){case S.Success:return{status:R,statusCode:I,body:{eventsIngested:null!=(t=e.events_ingested)?t:0,payloadSizeBytes:null!=(n=e.payload_size_bytes)?n:0,serverUploadTime:null!=(r=e.server_upload_time)?r:0}};case S.Invalid:return{status:R,statusCode:I,body:{error:null!=(i=e.error)?i:"",missingField:null!=(a=e.missing_field)?a:"",eventsWithInvalidFields:null!=(o=e.events_with_invalid_fields)?o:{},eventsWithMissingFields:null!=(s=e.events_with_missing_fields)?s:{},eventsWithInvalidIdLengths:null!=(l=e.events_with_invalid_id_lengths)?l:{},epsThreshold:null!=(u=e.eps_threshold)?u:0,exceededDailyQuotaDevices:null!=(c=e.exceeded_daily_quota_devices)?c:{},silencedDevices:null!=(d=e.silenced_devices)?d:[],silencedEvents:null!=(p=e.silenced_events)?p:[],throttledDevices:null!=(f=e.throttled_devices)?f:{},throttledEvents:null!=(h=e.throttled_events)?h:[]}};case S.PayloadTooLarge:return{status:R,statusCode:I,body:{error:null!=(g=e.error)?g:""}};case S.RateLimit:return{status:R,statusCode:I,body:{error:null!=(v=e.error)?v:"",epsThreshold:null!=(_=e.eps_threshold)?_:0,throttledDevices:null!=(m=e.throttled_devices)?m:{},throttledUsers:null!=(E=e.throttled_users)?E:{},exceededDailyQuotaDevices:null!=(A=e.exceeded_daily_quota_devices)?A:{},exceededDailyQuotaUsers:null!=(T=e.exceeded_daily_quota_users)?T:{},throttledEvents:null!=(y=e.throttled_events)?y:[]}};case S.Timeout:default:return{status:R,statusCode:I}}},e.prototype.buildStatus=function(e){return eL(e)?S.Success:429===e?S.RateLimit:413===e?S.PayloadTooLarge:408===e?S.Timeout:e>
2=400&&e<500?S.Invalid:e>=500?S.Failed:S.Unknown},e}();function tG(){return"u">typeof CompressionStream}function tV(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t;return(0,D.__generator)(this,function(n){switch(n.label){case 0:if(void 0===(t=CompressionStream))return[2,void 0];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,new Response(new Blob([e]).stream().pipeThrough(new t("gzip"))).arrayBuffer()];case 2:return[2,n.sent()];case 3:return n.sent(),[2,void 0];case 4:return[2]}})})}e.s(["BaseTransport",0,tx],335566);var tB=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.state={done:4},n.customHeaders=t,n}return(0,D.__extends)(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),(0,D.__awaiter)(this,void 0,void 0,function(){var r=this;return(0,D.__generator)(this,function(i){return[2,new Promise(function(i,a){"u"<typeof XMLHttpRequest&&a(Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",e,!0),o.onreadystatechange=function(){if(o.readyState===r.state.done){var e=o.responseText;try{i(r.buildResponse(JSON.parse(e)))}catch(e){i(r.buildResponse({code:o.status}))}}};var s={"Content-Type":"application/json",Accept:"*/*"},l=JSON.stringify(t),u=n&&l.length>=2048&&tG(),c=function(e){var t,n;s=(0,D.__assign)((0,D.__assign)({},r.customHeaders),s);try{for(var i=(0,D.__values)(Object.entries(s)),a=i.next();!a.done;a=i.next()){var l=(0,D.__read)(a.value,2),u=l[0],c=l[1];o.setRequestHeader(u,c)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}o.send(e)};(0,D.__awaiter)(r,void 0,void 0,function(){var e;return(0,D.__generator)(this,function(t){switch(t.label){case 0:if(!u)return[3,2];return[4,tV(l)];case 1:return(e=t.sent())?(s["Content-Encoding"]="gzip",c(e)):c(l),[3,3];case 2:c(l),t.label=3;case 3:return[2]}})}).catch(a)})]})})},t}(tx),tH=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.customHeaders=t,n}return(0,D.__extends)(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),(0,D.__awaiter)(this,void 0,void 0,function(){var r,i,a,o,s,l,u;return(0,D.__generator)(this,function(c){switch(c.label){case 0:if("u"<typeof fetch)throw Error("FetchTransport is not supported");if(r=JSON.stringify(t),i=n&&r.length>=2048&&tG(),a=r,o={"Content-Type":"application/json",Accept:"*/*"},!i)return[3,2];return[4,tV(r)];case 1:(s=c.sent())&&(o["Content-Encoding"]="gzip",a=s),c.label=2;case 2:return[4,fetch(e,{headers:o=(0,D.__assign)((0,D.__assign)({},this.customHeaders),o),body:a,method:"POST"})];case 3:return[4,(l=c.sent()).text()];case 4:u=c.sent();try{return[2,this.buildResponse(JSON.parse(u))]}catch(e){return[2,this.buildResponse({code:l.status})]}}})})},t}(tx),tq=function(e){function t(){return e.call(this)||this}return(0,D.__extends)(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),(0,D.__awaiter)(this,void 0,void 0,function(){var n=this;return(0,D.__generator)(this,function(r){return[2,new Promise(function(r,i){var a=(0,eg.getGlobalScope)();if(!(null==a?void 0:a.navigator.sendBeacon))throw Error("SendBeaconTransport is not supported");try{var o=JSON.stringify(t);if(a.navigator.sendBeacon(e,o))return r(n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:o.length,server_upload_time:Date.now()}));return r(n.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(tx),tW=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},tK=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},tj="[Amplitude]",tY="".concat(tj," Form Started"),t$="".concat(tj," Form Submitted"),tQ="".concat(tj," File Downloaded"),tJ="session_start",tz="session_end",tX="".concat(tj," File Extension"),tZ="".concat(tj," File Name"),t0="".concat(tj," Link ID"),t1="".concat(tj," Link Text"),t2="".concat(tj," Link URL"),t3="".concat(tj," Form ID"),t4="".concat(tj," Form Name"),t5="".concat(tj," Form Destination"),t6="cookie",t7={always:"always",ifEmptyCampaign:"ifEmptyCampaign"},t8=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},t9=function(e,t,n,r,i,a){void 0===i&&(i=!0),e.referrer;var o=e.referring_domain,s=(0,D.__rest)(e,["referrer","referring_domain"]),l=t||{},u=(l.referrer,l.referring_domain),c=(0,D.__rest)(l,["referrer","referring_domain"]),d=n.excludeInternalReferrers;if(d){var p=nr(d,r);if(!(p instanceof TypeError)&&e.referring_domain&&ns(e.referring_domain,a)){if
2("always"===p)return ni(p,e.referring_domain,r),!1;else if("ifEmptyCampaign"===p&&Object.values((0,D.__assign)((0,D.__assign)({},e),{referring_domain:void 0,referrer:void 0})).every(function(e){return!e}))return ni(p,e.referring_domain,r),!1}}if(ne(n.excludeReferrers,e.referring_domain))return r.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!i&&Object.values(e).every(function(e){return!e})&&t)return r.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var f=JSON.stringify(s)!==JSON.stringify(c),h=t8(o||"")!==t8(u||""),g=!t||f||h;return g?r.debug("This is a new campaign. An $identify event will be sent."):r.debug("This is not a new campaign because it's the same as the previous one."),g},ne=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=""),e.some(function(e){return e instanceof RegExp?e.test(t):e===t})},nt=function(e,t){var n=t.startsWith(".")?t:".".concat(t);return!!(e.startsWith(".")?e:".".concat(e)).endsWith(n)},nn=function(e){var t=e;return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},nr=function(e,t){if(!0===e)return t7.always;if("object"==typeof e){var n=e.condition;if("string"==typeof n&&Object.keys(t7).includes(n))return n;if(void 0===n)return t7.always}var r="Invalid configuration provided for attribution.excludeInternalReferrers: ".concat(JSON.stringify(e));return t.error(r),TypeError(r)};function ni(e,t,n){var r="This is not a new campaign because referring_domain=".concat(t," is on the same domain as the current page and it is configured to exclude internal referrers");"always"===e?n.debug(r):"ifEmptyCampaign"===e&&n.debug("".concat(r," with empty campaign parameters"))}var na=["ac.in","ac.jp","ac.kr","ac.th","ac.uk","ac.za","appspot.com","asn.au","azurewebsites.net","cloudfront.net","myshopify.com","blogspot.com","co.ca","co.in","co.jp","co.kr","co.nz","co.th","co.uk","co.za","com.ar","com.au","com.br","com.cn","com.hk","com.in","com.jp","com.kr","com.mx","com.pl","com.sg","com.tr","com.tw","ed.jp","edu.au","edu.br","edu.cn","edu.hk","edu.sg","edu.th","edu.tr","edu.tw","firebaseapp.com","fly.dev","gc.ca","geek.nz","github.io","gitlab.io","go.jp","go.kr","go.th","gob.ar","gob.mx","gov.au","gov.br","gov.cn","gov.hk","gov.in","gov.pl","gov.sg","gov.tr","gov.tw","gov.uk","gov.za","govt.nz","gr.jp","herokuapp.com","id.au","idv.hk","iwi.nz","lg.jp","ltd.uk","maori.nz","me.uk","mil.kr","ne.jp","ne.kr","net.au","net.br","net.cn","net.hk","net.in","net.nz","net.pl","net.sg","net.tr","net.tw","net.za","onrender.com","or.jp","or.kr","or.th","org.ar","org.au","org.br","org.cn","org.hk","org.in","org.mx","org.nz","org.pl","org.sg","org.tw","org.uk","org.za","pages.dev","pe.kr","plc.uk","re.kr","res.in","sch.uk","vercel.app","netlify.app","workers.dev"],no=function(e){var t,n,r=e||(null==(n=null==(t=(0,eg.getGlobalScope)())?void 0:t.location)?void 0:n.hostname);if(!r)return"";var i=r.split("."),a=i[i.length-1],o=i[i.length-2];return(na.find(function(e){return r.endsWith(".".concat(e))})&&(a=i[i.length-2]+"."+i[i.length-1],o=i[i.length-3]),o)?"".concat(o,".").concat(a):a},ns=function(e,t){var n=(0,eg.getGlobalScope)();return!!n&&nt(e,(t||"").trim()||no(n.location.hostname))},nl=function(e){function t(t,n,r,i,a,o,s,l,u,c,d,p,f,h,g,_,m,E,S,A,T,y,I,R,b,O,N,C,k,L,D,P,w,F,U,M,x,G,V,B,H,q,W,K,j){void 0===r&&(r=new tO),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===l&&(l=1e3),void 0===u&&(u=5),void 0===c&&(c=30),void 0===d&&(d=t6),void 0===_&&(_=new eb),void 0===m&&(m=v.Warn),void 0===S&&(S=!1),void 0===A&&(A=!1),void 0===I&&(I=""),void 0===R&&(R="US"),void 0===N&&(N=18e5),void 0===C&&(C=new tU({loggerProvider:_})),void 0===k&&(k={ipAddress:!0,language:!0,platform:!0}),void 0===L&&(L="fetch"),void 0===D&&(D=!1),void 0===P&&(P=!0),void 0===G&&(G=!0),void 0===V&&(V=0),void 0===W&&(W=!1),void 0===K&&(K=!1);var Y,$=this;($=e.call(this,{apiKey:t,storageProvider:C,transportProvider:nd(L)})||this).apiKey=t,$.appVersion=n,$.cookieOptions=i,$.defaultTracking=a,$.autocapture=o,$.flushIntervalMillis=l,$.flushMaxRetries=u,$.flushQueueSize=c,$.identityStorage=d,$.ingestionMetadata=p,$.instanceName=f,$.loggerProvider=_,$.logLevel=m,$.minIdLength=E,$.offline=S,$.partnerId=T,$.plan=y,$.serverUrl=I,$.serverZone=R,$.sessionTimeout=N,$.storageProvider=C,$.trackingOptions=k,$.transport=L,$.useBatch=D,$.fetchRemoteConfig=P,$.networkTrackingOptions=M,$.identify=x,$.enableDiagnostics=G,$.diagnosticsSampleRate=V,$.diagnosticsClient=B,$.remoteConfig=H,$.topLevelDomain=q,$.enableRequestBodyCompression=W,$._enableRequestBodyCompressionExperimental=K,$.customEnrichment=j,$.version=tI,$._optOut=!1,$._cookieStorage=r,$.deviceId=s,$.lastEventId=h,$.lastEventTime=g,$.optOut=A,$.deferredSessionId=O,$.sessionId=b,$.pageCounter=F,$.userId=w,$.debugLogsEnabled=U,$.loggerProvider.enable(U?v.Debug:$.logLevel),$.networkTrackingOptions=M,$.identify=x,$.enableDiagnostics=G,$.diagnosticsSampleRate=V,$.diagnosticsClient=B;var Q=null!=(Y=null==H?void 0:H.fetchRemoteConfig)?Y:P;return $.remoteConfig=$.remoteConfig||{},$.remoteConfig.fetchRemoteConfig=Q,$.fetchRemoteConfig=Q,$.topLevelDomain=q||no(),$}return(0,D.__extends)(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,void 0!==e&&void 0!==this._deferredSessionId&&(this._deferredSessionId=void 0),this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deferredSessionId",{get:function(){return this._deferredSessionId},set:function(e){this._deferredSessionId!==e&&e!==this.sessionId&&(this._deferredSessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var e={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,deferredSessionId:this._deferredSessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled,cookieDomain:void 0};this.cookieStorage instanceof tC&&(e.cookieDomain=this.cookieStorage.options.domain),this.cookieStorage.set(tw(this.apiKey),e)},t}(eN),nu=function(e,t,n){switch(void 0===e&&(e=t6),void 0===t&&(t={}),e){case"localStorage":return new tU;case"sessionStorage":return new tM;case"none":return new tO;default:return new tC((0,D.__assign)((0,D.__assign)({},t),{expirationDays:t.expiration}),n)}},nc=function(e){var t,n;return void 0===e&&(e={}),(null==(t=e.remoteConfig)?void 0:t.fetchRemoteConfig)===!0||(null==(n=e.remoteConfig)?void 0:n.fetchRemoteConfig)!==!1&&!1!==e.fetchRemoteConfig},nd=function(e){var t="object"==typeof e?e.type:e,n="object"==typeof e?e.headers:void 0;return"xhr"===t?new tB(n):"beacon"===t?new tq:new tH(n)},np="data-amp-mask",nf="*****",nh=/\b(?:\d[ -]*?){13,16}\b/,ng=/(\d{3}-?\d{2}-?\d{4})/g,nv=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,n_=function(e,t){if(void 0===t&&(t=[]),"string"!=typeof e)return"";var n,r,i=e;i=(i=(i=i.replace(nh,nf)).replace(ng,nf)).replace(nv,nf);try{for(var a=(0,D.__values)(t),o=a.next();!o.done;o=a.next()){var s=o.value;try{i=i.replace(s,nf)}catch(e){}}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},nm=function(e){if("u"<typeof document||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(np)?nf:e?e(document.title):document.title},nE=function(){function e(){}return e.prototype.parse=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(e){return[2,(0,D.__assign)((0,D.__assign)((0,D.__assign)((0,D.__assign)({},es),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=ez();return{utm_campaign:e[W],utm_content:e[K],utm_id:e[j],utm_medium:e[Y],utm_source:e[$],utm_term:e[Q]}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!=(t=null==(e=n.referrer)?void 0:e.split("/")[2])?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=ez();return(e={})[J]=t[J],e[z]=t[z],e[X]=t[X],e[Z]=t[Z],e[ee]=t[ee],e[et]=t[et],e[en]=t[en],e[er]=t[er],e[ei]=t[ei],e[ea]=t[ea],e[eo]=t[eo],e},e}(),nS=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},nA="AMP_PAGE_VIEW",nT=function(e){void 0===e&&(e={});var t,n,r,i=(0,eg.getGlobalScope)(),a=void 0,o=!1,s=e.trackOn,l=e.trackHistoryChanges,u=e.eventType,c=void 0===u?"[Amplitude] Page Viewed":u,d=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==a||a.error("Malformed URI sequence: ",e)}return t},p=function(e){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var t,n,r;return(0,D.__generator)(this,function(i){switch(i.label){case 0:return t=d("u">typeof location&&location.href||""),r={event_type:c},n=[{}],[4,ny()];case 1:return[2,(r.event_properties=D.__assign.apply(void 0,[D.__assign.apply(void 0,n.concat([i.sent()])),{"[Amplitude] Page Domain":"u">typeof location&&location.hostname||"","[Amplitude] Page Location":t,"[Amplitude] Page Path":"u">typeof location&&d(location.pathname)||"","[Amplitude] Page Title":nm(n_),"[Amplitude] Page URL":t.split("?")[0],"[Amplitude] Page View ID":e}]),r)]}})})},f=function(){return void 0===s||"function"==typeof s&&s()},h="u">typeof location?location.href:null,g=function(){(0,D.__awaiter)(void 0,void 0,void 0,function(){var e,n,i,o,s;return(0,D.__generator)(this,function(u){switch(u.label){case 0:if(n=nR(l,e=location.href,h||"")&&f(),h=e,!n)return[3,4];if(i=void 0,r&&(i=e_(),r.set(nA,{pageViewId:i})),null==a||a.log("Tracking page view event"),null!=t)return[3,1];return[3,3];case 1:return s=(o=t).track,[4,p(i)];case 2:s.apply(o,[u.sent()]),u.label=3;case 3:u.label=4;case 4:return[2]}})})};return{name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,s){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var l,u,c;return(0,D.__generator)(this,function(d){switch(d.label){case 0:if(t=s,n=e,(a=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),o=!0,i){try{r=new tF(i.sessionStorage)}catch(e){null==a||a.debug("sessionStorage is not available in this environment.")}i.addEventListener("popstate",g),i.history.pushState=new Proxy(i.history.pushState,{apply:function(e,t,n){var r=(0,D.__read)(n,3),i=r[0],a=r[1],s=r[2];e.apply(t,[i,a,s]),o&&g()}})}if(!f())return[3,2];return a.log("Tracking page view event"),l=void 0,r&&(l=e_(),r.set(nA,{pageViewId:l})),c=(u=t).track,[4,p(l)];case 1:c.apply(u,[d.sent()]),d.label=2;case 2:return[2]}})})},execute:function(e){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var t,i,o;return(0,D.__generator)(this,function(l){switch(l.label){case 0:if(!("attribution"===s&&nI(e)))return[3,4];
2if(null==a||a.log("Enriching campaign event to page view event with campaign parameters"),t=void 0,!r)return[3,2];return[4,r.get(nA)];case 1:t=null==(i=l.sent())?void 0:i.pageViewId,l.label=2;case 2:return[4,p(t)];case 3:e.event_type=(o=l.sent()).event_type,e.event_properties=(0,D.__assign)((0,D.__assign)({},e.event_properties),o.event_properties),l.label=4;case 4:return n&&e.event_type===c&&(n.pageCounter=n.pageCounter?n.pageCounter+1:1,e.event_properties=(0,D.__assign)((0,D.__assign)({},e.event_properties),{"[Amplitude] Page Counter":n.pageCounter})),[2,e]}})})},teardown:function(){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(e){return i&&(i.removeEventListener("popstate",g),o=!1),[2]})})}}},ny=function(){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var e;return(0,D.__generator)(this,function(t){switch(t.label){case 0:return e=nS,[4,new nE().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},nI=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[_.SET]||{},r=t[_.UNSET]||{},i=(0,D.__spreadArray)((0,D.__spreadArray)([],(0,D.__read)(Object.keys(n)),!1),(0,D.__read)(Object.keys(r)),!1);return Object.keys(es).every(function(e){return i.includes(e)})}return!1},nR=function(e,t,n){if("pathOnly"!==e)return t!==n;if(""==n)return!0;var r=new URL(t),i=new URL(n);return r.origin+r.pathname!==i.origin+i.pathname},nb=function(){var e,t,n=[],r=function(e,t,r){e.addEventListener(t,r),n.push({element:e,type:t,handler:r})},i=function(){n.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),n=[]};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(n,i){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var a,o;return(0,D.__generator)(this,function(s){return t=tS(n),a=function(){if(!i)return void n.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");if("u">typeof document){var a=new WeakSet,o=function(e){if(!a.has(e)){a.add(e);var o=!1;r(e,"change",function(){var t,n=nN(e);o||i.track(tY,((t={})[t3]=nO(e.id),t[t4]=nO(e.name),t[t5]=n,t)),o=!0}),r(e,"submit",function(r){var a,s,l=nN(e);if(o||i.track(tY,((a={})[t3]=nO(e.id),a[t4]=nO(e.name),a[t5]=l,a)),o=!0,(null==t?void 0:t.shouldTrackSubmit)!==void 0)if("function"==typeof t.shouldTrackSubmit&&"u">typeof SubmitEvent&&r instanceof SubmitEvent)try{if(!t.shouldTrackSubmit(r))return}catch(e){n.loggerProvider.warn("shouldTrackSubmit callback threw an error, proceeding with tracking.")}else n.loggerProvider.warn("shouldTrackSubmit is ignored because it is not a function or event is not a SubmitEvent.");i.track(t$,((s={})[t3]=nO(e.id),s[t4]=nO(e.name),s[t5]=l,s)),o=!1})}};Array.from(document.getElementsByTagName("form")).forEach(o),"u">typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&o(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(o)})})})).observe(document.body,{subtree:!0,childList:!0})}},"complete"===document.readyState?a():(o=(0,eg.getGlobalScope)())?o.addEventListener("load",a):n.loggerProvider.debug("Form interaction tracking is not installed because global is undefined."),[2]})})},execute:function(e){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(t){return null==e||e.disconnect(),i(),[2]})})}}},nO=function(e){if("string"==typeof e)return e},nN=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(null!=t?t:""),window.location.href).href}catch(e){}return t},nC=function(){var e,t=[],n=function(e,n,r){e.addEventListener(n,r),t.push({element:e,type:n,handler:r})},r=function(){t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),t=[]};return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(t,r){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var i,a;return(0,D.__generator)(this,function(o){return i=function(){if(!r)return void t.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");if("u">typeof document){var i=function(e){try{t=new URL(e.href,window.location.href)}catch(e){return}var t,i=a.exec(t.href),o=null==i?void 0:i[1];o&&n(e,"click",function(){var n;o&&r.track(tQ,((n={})[tX]=o,n[tZ]=t.pathname,n[t0]=e.id,n[t1]=e.text,n[t2]=e.href,n))})},a=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/;
2Array.from(document.getElementsByTagName("a")).forEach(i),"u">typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"A"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}},"complete"===document.readyState?i():(a=(0,eg.getGlobalScope)())?a.addEventListener("load",i):t.loggerProvider.debug("File download tracking is not installed because global is undefined."),[2]})})},execute:function(e){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(t){return null==e||e.disconnect(),r(),[2]})})}}},nk=!1,nL=function(e){nk||void 0!==e.defaultTracking||(e.loggerProvider.warn("`options.defaultTracking` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to `options.defaultTracking`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:\n\namplitude.init(<YOUR_API_KEY>, {\n defaultTracking: true,\n});\n\nVisit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details."),nk=!0)},nD=function(){var e=(0,eg.getGlobalScope)(),t=[],n=function(n,r){(null==e?void 0:e.addEventListener)&&(null==e||e.addEventListener(n,r),t.push({type:n,handler:r}))},r=function(){t.forEach(function(t){var n=t.type,r=t.handler;null==e||e.removeEventListener(n,r)}),t=[]};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(r){return"u"<typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1):(e.offline=!navigator.onLine,n("online",function(){e.loggerProvider.debug("Network connectivity changed to online."),e.offline=!1,setTimeout(function(){t.flush()},e.flushIntervalMillis)}),n("offline",function(){e.loggerProvider.debug("Network connectivity changed to offline."),e.offline=!0})),[2]})})},teardown:function(){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(e){return r(),[2]})})}}};function nP(e,t,n){var r,i,a=[];try{for(var o=(0,D.__values)(null!=t?t:[]),s=o.next();!s.done;s=o.next()){var l=s.value;try{a.push(new RegExp(l))}catch(e){n.loggerProvider.warn("Invalid regex pattern: ".concat(l),e)}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return e.concat(a)}var nw=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],nF="data-amp-track-",nU=["div","span","h1","h2","h3","h4","h5","h6"],nM="https://app.amplitude.com",nx={US:nM,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"},nG="https://cdn.amplitude.com/libs/background-capture-1.0.0-alpha.3.js.gz";e.s(["AMPLITUDE_BACKGROUND_CAPTURE_SCRIPT_URL",0,nG,"AMPLITUDE_ORIGIN",0,nM,"AMPLITUDE_ORIGINS_MAP",0,nx],347692);var nV="__AMPLITUDE_MESSENGER_INSTANCE__",nB="__AMPLITUDE_MESSENGER__",nH=function(){function e(e){var t=(void 0===e?{}:e).origin,n=void 0===t?nM:t;this[T]=!0,this.isSetup=!1,this.messageHandler=null,this.requestCallbacks={},this.actionHandlers=new Map,this.pendingMessages=new Map,this.scriptLoadPromises=new Map,this.endpoint=n}return e.prototype.notify=function(e){var t,n,r,i;null==(n=null==(t=this.logger)?void 0:t.debug)||n.call(t,"Message sent: ",JSON.stringify(e)),null==(i=null==(r=window.opener)?void 0:r.postMessage)||i.call(r,e,this.endpoint)},e.prototype.sendRequest=function(e,t,n){var r=this;void 0===n&&(n={timeout:15e3});var i="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),a={id:i,action:e,args:t};return new Promise(function(t,o){r.requestCallbacks[i]={resolve:t,reject:o},r.notify(a),n.timeout>0&&setTimeout(function(){o(Error("".concat(e," timed out (id: ").concat(i,")"))),delete r.requestCallbacks[i]},n.timeout)})},e.prototype.handleResponse=function(e){var t;if(!this.requestCallbacks[e.id]){null==(t=this.logger)||t.warn("No callback found for request id: ".concat(e.id));return}this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]},e.prototype.registerActionHandler=function(e,t){this.actionHandlers.has(e)&&(null==(a=null==(i=this.logger)?void 0:i.warn)||a.call(i,"Overwriting existing action handler for: ".concat(e))),this.actionHandlers.set(e,t);var n,r,i,a,o=this.pendingMessages.get(e);if(o){this.pendingMessages.delete(e);try{for(var s=(0,D.__values)(o),l=s.next();!l.done;l=s.next()){var u=l.value;t(u)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}},e.prototype.loadScriptOnce=function(e){return(0,D.__awaiter)(this,void 0,void 0,function(){var t,n,r;return(0,D.__generator)(this,function(i){switch(i.label){case 0:if(t=this.scriptLoadPromises.get(e))return[2,t];n=(document.querySelector('script[src="'.concat(CSS.escape(e),'"]'))?Promise.resolve({status:!0}):new Promise(function(t,n){var r;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.addEventListener("load",function(){t({status:!0})},{once:!0}),i.addEventListener("error",function(){n({status:!1,message:"Failed to load the script ".concat(e)})}),null==(r=document.head)||r.appendChild(i)}catch(e){n(e)}})).then(function(){}),this.scriptLoadPromises.set(e,n),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n];case 2:return i.sent(),[3,4];case 3:throw r=i.sent(),this.scriptLoadPromises.delete(e),r;case 4:return[2]}})})},e.prototype.setup=function(e){var t,n,r=this,i=void 0===e?{}:e,a=i.logger,o=i.endpoint;
2a&&(this.logger=a),o&&this.endpoint===nM&&(this.endpoint=o),this.isSetup||(this.isSetup=!0,null==(n=null==(t=this.logger)?void 0:t.debug)||n.call(t,"Setting up messenger"),this.messageHandler=function(e){if(null==(n=null==(t=r.logger)?void 0:t.debug)||n.call(t,"Message received: ",JSON.stringify(e)),r.endpoint===e.origin){var t,n,i,a,o,s=e.data,l=null==s?void 0:s.action;if(l)if("id"in s&&s.id)null==(a=null==(i=r.logger)?void 0:i.debug)||a.call(i,"Received Response to previous request: ",JSON.stringify(e)),r.handleResponse(s);else{if("ping"===l)return void r.notify({action:"pong"});var u=r.actionHandlers.get(l);if(u)u(s.data);else{var c=null!=(o=r.pendingMessages.get(l))?o:[];c.push(s.data),r.pendingMessages.set(l,c)}}}},window.addEventListener("message",this.messageHandler),this.notify({action:"page-loaded"}))},e.prototype.destroy=function(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.isSetup=!1,this.actionHandlers.clear(),this.pendingMessages.clear(),this.requestCallbacks={},this.scriptLoadPromises.clear();var e=(0,eg.getGlobalScope)();(null==e?void 0:e[nB])===this&&delete e[nB]},e}();function nq(e){var t=(0,eg.getGlobalScope)(),n=null==t?void 0:t[nB];if("object"==typeof n&&null!==n&&nV in n&&!0===n[nV])return n;var r=new nH(e);return t&&(t[nB]=r),r}T=nV,e.s(["getOrCreateWindowMessenger",0,nq],757931);var nW="__AMPLITUDE_BACKGROUND_CAPTURE__";function nK(e,t){var n;if(!0!==e[nW]){e[nW]=!0;var r=null!=(n=null==t?void 0:t.scriptUrl)?n:nG,i=null,a=function(t,n){var r,i;"background-capture-complete"===t&&(null==(i=null==(r=e.logger)?void 0:r.debug)||i.call(r,"Background capture complete"),e.notify({action:"background-capture-complete",data:n}))};e.registerActionHandler("initialize-background-capture",function(){null==(n=null==(t=e.logger)?void 0:t.debug)||n.call(t,"Initializing background capture (external script)");var t,n,o=new URL(r,e.endpoint).toString();e.loadScriptOnce(o).then(function(){var t,n,r;null==(n=null==(t=e.logger)?void 0:t.debug)||n.call(t,"Background capture script loaded (external)"),i=null==(r=null==window?void 0:window.amplitudeBackgroundCapture)?void 0:r.call(window,{messenger:e,onBackgroundCapture:a}),e.notify({action:"background-capture-loaded"})}).catch(function(){var t;null==(t=e.logger)||t.warn("Failed to initialize background capture")})}),e.registerActionHandler("close-background-capture",function(){var e;null==(e=null==i?void 0:i.close)||e.call(i),i=null})}}e.s(["enableBackgroundCapture",0,nK],798492);var nj=e.i(881243);function nY(e,t){return new nj.default(function(n){e.subscribe({next:function(e){t(e).then(function(e){return n.next(e)}).catch(function(e){return n.error(e)})},error:function(e){n.error(e)},complete:function(){n.complete()}})})}function n$(e,t){return new nj.default(function(n){var r=!1,i=new Set,a=function(){var e,t;r=!0;try{for(var n=(0,D.__values)(i),a=n.next();!a.done;a=n.next()){var o=a.value;try{o.unsubscribe()}catch(e){}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}i.clear()},o=function(e){var t=e.subscribe({next:function(e){r||n.next(e)},error:function(e){r||(r=!0,n.error(e),a())},complete:function(){i.delete(t),r||0!==i.size||(n.complete(),a(),r=!0)}});i.add(t)};return o(e),o(t),a})}function nQ(e){var t=new Set,n=null;function r(){null==n||n.unsubscribe(),n=null,t.clear()}return new nj.default(function(i){return t.add(i),null===n&&(n=e.subscribe({next:function(e){try{for(var n,r,i,a=(0,D.__values)(t),o=a.next();!o.done;o=a.next()){var s=o.value;null==(i=s.next)||i.call(s,e)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}},error:function(e){try{for(var n,i,a,o=(0,D.__values)(t),s=o.next();!s.done;s=o.next()){var l=s.value;null==(a=l.error)||a.call(l,e)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}r()},complete:function(){try{for(var e,n,i,a=(0,D.__values)(t),o=a.next();!o.done;o=a.next()){var s=o.value;null==(i=s.complete)||i.call(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}r()}})),function(){t.delete(i),0===t.size&&n&&(n.unsubscribe(),n=null)}})}var nJ="1.25.3",nz="[Amplitude] Element Clicked",nX="[Amplitude] Element Tag",nZ="[Amplitude] Element Text",n0="[Amplitude] Page URL",n1="[Amplitude] Viewport Height",n2="[Amplitude] Viewport Width",n3="[Amplitude] Page View ID",n4="data-amp-mask-attributes",n5=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},n6=function(e,t){var n=e;try{n=decodeURI(e)}catch(e){null==t||t.error("Malformed URI sequence: ",e)}return n},n7=["input","select","textarea"],n8=function(e,t){var n,r=null==(n=null==window?void 0:window.getComputedStyle)?void 0:n.call(window,e);return(null==r?void 0:r.getPropertyValue("cursor"))==="pointer"&&"click"===t},n9=function(e){var t=e.pageUrlAllowlist,n=e.pageUrlExcludelist;return!(n&&n.length>0&&n5(window.location.href,n))&&!!n5(window.location.href,t)},re=function(e,t,n){return void 0===n&&(n=!1),function(r,i){var a,o,s=e.shouldTrackEventResolver,l=null==(o=null==(a=null==i?void 0:i.tagName)?void 0:a.toLowerCase)?void 0:o.call(a);if(!l)return!1;if(s)return s(r,i);if(!n9(e))return!1;var u=String(null==i?void 0:i.getAttribute("type"))||"";if("string"==typeof u)switch(u.toLowerCase()){case"hidden":case"password":return!1}var c=n8(i,r);if(n&&c)return!0;
2if(t&&!t.some(function(e){var t;return!!(null==(t=null==i?void 0:i.matches)?void 0:t.call(i,e))}))return!1;switch(l){case"input":case"select":case"textarea":return"change"===r||"click"===r;default:if(c)return!0;return"click"===r}}},rt=function(e){var t,n,r,i=null==(n=null==(t=null==e?void 0:e.tagName)?void 0:t.toLowerCase)?void 0:n.call(t),a=e instanceof HTMLElement&&(null==(r=e.getAttribute("contenteditable"))?void 0:r.toLowerCase())==="true";return!n7.includes(i)&&!a},rn=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return null!=r&&("object"!=typeof r||0!==Object.keys(r).length)&&("string"!=typeof r||0!==r.trim().length)&&(t[n]=r),t},{})},rr=function(){var e;try{var t=(0,eg.getGlobalScope)(),n=null==(e=null==t?void 0:t.sessionStorage)?void 0:e.getItem("AMP_PAGE_VIEW");if(!n)return;var r=JSON.parse(n);if("string"==typeof r.pageViewId)return r.pageViewId}catch(e){}},ri=function(e,t){return e?t.some(function(t){var n;return null==(n=null==e?void 0:e.matches)?void 0:n.call(e,t)})?e:ri(null==e?void 0:e.parentElement,t):null},ra=function(e){return null!==e.event.target&&!!e.closestTrackedAncestor};(l=y||(y={}))[l.LEFT_OR_TOUCH_CONTACT=0]="LEFT_OR_TOUCH_CONTACT",l[l.MIDDLE=1]="MIDDLE",l[l.RIGHT=2]="RIGHT";var ro="__AMPLITUDE_VISUAL_TAGGING__",rs=nj,rl=(0,eg.getGlobalScope)(),ru=null==rl?void 0:rl.console,rc={},rd={},rp=!1,rf=function(e,t){if(!ru||"function"!=typeof ru[e]||!rd[e]&&(rd[e]=ru[e],ru[e]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{if(rc[e]&&!rp){rp=!0;var r=rc[e];r&&r.forEach(function(n){try{n(e,t)}catch(e){}})}}catch(e){}return rp=!1,rd[e].apply(ru,t)},0))return Error("Console override failed");rc[e]?rc[e].push(t):rc[e]=[t]},rh=function(e){var t,n;try{for(var r=(0,D.__values)(Object.values(rc)),i=r.next();!i.done;i=r.next())for(var a=i.value,o=a.length-1;o>=0;o--)if(a[o]===e){a.splice(o,1);break}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},rg=(0,eg.getGlobalScope)(),rv=function(){return new rs.default(function(e){var t=new MutationObserver(function(t){e.next(t)});return document.body&&t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},r_=function(e){return void 0===e&&(e="click"),new rs.default(function(t){var n,r=function(e){t.next(e)};return null==(n=(0,eg.getGlobalScope)())||n.document.addEventListener(e,r,{capture:!0}),function(){var t;null==(t=(0,eg.getGlobalScope)())||t.document.removeEventListener(e,r,{capture:!0})}})},rm=function(){var e=n$(new rs.default(function(e){var t=function(t){if(t instanceof ErrorEvent){var n={kind:"error"};t.error instanceof Error||t.error instanceof DOMException?n=(0,D.__assign)((0,D.__assign)({},n),{message:t.error.message,stack:t.error.stack,filename:t.filename,lineNumber:t.lineno,columnNumber:t.colno}):"string"==typeof t.error&&(n.message=t.error),e.next(n)}};return rg.addEventListener("error",t),function(){rg.removeEventListener("error",t)}}),new rs.default(function(e){var t=function(t){var n={kind:"unhandledrejection"};t.reason instanceof Error||t.reason instanceof DOMException?(n.message=t.reason.message,n.stack=t.reason.stack):"string"==typeof t.reason&&(n.message=t.reason),e.next(n)};return rg.addEventListener("unhandledrejection",t),function(){rg.removeEventListener("unhandledrejection",t)}}));return n$(e,new rs.default(function(e){var t=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=void 0;Array.isArray(n[0])&&"string"==typeof n[0][0]&&(i=n[0][0]),e.next({kind:"console",message:i})};return rf("error",t),function(){rh(t)}}))},rE=function(e,t){try{if("[Amplitude] Element Text"===t.subprop_key)return"is"===t.subprop_op&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if("[Amplitude] Element Hierarchy"===t.subprop_key)return"autotrack css match"===t.subprop_op&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(e){console.error("Error matching event to filter",e)}return!1},rS=function(e,t){try{if("DOM_ELEMENT"===e.sourceType){var n=document.documentElement;if(e.scope&&t&&(n=t.closest(e.scope)),n&&e.selector)return n.querySelector(e.selector);return n}}catch(e){}},rA=function(e,t,n){e.forEach(function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var r=n.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=r}})},rT={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},ry=function(e){var t,n,r,i,a=Object.values(rT).reduce(function(e,t){return e[t]=new Set,e},{});if(!e)return a;try{for(var o=(0,D.__values)(e),s=o.next();!s.done;s=o.next()){var l=s.value;try{try{for(var u=(r=void 0,(0,D.__values)(l.definition)),c=u.next();!c.done;c=u.next()){var d=rT[c.value.event_type];d&&a[d].add(l.id)}}catch(e){r={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}}catch(e){console.warn("Skipping Labeled Event due to malformed definition",null==l?void 0:l.id,e)}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a},rI=function(e){var t,n,r,i,a=new Map;try{for(var o=(0,D.__values)(e),s=o.next();!s.done;s=o.next()){var l=s.value;try{for(var u=(r=void 0,(0,D.__values)(l.conditions)),c=u.next();!c.done;c=u.next()){var d=c.value;if("LABELED_EVENT"===d.type){var p=d.match.eventId,f=a.get(p);f||(f=[],a.set(p,f)),f.push(l)}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a},rR=function(e,t){var n,r,i,a,o=new Set;try{for(var s=(0,D.__values)(e),l=s.next();!l.done;l=s.next()){var u=l.value,c=t.get(u.id);if(c)try{for(var d=(i=void 0,(0,D.__values)(c)),p=d.next();!p.done;p=d.next()){var f=p.value;o.add(f)}}catch(e){i={error:e}}
2finally{try{p&&!p.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return Array.from(o)},rb=function(){function e(e,t,n,r){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.dataExtractor=n,this.options=r}return e.prototype.evaluate=function(e){var t,n,r=this.options.pageActions;if(!r)return e;var i=rR(Array.from(this.groupedLabeledEvents[e.type]).map(function(e){return r.labeledEvents[e]}).filter(function(t){return t.definition.some(function(t){return rT[t.event_type]===e.type&&t.filters.every(function(t){return rE(e,t)})})}),this.labeledEventToTriggerMap);try{for(var a=(0,D.__values)(i),o=a.next();!o.done;o=a.next()){var s=o.value;rA(s.actions,e,this.dataExtractor)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return e},e.prototype.update=function(e,t,n){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.options=n},e}(),rO=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",n4,np]),rN=["type"],rC=["svg","path","g"],rk=["password","hidden"],rL=function(){function e(e,t){this.value=e,this.optimized=t}return e.prototype.toString=function(){return this.value},e}(),rD=function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var n=[],r=e;r;){var i=rP(r,!!t,r===e);if(!i||(n.push(i),i.optimized))break;r=r.parentElement}return n.reverse(),n.join(" > ")},rP=function(e,t,n){if(e.nodeType!==Node.ELEMENT_NODE)return null;var r,i,a=e.getAttribute("id");if(t){if(a)return new rL(c(a),!0);var o=e.tagName.toLowerCase();if("body"===o||"head"===o||"html"===o)return new rL(o,!0)}var s=e.tagName.toLowerCase();if(a)return new rL(s+c(a),!0);var l=e.parentNode;if(!l||l.nodeType===Node.DOCUMENT_NODE)return new rL(s,!0);function u(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map(function(e){return"$"+e}):[]}function c(e){return"#"+CSS.escape(e)}for(var d=u(e),p=!1,f=!1,h=-1,g=-1,v=l.children,_=0;v&&(-1===h||!f)&&_<v.length;++_){var m=v[_];if(m.nodeType===Node.ELEMENT_NODE){if(g+=1,m===e){h=g;continue}if(!f&&m.tagName.toLowerCase()===s){p=!0;var E=new Set(d);if(!E.size){f=!0;continue}for(var S=u(m),A=0;A<S.length;++A){var T=S[A];if(E.has(T)&&(E.delete(T),!E.size)){f=!0;break}}}}}var y=s;if(n&&"input"===s.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(y+="[type="+CSS.escape(e.getAttribute("type")||"")+"]"),f)y+=":nth-child("+String(h+1)+")";else if(p)try{for(var I=(0,D.__values)(d),R=I.next();!R.done;R=I.next()){var b=R.value;y+="."+CSS.escape(b.slice(1))}}catch(e){r={error:e}}finally{try{R&&!R.done&&(i=I.return)&&i.call(I)}finally{if(r)throw r.error}}return new rL(y,!1)},rw=function(e,t){var n,r,i,a=this;this.replaceSensitiveString=function(e){return n_(e,a.additionalMaskTextPatterns)},this.getHierarchy=function(e){var t,n,r,i,o=performance.now(),s=[];if(!e)return[];for(var l=function(e){var t=[];if(!e)return t;
2t.push(e);for(var n=e.parentElement;n&&"HTML"!==n.tagName;)t.push(n),n=n.parentElement;return t}(e),u=new Map,c=l.length-1;c>=0;c--){var d=l[c];if(d){var p,f=(p=d.getAttribute(n4))?p.split(",").map(function(e){return e.trim()}).filter(function(e){return e.length>0&&"id"!==e&&"class"!==e}):[],h=c===l.length-1?[]:null!=(r=u.get(l[c+1]))?r:new Set,g=new Set((0,D.__spreadArray)((0,D.__spreadArray)([],(0,D.__read)(h),!1),(0,D.__read)(f),!1));u.set(d,g)}}s=l.map(function(e){var t;return function(e,t){if(null===e)return null;var n,r,i,a,o,s,l=String(e.tagName).toLowerCase(),u={tag:l},c=Array.from(null!=(a=null==(i=e.parentElement)?void 0:i.children)?a:[]);c.length&&(u.index=c.indexOf(e),u.indexOfType=c.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var d=null==(s=null==(o=e.previousElementSibling)?void 0:o.tagName)?void 0:s.toLowerCase();d&&(u.prevSib=String(d));var p=e.getAttribute("id");p&&(u.id=String(p));var f=Array.from(e.classList);f.length&&(u.classes=f);var h={},g=Array.from(e.attributes).filter(function(e){return!rO.has(e.name)}),v=!rt(e);if(!rk.includes(String(e.getAttribute("type")))&&!rC.includes(l))try{for(var _=(0,D.__values)(g),m=_.next();!m.done;m=_.next()){var E=m.value;if(!v||rN.includes(E.name)){if(t.has(E.name)){h[E.name]=nf;continue}h[E.name]=String(E.value).substring(0,128)}}}catch(e){n={error:e}}finally{try{m&&!m.done&&(r=_.return)&&r.call(_)}finally{if(n)throw n.error}}return Object.keys(h).length&&(u.attrs=h),u}(e,null!=(t=u.get(e))?t:new Set)});var v=function(e){(null==e?void 0:e.attrs)&&Object.entries(e.attrs).forEach(function(t){var n=(0,D.__read)(t,2),r=n[0],i=n[1];e.attrs&&(e.attrs[r]=a.replaceSensitiveString(i))})};try{for(var _=(0,D.__values)(s),m=_.next();!m.done;m=_.next()){var E=m.value;v(E)}}catch(e){t={error:e}}finally{try{m&&!m.done&&(n=_.return)&&n.call(_)}finally{if(t)throw t.error}}var S=performance.now();return null==(i=a.diagnosticsClient)||i.recordHistogram("autocapturePlugin.getHierarchy",S-o),s},this.getNearestLabel=function(e){var t,n=e.parentElement;if(!n)return"";try{t=n.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}return t?a.getText(t):a.getNearestLabel(n)},this.getElementPath=function(e){if(!e)return"";var t,n=performance.now(),r=rD(e),i=performance.now();return null==(t=a.diagnosticsClient)||t.recordHistogram("autocapturePlugin.getElementPath",i-n),r},this.getEventProperties=function(e,t,n){var r,i,o,s,l=null==(o=null==(i=null==t?void 0:t.tagName)?void 0:i.toLowerCase)?void 0:o.call(i),u="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},c=a.getHierarchy(t),d=null==(s=c[0])?void 0:s.attrs,p=a.getNearestLabel(t),f=Object.entries(null!=d?d:{}).reduce(function(e,t){var r=(0,D.__read)(t,2),i=r[0],a=r[1];if(i.startsWith(n)){var o=i.replace(n,"");o&&(e[o]=a||"")}return e},{}),h=((r={})["[Amplitude] Element Hierarchy"]=c,r[nX]=l,r[nZ]=a.getText(t),r["[Amplitude] Element Position Left"]=null==u.left?null:Math.round(u.left),r["[Amplitude] Element Position Top"]=null==u.top?null:Math.round(u.top),r["[Amplitude] Element Attributes"]=f,r["[Amplitude] Element Path"]=a.getElementPath(t),r["[Amplitude] Element Parent Label"]=p,r[n0]=n6(window.location.href.split("?")[0]),r["[Amplitude] Page Title"]=nm(a.replaceSensitiveString),r[n1]=window.innerHeight,r[n2]=window.innerWidth,r),g=rr();if(g&&(h[n3]=g),h["[Amplitude] Element ID"]=t.getAttribute("id")||"",h["[Amplitude] Element Class"]=t.getAttribute("class"),h["[Amplitude] Element Aria Label"]=null==d?void 0:d["aria-label"],"a"===l&&"click"===e&&t instanceof HTMLAnchorElement){var v=t.href.substring(0,128);h["[Amplitude] Element Href"]=a.replaceSensitiveString(v)}return rn(h)},this.addTypeAndTimestamp=function(e,t){return{event:e,timestamp:Date.now(),type:t}},this.addAdditionalEventProperties=function(e,t,n,r,i){void 0===i&&(i=!1);var o=a.addTypeAndTimestamp(e,t);if(("click"===o.type||"change"===o.type)&&null!==o.event.target){if(i&&n8(o.event.target,o.type))return o.closestTrackedAncestor=o.event.target,o.targetElementProperties=a.getEventProperties(o.type,o.closestTrackedAncestor,r),o;var s=ri(o.event.target,n);s&&(o.closestTrackedAncestor=s,o.targetElementProperties=a.getEventProperties(o.type,s,r))}return o},this.extractDataFromDataSource=function(e,t){if("DOM_ELEMENT"===e.sourceType){var n=rS(e,t);if(n){if("TEXT"===e.elementExtractType)return a.getText(n);if("ATTRIBUTE"===e.elementExtractType&&e.attribute)return n.getAttribute(e.attribute)}}},this.getTextWithMaskedDescendants=function(e){var t,n,r="[".concat(np,"], [contenteditable]");if(!e.querySelector(r))return e.innerText;var i="",o=Array.from(e.childNodes);try{for(var s=(0,D.__values)(o),l=s.next();!l.done;l=s.next()){var u=l.value;if(u.nodeType===Node.TEXT_NODE){i+=u.textContent||"";continue}if(u instanceof Element){if(u.hasAttribute(np)||u.hasAttribute("contenteditable")){i+=nf;continue}i+=a.getTextWithMaskedDescendants(u)}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i},this.getText=function(e){if(null!==e.closest("[".concat(np,"]")))return nf;var t="";return t=e.querySelector("[".concat(np,"], [contenteditable]"))?a.getTextWithMaskedDescendants(e):e.innerText||"",a.replaceSensitiveStr
2ing(t.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(e){if(!e)return{};var t,n,r,i=null==(r=null==(n=null==e?void 0:e.tagName)?void 0:n.toLowerCase)?void 0:r.call(n);return rn(((t={})[nX]=i,t[nZ]=a.getText(e),t[n0]=window.location.href.split("?")[0],t))},this.diagnosticsClient=null==t?void 0:t.diagnosticsClient;var o=null!=(i=e.maskTextRegex)?i:[],s=[];try{for(var l=(0,D.__values)(o),u=l.next();!u.done;u=l.next()){var c=u.value;if(s.length>=25)break;if(c instanceof RegExp)s.push(c);else if("pattern"in c&&"string"==typeof c.pattern)try{s.push(RegExp(c.pattern,"i"))}catch(e){}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}this.additionalMaskTextPatterns=s},rs=nj;(u=I||(I={})).ClickObservable="clickObservable",u.ChangeObservable="changeObservable",u.NavigateObservable="navigateObservable",u.MutationObservable="mutationObservable",u.ScrollObservable="scrollObservable",u.ExposureObservable="exposureObservable",u.BrowserErrorObservable="browserErrorObservable",u.SelectionObservable="selectionObservable",u.MouseMoveObservable="mouseMoveObservable";var rF=function(e,t){void 0===e&&(e={}),null==t||t.diagnosticsClient.setTag("plugin.autocapture.version",nJ);var n,r,i,a,o,s,l,u,c,d,p,f,h,g=e.dataAttributePrefix,v=void 0===g?nF:g,_=e.visualTaggingOptions,m=void 0===_?{enabled:!0}:_;e.cssSelectorAllowlist=null!=(n=e.cssSelectorAllowlist)?n:nw,e.actionClickAllowlist=null!=(r=e.actionClickAllowlist)?r:nU,e.debounceTime=null!=(i=e.debounceTime)?i:0;var E=(null==(a=e.viewportContentUpdated)?void 0:a.enabled)!==!1,S=null!=(l=null!=(s=null==(o=e.viewportContentUpdated)?void 0:o.exposureDuration)?s:e.exposureDuration)?l:150;e.viewportContentUpdated=(0,D.__assign)((0,D.__assign)({},e.viewportContentUpdated),{exposureDuration:S}),e.pageUrlExcludelist=null==(u=e.pageUrlExcludelist)?void 0:u.reduce(function(e,t){if("string"==typeof t&&e.push(t),t instanceof RegExp&&e.push(t),"object"==typeof t&&null!==t&&"pattern"in t)try{e.push(new RegExp(t.pattern))}catch(e){console.warn("Invalid regex pattern: ".concat(t.pattern),e)}return e},[]);var A="@amplitude/plugin-autocapture-browser",T=[],y=new rw(e,t),R=new Set,b=new Set,O=function(){var t,n,r,i=nQ(r_().map(function(t){return y.addAdditionalEventProperties(t,"click",e.cssSelectorAllowlist,v)})),a=nQ(new rs.default(function(t){var n,r=function(n){var r=y.addAdditionalEventProperties(n,"change",e.cssSelectorAllowlist,v);t.next(r)};return null==(n=(0,eg.getGlobalScope)())||n.document.addEventListener("change",r,{capture:!0}),function(){var e;return null==(e=(0,eg.getGlobalScope)())?void 0:e.document.removeEventListener("change",r)}}));window.navigation&&(r=nQ(new rs.default(function(t){var n=function(n){var r=y.addAdditionalEventProperties(n,"navigate",e.cssSelectorAllowlist,v);t.next(r)};return window.navigation.addEventListener("navigate",n),function(){window.navigation.removeEventListener("navigate",n)}})));var o=nQ(rv().map(function(t){return y.addAdditionalEventProperties(t,"mutation",e.cssSelectorAllowlist,v)})),s=new rs.default(function(e){var t,n=function(t){e.next(t)};return null==(t=(0,eg.getGlobalScope)())||t.addEventListener("scroll",n),function(){var e;null==(e=(0,eg.getGlobalScope)())||e.removeEventListener("scroll",n)}}),l=(t=e.cssSelectorAllowlist,new rs.default(function(e){var n,r=(0,eg.getGlobalScope)();if(!(null==r?void 0:r.IntersectionObserver))return function(){};var i=new IntersectionObserver(function(t){t.forEach(function(t){e.next(t)})},{root:null,rootMargin:"0px",threshold:1}),a=t.join(",");(null!=(n=null==r?void 0:r.document.querySelectorAll(a))?n:[]).forEach(function(e){i.observe(e)});var s=o.subscribe(function(e){return e.event.forEach(function(e){return e.addedNodes.forEach(function(e){e instanceof Element&&(e.matches(a)&&i.observe(e),e.querySelectorAll(a).forEach(function(e){i.observe(e)}))})})});return function(){s.unsubscribe(),i.disconnect()}}));return(n={})[I.ChangeObservable]=a,n[I.ClickObservable]=i,n[I.MutationObservable]=o,n[I.NavigateObservable]=r,n[I.ScrollObservable]=s,n[I.ExposureObservable]=l,n},N=ry(Object.values(null!=(d=null==(c=e.pageActions)?void 0:c.labeledEvents)?d:{})),C=rI(null!=(f=null==(p=e.pageActions)?void 0:p.triggers)?f:[]),k=new rb(N,C,y,e),L=function(t){var n,r;t&&(e.pageActions=(0,D.__assign)((0,D.__assign)({},e.pageActions),t),N=ry(Object.values(null!=(n=e.pageActions.labeledEvents)?n:{})),C=rI(null!=(r=e.pageActions.triggers)?r:[]),k.update(N,C,e))};return{name:A,type:"enrichment",setup:function(t,n){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var r,i,a,o,s,l,u,c,d,p,f,g,_,N,C,P,w,F,U,M,x;return(0,D.__generator)(this,function(G){var V,B,H,q,W,K,j,Y,$,Q,J,z,X,Z,ee,et,en,er,ei,ea,eo,es,el,eu,ec,ed,ep,ef,eh,ev,e_,em,eE,eS,eA,eT,ey,eI,eR;return"u"<typeof document?[2]:(r=!1,i={maxX:void 0,maxY:void 0},t.fetchRemoteConfig&&(t.remoteConfigClient?t.remoteConfigClient.subscribe("configs.analyticsSDK.pageActions","all",function(e){L(e)}):t.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),a=re(e,e.cssSelectorAllowlist),o=re(e,e.actionClickAllowlist),B=(V={allObservables:s=O(),amplitude:n,shouldTrackEvent:a,evaluateTriggers:k.evaluate.bind(k)}).amplitude,H=V.allObservables,q=V.shouldTrackEvent,W=V.evaluateTriggers,l=H.clickObservable.filter(ra).filter(function(e){return q("click",e.closestTrackedAncestor)}).map(function(e){return W(e)}).subscribe(function(e){null==B||B.track(nz,e.targetElementProperties)}),T.push(l),j=(K={allObservables:s,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return y.getEventProperties.apply(y,(0,D.__spreadArray)((0,D.__spreadArray)([],(0,D.__read)(e),!1),[v],!1))},amplitude:n,shouldTrackEvent:a,evaluateTriggers:k.evaluate.bind(k)}).amplitude,Y=K.allObservables,$=K.getEventProperties,Q=K.shouldTrackEvent,J=K.evaluateTriggers,u=Y.changeObservable.filter(ra).filter(function(e){return Q("change",e.closestTrackedAncestor)}).map(function(e){return J(e)}).subscribe(function(e){null==j||j.track("[Amplitude] Element Changed",$("change",e.closestTrackedAncestor))}),T.push(u),X=(z={allObservables:s,options:e,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return y.getEventProperties.apply(y,(0,D.__spreadArray)((0,D.__spreadArray)([],(0,D.__read)(e),!1),[v],!1))},amplitude:n,shouldTrackEvent:a,shouldTrackActionClick:o}).amplitude,Z=z.allObservables,ee=z.options,et=z.getEventProperties,en=z.shouldTrackEvent,er=z.shouldTrackActionClick,ei=Z.clickObservable,ea=Z.mutationObservable,eo=Z.navigateObservable,es=ei.filter(function(e){return!en("click",e.closestTrackedAncestor)}).map(function(e){var t=ri(e.event.target,ee.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=et(e.type,e.closestTrackedAncestor)),e}).filter(ra).filter(function(e){return er("click",e.closestTrackedAncestor)}),el=eo?n$(ea,eo):ea,eu=n$(es,el),ec=null,ed=null,(c=nY(eu,function(e){if(ec&&(clearTimeout(ec),ec=null),"click"===e.type)ed=e,ec=setTimeout(function(){ec=null,ed=null},500);else if(ed){var t=ed;return ed=null,Promise.resolve(t)}return Promise.resolve(null)}).subscribe(function(e){e&&(null==X||X.track(nz,et("click",e.closestTrackedAncestor)))}))&&T.push(c),(ep={allObservables:s,amplitude:n}).amplitude,ef=ep.allObservables.scrollObservable,eh={maxX:0,maxY:0},ev=ef.subscribe(function(){var e,t,n,r,i=(0,eg.getGlobalScope)(),a=Math.floor(null!=(t=null!=(e=null==i?void 0:i.scrollX)?e:null==i?void 0:i.pageXOffset)?t:0),o=Math.floor(null!=(r=null!=(n=null==i?void 0:i.scrollY)?n:null==i?void 0:i.pageYOffset)?r:0);eh.maxX=Math.max(eh.maxX,a),eh.maxY=Math.max(eh.maxY,o)}),d={unsubscribe:function(){ev.unsubscribe()},getState:function(){return eh},reset:function(){eh.maxX=0,eh.maxY=0}},T.push(d),p={},f=(0,eg.getGlobalScope)(),g=function(e){e&&r||(setTimeout(function(){r=!1},100),r=!0,function(e){var t,n,r,i,a=e.amplitude,o=e.scrollTracker,s=e.currentElementExposed,l=e.elementExposedForPage,u=e.exposureTracker,c=e.isPageEnd,d=e.lastScroll,p=o.getState(),f=(0,eg.getGlobalScope)(),h=null!=(n=null==f?void 0:f.innerWidth)?n:0,g=null!=(r=null==f?void 0:f.innerHe
2ight)?r:0,v=((t={})[n0]=null==(i=null==f?void 0:f.location)?void 0:i.href,t["[Amplitude] Max Page X"]=p.maxX+h,t["[Amplitude] Max Page Y"]=p.maxY+g,t[n1]=g,t[n2]=h,t["[Amplitude] Element Exposed"]=Array.from(s),t),_=rr();if(_&&(v[n3]=_),0===s.size&&p.maxX===d.maxX&&p.maxY===d.maxY){c&&(o.reset(),l.clear(),null==u||u.reset());return}null==a||a.track("[Amplitude] Viewport Content Updated",v),d.maxX=p.maxX,d.maxY=p.maxY,s.clear(),c&&(o.reset(),l.clear(),null==u||u.reset())}({amplitude:n,scrollTracker:d,currentElementExposed:b,elementExposedForPage:R,exposureTracker:p.exposure,isPageEnd:e,lastScroll:i}))},_=function(e){!R.has(e)&&(R.add(e),b.add(e),JSON.stringify(Array.from(b)).length>=18e3&&g(!1))},E&&(em=(e_={allObservables:s,onExposure:_,dataExtractor:y,exposureDuration:S}).allObservables,eE=e_.onExposure,eS=e_.dataExtractor,eT=void 0===(eA=e_.exposureDuration)?150:eA,ey=new Map,eI=new Map,eR=em.exposureObservable.subscribe(function(e){var t=e.target;if(e.isIntersecting){if(!ey.get(t)){var n=setTimeout(function(){ey.set(t,!0),eE(eS.getElementPath(t)),eI.set(t,null)},eT);eI.set(t,n)}}else if(!e.isIntersecting&&e.intersectionRatio<1){var n=eI.get(t);n&&(clearTimeout(n),eI.set(t,null))}}),p.exposure={unsubscribe:function(){eR.unsubscribe()},reset:function(){eI.forEach(function(e){e&&clearTimeout(e)}),eI.clear(),ey.clear()}},p.exposure&&T.push(p.exposure),N=function(){g(!0)},null==f||f.addEventListener("beforeunload",N),h=function(){null==f||f.removeEventListener("beforeunload",N)},T.push({unsubscribe:function(){return h()}}),(C=s[I.NavigateObservable])?T.push(C.subscribe(function(){g(!0)})):f&&(P=function(){g(!0)},f.addEventListener("popstate",P),w=f.history.pushState,f.history&&w&&(f.history.pushState=new Proxy(w,{apply:function(e,t,n){var r=(0,D.__read)(n,3),i=r[0],a=r[1],o=r[2];e.apply(t,[i,a,o]),g(!0)}})),T.push({unsubscribe:function(){f.removeEventListener("popstate",P),f.history&&w&&(f.history.pushState=w)}}))),null==(x=null==t?void 0:t.loggerProvider)||x.log("".concat(A," has been successfully added.")),window.opener&&m.enabled&&(F=e.cssSelectorAllowlist,U=e.actionClickAllowlist,!function(e,t){if(!0!==e[ro]){e[ro]=!0;var n=t.dataExtractor,r=t.isElementSelectable,i=t.cssSelectorAllowlist,a=t.actionClickAllowlist,o=null,s=function(t){e.notify({action:"element-selected",data:t})},l=function(t,n){"selector-mode-changed"===t?e.notify({action:"track-selector-mode-changed",data:n}):"selector-moved"===t&&e.notify({action:"track-selector-moved",data:n})};e.registerActionHandler("initialize-visual-tagging-selector",function(t){e.loadScriptOnce("https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz").then(function(){var u;o=null==(u=null==window?void 0:window.amplitudeVisualTaggingSelector)?void 0:u.call(window,{getEventTagProps:n.getEventTagProps,isElementSelectable:function(e){return!r||r((null==t?void 0:t.actionType)||"click",e)},onTrack:l,onSelect:s,visualHighlightClass:"amp-visual-tagging-selector-highlight",messenger:e,cssSelectorAllowlist:i,actionClickAllowlist:a,extractDataFromDataSource:n.extractDataFromDataSource,dataExtractor:n,diagnostics:{autocapture:{version:nJ}}}),e.notify({action:"selector-loaded"})}).catch(function(){var t;null==(t=e.logger)||t.warn("Failed to initialize visual tagging selector")})}),e.registerActionHandler("close-visual-tagging-selector",function(){var e;null==(e=null==o?void 0:o.close)||e.call(o)})}}(M=nq(),{dataExtractor:y,isElementSelectable:re(e,(0,D.__spreadArray)((0,D.__spreadArray)([],(0,D.__read)(F),!1),(0,D.__read)(U),!1)),cssSelectorAllowlist:F,actionClickAllowlist:U}),nK(M),M.setup((0,D.__assign)({logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:nx[t.serverZone]}))),[2])})})},execute:function(e){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var e,t,n,r;return(0,D.__generator)(this,function(i){try{for(t=(e=(0,D.__values)(T)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(r=e.return)&&r.call(e)}finally{if(n)throw n.error}}return[2]})})}}},rs=nj,rU=(0,D.__spreadArray)(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],(0,D.__read)(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),rM=["*"],rx=["mutation","navigate"];function rG(e,t){var n,r,i,a,o=t.event,s=o.pageX,l=o.pageY;e.yMin=Math.min(null!=(n=e.yMin)?n:l,l),e.yMax=Math.max(null!=(r=e.yMax)?r:l,l),e.xMin=Math.min(null!=(i=e.xMin)?i:s,s),e.xMax=Math.max(null!=(a=e.xMax)?a:s,s),e.isOutOfBounds=e.yMax-e.yMin>50||e.xMax-e.xMin>50}function rV(e){if(0===e.length)return null;var t=e[0],n=e[e.length-1];return{rageClickEvent:(0,D.__assign)({"[Amplitude] Begin Time":new Date(t.timestamp).toISOString(),"[Amplitude] End Time":new Date(n.timestamp).toISOString(),"[Amplitude] Duration":n.timestamp-t.timestamp,"[Amplitude] Clicks":e.map(function(e){return{X:e.event.pageX,Y:e.event.pageY,Time:e.timestamp}}),"[Amplitude] Click Count":e.length},t.targetElementProperties),time:t.timestamp}}
2var rs=nj;(c=R||(R={})).INCREASING="increasing",c.DECREASING="decreasing",(d=b||(b={})).X="x",d.Y="y";var rB=function(e){var t=e.allWindowObservables.mouseMoveObservable;return new rs.default(function(e){var n=null,r=null,i=null;return t.subscribe(function(t){var a={x:t.clientX,y:t.clientY};if(null===n){n=a;return}a.x>n.x?(r===R.DECREASING&&e.next(b.X),r=R.INCREASING):a.x<n.x&&(r===R.INCREASING&&e.next(b.X),r=R.DECREASING),a.y>n.y?(i===R.DECREASING&&e.next(b.Y),i=R.INCREASING):a.y<n.y&&(i===R.INCREASING&&e.next(b.Y),i=R.DECREASING),n=a})})};function rH(e){var t=e.changes,n=e.changesThreshold,r=e.thresholdMs;return!(t.length<n)&&t[t.length-1]-t[0]<r}function rq(e){e.changes=[],e.startTime=void 0}function rW(e){for(var t=e.changes,n=e.thresholdMs,r=0,i=t[t.length-1];r<t.length&&!(i-t[r]<n);r++);0!==r&&(e.startTime=t[r],e.changes.splice(0,r))}var rK=function(e){var t=e.mouseDirectionChangeObservable,n=e.directionChanges,r=void 0===n?20:n,i=e.thresholdMs,a=void 0===i?2e3:i;return new rs.default(function(e){var n={changes:[],changesThreshold:r,thresholdMs:a},i={changes:[],changesThreshold:r,thresholdMs:a},o=void 0,s=null;function l(){void 0!==o&&(e.next(o),o=void 0,null!==s&&clearTimeout(s),rq(n),rq(i))}return t.subscribe(function(e){null!==s&&clearTimeout(s),t=e===b.X?n:i,r=+Date.now(),t.startTime=t.startTime||r,u=t.changes,c=t.changesThreshold,u.push(r),u.length>c&&u.shift();var t,r,u,c,d=function(e,t){var n=void 0;if(rH(e)&&(n=e.startTime),rH(t)){var r=t.startTime;r&&(!n||r<n)&&(n=r)}return n}(n,i);return d?(o=o||d,s=setTimeout(function(){l(),s=null},a)):l(),rW(n),rW(i),function(){null!==s&&(clearTimeout(s),s=null)}})})},rj=function(e){var t=e.amplitude,n=e.options,r=e.allObservables,i=e.directionChanges,a=e.thresholdMs;return rK({mouseDirectionChangeObservable:rB({allWindowObservables:r}),directionChanges:void 0===i?20:i,thresholdMs:void 0===a?2e3:a}).subscribe(function(e){n9(n)&&t.track("[Amplitude] Thrashed Cursor",void 0,{time:e})})};function rY(e,t,n,r){if(!r)return[];var i=e[t];return"object"==typeof i&&null!==i&&"cssSelectorAllowlist"in i&&Array.isArray(i.cssSelectorAllowlist)?i.cssSelectorAllowlist:n}var r$=function(e){void 0===e&&(e={});var t,n="@amplitude/plugin-frustration-browser",r=[],i=!1!==e.errorClicks;e.errorClicks||(i=!1);var a=!1!==e.deadClicks&&null!==e.deadClicks,o=!1!==e.rageClicks&&null!==e.rageClicks,s=!1!==e.thrashedCursor&&null!==e.thrashedCursor;e.thrashedCursor||(s=!1);var l=rY(e,"rageClicks",rM,o),u=rY(e,"deadClicks",rU,a),c=rY(e,"errorClicks",rU,i),d=null!=(t=e.dataAttributePrefix)?t:nF,p=new rw(e),f=(0,D.__spreadArray)([],(0,D.__read)(new Set((0,D.__spreadArray)((0,D.__spreadArray)((0,D.__spreadArray)([],(0,D.__read)(l),!1),(0,D.__read)(u),!1),(0,D.__read)(c),!1))),!1),h=function(){var e,t,n=nQ(r_("pointerdown").map(function(e){return p.addAdditionalEventProperties(e,"click",f,d,!0)})),r=nQ(rm().map(function(e){return p.addTypeAndTimestamp(e,"error")})),i=nQ(rv().map(function(e){return p.addAdditionalEventProperties(e,"mutation",f,d)}));window.navigation&&(t=nQ(new rs.default(function(e){var t=function(t){e.next((0,D.__assign)((0,D.__assign)({},t),{type:"navigate"}))};return window.navigation.addEventListener("navigate",t),function(){window.navigation.removeEventListener("navigate",t)}}).map(function(e){return p.addAdditionalEventProperties(e,"navigate",f,d)})));var a=nQ(new rs.default(function(e){var t=function(){var t=document.activeElement;if(t&&("TEXTAREA"===t.tagName||"INPUT"===t.tagName)){var n=void 0,r=void 0;try{if(n=t.selectionStart,r=t.selectionEnd,n===r)return}catch(e){return}return e.next()}var i=window.getSelection();if(i&&!i.isCollapsed)return e.next()};return window.document.addEventListener("selectionchange",t),function(){window.document.removeEventListener("selectionchange",t)}})),o=nQ(new rs.default(function(e){var t=function(t){e.next(t)},n={capture:!0};return rg.document.addEventListener("mousemove",t,n),function(){rg.document.removeEventListener("mousemove",t,n)}}));return(e={})[I.ClickObservable]=n,e[I.MutationObservable]=i,e[I.NavigateObservable]=t,e[I.BrowserErrorObservable]=r,e[I.SelectionObservable]=a,e[I.MouseMoveObservable]=o,e};return{name:n,type:"enrichment",setup:function(t,f){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var g,v,_,m,E,S,A,T;return(0,D.__generator)(this,function(I){var R,b,O,N,C,k,L,P,w,F,U,M,x,G,V,B,H,q,W,K,j,Y;return"u"<typeof document?[2]:(g=h(),o&&(v=function(e){var t=this,n=e.amplitude,r=e.allObservables,i=e.shouldTrackRageClick,a=r.clickObservable,o=r.selectionObservable,s=[],l={},u=null;function c(e){s=[],l={},e&&(rG(l,e),s.push(e))}var d=nY(a.filter(function(e){return i("click",e.closestTrackedAncestor)}),function(e){return(0,D.__awaiter)(t,void 0,void 0,function(){var t;return(0,D.__generator)(this,function(n){var r,i,a,o;return(rG(l,e),t=null,0===s.length||(r=s).length>0&&r[r.length-1].closestTrackedAncestor!==e.closestTrackedAncestor||(a=Math.max(0,(i=s).length-4+1),o=i[a],e.timestamp-o.timestamp>=1e3)||l.isOutOfBounds)?(u&&(t=rV(s)),c(e)):s.push(e),(u&&(clearTimeout(u.timerId),u.resolve(t),u=null),s.length>=4)?[2,new Promise(function(e){u={resolve:e,timerId:setTimeout(function(){e(rV(s))},1e3)}})]:[2,null]})})}),p=null==o?void 0:o.subscribe(function(){c()}),f=d.subscribe(function(e){null!==e&&n.track("[Amplitude] Rage Click",e.rageClickEvent,{time:e.time})});return{unsubscribe:function(){f.unsubscribe(),null==p||p.unsubscribe()}}}({allObservables:g,amplitude:f,shouldTrackRageClick:re(e,l)}),r.push(v)),a&&(b=(R={amplitude:f,allObservables:g,getEventProperties:function(e,t){return p.getEventProperties(e,t,d)},shouldTrackDeadClick:re(e,u)}).amplitude,O=R.allObservables,N=R.getEventProperties,C=R.shouldTrackDeadClick,k=O.clickObservable,L=O.mutationObservable,P=O.navigateObservable,w=k.filter(function(e){return ra(e)&&C("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===y.LEFT_OR_TOUCH_CONTACT}),F=P?n$(L,P):L,U=n$(w,F),M=null,_=nY(U,function(e){if(M&&rx.includes(e.type))clearTimeout(
2M),M=null;else if("click"===e.type)return M?Promise.resolve(null):new Promise(function(t){M=setTimeout(function(){t(e),M=null},3e3)});return Promise.resolve(null)}).subscribe(function(e){if(e){var t={"[Amplitude] X":e.event.clientX,"[Amplitude] Y":e.event.clientY};b.track("[Amplitude] Dead Click",(0,D.__assign)((0,D.__assign)({},N("click",e.closestTrackedAncestor)),t),{time:e.timestamp})}}),r.push(_)),i&&(G=(x={amplitude:f,allObservables:g,shouldTrackErrorClick:re(e,c)}).amplitude,V=x.allObservables,B=x.shouldTrackErrorClick,H=V.clickObservable,q=V.browserErrorObservable,W=H.filter(function(e){return ra(e)&&B("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===y.LEFT_OR_TOUCH_CONTACT}),K=null,j=null,Y=function(){null!==K&&(clearTimeout(K),K=null),j=null},m=n$(W,q).subscribe(function(e){var t;if("click"===e.type){Y(),j=e,K=setTimeout(Y,2e3);return}"error"===e.type&&j&&(G.track("[Amplitude] Error Click",(0,D.__assign)(((t={})["[Amplitude] Kind"]=e.event.kind,t["[Amplitude] Message"]=e.event.message,t["[Amplitude] Stack"]=e.event.stack,t["[Amplitude] Filename"]=e.event.filename,t["[Amplitude] Line Number"]=e.event.lineNumber,t["[Amplitude] Column Number"]=e.event.columnNumber,t),j.targetElementProperties)),Y())}),r.push(m)),s&&(E=void 0,S=void 0,"object"==typeof e.thrashedCursor&&(E=e.thrashedCursor.directionChanges,S=e.thrashedCursor.threshold,E&&E<5&&(t.loggerProvider.warn("'thrashedCursor.directionChanges' of ".concat(E," is below the minimum of ").concat(5,", setting to ").concat(5)),E=5),S&&S>4e3&&(t.loggerProvider.warn("'thrashedCursor.threshold' of ".concat(S," is above the maximum of ").concat(4e3,", setting to ").concat(4e3)),S=4e3)),A=rj({amplitude:f,options:e,allObservables:g,directionChanges:E,thresholdMs:S}),r.push(A)),null==(T=null==t?void 0:t.loggerProvider)||T.log("".concat(n," has been successfully added.")),[2])})})},execute:function(e){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var e,t,n,i;return(0,D.__generator)(this,function(a){try{for(t=(e=(0,D.__values)(r)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}}return[2]})})}}};function rQ(e,t,n){e&&function e(t){var n,r,i=t.json,a=t.targetObject,o=t.allowlist,s=t.excludelist,l=t.ancestors,u=t.parentObject,c=t.targetKey;a||(a=i);var d=Object.keys(a);try{for(var p=(0,D.__values)(d),f=p.next();!f.done;f=p.next()){var h,g=f.value,v=(0,D.__spreadArray)((0,D.__spreadArray)([],(0,D.__read)(l),!1),[g],!1);(h=a[g],"string"==typeof h||"number"==typeof h||"boolean"==typeof h||null==h)?(!rz(v,o)||rz(v,s))&&delete a[g]:e({json:i,targetObject:a[g],allowlist:o,excludelist:s,ancestors:v,parentObject:a,targetKey:g})}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}0===Object.keys(a).length&&u&&c&&delete u[c]}({json:e,allowlist:t.map(rJ),excludelist:n.map(rJ),ancestors:[]})}function rJ(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})}function rz(e,t){return t.some(function(t){return function e(t,n,r,i){if(void 0===r&&(r=0),void 0===i&&(i=0),i===n.length)return r===t.length;if(r===t.length){for(;i<n.length&&"**"===n[i];)i++;return i===n.length}var a=n[i];if("**"===a){if(i+1===n.length)return!0;for(var o=r;o<=t.length;o++)if(e(t,n,o,i+1))return!0;return!1}return("*"===a||a===t[r])&&e(t,n,r+1,i+1)}(e,t)})}var rX=function(){function e(e){this.request=e}return e.prototype.headers=function(e){void 0===e&&(e=[]);var t,n,r=this.request.headers,i={};if(Array.isArray(r))r.forEach(function(e){var t=(0,D.__read)(e,2),n=t[0],r=t[1];i[n]=r});else if(r instanceof Headers)r.forEach(function(e,t){i[t]=e});else if("object"==typeof r&&null!==r)try{for(var a=(0,D.__values)(Object.entries(r)),o=a.next();!o.done;o=a.next()){var s=(0,D.__read)(o.value,2),l=s[0],u=s[1];i[l]=u}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r5(i,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=(0,eg.getGlobalScope)();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=r0(t,100),this._bodySize}}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(n){return 0===e.length?[2,null]:[2,r3(this.body,e,t)]})})},e}(),rZ=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),r5(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return r0(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(n){return 0===e.length?[2,null]:[2,r3(this.body,e,t)]})})},e}();function r0(e,t){var n,r,i,a,o=(0,eg.getGlobalScope)(),s=null==o?void 0:o.TextEncoder;if(s){if("string"==typeof e)a=e,i=new s().encode(a).length;else if(e instanceof Blob)i=(a=e).size;else if(e instanceof URLSearchParams)a=e,i=new s().encode(a.toString()).length;else if(ArrayBuffer.isView(e))i=(a=e).byteLength;else if(e instanceof ArrayBuffer)i=(a=e).byteLength;else if(e instanceof FormData){var l=0,u=0;try{for(var c=(0,D.__values)(e.entries()),d=c.next();!d.done;d=c.next()){var p=(0,D.__read)(d.value,2),f=p[0],h=p[1];if(l+=f.length,"string"==typeof h)l+=new s().encode(h).length;else{if(!(h instanceof Blob))return;l+=h.size}if(++u>=t)return}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}i=l}else if(e instanceof ReadableStream){a=e;return}return i}}var r1=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),this.response.headers instanceof Headers){var n=this.response.headers,r={};return null==(t=null==n?void 0:n.forEach)||t.call(n,function(e,t){r[t]=e}),r5(r,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){if(void 0!==this._bodySize)return this._bodySize;var e,t,n=null==(t=null==(e=this.response.headers)?void 0:e.get)?void 0:t.call(e,"content-length"),r=n?parseInt(n,10):void 0;return this._bodySize=r,r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(e){switch(e.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.race([this.clonedResponse.text(),new Promise(function(e){return setTimeout(function(){return e(null)},500)})])];case 2:return[2,e.sent()];case 3:return e.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,D.__awaiter)(this,void 0,void 0,function(){return(0,D.__generator)(this,function(n){switch(n.label){case 0:if(0===e.length)return[2,null];return[4,this.text()];case 1:return[2,r3(n.sent(),e,t)]}})})},e}(),r2=function(){function e(e,t,n,r){this.statusCode=e,this.headersString=t,this.size=n,this.getJson=r}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){if(void 0===e&&(e=[]),!this.headersString)return{};var t,n,r={},i=this.headersString.split("\r\n");try{for(var a=(0,D.__values)(i),o=a.next();!o.done;o=a.next()){var s=o.value,l=(0,D.__read)(s.split(": "),2),u=l[0],c=l[1];u&&c&&(r[u]=c)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r5(r,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,D.__awaiter)(this,void 0,void 0,function(){var n;return(0,D.__generator)(this,function(r){return 0===e.length?[2,null]:(n=this.getJson())?(rQ(n,e,t),[2,n]):[2,null]})})},e}();function r3(e,t,n){if(!e)return null;try{var r=JSON.parse(e);return rQ(r,t,n),r}catch(e){return null}}(p=O||(O={})).REDACT="redact",p.REMOVE="remove";var r4="[REDACTED]",r5=function(e,t){var n,r,i=t.allow,a=void 0===i?[]:i,o=t.strategy,s=void 0===o?O.REMOVE:o,l=(0,D.__spreadArray)([],(0,D.__read)(eu),!1),u={};try{for(var c=(0,D.__values)(Object.keys(e)),d=c.next();!d.done;d=c.next()){var p=d.value;!function(t){var n=t.toLowerCase();l.find(function(e){return e.toLowerCase()===n})?s===O.REDACT&&(u[t]=r4):a.find(function(e){return e.toLowerCase()===n})?u[t]=e[t]:s===O.REDACT&&(u[t]=r4)}(p)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return u},r6=function(){function e(e,t,n,r,i,a,o,s,l,u,c){void 0===o&&(o=0),this.type=e,this.method=t,this.timestamp=n,this.startTime=r,this.url=i,this.requestWrapper=a,this.status=o,this.duration=s,this.responseWrapper=l,this.error=u,this.endTime=c}return e.prototype.toSerializable=function(){var e,t,n,r;
2return Object.fromEntries(Object.entries({type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null==(e=this.requestWrapper)?void 0:e.headers((0,D.__spreadArray)([],(0,D.__read)(el),!1)),requestBodySize:null==(t=this.requestWrapper)?void 0:t.bodySize,responseHeaders:null==(n=this.responseWrapper)?void 0:n.headers((0,D.__spreadArray)([],(0,D.__read)(el),!1)),responseBodySize:null==(r=this.responseWrapper)?void 0:r.bodySize}).filter(function(e){var t=(0,D.__read)(e,2);return void 0!==(t[0],t[1])}))},e}(),r7=function(e,t){void 0===t&&(t=e_()),this.callback=e,this.id=t};function r8(e){try{e()}catch(e){}}var r9=new(function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var n=(0,eg.getGlobalScope)();e.isSupported()&&(this.globalScope=n)}return e.isSupported=function(){var e=(0,eg.getGlobalScope)();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var n,r,i,a,o,s,l,u,c,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var p=null==(i=null==(r=null==(n=this.globalScope)?void 0:n.XMLHttpRequest)?void 0:r.prototype)?void 0:i.open,f=null==(s=null==(o=null==(a=this.globalScope)?void 0:a.XMLHttpRequest)?void 0:o.prototype)?void 0:s.send,h=null==(c=null==(u=null==(l=this.globalScope)?void 0:l.XMLHttpRequest)?void 0:u.prototype)?void 0:c.setRequestHeader;p&&f&&h&&this.observeXhr(p,f,h);var g=null==(d=this.globalScope)?void 0:d.fetch;g&&this.observeFetch(g),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(n){try{n.callback(e)}catch(e){r8(function(){var n;null==(n=t.logger)||n.debug("an unexpected error occurred while triggering event callbacks",e)})}})},e.prototype.handleNetworkRequestEvent=function(e,t,n,r,i,a,o){if(void 0!==a&&void 0!==o){var s,l,u,c,d="GET";if("object"==typeof t&&null!==t&&"url"in t&&"method"in t?(l=t.url,d=t.method):l=null==(s=null==t?void 0:t.toString)?void 0:s.call(t),l)try{var p=new URL(l);l="".concat(p.protocol,"//").concat(p.host).concat(p.pathname).concat(p.search).concat(p.hash)}catch(e){}d=(null==n?void 0:n.method)||d,r&&(u=r.status),i&&(c={name:i.name||"UnknownError",message:i.message||"An unknown error occurred"},u=0);var f=Math.floor(performance.now()-o),h=Math.floor(a+f),g=new r6(e,d,a,a,l,n,u,f,r,c,h);this.triggerEventCallbacks(g)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null==(e=Date.now)?void 0:e.call(Date),durationStart:null==(t=null==performance?void 0:performance.now)?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(n,r){return(0,D.__awaiter)(t,void 0,void 0,function(){var t,i,a,o=this;return(0,D.__generator)(this,function(s){switch(s.label){case 0:try{t=this.getTimestamps()}catch(e){r8(function(){var t;return null==(t=o.logger)?void 0:t.debug("an unexpected error occurred while retrieving timestamps",e)})}s.label=1;case 1:return s.trys.push([1,3,,4]),[4,e(n,r)];case 2:return i=s.sent(),[3,4];case 3:return a=s.sent(),[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",n,r?new rX(r):void 0,i?new r1(i):void 0,a,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){r8(function(){var t;return null==(t=o.logger)?void 0:t.debug("an unexpected error occurred while handling fetch",e)})}if(i)return[2,i];throw a}})})})},e.createXhrJsonParser=function(e,t){return function(){var n;try{if("json"===e.responseType){if(null==(n=t.globalScope)?void 0:n.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(n){n instanceof Error&&"InvalidStateError"===n.name&&r8(function(){var n;return null==(n=t.logger)?void 0:n.debug("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))})}return null}},e.prototype.observeXhr=function(t,n,r){if(this.globalScope&&t&&n){var i=this.globalScope.XMLHttpRequest.prototype,a=this;i.open=function(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=(0,D.__read)(n,2),o=i[0],s=i[1];try{this.$$AmplitudeAnalyticsEvent=(0,D.__assign)({method:o,url:null==(e=null==s?void 0:s.toString)?void 0:e.call(s),headers:{}},a.getTimestamps())}catch(e){r8(function(){var t;return null==(t=a.logger)?void 0:t.debug("an unexpected error occurred while calling xhr open",e)})}return t.apply(this,n)},i.send=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=this,o=e.createXhrJsonParser(this,a),s=t[0],l=i.$$AmplitudeAnalyticsEvent;return i.$$AmplitudeAnalyticsEvent&&i.addEventListener("loadend",function(){try{var e=i.getAllResponseHeaders(),t=i.getResponseHeader("content-length"),n=new r2(i.status,e,t?parseInt(t,10):void 0,o),r=i.$$AmplitudeAnalyticsEvent.headers,u=new rZ(s,r);l.status=i.status,a.handleNetworkRequestEvent("xhr",{url:l.url,method:l.method},u,n,void 0,l.startTime,l.durationStart)}catch(e){r8(function(){var t;return null==(t=a.logger)?void 0:t.debug("an unexpected error occurred while handling xhr send",e)})}}),n.apply(i,t)},i.setRequestHeader=function(e,t){try{var n=this.$$AmplitudeAnalyticsEvent;n&&(n.headers[e]=t)}catch(e){r8(function(){var t;return null==(t=a.logger)?void 0:t.debug("an unexpected error occurred while calling xhr setRequestHeader",e)})}r.apply(this,[e,t])}}},e}()),ie="[Amplitude] Network Request",rs=nj,it="500-599";function ir(e,t){return RegExp("^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$").test(e)}function ii(e,t){var n,r,i=t.split(",");try{for(var a=(0,D.__values)(i),o=a.next();!o.done;o=a.next()){var s=o.value,l=(0,D.__read)(s.split("-").map(Number),2),u=l[0],c=l[1];if(e===u&&void 0===c||e>=u&&e<=c)return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return!1}function ia(e){var t;if(e)try{var n=null==(t=(0,eg.getGlobalScope)())?void 0:t.location.href,r=new URL(e,n),i=r.searchParams.toString(),a=r.hash.replace("#",""),o=r.href,s=r.host;r.hash="",r.search="";var l=r.href;return{query:i,fragment:a,href:o,hrefWithoutQueryOrHash:l,host:s}}catch(e){return}}function io(e){return"object"!=typeof e||null===e?e?(0,D.__spreadArray)([],(0,D.__read)(el),!1):void 0:0!==e.length?e:void 0}function is(e){var t,n;return!(null==(t=null==e?void 0:e.allowlist)?void 0:t.length)&&!(null==(n=null==e?void 0:e.blocklist)?void 0:n.length)}(N||(N={})).NetworkObservable="networkObservable";var il=function(e){void 0===e&&(e={});var t,n="@amplitude/plugin-network-capture-browser",r=function(){var e,n=new rs.default(function(e){var n=new r7(function(t){var n={event:t,timestamp:Date.now(),type:"network"};e.next(n)});return r9.subscribe(n,t),function(){r9.unsubscribe(n)}});return(e={})[N.NetworkObservable]=n,e};return{name:n,type:"enrichment",setup:function(i,a){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var o;return(0,D.__generator)(this,function(s){var l,u,c,d,p;return"u"<typeof document?[2]:(o=r(),t=null==i?void 0:i.loggerProvider,u=(l={allObservables:o,networkTrackingOptions:e,amplitude:a,loggerProvider:t}).allObservables,c=l.networkTrackingOptions,d=l.amplitude,p=l.loggerProvider,C=u.networkObservable.filter(function(e){return function(e,t){void 0===t&&(t={});var n,r,i=ia(e.url);if(!i)return!1;var a=i.host;return!(!1!==t.ignoreAmplitudeRequests&&(ir(a,"*.amplitude.com")||ir(a,"amplitude.com"))||(null==(n=t.ignoreHosts)?void 0:n.find(function(e){return ir(a,e)})))&&(!!t.captureRules||void 0===e.status||!!ii(e.status,it))&&(!t.captureRules||((0,D.__spreadArray)([],(0,D.__read)(t.captureRules),!1).reverse().find(function(t){if(r=function(e,t,n,r,i){if((!e.hosts||e.hosts.find(function(e){return ir(t,e)}))&&(!r||!e.urls||n5(r,e.urls))&&(!i||!e.methods||e.methods.find(function(e){return i.toLowerCase()===e.toLowerCase()||"*"===e})))return(!n&&0!==n||!!ii(n,e.statusCodeRange||it))&&!0}(t,a,e.status,e.url,e.method)){var n=io(t.responseHeaders);if(e.responseWrapper&&n){var i=e.responseWrapper.headers(n);i&&(e.responseHeaders=i)}var o=io(t.requestHeaders);if(e.requestWrapper&&o){var s=e.requestWrapper.headers(o);s&&(e.requestHeaders=s)}e.responseWrapper&&t.responseBody&&!is(t.responseBody)&&(e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,t.responseBody.blocklist)),e.requestWrapper&&t.requestBody&&!is(t.requestBody)&&(e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,t.requestBody.blocklist))}return void 0!==r}),!!r))&&!(e.requestWrapper&&function(e,t){if(e.includes("amplitude.com"))try{var n=t.body;if("string"!=typeof n)return!1;if(JSON.parse(n).events.find(function(e){return e.event_type===ie}))return!0}catch(e){}return!1}(a,e.requestWrapper))}(e.event,c)}).subscribe(function(e){var t,n,r,i=e.event,a=ia(i.url);if(a){var o=null==(n=i.responseWrapper)?void 0:n.bodySize,s=null==(r=i.requestWrapper)?void 0:r.bodySize;!function(e,t,n,r){(0,D.__awaiter)(this,void 0,void 0,function(){var i,a,o;return(0,D.__generator)(this,function(s){switch(s.label){case 0:if(!(t.requestBodyJson||t.responseBodyJson))return[3,2];return[4,Promise.all([t.requestBodyJson,t.responseBodyJson])];case 1:if(a=(i=D.__read.apply(void 0,[s.sent(),2]))[0],o=i[1],a)try{e["[Amplitude] Request Body"]=JSON.stringify(a)}catch(e){null==r||r.debug("Failed to stringify request body",e)}if(o)try{e["[Amplitude] Response Body"]=JSON.stringify(o)}catch(e){null==r||r.debug("Failed to stringify response body")}s.label=2;case 2:return null==n||n.track(ie,e),[2]}})})}(((t={})["[Amplitude] URL"]=a.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=a.query,t["[Amplitude] URL Fragment"]=a.fragment,t["[Amplitude] Request Method"]=i.method,t["[Amplitude] Status Code"]=i.status,t["[Amplitude] Start Time"]=i.startTime,t["[Amplitude] Completion Time"]=i.endTime,t["[Amplitude] Duration"]=i.duration,t["[Amplitude] Request Body Size"]=s,t["[Amplitude] Response Body Size"]=o,t["[Amplitude] Request Type"]=i.type,t["[Amplitude] Request Headers"]=i.requestHeaders,t["[Amplitude] Response Headers"]=i.responseHeaders,t),i,d,p)}}),null==t||t.log("".concat(n," has been successfully added.")),[2])})})},execute:function(e){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(e){return C.unsubscribe(),[2]})})}}};let iu=-1,ic=e=>{addEventListener("pageshow",t=>{t.persisted&&(iu=t.timeStamp,e(t))},!0)},id=(e,t,n,r)=>{let i,a;return o=>{let s;t.value>=0&&(o||r)&&((a=t.value-(i??0))||void 0===i)&&(i=t.value,t.delta=a,s=t.value,t.rating=s>n[1]?"poor":s>n[0]?"needs-improvement":"good",e(t))}},ip=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},ih=()=>{let e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},ig=()=>{let e=ih();return e?.activationStart??0},iv=(e,t=-1)=>{let n=ih(),r="navigate";return iu>=0?r="back-forward-cache":n&&(document.prerendering||ig()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(0x82f79cd8fff*Math.random())+1e12}`,navigationType:r}},i_=new WeakMap;function im(e,t){return i_.get(e)||i_.set(e,new t),i_.get(e)}class iE{t;i=0;o=[];h(e){if(e.hadRecentInput)return;let t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}let iS=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},iA=e=>{let t=!1;return()=>{t||(e(),t=!0)}},iT=-1,iy=new Set,iI=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,iR=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(let e of iy)e();isFinite(iT)||(iT="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",iR,!0))}},ib=()=>{if(iT<0){let e=ig();iT=(document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime)??iI(),addEventListener("visibilitychange",iR,!0),addEventListener("prerenderingchange",iR,!0),ic(()=>{setTimeout(()=>{iT=iI()})})}return{get firstHiddenTime(){return iT},onHidden(e){iy.add(e)}}},iO=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},iN=[1800,3e3],iC=(e,t={})=>{iO(()=>{let n=ib(),r,i=iv("FCP"),a=iS("paint",e=>{for(let t of e)"first-contentful-paint"===t.name&&(a.disconnect(),t.startTime<n.firstHiddenTime&&(i.value=Math.max(t.startTime-ig(),0),i.entries.push(t),r(!0)))});a&&(r=id(e,i,iN,t.reportAllChanges),ic(n=>{r=id(e,i=iv("FCP"),iN,t.reportAllChanges),ip(()=>{i.value=performance.now()-n.timeStamp,r(!0)})}))})},ik=[.1,.25],iL=0,iD=1/0,iP=0,iw=e=>{for(let t of e)t.interactionId&&(iD=Math.min(iD,t.interactionId),iL=(iP=Math.max(iP,t.interactionId))?(iP-iD)/7+1:0)},iF=()=>t?iL:performance.interactionCount??0,iU=0;class iM{u=[];l=new Map;m;p;v(){iU=iF(),this.u.length=0,this.l.clear()}L(){let e=Math.min(this.u.length-1,Math.floor((iF()-iU)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;let t=this.u.at(-1),n=this.l.get(e.interactionId);if(n||this.u.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.l.set(n.id,n),this.u.push(n)),this.u.sort((e,t)=>
2t.P-e.P),this.u.length>10)for(let e of this.u.splice(10))this.l.delete(e.id);this.p?.(n)}}}let ix=e=>{let t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(addEventListener("visibilitychange",e=iA(e),{once:!0,capture:!0}),t(()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})}))},iG=[200,500];class iV{m;h(e){this.m?.(e)}}let iB=[2500,4e3],iH=[800,1800],iq=e=>{document.prerendering?iO(()=>iq(e)):"complete"!==document.readyState?addEventListener("load",()=>iq(e),!0):setTimeout(e)};function iW(e){var t,n;return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor((n=(null==(t=e.entries[0])?void 0:t.startTime)||0,performance.timeOrigin+n)),navigationStart:Math.floor(performance.timeOrigin)}}var iK=function(){var e=null,n=(0,eg.getGlobalScope)(),r=null==n?void 0:n.document,i=null==n?void 0:n.location;return{name:"web-vitals-browser",type:"enrichment",setup:function(n,a){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var o,s;return(0,D.__generator)(this,function(l){return void 0===r||(o=n6((null==i?void 0:i.href)||"",n.loggerProvider),s={"[Amplitude] Page Domain":(null==i?void 0:i.hostname)||"","[Amplitude] Page Location":o,"[Amplitude] Page Path":n6((null==i?void 0:i.pathname)||"",n.loggerProvider),"[Amplitude] Page Title":"u">typeof document&&document.title||"","[Amplitude] Page URL":n6(o.split("?")[0],n.loggerProvider)},((e,t={})=>{iO(()=>{let n=ib(),r,i=iv("LCP"),a=im(t,iV),o=e=>{for(let o of(t.reportAllChanges||(e=e.slice(-1)),e))a.h(o),o.startTime<n.firstHiddenTime&&(i.value=Math.max(o.startTime-ig(),0),i.entries=[o],r())},s=iS("largest-contentful-paint",o);if(s){r=id(e,i,iB,t.reportAllChanges);let n=iA(()=>{o(s.takeRecords()),s.disconnect(),r(!0)}),a=e=>{e.isTrusted&&(ix(n),removeEventListener(e.type,a,{capture:!0}))};for(let e of["keydown","click","visibilitychange"])addEventListener(e,a,{capture:!0});ic(n=>{r=id(e,i=iv("LCP"),iB,t.reportAllChanges),ip(()=>{i.value=performance.now()-n.timeStamp,r(!0)})})}})})(function(e){s["[Amplitude] LCP"]=iW(e)}),iC(function(e){s["[Amplitude] FCP"]=iW(e)}),((e,n={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;let r=ib();iO(()=>{"interactionCount"in performance||t||(t=iS("event",iw,{type:"event",buffered:!0,durationThreshold:0}));let i,a=iv("INP"),o=im(n,iM),s=e=>{ix(()=>{for(let t of e)o.h(t);let t=o.L();t&&t.P!==a.value&&(a.value=t.P,a.entries=t.entries,i())})},l=iS("event",s,{durationThreshold:n.durationThreshold??40});i=id(e,a,iG,n.reportAllChanges),l&&(l.observe({type:"first-input",buffered:!0}),r.onHidden(()=>{s(l.takeRecords()),i(!0)}),ic(()=>{o.v(),i=id(e,a=iv("INP"),iG,n.reportAllChanges)}))})})(function(e){s["[Amplitude] INP"]=iW(e)}),((e,t={})=>{let n=ib();iC(iA(()=>{let r,i=iv("CLS",0),a=im(t,iE),o=e=>{for(let t of e)a.h(t);a.i>i.value&&(i.value=a.i,i.entries=a.o,r())},s=iS("layout-shift",o);s&&(r=id(e,i,ik,t.reportAllChanges),n.onHidden(()=>{o(s.takeRecords()),r(!0)}),ic(()=>{a.i=0,r=id(e,i=iv("CLS",0),ik,t.reportAllChanges),ip(()=>r())}),setTimeout(r))}))})(function(e){s["[Amplitude] CLS"]=iW(e)}),((e,t={})=>{let n=iv("TTFB"),r=id(e,n,iH,t.reportAllChanges);iq(()=>{let i=ih();i&&(n.value=Math.max(i.responseStart-ig(),0),n.entries=[i],r(!0),ic(()=>{(r=id(e,n=iv("TTFB",0),iH,t.reportAllChanges))(!0)}))})})(function(e){s["[Amplitude] TTFB"]=iW(e)}),e=function(){"hidden"===r.visibilityState&&e&&(a.track("[Amplitude] Web Vitals",s),r.removeEventListener("visibilitychange",e),e=null)},r.addEventListener("visibilitychange",e)),[2]})})},execute:function(e){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(t){return e&&(null==r||r.removeEventListener("visibilitychange",e)),[2]})})}}},ij=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),["AMP",t,e.substring(0,n)].filter(Boolean).join("_")},iY=function(){function e(e,t){var n;this.shouldTrackNewCampaign=!1,this.options=(0,D.__assign)({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:nn((null==(n=t.cookieOptions)?void 0:n.domain)||t.topLevelDomain),optOut:t.optOut},e),this.storage=t.cookieStorage,this.storageKey=ij(t.apiKey,"MKTG"),this.webExpStorageKey=ij(t.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=es,this.sessionTimeout=t.sessionTimeout,this.lastEventTime=t.lastEventTime,this.logger=t.loggerProvider,this.topLevelDomain=t.topLevelDomain,t.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){var e,t;return(0,D.__generator)(this,function(n){switch(n.label){case 0:if(this.options.optOut)return[2];return[4,this.fetchCampaign()];case 1:if(t=D.__read.apply(void 0,[n.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||eQ(this.sessionTimeout,this.lastEventTime),!t9(this.currentCampaign,this.previousCampaign,this.options,this.logger,e,this.topLevelDomain))return[3,3];return this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return(0,D.__awaiter)(this,void 0,void 0,function(){var e;return(0,D.__generator)(this,function(t){switch(t.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:if(!(e=t.sent()))return[3,3];return[4,this.storage.remove(this.webExpStorageKey)];case 2:t.sent(),t.label=3;case 3:return[4,Promise.all([e||new nE().parse(),this.storage.get(this.storageKey)])];case 4:return[2,t.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t,n,r=(t=this.currentCampaign,n=this.options,eE(Object.entries((0,D.__assign)((0,D.__assign)({},es),t)).reduce(function(e,t){var r,i=(0,D.__read)(t,2),a=i[0],o=i[1];return(e.setOnce("initial_".concat(a),null!=(r=null!=o?o:n.initialEmptyValue)?r:"EMPTY"),o)?e.set(a,o):e.unset(a)}
2,new ep)));return e&&(r.event_id=e),r},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),i$=new Set([m.IDENTIFY,m.GROUP_IDENTIFY]),iQ=function(e){void 0===e&&(e={});var t,n,r,i,a,o,s,l=null!=(t=e.fallbackAttributionEvent)&&t,u=(0,eg.getGlobalScope)(),c={},d=!1,p=!1,f=function(){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(e){switch(e.label){case 0:return[4,new nE().parse()];case 1:return c=nS(e.sent()),l&&(null==r||r.log("Tracking attribution fallback event."),null==n||n.track("[Amplitude] Attribution",c)),[2]}})})},h=function(){f()},g=function(e){return new Proxy(e,{apply:function(e,t,n){Reflect.apply(e,t,n),d&&h()}})};return{name:"@amplitude/plugin-event-property-attribution-browser",type:"enrichment",setup:function(e,t){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(l){switch(l.label){case 0:return n=t,r=e.loggerProvider,d=!0,r.log("Installing event property attribution tracking."),[4,f()];case 1:if(l.sent(),!u)return[2];if(u.addEventListener("popstate",h),!p){if(i=Reflect.get(u.history,"pushState"),a=Reflect.get(u.history,"replaceState"),!i||!a)return[2];o=g(i),u.history.pushState=o,s=g(a),u.history.replaceState=s,p=!0}return[2]}})})},execute:function(e){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(t){return i$.has(e.event_type)||(e.event_properties=(0,D.__assign)((0,D.__assign)({},c),e.event_properties)),[2,e]})})},teardown:function(){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var e,t;return(0,D.__generator)(this,function(n){return u&&(u.removeEventListener("popstate",h),e=Reflect.get(u.history,"pushState"),t=Reflect.get(u.history,"replaceState"),p&&e===o&&i&&(u.history.pushState=i),p&&t===s&&a&&(u.history.replaceState=a)),d=!1,p=!1,i=void 0,a=void 0,o=void 0,s=void 0,c={},[2]})})}}},iJ="AMP_CURRENT_PAGE",iz="AMP_PREVIOUS_PAGE",iX="AMP_URL_INFO";(f=k||(k={})).Direct="direct",f.Internal="internal",f.External="external";var iZ=new Set([m.IDENTIFY,m.GROUP_IDENTIFY,m.REVENUE]),i0=function(e){var t=(void 0===e?{}:e).internalDomains,n=void 0===t?[]:t,r=(0,eg.getGlobalScope)(),i=void 0,a=!1,o=void 0,s=!1,l=!1,u=function(e){var t;try{var n=n6(e,o);t=new URL(n).hostname}catch(e){null==o||o.error("Could not parse URL: ",e)}return t},c=function(e){var t="u">typeof location&&location.hostname||"",r=e?u(e):void 0;if(!r)return k.Direct;var i=n.some(function(e){return -1!==t.indexOf(e)}),a=n.some(function(e){return -1!==r.indexOf(e)});return t===r||a&&i?k.Internal:k.External},d=function(){(0,D.__awaiter)(void 0,void 0,void 0,function(){var e,t,n,r,o;return(0,D.__generator)(this,function(s){switch(s.label){case 0:if(!(i&&a))return[3,3];return[4,i.get(iX)];case 1:return e=s.sent(),t=n6("u">typeof location&&location.href||""),n=(null==e?void 0:e[iJ])||"",r=void 0,r=t===n?(null==e?void 0:e[iz])||"":n||document.referrer||"",[4,i.set(iX,((o={})[iJ]=t,o[iz]=r,o))];case 2:s.sent(),s.label=3;case 3:return[2]}})})};return{name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(e,t){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var t;return(0,D.__generator)(this,function(n){switch(n.label){case 0:if((o=e.loggerProvider).log("Installing @amplitude/plugin-page-url-enrichment-browser"),l=!0,!r)return[3,2];try{i=new tF(r.sessionStorage)}catch(e){null==o||o.debug("sessionStorage is not available in this environment.")}return[4,null==i?void 0:i.isEnabled()];case 1:a=null!=(t=n.sent())&&t,r.addEventListener("popstate",d),s||(r.history.pushState=new Proxy(r.history.pushState,{apply:function(e,t,n){var r=(0,D.__read)(n,3),i=r[0],a=r[1],o=r[2];e.apply(t,[i,a,o]),l&&d()}}),r.history.replaceState=new Proxy(r.history.replaceState,{apply:function(e,t,n){var r=(0,D.__read)(n,3),i=r[0],a=r[1],o=r[2];e.apply(t,[i,a,o]),l&&d()}}),s=!0),n.label=2;case 2:return[2]}})})},execute:function(e){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var t,n,r,o,s;return(0,D.__generator)(this,function(l){switch(l.label){case 0:if(t=n6("u">typeof location&&location.href||""),!(i&&a))return[3,5];return[4,i.get(iX)];case 1:if(null==(n=l.sent())?void 0:n[iJ])return[3,3];return[4,i.set(iX,((s={})[iJ]=t,s[iz]=document.referrer||"",s))];case 2:l.sent(),l.label=3;case 3:return[4,i.get(iX)];case 4:if(r=l.sent(),o="",r&&(o=r[iz]||""),iZ.has(e.event_type))return[2,e];e.event_properties=(0,D.__assign)((0,D.__assign)({},e.event_properties||{}),{"[Amplitude] Page Domain":i1(e,"[Amplitude] Page Domain","u">typeof location&&location.hostname||""),"[Amplitude] Page Location":i1(e,"[Amplitude] Page Location",t),"[Amplitude] Page Path":i1(e,"[Amplitude] Page Path","u">typeof location&&n6(location.pathname)||""),"[Amplitude] Page Title":i1(e,"[Amplitude] Page Title",nm(n_)),"[Amplitude] Page URL":i1(e,"[Amplitude] Page URL",t.split("?")[0]),"[Amplitude] Previous Page Location":o,"[Amplitude] Previous Page Type":c(o)}),l.label=5;case 5:return[2,e]}})})},teardown:function(){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(e){switch(e.label){case 0:if(r&&(r.removeEventListener("popstate",d),l=!1),!(i&&a))return[3,2];return[4,i.set(iX,{})];case 1:e.sent(),e.label=2;case 2:return[2]}})})}}};function i1(e,t,n){return(e.event_properties||(e.event_properties={}),void 0===e.event_properties[t])?n:e.event_properties[t]}var i2=function(){var e,t,n;function r(t){if(t)try{var n=Function("return "+t)();if("function"==typeof n)return n;null==e||e.error("Custom enrichment body did not evaluate to a function")}catch(t){null==e||e.error("Could not create custom enrichment function",t)}return function(e){return e}}return{name:"@amplitude/plugin-custom-enrichment-browser",type:"enrichment",setup:function(i,a){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var a,o;return(0,D.__generator)(this,function(s){return null==(e=i.loggerProvider)||e.log("Installing @amplitude/plugin-custom-enrichment-browser"),(null==(o=i.remoteConfig)?void 0:o.fetchRemoteConfig)&&(i.remoteConfigClient?(a=i.remoteConfigClient.subscribe("configs.analyticsSDK.browserSDK.customEnrichment","all",function(e){n=e&&"object"==typeof e&&null!==e&&"body"in e&&"string"==typeof e.body?r(e.body||""):r("")}),t=function(){var e;return null==(e=i.remoteConfigClient)?void 0:e.unsubscribe(a)}):null==e||e.debug("Remote config client is not provided, skipping remote config fetch")),[2]})})},execute:function(t){return(0,D.__awaiter)(void 0,void 0,void 0,function(){var r;return(0,D.__generator)(this,function(i){if(n)try{return[2,null!=(r=n(t))?r:null]}catch(t){null==e||e.error("Could not execute custom enrichment function",t)}return[2,t]})})},teardown:function(){return(0,D.__awaiter)(void 0,void 0,void 0,function(){return(0,D.__generator)(this,function(e){return t&&t(),[2]})})}}},i3="userProperty",i4="eventProperty",i5=function(e){return e===i3||e===i4},i6=function(e){var t=(0,D.__spreadArray)([],(0,D.__read)(new Set((Array.isArray(e)?e:[e]).filter(i5))),!1);return t.length>0?t:[i3]},i7=function(e,t){return i6(e.trackingMethod).includes(t)},i8=function(e){return i7(e,i3)};let i9={init:M((h=new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._diagnosticsSampleRate=0,t._enableRequestBodyCompressionExperimentalValue=!1,t}return(0,D.__extends)(t,e),t.prototype.init=function(e,t,n){var r,i;return void 0===e&&(e=""),arguments.length>
22?(r=t,i=n):"string"==typeof t?(r=t,i=void 0):(r=null==t?void 0:t.userId,i=t),eT(this._init((0,D.__assign)((0,D.__assign)({},i),{userId:r,apiKey:e})))},t.prototype._init=function(t){var n,r,i,a,o,s,l,u;return(0,D.__awaiter)(this,void 0,void 0,function(){var c,d,p,f,h,g,_,m,E,S,A,T,y,I,R=this;return(0,D.__generator)(this,function(b){var O,N,C,k,L,P,w,F;switch(b.label){case 0:if(this.initializing)return[2];if(this.initializing=!0,c=nc(t),d=null!=(n=t.loggerProvider)?n:new eb,t.loggerProvider||d.enable(null!=(r=t.logLevel)?r:v.Warn),p=null!=(i=t.serverZone)?i:"US",h=this._diagnosticsSampleRate,g=null==(a=t.enableDiagnostics)||a,!c)return[3,2];return f=new e0(t.apiKey,d,p,null==(o=t.remoteConfig)?void 0:o.serverUrl),[4,new Promise(function(e){null==f||f.subscribe("configs.diagnostics.browserSDK","all",function(t,n,r){if(d.debug("Diagnostics remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t){var i=t.sampleRate;"number"!=typeof i||isNaN(i)||(h=i);var a=t.enabled;"boolean"==typeof a&&(g=a)}e()})})];case 1:b.sent(),b.label=2;case 2:return(_=new ta(t.apiKey,d,p,{enabled:g,sampleRate:h})).setTag("library","".concat(tR,"/").concat(tI)),"u">typeof navigator&&_.setTag("user_agent",navigator.userAgent),[4,(O=t.apiKey,N=t,C=this,k=_,L={loggerProvider:d,serverZone:p,enableDiagnostics:g,diagnosticsSampleRate:h},void 0===N&&(N={}),(0,D.__awaiter)(void 0,void 0,void 0,function(){var e,t,n,r,i,a,o,s,l,u,c,d,p,f,h,g,v,_,m,E,S,A,T,y,I,R,b,P,w,F,U,M,x,G,V,B,H,q,W,K,j,Y,$,Q,J,z,X,Z,ee,et,en;return(0,D.__generator)(this,function(er){var ei,ea,eo,es;switch(er.label){case 0:if(e=N.identityStorage||t6,t="",!(e===t6&&!(null==(A=N.cookieOptions)?void 0:A.domain)&&(null==(T=N.cookieOptions)?void 0:T.domain)!==""))return[3,2];return[4,(ei=void 0,ea=k,(0,D.__awaiter)(void 0,void 0,void 0,function(){var e,t,n,r,i,a,o;return(0,D.__generator)(this,function(s){switch(s.label){case 0:return[4,new tC(void 0,{diagnosticsClient:ea}).isEnabled()];case 1:if(!s.sent()||!ei&&("u"<typeof location||!location.hostname)||1===(t=(e=null!=ei?ei:location.hostname).split(".")).length)return[2,""];for(n=[],r=1,na.find(function(t){return e.endsWith(".".concat(t))})&&(r=2),i=t.length-r-1;i>=0;--i)n.push(t.slice(i).join("."));i=0,s.label=2;case 2:if(!(i<n.length))return[3,7];a=n[i],s.label=3;case 3:return s.trys.push([3,5,,6]),[4,tC.isDomainWritable(a)];case 4:if(s.sent())return[2,"."+a];return[3,6];case 5:return o=s.sent(),ea&&ea.recordEvent("cookies.tld.failure",{reason:"Unexpected exception checking domain is writable: ".concat(a),error:o instanceof Error?o.message:String(o)}),[3,6];case 6:return i++,[3,2];case 7:return ea&&ea.recordEvent("cookies.tld.failure",{reason:"Could not determine TLD for host ".concat(e)}),[2,""]}})}))];case 1:t=er.sent(),er.label=2;case 2:return n=(0,D.__assign)({domain:null!=(I=null==(y=N.cookieOptions)?void 0:y.domain)?I:t,expiration:365,sameSite:"Lax",secure:!1,upgrade:!0},N.cookieOptions),r={duplicateResolverFn:function(e){var t=tD(e);return!!t&&tP(JSON.parse(t).cookieDomain,n.domain)},diagnosticsClient:k},[4,(eo=i=nu(N.identityStorage,n,r),void 0===(es=null==(b=null==(R=N.cookieOptions)?void 0:R.upgrade)||b)&&(es=!0),(0,D.__awaiter)(void 0,void 0,void 0,function(){var e,t,n,r,i,a,o,s,l;return(0,D.__generator)(this,function(u){switch(u.label){case 0:return e="".concat("amp","_").concat(O.substring(0,6)),[4,eo.getRaw(e)];case 1:if(!(t=u.sent()))return[2,{optOut:!1}];if(!es)return[3,3];return[4,eo.remove(e)];case 2:u.sent(),u.label=3;case 3:return r=(n=(0,D.__read)(t.split("."),6))[0],i=n[1],a=n[2],o=n[3],s=n[4],l=n[5],[2,{deviceId:r,userId:tK(i),sessionId:tW(o),lastEventId:tW(l),lastEventTime:tW(s),optOut:!!a}]}})}))];case 3:return a=er.sent(),[4,i.get(tw(O))];case 4:return o=er.sent(),u=!(l=(s=ez()).ampTimestamp?Number(s.ampTimestamp):void 0)||Date.now()<l,c=null!=(M=null!=(U=null!=(F=null!=(P=N.deviceId)?P:u?null!=(w=s.ampDeviceId)?w:s.deviceId:void 0)?F:null==o?void 0:o.deviceId)?U:a.deviceId)?M:e_(),d=null!=(x=null==o?void 0:o.lastEventId)?x:a.lastEventId,p=null!=(G=null==o?void 0:o.lastEventTime)?G:a.lastEventTime,f=null!=(B=null!=(V=N.optOut)?V:null==o?void 0:o.optOut)?B:a.optOut,h=null!=(H=null==o?void 0:o.sessionId)?H:a.sessionId,g=null==o?void 0:o.deferredSessionId,v=null!=(W=null!=(q=N.userId)?q:null==o?void 0:o.userId)?W:a.userId,C.previousSessionDeviceId=null!=(K=null==o?void 0:o.deviceId)?K:a.deviceId,C.previousSessionUserId=null!=(j=null==o?void 0:o.userId)?j:a.userId,_={ipAddress:null==($=null==(Y=N.trackingOptions)?void 0:Y.ipAddress)||$,language:null==(J=null==(Q=N.trackingOptions)?void 0:Q.language)||J,platform:null==(X=null==(z=N.trackingOptions)?void 0:z.platform)||X},m=null==o?void 0:o.pageCounter,E=null==o?void 0:o.debugLogsEnabled,void 0!==N.autocapture&&(N.defaultTracking=N.autocapture),[4,(S=new nl(O,N.appVersion,i,n,N.defaultTracking,N.autocapture,c,N.flushIntervalMillis,N.flushMaxRetries,N.flushQueueSize,e,N.ingestionMetadata,N.instanceName,d,p,null!=(Z=null==L?void 0:L.loggerProvider)?Z:N.loggerProvider,N.logLevel,N.minIdLength,N.offline,f,N.partnerId,N.plan,N.serverUrl,null!=(ee=null==L?void 0:L.serverZone)?ee:N.serverZone,h,g,N.sessionTimeout,N.storageProvider,_,N.transport,N.useBatch,N.fetchRemoteConfig,v,m,
2E,N.networkTrackingOptions,N.identify,null!=(et=null==L?void 0:L.enableDiagnostics)?et:N.enableDiagnostics,null!=(en=null==L?void 0:L.diagnosticsSampleRate)?en:C._diagnosticsSampleRate,k,N.remoteConfig,t,N.enableRequestBodyCompression,C._enableRequestBodyCompressionExperimentalValue,N.customEnrichment)).storageProvider.isEnabled()];case 5:return er.sent()||(S.loggerProvider.warn("Storage provider ".concat(S.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),S.storageProvider=new tO),[2,S]}})}))];case 3:if(m=b.sent(),!(c&&f))return[3,5];return[4,new Promise(function(e){null==f||f.subscribe("configs.analyticsSDK.browserSDK","all",function(t,n,r){m.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t&&function(e,t){if(e){!function e(t){if("object"==typeof t&&null!==t&&!Array.isArray(t)){var n,r,i,a,o,s,l,u,c,d,p,f,h=Object.keys(t);try{for(var g=(0,D.__values)(h),v=g.next();!v.done;v=g.next()){var _=v.value;try{var m=t[_];"boolean"==typeof(null==m?void 0:m.enabled)&&(m.enabled?(delete m.enabled,0===Object.keys(m).length&&(t[_]=!0)):t[_]=!1),e(m)}catch(e){}}}catch(e){n={error:e}}finally{try{v&&!v.done&&(r=g.return)&&r.call(g)}finally{if(n)throw n.error}}try{if(null==(c=null==(u=null==(l=t.autocapture)?void 0:l.networkTracking)?void 0:u.captureRules)?void 0:c.length)try{for(var E=(0,D.__values)(t.autocapture.networkTracking.captureRules),S=E.next();!S.done;S=E.next()){var A=S.value;try{for(var T=(o=void 0,(0,D.__values)(["responseHeaders","requestHeaders"])),y=T.next();!y.done;y=T.next()){var I=y.value,R=null!=(d=A[I])?d:{},b=R.captureSafeHeaders,O=R.allowlist;if(b||O){if(void 0!==O&&!Array.isArray(O)){delete A[I];continue}A[I]=(0,D.__spreadArray)((0,D.__spreadArray)([],(0,D.__read)(b?el:[]),!1),(0,D.__read)(null!=O?O:[]),!1)}}}catch(e){o={error:e}}finally{try{y&&!y.done&&(s=T.return)&&s.call(T)}finally{if(o)throw o.error}}}}catch(e){i={error:e}}finally{try{S&&!S.done&&(a=E.return)&&a.call(E)}finally{if(i)throw i.error}}}catch(e){}var N=null==(p=t.autocapture)?void 0:p.frustrationInteractions;N&&(N.rageClick&&(N.rageClicks=N.rageClick,delete N.rageClick),N.deadClick&&(N.deadClicks=N.deadClick,delete N.deadClick));try{var C=null==(f=t.autocapture)?void 0:f.elementInteractions;if(C&&"object"==typeof C&&(!0===C.viewportContentUpdated&&(C.viewportContentUpdated={}),!1===C.viewportContentUpdated&&(C.viewportContentUpdated={enabled:!1}),void 0!==C.exposureDuration)){var k=C.viewportContentUpdated;void 0===k?C.viewportContentUpdated={exposureDuration:C.exposureDuration}:"object"==typeof k&&void 0===k.exposureDuration&&!1!==k.enabled&&(k.exposureDuration=C.exposureDuration),delete C.exposureDuration}}catch(e){}}}(e);try{var n,r,i,a,o,s,l;if(t.loggerProvider.debug("Update browser config with remote configuration:",JSON.stringify(e)),e&&"autocapture"in e){if("boolean"==typeof e.autocapture&&(t.autocapture=e.autocapture),"object"==typeof e.autocapture&&null!==e.autocapture){var u=(0,D.__assign)({},e.autocapture);if(void 0===t.autocapture&&(t.autocapture=e.autocapture),"object"==typeof e.autocapture.elementInteractions&&null!==e.autocapture.elementInteractions&&(null==(i=e.autocapture.elementInteractions.pageUrlAllowlistRegex)?void 0:i.length)){u.elementInteractions=(0,D.__assign)({},e.autocapture.elementInteractions);var c=u.elementInteractions,d=null!=(a=c.pageUrlAllowlist)?a:[],p=e.autocapture.elementInteractions.pageUrlAllowlistRegex;c.pageUrlAllowlist=nP(d,p,t),delete c.pageUrlAllowlistRegex}if("object"==typeof e.autocapture.networkTracking&&null!==e.autocapture.networkTracking&&(null==(o=e.autocapture.networkTracking.captureRules)?void 0:o.length)){u.networkTracking=(0,D.__assign)({},e.autocapture.networkTracking);var f=null!=(s=u.networkTracking.captureRules)?s:[];try{for(var h=(0,D.__values)(f),g=h.next();!g.done;g=h.next()){var v=g.value;v.urls=nP(null!=(l=v.urls)?l:[],v.urlsRegex,t),delete v.urlsRegex}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}}"boolean"==typeof t.autocapture&&(t.autocapture=(0,D.__assign)({attribution:t.autocapture,fileDownloads:t.autocapture,formInteractions:t.autocapture,pageViews:t.autocapture,sessions:t.autocapture,elementInteractions:t.autocapture,webVitals:t.autocapture,frustrationInteractions:t.autocapture},u)),"object"==typeof t.autocapture&&(t.autocapture=(0,D.__assign)((0,D.__assign)({},t.autocapture),u))}t.defaultTracking=t.autocapture}"customEnrichment"in e&&null!==e.customEnrichment&&!1!==t.customEnrichment&&(t.customEnrichment=e.customEnrichment),t.loggerProvider.debug("Browser config after remote config update:",JSON.stringify(t))}catch(e){t.loggerProvider.error("Failed to apply remote configuration because of error: ",e)}}}(t,m),e()})})];case 4:b.sent(),b.label=5;case 5:return[4,e.prototype._init.call(this,m)];case 6:if(b.sent(),this.logBrowserOptions(m),this.config.remoteConfigClient=f,
2E=tu((P=this.config).defaultTracking)&&P.defaultTracking&&"object"==typeof P.defaultTracking&&P.defaultTracking.attribution&&"object"==typeof P.defaultTracking.attribution?(0,D.__assign)({},P.defaultTracking.attribution):{},!(tu(this.config.defaultTracking)&&i8(E)))return[3,8];return this.config.optOut&&this.timeline.addOptOutListener(function(e){return(0,D.__awaiter)(R,void 0,void 0,function(){return(0,D.__generator)(this,function(t){switch(t.label){case 0:if(e)return[3,2];return this.webAttribution=new iY(E,this.config),[4,this.webAttribution.init()];case 1:t.sent(),t.label=2;case 2:return[2]}})})}),this.webAttribution=new iY(E,this.config),[4,this.webAttribution.init()];case 7:b.sent(),b.label=8;case 8:if(T=!(!(A=(S=ez()).ampTimestamp?Number(S.ampTimestamp):void 0)||Date.now()<A)||Number.isNaN(Number(S.ampSessionId))?void 0:Number(S.ampSessionId),-1!==(y=this.config.deferredSessionId)||this.config.optOut||(y=Date.now()),this.setSessionId(null!=(u=null!=(l=null!=(s=t.sessionId)?s:T)?l:y)?u:this.config.sessionId),this.config.optOut&&this.timeline.addOptOutListener(function(e){return(0,D.__awaiter)(R,void 0,void 0,function(){return(0,D.__generator)(this,function(t){return!e&&this.config.deferredSessionId&&(-1===this.config.deferredSessionId?this.setSessionId(void 0):this.setSessionId(this.config.deferredSessionId)),[2]})})}),(I=ej(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),null===this.config.offline)return[3,10];return[4,this.add(nD()).promise];case 9:b.sent(),b.label=10;case 10:return[4,this.add(new ew({diagnosticsClient:_})).promise];case 11:return b.sent(),[4,this.add(new tb).promise];case 12:return b.sent(),[4,this.add(new eJ).promise];case 13:if(b.sent(),nL(this.config),!tl(this.config.defaultTracking,"fileDownloads"))return[3,15];return this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(nC()).promise];case 14:b.sent(),b.label=15;case 15:if(!tc(this.config.defaultTracking))return[3,17];return this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(nb()).promise];case 16:b.sent(),b.label=17;case 17:if(!td(this.config.defaultTracking))return[3,20];if(this.config.optOut)return[3,19];return this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(nT(tE(this.config))).promise];case 18:return b.sent(),[3,20];case 19:this.timeline.addOptOutListener(function(e){return(0,D.__awaiter)(R,void 0,void 0,function(){return(0,D.__generator)(this,function(t){switch(t.label){case 0:if(e)return[2];return this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(nT(tE(this.config))).promise];case 1:return t.sent(),[2]}})})}),b.label=20;case 20:if(!(tu(this.config.defaultTracking)&&i7(E,i4)))return[3,22];return this.config.loggerProvider.debug("Adding event property attribution plugin"),[4,this.add(iQ(E)).promise];case 21:b.sent(),b.label=22;case 22:if(!th(this.config.autocapture))return[3,24];return this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(rF(tv(this.config),{diagnosticsClient:_})).promise];case 23:b.sent(),b.label=24;case 24:if(!tg(this.config.autocapture))return[3,26];return this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(r$(t_(this.config))).promise];case 25:b.sent(),b.label=26;case 26:if(!tf(this.config.autocapture))return[3,28];return this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(il(tm(this.config))).promise];case 27:b.sent(),b.label=28;case 28:if(!("boolean"==typeof(w=this.config.autocapture)?w:"object"==typeof w&&!0===w.webVitals))return[3,30];return this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(iK()).promise];case 29:b.sent(),b.label=30;case 30:if(!tl(this.config.autocapture,"pageUrlEnrichment"))return[3,32];return this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(i0()).promise];case 31:b.sent(),b.label=32;case 32:if(!("boolean"==typeof(F=this.config.customEnrichment)?F:"object"==typeof F&&null!==F&&!1!==F.enabled))return[3,34];return this.config.loggerProvider.debug("Adding custom enrichment plugin"),[4,this.add(i2(
2)).promise];case 33:b.sent(),b.label=34;case 34:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 35:return b.sent(),I.eventBridge.setEventReceiver(function(e){var t=e.eventProperties||{},n=t.time,r=(0,D.__rest)(t,["time"]);R.track(e.eventType,r,"number"==typeof n?{time:n}:void 0)}),[2]}})})},t.prototype.getUserId=function(){var e;return null==(e=this.config)?void 0:e.userId},t.prototype.setUserId=function(e){this.config?(this.config.loggerProvider.debug("function setUserId: ",e),(e!==this.config.userId||void 0===e)&&(this.config.userId=e,this.timeline.onIdentityChanged({userId:e}),eY(e,this.config.instanceName))):this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null==(e=this.config)?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?(this.config.loggerProvider.debug("function setDeviceId: ",e),e!==this.config.deviceId&&(this.config.deviceId=e,this.timeline.onIdentityChanged({deviceId:e}),e$(e,this.config.instanceName))):this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setDeviceId(e_()),this.setUserId(void 0),this.timeline.onReset()},t.prototype.getIdentity=function(){var e,t;return{deviceId:null==(e=this.config)?void 0:e.deviceId,userId:null==(t=this.config)?void 0:t.userId,userProperties:this.userProperties}},t.prototype.setIdentity=function(e){if("userId"in e&&this.setUserId(e.userId),"deviceId"in e&&e.deviceId&&this.setDeviceId(e.deviceId),"userProperties"in e){this.userProperties=e.userProperties;var t,n,r,i=new ep,a=null!=(r=e.userProperties)?r:{};try{for(var o=(0,D.__values)(Object.entries(a)),s=o.next();!s.done;s=o.next()){var l=(0,D.__read)(s.value,2),u=l[0],c=l[1];i.set(u,c)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}this.identify(i)}},t.prototype.getOptOut=function(){var e;return null==(e=this.config)?void 0:e.optOut},t.prototype.getSessionId=function(){var e;return null==(e=this.config)?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,n=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),eT(Promise.resolve());if(this.config.optOut)return this.config.deferredSessionId=null!=e?e:-1,eT(Promise.resolve());if(void 0===e&&(e=Date.now()),e===this.config.sessionId)return eT(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var r=this.getSessionId();r!==e&&this.timeline.onSessionIdChanged(e);var i=this.config.lastEventTime,a=null!=(t=this.config.lastEventId)?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,tp(this.config.defaultTracking)&&(r&&i&&n.push(this.track(tz,void 0,{device_id:this.previousSessionDeviceId,event_id:++a,session_id:r,time:i+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var o=this.trackCampaignEventIfNeeded(++a,n);return this.config.identify&&n.push(this.track(eE(this.config.identify)).promise),tp(this.config.defaultTracking)&&n.push(this.track(tJ,void 0,{event_id:o?++a:a,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,eT(Promise.all(n))},t.prototype.extendSession=function(){this.config?this.config.lastEventTime=Date.now():this.q.push(this.extendSession.bind(this))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=nd(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,n){if(tT(t)){var r=t._q;t._q=[],t=tA(new ep,r)}return(null==n?void 0:n.user_id)&&this.setUserId(n.user_id),(null==n?void 0:n.device_id)&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(tT(r)){var a=r._q;r._q=[],r=tA(new ep,a)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(tT(t)){var r=t._q;t._q=[],t=tA(new eF,r)}return e.prototype.revenue.call(this,t,n)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign||!i8(this.webAttribution.options))return!1;var n=this.webAttribution.generateCampaignEvent(e);
2return t?t.push(this.track(n).promise):this.track(n),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(t){return(0,D.__awaiter)(this,void 0,void 0,function(){var n,r,i;return(0,D.__generator)(this,function(a){return n=Date.now(),r=eQ(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type!==tJ&&t.event_type!==tz&&(!t.session_id||t.session_id===this.getSessionId())&&(r||i?(this.setSessionId(n),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):r||this.trackCampaignEventIfNeeded()),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=(0,D.__assign)((0,D.__assign)({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",ts(t))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},t.prototype._setDiagnosticsSampleRate=function(e){if(!(e>1)&&!(e<0)&&!this.config){this._diagnosticsSampleRate=e;return}},t.prototype._enableRequestBodyCompressionExperimental=function(e){if(!this.config){this._enableRequestBodyCompressionExperimentalValue=e;return}},t}(ey))).init.bind(h),"init",w(h),U(h,["config"])),add:M(h.add.bind(h),"add",w(h),U(h,["config.apiKey","timeline.plugins"])),remove:M(h.remove.bind(h),"remove",w(h),U(h,["config.apiKey","timeline.plugins"])),track:M(h.track.bind(h),"track",w(h),U(h,["config.apiKey","timeline.queue.length"])),logEvent:M(h.logEvent.bind(h),"logEvent",w(h),U(h,["config.apiKey","timeline.queue.length"])),identify:M(h.identify.bind(h),"identify",w(h),U(h,["config.apiKey","timeline.queue.length"])),groupIdentify:M(h.groupIdentify.bind(h),"groupIdentify",w(h),U(h,["config.apiKey","timeline.queue.length"])),setGroup:M(h.setGroup.bind(h),"setGroup",w(h),U(h,["config.apiKey","timeline.queue.length"])),revenue:M(h.revenue.bind(h),"revenue",w(h),U(h,["config.apiKey","timeline.queue.length"])),flush:M(h.flush.bind(h),"flush",w(h),U(h,["config.apiKey","timeline.queue.length"])),getUserId:M(h.getUserId.bind(h),"getUserId",w(h),U(h,["config","config.userId"])),setUserId:M(h.setUserId.bind(h),"setUserId",w(h),U(h,["config","config.userId"])),getDeviceId:M(h.getDeviceId.bind(h),"getDeviceId",w(h),U(h,["config","config.deviceId"])),setDeviceId:M(h.setDeviceId.bind(h),"setDeviceId",w(h),U(h,["config","config.deviceId"])),reset:M(h.reset.bind(h),"reset",w(h),U(h,["config","config.userId","config.deviceId"])),getSessionId:M(h.getSessionId.bind(h),"getSessionId",w(h),U(h,["config"])),setSessionId:M(h.setSessionId.bind(h),"setSessionId",w(h),U(h,["config"])),extendSession:M(h.extendSession.bind(h),"extendSession",w(h),U(h,["config"])),setOptOut:M(h.setOptOut.bind(h),"setOptOut",w(h),U(h,["config"])),setTransport:M(h.setTransport.bind(h),"setTransport",w(h),U(h,["config"])),getIdentity:M(h.getIdentity.bind(h),"getIdentity",w(h),U(h,["config"])),setIdentity:M(h.setIdentity.bind(h),"setIdentity",w(h),U(h,["config","config.userId","config.deviceId"])),getOptOut:M(h.getOptOut.bind(h),"getOptOut",w(h),U(h,["config"])),_setDiagnosticsSampleRate:M(h._setDiagnosticsSampleRate.bind(h),"_setDiagnosticsSampleRate",w(h),U(h,["config"])),_enableRequestBodyCompressionExperimental:M(h._enableRequestBodyCompressionExperimental.bind(h),"_enableRequestBodyCompressionExperimental",w(h),U(h,["config"]))};e.s([],641521),e.i(641521),(g=L||(L={})).US="US",g.EU="EU",g.STAGING="STAGING",e.s(["ServerZone",0,L],131616),e.s(["DEFAULT_ACTION_CLICK_ALLOWLIST",0,nU,"DEFAULT_CSS_SELECTOR_ALLOWLIST",0,nw,"DEFAULT_DATA_ATTRIBUTE_PREFIX",0,nF,"EXCLUDE_INTERNAL_REFERRERS_CONDITIONS",0,t7,"IdentifyOperation",0,_,"LogLevel",0,v,"OfflineDisabled",0,null,"RevenueProperty",0,A,"ServerZone",0,L,"SpecialEventType",0,m],991973),e.i(991973);var ae=i9.add,at=(i9.extendSession,i9.flush,i9.getDeviceId,i9.getIdentity,i9.getOptOut,i9.getSessionId,i9.getUserId,i9.groupIdentify,i9.identify,i9.init),an=(i9.logEvent,i9.remove,i9.reset,i9.revenue,i9.setDeviceId,i9.setGroup,i9.setIdentity,i9.setOptOut,i9.setSessionId),ar=(i9.setTransport,i9.setUserId,i9.track);i9._setDiagnosticsSampleRate,i9._enableRequestBodyCompressionExperimental,e.s(["add",0,ae,"init",0,at,"setSessionId",0,an,"track",0,ar],436370)},748891,(e,t,n)=>
2{var r=/\s/;t.exports=function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}},830364,(e,t,n)=>{var r=e.r(748891),i=/^\s+/;t.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},12447,(e,t,n)=>{t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},100236,(e,t,n)=>{t.exports=e.g&&e.g.Object===Object&&e.g},139088,(e,t,n)=>{var r=e.r(100236),i="object"==typeof self&&self&&self.Object===Object&&self;t.exports=r||i||Function("return this")()},630353,(e,t,n)=>{t.exports=e.r(139088).Symbol},243436,(e,t,n)=>{var r=e.r(630353),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;t.exports=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=o.call(e);return r&&(t?e[s]=n:delete e[s]),i}},223243,(e,t,n)=>{var r=Object.prototype.toString;t.exports=function(e){return r.call(e)}},377684,(e,t,n)=>{var r=e.r(630353),i=e.r(243436),a=e.r(223243),o=r?r.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?i(e):a(e)}},877289,(e,t,n)=>{t.exports=function(e){return null!=e&&"object"==typeof e}},361884,(e,t,n)=>{var r=e.r(377684),i=e.r(877289);t.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},773759,(e,t,n)=>{var r=e.r(830364),i=e.r(12447),a=e.r(361884),o=0/0,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;t.exports=function(e){if("number"==typeof e)return e;if(a(e))return o;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):s.test(e)?o:+e}},382560,(e,t,n)=>{var r=e.r(773759),i=1/0;t.exports=function(e){return e?(e=r(e))===i||e===-i?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},304653,(e,t,n)=>{var r=e.r(382560);t.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},800281,(e,t,n)=>{var r=e.r(304653);t.exports=function(e,t){var n;if("function"!=typeof t)throw TypeError("Expected a function");return e=r(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}},323883,(e,t,n)=>{var r=e.r(800281);t.exports=function(e){return r(2,e)}},941959,393531,695859,e=>{"use strict";var t,n=((t={}).ANDROID="android",t.IOS="ios",t.DESKTOP="desktop",t.IOS_V2="ios_v2",t);e.s(["default",0,n],941959),e.s(["IS_CLIENT",0,!0],393531),e.s(["getSessionStorage",0,e=>{window.fcSessionStorage=window.fcSessionStorage||{};try{return sessionStorage.getItem(e)}catch{return window.fcSessionStorage[e]}},"setSessionStorage",0,(e,t)=>{window.fcSessionStorage=window.fcSessionStorage||{};try{sessionStorage.setItem(e,t)}catch{window.fcSessionStorage[e]=t}}],695859)},345425,e=>{"use strict";var t=e.i(323883),n=e.i(941959),r=e.i(695859),i=e.i(393531);function a(e){return(0,r.setSessionStorage)("app_source",e),e}function o(){if(!i.IS_CLIENT)return null;let e=new URLSearchParams(window.location.search),t=e.get("app_source");if(t)return a(t);let o=e.get("utm_source");return"pwa"===o?a("web"):"twa"===o?a(n.default.ANDROID):(0,r.getSessionStorage)("app_source")}function s(){return o()===n.default.ANDROID}function l(){return o()===n.default.IOS}let u=i.IS_CLIENT&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),c=(0,t.default)(()=>{let e=navigator.userAgent,t=navigator.vendor;return/Safari/i.test(e)&&/Apple Computer/.test(t)});e.s(["getAppSource",0,o,"isAndroidApp",0,s,"isApp",0,function(){return l()||s()},"isIosApp",0,l,"isMobile",0,u,"isNewIos",0,function(){return"ios_v2"===o()},"isNewIosApp",0,function(){return"ios_v2"===o()},"isSafari",0,c])},660872,e=>{"use strict";var t=e.i(436370),n=e.i(345425);let r=e=>{if(e)return"/"===e?"/academy":`/academy${e}`};e.s(["trackPageView",0,({route:e,previousRoute:i=null,state:a={},previousState:o={},isInitialLoad:s=!1,userInfo:l})=>{let u="Academy Page Visited";if("modal"===o.type)return;let c=a.source?a.source:s?"direct":void 0,d={"Page route":r(e),Source:c,"Previous route":r(i)};(0,n.isAndroidApp)()?window?.freecashMessagePort?.then(e=>{try{e?.postMessage(JSON.stringify({messageType:"EVENT",gainId:l?.gainId,email:l?.email,eventName:`CT ${u}`,data:d}))}catch(e){console.error("Failed to send CleverTap event:",e)}}).catch(e=>{console.error("Failed to get message port for CleverTap:",e)}):window?.clevertap?.event?.push(`CT ${u}`,d),(0,t.track)(u,d)},"trackSignUpEvent",0,({platform:e})=>{(0,t.track)("SignUp",{platform:e})},"trackSignUpInitatedEvent",0,({source:e,method:n})=>{(0,t.track)("Sign Up Initiated",{Source:e,"Authentication method":n})}])},863357,e=>{"use strict";e.s(["getLocalStorage",0,function(e){if(!window.localStorage)return null;try{return window.localStorage.getItem(e)}catch(e){console.warn(e)}return null},"removeLocalStorage",0,function(e){if(window.localStorage)try{window.localStorage.removeItem(e)}catch(e){console.warn(e)}},"setLocalStorage",0,function(e,t){if(window.localStorage)try{window.localStorage.setItem(e,String(t))}catch(e){console.warn(e)}}])},243083,e=>{"use strict";var t=e.i(323883),n=e.i(941959),r=e.i(695859),i=e.i(393531);function a(e){return(0,r.setSessionStorage)("app_source",e),e}function o(){if(!i.IS_CLIENT)return null;let e=new URLSearchParams(window.location.search),t=e.get("app_source");if(t)return a(t);let o=e.get("utm_source");return"pwa"===o?a("web"):"twa"===o?a(n.default.ANDROID):(0,r.getSessionStorage)("app_source")}i.IS_CLIENT&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);let s=(0,t.default)(()=>
2{if(!i.IS_CLIENT)return!1;let e=navigator.userAgent,t=navigator.vendor;return/Safari/i.test(e)&&/Apple Computer/.test(t)}),l=(0,t.default)(()=>!!i.IS_CLIENT&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.userAgent)||s()));(0,t.default)(()=>"web"===o()),e.s(["detectAppleDevice",0,l,"getAppSource",0,o,"isAndroidApp",0,function(){return o()===n.default.ANDROID},"isAndroidOS",0,function(){return i.IS_CLIENT&&/Android/i.test(navigator.userAgent)},"isIgnoredForGoogle",0,()=>{var e;return e=/(BrightMoney)/gi,!!(window?.navigator?.userAgent||"").match(e)??!1},"isIosApp",0,function(){return o()===n.default.IOS},"isNewIosApp",0,function(){return"ios_v2"===o()}])},913996,e=>{"use strict";e.s(["clarityIdentify",0,e=>{e&&"function"==typeof window?.clarity&&window.clarity("identify",String(e))},"claritySetTag",0,(e,t)=>{t&&"function"==typeof window?.clarity&&window.clarity("set",e,t)}])},631926,(e,t,n)=>{var r=e.r(139088);t.exports=function(){return r.Date.now()}},374009,(e,t,n)=>{var r=e.r(12447),i=e.r(631926),a=e.r(773759),o=Math.max,s=Math.min;t.exports=function(e,t,n){var l,u,c,d,p,f,h=0,g=!1,v=!1,_=!0;if("function"!=typeof e)throw TypeError("Expected a function");function m(t){var n=l,r=u;return l=u=void 0,h=t,d=e.apply(r,n)}function E(e){var n=e-f,r=e-h;return void 0===f||n>=t||n<0||v&&r>=c}function S(){var e,n,r,a=i();if(E(a))return A(a);p=setTimeout(S,(e=a-f,n=a-h,r=t-e,v?s(r,c-n):r))}function A(e){return(p=void 0,_&&l)?m(e):(l=u=void 0,d)}function T(){var e,n=i(),r=E(n);if(l=arguments,u=this,f=n,r){if(void 0===p)return h=e=f,p=setTimeout(S,t),g?m(e):d;if(v)return clearTimeout(p),p=setTimeout(S,t),m(f)}return void 0===p&&(p=setTimeout(S,t)),d}return t=a(t)||0,r(n)&&(g=!!n.leading,c=(v="maxWait"in n)?o(a(n.maxWait)||0,t):c,_="trailing"in n?!!n.trailing:_),T.cancel=function(){void 0!==p&&clearTimeout(p),h=0,l=f=u=p=void 0},T.flush=function(){return void 0===p?d:A(i())},T}},892251,181944,422233,666354,e=>{"use strict";let t;var n,r,i,a,o,s,l,u,c,d,p,f,h,g,v,_,m,E,S,A,T,y,I,R,b,O,N,C,k,L,D,P,w,F,U,M,x,G,V,B,H,q,W,K,j,Y,$,Q,J,z,X,Z,ee,et,en,er,ei,ea,eo,es,el,eu,ec,ed,ep,ef,eh,eg,ev,e_,em,eE,eS,eA,eT,ey,eI,eR,eb,eO,eN,eC,ek,eL,eD,eP,ew,eF=e.i(247167);function eU(e){if(!window.sessionStorage)return null;try{return sessionStorage.getItem(e)}catch(e){console.warn(e)}return null}function eM(e,t){if(!window.sessionStorage)return null;try{sessionStorage.setItem(e,t)}catch(e){console.warn(e)}}e.s(["getLocalStorage",0,function(e){if(!window.localStorage)return null;try{return window.localStorage.getItem(e)}catch(e){console.warn(e)}return null},"getSessionStorage",0,eU,"setLocalStorage",0,function(e,t){if(window.localStorage)try{window.localStorage.setItem(e,String(t))}catch(e){console.warn(e)}},"setSessionStorage",0,eM],181944);let ex=/\r\n|[\n\r]/g;function eG(e,t){let n=0,r=1;for(let i of e.body.matchAll(ex)){if("number"==typeof i.index||function(e){if(!e)throw Error("Unexpected invariant triggered.")}(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function eV(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=1===t.line?n:0,l=t.column+s,u=`${e.name}:${o}:${l} 3`,c=r.split(/\r\n|[\n\r]/g),d=c[i];if(d.length>120){let e=Math.floor(l/80),t=[];for(let e=0;e<d.length;e+=80)t.push(d.slice(e,e+80));return u+eB([[`${o} |`,t[0]],...t.slice(1,e+1).map(e=>["|",e]),["|","^".padStart(l%80)],["|",t[e+1]]])}return u+eB([[`${o-1} |`,c[i-1]],[`${o} |`,d],["|","^".padStart(l)],[`${o+1} |`,c[i+1]]])}function eB(e){let t=e.filter(([e,t])=>void 0!==t),n=Math.max(...t.map(([e])=>e.length));return t.map(([e,t])=>e.padStart(n)+(t?" "+t:"")).join("\n")}class eH extends Error{constructor(e,...t){var n,r,i;const{nodes:a,source:o,positions:s,path:l,originalError:u,extensions:c}=function(e){let t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=l?l:void 0,this.originalError=null!=u?u:void 0,this.nodes=eq(Array.isArray(a)?a:a?[a]:void 0);const d=eq(null==(n=this.nodes)?void 0:n.map(e=>e.loc).filter(e=>null!=e));this.source=null!=o?o:null==d||null==(r=d[0])?void 0:r.source,this.positions=null!=s?s:null==d?void 0:d.map(e=>e.start),this.locations=s&&o?s.map(e=>eG(o,e)):null==d?void 0:d.map(e=>eG(e.source,e.start));const p=!function(e){return"object"==typeof e&&null!==e}(null==u?void 0:u.extensions)||null==u?void 0:u.extensions;this.extensions=null!=(i=null!=c?c:p)?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=u&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,eH):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let n of this.nodes){var t;n.loc&&(e+="\n\n"+eV((t=n.loc).source,eG(t.source,t.start)))}else if(this.source&&this.locations)for(let t of this.locations)e+="\n\n"+eV(this.source,t);return e}toJSON(){let e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function eq(e){return void 0===e||0===e.length?void 0:e}function eW(e,t,n){return new eH(`Syntax Error: ${n}`,{source:e,positions:[t]})}var eK=e.i(20064);(n=eP||(eP={})).QUERY="QUERY",n.MUTATION="MUTATION",n.SUBSCRIPTION="SUBSCRIPTION",n.FIELD="FIELD",n.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",n.FRAGMENT_SPREAD="FRAGMENT_SPREAD",n.INLINE_FRAGMENT="INLINE_FRAGMENT",n.VARIABLE_DEFINITION="VARIABLE_DEFINITION",n.SCHEMA="SCHEMA",n.SCALAR="SCALAR",n.OBJECT="OBJECT",n.FIELD_DEFINITION="FIELD_DEFINITION",n.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",n.INTERFACE="INTERFACE",n.UNION="UNION",n.ENUM="ENUM",n.ENUM_VALUE="ENUM_VALUE",n.INPUT_OBJECT="INPUT_OBJECT",n.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION";var ej=e.i(285809),eY=e.i(899074),e$=e.i(254335);(r=ew||(ew={})).SOF="<SOF>",r.EOF="<EOF>",r.BANG="!",r.DOLLAR="$",r.AMP="&",r.PAREN_L="(",r.PAREN_R=")",r.DOT=".",r.SPREAD="...",r.COLON=":",r.EQUALS="=",r.AT="@",r.BRACKET_L="[",r.BRACKET_R="]",r.BRACE_L="{",r.PIPE="|",r.BRACE_R="}
3",r.NAME="Name",r.INT="Int",r.FLOAT="Float",r.STRING="String",r.BLOCK_STRING="BlockString",r.COMMENT="Comment";class eQ{constructor(e){const t=new eK.Token(ew.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==ew.EOF)do if(e.next)e=e.next;else{let t=function(e,t){let n=e.source.body,r=n.length,i=t;for(;i<r;){let t=n.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return function(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let e=n.charCodeAt(i);if(10===e||13===e)break;if(eJ(e))++i;else if(ez(n,i))i+=2;else break}return e1(e,ew.COMMENT,t,i,n.slice(t+1,i))}(e,i);case 33:return e1(e,ew.BANG,i,i+1);case 36:return e1(e,ew.DOLLAR,i,i+1);case 38:return e1(e,ew.AMP,i,i+1);case 40:return e1(e,ew.PAREN_L,i,i+1);case 41:return e1(e,ew.PAREN_R,i,i+1);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return e1(e,ew.SPREAD,i,i+3);break;case 58:return e1(e,ew.COLON,i,i+1);case 61:return e1(e,ew.EQUALS,i,i+1);case 64:return e1(e,ew.AT,i,i+1);case 91:return e1(e,ew.BRACKET_L,i,i+1);case 93:return e1(e,ew.BRACKET_R,i,i+1);case 123:return e1(e,ew.BRACE_L,i,i+1);case 124:return e1(e,ew.PIPE,i,i+1);case 125:return e1(e,ew.BRACE_R,i,i+1);case 34:if(34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2))return function(e,t){let n=e.source.body,r=n.length,i=e.lineStart,a=t+3,o=a,s="",l=[];for(;a<r;){let r=n.charCodeAt(a);if(34===r&&34===n.charCodeAt(a+1)&&34===n.charCodeAt(a+2)){s+=n.slice(o,a),l.push(s);let r=e1(e,ew.BLOCK_STRING,t,a+3,(0,eY.dedentBlockStringLines)(l).join("\n"));return e.line+=l.length-1,e.lineStart=i,r}if(92===r&&34===n.charCodeAt(a+1)&&34===n.charCodeAt(a+2)&&34===n.charCodeAt(a+3)){s+=n.slice(o,a),o=a+1,a+=4;continue}if(10===r||13===r){s+=n.slice(o,a),l.push(s),13===r&&10===n.charCodeAt(a+1)?a+=2:++a,s="",o=a,i=a;continue}if(eJ(r))++a;else if(ez(n,a))a+=2;else throw eW(e.source,a,`Invalid character within String: ${e0(e,a)}.`)}throw eW(e.source,a,"Unterminated string.")}(e,i);return function(e,t){let n=e.source.body,r=n.length,i=t+1,a=i,o="";for(;i<r;){let r=n.charCodeAt(i);if(34===r)return o+=n.slice(a,i),e1(e,ew.STRING,t,i+1,o);if(92===r){o+=n.slice(a,i);let t=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?function(e,t){let n=e.source.body,r=0,i=3;for(;i<12;){let e=n.charCodeAt(t+i++);if(125===e){if(i<5||!eJ(r))break;return{value:String.fromCodePoint(r),size:i}}if((r=r<<4|e4(e))<0)break}throw eW(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}(e,i):function(e,t){let n=e.source.body,r=e3(n,t+2);if(eJ(r))return{value:String.fromCodePoint(r),size:6};if(eX(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){let e=e3(n,t+8);if(eZ(e))return{value:String.fromCodePoint(r,e),size:12}}throw eW(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}(e,i):function(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw eW(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}(e,i);o+=t.value,i+=t.size,a=i;continue}if(10===r||13===r)break;if(eJ(r))++i;else if(ez(n,i))i+=2;else throw eW(e.source,i,`Invalid character within String: ${e0(e,i)}.`)}throw eW(e.source,i,"Unterminated string.")}(e,i)}if((0,e$.isDigit)(t)||45===t)return function(e,t,n){let r=e.source.body,i=t,a=n,o=!1;if(45===a&&(a=r.charCodeAt(++i)),48===a){if(a=r.charCodeAt(++i),(0,e$.isDigit)(a))throw eW(e.source,i,`Invalid number, unexpected digit after 0: ${e0(e,i)}.`)}else i=e2(e,i,a),a=r.charCodeAt(i);if(46===a&&(o=!0,a=r.charCodeAt(++i),i=e2(e,i,a),a=r.charCodeAt(i)),(69===a||101===a)&&(o=!0,(43===(a=r.charCodeAt(++i))||45===a)&&(a=r.charCodeAt(++i)),i=e2(e,i,a),a=r.charCodeAt(i)),46===a||(0,e$.isNameStart)(a))throw eW(e.source,i,`Invalid number, expected digit but got: ${e0(e,i)}.`);return e1(e,o?ew.FLOAT:ew.INT,t,i,r.slice(t,i))}(e,i,t);if((0,e$.isNameStart)(t))return function(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let e=n.charCodeAt(i);if((0,e$.isNameContinue)(e))++i;else break}return e1(e,ew.NAME,t,i,n.slice(t,i))}(e,i);throw eW(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":eJ(t)||ez(n,i)?`Unexpected character: ${e0(e,i)}.`:`Invalid character: ${e0(e,i)}.`)}return e1(e,ew.EOF,r,r)}(this,e.end);e.next=t,t.prev=e,e=t}while(e.kind===ew.COMMENT)return e}}function eJ(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function ez(e,t){return eX(e.charCodeAt(t))&&eZ(e.charCodeAt(t+1))}function eX(e){return e>=55296&&e<=56319}function eZ(e){return e>=56320&&e<=57343}function e0(e,t){let n=e.source.body.codePointAt(t);if(void 0===n)return ew.EOF;
3if(n>=32&&n<=126){let e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function e1(e,t,n,r,i){let a=e.line,o=1+n-e.lineStart;return new eK.Token(t,n,r,a,o,i)}function e2(e,t,n){if(!(0,e$.isDigit)(n))throw eW(e.source,t,`Invalid number, expected digit but got: ${e0(e,t)}.`);let r=e.source.body,i=t+1;for(;(0,e$.isDigit)(r.charCodeAt(i));)++i;return i}function e3(e,t){return e4(e.charCodeAt(t))<<12|e4(e.charCodeAt(t+1))<<8|e4(e.charCodeAt(t+2))<<4|e4(e.charCodeAt(t+3))}function e4(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}var e5=e.i(936535),e6=e.i(241888);let e7=globalThis.process&&1?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if("object"==typeof e&&null!==e){var n;let r=t.prototype[Symbol.toStringTag];if(r===(Symbol.toStringTag in e?e[Symbol.toStringTag]:null==(n=e.constructor)?void 0:n.name)){let t=(0,e6.inspect)(e);throw Error(`Cannot use ${r} "${t}" from another module or realm. 4 5Ensure that there is only one instance of "graphql" in the node_modules 6directory. If different versions of "graphql" are the dependencies of other 7relied on modules, use "resolutions" to ensure only one version is installed. 8 9https://yarnpkg.com/en/docs/selective-version-resolutions 10 11Duplicate "graphql" modules cannot be used at the same time since different 12versions may have different capabilities and behavior. The data from one 13version used in the function from another could produce confusing and 14spurious results.`)}}return!1};class e8{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||(0,e5.devAssert)(!1,`Body must be a string. Received: ${(0,e6.inspect)(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||(0,e5.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,e5.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}class e9{constructor(e,t={}){const{lexer:n,...r}=t;if(n)this._lexer=n;else{const t=!function(e){return e7(e,e8)}(e)?new e8(e):e;this._lexer=new eQ(t)}this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let e=this.expectToken(ew.NAME);return this.node(e,{kind:ej.Kind.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:ej.Kind.DOCUMENT,definitions:this.many(ew.SOF,this.parseDefinition,ew.EOF)})}parseDefinition(){if(this.peek(ew.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(e&&t.kind===ew.BRACE_L)throw eW(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(t.kind===ew.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw eW(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if("extend"===t.value)return this.parseTypeSystemExtension()}throw this.unexpected(t)}parseOperationDefinition(){let e,t=this._lexer.token;if(this.peek(ew.BRACE_L))return this.node(t,{kind:ej.Kind.OPERATION_DEFINITION,operation:eK.OperationTypeNode.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseDescription(),r=this.parseOperationType();return this.peek(ew.NAME)&&(e=this.parseName()),this.node(t,{kind:ej.Kind.OPERATION_DEFINITION,operation:r,description:n,name:e,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(ew.NAME);switch(e.value){case"query":return eK.OperationTypeNode.QUERY;case"mutation":return eK.OperationTypeNode.MUTATION;case"subscription":return eK.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(ew.PAREN_L,this.parseVariableDefinition,ew.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ej.Kind.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(ew.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(ew.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(ew.DOLLAR),this.node(e,{kind:ej.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ej.Kind.SELECTION_SET,selections:this.many(ew.BRACE_L,this.parseSelection,ew.BRACE_R)})}parseSelection(){return this.peek(ew.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(ew.COLON)?(e=r,t=this.parseName()):t=r,this.node(n,{kind:ej.Kind.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(ew.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(ew.PAREN_L,t,ew.PAREN_R)}parseArgument(e=!1){let t=this._lexer.token,n=this.parseName();return this.expectToken(ew.COLON),this.node(t,{kind:ej.Kind.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let e=this._lexer.token;this.expectToken(ew.SPREAD);let t=this.expectOptionalKeyword("on");return!t&&this.peek(ew.NAME)?this.node(e,{kind:ej.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:ej.Kind.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token,t=this.parseDescription();return(this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables)?this.node(e,{kind:ej.Kind.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:ej.Kind.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){let t=this._lexer.token;switch(t.kind){case ew.BRACKET_L:return this.parseList(e);case ew.BRACE_L:return this.parseObject(e);case ew.INT:return this.advanceLexer(),this.node(t,{kind:ej.Kind.INT,value:t.value});case ew.FLOAT:return this.advanceLexer(),this.node(t,{kind:ej.Kind.FLOAT,value:t.value});case ew.STRING:case ew.BLOCK_STRING:return this.parseStringLiteral();case ew.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:ej.Kind.BOOLEAN,value:!0});case"false":return this.node(t,{kind:ej.Kind.BOOLEAN,value:!1});case"null":return this.node(t,{kind:ej.Kind.NULL});default:return this.node(t,{kind:ej.Kind.ENUM,value:t.value})}case ew.DOLLAR:if(e){if(this.expectToken(ew.DOLLAR),this._lexer.token.kind===ew.NAME){let e=this._lexer.token.value;throw eW(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:ej.Kind.STRING,value:e.value,block:e.kind===ew.BLOCK_STRING})}parseList(e){let t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:ej.Kind.LIST,values:this.any(ew.BRACKET_L,t,ew.BRACKET_R)})}parseObject(e){let t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:ej.Kind.OBJECT,fields:this.any(ew.BRACE_L,t,ew.BRACE_R)})}parseObjectField(e){let t=this._lexer.token,n=this.parseName();return this.expectToken(ew.COLON),this.node(t,{kind:ej.Kind.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){let t=[];for(;this.peek(ew.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let t=this._lexer.token;return this.expectToken(ew.AT),this.node(t,{kind:ej.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e,t=this._lexer.token;if(this.expectOptionalToken(ew.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(ew.BRACKET_R),e=this.node(t,{kind:ej.Kind.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(ew.BANG)?this.node(t,{kind:ej.Kind.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this._lexer.token,{kind:ej.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(ew.STRING)||this.peek(ew.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(ew.BRACE_L,this.parseOperationTypeDefinition,ew.BRACE_R);return this.node(e,{kind:ej.Kind.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let e=this._lexer.token,t=this.parseOperationType();this.expectToken(ew.COLON);let n=this.parseNamedType();return this.node(e,{kind:ej.Kind.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:ej.Kind.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:ej.Kind.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(ew.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(ew.BRACE_L,this.parseFieldDefinition,ew.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(ew.COLON);let i=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:ej.Kind.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:a})}parseArgumentDefs(){return this.optionalMany(ew.PAREN_L,this.parseInputValueDef,ew.PAREN_R)}parseInputValueDef(){let e,t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(ew.COLON);let i=this.parseTypeReference();this.expectOptionalToken(ew.EQUALS)&&(e=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:ej.Kind.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:e,directives:a})}parseInterfaceTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:ej.Kind.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:ej.Kind.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(ew.EQUALS)?this.delimitedMany(ew.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:ej.Kind.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(ew.BRACE_L,this.parseEnumValueDefinition,ew.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:ej.Kind.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw eW(this._lexer.source,this._lexer.token.start,`${te(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:ej.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(ew.BRACE_L,this.parseInputValueDef,ew.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();if(e.kind===ew.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let t=this.parseConstDirectives(),n=this.optionalMany(ew.BRACE_L,this.parseOperationTypeDefinition,ew.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:ej.Kind.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:ej.Kind.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:ej.Kind.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:ej.Kind.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:ej.Kind.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:ej.Kind.ENUM_TYPE_EXT
14ENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:ej.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(ew.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(e,{kind:ej.Kind.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:a})}parseDirectiveLocations(){return this.delimitedMany(ew.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(eP,t.value))return t;throw this.unexpected(e)}parseSchemaCoordinate(){let e,t,n=this._lexer.token,r=this.expectOptionalToken(ew.AT),i=this.parseName();return(!r&&this.expectOptionalToken(ew.DOT)&&(e=this.parseName()),(r||e)&&this.expectOptionalToken(ew.PAREN_L)&&(t=this.parseName(),this.expectToken(ew.COLON),this.expectToken(ew.PAREN_R)),r)?t?this.node(n,{kind:ej.Kind.DIRECTIVE_ARGUMENT_COORDINATE,name:i,argumentName:t}):this.node(n,{kind:ej.Kind.DIRECTIVE_COORDINATE,name:i}):e?t?this.node(n,{kind:ej.Kind.ARGUMENT_COORDINATE,name:i,fieldName:e,argumentName:t}):this.node(n,{kind:ej.Kind.MEMBER_COORDINATE,name:i,memberName:e}):this.node(n,{kind:ej.Kind.TYPE_COORDINATE,name:i})}node(e,t){return!0!==this._options.noLocation&&(t.loc=new eK.Location(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){let t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw eW(this._lexer.source,t.start,`Expected ${tt(e)}, found ${te(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){let t=this._lexer.token;if(t.kind===ew.NAME&&t.value===e)this.advanceLexer();else throw eW(this._lexer.source,t.start,`Expected "${e}", found ${te(t)}.`)}expectOptionalKeyword(e){let t=this._lexer.token;return t.kind===ew.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){let t=null!=e?e:this._lexer.token;return eW(this._lexer.source,t.start,`Unexpected ${te(t)}.`)}any(e,t,n){this.expectToken(e);let r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){let e=[];do e.push(t.call(this));while(!this.expectOptionalToken(n))return e}return[]}many(e,t,n){this.expectToken(e);let r=[];do r.push(t.call(this));while(!this.expectOptionalToken(n))return r}delimitedMany(e,t){this.expectOptionalToken(e);let n=[];do n.push(t.call(this));while(this.expectOptionalToken(e))return n}advanceLexer(){let{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==ew.EOF&&(++this._tokenCounter,void 0!==e&&this._tokenCounter>e))throw eW(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function te(e){let t=e.value;return tt(e.kind)+(null!=t?` "${t}"`:"")}function tt(e){return e===ew.BANG||e===ew.DOLLAR||e===ew.AMP||e===ew.PAREN_L||e===ew.PAREN_R||e===ew.DOT||e===ew.SPREAD||e===ew.COLON||e===ew.EQUALS||e===ew.AT||e===ew.BRACKET_L||e===ew.BRACKET_R||e===ew.BRACE_L||e===ew.PIPE||e===ew.BRACE_R?`"${e}"`:e}var tn=e.i(374009);let tr="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ti=new Uint8Array(16),ta=[];for(let e=0;e<256;++e)ta.push((e+256).toString(16).slice(1));let to=function(e,n,r){if(tr&&!n&&!e)return tr();let i=(e=e||{}).random??e.rng?.()??function(){if(!t){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");t=crypto.getRandomValues.bind(crypto)}return t(ti)}();if(i.length<16)throw Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,n){if((r=r||0)<0||r+16>n.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)n[r+e]=i[e];return n}return function(e,t=0){return(ta[e[t+0]]+ta[e[t+1]]+ta[e[t+2]]+ta[e[t+3]]+"-"+ta[e[t+4]]+ta[e[t+5]]+"-"+ta[e[t+6]]+ta[e[t+7]]+"-"+ta[e[t+8]]+ta[e[t+9]]+"-"+ta[e[t+10]]+ta[e[t+11]]+ta[e[t+12]]+ta[e[t+13]]+ta[e[t+14]]+ta[e[t+15]]).toLowerCase()}(i)};e.s(["v4",0,to],422233);var ts=((i={}).ANDROID="android",i.IOS="ios",i.DESKTOP="desktop",i),tl=e.i(393531),tu=e.i(345425);ts.ANDROID,ts.IOS,ts.DESKTOP,function(){if(!tl.IS_CLIENT)return!1;if((0,tu.isAndroidApp)())return!0;let e=window.navigator.userAgent.toLowerCase();return/android/.test(e)}()?ts.ANDROID:function(){if(!tl.IS_CLIENT)return!1;let e=window.navigator.userAgent.toLowerCase();return/iphone|ipad|ipod/.test(e)}()?ts.IOS:ts.DESKTOP;let tc=["Offer not found","You are not Authenticated.","Forbidden resource","You already claimed reward for app install","not enough balance","surveys are available for people over the age of 16","invali
14d postal code","The survey is unavailable","you have already spun the wheel and received","make your first cashout to unlock jackpot cases","Failed to claim onboarding reward","you have already rated the survey","User survey info missing. User needs to take the profiler survey"];class td{baseURL;showInternalErrors;token;inFlightRequests;debouncedResetInflightRequests;cache;constructor(e,t){this.baseURL=e,this.showInternalErrors=t,this.token=null,this.inFlightRequests=0,this.debouncedResetInflightRequests=(0,tn.default)(this.resetInflightRequests,2e3),this.cache=new Map}setToken(e){this.token=e}get headers(){let e={};return this.token&&(e.Authorization=`Bearer ${this.token}`),e}async delay(e){return new Promise(t=>setTimeout(t,e))}resetInflightRequests(){this.inFlightRequests=0}preloadImage(e){return new Promise(t=>{let n=new Image;n.onload=()=>t(),n.src=e})}async onRequest(e,t,n){try{if("getOffers"!==e)return;let t=n?.data?.getOffers?.items;if(!Array.isArray(t))return;let r=window.matchMedia?.("(max-width: 700px)")?.matches??!1,i=t.slice(0,r?3:9).flatMap(e=>[e.thumbnailLarge,e.thumbnail].filter(e=>"string"==typeof e));i.length&&await Promise.allSettled(i.map(e=>this.preloadImage(e)))}catch{}}async fetch(e,t={}){this.debouncedResetInflightRequests();let{headers:n={},...r}=t,{body:i}=r,a={...this.headers};"string"==typeof i&&(a["Content-Type"]="application/json");let o=eU("Req-Session-Id");if(o||eM("Req-Session-Id",o=to()),this.inFlightRequests+=1,this.inFlightRequests>15&&(this.inFlightRequests=15),this.inFlightRequests>4){let e=(this.inFlightRequests-4)*100;await this.delay(e)}let s=await fetch(`${this.baseURL}${e}`,{...r,headers:{"Req-Session-Id":o,...a,...n},credentials:"include"});this.inFlightRequests-=1;let l="text/csv"===s.headers.get("Content-Type"),u=null;s.headers.get("Content-type")?.includes("application/json")?u=await s.json():l&&(u=await s.text()),u&&Array.isArray(u.errors)&&u.errors.length>0&&function(e,t,n){let{errors:r}=e,i=Array.isArray(r)?r.map(e=>"string"==typeof e?e:e?.message??"Unknown error"):[r||"Unknown error"];if(i=i.filter(e=>!1===tc.some(t=>e.startsWith(t))),window.Sentry&&window.Sentry.captureException&&i.length>0&&400!==t.status){let e=Array.isArray(r)&&r[0]?r[0].path:null,t=`Request${e?` ${e}`:""} failed with errors`;window.Sentry.captureException(Error(t),{fingerprint:[t],extra:{errorMessages:JSON.stringify(i),body:"string"==typeof n?n:null,errors:JSON.stringify(Array.isArray(r)?r.map(e=>
14({path:"string"==typeof e?[]:e.path,message:"string"==typeof e?e:e.message,locations:"string"==typeof e?[]:e.locations})):r)}})}}(u,s,i);let c=function(e){try{var t;let n,r,i=(t=JSON.parse(e)?.query,r=(n=new e9(t,void 0)).parseDocument(),Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r),a=i.definitions?.find(e=>"OperationDefinition"===e.kind);if(a&&a.selectionSet){let e=a.selectionSet;if(e.selections&&e.selections.length>0){let t=e.selections?.find(e=>"Field"===e.kind);if(t&&t.name)return t.name.value}}return null}catch{return null}}(i);if(this.onRequest(c,i,u),!s.ok&&!l){if(c&&s.status>=400&&((e,t,n)=>{if(window.Sentry&&window.Sentry.captureException){let r=`Request ${t} failed with status ${e}`;window.Sentry.captureException(Error(r),{fingerprint:[r],extra:{body:"string"==typeof n?n:null}})}})(s.status,c,i),null===u)throw Error("Request failed");let{errors:e}=u;if(this.showInternalErrors&&e&&e.length>0)throw Error(Array.isArray(e)?e[0].toString():e);throw Error(u.message||"Request failed")}return u}async get(e,t={}){return this.fetch(e,{method:"GET",...t})}async post(e,t,n={}){return this.fetch(e,{method:"POST",body:t,...n})}async patch(e,t,n={}){return this.fetch(e,{method:"PATCH",body:t,...n})}async put(e,t,n={}){return this.fetch(e,{method:"PUT",body:t,...n})}async delete(e,t={}){return this.fetch(e,{method:"DELETE",...t})}}class tp{app;constructor(e,t=!1){this.app=new td(e,t)}}(a={}).From_16To_20="FROM_16_TO_20",a.From_21To_29="FROM_21_TO_29",a.From_30To_49="FROM_30_TO_49",a.From_50="FROM_50",a.NotSpecified="NOT_SPECIFIED",(o={}).AdditionalProfilerReward="ADDITIONAL_PROFILER_REWARD",o.AffiliateRewardsLiteV2="AFFILIATE_REWARDS_LITE_V2",o.AffiliateSystemV2="AFFILIATE_SYSTEM_V2",o.AffiliateSystemV2_1="AFFILIATE_SYSTEM_V2_1",o.AlmediaInnovateMr="ALMEDIA_INNOVATE_MR",o.AlmediaLucid="ALMEDIA_LUCID",o.AlmediaPureSpectrum="ALMEDIA_PURE_SPECTRUM",o.AlmediaToluna="ALMEDIA_TOLUNA",o.AndroidAppOffersBlocked="ANDROID_APP_OFFERS_BLOCKED",o.AndroidInstallAppQuest="ANDROID_INSTALL_APP_QUEST",o.ApiTester="API_TESTER",o.BitLabs="BIT_LABS",o.BlockReviewRequests="BLOCK_REVIEW_REQUESTS",o.BonusRewardDisplay="BONUS_REWARD_DISPLAY",o.CampaignUpside="CAMPAIGN_UPSIDE",o.CashoutDiscount="CASHOUT_DISCOUNT",o.CashoutGoal="CASHOUT_GOAL",o.CashoutGoalRemoval="CASHOUT_GOAL_REMOVAL",o.CashoutGoalV2="CASHOUT_GOAL_V2",o.CashoutGoalV3="CASHOUT_GOAL_V3",o.CashoutGoalV4="CASHOUT_GOAL_V4",o.ChristmasRaffle="CHRISTMAS_RAFFLE",o.CpxResearch="CPX_RESEARCH",o.CryptoFeeEnabled="CRYPTO_FEE_ENABLED",o.DiamondInstallCase="DIAMOND_INSTALL_CASE",o.DynamicTasksDemo="DYNAMIC_TASKS_DEMO",o.EarlyCashout="EARLY_CASHOUT",o.EarlyCashoutV2="EARLY_CASHOUT_V2",o.EnableCryptoV2Cashout="ENABLE_CRYPTO_V2_CASHOUT",o.EnableIosShortcutQuest="ENABLE_IOS_SHORTCUT_QUEST",o.EnableRevolutUsCashout="ENABLE_REVOLUT_US_CASHOUT",o.EnableRevolutV2Cashout="ENABLE_REVOLUT_V2_CASHOUT",o.EnableSmsVerification="ENABLE_SMS_VERIFICATION",o.EnableStakeComFaucet="ENABLE_STAKE_COM_FAUCET",o.EnableStakeComV2Cashout="ENABLE_STAKE_COM_V2_CASHOUT",o.EnableStakeFaucetV2="ENABLE_STAKE_FAUCET_V2",o.EnableStakeUsFaucet="ENABLE_STAKE_US_FAUCET",o.EnableStakeUsV2Cashout="ENABLE_STAKE_US_V2_CASHOUT",o.EnableStashCashout="ENABLE_STASH_CASHOUT",o.EnableTangoV2Cashout="ENABLE_TANGO_V2_CASHOUT",o.EnableWaxpeerV2ProxyCashout="ENABLE_WAXPEER_V2_PROXY_CASHOUT",o.EnableWordleTest="ENABLE_WORDLE_TEST",o.ExitUiMode="EXIT_UI_MODE",o.FcBackendFreeCases="FC_BACKEND_FREE_CASES",o.FeaturedSurveys="FEATURED_SURVEYS",o.FirstSurveyBonus="FIRST_SURVEY_BONUS",o.FiveSurveys="FIVE_SURVEYS",o.FunSurveySettings="FUN_SURVEY_SETTINGS",o.GemSlot="GEM_SLOT",o.GhostAccountsV3="GHOST_ACCOUNTS_V3",o.GhostAccountsWeb="GHOST_ACCOUNTS_WEB",o.HalloweenSpecial="HALLOWEEN_SPECIAL",o.IgnoreOffersLiteModeFilter="IGNORE_OFFERS_LITE_MODE_FILTER",o.InternalSurveysReward="INTERNAL_SURVEYS_REWARD",o.IntradayAppOpen="INTRADAY_APP_OPEN",o.IntradayAppOpenV2="INTRADAY_APP_OPEN_V2",o.InviteAffiliatesWithinPayingStructure="INVITE_AFFILIATES_WITHIN_PAYING_STRUCTURE",o.IosAppOffersBlocked="IOS_APP_OFFERS_BLOCKED",o.Jackpot="JACKPOT",o.JackpotBetRequirement="JACKPOT_BET_REQUIREMENT",o.JackpotCommission="JACKPOT_
14COMMISSION",o.LiteModeForAppleAndSamsungDevices="LITE_MODE_FOR_APPLE_AND_SAMSUNG_DEVICES",o.LpSignupConsentUpdates="LP_SIGNUP_CONSENT_UPDATES",o.MarketingEmailQuest="MARKETING_EMAIL_QUEST",o.MarketingPushNotificationQuest="MARKETING_PUSH_NOTIFICATION_QUEST",o.NewStreakSystem="NEW_STREAK_SYSTEM",o.NewYearSpecialOffers="NEW_YEAR_SPECIAL_OFFERS",o.NewYearSpecialSurveys="NEW_YEAR_SPECIAL_SURVEYS",o.NoBonusLadder="NO_BONUS_LADDER",o.OfferAlgoCampaignBoostOverride="OFFER_ALGO_CAMPAIGN_BOOST_OVERRIDE",o.OfferAlgoQualityOverride="OFFER_ALGO_QUALITY_OVERRIDE",o.OfferBoostMultiplier="OFFER_BOOST_MULTIPLIER",o.OfferBundles="OFFER_BUNDLES",o.OfferBundlesMixed="OFFER_BUNDLES_MIXED",o.OfferBundlesTab="OFFER_BUNDLES_TAB",o.OfferBundlesTabV2="OFFER_BUNDLES_TAB_V2",o.OfferBundlesV2="OFFER_BUNDLES_V2",o.OfferLottery="OFFER_LOTTERY",o.OfferMotivator="OFFER_MOTIVATOR",o.OfferRecommendation="OFFER_RECOMMENDATION",o.OfferReleaseTicket="OFFER_RELEASE_TICKET",o.OfferRoasTier_4="OFFER_ROAS_TIER_4",o.OfferSplitTestUserSegment="OFFER_SPLIT_TEST_USER_SEGMENT",o.OfferSuppressionList="OFFER_SUPPRESSION_LIST",o.OnboardingStoryLed="ONBOARDING_STORY_LED",o.OneDollarGiftCard="ONE_DOLLAR_GIFT_CARD",o.PendingOffersWidget="PENDING_OFFERS_WIDGET",o.PreventLiteMode="PREVENT_LITE_MODE",o.PreventSurveyLiteMode="PREVENT_SURVEY_LITE_MODE",o.PrimeSurveys="PRIME_SURVEYS",o.ProfilerOnboarding="PROFILER_ONBOARDING",o.ProfilerSurveySettings="PROFILER_SURVEY_SETTINGS",o.PurchaseCashback="PURCHASE_CASHBACK",o.ReactivationPopupIap="REACTIVATION_POPUP_IAP",o.ReactivationPopupInstallOffer="REACTIVATION_POPUP_INSTALL_OFFER",o.ReactivationPopupOpenOffer="REACTIVATION_POPUP_OPEN_OFFER",o.RemindReview="REMIND_REVIEW",o.RetentionCase="RETENTION_CASE",o.RevolutFaucet="REVOLUT_FAUCET",o.RewardsV2="REWARDS_V2",o.RiskLosingPlatinumVip="RISK_LOSING_PLATINUM_VIP",o.SelectableSignupBonus="SELECTABLE_SIGNUP_BONUS",o.SignupMarketingEmailConsent="SIGNUP_MARKETING_EMAIL_CONSENT",o.SingleProviderSurveys="SINGLE_PROVIDER_SURVEYS",o.StakeUsDepositPromotion="STAKE_US_DEPOSIT_PROMOTION",o.StarsLeaderboard="STARS_LEADERBOARD",o.SurveysLimitation="SURVEYS_LIMITATION",o.SurveysRecommendedSorting="SURVEYS_RECOMMENDED_SORTING",o.SurveysRecScore="SURVEYS_REC_SCORE",o.SurveyBoostBonus="SURVEY_BOOST_BONUS",o.SurveyDisqualificationReward="SURVEY_DISQUALIFICATION_REWARD",o.SurveyLiteLevels="SURVEY_LITE_LEVELS",o.SurveyLiteModeOffersTab="SURVEY_LITE_MODE_OFFERS_TAB",o.SurveyLiteWithdrawalLimit="SURVEY_LITE_WITHDRAWAL_LIMIT",o.SurveyPageHideIntegratedPartners="SURVEY_PAGE_HIDE_INTEGRATED_PARTNERS",o.SurveyProfilerWorkIndustry="SURVEY_PROFILER_WORK_INDUSTRY",o.TangoPaypalGiftCardCustomFee="TANGO_PAYPAL_GIFT_CARD_CUSTOM_FEE",o.ThanksgivingSpecial="THANKSGIVING_SPECIAL",o.ThanksgivingSpecialOffers="THANKSGIVING_SPECIAL_OFFERS",o.TimeLimitedInstall="TIME_LIMITED_INSTALL",o.TraceUserLogs="TRACE_USER_LOGS",o.TriggerIdVerification="TRIGGER_ID_VERIFICATION",o.UserOfferScoreSegment="USER_OFFER_SCORE_SEGMENT",o.UserOnboardingV5_1="USER_ONBOARDING_V5_1",o.UserTagSupportSms="USER_TAG_SUPPORT_SMS",o.UserTagSupportVip="USER_TAG_SUPPORT_VIP",o.VariableRewardsCoinWheel="VARIABLE_REWARDS_COIN_WHEEL",o.VeriffRequest="VERIFF_REQUEST",o.VeriffVsPersona="VERIFF_VS_PERSONA",o.VerificationsOnWithdrawal="VERIFICATIONS_ON_WITHDRAWAL",o.WallAdgate="WALL_ADGATE",o.WallAdgem="WALL_ADGEM",o.WallAdgemQuality="WALL_ADGEM_QUALITY",o.WallAdscend="WALL_ADSCEND",o.WallAppsprize="WALL_APPSPRIZE",o.WallAyet="WALL_AYET",o.WallAyetQuality="WALL_AYET_QUALITY",o.WallBitlabs="WALL_BITLABS",o.WallBitlabsOffers="WALL_BITLABS_OFFERS",o.WallCpx="WALL_CPX",o.WallDigitalTurbune="WALL_DIGITAL_TURBUNE",o.WallFarly="WALL_FARLY",o.WallHangmyads="WALL_HANGMYADS",o.WallInbrain="WALL_INBRAIN",o.WallLootably="WALL_LOOTABLY",o.WallLootablyQuality="WALL_LOOTABLY_QUALITY",o.WallMmWall="WALL_MM_WALL",o.WallMmWallQuality="WALL_MM_WALL_QUALITY",o.WallMonlix="WALL_MONLIX",o.WallMonlixQuality="WALL_MONLIX_QUALITY",o.WallMyChips="WALL_MY_CHIPS",o.WallNotik="WALL_NOTIK",o.WallOfferdaddy="WALL_OFFERDADDY",o.WallOnboarding="WALL_ONBOARDING",o.WallPlaytime="WALL_PLAYTIME",o.WallPollfish="WALL_POLLFISH",o.WallPrime="WALL_PRIME",o.WallRevenuewall="WALL_REVENUEWALL",o.WallRevlum="WALL_REVLUM",o.WallRevu="WALL_REVU",o.WallTapjoy="WALL_TAPJOY",o.WallTepresearch="WALL_TEPRESEARCH",o.WallTheoremreach="WALL_THEOREMREACH",o.WallTimewall="WALL_TIMEWALL",o.WallTorox="WALL_TOROX",o.WallToroxQuality="WALL_TOROX_QUALITY",o.WallWannads="WALL_WANNADS",o.WallYourSurveys="WALL_YOUR_SURVEYS",o.YourSurveys="YOUR_SURVEYS",o.ZeroF
14akeIntegration="ZERO_FAKE_INTEGRATION",(s={}).AffiliateCanNotRefer="AFFILIATE_CAN_NOT_REFER",s.AffiliateCommissionEarned="AFFILIATE_COMMISSION_EARNED",s.AffiliateInviteFriendAndReceiveCoinsReward="AFFILIATE_INVITE_FRIEND_AND_RECEIVE_COINS_REWARD",s.AffiliateInviteFriendAndReceiveJackpotCasesReward="AFFILIATE_INVITE_FRIEND_AND_RECEIVE_JACKPOT_CASES_REWARD",s.AffiliateLaunched="AFFILIATE_LAUNCHED",s.AffiliateLeaderboardUserRanked="AFFILIATE_LEADERBOARD_USER_RANKED",s.AffiliateLevelRaised="AFFILIATE_LEVEL_RAISED",s.AffiliateMissingHigherCommission="AFFILIATE_MISSING_HIGHER_COMMISSION",s.AffiliateMissingNewRefCommission="AFFILIATE_MISSING_NEW_REF_COMMISSION",s.AffiliatePaymentCreated="AFFILIATE_PAYMENT_CREATED",s.AffiliatePaymentDeleted="AFFILIATE_PAYMENT_DELETED",s.AffiliatePostCreated="AFFILIATE_POST_CREATED",s.AffiliateRefSignedUp="AFFILIATE_REF_SIGNED_UP",s.AffiliateRiskDroppingLowerTier="AFFILIATE_RISK_DROPPING_LOWER_TIER",s.AffiliateSystemV2AffiliateFirstCashoutCompleted="AFFILIATE_SYSTEM_V2_AFFILIATE_FIRST_CASHOUT_COMPLETED",s.AffiliateSystemV2AffiliateFirstOfferCompleted="AFFILIATE_SYSTEM_V2_AFFILIATE_FIRST_OFFER_COMPLETED",s.AffiliateTierDropped="AFFILIATE_TIER_DROPPED",s.AffiliateUpsert="AFFILIATE_UPSERT",s.AmplitudeFlagsAssigned="AMPLITUDE_FLAGS_ASSIGNED",s.AppInstalled="APP_INSTALLED",s.AppLobbyVisited="APP_LOBBY_VISITED",s.AppSession="APP_SESSION",s.AttachedCredentials="ATTACHED_CREDENTIALS",s.BonusCodeRewardGranted="BONUS_CODE_REWARD_GRANTED",s.CampaignApproved="CAMPAIGN_APPROVED",s.CampaignCompleted="CAMPAIGN_COMPLETED",s.CampaignCostsImported="CAMPAIGN_COSTS_IMPORTED",s.CampaignRejected="CAMPAIGN_REJECTED",s.ChatBotMessage="CHAT_BOT_MESSAGE",s.CustomLeaderboardUserRanked="CUSTOM_LEADERBOARD_USER_RANKED",s.DiamondCaseActivated="DIAMOND_CASE_ACTIVATED",s.EarlyCashoutIdVerificationCompleted="EARLY_CASHOUT_ID_VERIFICATION_COMPLETED",s.EarlyCashoutIdVerificationStarted="EARLY_CASHOUT_ID_VERIFICATION_STARTED",s.EarlyCashoutPlay_10MinutesCompleted="EARLY_CASHOUT_PLAY_10_MINUTES_COMPLETED",s.EarlyCashoutPlay_10MinutesStarted="EARLY_CASHOUT_PLAY_10_MINUTES_STARTED",s.ExternalSurveyTerminated="EXTERNAL_SURVEY_TERMINATED",s.FingerprintCreated="FINGERPRINT_CREATED",s.FirstSurveyBonusActivated="FIRST_SURVEY_BONUS_ACTIVATED",s.FreeCaseChallengeCompleted="FREE_CASE_CHALLENGE_COMPLETED",s.FreeCaseCoinsEarned="FREE_CASE_COINS_EARNED",s.FreeCaseNoCaseLeft="FREE_CASE_NO_CASE_LEFT",s.FreeCaseOpened="FREE_CASE_OPENED",s.GemRewardUserXp="GEM_REWARD_USER_XP",s.GeneralEventActivated="GENERAL_EVENT_ACTIVATED",s.GhostAccountExpired="GHOST_ACCOUNT_EXPIRED",s.GrantUserAffiliateCoinsReward="GRANT_USER_AFFILIATE_COINS_REWARD",s.GrantUserCoinsReward="GRANT_USER_COINS_REWARD",s.GrantUserInventoryReward="GRANT_USER_INVENTORY_REWARD",s.IdVerificationApproved="ID_VERIFICATION_APPROVED",s.IdVerificationCompleted="ID_VERIFICATION_COMPLETED",s.IdVerificationDeclined="ID_VERIFICATION_DECLINED",s.IdVerificationExpired="ID_VERIFICATION_EXPIRED",s.IdVerificationFailed="ID_VERIFICATION_FAILED",s.IdVerificationRequested="ID_VERIFICATION_REQUESTED",s.IdVerificationStarted="ID_VERIFICATION_STARTED",s.IntercomBatchOfferTicketUpdated="INTERCOM_BATCH_OFFER_TICKET_UPDATED",s.IntercomContactCreated="INTERCOM_CONTACT_CREATED",s.IntercomOfferTicketUpdated="INTERCOM_OFFER_TICKET_UPDATED",s.IntercomTicketCreated="INTERCOM_TICKET_CREATED",s.InternalSurveyAwarded="INTERNAL_SURVEY_AWARDED",s.InternalSurveyCompleted="INTERNAL_SURVEY_COMPLETED",s.InternalSurveyQuestionAnswered="INTERNAL_SURVEY_QUESTION_ANSWERED",s.InternalSurveyTerminated="INTERNAL_SURVEY_TERMINATED",s.JackpotBetPlaced="JACKPOT_BET_PLACED",s.JackpotInviteUser="JACKPOT_INVITE_USER",s.JackpotRollingTimerFinished="JACKPOT_ROLLING_TIMER_FINISHED",s.JackpotTimerFinished="JACKPOT_TIMER_FINISHED",s.JackpotUserCompletedRegularSurvey="JACKPOT_USER_COMPLETED_REGULAR_SURVEY",s.JackpotUserOpenedCase="JACKPOT_USER_OPENED_CASE",s.JackpotUserReceivedFreeTickets="JACKPOT_USER_RECEIVED_FREE_TICKETS",s.JackpotUserWon="JACKPOT_USER_WON",s.KycVerificationApproved="KYC_VERIFICATION_APPROVED",s.KycVerificationCompleted="KYC_VERIFICATION_COMPLETED",s.KycVerificationFailed="KYC_VERIFICATION_FAILED",s.KycVerificationFinished="KYC_VERIFICATION_FINISHED",s.KycVerificationRequested="KYC_VERIFICATION_REQUESTED",s.KycVerificationStarted="KYC_VERIFICATION_STARTED",s.LeaderboardRewardsCredited="LEADERBOARD_REWARDS_CREDITED",s.LeaderboardUserRanked="LEADERBOARD_USER_RANKED",s.LowTrustedAffiliatesReferrerFlagged="LOW_TRUSTED_AFFILIATES_REFERRER_FLAGGED",s.MarketingEmailClicked="MARKETING_EMAIL_CLICKED",s.MarketingEmailDelivered="MARKETING_EMAIL_DELIVERED",s.MarketingEmailOpened="MARKETING_EMAIL_OPENED",s.MultipleAffiliatesReferrerFlagged="MULTIPLE_AFFILIATES_REFERRER_FLAGGED",s.NotifyUser="NOTIFY_USER",s.OfferBoostChanged="OFFER_BOOST_CHANGED",s.OfferBundleClaimed="OFFER_BUNDLE_CLAIMED",s.OfferBundleClaimedAutomatically="OFFER_BUNDLE_CLAIMED_AUTOMATICALLY",s.OfferChargebacked="OFFER_CHARGEBACKED",s.OfferCompleted="OFFER_COMPLETED",s.OfferHeld="OFFER_HELD",s.OfferLotteryClaimed="OFFER_LOTTERY_CLAIMED",s.OfferLotteryDraw="OFFER_LOTTERY_DRAW",s.OfferLotteryFirstTickets="OFFER_LOTTERY_FIRST_TICKETS",s.OfferLotteryWon="OFFER_LOTTERY_WON",s.OfferOpened="OFFER_OPENED",s.OfferReleased="OFFER_RELEASED",s.OfferReleaseCanceled="OFFER_RELEASE_CANCELED",s.OfferReleaseScheduled="OFFER_RELEASE_SCHEDULED",s.OfferStarted="OFFER_STARTED",s.OfferSupportTicketCreated="OFFER_SUPPORT_TICKET_CREATED",s.OfferSupportTicketUpdated="OFFER_SUPPORT_TICKET_UPDATED",s.OnboardingPassed="ONBOARDING_PASSED",s.PendingOfferBundle="PENDING_OFFER_BUNDLE",s.PurchaseCashbackSumNotification="PURCHASE_CASHBACK_SUM_NOTIFICATION",s.QuestStepClaimed="QUEST_STEP_CLAIMED",s.Referral_1StOfferJackpotCasesAwarded="REFERRAL_1ST_OFFER_JACKPOT_
14CASES_AWARDED",s.ReferralEventUnlocked="REFERRAL_EVENT_UNLOCKED",s.SlotSpun="SLOT_SPUN",s.SpecialEventPayout="SPECIAL_EVENT_PAYOUT",s.StakeDepositRewardGranted="STAKE_DEPOSIT_REWARD_GRANTED",s.StartChrissmasRaffle="START_CHRISSMAS_RAFFLE",s.SupportResponded="SUPPORT_RESPONDED",s.SurveyAbandoned="SURVEY_ABANDONED",s.SurveyAdditionalQuestionAnswered="SURVEY_ADDITIONAL_QUESTION_ANSWERED",s.SurveyAdditionalQuestionAsked="SURVEY_ADDITIONAL_QUESTION_ASKED",s.SurveyAdditionalQuestionTerminated="SURVEY_ADDITIONAL_QUESTION_TERMINATED",s.SurveyClicked="SURVEY_CLICKED",s.SurveyDisqualified="SURVEY_DISQUALIFIED",s.SurveyStarted="SURVEY_STARTED",s.SurveyStreakLevelUp="SURVEY_STREAK_LEVEL_UP",s.SurveyTerminatedOnAdditionalQuestion="SURVEY_TERMINATED_ON_ADDITIONAL_QUESTION",s.UserAuthProfileCeated="USER_AUTH_PROFILE_CEATED",s.UserBalanceChanged="USER_BALANCE_CHANGED",s.UserBlocked="USER_BLOCKED",s.UserBlockedStatusChanged="USER_BLOCKED_STATUS_CHANGED",s.UserClevertapJourneyed="USER_CLEVERTAP_JOURNEYED",s.UserDeleted="USER_DELETED",s.UserDuplicateFlagged="USER_DUPLICATE_FLAGGED",s.UserDuplicateReferrerFlagged="USER_DUPLICATE_REFERRER_FLAGGED",s.UserEarning="USER_EARNING",s.UserEmailChanged="USER_EMAIL_CHANGED",s.UserEmailVerified="USER_EMAIL_VERIFIED",s.UserFinalBanned="USER_FINAL_BANNED",s.UserFlagged="USER_FLAGGED",s.UserForceLoggedOut="USER_FORCE_LOGGED_OUT",s.UserInventoryUpdated="USER_INVENTORY_UPDATED",s.UserInAppActionCompleted="USER_IN_APP_ACTION_COMPLETED",s.UserInAppActionSaved="USER_IN_APP_ACTION_SAVED",s.UserNameChanged="USER_NAME_CHANGED",s.UserNoteCreated="USER_NOTE_CREATED",s.UserOfferTaskChanged="USER_OFFER_TASK_CHANGED",s.UserOfferTaskReactivated="USER_OFFER_TASK_REACTIVATED",s.UserPassChanged="USER_PASS_CHANGED",s.UserPayoutStructureAssigned="USER_PAYOUT_STRUCTURE_ASSIGNED",s.UserPhoneVerificationCompleted="USER_PHONE_VERIFICATION_COMPLETED",s.UserPhoneVerificationCompletedHistorical="USER_PHONE_VERIFICATION_COMPLETED_HISTORICAL",s.UserPhoneVerificationRequested="USER_PHONE_VERIFICATION_REQUESTED",s.UserPhoneVerificationSmsSent="USER_PHONE_VERIFICATION_SMS_SENT",s.UserPlatinumVipAtRisk="USER_PLATINUM_VIP_AT_RISK",s.UserPrivateProfileStatusChanged="USER_PRIVATE_PROFILE_STATUS_CHANGED",s.UserProfileCreated="USER_PROFILE_CREATED",s.UserQualityCreated="USER_QUALITY_CREATED",s.UserReferralCodeChanged="USER_REFERRAL_CODE_CHANGED",s.UserReferred="USER_REFERRED",s.UserRewardedFromCampaign="USER_REWARDED_FROM_CAMPAIGN",s.UserRewardCreated="USER_REWARD_CREATED",s.UserRewardFailed="USER_REWARD_FAILED",s.UserSessionStarted="USER_SESSION_STARTED",s.UserSignedIn="USER_SIGNED_IN",s.UserSignedOut="USER_SIGNED_OUT",s.UserSignedUp="USER_SIGNED_UP",s.UserSignupBonusApplied="USER_SIGNUP_BONUS_APPLIED",s.UserTagAdded="USER_TAG_ADDED",s.UserTicketBalanceChanged="USER_TICKET_BALANCE_CHANGED",s.UserUiModeChanged="USER_UI_MODE_CHANGED",s.UserUnblocked="USER_UNBLOCKED",s.UserVerificationStatusChanged="USER_VERIFICATION_STATUS_CHANGED",s.UserXpChanged="USER_XP_CHANGED",s.VipPlatinumIntercomMessageSent="VIP_PLATINUM_INTERCOM_MESSAGE_SENT",s.VipPlatinumUserBonusCodeGenerated="VIP_PLATINUM_USER_BONUS_CODE_GENERATED",s.WallSessionStarted="WALL_SESSION_STARTED",s.WithdrawalApproved="WITHDRAWAL_APPROVED",s.WithdrawalFailed="WITHDRAWAL_FAILED",s.WithdrawalInitialisationFailed="WITHDRAWAL_INITIALISATION_FAILED",s.WithdrawalInitiated="WITHDRAWAL_INITIATED",s.WithdrawalPending="WITHDRAWAL_PENDING",s.WithdrawalRejected="WITHDRAWAL_REJECTED",s.WithdrawalRequested="WITHDRAWAL_REQUESTED",s.WithdrawalScheduled="WITHDRAWAL_SCHEDULED",s.WithdrawalSent="WITHDRAWAL_SENT",s.ZeroFakeAuthenticated="ZERO_FAKE_AUTHENTICATED",(l={}).Approved="APPROVED",l.InReview="IN_REVIEW",l.Pending="PENDING",l.Rejected="REJECTED";var tf=((u={}).Aed="AED",u.Ars="ARS",u.Aud="AUD",u.Brl="BRL",u.Cad="CAD",u.Chf="CHF",u.Clp="CLP",u.Czk="CZK",u.Dkk="DKK",u.Eur="EUR",u.Gbp="GBP",u.Hkd="HKD",u.Huf="HUF",u.Idr="IDR",u.Inr="INR",u.Jpy="JPY",u.Krw="KRW",u.Mxn="MXN",u.Myr="MYR",u.Nok="NOK",u.Nzd="NZD",u.Pen="PEN",u.Php="PHP",u.Pln="PLN",u.Ron="RON",u.Sar="SAR",u.Sek="SEK",u.Sgd="SGD",u.Thb="THB",u.Try="TRY",u.Twd="TWD",u.Usd="USD",u.Vnd="VND",u.Zar="ZAR",u);(c={}).Active="ACTIVE",c.Busted="BUSTED",c.Claimed="CLAIMED",c.InProgress="IN_PROGRESS",(d={}
14).AffiliateRewardsFloatingButton="AFFILIATE_REWARDS_FLOATING_BUTTON",d.ExploreOffers="EXPLORE_OFFERS",(p={}).Disabled="DISABLED",p.Enabled="ENABLED",(f={}).Closed="CLOSED",f.Completed="COMPLETED",f.Live="LIVE",f.Ongoing="ONGOING",f.Upcoming="UPCOMING";var th=((h={}).Ad="AD",h.Ae="AE",h.Af="AF",h.Ag="AG",h.Ai="AI",h.Al="AL",h.All="ALL",h.Am="AM",h.An="AN",h.Ao="AO",h.Aq="AQ",h.Ar="AR",h.As="AS",h.At="AT",h.Au="AU",h.Aw="AW",h.Ax="AX",h.Az="AZ",h.Ba="BA",h.Bb="BB",h.Bd="BD",h.Be="BE",h.Bf="BF",h.Bg="BG",h.Bh="BH",h.Bi="BI",h.Bj="BJ",h.Bl="BL",h.Bm="BM",h.Bn="BN",h.Bo="BO",h.Bq="BQ",h.Br="BR",h.Bs="BS",h.Bt="BT",h.Bv="BV",h.Bw="BW",h.By="BY",h.Bz="BZ",h.Ca="CA",h.Cc="CC",h.Cd="CD",h.Cf="CF",h.Cg="CG",h.Ch="CH",h.Ci="CI",h.Ck="CK",h.Cl="CL",h.Cm="CM",h.Cn="CN",h.Co="CO",h.Cr="CR",h.Cs="CS",h.Cu="CU",h.Cv="CV",h.Cw="CW",h.Cx="CX",h.Cy="CY",h.Cz="CZ",h.De="DE",h.Dj="DJ",h.Dk="DK",h.Dm="DM",h.Do="DO",h.Dz="DZ",h.Ec="EC",h.Ee="EE",h.Eg="EG",h.Eh="EH",h.Er="ER",h.Es="ES",h.Et="ET",h.Eu="EU",h.Fi="FI",h.Fj="FJ",h.Fk="FK",h.Fm="FM",h.Fo="FO",h.Fr="FR",h.Ga="GA",h.Gb="GB",h.Gd="GD",h.Ge="GE",h.Gf="GF",h.Gg="GG",h.Gh="GH",h.Gi="GI",h.Gl="GL",h.Gm="GM",h.Gn="GN",h.Gp="GP",h.Gq="GQ",h.Gr="GR",h.Gs="GS",h.Gt="GT",h.Gu="GU",h.Gw="GW",h.Gy="GY",h.Hk="HK",h.Hm="HM",h.Hn="HN",h.Hr="HR",h.Ht="HT",h.Hu="HU",h.Id="ID",h.Ie="IE",h.Il="IL",h.Im="IM",h.In="IN",h.Io="IO",h.Iq="IQ",h.Ir="IR",h.Is="IS",h.It="IT",h.Je="JE",h.Jm="JM",h.Jo="JO",h.Jp="JP",h.Ke="KE",h.Kg="KG",h.Kh="KH",h.Ki="KI",h.Km="KM",h.Kn="KN",h.Kp="KP",h.Kr="KR",h.Kw="KW",h.Ky="KY",h.Kz="KZ",h.La="LA",h.Lb="LB",h.Lc="LC",h.Li="LI",h.Lk="LK",h.Lr="LR",h.Ls="LS",h.Lt="LT",h.Lu="LU",h.Lv="LV",h.Ly="LY",h.Ma="MA",h.Mc="MC",h.Md="MD",h.Me="ME",h.Mf="MF",h.Mg="MG",h.Mh="MH",h.Mk="MK",h.Ml="ML",h.Mm="MM",h.Mn="MN",h.Mo="MO",h.Mp="MP",h.Mq="MQ",h.Mr="MR",h.Ms="MS",h.Mt="MT",h.Mu="MU",h.Mv="MV",h.Mw="MW",h.Mx="MX",h.My="MY",h.Mz="MZ",h.Na="NA",h.Nc="NC",h.Ne="NE",h.Nf="NF",h.Ng="NG",h.Ni="NI",h.Nl="NL",h.No="NO",h.Np="NP",h.Nr="NR",h.Nu="NU",h.Nz="NZ",h.Om="OM",h.Pa="PA",h.Pe="PE",h.Pf="PF",h.Pg="PG",h.Ph="PH",h.Pk="PK",h.Pl="PL",h.Pm="PM",h.Pn="PN",h.Pr="PR",h.Ps="PS",h.Pt="PT",h.Pw="PW",h.Py="PY",h.Qa="QA",h.Re="RE",h.Ro="RO",h.Rs="RS",h.Ru="RU",h.Rw="RW",h.Sa="SA",h.Sb="SB",h.Sc="SC",h.Sd="SD",h.Se="SE",h.Sg="SG",h.Sh="SH",h.Si="SI",h.Sj="SJ",h.Sk="SK",h.Sl="SL",h.Sm="SM",h.Sn="SN",h.So="SO",h.Sr="SR",h.Ss="SS",h.St="ST",h.Sv="SV",h.Sx="SX",h.Sy="SY",h.Sz="SZ",h.Tc="TC",h.Td="TD",h.Tf="TF",h.Tg="TG",h.Th="TH",h.Tj="TJ",h.Tk="TK",h.Tl="TL",h.Tm="TM",h.Tn="TN",h.To="TO",h.Tr="TR",h.Tt="TT",h.Tv="TV",h.Tw="TW",h.Tz="TZ",h.Ua="UA",h.Ug="UG",h.Um="UM",h.Us="US",h.Uy="UY",h.Uz="UZ",h.Va="VA",h.Vc="VC",h.Ve="VE",h.Vg="VG",h.Vi="VI",h.Vn="VN",h.Vu="VU",h.Wf="WF",h.Ws="WS",h.Xk="XK",h.Xx="XX",h.Ye="YE",h.Yt="YT",h.Za="ZA",h.Zm="ZM",h.Zw="ZW",h);(g={}).Bch="BCH",g.Bnb="BNB",g.Btc="BTC",g.Doge="DOGE",g.Eos="EOS",g.Eth="ETH",g.Eur="EUR",g.Ltc="LTC",g.StakeCash="StakeCash",g.Trx="TRX",g.Usd="USD",g.Usdc="USDC",g.Usdt="USDT",g.Xrp="XRP",(v={}).CaseActive="CASE_ACTIVE",v.ChallengeActive="CHALLENGE_ACTIVE",v.Inactive="INACTIVE",v.KeysActive="KEYS_ACTIVE",(_={}).Female="FEMALE",_.Male="MALE",_.NotSpecified="NOT_SPECIFIED",_.Other="OTHER",(m={}).HighestReward="HIGHEST_REWARD",m.LowestReward="LOWEST_REWARD",m.MostPopular="MOST_POPULAR",(E={}).Ach="ACH",E.Amazon="AMAZON",E.Apple="APPLE",E.Blizzard="BLIZZARD",E.DoorDash="DOOR_DASH",E.DotsEcoOceanPlastic="DOTS_ECO_OCEAN_PLASTIC",E.DotsEcoPlantTrees="DOTS_ECO_PLANT_TREES",E.DotsEcoProtectWildfires="DOTS_ECO_PROTECT_WILDFIRES",E.DotsEcoSaveTurtle="DOTS_ECO_SAVE_TURTLE",E.Fornite="FORNITE",E.GooglePlay="GOOGLE_PLAY",E.Itunes="ITUNES",E.JustEat="JUST_EAT",E.LeagueOfLegends="LEAGUE_OF_LEGENDS",E.Mastercard="MASTERCARD",E.Minecraft="MINECRAFT",E.MinecraftJavaEdition="MINECRAFT_JAVA_EDITION",E.Netflix="NETFLIX",E.Nintendo="NINTENDO",E.Paypal="PAYPAL",E.Playstation="PLAYSTATION",E.Psn="PSN",E.Roblox="ROBLOX",E.Spotify="SPOTIFY",E.Steam="STEAM",E.UberEats="UBER_EATS",E.Valorant="VALORANT",E.VirtualVisa="VIRTUAL_VISA",E.Visa="VISA",E.Xbox="XBOX",E.Zalando="ZALANDO",(S={}).Fixed="FIXED",S.Percentage="PERCENTAGE",(A={}).Available="AVAILABLE",A.Degraded="DEGRADED",A.Deprecated="DEPRECATED",A.Unavailable="UNAVAILABLE",(T={}).Persona="PERSONA",T.Veriff="VERIFF",(y={}).Date="DATE",y.FormArray="FORM_ARRAY",y.Input="INPUT",y.MultiselectCards="MULTISELECT_CARDS",y.MultiselectCardsBig="MULTISELECT_CARDS_BIG",y.RangeDollars="RANGE_DOLLARS",y.SelectCards="SELECT_CARDS",y.SelectCardsHierarchy="SELECT_CARDS_HIERARCHY",y.SelectCardsSearchable="SELECT_CARDS_SEARCHABLE",y.SelectCardsSmall="SELECT_CARDS_SMALL",y.SelectList="SELECT_LIST",y.SelectListSearchable="SELECT_LIST_SEARCHABLE",y.Textarea="TEXTAREA",(I={}).Date="DATE",I.Multiselect="MULTISELECT",I.Select="SELECT",I.Text="TEXT",(R={}).Fun="FUN",R.Profiler="PROFILER",(b={}).Completed="COMPLETED",b.Disqualified="DISQUALIFIED",b.InProgress="IN_PROGRESS",(O={}).Lost="LOST",O.Won="WON",(N={}).GameOver="GAME_OVER",N.OutOfDate="OUT_OF_DATE",N.UnsupportedLocation="UNSUPPORTED_LO
14CATION",(C={}).Cancelled="CANCELLED",C.Completed="COMPLETED",C.Failed="FAILED",C.Finished="FINISHED",C.Initiated="INITIATED",C.Started="STARTED",(k={}).High="HIGH",k.Low="LOW",k.Medium="MEDIUM",(L={}).Bet="BET",L.Lost="LOST",L.Refunded="REFUNDED",L.Won="WON",(D={}).Chance="chance",D.CompletedAt="completedAt",D.JackpotBudget="jackpotBudget";var tg=((P={}).Daily="DAILY",P.Monthly="MONTHLY",P),tv=((w={}).Coins="COINS",w.Stars="STARS",w);(F={}).Initialised="INITIALISED",F.InProgress="IN_PROGRESS",F.Lost="LOST",F.Won="WON",(U={}).X1="X1",U.X3="X3",U.X5="X5",U.X20="X20",(M={}).Count="COUNT",M.Weight="WEIGHT",(x={}).Info="INFO",x.Success="SUCCESS",x.Warning="WARNING",(G={}).Admin="ADMIN",G.Affiliate="AFFILIATE",G.AffiliateReward="AFFILIATE_REWARD",G.AffiliateSystemV2="AFFILIATE_SYSTEM_V2",G.Banfreeze="BANFREEZE",G.CampaignReward="CAMPAIGN_REWARD",G.CashoutGoalExtension="CASHOUT_GOAL_EXTENSION",G.ChallengeActive="CHALLENGE_ACTIVE",G.ChallengeAffiliate="CHALLENGE_AFFILIATE",G.Christmas2022="CHRISTMAS2022",G.Cluster="CLUSTER",G.CustomLeaderboard_1="CUSTOM_LEADERBOARD_1",G.CustomLeaderboard_2="CUSTOM_LEADERBOARD_2",G.CustomLeaderboard_3="CUSTOM_LEADERBOARD_3",G.CustomLeaderboard_4="CUSTOM_LEADERBOARD_4",G.EarlyCashoutV2="EARLY_CASHOUT_V2",G.Earnings="EARNINGS",G.Freeze="FREEZE",G.Heldings="HELDINGS",G.IdVerification="ID_VERIFICATION",G.Inventory="INVENTORY",G.Jackpot="JACKPOT",G.KycVerification="KYC_VERIFICATION",G.Leaderboard="LEADERBOARD",G.LeaderboardCustom_1="LEADERBOARD_CUSTOM_1",G.LeaderboardCustom_2="LEADERBOARD_CUSTOM_2",G.LeaderboardCustom_3="LEADERBOARD_CUSTOM_3",G.LeaderboardCustom_4="LEADERBOARD_CUSTOM_4",G.LeaderboardDaily="LEADERBOARD_DAILY",G.LeaderboardEaster="LEADERBOARD_EASTER",G.LeaderboardMonthly="LEADERBOARD_MONTHLY",G.LeaderboardWeekly="LEADERBOARD_WEEKLY",G.Oct2022="OCT2022",G.OctoberEvent="OCTOBER_EVENT",G.OfferBoost="OFFER_BOOST",G.OfferBundle="OFFER_BUNDLE",G.OfferLottery="OFFER_LOTTERY",G.OfferTaskProgress="OFFER_TASK_PROGRESS",G.PendingWithdrawal="PENDING_WITHDRAWAL",G.ReferralEvent="REFERRAL_EVENT",G.Review="REVIEW",G.
14SignupBonus="SIGNUP_BONUS",G.SpecialEvent="SPECIAL_EVENT",G.StakeDepositReward="STAKE_DEPOSIT_REWARD",G.Support="SUPPORT",G.Survey="SURVEY",G.UiMode="UI_MODE",G.UserOfferTask="USER_OFFER_TASK",G.UserPayoutStructure="USER_PAYOUT_STRUCTURE",G.Wc2022MassNotifsMatchdayFinals="WC2022_MASS_NOTIFS_MATCHDAY_FINALS",G.Wc2022MassNotifsMatchdayMatchday5="WC2022_MASS_NOTIFS_MATCHDAY_MATCHDAY5",G.Wc2022MassNotifsMatchdayMatchday6="WC2022_MASS_NOTIFS_MATCHDAY_MATCHDAY6",G.Wc2022MassNotifsMatchdayQuarterfinals="WC2022_MASS_NOTIFS_MATCHDAY_QUARTERFINALS",G.Wc2022MassNotifsMatchdayRoundof16="WC2022_MASS_NOTIFS_MATCHDAY_ROUNDOF16",G.Wc2022MassNotifsMatchdaySemifinals="WC2022_MASS_NOTIFS_MATCHDAY_SEMIFINALS",G.Withdrawal="WITHDRAWAL",G.Worldcup2022="WORLDCUP2022",G.Worldcup2022Giveaway="WORLDCUP2022_GIVEAWAY",G.Worldcup2022Giveaway_3="WORLDCUP2022_GIVEAWAY_3",(V={}).Affiliate_1StRefSignedUp="AFFILIATE_1ST_REF_SIGNED_UP",V.Affiliate_2NdRefSignedUp="AFFILIATE_2ND_REF_SIGNED_UP",V.Affiliate_3RdRefSignedUp="AFFILIATE_3RD_REF_SIGNED_UP",V.Affiliate_4ThRefSignedUp="AFFILIATE_4TH_REF_SIGNED_UP",V.Affiliate_5ThRefSignedUp="AFFILIATE_5TH_REF_SIGNED_UP",V.Affiliate_10ThRefSignedUp="AFFILIATE_10TH_REF_SIGNED_UP",V.Affiliate_100ThRefSignedUp="AFFILIATE_100TH_REF_SIGNED_UP",V.AffiliateCommissionEarned="AFFILIATE_COMMISSION_EARNED",V.AffiliateLevelRaised="AFFILIATE_LEVEL_RAISED",V.AffiliateRefSignedUp="AFFILIATE_REF_SIGNED_UP",V.AffiliateSystemV2AffiliateFirstCashoutCompleted="AFFILIATE_SYSTEM_V2_AFFILIATE_FIRST_CASHOUT_COMPLETED",V.AffiliateSystemV2AffiliateFirstOfferCompleted="AFFILIATE_SYSTEM_V2_AFFILIATE_FIRST_OFFER_COMPLETED",V.CashbackTaskUnlocked="CASHBACK_TASK_UNLOCKED",V.CashoutGoalExtension="CASHOUT_GOAL_EXTENSION",V.CustomLeaderboardUserRanked="CUSTOM_LEADERBOARD_USER_RANKED",V.DiamondCaseActivated="DIAMOND_CASE_ACTIVATED",V.EarlyCashout="EARLY_CASHOUT",V.EarlyCashoutIdVerificationCompleted="EARLY_CASHOUT_ID_VERIFICATION_COMPLETED",V.EarlyCashoutIdVerificationStarted="EARLY_CASHOUT_ID_VERIFICATION_STARTED",V.EarlyCashoutPlay_10MinutesCompleted="EARLY_CASHOUT_PLAY_10_MINUTES_COMPLETED",V.EarlyCashoutPlay_10MinutesStarted="EARLY_CASHOUT_PLAY_10_MINUTES_STARTED",V.FirstSurveyBonusActivated="FIRST_SURVEY_BONUS_ACTIVATED",V.FreeCaseChallengeCompleted="FREE_CASE_CHALLENGE_COMPLETED",V.GemRewardUserXp="GEM_REWARD_USER_XP",V.GeneralEventActivated="GENERAL_EVENT_ACTIVATED",V.IdVerificationCompleted="ID_VERIFICATION_COMPLETED",V.IdVerificationRequested="ID_VERIFICATION_REQUESTED",V.InfiniteLevelUpTaskUnlocked="INFINITE_LEVEL_UP_TASK_UNLOCKED",V.InternalSurveyAwarded="INTERNAL_SURVEY_AWARDED",V.JackpotInviteUser="JACKPOT_INVITE_USER",V.JackpotUserCompletedRegularSurvey="JACKPOT_USER_COMPLETED_REGULAR_SURVEY",V.JackpotUserReceivedFreeTickets="JACKPOT_USER_RECEIVED_FREE_TICKETS",V.KycVerificationRequested="KYC_VERIFICATION_REQUESTED",V.LeaderboardRewardsCredited="LEADERBOARD_REWARDS_CREDITED",V.LeaderboardRewardsHeld="LEADERBOARD_REWARDS_HELD",V.LeaderboardUserRanked="LEADERBOARD_USER_RANKED",V.LeaderboardUserRankedMulti="LEADERBOARD_USER_RANKED_MULTI",V.OfferBoostDecreased="OFFER_BOOST_DECREASED",V.OfferBoostIncreased="OFFER_BOOST_INCREASED",V.OfferBundleClaimedAutomatically="OFFER_BUNDLE_CLAIMED_AUTOMATICALLY",V.OfferBundleDefault="OFFER_BUNDLE_DEFAULT",V.OfferBundleGameOpen="OFFER_BUNDLE_GAME_OPEN",V.OfferBundleIapCompletionInOneGame="OFFER_BUNDLE_IAP_COMPLETION_IN_ONE_GAME",V.OfferBundleInAppCompletion="OFFER_BUNDLE_IN_APP_COMPLETION",V.OfferBundleTimeLimited="OFFER_BUNDLE_TIME_LIMITED",V.OfferCompleted="OFFER_COMPLETED",V.OfferCompletedAdRevenue="OFFER_COMPLETED_AD_REVENUE",V.OfferCompletedAdRevenueMulti="OFFER_COMPLETED_AD_REVENUE_MULTI",V.OfferCompletedAffiliate="OFFER_COMPLETED_AFFILIATE",V.OfferCompletedExpired="OFFER_COMPLETED_EXPIRED",V.OfferCompletedJackpot="OFFER_COMPLETED_JACKPOT",V.OfferCompletedLevelUp="OFFER_COMPLETED_LEVEL_UP",V.OfferCompletedSession="OFFER_COMPLETED_SESSION",V.OfferCompletedSessionMulti="OFFER_COMPLETED_SESSION_MULTI",V.OfferLotteryEarnedFirstTickets="OFFER_LOTTERY_EARNED_FIRST_TICKETS",V.OfferLotteryUserWon="OFFER_LOTTERY_USER_WON",V.OfferReleased="OFFER_RELEASED",V.OfferReleaseScheduled="OFFER_RELEASE_SCHEDULED",V.OfferReleaseScheduledOld="OFFER_RELEASE_SCHEDULED_OLD",V.OfferStarted="OFFER_STARTED",V.OfferTaskCompleted="OFFER_TASK_COMPLETED",V.PurchaseCashbackSumNotification="PURCHASE_CASHBACK_SUM_NOTIFICATION",V.Referral_1StOfferCoins="REFERRAL_1ST_OFFER_COINS",V.Referral_1StOfferJackpotCases="REFERRAL_1ST_OFFER_JACKPOT_
14CASES",V.Referral_1StPopupGetCoins="REFERRAL_1ST_POPUP_GET_COINS",V.Referral_1StPopupGetJackpotCases="REFERRAL_1ST_POPUP_GET_JACKPOT_CASES",V.ReferralEventUnlocked="REFERRAL_EVENT_UNLOCKED",V.ReferralOfferTaskReward="REFERRAL_OFFER_TASK_REWARD",V.SupportResponded="SUPPORT_RESPONDED",V.SurveyDisqualified="SURVEY_DISQUALIFIED",V.TopTierTasksUnlocked="TOP_TIER_TASKS_UNLOCKED",V.UnlimitedTasksUnlocked="UNLIMITED_TASKS_UNLOCKED",V.UserBlocked="USER_BLOCKED",V.UserOfferTaskReactivated="USER_OFFER_TASK_REACTIVATED",V.UserRewardedFromCampaign="USER_REWARDED_FROM_CAMPAIGN",V.UserUiModeChanged="USER_UI_MODE_CHANGED",V.UserUnblocked="USER_UNBLOCKED",V.WithdrawalApproved="WITHDRAWAL_APPROVED",V.WithdrawalApprovedPaypal="WITHDRAWAL_APPROVED_PAYPAL",V.WithdrawalRejected="WITHDRAWAL_REJECTED",V.WithdrawalSent="WITHDRAWAL_SENT",V.WithdrawalSentEmail="WITHDRAWAL_SENT_EMAIL",(B={}).Popup="POPUP",B.Tray="TRAY",(H={}).CanClaim="CAN_CLAIM",H.Claimed="CLAIMED",H.NotStarted="NOT_STARTED",H.Pending="PENDING",H.Started="STARTED",(q={}).GameCompletion="GAME_COMPLETION",q.GameOpen="GAME_OPEN",q.IapCompletion="IAP_COMPLETION",q.IapCompletionInOneGame="IAP_COMPLETION_IN_ONE_GAME",q.OfferInstall="OFFER_INSTALL",q.TimeLimit="TIME_LIMIT",(W={}).Game="GAME",W.Other="OTHER",(K={}).CashoutPage="CASHOUT_PAGE",K.FeaturedOffers="FEATURED_OFFERS",K.GameCategory="GAME_CATEGORY",K.IapIncentiveModal="IAP_INCENTIVE_MODAL",K.IosV2="IOS_V2",K.Jackpot="JACKPOT",K.Lite="LITE",K.LiteModePreviouslyInstalledGame="LITE_MODE_PREVIOUSLY_INSTALLED_GAME",K.LiteOtherTab="LITE_OTHER_TAB",K.LiteShowNewGame="LITE_SHOW_NEW_GAME",K.LiteSingleOfferMode="LITE_SINGLE_OFFER_MODE",K.MyOffers="MY_OFFERS",K.MyProfile="MY_PROFILE",K.Notifications="NOTIFICATIONS",K.OffersCategoryPage="OFFERS_CATEGORY_PAGE",K.OfferPage="OFFER_PAGE",K.ReactivationPopup="REACTIVATION_POPUP",K.RecommendedOffersSection="RECOMMENDED_OFFERS_SECTION",K.Select_4OffersFirstStart="SELECT_4_OFFERS_FIRST_START",K.Troubleshoot="TROUBLESHOOT",K.UserProfile="USER_PROFILE",K.VideoReel="VIDEO_REEL",(j={}).Completed="COMPLETED",j.PartiallyCompleted="PARTIALLY_COMPLETED",(Y={}).Offer="OFFER",Y.Survey="SURVEY",Y.Video="VIDEO",($={}).HighestReward="HIGHEST_REWARD",$.Quickest="QUICKEST",$.Recommended="RECOMMENDED",$.TopRated="TOP_RATED",(Q={}).Clicked="CLICKED",Q.Credited="CREDITED",Q.Expired="EXPIRED",Q.NotStarted="NOT_STARTED",Q.PartiallyCompleted="PARTIALLY_COMPLETED",Q.Pending="PENDING",Q.TicketDeclined="TICKET_DECLINED",Q.TicketOpened="TICKET_OPENED",(J={}).CreateTicket="CREATE_TICKET",J.MinimumReportingTime="MINIMUM_REPORTING_TIME",J.RequestInReview="REQUEST_IN_REVIEW",(z={}).ApprovedByProvider="APPROVED_BY_PROVIDER",z.Created="CREATED",z.Pending="PENDING",z.Queued="QUEUED",z.RejectedByFreecash="REJECTED_BY_FREECASH",z.RejectedByProvider="REJECTED_BY_PROVIDER",(X={}).HasInstallEvents="HAS_INSTALL_EVENTS",X.HasPurchaseEvents="HAS_PURCHASE_EVENTS",X.HasSessionEvents="HAS_SESSION_EVENTS",X.HighVolumeCpi="HIGH_VOLUME_CPI",(Z={}).Coin="COIN",Z.CoinWheel="COIN_WHEEL",Z.GiftCard="GIFT_CARD",(ee={}).AdRevenue="AD_REVENUE",ee.BurningRewards="BURNING_REWARDS",ee.DailyOpenAppBonusReward="DAILY_OPEN_APP_BONUS_REWARD",ee.DistinctDayLevelUpCount="DISTINCT_DAY_LEVEL_UP_COUNT",ee.DistinctDayPurchaseCount="DISTINCT_DAY_PURCHASE_COUNT",ee.ExtendedExpiry="EXTENDED_EXPIRY",ee.FirstDayOpenApp="FIRST_DAY_OPEN_APP",ee.InfiniteCompletions="INFINITE_COMPLETIONS",ee.InfiniteLevelUp="INFINITE_LEVEL_UP",ee.PurchaseBonusReward="PURCHASE_BONUS_REWARD",ee.RewardPerXLevelUps="REWARD_PER_X_LEVEL_UPS",ee.TimeLimit="TIME_LIMIT",(et={}).Aborted="ABORTED",et.Completed="COMPLETED",et.Skipped="SKIPPED",(en={}).Asc="ASC",en.Desc="DESC",(er={}).Asc="ASC",er.Desc="DESC",(ei={}).Android="ANDROID",ei.Desktop="DESKTOP",ei.Ios="IOS",(ea={}).Cashout="CASHOUT",ea.Earnings="EARNINGS",ea.OfferCompleted="OFFER_COMPLETED",ea.StreakClaimed="STREAK_CLAIMED",(eo={}).Aud="AUD",eo.Eur="EUR",eo.Usd="USD",(es={}).NotCompleted="NOT_COMPLETED",es.Sharable="SHARABLE",es.Unavailable="UNAVAILABLE",(el={}).AvgEarnedYesterday="AVG_EARNED_YESTERDAY",el.CoinsEarnedTotal="COINS_EARNED_TOTAL",el.CoinsWithdrawnYesterday="COINS_WITHDRAWN_YESTERDAY",el.TasksCompletedTotal="TASKS_COMPLETED_TOTAL",el.UsersRegisteredLast_24H="USERS_REGIST
14ERED_LAST_24H",el.UsersRegisteredTotal="USERS_REGISTERED_TOTAL",(eu={}).GemSlot="GEM_SLOT",eu.JackpotCase="JACKPOT_CASE",(ec={}).Case="CASE",ec.Combined="COMBINED",ec.Offer="OFFER",ec.RetentionCase="RETENTION_CASE",ec.Survey="SURVEY",(ed={}).StakeCom="STAKE_COM",ed.StakeUs="STAKE_US",(ep={}).Bronze="bronze",ep.Gold="gold",ep.Silver="silver",(ef={}).Coins="COINS",ef.Slot="SLOT",(eh={}).BadSurvey="BAD_SURVEY",eh.Other="OTHER",eh.TechnicalIssue="TECHNICAL_ISSUE",eh.TooPersonal="TOO_PERSONAL",(eg={}).Date="DATE",eg.Multiselect="MULTISELECT",eg.Number="NUMBER",eg.Select="SELECT",eg.Text="TEXT",(ev={}).Featured="FEATURED",ev.Lite="LITE",ev.OfferLite="OFFER_LITE",ev.Page="PAGE",ev.WallEarn="WALL_EARN",ev.WallSurvey="WALL_SURVEY",(e_={}).Affiliates="AFFILIATES",e_.Arcade="ARCADE",e_.Leaderboard="LEADERBOARD",e_.Offers="OFFERS",e_.StreakAndLadder="STREAK_AND_LADDER",(em={}).AlmediaSurvey="ALMEDIA_SURVEY",em.BitLabs="BIT_LABS",em.Cpx="CPX",em.FreecashSurveys="FREECASH_SURVEYS",em.Lucid="LUCID",em.PrimeSurveys="PRIME_SURVEYS",em.YourSurveys="YOUR_SURVEYS",(eE={}).Exclusive="EXCLUSIVE",eE.Featured="FEATURED",eE.HighPaying="HIGH_PAYING",eE.Premium="PREMIUM",eE.Questionnaire="QUESTIONNAIRE",eE.Short="SHORT",eE.Trending="TRENDING",(eS={}).Claimable="CLAIMABLE",eS.Claimed="CLAIMED",eS.Completed="COMPLETED",eS.Declined="DECLINED",eS.InProgress="IN_PROGRESS",eS.NotStarted="NOT_STARTED",eS.Pending="PENDING",(eA={}).Day="DAY",eA.Month="MONTH",eA.Week="WEEK",(eT={}).Claimable="CLAIMABLE",eT.Claimed="CLAIMED",eT.Pending="PENDING",eT.Rejected="REJECTED",(ey={}).Coins="COINS",ey.JackpotCase="JACKPOT_CASE",(eI={}).AlreadyInstalled="ALREADY_INSTALLED",eI.NotLikedOffer="NOT_LIKED_OFFER",(eR={}).AffiliateAppinstall="AFFILIATE_APPINSTALL",eR.AffiliateCashout="AFFILIATE_CASHOUT",eR.AffiliateReward="AFFILIATE_REWARD",eR.AppOpenOfferBundle="APP_OPEN_OFFER_BUNDLE",eR.BonusCode="BONUS_CODE",eR.BonusLadder="BONUS_LADDER",eR.CampaignReward="CAMPAIGN_REWARD",eR.ChristmasRaffle="CHRISTMAS_RAFFLE",eR.DailyBonus="DAILY_BONUS",eR.DownloadApp="DOWNLOAD_APP",eR.EarlyCashoutBonus="EARLY_CASHOUT_BONUS",eR.EarlyCashoutV2Bonus="EARLY_CASHOUT_V2_BONUS",eR.EmailGdprConsent="EMAIL_GDPR_CONSENT",eR.Event="EVENT",eR.FirstCompletion="FIRST_COMPLETION",eR.FirstPurchase="FIRST_PURCHASE",eR.FirstWithdraw="FIRST_WITHDRAW",eR.FiveSurveys="FIVE_SURVEYS",eR.FollowTwitter="FOLLOW_TWITTER",eR.FreeCase="FREE_CASE",eR.IapCompletionOfferBundle="IAP_COMPLETION_OFFER_BUNDLE",eR.IosShortcut="IOS_SHORTCUT",eR.JackpotCase="JACKPOT_CASE",eR.Leaderboard="LEADERBOARD",eR.OfferBundle="OFFER_BUNDLE",eR.OfferCompletedOfferBundle="OFFER_COMPLETED_OFFER_BUNDLE",eR.OfferLottery="OFFER_LOTTERY",eR.Other="OTHER",eR.PhoneGdprConsent="PHONE_GDPR_CONSENT",eR.PushGdprConsent="PUSH_GDPR_CONSENT",eR.Quest="QUEST",eR.Signup="SIGNUP",eR.SignupBonus="SIGNUP_BONUS",eR.Special="SPECIAL",eR.StakeDepositReward="STAKE_DEPOSIT_REWARD",eR.Streak="STREAK",eR.StreakV2="STREAK_V2",eR.Survey="SURVEY",eR.Tips="TIPS",eR.Tutorial="TUTORIAL",eR.WithdrawRevolut="WITHDRAW_REVOLUT",eR.Wordle="WORDLE",(eb={}).GoldVip="GOLD_VIP",eb.PlatinumVip="PLATINUM_VIP",eb.SmsSupport="SMS_SUPPORT",eb.Tier_0="TIER_0",eb.Vip="VIP",(eO={}).Offer="OFFER",eO.Survey="SURVEY",(eN={}).Aud="AUD",eN.Bch="BCH",eN.Brl="BRL",eN.Btc="BTC",eN.Cad="CAD",eN.Chf="CHF",eN.Dkk="DKK",eN.Doge="DOGE",eN.Eos="EOS",eN.Eth="ETH",eN.Eur="EUR",eN.Gbp="GBP",eN.Hkd="HKD",eN.Inr="INR",eN.Ltc="LTC",eN.Nok="NOK",eN.Pln="PLN",eN.Sek="SEK",eN.Sgd="SGD",eN.StakeCash="StakeCash",eN.Trx="TRX",eN.Usd="USD",eN.Usdc="USDC",eN.Usdt="USDT",eN.Xrp="XRP",(eC={}).Airtm="AIRTM",eC.Blockcypher="BLOCKCYPHER",eC.Blockio="BLOCKIO",eC.Coinbase="COINBASE",eC.Faucetpay="FAUCETPAY",eC.Fireblocks="FIREBLOCKS",eC.Paypal="PAYPAL",eC.Prepaidforge="PREPAIDFORGE",eC.Revolut="REVOLUT",eC.RevolutUs="REVOLUT_US",eC.Stake="STAKE",eC.StakeUs="STAKE_US",eC.Stash="STASH",eC.Tango="TANGO",eC.TangoUs="TANGO_US",eC.Tremendous="TREMENDOUS",eC.Waxpeer="WAXPEER",(ek={}).ApproveInProgress="APPROVE_IN_PROGRESS",ek.Confirmed="CONFIRMED",ek.Failed="FAILED",ek.Initiated="INITIATED",ek.ModPending="MOD_PENDING",ek.Pending="PENDING",ek.PossiblyFailed="POSSIBLY_FAILED",ek.ProcessInProgress="PROCESS_IN_PROGRESS",ek.Requested="REQUESTED",ek.Scheduled="SCHEDULED",ek.Sent="SENT",(eL={}).Ach="ACH",eL.Airtm="AIRTM",eL.Amazon="AMAZON",eL.Apple="APPLE",eL.Blizzard="BLIZZARD",eL.Coinbase="COINBASE",eL.Crypto="CRYPTO",eL.Csgo="CSGO",eL.Doordash="DOORDASH",eL.DotsEcoOceanPlastic="DOTS_ECO_OCEAN_PLASTIC",eL.DotsEcoPlantTrees="DOTS_ECO_PLANT_TREES",eL.DotsEcoProtectWildfires="DOTS_ECO_PROTECT_WILDFIRES",eL.DotsEcoSaveTurtle="DOTS_ECO_SAVE_TURTLE",eL.Faucetpay="FAUCETPAY",eL.Fortnite="FORTNITE",eL.GooglePlay="GOOGLE_PLAY",eL.JustEat="JUST_EAT",eL.LeagueOfLegends="LEAGUE_OF_LEGENDS",eL.Mastercard="MASTERCARD",eL.Minecraft="MINECRAFT",eL.Netflix="NETFLIX",eL.Nintendo="NINTENDO",eL.Paypal="PAYPAL",eL.Playstation="PLAYSTATION",eL.Psn="PSN",eL.Revolut="REVOLUT",eL.Roblox="ROBLOX",eL.Spotify="SPOTIFY",eL.Stake="STAKE",eL.Stash="STASH",eL.Steam="STEAM",eL.Tango="TANGO",eL.UberEats="UBER_EATS",eL.Valorant="VALORANT",eL.Visa="VISA",eL.Xbox="XBOX",eL.Zalando="ZALANDO",(eD={}).Correct="CORRECT",eD.Misplaced="MISPLACED",eD.Wrong="WRONG",e.s(["AvailableCurrencies",()=>tf,"CountryCode",()=>th,"LeaderboardPeriod",()=>tg,"LeaderboardSource",()=>tv],666354);class t_{app;constructor(e={}){this.app=e.app}async request(e,t){if(!this.app)throw Error("App is not defined");
14return this.app.post("/fc-api/graphql",JSON.stringify({query:e,variables:t}))}async requestOnce(e,t,n){let r=this.app;if(!r)throw Error("App is not defined");let i=JSON.stringify(e),a=r.cache.get(i);if(a)return a;let o=r.post("/fc-api/graphql",JSON.stringify({query:t,variables:n})).then(e=>(r.cache.set(i,e),e)).catch(e=>{throw r.cache.delete(i),e});return r.cache.set(i,o),o}}class tm{graphql;constructor(e){this.graphql=e}getEarnFeed(e=th.All){return this.graphql.request(` 15 query getEarnFeed($limit: Int = 10, $countryCode: CountryCode = ALL) { 16 findEarnActivityFeed(countryCode: $countryCode, limit: $limit) { 17 items { 18 gainId 19 offername 20 coins 21 bonus 22 date 23 wall 24 username 25 avatar 26 countryCode 27 type 28 } 29 } 30 } 31 `,{limit:10,countryCode:e})}getWithdrawalsFeed(e=th.All){return this.graphql.request(` 32 query getWithdrawalFeed($limit: Int = 10, $countryCode: CountryCode = ALL) { 33 findWithdrawActivityFeed(countryCode: $countryCode, limit: $limit) { 34 items { 35 gainId 36 withdrawType 37 coins 38 bonus 39 date 40 username 41 type 42 avatar 43 countryCode 44 } 45 } 46 } 47 `,{limit:10,countryCode:e})}getWithdrawnCoinsByMonth(){return this.graphql.request(` 48 query getWithdrawnCoinsByMonth { 49 getWithdrawnCoinsByMonth 50 } 51 `)}getFullActivityFeed(e=th.All){return this.graphql.request(` 52 query getFullActivityFeed($limit: Int = 10, $countryCode: CountryCode = ALL) { 53 findWithdrawActivityFeed(countryCode: $countryCode, limit: $limit) { 54 items { 55 gainId 56 withdrawType 57 coins 58 bonus 59 date 60 username 61 type 62 avatar 63 countryCode 64 } 65 } 66 findEarnActivityFeed(countryCode: $countryCode, limit: $limit) { 67 items { 68 gainId 69 offername 70 coins 71 bonus 72 date 73 wall 74 username 75 avatar 76 countryCode 77 type 78 } 79 } 80 } 81 `,{limit:10,countryCode:e})}}class tE{graphql;constructor(e){this.graphql=e}getAllAvailableLeaderboards({source:e=tv.Coins}){return this.graphql.request(` 82 query { 83 dailyLeaderboardInfo: leaderboardInfo(period: DAILY, source: ${e}) { 84 endDate 85 reward 86 } 87 monthlyLeaderboardInfo: leaderboardInfo(period: MONTHLY, source: ${e}) { 88 endDate 89 reward 90 } 91 } 92 `,{source:e}).then(e=>(e.data.dailyLeaderboardInfo.period=tg.Daily,e.data.dailyLeaderboardInfo.source=tv.Coins,e.data.monthlyLeaderboardInfo.period=tg.Monthly,e.data.monthlyLeaderboardInfo.source=tv.Coins,e))}getLeaderboardItems({period:e,source:t,limit:n,page:r}){return this.graphql.request(` 93 query { 94 leaderboardItems(period: ${e}, source: ${t}, limit: ${n}, page: ${r}) { 95 items { 96 rank 97 reward 98 score 99 user { 100 avatar 101 gainId 102 username 103 } 104 } 105 meta { 106 currentPage 107 itemsCount 108 itemsPerPage 109 totalItemsCount 110 totalPages 111 } 112 } 113 }`,{period:e,source:t,limit:n,page:r})}getSelfRanking(e,t){return this.graphql.request(` 114 query { 115 leaderboardRank(period: ${e}, source: ${t}) { 116 rank 117 score 118 reward 119 user { 120 gainId 121 username 122 avatar 123 } 124 } 125 } 126 `,{period:e,source:t})}}class tS{graphql;constructor(e){this.graphql=e}getOfferCategoriesInfo(){return this.graphql.request(` 127 query GetCategories { 128 getOfferCategoriesInfo { 129 name 130 offerCount 131 } 132 }`)}getOffer({slug:e,id:t},n){return this.graphql.request(` 133 query getOffer($slug: String, $id: Int, $source: GetOfferSourceIn
133put) { 134 getOffer(slug: $slug, id: $id, source: $source) { 135 category 136 coins 137 description 138 id 139 gameId 140 boost { 141 level 142 multiplier 143 } 144 images { 145 url 146 } 147 isAndroid 148 isDesktop 149 isIos 150 enabledInLiteMode 151 name 152 popularity 153 requirements 154 slug 155 start { 156 completedAt 157 startedAt 158 status 159 id 160 } 161 status 162 tasks { 163 alwaysDisplay 164 coins 165 id 166 isInstallTask 167 maxCompleteDays 168 offerId 169 priority 170 requirementValue 171 hint 172 status { 173 releaseOn 174 completedAt 175 status 176 progress { 177 value 178 } 179 completionCount 180 coinsEarned 181 lastCompletionDate 182 } 183 maxCompletions 184 title 185 type 186 assignedAt 187 payoutStructureId 188 updatedAt 189 coolDownMinutes 190 } 191 thumbnail 192 thumbnailLarge 193 token 194 url 195 wallName 196 countries 197 is21ConsentRequired 198 game { 199 id, 200 name, 201 ratings { 202 android { 203 reviewsCount 204 score 205 } 206 ios { 207 reviewsCount 208 score 209 } 210 } 211 } 212 } 213 } 214 `,{slug:e,id:t,source:n})}getOfferSupportTasks({id:e}){return this.graphql.request(` 215 query getOffer($id: Int) { 216 getOffer(id: $id) { 217 id 218 tasks { 219 id 220 coins 221 title 222 status { 223 status 224 } 225 supportTicket { 226 status 227 createdAt 228 } 229 } 230 } 231 } 232 `,{id:e})}hasCompletedOffer(){return this.graphql.request(` 233 query HasCompletedOffer { 234 hasCompletedOffer 235 }`)}getUserInstalledGames(){return this.graphql.request(` 236 query GetUserInstalledGames { 237 getUserInstalledGames { 238 id, 239 androidId 240 } 241 }`)}getOffers(e){let{ignoreReportingEmptyResults:t,...n}=e;return this.graphql.request(` 242 query getOffers( 243 $limit: Int, 244 $page: Int, 245 $category: OfferCategory, 246 $isAndroid: Boolean, 247 $isIos: Boolean, 248 $isDesktop: Boolean, 249 $searchTerm: String, 250 $sort: GetOffersSort!, 251 $is21Consent: Boolean, 252 $isSkipUserClickedOffers: Boolean, 253 $tag: OfferTagEnum 254 ) { 255 getOffers( 256 limit: $limit, 257 page: $page, 258 category: $category, 259 isAndroid: $isAndroid, 260 isIos: $isIos, 261 isDesktop: $isDesktop, 262 searchTerm: $searchTerm, 263 sort: $sort, 264 is21Consent: $is21Consent, 265 isSkipUserClickedOffers: $isSkipUserClickedOffers, 266 tag: $tag 267 ) { 268 items { 269 id 270 name 271 slug 272 gameId 273 description 274 thumbnail 275 thumbnailLarge 276 isAndroid 277 isDesktop 278 isIos 279 category 280 coins 281 status 282 token 283 is21ConsentRequired 284 images { 285 url 286 } 287 game { 288 id, 289 name, 290 ratings { 291 android { 292 reviewsCount 293 score 294 } 295 ios { 296 reviewsCount 297 score 298 } 299 } 300 } 301 } 302 meta { 303 itemCount 304 totalItems 305 totalPages 306 itemsPerPage 307 currentPage 308 } 309 } 310 } 311 `,n).then(n=>{if(t)return n;let r=e?.page===1,i=!e?.searchTerm,a="data"in n&&n?.data?.getOffers?.items?.length===0&&r&&i,o="errors"in n&&
311(n?.errors?.length||0)>0;if((a||o)&&window.gainid){let t=`getOffers returns ${o?"error":"empty"}`;window.Sentry?.captureException?.(Error(t),{fingerprint:[t],extra:{variables:JSON.stringify(e),response:JSON.stringify(n),country:window.countryHeader}})}return n})}sendOfferOpenedEvent({slug:e,id:t},n){return this.graphql.request(` 312 query getOffer($slug: String, $id: Int, $source: GetOfferSourceInput) { 313 getOffer(slug: $slug, id: $id, source: $source) { 314 id 315 } 316 } 317 `,{slug:e,id:t,source:n})}getMultipleOffers(e){return Promise.all(e.map(e=>this.getOffer({id:e}))).then(e=>e.filter(e=>e?.data?.getOffer).map(e=>e?.data?.getOffer))}getMyOffers(e){return this.graphql.request(` 318 query getMyOffers( 319 $clicked: Boolean, 320 $hideNotStartedAfterMin: Float, 321 $limit: Int, 322 $page: Int, 323 $startStatuses: [OfferClickStatus!], 324 $includeExpired: Boolean 325 ) { 326 getMyOffers( 327 clicked: $clicked, 328 hideNotStartedAfterMin: $hideNotStartedAfterMin, 329 limit: $limit, 330 page: $page, 331 startStatuses: $startStatuses, 332 includeExpired: $includeExpired 333 ) { 334 items { 335 id 336 name 337 slug 338 description 339 thumbnail 340 thumbnailLarge 341 isAndroid 342 isDesktop 343 isIos 344 category 345 coins 346 gameId 347 tags 348 boost { 349 level 350 multiplier 351 } 352 start { 353 completedAt 354 startedAt 355 status 356 lastActivity 357 } 358 tasks { 359 alwaysDisplay 360 coins 361 id 362 isInstallTask 363 maxCompleteDays 364 offerId 365 priority 366 requirementValue 367 hint 368 maxCompletions 369 title 370 type 371 } 372 } 373 meta { 374 itemCount 375 totalItems 376 totalPages 377 itemsPerPage 378 currentPage 379 } 380 } 381 } 382 `,e)}getMyOffersCount(e,t,n,r){let i="string"==typeof t?` 383 start { 384 completedAt 385 startedAt 386 status 387 lastActivity 388 } 389 `:"",a=r?` 390 tasks { 391 type 392 } 393 `:"";return this.graphql.request(` 394 query getMyOffers( 395 $clicked: Boolean, 396 $hideNotStartedAfterMin: Float, 397 $limit: Int, 398 $page: Int, 399 $startStatuses: [OfferClickStatus!], 400 $includeExpired: Boolean 401 ) { 402 getMyOffers( 403 clicked: $clicked, 404 hideNotStartedAfterMin: $hideNotStartedAfterMin, 405 limit: $limit, 406 page: $page, 407 startStatuses: $startStatuses, 408 includeExpired: $includeExpired 409 ) { 410 items { 411 id 412 ${n?"gameId":""} 413 ${i} 414 ${a} 415 } 416 meta { 417 totalItems 418 } 419 } 420 } 421 `,e)}getMyOffersForProfilePageInProgressTab(e){return this.graphql.request(` 422 query getMyOffers( 423 $limit: Int, 424 $page: Int, 425 ) { 426 getMyOffers( 427 limit: $limit, 428 page: $page, 429 ) { 430 items { 431 id 432 name 433 slug 434 thumbnail 435 coins 436 wallName 437 start { 438 id 439 deviceType 440 } 441 support { 442 minHoursToReport 443 status 444 } 445 } 446 meta { 447 itemCount 448 totalItems 449 totalPages 450 itemsPerPage 451 currentPage 452 } 453 } 454 } 455 `,e)}}class tA{app;buffer=[];trackedPayloads=[];debounceFlushBuffer;constructor(e={}){this.app=e.app,this.debounceFlushBuffer=(0,tn.default)(this.flushBuffer.bind(this),1e3)}flushBuffer(){this.app&&this.buffer.length>0&&"true"===eF.default.env.REACT_APP_TRACK_USER_EVENTS&&(this.app.post("/fc-api/user-events",JSON.stringify({events:this.buffer})),this.buffer=[])}trackOfferViewed(e){e.timestamp=new Date().getTime(),!this.trackedPayloads.some(t=>t.offerId===e.offerId&&t.source===e.source&&t.position===e.position&&t.gameId===e.gameId&&t.thumbnailLarge===e.thumbnailLarge&&t.thumbnail===e.thumbnail)&&this.app&&(this.trackedPayloads.push(e),this.buffer.push({payload:e,type:"offer_viewed"}),this.debounceFlushBuffer())}trackOfferInteracted(e){e.timestamp=new Date().getTime(),!this.trackedPayloads.some(t=>t.offerId===e.offerId&&t.source===e.source&&t.position===e.position&&t.category===e.category&&t.thumbnail===e.thumbnail&&t.thumbnailLarge===e.thumbnailLarge&&t.target===e.target)&&this.app&&(this.trackedPayloads.push(e),this.buffer.push({payload:e,type:"offer_interacted"}),this.debounceFlushBuffer())}}class tT{graphql;constructor(e){this.graphql=e}getOfferTaskCompletions(e){return this.graphql.request(`query getOfferTaskCompletions( 456 $page: Int, 457 $limit: Int, 458 $isHeld: Boolean, 459 $wall: String 460 ) { 461 getOfferTaskCompletions( 462 page: $page, 463 limit: $limit, 464 isHeld: $isHeld, 465 wall: $wall, 466 ) { 467 items{ 468 id 469 coins 470 isHeld 471 name 472 releaseAt 473 completedAt 474 isChargebacked 475 offer{ 476 name 477 coins 478 thumbnail 479 wallName 480 slug 481 status 482 } 483 } 484 meta{ 485 itemsCount 486 totalPages 487 itemsPerPage 488 currentPage 489 } 490 } 491 }`,e)}}class ty{graphql;constructor(e){this.graphql=e}markUserHiddenOffer(e){return this.graphql.request(` 492 mutation MarkUserHiddenOffer($offerId: Int!, $reason: UserHiddenOfferReason) { 493 markUserHiddenOffer(offerId: $offerId, reason: $reason) 494 } 495 `,e)}}let tI=` 496 gender 497 ageGroup 498 emailConsentProvided 499 smsConsentProvided 500 doubleOptInProvided 501 pushNotificationConsentProvided 502 canRefer 503`;class tR{graphql;constructor(e){this.graphql=e}get(){return this.graphql.request(` 504 query GetUserProfile { 505 getUserProfile { 506 ${tI} 507 } 508 } 509 `)}update(e){return this.graphql.request(` 510 mutation updateUserProfile($gender: Gender, $ageGroup: AgeGroup) { 511 updateUserProfile(gender: $gender, ageGroup: $ageGroup) { 512 ${tI} 513 } 514 } 515 `,e)}}class tb{app;url="/fc-api/auth";constructor(e={}){this.app=e.app}async googleOneTap(e){if(!this.app)throw Error("App is not defined");this.app.post(`${this.url}/google/one-tap`,JSON.stringify({credential:e}))}async attachCredentials(e){if(!this.app)throw Error("App is not defined");return this.app.post(`${this.url}/attach-credentials`,JSON.stringify(e))}}let tO=new class extends tp{graphql;leaderboard;offers;offerTaskCompletions;userEventTracking;activityFeed;userHiddenOffer;userProfile;authResource;
515constructor(e){super(e),this.graphql=new t_({app:this.app}),this.leaderboard=new tE(this.graphql),this.offers=new tS(this.graphql),this.userEventTracking=new tA({app:this.app}),this.activityFeed=new tm(this.graphql),this.offerTaskCompletions=new tT(this.graphql),this.userHiddenOffer=new ty(this.graphql),this.userProfile=new tR(this.graphql),this.authResource=new tb({app:this.app})}}(`${eF.default.env.REACT_APP_API_URL||""}/academy`);e.s(["default",0,tO],892251)},334622,709483,e=>{"use strict";e.i(247167);var t,n=e.i(271645),r=e.i(807939),i=e.i(304868),a=e.i(738003),o=e.i(23370),s=e.i(95786),l=e.i(576511),u=e.i(169707),c=e.i(899499),d=e.i(456634),p=e.i(660872),f=e.i(863357);e.i(243083),e.i(913996),e.i(780570),e.i(890526),(0,e.i(840731).graphql)(` 516 query getSignupSourceInfo { 517 me { 518 signupSource { 519 referrerRefcode 520 campaignName 521 campaignProvider 522 dateJoined 523 } 524 } 525 } 526`);var h=e.i(618566),g=e.i(345425);e.i(184102);var v=e.i(594341),_=e.i(161777),m=((t={}).SHARE_OFFER_SLUG="fc-ref-offer-slug",t.HAS_SHOWN_CASHOUT_GOAL_MODAL="fc-hasShownCashoutGoalModal",t.RECURRING_POPUPS_COOLDOWN_INFO="fc-recurring-popups-cooldown-info",t.RECURRING_POPUPS_COUNTDOWN_INFO="fc-recurring-popups-countdown-info",t.SIGNUP_BONUS_REWARD_GRANTED="fc-signup-bonus-reward-granted",t.DEVICE_SELECTION_OPENED_AT="fc-device-selection-opened-at",t.LAST_DEVICE_SELECTION_TIME="fc-last-device-selection-time",t.HAS_CLICKED_APP_REVIEW_CTA="fc-hasClickedAppReviewCTA",t.USER_WITHDRAWAL="fc-userWithdrawal",t.USER_IAP_COMPLETED="fc-user-iap-completed",t.USER_COMPLETED_OFFERS_COUNT="fc-userCompletedOffersCount",t.DOWNLOAD_APP_TIMER="fc-download-app-timer",t.SURVEY_PROFILER_COMPLETED="profilerCompleted",t.PREMIUM_OFFER_SHOWN="premiumLiteOffersShown",t.ZERO_FAKE_IS_ACTIVE="surveyPremiumIsActive",t.PREMIUM_OFFER_SESSION_REMINDER_SHOWN="premiumOfferSessionReminderShown",t.LAST_SEEN_MY_OFFER_IDS="fc-last-seen-my-offer-ids",t.SIGNUP_BONUS_ENABLED="signupBonusEnabled",t.SURVEY_PAGE_FOR_OFFER_LITE_ENABLED="survey-page-for-offer-lite-enabled",t.OFFER_CATEGORY_TOGGLE_VALUE="fc-offer-category-toggle-value",t.FIRST_OFFER_START_TIME="fc-first-offer-start-time",t.VIDEO_TAP_GUIDE="fc-video-tap-guide",t.REWARD_FAILED_GAME_OFFERS="fc-reward-failed-game-offers",t.CASHOUT_BAR_CONGRATS_POPUP="fc-cashout-bar-congrats-popup",t.AFFILIATE_REWARDS_POPUP_SHOWN_TIMESTAMP="fc-affiliate-rewards-popup-shown-timestamp",t.AFFILIATE_REWARDS_POPUP_FEATURE_SHOWN="fc-affiliate-rewards-popup-feature-shown",t.TIMED_PRESSURE_POPUP_SHOWN_TIMESTAMP="fc-timed-pressure-popup-shown-timestamp",t.USER_INSTALLED_GAME_OFFERS="fc-user-installed-game-offers",t.SURVEY_LITE_ADVANCED_LEVELS_LEVEL="fc-levels-number",t.ALL_QUESTS_SNAPSHOT="fc-all-quests-snapshot",t.QUEST_OFFER_BUNDLE_SNAPSHOT="fc-quest-offer-bundle-snapshot",t.QUEST_STREAK_SNAPSHOT="fc-quest-streak-snapshot",t.QUEST_STREAK_V2_SNAPSHOT="fc-quest-streak-v2-snapshot",t.QUEST_BONUS_LADDER_SNAPSHOT="fc-quest-bonus-ladder-snapshot",t.QUEST_FIRST_PURCHASE_REWARD_SNAPSHOT="fc-quest-first-purchase-reward-snapshot",t.QUEST_REACTIVATION_OPEN_POPUP_SNAPSHOT="fc-quest-reactivation-open-popup-snapshot",t.QUEST_REACTIVATION_IAP_POPUP_SNAPSHOT="fc-quest-reactivation-iap-popup-snapshot",t.QUEST_REACTIVATION_INSTALLS_POPUP_SNAPSHOT="fc-quest-reactivation-installs-popup-snapshot",t.QUEST_AFFILIATES_SNAPSHOT="fc-quest-affiliates-snapshot",t.QUEST_MARKETING_EMAIL_SNAPSHOT="fc-quest-marketing-email-snapshot",t.QUEST_PHONE_NUMBER_SNAPSHOT="fc-quest-phone-number-snapshot",t.QUEST_WORDLE_SNAPSHOTS="fc-quest-wordle-snapshots",t.QUEST_PUSH_NOTIFICATION_SNAPSHOT="fc-quest-push-notification-snapshot",t.QUEST_IOS_SHORTCUT_SNAPSHOT="fc-quest-ios-shortcut-snapshot",t.QUEST_LOGIN_ANDROID_APP_SNAPSHOT="fc-quest-login-android-app-snapshot",t.NOTIFICATION_AMPLITUDE_EVENTS_SENT="fc-notification-amplitude-event-sent",t.IS_21_CONSENT_ACCEPTED="fc-is-21-consent-accepted",t.REACTIVATE_EXPIRED_TASKS_NOTIFICATIONS="fc-reactivate-expired-tasks-notifications",t.ARCADE_PROMO_LAST_SHOWN="fc-arcade-promo-last-shown",t.RE_TARGET_ONE_OFFER_UI_RESET="fc-re-target-one-offer-ui-reset",t.ASK_NOTIFICATION_PERMISSION="fc-ask-notification-permission",t.ASK_NOTIFICATION_PERMISSION_ON_LOAD="fc-ask-notification-permission-on-load",t.INCOMPLETE_POPUP_SHOWN="fc-incomplete-popup-shown",t.HAS_COMPLETED_OFFER="fc-has-completed-offer",t.PREVIOUS_USER_BALANCE="fc-previous-user-balance",t.PREVIOUS_USER_LOTTERY_BALANCE="fc-previous-user-lottery-balance",t.USER_CURRENCY="fc-user-currency",t.TROUBLESHOOT_CLICKED_OFFERS="fc-troubleshoot-clicked-offers",t.REMIND_REVIEW_SEND_TIMESTAMP="fc-remind-review-send-timestamp",t.LAST_SEEN_COOLDOWN_POPUP_TIME="fc-last_seen_cooldown_popup_t
526ime",t.STREAK_V2_VIEW_COUNT_KEY="fc-streak-view-count-key",t.LOTTERY_PRIZE="fc-lottery-prize",t.IS_AD_BLOCK_DETECTED_EVENT_SENT="fc-is_ad_block_detected_event_sent",t.ANDROID_PERMISSION_GRANTED="fc-android-permission-granted",t);e.s(["BrowserStorageKeys",()=>m],709483);var E=e.i(672464),S=e.i(494736),A=e.i(148265);let T=e=>e instanceof Error?e.message:"string"==typeof e?e:JSON.stringify(e);var y=e.i(211564),I=e.i(892251);function R(e){let t=e?.message||"An unexpected error occurred while processing your request";window.Sentry&&window.Sentry.captureException&&window.Sentry.captureException(Error(t),{fingerprint:[t]})}function b(){["premiumLiteOffersShown","earnGetStartedClose","fc-recurring-popups-countdown-info","fc-recurring-popups-cooldown-info","fc-last-seen-my-offer-ids","fc-video-tap-guide","fc-reward-failed-game-offers","fc-cashout-bar-congrats-popup"].forEach(e=>(0,f.removeLocalStorage)(e))}e.s(["default",0,function(){let[e,t]=(0,n.useState)(!1),O=(0,r.useQueryClient)(),N=(0,o.default)(),C=(0,h.useSearchParams)(),k=(0,h.useRouter)(),{lng:L}=(0,v.useLanguageContext)(),{isLoggedIn:D}=(0,_.default)(),[,P]=(0,E.useAtom)(S.globalModalAtomSetter),w="toast",F=e=>{if(e&&!N.isActive(w)){if("string"==typeof e)return void N({id:w,title:e,status:"error",isClosable:!0});e?.errors?.length&&e?.errors?.length>0?N({id:w,title:e.errors?.join(", "),status:"error",isClosable:!0}):N({id:w,title:e.message,status:"error",isClosable:!0})}},U=async e=>M().then(()=>e?null:fetch("/fc-api/auth/logout?redirect=false").then(e=>e.ok?null:e.json())),M=async()=>((0,f.removeLocalStorage)(m.ZERO_FAKE_IS_ACTIVE),window.Verisoul?window.Verisoul.reinitialize().catch(e=>{if(window.Sentry){let t="Verisoul failed to reinitialize";window.Sentry.captureException(Error(t),{fingerprint:[t],extra:{errorMessage:e.message,type:"verisoul failed"}})}}):Promise.resolve()),x=e=>{b(),(0,l.logoutAction)();let t=new URLSearchParams;e&&(e.app&&t.append("app",e.app),e.adid&&t.append("adid",e.adid),e.gaid&&t.append("gaid",e.gaid)),((0,g.isAndroidApp)()||(0,g.isIosApp)()||(0,g.isNewIos)())&&!t.has("app")&&t.set("app",(0,g.isAndroidApp)()?"android":"ios");let n=t.toString(),r=n?`/?${n}`:"/";k.replace(r)},G=async({skipApiCall:e=!1}={})=>{try{let t=await U(e);x(t)}catch(e){R(e)}finally{b(),(0,l.logoutAction)()}};return{signIn:async e=>{t(!0);try{let{success:t,error:n}=await (0,u.signInAction)(e);if(n)throw F(n),n;return O.invalidateQueries({queryKey:[i.QueryKeys.GRAPHQL_ME]}),P({modalName:A.GlobalModalEnum.AUTH,isOpen:!1}),P({modalName:A.GlobalModalEnum.EXIT_INTENT,isOpen:!1}),C.get("redirectUrl")===y.TOP_OFFER_PAGE_URL?k.push(`/${y.TOP_OFFER_PAGE_URL}`):window.location.href="/earn",t}catch(e){throw e&&console.error("unexpected signin client error",{error:T(e),stack:e instanceof Error?e.stack:void 0,name:e instanceof Error?e.name:void 0}),e}finally{t(!1)}},signUp:async(e,n)=>{t(!0);try{let{success:t,gainId:r,error:a}=await (0,c.signUpAction)(e);if(a)throw F(a),a;return O.invalidateQueries({queryKey:[i.QueryKeys.GRAPHQL_ME]}),n&&(0,f.setLocalStorage)(m.SIGNUP_BONUS_ENABLED,"true"),C.get("redirectUrl")===y.TOP_OFFER_PAGE_URL?k.push(`/${y.TOP_OFFER_PAGE_URL}?signupSuccess=true`):(0,g.isNewIosApp)()?window.location.href="/ios-onboarding":window.location.href="/earn?signupSuccess=true",t}catch(e){throw e&&console.error("unexpected signUp client error",{error:T(e),stack:e instanceof Error?e.stack:void 0,name:e instanceof Error?e.name:void 0}),e}finally{t(!1)}},googleOneTap:async(e,n,r)=>{t(!0);try{let{success:t,gainId:a,isNew:o,error:l}=await (0,s.googleOneTapAuthAction)(e);if(l)throw F(l),l;return O.invalidateQueries({queryKey:[i.QueryKeys.GRAPHQL_ME]}),r&&(0,f.setLocalStorage)(m.SIGNUP_BONUS_ENABLED,"true"),P({modalName:A.GlobalModalEnum.AUTH,isOpen:!1}),P({modalName:A.GlobalModalEnum.EXIT_INTENT,isOpen:!1}),o?((0,p.trackSignUpInitatedEvent)({source:n||o?"prompt-signup":"prompt-signin",method:"google-one-tap"}),r&&(0,f.setLocalStorage)(m.SIGNUP_BONUS_ENABLED,"true"),C.get("redirectUrl")===y.TOP_OFFER_PAGE_URL?k.push(`/${y.TOP_OFFER_PAGE_URL}?signupSuccess=true`):(0,g.isNewIosApp)()?window.location.href="/ios-onboarding":window.location.href="/earn?signupSuccess=true"):window.location.href="/",t}catch(e){if(e)throw console.error("unexpected one tap client error",{error:T(e),stack:e instanceof Error?e.stack:void 0,name:e instanceof Error?e.name:void 0}),e}finally{t(!1)}},logout:G,loading:e,changePassword:async e=>{t(!0);try{let t=await (0,a.makeApiRequest)("/auth/reset-password",{method:"POST",body:JSON.stringify(e),headers:(0,d.getRecaptchaHeaders)(e.captchaToken,e.captchaVersion)});if(!t?.ok){let e=await t.json(),n=(0,d.getErrorFromResponse)(e);throw F(n),e}return t}catch(e){throw e}finally{t(!1)}},requestPasswordChange:async e=>{t(!0);try{let t=await (0,a.makeApiRequest)("/auth/reset-request",{method:"POST",body:JSON.stringify({email:e.email}),headers:(0,d.getRecaptchaHeaders)(e.captchaToken,e.captchaVersion)});if(!t?.ok){let e=await t.json(),n=(0,d.getErrorFromResponse)(e);throw F(n),e}return t}catch(e){throw e}finally{t(!1)}},isLoggedIn:D,onLogout:G,initiateLogout:U,attachCredentials:async(e,n)=>(t(!0),new Promise((r,i)=>{I.default.authResource.attachCredentials({email:e,password:n}).then(e=>{e.accessToken&&(window.location.href="/earn?signupSuccess=true"),N({title:"Successfully registered. Please check your E-Mail and verify your E-Mail Address!",status:"success",duration:5e3,isClosable:!0}),r()}).catch(i).finally(()=>{t(!1)})})),onDelete:async()=>{M().then(()=>fetch("/fc-api/auth/delete-account",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}})).then(e=>e.json().then(t=>({status:e.status,ok:e.ok,data:t}))).then(({status:e,ok:t,data:n})=>{if(!t){let t=n?.errors?.[0]||n?.message||"Something went wrong, please try again later";throw N({title:t,status:"error",duration:5e3,isClosable:!0}),Error(`${t}. Status code: ${e}`)}N({title:"Account deleted successfully",status:"success",duration:5e3,isClosable:!0}),x(n)}).catch(R)}}},"handleLogoutError",0,R],334622)}]); 527 528//# debugId=8cb56ce3-aef8-ab24-30bd-506ca4c450d0
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.